CN112347703A - Training method of material usage prediction model, and material usage prediction method and device - Google Patents

Training method of material usage prediction model, and material usage prediction method and device Download PDF

Info

Publication number
CN112347703A
CN112347703A CN202011412402.4A CN202011412402A CN112347703A CN 112347703 A CN112347703 A CN 112347703A CN 202011412402 A CN202011412402 A CN 202011412402A CN 112347703 A CN112347703 A CN 112347703A
Authority
CN
China
Prior art keywords
time
data
cluster
usage
material usage
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
CN202011412402.4A
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.)
Tsinghua University
Weichai Power Co Ltd
Original Assignee
Weichai Power 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 Weichai Power Co Ltd filed Critical Weichai Power Co Ltd
Priority to CN202011412402.4A priority Critical patent/CN112347703A/en
Publication of CN112347703A publication Critical patent/CN112347703A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification
    • 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"

Abstract

The invention discloses a training method of a material usage prediction model, a material usage prediction method and a device, which can obtain time series data of material usage of a plurality of materials in a historical time period, cluster the materials based on the time series data of the materials, determine at least one material cluster, respectively determine material training sample sets corresponding to the material clusters, respectively train corresponding basic prediction models by using the material training sample sets, and obtain the material usage prediction models corresponding to the material clusters. The method and the device can effectively improve the accuracy of predicting the material consumption of the material, thereby improving the accuracy of calculating the safety stock according to the time average value of the material consumption in the prediction duration. The quantity of the material usage prediction models to be modeled is consistent with the quantity of the material clusters, and the quantity of the material usage prediction models to be modeled can be effectively reduced, so that the modeling workload can be reduced, the prediction efficiency can be improved, and the calculation efficiency of the safety stock of the materials can be improved.

Description

Training method of material usage prediction model, and material usage prediction method and device
Technical Field
The invention relates to the field of machine learning, in particular to a training method of a material usage prediction model, a material usage prediction method and a device.
Background
With the development of scientific technology, the prediction technology of safety stock is continuously improved.
Safety stock is a kind of buffer stock set by enterprises in production management to prevent uncertain factors of material supply or demand, such as large sudden orders, unexpected interruptions or sudden delays of delivery. The enterprise may use a safety stock classical formula to calculate a safety stock for the material.
However, when determining the average daily requirement of the materials in the classic formula of the safety stock, the prior art generally directly uses the average usage of the materials in the past period (such as 30 days or 90 days) as the average daily requirement of the materials, and does not effectively consider the fluctuation and trend of the usage of the materials, resulting in low accuracy.
Disclosure of Invention
In view of the above problems, the present invention provides a method for training a material usage prediction model, a method for predicting material usage, and an apparatus thereof, which overcome the above problems or at least partially solve the above problems, and the technical solutions are as follows:
a material usage prediction method comprises the following steps:
determining a target material cluster in which a first material is located, wherein the target material cluster is obtained by clustering a plurality of materials;
determining a target material usage prediction model matched with the target material cluster, wherein the material usage prediction models matched with different material clusters are different, and the target material usage prediction model is obtained by performing machine learning on a material training sample set corresponding to the target material cluster;
obtaining time series data of material usage of the first material in a first historical time period;
determining seasonal characteristic information corresponding to the first historical time period;
determining a predicted time length;
and inputting the time sequence data, the seasonal characteristic information and the prediction duration into the target material usage prediction model, and obtaining a time average value of the demand usage of the first material within the prediction duration, which is output by the target material usage prediction model.
A training method of a material usage prediction model comprises the following steps:
obtaining time sequence data of material usage of a plurality of materials in a historical time period;
clustering the materials based on the time sequence data of the materials to determine at least one material cluster, wherein each material cluster at least comprises one material;
respectively determining a material training sample set corresponding to each material cluster;
and respectively training the corresponding basic prediction model by using the material training sample sets to obtain the material usage prediction model corresponding to each material cluster.
Optionally, the clustering the materials based on the time-series data of the materials includes:
respectively carrying out normalization processing on the time sequence data of each material to obtain normalized time sequence data of each material;
clustering each of the materials based on the normalized time series data for each of the materials.
Optionally, the time-series data includes daily material usage of materials in a historical time period, and the normalizing the time-series data of each material includes:
respectively determining the total material usage of each material in the historical time period;
respectively determining the material usage amount of each material in each week in the historical time period;
for any of the materials: and obtaining the proportion value of the weekly material usage of the material in the total material usage of the material, and determining each obtained proportion value as the normalized time sequence data of the material.
Optionally, the determining the material training sample set corresponding to each material cluster respectively includes:
and respectively sampling time sequence data of the materials under each material cluster in a time sliding window mode to construct a material training sample set corresponding to each material cluster.
Optionally, the sampling time series data of the materials under each material cluster by using a time sliding window includes:
respectively sampling time sequence data of the materials under each material cluster in a time sliding window mode to obtain at least one piece of time window data of the materials under each material cluster, wherein the time window data comprise historical time window data and predicted time window data; in each piece of time window data, the historical time window data is time sequence data of the material in a first preset time length, the predicted time window data is a time average value of material usage of the material in a second preset time length, and a time period corresponding to the first preset time length is a previous time period of the time period corresponding to the second preset time length;
respectively splicing the historical time window data in each time window data under the same material cluster with corresponding seasonal characteristic information to construct a training sample corresponding to each material cluster;
and marking corresponding prediction time window data for each training sample to construct a material training sample set corresponding to each material cluster.
Optionally, when the time series data includes daily material usage of the material within a historical time period, in each piece of the time window data, the historical time window data includes daily material usage of the material within a first preset time period, and the predicted time window data includes daily average material usage of the material within a second preset time period.
A material quantity prediction apparatus comprising: a first determining unit, a second determining unit, a first obtaining unit, a third determining unit, a fourth determining unit, a data input unit, and a second obtaining unit, wherein:
the first determination unit is configured to perform: determining a target material cluster in which a first material is located, wherein the target material cluster is obtained by clustering a plurality of materials;
the second determination unit configured to perform: determining a target material usage prediction model matched with the target material cluster, wherein the material usage prediction models matched with different material clusters are different, and the target material usage prediction model is obtained by performing machine learning on a material training sample set corresponding to the target material cluster;
the first obtaining unit is configured to perform: obtaining time series data of material usage of the first material in a first historical time period;
the third determination unit is configured to perform: determining seasonal characteristic information corresponding to the first historical time period;
the fourth determination unit configured to perform: determining a predicted time length;
the data input unit is configured to perform: inputting the time series data, the seasonal characteristic information and the predicted duration into the target material usage prediction model;
the second obtaining unit is configured to perform: and obtaining the time average value of the demand dosage of the first material in the prediction duration output by the target material dosage prediction model.
A training device for a material usage prediction model comprises: a third obtaining unit, a first clustering unit, a fifth determining unit, a sixth determining unit and a fourth obtaining unit, wherein:
the third obtaining unit is configured to perform: obtaining time sequence data of material usage of a plurality of materials in a historical time period;
the first clustering unit is configured to perform: clustering each of the materials based on the time series data for each of the materials;
the fifth determination unit configured to perform: determining at least one material cluster, wherein each material cluster at least comprises one material;
the sixth determining unit configured to perform: respectively determining a material training sample set corresponding to each material cluster;
the fourth obtaining unit is configured to perform: and respectively training the corresponding basic prediction model by using the material training sample sets to obtain the material usage prediction model corresponding to each material cluster.
Optionally, the first clustering unit includes: a first processing unit, a fifth obtaining unit and a second clustering unit, wherein:
the first processing unit configured to perform: respectively carrying out normalization processing on the time sequence data of each material;
the fifth obtaining unit configured to perform: obtaining normalized time series data for each of said materials;
the second clustering unit configured to perform: clustering each of the materials based on the normalized time series data for each of the materials.
Optionally, the time-series data includes daily material usage of the material in a historical time period, and the first processing unit specifically includes: a seventh determining unit, an eighth determining unit, and a ninth determining unit, wherein:
the seventh determining unit configured to perform: respectively determining the total material usage of each material in the historical time period;
the eighth determining unit configured to perform: respectively determining the material usage amount of each material in each week in the historical time period;
the ninth determining unit configured to perform: for any of the materials: and obtaining the proportion value of the weekly material usage of the material in the total material usage of the material, and determining each obtained proportion value as the normalized time sequence data of the material.
Optionally, the sixth determining unit is configured to perform: and respectively sampling time sequence data of the materials under each material cluster in a time sliding window mode to construct a material training sample set corresponding to each material cluster.
Optionally, the sixth determining unit includes: a sixth obtaining unit, a first constructing unit, and a second constructing unit, wherein:
the sixth obtaining unit is configured to perform: respectively sampling time sequence data of the materials under each material cluster in a time sliding window mode to obtain at least one piece of time window data of the materials under each material cluster, wherein the time window data comprise historical time window data and predicted time window data; in each piece of time window data, the historical time window data is time sequence data of the material in a first preset time length, the predicted time window data is a time average value of material usage of the material in a second preset time length, and a time period corresponding to the first preset time length is a previous time period of the time period corresponding to the second preset time length;
the first construction unit configured to perform: respectively splicing the historical time window data in each time window data under the same material cluster with corresponding seasonal characteristic information to construct a training sample corresponding to each material cluster;
the second construction unit configured to perform: and marking corresponding prediction time window data for each training sample to construct a material training sample set corresponding to each material cluster.
Optionally, when the time series data includes daily material usage of the material within a historical time period, in each piece of the time window data, the historical time window data includes daily material usage of the material within a first preset time period, and the predicted time window data includes daily average material usage of the material within a second preset time period.
According to the training method and device for the material usage prediction model, time series data of material usage of a plurality of materials in a historical time period can be obtained, the materials are clustered based on the time series data of the materials, at least one material cluster is determined, each material cluster at least comprises one material, material training sample sets corresponding to the material clusters are respectively determined, the material training sample sets are respectively used for training corresponding basic prediction models, and the material usage prediction models corresponding to the material clusters are obtained. The method effectively utilizes the characteristics of the intrinsic similarity and the relevance of the material consumption of each material, the fluctuation and the trend of the material consumption and the like, so that the prediction accuracy can be effectively improved when the trained material consumption prediction model is used for predicting the time average of the material consumption of the material in the prediction duration, the accuracy of calculating the safety stock according to the time average of the material consumption in the prediction duration can be improved, and the reasonability and the scientificity of the safety stock setting are improved. According to the invention, the materials can be clustered based on the time sequence data of the materials, then modeling of the material usage prediction model is carried out on the clustered material clusters, the number of the material usage prediction models to be modeled is consistent with the number of the material clusters, the modeling workload can be greatly reduced, the prediction efficiency is improved, and the calculation efficiency of the safe storage of the materials is improved.
The method and the device for predicting the material usage, which are provided by the embodiment, can determine a target material cluster where a first material is located, determine a target material usage prediction model matched with the target material cluster, obtain time series data of the material usage of the first material in a first historical time period, determine seasonal characteristic information corresponding to the first historical time period, determine a prediction duration, input the time series data, the seasonal characteristic information and the prediction duration into the target material usage prediction model, and obtain a time average of the required usage of the first material in the prediction duration, which is output by the target material usage prediction model. The method and the device can effectively improve the prediction accuracy of the material consumption of the first material, thereby improving the accuracy of calculating the safety stock and improving the reasonability and scientificity of safety stock setting.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart illustrating a method for training a material usage prediction model according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for training a material usage prediction model according to an embodiment of the present invention;
FIG. 3 is a flow chart of another method for training a material usage prediction model according to an embodiment of the present invention;
FIG. 4 is a flow chart illustrating a method for predicting material usage according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a training apparatus for a material usage prediction model according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a training apparatus for another material usage prediction model according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram illustrating a material usage prediction apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
As shown in fig. 1, this embodiment proposes a method for training a material usage prediction model, which may include the following steps:
s101, obtaining time sequence data of material usage of a plurality of materials in a historical time period.
Wherein, the material can be the material to be subjected to material dosage prediction. The invention can set identifiers for a plurality of materials respectively, and distinguish the materials through the identifiers. The identifier may include at least one of a number, a letter, and a punctuation mark, which is not limited by the present invention.
The time starting point, the time length and the time ending point of the historical time period are not limited. For example, the historical period may be a year of time after the current time.
The time series data may include material usage in order according to time (such as date and time period), among others. In the material usage of the three materials in the historical period from 1 month 1 day to 1 month 5 days in 2019 as shown in table 1, the time series data of the material with the identifier SP001 may be [ y [11,y12,y13,y14,y15]The time series data for material with identifier SP002 may be [ y ]21,y22,y23,y24,y25]The time series data for material with identifier SP003 can be [ y ]31,y32,y33,y34,y35]。
TABLE 1
Figure BDA0002814613090000081
It should be noted that, when the material usage amount of the material is recorded, the recording time of the material usage amount can be uniformly standardized according to the requirement. For example, if the method is used for predicting the material usage of the material in the daily level, only the daily material usage of the material usage may be recorded as shown in table 1, and the material usage accurate to the hour, minute and second does not need to be recorded, and the recording time of the material usage is uniformly set to the format of year, month and day.
And S102, clustering the materials based on the time sequence data of the materials.
It should be noted that, when the material usage of a plurality of materials is predicted, the invention can cluster each material according to the intrinsic similarity and the relevance of the material usage of each material in advance, that is, each material can be clustered based on the time sequence data of each material, and a corresponding material usage prediction model is determined for each material cluster obtained by clustering, and then the material usage prediction model corresponding to the material cluster can be used for predicting the material usage of the materials contained in the material cluster, thereby effectively improving the prediction accuracy and the prediction efficiency.
S103, determining at least one material cluster, wherein each material cluster at least comprises one material.
Specifically, when the materials are clustered according to the time-series data of the materials, the material usage matrix can be constructed on the basis of the time-series data of the materials in advance, and then the constructed matrix is clustered. Each row of data in the material usage matrix may include time series data of one material, and each column of data may include material usage of each material in the same time period. For example, for the time series data of three materials in table 1, the present invention can construct a material usage matrix:
Figure BDA0002814613090000091
it should be noted that the number of the material clusters obtained after clustering may be preset by a technician according to conditions such as a clustering evaluation index, a degree of distinction of material usage curves of each material, and a goodness of fit between a clustering result and a production reality, which is not limited in the present invention.
Optionally, the present invention may use a gaussian clustering algorithm to perform the above-mentioned clustering process. When the Gaussian mixture clustering algorithm is used for clustering, the parameters of Gaussian distribution can be estimated by using a method similar to maximum likelihood estimation so as to obtain the membership functions of data point pairs for classification. Optionally, the present invention may also use other ways such as a K-means clustering algorithm and hierarchical clustering to perform the above-mentioned clustering process, which is not limited in this regard.
For a certain material with too low use frequency and too few material usage records, the method can be used for independently classifying the material into one class, forbidding the material from being clustered with other materials, forbidding the material usage prediction by using the material usage prediction model trained by the method of FIG. 1, and setting relevant rules by technicians or predicting the material usage by using other modes.
And S104, respectively determining a material training sample set corresponding to each material cluster.
Specifically, the method and the device can construct the material training sample set corresponding to the material cluster according to the time sequence data of the materials contained in the material cluster. For example, when a certain material cluster includes a second material and a third material, the present invention may construct a material training sample set corresponding to the material cluster according to the time-series data of the second material and the third material.
The method can construct a material training sample set by sampling the time sequence data of the material. Optionally, in the training method of the other material usage prediction model provided in this embodiment, step S104 may be specifically step S201. Wherein, step S201 is:
and respectively sampling time sequence data of the materials under each material cluster in a time sliding window mode to construct a material training sample set corresponding to each material cluster.
According to the invention, a time sliding window mode can be used for respectively constructing the material training sample sets corresponding to the material clusters.
Specifically, when a material training sample set corresponding to a certain material cluster is constructed, the time-sliding window method can be used for sampling the time sequence data of each material under the material cluster respectively, and the data obtained by sampling is determined as the training data in the material training sample set. For example, when a certain material cluster includes a second material and a third material, the time-series data of the second material may be sampled in a time sliding window manner, the time-series data of the third material may be sampled in a time sliding window manner, and data sampled from the time-series data of the second material and the third material may be determined as training data in a material training sample set corresponding to the material cluster.
It should be noted that, in the invention, multiple sets of training data can be obtained from one time series data of the material by a sampling mode of the time sliding window, which is beneficial to improving the sampling rate of the training data and increasing the number of the training data.
And S105, training the corresponding basic prediction model by using the material training sample sets respectively.
The basic prediction model can be a material usage prediction model to be trained. The type of the basic prediction model is not limited, for example, the basic prediction model may be a Gradient Boosting Decision Tree (GBDT) algorithm model, (Support Vector Machine, SVR) Support Vector Machine model, (logic Regression, LR) Logistic Regression model, a deep neural network model, a recurrent neural network, and the like.
And S106, obtaining a material usage prediction model corresponding to each material cluster.
The method can use the determined material training sample sets to train different basic prediction models to obtain the material usage prediction models corresponding to the material clusters. For example, the method can train a basic prediction model by using a material training sample set corresponding to a first material cluster to obtain a material usage prediction model corresponding to the first material cluster; the method can train the other basic prediction model by using the material training sample set corresponding to the second material cluster to obtain the material usage prediction model corresponding to the second material cluster. It should be noted that the trained material usage prediction model can be used for predicting the material usage of each material in the corresponding material cluster. For example, when the first material cluster includes the second material and the third material, the material usage prediction model corresponding to the first material cluster may be used to predict the material usage of the second material, and may also be used to predict the material usage of the third material.
Specifically, when the material usage prediction model is used for predicting the material usage of the material, the time series data and the seasonal characteristic information of the material usage in the historical time period can be spliced, the spliced data and the prediction duration are input into the material usage prediction model, and the time average value of the material usage of the material in the prediction duration output by the material usage prediction model is obtained.
It can be understood that the invention can obtain the verification sample set of the material usage prediction model by sampling from the time series data of the material, test the prediction effect of the material usage prediction model by using the verification sample set, and adjust the hyper-parameters of the material usage prediction model. Specifically, the invention can set a limit time, all data before the limit time in the time sequence data of each material are used as training data, the first time window data after the limit time in the time sequence data of each material are determined as verification data, and a traditional integral disordering-proportion dividing method is not needed to obtain the verification data, so that the time sequence characteristics of the time sequence data of the material are ensured, the influence on the sampling process of a material training sample set is avoided, the training data and the verification data are not overlapped, and the verification accuracy when the prediction effect of the material usage prediction model is verified is ensured.
In the process of training the material usage prediction model by using the material training sample set, indexes such as mean square error, relative error, usage underestimation rate and the like can be calculated according to the predicted average consumption and the actual average consumption, so that the performance of the material usage prediction model on the verification set is measured, and the clustering number and the model parameters are adjusted and optimized until the optimal parameters are selected.
It should be noted that, the invention clusters each material based on the time sequence data of each material, determines the corresponding material training sample set respectively for the time window data of each material cluster obtained by clustering, trains the material usage prediction model by using the material training sample set, and effectively utilizes the characteristics of the intrinsic similarity and the relevance of the material usage of each material, the fluctuation and the trend of the material usage, etc., so that when the trained material usage prediction model is used to predict the time average value of the material usage of the material in the prediction duration, the prediction accuracy can be effectively improved. The time average value can be the average daily demand of the materials, and at the moment, the safety stock of the materials can be calculated by using the time average value of the material usage in the prediction duration, so that the accuracy of calculating the safety stock is effectively improved, and the reasonability and the scientificity of the safety stock setting are improved.
It should be further noted that, in the prior art, when calculating the safety stock of the material, a material usage prediction model may also be trained to predict the material usage of the material. However, in the prior art, a material usage prediction model of each material needs to be modeled, and when the number of types of materials is too large, the number of material usage prediction models to be modeled in the prior art is increased, so that the modeling workload is large, the prediction efficiency is low, and the operability is low in practical application. When materials with large category and quantity are faced, the invention can cluster the materials based on the time sequence data of the materials in advance, then carry out modeling of the material quantity prediction model aiming at the clustered material clusters, and the quantity of the material quantity prediction model to be modeled is consistent with that of the material clusters, thereby greatly reducing the modeling workload, improving the prediction efficiency and further improving the calculation efficiency of the safe storage of the materials.
The training method for the material usage model provided in this embodiment can obtain time series data of material usage of a plurality of materials in a historical time period, cluster the materials based on the time series data of the materials, determine at least one material cluster, each material cluster at least includes one material, respectively determine a material training sample set corresponding to each material cluster, respectively train a corresponding basic prediction model by using each material training sample set, and obtain a material usage prediction model corresponding to each material cluster. The method effectively utilizes the characteristics of the intrinsic similarity and the relevance of the material consumption of each material, the fluctuation and the trend of the material consumption and the like, so that the prediction accuracy can be effectively improved when the trained material consumption prediction model is used for predicting the time average value of the material consumption of the material in the prediction time duration, the accuracy of calculating the safety stock according to the time average value of the material consumption in the prediction time duration can be improved, and the reasonability and the scientificity of the safety stock setting are improved. The method can cluster the materials based on the time sequence data of the materials, then model the material usage prediction model for the clustered material clusters, the quantity of the material usage prediction models to be modeled is consistent with that of the material clusters, the modeling workload can be greatly reduced, the prediction efficiency is improved, and therefore the calculation efficiency of the safe storage of the materials is improved.
Based on the steps shown in fig. 1, the present embodiment provides another method for training a material usage prediction model. In the method, step S201 may specifically include steps S301, S302, and S303, where:
s301, sampling time sequence data of the materials under each material cluster respectively in a time sliding window mode to obtain at least one piece of time window data of the materials under each material cluster, wherein the time window data comprise historical time window data and predicted time window data; in each time window data, the historical time window data is time sequence data of the material in a first preset time length, the predicted time window data is a time average value of material usage of the material in a second preset time length, and a time period corresponding to the first preset time length is a previous time period of the time period corresponding to the second preset time length.
When the time series data of a certain material is sampled, one or more pieces of time window data of the material can be obtained. Specifically, the invention can obtain a plurality of groups of time window data consisting of historical time window data and predicted time window data by determining a time window consisting of a historical time window and a predicted time window and controlling the time window to slide in the time sequence data of the material.
Optionally, when the time series data includes daily material usage of the material in the historical time period, in each time window data, the historical time window data includes daily material usage of the material in a first preset time period, and the predicted time window data includes daily average material usage of the material in a second preset time period.
The first preset time period and the second preset time period may be set by a technician according to actual needs, which is not limited in the present invention. For example, if the material usage of the material in the future 30 days needs to be predicted according to the time series data of the material in the past 30 days, so as to predict the material usage of the material in the future 30 days, the first preset time period may be determined as 30 days, and the second preset time period may be determined as 30 days.
To better illustrate the sampling manner of the time sliding window, the embodiment proposes a training sample set generation process as shown in fig. 2.
Fig. 2 includes time series data of material 1 and material 2 … …, each cell may include a material usage amount recorded in the time series data, and the length of the cell is a unit length. When the time series data of the material n is sampled, the first small square grid to the (Y + x) th small square grid can be determined as a time window on the time series data of the material n, wherein the first Y small square grids in the time window are historical time windows, the material usage in the historical time windows is determined as historical time window data, the last x small square grids in the time windows are predicted time windows, the average value of the material usage in the predicted time windows is determined as predicted time window data, and the obtained historical time window data and the predicted time window data are determined as a group of time window data; then, the time window can be slid to the right for a length, so that the time window can comprise a second small square grid to a (Y + x +1) th small square grid, the time window can cover new data in the time sequence data, the historical time window is still the first Y small square grids in the time window, the predicted time window is still the last x small square grids in the time window, and a new group of time window data can be determined according to the current sliding of the time window. Therefore, the invention can slide on the time data sequence of the material n by controlling the time window, and sample on the time data sequence of the material n to obtain a plurality of groups of time window data.
It should be noted that, for a certain material cluster, the present invention may repeat the sliding control process of the time window on the time sequence data of each material contained in the material cluster, so as to obtain multiple sets of time window data corresponding to the material cluster.
S302, respectively splicing historical time window data in each time window data of the same material cluster with corresponding seasonal characteristic information to construct a training sample corresponding to each material cluster.
The seasonal characteristic information may embody time information corresponding to historical time window data. Optionally, the month where the time end point of the historical time window is located may be determined as seasonal characteristic information by the present invention; optionally, the invention may also determine the month in which the time intermediate value of the historical time window is located as the seasonal characteristic information. Optionally, the invention may determine the seasonal information at which the time end of the historical time window is located as the seasonal characteristic information.
For a piece of time window data, the historical time window data in the piece of time window data and the corresponding seasonal characteristic information can be spliced, and a matrix formed by the spliced data is determined as a training sample corresponding to the time window data. The method and the system can splice the seasonal characteristic information to the tail of the historical time window data, and can splice the seasonal characteristic information to the head of the historical time window data, which is not limited by the invention.
And S303, marking corresponding prediction time window data for each training sample to construct a training sample set corresponding to each material cluster.
The invention can label the label values of the training samples corresponding to the time window data respectively. For example, for a training sample corresponding to first time window data, the label value of the training sample may be labeled in the present invention; for the training sample corresponding to the second time window data, the label value of the training sample may also be labeled.
Specifically, for a training sample corresponding to certain time window data, the method and the device can determine the predicted time window data in the time window data, and then label values of the training samples corresponding to the time window data as the determined predicted time window data.
It should be noted that, for a certain material cluster, after obtaining each time window data under the material cluster, the present invention respectively splices each time window data and corresponding seasonal characteristic information to obtain corresponding training samples, and then labels the label value of each training sample to obtain a material training sample set corresponding to the material cluster.
According to the training method of the material usage prediction model, a large amount of training data can be obtained by sampling in a time sliding window mode, a material training sample set is constructed according to the training data, the number of the training data is effectively increased, the training effect on the material usage prediction model is improved, the training data can carry the characteristics of volatility, trend and the like of the material usage, and the prediction accuracy of the material usage prediction model is improved.
Based on the steps shown in fig. 1, the present embodiment provides another method for training a material usage prediction model, and as shown in fig. 3, step S102 may specifically include the following steps:
s401, respectively carrying out normalization processing on the time sequence data of each material to obtain the normalized time sequence data of each material.
The normalized time-series data may be time-series data after the normalization process.
In practical applications, the material usage amount of each material may have a large difference, even an order of magnitude difference, so that the time series data of each material has a large dimensional difference. Therefore, according to the invention, before clustering is carried out on each material, the time sequence data of each material is normalized, and the time sequence data is converted into dimensionless data, so that adverse effects on the clustering result of each material caused by overlarge material consumption difference of each material are avoided.
Specifically, the invention can respectively carry out normalization processing on the time sequence data of each material.
Optionally, when the time series data of the materials are normalized, the present invention may calculate the total material usage of the materials in the historical time period in advance, calculate a ratio of each material usage in the time series data to the total material usage, and determine each calculated ratio as the normalized time series data, so that the data composing the time series data is converted from the absolute amount of the material usage to the ratio of the material usage to the total material usage.
Optionally, when the time series data of the material is normalized, the material usage in the time series data may be summed according to the period duration to obtain each period sum value of the material usage, a ratio of each period sum value to the total material usage in the material time period is calculated, and each calculated ratio value is determined as the normalized time series data, so that the absolute amount of the material usage constituting the time series data is converted into the ratio of the period sum value of the material usage to the total material usage. Optionally, the time-series data may include daily material usage of the material in the historical time period, and at this time, the step S401 may specifically include steps S501, S502, and S503, where:
s501, total material usage of each material in a historical time period is determined respectively.
The method and the device can respectively determine the total material usage of each material in the historical time period.
And S502, respectively determining the material usage of each material every week in the historical time period.
The method can sum the material usage in the time sequence data of each material according to each week to obtain the material usage of each material every week. For example, for the second material and the third material, the material usage in the time series data of the second material may be summed weekly to obtain the weekly material usage of the second material, and the material usage in the time series data of the third material may be summed weekly to obtain the weekly material usage of the third material.
S503, for any material: and obtaining the proportion value of the weekly material usage of the material in the total material usage of the material, and determining each obtained proportion value as the normalized time sequence data of the material.
After the weekly material usage in the time sequence data of a certain material is obtained, the proportion value of the weekly material usage of the material to the total material usage of the material in the historical time period can be calculated, and the calculated proportion values are determined as the normalized time sequence data. For example, for the calculated weekly material usage of the second material, the present invention may calculate a ratio of the weekly material usage of the second material to the total material usage of the second material in the historical time period, and determine the calculated ratio as the normalized time series data of the second material. In this case, the present invention can convert the absolute amount of the material amount constituting the time-series data into a value of the ratio of the material amount per week to the total material amount.
S402, clustering the materials based on the normalized time sequence data of the materials.
Specifically, after the normalized time sequence data of each material is obtained, each material can be clustered based on the normalized time sequence data of each material, and adverse effects of dimensional differences among material usage amounts of each material on clustering results are effectively avoided.
The training method for the material usage prediction model provided by this embodiment can normalize the time series data of each material, transform the time series data into dimensionless time series data, and avoid adverse effects on the clustering result caused by excessively large dimensional differences between the material usage of each material.
Corresponding to the steps shown in fig. 1, the present embodiment provides a method for predicting material usage, as shown in fig. 4, the method may include the following steps:
s601, determining a target material cluster where the first material is located, wherein the target material cluster is obtained by clustering a plurality of materials.
It should be noted that the present invention can use the material usage prediction model trained by the method shown in fig. 1 to predict the material usage of the material.
The first material may be a material to be subjected to material usage prediction. The target material cluster can be a material cluster obtained by clustering the materials based on the time sequence data of the materials, and is also a material cluster to which the first material belongs. The target material cluster may include the first material and other materials, or may include only the first material, which is not limited in the present invention.
S602, determining a target material usage prediction model matched with the target material cluster, wherein the material usage prediction models matched with different material clusters are different, and the target material usage prediction model is obtained by performing machine learning on a material training sample set corresponding to the target material cluster.
After the target material cluster to which the first material belongs is determined, the target material usage prediction model corresponding to the target material cluster can be determined, and the material usage of the first material in the target material cluster is predicted by using the target material usage prediction model.
It can be understood that the material usage prediction model trained by the method shown in fig. 1 can be used for predicting the material usage of each material in the corresponding material cluster. For example, when the target material cluster includes a first material and a second material, the present invention may use the target material usage prediction model to predict the material usage of the first material, and may also use the target material usage prediction model to predict the material usage of the second material.
And S603, obtaining time series data of the material usage of the first material in the first historical time period.
Specifically, when the target material usage prediction model is used for predicting the material usage of the first material, the data to be input into the model can be obtained in advance. The data to be input into the model may include time series data of material usage of the first material in the first history period, seasonal characteristic information corresponding to the first history period, and predicted time duration.
The time starting point, the time length and the time ending point of the first historical period can be determined by a technician as required, which is not limited by the invention. It should be noted that the time length of the first historical time period may be the same as or different from the time length of the historical time window of the target material usage prediction model in the training phase.
S604, seasonal characteristic information corresponding to the first historical time period is determined.
The seasonal characteristic information corresponding to the first historical time period can be determined, and the seasonal characteristic information and the time series data of the first material are spliced to construct matrix data. It should be noted that the splicing position of the seasonal characteristic information and the time series data needs to be consistent with the splicing position of the target material usage prediction model in the training phase.
And S605, determining the prediction time length.
The predicted time duration can be determined by a technician as needed, which is not limited by the present invention. It should be noted that the duration of the prediction duration may be the same as or different from the duration of the prediction time window of the target material usage prediction model in the training phase.
And S606, inputting the time sequence data, the seasonal characteristic information and the prediction duration into the target material usage prediction model.
Specifically, the prediction duration and the matrix data of the first material can be input into the target material usage prediction model.
S607, obtaining the time average value of the demand dosage of the first material output by the target material dosage prediction model in the prediction duration.
Specifically, after the prediction time length and the matrix data of the first material are input into the target material usage prediction model, the time average of the demand usage of the first material within the prediction time length, which is output by the target material usage prediction model, can be obtained.
It should be noted that, in the training phase of the target material usage prediction model, the characteristics of the intrinsic similarity and the relevance of the material usage of each material, the fluctuation and the trend of the material usage, and the like are effectively considered, so that when the trained target material usage prediction model is used for predicting the time average value of the material usage of the first material in the prediction duration, the prediction accuracy can be effectively improved. The time average value can be the average daily demand of the materials, and at the moment, the safety stock of the materials can be calculated by using the time average value of the material usage in the prediction duration, so that the accuracy of calculating the safety stock is effectively improved, and the reasonability and the scientificity of the safety stock setting are improved.
The material usage prediction method provided by this embodiment can determine a target material cluster where a first material is located, determine a target material usage prediction model matched with the target material cluster, obtain time series data of material usage of the first material in a first historical time period, determine seasonal characteristic information corresponding to the first historical time period, determine prediction duration, input the time series data, the seasonal characteristic information and the prediction duration into the target material usage prediction model, and obtain a time average of a required usage of the first material in the prediction duration output by the target material usage prediction model, so that prediction accuracy of the material usage of the first material can be effectively improved, accuracy of safety inventory calculation is improved, and reasonability and scientificity of safety inventory setting are improved.
Corresponding to the method shown in fig. 1, this embodiment provides a training apparatus for a material usage prediction model, as shown in fig. 5, the apparatus may include: a third obtaining unit 101, a first clustering unit 102, a fifth determining unit 103, a sixth determining unit 104, and a fourth obtaining unit 105, wherein:
a third obtaining unit 101 configured to perform: obtaining time sequence data of material usage of a plurality of materials in a historical time period;
wherein, the material can be the material to be subjected to material dosage prediction. The time starting point, the time length and the time ending point of the historical time period are not limited.
The time series data may include material usage in order according to time (such as date and time period), among others. It should be noted that, when the material usage amount of the material is recorded, the recording time of the material usage amount can be uniformly standardized according to the requirement.
A first clustering unit 102 configured to perform: clustering the materials based on the time sequence data of the materials;
it should be noted that, when the material usage of a plurality of materials is predicted, the invention can cluster each material according to the intrinsic similarity and the relevance of the material usage of each material in advance, that is, each material can be clustered based on the time sequence data of each material, and a corresponding material usage prediction model is determined for each material cluster obtained by clustering, and then the material usage prediction model corresponding to the material cluster can be used for predicting the material usage of the materials contained in the material cluster, thereby effectively improving the prediction accuracy and the prediction efficiency.
A fifth determining unit 103 configured to perform: determining at least one material cluster, wherein each material cluster at least comprises one material;
specifically, when the materials are clustered according to the time-series data of the materials, the material usage matrix can be constructed on the basis of the time-series data of the materials in advance, and then the constructed matrix is clustered. Each row of data in the material usage matrix may include time series data of one material, and each column of data may include material usage of each material in the same time period.
A sixth determining unit 104 configured to perform: respectively determining a material training sample set corresponding to each material cluster;
specifically, the method and the device can construct the material training sample set corresponding to the material cluster according to the time sequence data of the materials contained in the material cluster.
The method can construct a material training sample set by sampling the time sequence data of the material. Optionally, in the training apparatus for other material usage prediction models provided in this embodiment, the sixth determining unit 104 may be specifically configured to perform:
and respectively sampling time sequence data of the materials under each material cluster in a time sliding window mode to construct a material training sample set corresponding to each material cluster.
Specifically, when a material training sample set corresponding to a certain material cluster is constructed, the time-sliding window method can be used for sampling the time sequence data of each material under the material cluster respectively, and the data obtained by sampling is determined as the training data in the material training sample set.
A fourth obtaining unit 105 configured to perform: and respectively training the corresponding basic prediction model by using each material training sample set to obtain the material usage prediction model corresponding to each material cluster.
The basic prediction model can be a material usage prediction model to be trained. The invention is not limited with respect to the type of underlying predictive model.
The method can use the determined material training sample sets to train different basic prediction models to obtain the material usage prediction models corresponding to the material clusters. It should be noted that the trained material usage prediction model can be used for predicting the material usage of each material in the corresponding material cluster.
Specifically, when the material usage prediction model is used for predicting the material usage of the material, the time series data and the seasonal characteristic information of the material usage in the historical time period can be spliced, the spliced data and the prediction duration are input into the material usage prediction model, and the time average value of the material usage of the material in the prediction duration output by the material usage prediction model is obtained.
The training device of the material quantity model provided by the embodiment can effectively improve the prediction accuracy, so that the accuracy of calculating the safety stock according to the time mean value of the material quantity in the prediction duration can be improved, the reasonability and the scientificity of the safety stock setting are improved, the modeling workload can be greatly reduced, the prediction efficiency is improved, and the calculation efficiency of the safety stock of the material is improved.
Based on the schematic diagram shown in fig. 5, the present embodiment provides another training apparatus for a material usage prediction model. In the apparatus, the sixth determining unit 104 may specifically include: a sixth obtaining unit, a first constructing unit, and a second constructing unit, wherein:
a sixth obtaining unit configured to perform: respectively sampling time sequence data of the materials under each material cluster in a time sliding window mode to obtain at least one piece of time window data of the materials under each material cluster, wherein the time window data comprise historical time window data and predicted time window data; in each piece of time window data, the historical time window data is time sequence data of the material in a first preset time length, the predicted time window data is a time average value of material usage of the material in a second preset time length, and a time period corresponding to the first preset time length is a previous time period of the time period corresponding to the second preset time length;
when the time series data of a certain material is sampled, one or more pieces of time window data of the material can be obtained.
Optionally, when the time series data includes daily material usage of the material in the historical time period, in each time window data, the historical time window data includes daily material usage of the material in a first preset time period, and the predicted time window data includes daily average material usage of the material in a second preset time period.
The first preset time period and the second preset time period may be set by a technician according to actual needs, which is not limited in the present invention.
A first construction unit configured to perform: respectively splicing historical time window data in each time window data under the same material cluster with corresponding seasonal characteristic information to construct a training sample corresponding to each material cluster;
the seasonal characteristic information may embody time information corresponding to historical time window data. For a piece of time window data, the historical time window data in the piece of time window data and the corresponding seasonal characteristic information can be spliced, and a matrix formed by the spliced data is determined as a training sample corresponding to the time window data.
A second construction unit configured to perform: and marking corresponding prediction time window data for each training sample to construct a material training sample set corresponding to each material cluster.
The invention can label the label values of the training samples corresponding to the time window data respectively. Specifically, for a training sample corresponding to certain time window data, the method and the device can determine the predicted time window data in the time window data, and then label values of the training samples corresponding to the time window data as the determined predicted time window data.
It should be noted that, for a certain material cluster, after obtaining each time window data under the material cluster, the present invention respectively splices each time window data and corresponding seasonal characteristic information to obtain corresponding training samples, and then labels the label value of each training sample to obtain a material training sample set corresponding to the material cluster.
The training device of the material usage prediction model provided by the embodiment can use a time sliding window mode to sample and obtain a large amount of training data, construct a material training sample set according to the training data, effectively increase the amount of the training data, improve the training effect on the material usage prediction model, enable the training data to carry the characteristics of the volatility, the trend and the like of the material usage, and improve the prediction accuracy of the material usage prediction model.
Based on the schematic diagram shown in fig. 5, this embodiment provides another training device for a material usage prediction model, as shown in fig. 6, the first clustering unit 102 includes: a first processing unit 201, a fifth obtaining unit 202 and a second clustering unit 203, wherein:
a first processing unit 201 configured to perform: respectively carrying out normalization processing on the time sequence data of each material;
a fifth obtaining unit 202 configured to perform: normalized time series data for each material was obtained.
The normalized time-series data may be time-series data after the normalization process. According to the invention, before clustering each material, the time sequence data of each material is normalized, and the time sequence data is converted into dimensionless data, so that adverse effects on the clustering result of each material caused by overlarge material consumption difference of each material are avoided.
Optionally, the time-series data may include daily material usage of the material in the historical time period, and at this time, the first processing unit 201 specifically includes: a seventh determining unit, an eighth determining unit, and a ninth determining unit, wherein:
a seventh determining unit configured to perform: respectively determining the total material usage of each material in a historical time period;
the method and the device can respectively determine the total material usage of each material in the historical time period.
An eighth determination unit configured to perform: respectively determining the material usage amount of each material in each week in a historical period;
the method can sum the material usage in the time sequence data of each material according to each week to obtain the material usage of each material every week.
A ninth determining unit configured to perform: for any material: and obtaining the proportion value of the weekly material usage of the material in the total material usage of the material, and determining each obtained proportion value as the normalized time sequence data of the material.
After the weekly material usage in the time sequence data of a certain material is obtained, the proportion value of the weekly material usage of the material to the total material usage of the material in the historical time period can be calculated, and the calculated proportion values are determined as the normalized time sequence data.
A second clustering unit 203 configured to perform: and clustering the materials based on the normalized time sequence data of the materials.
Specifically, after the normalized time sequence data of each material is obtained, each material can be clustered based on the normalized time sequence data of each material, and adverse effects of dimensional differences among material usage amounts of each material on clustering results are effectively avoided.
The training device for the material usage prediction model provided by this embodiment can normalize the time series data of each material, transform the time series data into dimensionless time series data, and avoid adverse effects on clustering results caused by excessively large dimensional differences between material usage of each material.
Corresponding to the method shown in fig. 4, the present embodiment provides a material usage prediction apparatus, as shown in fig. 7, the apparatus may include: a first determining unit 301, a second determining unit 302, a first obtaining unit 303, a third determining unit 304, a fourth determining unit 305, a data input unit 306, and a second obtaining unit 307, wherein:
a first determination unit 301 configured to perform: determining a target material cluster in which the first material is located, wherein the target material cluster is obtained by clustering a plurality of materials;
it should be noted that the present invention can use the material usage prediction model trained by the apparatus shown in fig. 5 to predict the material usage of the material.
The first material may be a material to be subjected to material usage prediction. The target material cluster can be a material cluster obtained by clustering the materials based on the time sequence data of the materials, and is also a material cluster to which the first material belongs.
A second determining unit 302 configured to perform: determining a target material usage prediction model matched with a target material cluster, wherein the material usage prediction models matched with different material clusters are different, and the target material usage prediction model is obtained by performing machine learning on a material training sample set corresponding to the target material cluster;
after the target material cluster to which the first material belongs is determined, the target material usage prediction model corresponding to the target material cluster can be determined, and the material usage of the first material in the target material cluster is predicted by using the target material usage prediction model.
It can be understood that the material usage prediction model trained by the apparatus shown in fig. 5 can be used to predict the material usage of each material in the corresponding material cluster.
A first obtaining unit 303 configured to perform: obtaining time series data of material usage of a first material in a first historical time period;
specifically, when the target material usage prediction model is used for predicting the material usage of the first material, the data to be input into the model can be obtained in advance. The data to be input into the model may include time series data of material usage of the first material in the first history period, seasonal characteristic information corresponding to the first history period, and predicted time duration.
A third determining unit 304 configured to perform: determining seasonal characteristic information corresponding to a first historical time period;
the seasonal characteristic information corresponding to the first historical time period can be determined, and the seasonal characteristic information and the time series data of the first material are spliced to construct matrix data.
A fourth determination unit 305 configured to perform: determining a predicted time length;
the predicted time duration can be determined by a technician as needed, which is not limited by the present invention. It should be noted that the duration of the prediction duration may be the same as or different from the duration of the prediction time window of the target material usage prediction model in the training phase.
A data input unit 306 configured to perform: inputting the time sequence data, the seasonal characteristic information and the prediction duration into a target material usage prediction model;
specifically, the prediction duration and the matrix data of the first material can be input into the target material usage prediction model.
A second obtaining unit 307 configured to perform: and obtaining the time average value of the demand dosage of the first material output by the target material dosage prediction model in the prediction time length.
Specifically, after the prediction time length and the matrix data of the first material are input into the target material usage prediction model, the time average of the demand usage of the first material within the prediction time length, which is output by the target material usage prediction model, can be obtained.
It should be noted that, in the training phase of the target material usage prediction model, the characteristics of the intrinsic similarity and the relevance of the material usage of each material, the fluctuation and the trend of the material usage, and the like are effectively considered, so that when the trained target material usage prediction model is used for predicting the time average value of the material usage of the first material in the prediction duration, the prediction accuracy can be effectively improved. The time average value can be the average daily demand of the materials, and at the moment, the safety stock of the materials can be calculated by using the time average value of the material usage in the prediction duration, so that the accuracy of calculating the safety stock is effectively improved, and the reasonability and the scientificity of the safety stock setting are improved.
The material quantity prediction device that this embodiment provided can effectively improve the prediction accuracy to the material quantity of first material to improve the accuracy of calculating safety stock, promote rationality and the scientificity that safety stock set up.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A material usage prediction method is characterized by comprising the following steps:
determining a target material cluster in which a first material is located, wherein the target material cluster is obtained by clustering a plurality of materials;
determining a target material usage prediction model matched with the target material cluster, wherein the material usage prediction models matched with different material clusters are different, and the target material usage prediction model is obtained by performing machine learning on a material training sample set corresponding to the target material cluster;
obtaining time series data of material usage of the first material in a first historical time period;
determining seasonal characteristic information corresponding to the first historical time period;
determining a predicted time length;
and inputting the time sequence data, the seasonal characteristic information and the prediction duration into the target material usage prediction model, and obtaining a time average value of the demand usage of the first material within the prediction duration, which is output by the target material usage prediction model.
2. A training method of a material usage prediction model is characterized by comprising the following steps:
obtaining time sequence data of material usage of a plurality of materials in a historical time period;
clustering the materials based on the time sequence data of the materials to determine at least one material cluster, wherein each material cluster at least comprises one material;
respectively determining a material training sample set corresponding to each material cluster;
and respectively training the corresponding basic prediction model by using the material training sample sets to obtain the material usage prediction model corresponding to each material cluster.
3. The method of claim 2, wherein clustering each of the items based on the time series data for each of the items comprises:
respectively carrying out normalization processing on the time sequence data of each material to obtain normalized time sequence data of each material;
clustering each of the materials based on the normalized time series data for each of the materials.
4. The method of claim 3, wherein the time series data includes daily material usage of materials over a historical period of time, and wherein the normalizing the time series data for each of the materials comprises:
respectively determining the total material usage of each material in the historical time period;
respectively determining the material usage amount of each material in each week in the historical time period;
for any of the materials: and obtaining the proportion value of the weekly material usage of the material in the total material usage of the material, and determining each obtained proportion value as the normalized time sequence data of the material.
5. The method of claim 2, wherein the separately determining a material training sample set corresponding to each of the material clusters comprises:
and respectively sampling time sequence data of the materials under each material cluster in a time sliding window mode to construct a material training sample set corresponding to each material cluster.
6. The method of claim 5, wherein the sampling time series data of the materials under each of the material clusters using a time sliding window comprises:
respectively sampling time sequence data of the materials under each material cluster in a time sliding window mode to obtain at least one piece of time window data of the materials under each material cluster, wherein the time window data comprise historical time window data and predicted time window data; in each piece of time window data, the historical time window data is time sequence data of the material in a first preset time length, the predicted time window data is a time average value of material usage of the material in a second preset time length, and a time period corresponding to the first preset time length is a previous time period of the time period corresponding to the second preset time length;
respectively splicing the historical time window data in each time window data under the same material cluster with corresponding seasonal characteristic information to construct a training sample corresponding to each material cluster;
and marking corresponding prediction time window data for each training sample to construct a material training sample set corresponding to each material cluster.
7. The method of claim 6, wherein when the time series data includes daily material usage of the material over a historical period of time, the historical time window data includes daily material usage of the material over a first predetermined period of time and the predicted time window data includes daily material usage of the material over a second predetermined period of time in each of the time window data.
8. A material quantity predicting apparatus, comprising: a first determining unit, a second determining unit, a first obtaining unit, a third determining unit, a fourth determining unit, a data input unit, and a second obtaining unit, wherein:
the first determination unit is configured to perform: determining a target material cluster in which a first material is located, wherein the target material cluster is obtained by clustering a plurality of materials;
the second determination unit configured to perform: determining a target material usage prediction model matched with the target material cluster, wherein the material usage prediction models matched with different material clusters are different, and the target material usage prediction model is obtained by performing machine learning on a material training sample set corresponding to the target material cluster;
the first obtaining unit is configured to perform: obtaining time series data of material usage of the first material in a first historical time period;
the third determination unit is configured to perform: determining seasonal characteristic information corresponding to the first historical time period;
the fourth determination unit configured to perform: determining a predicted time length;
the data input unit is configured to perform: inputting the time series data, the seasonal characteristic information and the predicted duration into the target material usage prediction model;
the second obtaining unit is configured to perform: and obtaining the time average value of the demand dosage of the first material in the prediction duration output by the target material dosage prediction model.
9. A training device for a material usage prediction model is characterized by comprising: a third obtaining unit, a first clustering unit, a fifth determining unit, a sixth determining unit and a fourth obtaining unit, wherein:
the third obtaining unit is configured to perform: obtaining time sequence data of material usage of a plurality of materials in a historical time period;
the first clustering unit is configured to perform: clustering each of the materials based on the time series data for each of the materials;
the fifth determination unit configured to perform: determining at least one material cluster, wherein each material cluster at least comprises one material;
the sixth determining unit configured to perform: respectively determining a material training sample set corresponding to each material cluster;
the fourth obtaining unit is configured to perform: and respectively training the corresponding basic prediction model by using the material training sample sets to obtain the material usage prediction model corresponding to each material cluster.
10. The apparatus of claim 9, wherein the first clustering unit comprises: a fifth obtainment unit and a second dimerization unit, wherein:
the fifth obtaining unit configured to perform: respectively carrying out normalization processing on the time sequence data of each material to obtain normalized time sequence data of each material;
the second clustering unit configured to perform: clustering each of the materials based on the normalized time series data for each of the materials.
CN202011412402.4A 2020-12-03 2020-12-03 Training method of material usage prediction model, and material usage prediction method and device Pending CN112347703A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011412402.4A CN112347703A (en) 2020-12-03 2020-12-03 Training method of material usage prediction model, and material usage prediction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011412402.4A CN112347703A (en) 2020-12-03 2020-12-03 Training method of material usage prediction model, and material usage prediction method and device

Publications (1)

Publication Number Publication Date
CN112347703A true CN112347703A (en) 2021-02-09

Family

ID=74427385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011412402.4A Pending CN112347703A (en) 2020-12-03 2020-12-03 Training method of material usage prediction model, and material usage prediction method and device

Country Status (1)

Country Link
CN (1) CN112347703A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114648270A (en) * 2022-03-25 2022-06-21 成都飞机工业(集团)有限责任公司 Method and system for calculating safety stock of live parts

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104700152A (en) * 2014-10-22 2015-06-10 浙江中烟工业有限责任公司 Method for predicting tobacco sales volumes by means of fusing seasonal sales information with search behavior information
CN108133391A (en) * 2017-12-22 2018-06-08 联想(北京)有限公司 Method for Sales Forecast method and server
CN109509030A (en) * 2018-11-15 2019-03-22 北京旷视科技有限公司 Method for Sales Forecast method and its training method of model, device and electronic system
CN110009140A (en) * 2019-03-20 2019-07-12 华中科技大学 A kind of day Methods of electric load forecasting and prediction meanss
CN110222910A (en) * 2019-06-20 2019-09-10 武汉大学 A kind of active power distribution network Tendency Prediction method and forecasting system
CN111008858A (en) * 2019-10-24 2020-04-14 清华大学 Commodity sales prediction method and system
CN111260156A (en) * 2020-02-18 2020-06-09 中国农业银行股份有限公司 Construction method of cash flow prediction model and cash flow prediction method and device
US20200302286A1 (en) * 2019-03-19 2020-09-24 Lunit Inc. Apparatus and method for training neural network
CN111738507A (en) * 2020-06-19 2020-10-02 中国工商银行股份有限公司 Bank clearing position fund payment amount prediction method, device, equipment and medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104700152A (en) * 2014-10-22 2015-06-10 浙江中烟工业有限责任公司 Method for predicting tobacco sales volumes by means of fusing seasonal sales information with search behavior information
CN108133391A (en) * 2017-12-22 2018-06-08 联想(北京)有限公司 Method for Sales Forecast method and server
CN109509030A (en) * 2018-11-15 2019-03-22 北京旷视科技有限公司 Method for Sales Forecast method and its training method of model, device and electronic system
US20200302286A1 (en) * 2019-03-19 2020-09-24 Lunit Inc. Apparatus and method for training neural network
CN110009140A (en) * 2019-03-20 2019-07-12 华中科技大学 A kind of day Methods of electric load forecasting and prediction meanss
CN110222910A (en) * 2019-06-20 2019-09-10 武汉大学 A kind of active power distribution network Tendency Prediction method and forecasting system
CN111008858A (en) * 2019-10-24 2020-04-14 清华大学 Commodity sales prediction method and system
CN111260156A (en) * 2020-02-18 2020-06-09 中国农业银行股份有限公司 Construction method of cash flow prediction model and cash flow prediction method and device
CN111738507A (en) * 2020-06-19 2020-10-02 中国工商银行股份有限公司 Bank clearing position fund payment amount prediction method, device, equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114648270A (en) * 2022-03-25 2022-06-21 成都飞机工业(集团)有限责任公司 Method and system for calculating safety stock of live parts

Similar Documents

Publication Publication Date Title
US11043808B2 (en) Method for identifying pattern of load cycle
CN101694652A (en) Network resource personalized recommended method based on ultrafast neural network
Keskin et al. Data-driven clustering and feature-based retail electricity pricing with smart meters
CN107957929B (en) Software defect report repair personnel distribution method based on topic model
Adams-Prassl et al. Flexible work arrangements in low wage jobs: Evidence from job vacancy data
Kusonkhum et al. Government construction project budget prediction using machine learning
CN111476677A (en) Big data-based electricity consumption type electricity sales quantity analysis and prediction method and system
CN105469219A (en) Method for processing power load data based on decision tree
CN117196695B (en) Target product sales data prediction method and device
CN112347703A (en) Training method of material usage prediction model, and material usage prediction method and device
CN116645129A (en) Manufacturing resource recommendation method based on knowledge graph
Pan et al. Dynamic Task Allocation Algorithm for Hiring Workers that Learn.
Ahmed et al. Enhancing stock portfolios for enterprise management and investment in energy industry
CN117057835A (en) Auxiliary analysis method and system for power grid engineering cost
Shangchen Predicting the SP500 index trend based on GBDT and LightGBM methods
CN114091961A (en) Power enterprise supplier evaluation method based on semi-supervised SVM
Alikhani et al. Optimal demand response programs selection using CNN‐LSTM algorithm with big data analysis of load curves
Sianturi et al. Implementation of The Moora Method in Determining Candidates for Village Head
CN112801410A (en) Electricity charge inflow prediction analysis method based on big data technology
CN113077108A (en) Data prediction system for power material configuration requirements
CN111126629A (en) Model generation method, system, device and medium for identifying brushing behavior
CN116703301B (en) Zirconia waste material management and control method based on information of multiple recovery warehouses
Wang et al. Research on Daily Tourist Flow Prediction of Scenic Spots Based on Similar Day Clustering and LSSVM Model
Chen et al. Self-adaptive identification model of multi electricity consumption under the market competition mechanism
CN111105098B (en) Load prediction method and system for self-matching of single user algorithm

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210222

Address after: 261061 Shandong city in Weifang province Fu hi tech Industrial Development Zone, East Street No. 197

Applicant after: Weichai Power Co.,Ltd.

Applicant after: TSINGHUA University

Address before: 261061 Shandong city in Weifang province Fu hi tech Industrial Development Zone, East Street No. 197

Applicant before: Weichai Power Co.,Ltd.