CN112884189A - Order quantity prediction model training method, device and equipment - Google Patents

Order quantity prediction model training method, device and equipment Download PDF

Info

Publication number
CN112884189A
CN112884189A CN201911202706.5A CN201911202706A CN112884189A CN 112884189 A CN112884189 A CN 112884189A CN 201911202706 A CN201911202706 A CN 201911202706A CN 112884189 A CN112884189 A CN 112884189A
Authority
CN
China
Prior art keywords
order quantity
model
training
quantity prediction
prediction model
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
CN201911202706.5A
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 CN201911202706.5A priority Critical patent/CN112884189A/en
Publication of CN112884189A publication Critical patent/CN112884189A/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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • 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
    • 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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Economics (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Human Resources & Organizations (AREA)
  • Operations Research (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Tourism & Hospitality (AREA)
  • Data Mining & Analysis (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Quality & Reliability (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Game Theory and Decision Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The method, the device and the equipment for training the order quantity prediction model can improve the accuracy of the order quantity prediction model. The training method of the order quantity prediction model comprises the following steps: acquiring a first training set and a second training set for training a model, wherein the first training set comprises time sequence characteristics of different services, and the second training set comprises operation environment characteristics of different services; training the first initial model through a first training set, and taking the trained model as a first order quantity prediction model; and training the second initial model through the first order quantity prediction model and a second training set, and taking the trained model as a second order quantity prediction model.

Description

Order quantity prediction model training method, device and equipment
Technical Field
The application relates to the field of prediction, in particular to a training method, a training device and training equipment of an order quantity prediction model.
Background
With the rapid development of the e-commerce industry in recent years, the explosion of the logistics industry is also driven, and the volume of orders for logistics increases rapidly, so that under the limited logistics resources of the logistics company, the prediction of the volume of orders plays an important data support for the logistics company to deploy the corresponding logistics resources to serve the logistics orders.
The existing order quantity prediction of the logistics order is mainly realized through two modes, one mode is a traditional manual prediction mode, manual judgment is carried out based on historical logistics order data and working experience, and the mode is high in labor cost and unstable in prediction efficiency and prediction precision; and the other method is to establish an order quantity prediction model through historical logistics order data and automatically predict the order quantity of the logistics order through the model.
However, in practical application, it is found that although the order quantity prediction model obtained by modeling based on the historical logistics order data can predict the order quantity of the logistics order, the accuracy is low, and effective data support cannot be provided for the logistics company.
Disclosure of Invention
The method, the device and the equipment for training the order quantity prediction model can improve the accuracy of the order quantity prediction model.
In a first aspect, an embodiment of the present application provides a method for training an order quantity prediction model, including:
acquiring a first training set and a second training set for training a model, wherein the first training set comprises time sequence characteristics of different services, and the second training set comprises operation environment characteristics of different services;
training the first initial model through a first training set, and taking the trained model as a first order quantity prediction model;
and training the second initial model through the first order quantity prediction model and a second training set, and taking the trained model as a second order quantity prediction model.
In some exemplary embodiments, the method further comprises:
acquiring service information of a target service of an order quantity to be predicted;
and predicting the order quantity of the target service according to the service information of the target service and the second order quantity prediction model.
In some exemplary embodiments, predicting the order quantity of the target service according to the service information of the target service and the second order quantity prediction model includes:
inputting the service information of the target service into a first order quantity prediction model;
acquiring an initial order quantity prediction result output by the first order quantity prediction model;
and inputting the initial order quantity prediction result and the service information of the target service into a second order quantity prediction model to predict the order quantity of the target service.
In some exemplary embodiments, the target service is a logistics service, and predicting the order quantity of the target service according to the service information of the target service and the second order quantity prediction model includes:
and predicting the logistics piece amount of the logistics service at a prediction time point or a prediction time period according to the service information of the logistics service and the second order quantity prediction model.
In some exemplary embodiments, training the first initial model through a first training set, and using the trained model as the first order quantity prediction model includes:
configuring a first time period to be trained;
dividing the first time period into a plurality of second time periods according to the time length of the first time period;
and respectively training the first initial model through a plurality of second time periods and the first training set, and taking the trained model as a first order quantity prediction model.
In some exemplary embodiments, training the second initial model through the first order quantity prediction model and a second training set, and using the trained model as the second order quantity prediction model includes:
sequentially inputting different time sequence characteristics in the first training set into the first order quantity prediction model;
sequentially inputting a first order quantity prediction result output by the first order quantity training model and different operation environment characteristics in a second training set into a second initial model for forward propagation;
calculating a prediction evaluation index according to a second order quantity prediction result output by the second initial model in sequence, and using the prediction evaluation index as a loss function;
and sequentially performing back propagation according to the loss function to optimize the prediction result of the model until the training is finished, and taking the trained model as a second order quantity prediction model.
In some exemplary embodiments, the operational environment characteristics include at least one of extended timing characteristics of different services, economic condition characteristics, geographic location characteristics, weather condition characteristics, and e-commerce activity characteristics.
In a second aspect, an embodiment of the present application provides a training apparatus for an order quantity prediction model, including:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first training set and a second training set used for training a model, the first training set comprises time sequence characteristics of different services, and the second training set comprises operation environment characteristics of different services;
the first training unit is used for training the first initial model through a first training set, and the trained model is used as a first order quantity prediction model;
and the second training unit is used for training the second initial model through the first order quantity prediction model and a second training set, and taking the trained model as a second order quantity prediction model.
In some exemplary embodiments, the apparatus further comprises a prediction unit to:
acquiring service information of a target service of an order quantity to be predicted;
and predicting the order quantity of the target service according to the service information of the target service and the second order quantity prediction model.
In some exemplary embodiments, the prediction unit is specifically configured to:
inputting the service information of the target service into a first order quantity prediction model;
acquiring an initial order quantity prediction result output by the first order quantity prediction model;
and inputting the initial order quantity prediction result and the service information of the target service into a second order quantity prediction model to predict the order quantity of the target service.
In some exemplary embodiments, the target service is a logistics service, and the prediction unit is specifically configured to:
and predicting the logistics piece amount of the logistics service at a prediction time point or a prediction time period according to the service information of the logistics service and the second order quantity prediction model.
In some exemplary embodiments, the first training unit is specifically configured to:
configuring a first time period to be trained;
dividing the first time period into a plurality of second time periods according to the time length of the first time period;
and respectively training the first initial model through a plurality of second time periods and the first training set, and taking the trained model as a first order quantity prediction model.
In some exemplary embodiments, the second training unit is specifically configured to:
sequentially inputting different time sequence characteristics in the first training set into the first order quantity prediction model;
sequentially inputting a first order quantity prediction result output by the first order quantity training model and different operation environment characteristics in a second training set into a second initial model for forward propagation;
calculating a prediction evaluation index according to a second order quantity prediction result output by the second initial model in sequence, and using the prediction evaluation index as a loss function;
and sequentially performing back propagation according to the loss function to optimize the prediction result of the model until the training is finished, and taking the trained model as a second order quantity prediction model.
In some exemplary embodiments, the operational environment characteristics include at least one of extended timing characteristics of different services, economic condition characteristics, geographic location characteristics, weather condition characteristics, and e-commerce activity characteristics.
In a third aspect, an embodiment of the present application further provides an order quantity prediction model training device, which includes a memory and a processor, where the memory stores a computer program, and the processor executes, when calling the computer program in the memory, any one of the steps in the order quantity prediction model training method provided in the embodiment of the present application.
In a fourth aspect, the present application further provides a computer-readable storage medium, where a plurality of instructions are stored, and the instructions are adapted to be loaded by a processor to perform the steps in any one of the methods for training an order quantity prediction model provided in the present application.
As can be seen from the above, the embodiments of the present application have the following beneficial effects:
on one hand, on the basis of the self time sequence characteristics of historical different services, the external operation environment characteristics of the historical different services are introduced, so that in the process of training the order quantity prediction model, the model can be guided to pay attention to the external operation environment characteristics of the services, and therefore the trained second order quantity prediction model has higher pertinence to the external operation environment characteristics of the services, and the order quantity prediction result with higher accuracy can be obtained.
On the other hand, a first order quantity prediction model is obtained through training of time sequence characteristics of different services, and a second order quantity prediction model is obtained through training of the first order quantity prediction model and operating environment characteristics outside the services, so that the model training is divided into two parts, the model training is facilitated, the training efficiency is improved, and the two models are convenient to maintain and update.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a scenario of a training method of an order quantity prediction model according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of an apparatus for training an order quantity prediction model according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart illustrating training of a first order quantity prediction model according to an embodiment of the present application;
FIG. 4 is a schematic flow chart illustrating training of a second order quantity prediction model according to an embodiment of the present application;
FIG. 5 is a schematic flow chart illustrating the prediction of order quantity by a trained order quantity prediction model according to an embodiment of the present application;
FIG. 6 is a schematic diagram of another process for predicting order quantity through a trained order quantity prediction model according to an embodiment of the present application;
FIG. 7 is a schematic structural diagram of a training apparatus for an order quantity prediction model according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a training device for an order quantity prediction model according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description that follows, specific embodiments of the present invention are described with reference to steps and symbols executed by one or more computers, unless otherwise indicated. Accordingly, these steps and operations will be referred to, several times, as being performed by a computer, the computer performing operations involving a processing unit of the computer in electronic signals representing data in a structured form. This operation transforms the data or maintains it at locations in the computer's memory system, which may be reconfigured or otherwise altered in a manner well known to those skilled in the art. The data maintains a data structure that is a physical location of the memory that has particular characteristics defined by the data format. However, while the principles of the invention have been described in language specific to above, it is not intended to be limited to the specific form set forth herein, but on the contrary, it is to be understood that various steps and operations described hereinafter may be implemented in hardware.
The principles of the present invention are operational with numerous other general purpose or special purpose computing, communication environments or configurations. Examples of well known computing systems, environments, and configurations that may be suitable for use with the invention include, but are not limited to, hand-held telephones, personal computers, servers, multiprocessor systems, microcomputer-based systems, mainframe-based computers, and distributed computing environments that include any of the above systems or devices.
The terms "first", "second", and "third", etc. in the present invention are used for distinguishing different objects, not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions.
First, before describing the embodiments of the present application, the related contents of the embodiments of the present application with respect to the application context will be described.
In the related art about order quantity prediction in the logistics field, since training of an order quantity prediction model is performed only depending on order data of historical logistics business, and special situations which do not occur in the historical logistics business, such as special festivals of an e-commerce platform, sudden conditions of temporary shop activities and the like, are not considered, the accuracy is low when the e-commerce platform is put into practical application.
Based on the above defects of the prior art, the embodiment of the present application provides a training method of an order quantity prediction model, which overcomes the defects of the prior art at least to some extent.
An execution main body of the training method for the order quantity prediction model in the embodiment of the present application may be a training device of the order quantity prediction model provided in the embodiment of the present application, or a training device of different types of order quantity prediction models, such as a server device, a physical host, or a User Equipment (UE), which is integrated with the training device of the order quantity prediction model, where the training device of the order quantity prediction model may be implemented in a hardware or software manner, and the UE may specifically be a terminal device, such as a smart phone, a tablet computer, a notebook computer, a palm top computer, a desktop computer, or a Personal Digital Assistant (PDA).
The training device of the order quantity prediction model may adopt a working mode of independent operation or a working mode of a device cluster, for example, a scene schematic diagram of the training method of the order quantity prediction model of the present application shown in fig. 1, by applying the training method of the order quantity prediction model provided by the embodiment of the present application, in the process of training the order quantity prediction model, on the basis of the time sequence characteristics of the historical different services, the external operating environment characteristics of the historical different services are introduced, the order quantity prediction result with higher accuracy can be obtained, and the training of the model is divided into two parts, which not only facilitates the training of the model and improves the training efficiency, but also facilitates the maintenance and updating of the model.
For example, not only the training of the model may be divided into two parts, but also the device for training the model may be divided into two parts based on the training content of the two parts, for example, a first order quantity prediction model may be trained at the cloud server in combination with the time sequence characteristics of different services themselves, the local device downloads the first order quantity prediction model from the cloud server, and a second order quantity prediction model may be trained in combination with the operating environment characteristics of different services locally stored by the device.
The service order quantity prediction can be used for predicting the logistics quantity of the logistics service at a prediction time point or a prediction time period, typically predicting the express quantity of express delivery in a week time in the future, and can also be used for predicting the volume of business such as e-commerce service and the like at the prediction time point or the prediction time period, typically predicting the volume of business of a certain commodity in the future for 3 days.
Next, a method for training an order quantity prediction model provided in the embodiment of the present application is described.
On the basis of the application scenario shown in fig. 1, referring to fig. 2, a flowchart of a training method of an order quantity prediction model according to an embodiment of the present application is shown, where the training method of an order quantity prediction model provided by the embodiment includes:
step S201, a first training set and a second training set for training a model are obtained, wherein the first training set comprises time sequence characteristics of different services, and the second training set comprises operation environment characteristics of different services;
step S202, training a first initial model through a first training set, and taking the trained model as a first order quantity prediction model;
step S203, training the second initial model through the first order quantity prediction model and the second training set, and taking the trained model as the second order quantity prediction model.
In the technical solution proposed in the embodiment shown in fig. 2, on one hand, the historical external operating environment characteristics of different services are introduced on the basis of the time sequence characteristics of the historical different services, so that in the process of training the order quantity prediction model, the model can be guided to pay attention to the external operating environment characteristics of the services, and thus the trained second order quantity prediction model has higher pertinence to the external operating environment characteristics of the services, and a higher-accuracy order quantity prediction result can be obtained.
On the other hand, a first order quantity prediction model is obtained through training of time sequence characteristics of different services, and a second order quantity prediction model is obtained through training of the first order quantity prediction model and operating environment characteristics outside the services, so that the model training is divided into two parts, the model training is facilitated, the training efficiency is improved, and the two models are convenient to maintain and update.
Specific implementations of the various steps of the embodiment shown in FIG. 2 are described in detail below:
in an exemplary embodiment, for the services requiring the predicted order amount, the logistics services may be provided, and the corresponding time sequence characteristics and operation environment characteristics of different services are the time sequence characteristics and operation environment characteristics of different logistics services.
The time sequence characteristics and the operation environment characteristics of different services are obtained based on the services, and may be extracted from a historical service set after the historical service set used for training the model is determined, or determined by a worker on the basis of the historical service set, or may be extracted from the latest services continuously by monitoring the services of a company, and the specific details are not limited herein.
The time sequence characteristic is characteristic information of the order quantity of the service on at least one time sequence, for example, the time sequence is a time point or a time period such as minutes, hours, business hours, weekends, seasons, business quarters, public holidays or leap years, and the characteristic information of the order quantity of the service on the time sequence is used for indicating the change of the order quantity of the service on the time sequence, such as a change index such as a growth amplitude, a growth proportion or a growth trend.
The operation environment characteristic is characteristic information of the order quantity of the service under different operation environments, illustratively, the operation environment can be classified into environment conditions such as extended time sequence, economic conditions, geographic positions, weather conditions, e-commerce activities and the like, and the characteristic information of the order quantity of the service under the operation environment is used for indicating the order quantity of the service.
Extending the time sequence, wherein as the time sequence obtained by artificial extension on the basis of the original historical service, a worker can configure a time sequence other than the original time sequence in a prediction mode or a mode known in advance, or can also configure a time sequence existing in other service categories or other data, for example, the time sequences of the book service, such as the 4-month and 23-day world reading date in which the online book volume can be greatly increased, the update cycle of preferential products of certain clothing brands, the shelving cycle of new products, and the like; the economic conditions are economic quantitative indexes such as minimum payroll standard maximum value, minimum annual payroll standard minimum value, median annual minimum payroll standard median, average annual minimum payroll standard, monthly Baidu index, annual GDP, annual first industry occupation ratio, annual second industry occupation ratio, annual first industry GDP and the like; the geographical position is an administrative division area such as a country, a province, a city, an area and the like, or a terrain such as a plain, a basin, a hill, a coastal area and the like, or a geographical reference factor such as high latitude, high longitude, low longitude, high altitude and the like; weather conditions, such as sunny days, rainy days, cloudy days, deteriorated air quality, heat waves, cold tides, rainstorms, snowstorms, hailstones, sand storms, hurricanes, tornadoes, floods or droughts and other weather factors; the e-commerce activities are activities provided for the e-commerce platform or the online stores to the consumers, such as e-commerce festivals, promotion festivals, clearing days, killing seconds, gifting or reducing activities and other activity factors.
In an exemplary embodiment, referring to a flowchart of training a first order quantity prediction model in the embodiment of the present application shown in fig. 3, as a specific implementation manner of step S202 in the embodiment corresponding to fig. 2, the method may include the following steps S301 to S303:
step S301, configuring a first time period to be trained;
in training the first order quantity prediction model, a time period in which the first order quantity prediction model can predict or needs to predict is configured as one of the training targets, and the time period is used as the first time period.
The first time period may be a time period in time units of hours, days, weeks, months, seasons, or years, such as 2 weeks, 2015 years 1-6 months, past 1.5 years, in the future.
Step S302, dividing the first time period into a plurality of second time periods according to the time length of the first time period;
after the first time period is determined, the time period may be divided according to the time unit used in the first time period, or the time unit of the next level of the time unit.
For example, months 1 to 6 of 2015 may be divided into 6 second time periods of months 1, 2, 3, 4, 5 and 6 of 2015; or the past 1.5 years may be divided into 18 second time periods of the past 18 months, and the past 17 months … for the past 1 month.
The plurality of second time periods obtained by dividing the first time period may be the same or different in time length, or may be divided into 3 second time periods of 1 month 2015, 2 months 2015 to 3 months 2015, and 4 months 2015 to 6 months 2015, for example.
Step S303, training the first initial model through a plurality of second time periods and the first training set, respectively, and using the trained model as a first order quantity prediction model.
After the second time period is determined, according to the time division of the second time period, the time sequence characteristics of different services of the corresponding time period are sequentially screened out from the first training set, the initialized first initial model is sequentially input for forward propagation, then backward propagation is sequentially performed according to a preset loss function, so that the parameters of the model are adjusted, the prediction result of the model is optimized, and the training of the model can be completed when the requirements of the loss function or other targets are met.
It should be understood that the order quantity prediction result output by the model may include not only the order quantity of the predicted time point or predicted time period desired to be predicted, but also the confidence interval of the order quantity, etc.
For example, the first initial model may be a Prophet model, the Prophet model is a FaceBook open-source timing framework, and is an integrated solution for timing, and the prediction on the timing has a characteristic of high accuracy, and thus is suitable for being trained as the first order quantity prediction model in the embodiment of the present application. The Prophet model can analyze various time series characteristics (including periodicity, trend and partial abnormal values). In the aspect of trend, the method supports the addition of change points, realizes piecewise linear fitting, and in the aspect of period, uses Fourier series to build a period model.
For example, referring to a flowchart of training a second order quantity prediction model in the embodiment of the present application shown in fig. 4, as a specific implementation manner of step S203 in the embodiment corresponding to fig. 2, the method may include the following steps S401 to S404:
step S401, sequentially inputting different time sequence characteristics in a first training set into a first order quantity prediction model;
when a second initialization model is trained by combining a first order quantity prediction model and a second training set, firstly, different time sequence characteristics in the first training set are sequentially input into the first order quantity prediction model similarly to the training of the first order quantity prediction model, and first order quantity prediction results sequentially output by the models can be extracted.
Step S402, inputting a first order quantity prediction result output by the first order quantity training model and different operation environment characteristics in a second training set into a second initial model in sequence, and performing forward propagation;
while or after the first order quantity prediction result output by the first order quantity training model is obtained, the first order quantity prediction result and different operation environment characteristics in the second training set can be input into the second initial model, forward propagation is carried out from input and processing to output, and the second order quantity prediction result is output.
Step S403, calculating a prediction evaluation index according to a second order quantity prediction result output by the second initial model in sequence, and using the prediction evaluation index as a loss function;
after a second order quantity prediction result output by the second initial model is obtained, a loss function can be calculated according to the prediction result.
Illustratively, an exponential loss function, a cross-entropy loss function, a quadratic loss function, a mean square error loss function, or the like may be employed.
Alternatively, a predictive evaluation index such as Symmetric Mean Absolute Percent Error (SMAPE) may be used as a loss function, which is calculated by the formula:
Figure BDA0002296249730000101
Figure BDA0002296249730000102
the predicted value of the order amount is indicated, and y indicates the actual value of the order amount.
The smaller the SMAPE, the more accurate the prediction is represented, and the larger the SMAPE, the more inaccurate the prediction is represented.
It should be noted that the prediction evaluation index may be present in the prediction result for the order amount output by the model, in addition to the loss function.
And S404, sequentially performing back propagation according to the loss function to optimize the prediction result of the model until the training is finished, and taking the trained model as a second order quantity prediction model.
After the loss function is calculated, back propagation can be performed based on the loss function, parameters in the model are corrected, and then the prediction result of the model is optimized.
Illustratively, after a second order quantity prediction result calculated by any group of first order quantity prediction results and operation environment characteristics is obtained through forward propagation, the gradient of the loss function relative to each parameter can be used for correction, and the correction is carried out through a continuous forward-backward propagation process until the prediction capability of the model meets the expectation of the calculation accuracy of the model.
For example, the second initial model may be a Gradient Boosting Decision Tree (GBDT) model, And a bottom layer of the GBDT algorithm is based on a Classification Decision Tree (CRT) And a Gradient descent algorithm of a function space, And besides the advantages of the Tree model, such as strong interpretability, efficient processing of mixed-type features, invariance to stretch, robustness to a missing value, And the like, the second initial model also has the advantages of strong prediction capability, good stability, And the like.
Among them, preferably, a LightGBM model is adopted, which is a gradient Boosting framework based on GBDT, and a decision tree based on a learning algorithm is used. The LightGBM model provides Gradient-based One-Side Sampling (GOSS) and mutually Exclusive Feature Bundling (EFB), and in principle, a negative Gradient of a loss function is used as a residual error approximate value of a current decision tree to fit a new decision tree. The LightGBM model has the characteristics of distribution, high efficiency, high training efficiency, low memory use and the like, and can be 20 times faster than the traditional GBDT model when reaching the same accuracy.
In an exemplary embodiment, for a fully trained order quantity model, it may be used to predict the order quantity of the target business at a predicted point in time or within a predicted time period. For example, referring to fig. 5, a flow chart of the embodiment of the present application for predicting order quantity through a trained order quantity prediction model may include:
step S501, acquiring service information of a target service of a to-be-predicted order quantity;
predicting the order quantity of the target service requires determining the service information of the target service, wherein the service information comprises a service type, a prediction time point or a prediction time period.
In addition, corresponding to the training of the model, the service information of the target service also includes the operation environment information of the target service.
Taking express delivery service as an example, the first order quantity prediction model and the second order quantity prediction model are obtained by training on the basis of time sequence characteristics and operation environment characteristics of different express delivery services, and when the trained models are put into application subsequently, if the express delivery quantity of a future week is predicted, in the service information of the current express delivery service needing to be input into the models, identifiers of 'express delivery service Identifier (ID)' and '+ 7day or +1 week' are filled in the identifier for confirming the service type and the predicted time point or the predicted time period, and in addition, the identifier can be filled with operation environment information including extended time sequence, economic conditions, geographic positions, weather conditions, e-commerce activities and the like, such as 'summer operation environment, new product shelf life, economically developed area, city center area, sunny day, second killer'.
Step S502, predicting the order quantity of the target business according to the business information of the target business and the second order quantity prediction model.
The service information of the target service is input into the second order quantity prediction model, the second order quantity prediction model can be combined with the time sequence and the operation environment of the target service to predict the order quantity of the target service at the prediction time point or the prediction time period, and the operation environment is considered on the basis of the time sequence, so that the prediction result of the order quantity of the target service at this time has higher accuracy.
In an exemplary embodiment, the order quantity of the target service at the prediction time point or the prediction time period may be predicted by further combining the first order quantity prediction model and the second order quantity prediction model, for example, referring to still another flowchart illustrating that the order quantity is predicted by the trained order quantity prediction model in the embodiment of the present application shown in fig. 6, as a specific implementation manner of step S502 in the corresponding embodiment of fig. 5, the following steps S601 to S603 may be included:
step S601, inputting the service information of the target service into a first order quantity prediction model;
step S602, obtaining an initial order quantity prediction result output by the first order quantity prediction model;
step S603, inputting the initial order quantity prediction result and the service information of the target service into the second order quantity prediction model, and predicting the order quantity of the target service.
Illustratively, when the second order quantity prediction model is used for predicting the order quantity of the target service at a prediction time point or a prediction time period, the service information of the target service can be input into the first order quantity prediction model, and it can be understood that the first order quantity prediction model is a model obtained by training time sequence characteristics of different services, so that the time sequence has higher pertinence, and an initial order quantity prediction result of the target service can be obtained through the first order quantity prediction model.
And then, inputting the initial order quantity model and the service information of the target service into a second order quantity prediction model, wherein the second order quantity prediction model can be combined with the time sequence and the operation environment of the target service, and the initial order quantity prediction result is supplemented for fine adjustment to output the order quantity prediction result of the target service with higher accuracy.
In order to better implement the method for training the order quantity prediction model provided in the embodiment of the present application, the embodiment of the present application further provides a device for training the order quantity prediction model.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a training apparatus for an order quantity prediction model according to an embodiment of the present application, wherein the training apparatus 700 for an order quantity prediction model specifically includes the following structure:
an obtaining unit 701, configured to obtain a first training set and a second training set used for training a model, where the first training set includes timing characteristics of different services, and the second training set includes operating environment characteristics of different services;
a first training unit 702, configured to train a first initial model through a first training set, and use the trained model as a first order quantity prediction model;
the second training unit 703 is configured to train the second initial model through the first order quantity prediction model and the second training set, and use the trained model as the second order quantity prediction model.
In some exemplary embodiments, the apparatus further comprises a prediction unit 704 for:
acquiring service information of a target service of an order quantity to be predicted;
and predicting the order quantity of the target service according to the service information of the target service and the second order quantity prediction model.
In some exemplary embodiments, the prediction unit 704 is specifically configured to:
inputting the service information of the target service into a first order quantity prediction model;
acquiring an initial order quantity prediction result output by the first order quantity prediction model;
and inputting the initial order quantity prediction result and the service information of the target service into a second order quantity prediction model to predict the order quantity of the target service.
In some exemplary embodiments, the target service is a logistics service, and the prediction unit 704 is specifically configured to:
and predicting the logistics piece amount of the logistics service at a prediction time point or a prediction time period according to the service information of the logistics service and the second order quantity prediction model.
In some exemplary embodiments, the first training unit 702 is specifically configured to:
configuring a first time period to be trained;
dividing the first time period into a plurality of second time periods according to the time length of the first time period;
and respectively training the first initial model through a plurality of second time periods and the first training set, and taking the trained model as a first order quantity prediction model.
In some exemplary embodiments, the second training unit 703 is specifically configured to:
sequentially inputting different time sequence characteristics in the first training set into the first order quantity prediction model;
sequentially inputting a first order quantity prediction result output by the first order quantity training model and different operation environment characteristics in a second training set into a second initial model for forward propagation;
calculating a prediction evaluation index according to a second order quantity prediction result output by the second initial model in sequence, and using the prediction evaluation index as a loss function;
and sequentially performing back propagation according to the loss function to optimize the prediction result of the model until the training is finished, and taking the trained model as a second order quantity prediction model.
In some exemplary embodiments, the operational environment characteristics include at least one of extended timing characteristics of different services, economic condition characteristics, geographic location characteristics, weather condition characteristics, and e-commerce activity characteristics.
Referring to fig. 8, fig. 8 shows a schematic structural diagram of a training device of an order quantity prediction model in the embodiment of the present application, specifically, the training device of an order quantity prediction model in the embodiment of the present application includes a processor 801, and when the processor 801 is used to execute a computer program stored in a memory 802, each step of the training method of an order quantity prediction model in any embodiment corresponding to fig. 2 to 6 is implemented; alternatively, the processor 801 is configured to implement the functions of the units in the corresponding embodiment of fig. 7 when executing the computer program stored in the memory 802.
Illustratively, a computer program may be partitioned into one or more modules/units, which are stored in the memory 802 and executed by the processor 801 to accomplish the present application. One or more modules/units may be a series of computer program instruction segments capable of performing certain functions, the instruction segments being used to describe the execution of a computer program in a computer device.
The training device of the order quantity prediction model may include, but is not limited to, a processor 801 and a memory 802. Those skilled in the art will appreciate that the illustration is merely an example of the training device of the order quantity prediction model, and does not constitute a limitation of the training device of the order quantity prediction model, and may include more or less components than those illustrated, or combine some components, or different components, for example, the training device of the order quantity prediction model may further include an input-output device, a network access device, a bus, etc., and the processor 801, the memory 802, the input-output device, and the network access device, etc., are connected through the bus.
The Processor 801 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being the control center of the training apparatus for the order quantity prediction model, and various interfaces and lines connecting the various parts of the training apparatus for the entire order quantity prediction model.
The memory 802 may be used to store computer programs and/or modules, and the processor 801 may implement various functions of the computer device by running or executing the computer programs and/or modules stored in the memory 802 and invoking data stored in the memory 802. The memory 802 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, video data, and the like) created from use of the training apparatus of the order quantity prediction model, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the above-described specific working processes of the training apparatus and the device for an order quantity prediction model and the corresponding units thereof may refer to the description of the training method for an order quantity prediction model in any embodiment corresponding to fig. 2 to 6, and are not described herein again in detail.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
For this reason, the embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in the method for training an order quantity prediction model in any embodiment of the present application, as shown in fig. 2 to fig. 6, for specific operations, reference may be made to the description of the method for training an order quantity prediction model in any embodiment of fig. 2 to fig. 6, and no further description is given here.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps in the method for training the order quantity prediction model in any embodiment of the present application, such as that shown in fig. 2 to fig. 6, the beneficial effects that can be achieved by the method for training the order quantity prediction model in any embodiment of the present application, such as that shown in fig. 2 to fig. 6, can be achieved, and are described in detail in the foregoing description, and are not repeated herein.
The above detailed description is given to a training method, an apparatus, a device, and a computer-readable storage medium of an order quantity prediction model provided in the embodiment of the present application, and a specific example is applied in the detailed description to explain the principle and the implementation manner of the embodiment of the present application, and the description of the above embodiment is only used to help understanding the method and the core idea of the embodiment of the present application; meanwhile, for those skilled in the art, according to the idea of the embodiment of the present application, the specific implementation manner and the application range may be changed, and in summary, the content of the present specification should not be construed as a limitation to the embodiment of the present application.

Claims (10)

1. A method for training an order quantity prediction model is characterized by comprising the following steps:
acquiring a first training set and a second training set for training a model, wherein the first training set comprises time sequence characteristics of different services, and the second training set comprises operation environment characteristics of different services;
training a first initial model through the first training set, and taking the trained model as a first order quantity prediction model;
and training a second initial model through the first order quantity prediction model and the second training set, and taking the trained model as a second order quantity prediction model.
2. The method of claim 1, further comprising:
acquiring service information of a target service of an order quantity to be predicted;
and predicting the order quantity of the target service according to the service information of the target service and the second order quantity prediction model.
3. The method of claim 2, wherein predicting the order quantity of the target service according to the service information of the target service and the second order quantity prediction model comprises:
inputting the service information of the target service into the first order quantity prediction model;
acquiring an initial order quantity prediction result output by the first order quantity prediction model;
and inputting the initial order quantity prediction result and the service information of the target service into the second order quantity prediction model to predict the order quantity of the target service.
4. The method according to claim 2, wherein the target service is a logistics service, and the predicting the order quantity of the target service according to the service information of the target service and the second order quantity prediction model comprises:
and predicting the logistics piece amount of the logistics service at a prediction time point or a prediction time period according to the service information of the logistics service and the second order quantity prediction model.
5. The method of claim 1, wherein training a first initial model through the first training set, and wherein using the trained model as a first order quantity prediction model comprises:
configuring a first time period to be trained;
dividing the first time period into a plurality of second time periods according to the time length of the first time period;
and training the first initial model through the plurality of second time periods and the first training set respectively, and taking the trained model as the first order quantity prediction model.
6. The method of claim 1, wherein training a second initial model through the first order quantity prediction model and the second training set, and wherein using the trained model as a second order quantity prediction model comprises:
sequentially inputting different time sequence characteristics in the first training set into the first order quantity prediction model;
sequentially inputting a first order quantity prediction result output by the first order quantity training model and different operation environment characteristics in the second training set into the second initial model for forward propagation;
calculating a prediction evaluation index according to a second order quantity prediction result output by the second initial model in sequence, and taking the prediction evaluation index as a loss function;
and sequentially performing back propagation according to the loss function to optimize the prediction result of the model until the training is finished, and taking the trained model as the second order quantity prediction model.
7. The method of claim 1, wherein the operational environment characteristics comprise at least one of extended timing characteristics, economic conditions characteristics, geographic locations characteristics, weather conditions characteristics, and e-commerce activities characteristics of different services.
8. An apparatus for training an order quantity prediction model, comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first training set and a second training set used for training a model, the first training set comprises time sequence characteristics of different services, and the second training set comprises operation environment characteristics of different services;
the first training unit is used for training a first initial model through the first training set and taking the trained model as a first order quantity prediction model;
and the second training unit is used for training a second initial model through the first order quantity prediction model and the second training set, and taking the trained model as a second order quantity prediction model.
9. An apparatus for training an order quantity prediction model, comprising a processor and a memory, wherein the memory stores a computer program, and the processor executes a method for training an order quantity prediction model according to any one of claims 1 to 7 when calling the computer program in the memory.
10. A computer readable storage medium storing instructions adapted to be loaded by a processor to perform the method of training an order quantity prediction model according to any one of claims 1 to 7.
CN201911202706.5A 2019-11-29 2019-11-29 Order quantity prediction model training method, device and equipment Pending CN112884189A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911202706.5A CN112884189A (en) 2019-11-29 2019-11-29 Order quantity prediction model training method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911202706.5A CN112884189A (en) 2019-11-29 2019-11-29 Order quantity prediction model training method, device and equipment

Publications (1)

Publication Number Publication Date
CN112884189A true CN112884189A (en) 2021-06-01

Family

ID=76039063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911202706.5A Pending CN112884189A (en) 2019-11-29 2019-11-29 Order quantity prediction model training method, device and equipment

Country Status (1)

Country Link
CN (1) CN112884189A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113780939A (en) * 2021-08-26 2021-12-10 杭州拼便宜网络科技有限公司 Storage space configuration method, device, equipment and storage medium
CN114022057A (en) * 2022-01-06 2022-02-08 国家邮政局邮政业安全中心 Industry structure analysis method, device and equipment based on E-commerce consignment business volume

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030130899A1 (en) * 2002-01-08 2003-07-10 Bruce Ferguson System and method for historical database training of non-linear models for use in electronic commerce
CN109117973A (en) * 2017-06-26 2019-01-01 北京嘀嘀无限科技发展有限公司 A kind of net about vehicle order volume prediction technique and device
CN109583625A (en) * 2018-10-19 2019-04-05 顺丰科技有限公司 One kind pulling part amount prediction technique, system, equipment and storage medium
CN109905271A (en) * 2018-05-18 2019-06-18 华为技术有限公司 A kind of prediction technique, training method, device and computer storage medium
CN109902861A (en) * 2019-01-31 2019-06-18 南京航空航天大学 A kind of order manufacturing schedule real-time predicting method based on the double-deck transfer learning
CN110046788A (en) * 2019-01-17 2019-07-23 阿里巴巴集团控股有限公司 Vehicle Demand Forecast method and device, vehicle supply amount prediction technique and device
CN110084438A (en) * 2019-05-09 2019-08-02 上汽安吉物流股份有限公司 Prediction technique and device, the logistics system and computer-readable medium of order

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030130899A1 (en) * 2002-01-08 2003-07-10 Bruce Ferguson System and method for historical database training of non-linear models for use in electronic commerce
CN109117973A (en) * 2017-06-26 2019-01-01 北京嘀嘀无限科技发展有限公司 A kind of net about vehicle order volume prediction technique and device
CN109905271A (en) * 2018-05-18 2019-06-18 华为技术有限公司 A kind of prediction technique, training method, device and computer storage medium
CN109583625A (en) * 2018-10-19 2019-04-05 顺丰科技有限公司 One kind pulling part amount prediction technique, system, equipment and storage medium
CN110046788A (en) * 2019-01-17 2019-07-23 阿里巴巴集团控股有限公司 Vehicle Demand Forecast method and device, vehicle supply amount prediction technique and device
CN109902861A (en) * 2019-01-31 2019-06-18 南京航空航天大学 A kind of order manufacturing schedule real-time predicting method based on the double-deck transfer learning
CN110084438A (en) * 2019-05-09 2019-08-02 上汽安吉物流股份有限公司 Prediction technique and device, the logistics system and computer-readable medium of order

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113780939A (en) * 2021-08-26 2021-12-10 杭州拼便宜网络科技有限公司 Storage space configuration method, device, equipment and storage medium
CN114022057A (en) * 2022-01-06 2022-02-08 国家邮政局邮政业安全中心 Industry structure analysis method, device and equipment based on E-commerce consignment business volume

Similar Documents

Publication Publication Date Title
CN109495318B (en) Mobile communication network flow prediction method, device and readable storage medium
CN108960694B (en) Distribution area determining method and device
CN110956202B (en) Image training method, system, medium and intelligent device based on distributed learning
CN112288572B (en) Service data processing method and computer equipment
CN110046755A (en) Allot the determination method and apparatus in warehouse
CN110162292A (en) Voice broadcast method and device
EP3961384A1 (en) Automatic derivation of software engineering artifact attributes from product or service development concepts
CN111507542B (en) Freight order quantity measuring method and device and electronic equipment
CN111353620A (en) Method, device and equipment for constructing network point component prediction model and storage medium
CN112884189A (en) Order quantity prediction model training method, device and equipment
US10318558B2 (en) Automating weather model configurations
CN110544055A (en) order processing method and device
CN114049162A (en) Model training method, demand prediction method, apparatus, device, and storage medium
CN116030617A (en) Method and device for predicting traffic flow based on road OD data
CN111415075B (en) Vehicle scheduling method and device
CN111105050B (en) Fan maintenance plan generation method, device, equipment and storage medium
CN114092162B (en) Recommendation quality determination method, and training method and device of recommendation quality determination model
CN113723712B (en) Wind power prediction method, system, equipment and medium
CN112085497A (en) User account data processing method and device
CN113822609A (en) Logistics line generation method and device and server
CN112073454A (en) Resource distribution method and device and electronic equipment
CN112836965B (en) Pressure regulation scheme selection method and device
EP4318375A1 (en) Graph data processing method and apparatus, computer device, storage medium and computer program product
CN111275232A (en) Method and system for generating future value prediction model
CN113905070B (en) Service providing method and system

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