WO2023020257A1 - Procédé et appareil de prédiction de données et support de stockage - Google Patents

Procédé et appareil de prédiction de données et support de stockage Download PDF

Info

Publication number
WO2023020257A1
WO2023020257A1 PCT/CN2022/108936 CN2022108936W WO2023020257A1 WO 2023020257 A1 WO2023020257 A1 WO 2023020257A1 CN 2022108936 W CN2022108936 W CN 2022108936W WO 2023020257 A1 WO2023020257 A1 WO 2023020257A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
prediction
level
preset
training
Prior art date
Application number
PCT/CN2022/108936
Other languages
English (en)
Chinese (zh)
Inventor
耿东阳
张建申
Original Assignee
北京沃东天骏信息技术有限公司
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 北京沃东天骏信息技术有限公司 filed Critical 北京沃东天骏信息技术有限公司
Publication of WO2023020257A1 publication Critical patent/WO2023020257A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • 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

Definitions

  • the embodiments of the present application relate to the technical field of prediction models, and relate to a data prediction method, device, and storage medium.
  • Time series forecasting has a wide range of applications, such as financial market forecasting, logistics volume forecasting, and so on. In the process of realizing automation and intelligence in many fields, time series forecasting plays a very important role. Therefore, forecasting technical capabilities will ultimately have an important impact on item transaction volume, inventory costs, etc. At the same time, the logistics volume of large logistics warehouses can reach up to one million, and large-scale time series pose new challenges to modern time series forecasting technology.
  • time series forecasting uses single-level data to make forecasts, and then obtains forecast results of other levels by splitting or aggregating.
  • the existing forecasting methods essentially only use the forecasting results of a single level, and do not use the information contained in the forecasting data of other levels, resulting in the loss of accuracy;
  • the forecasting results are aggregated upward or decomposed downward It also introduces additional prediction error.
  • the results obtained by using different single levels are different, it not only depends on manual experience in the selection of levels, but also leads to loss of accuracy.
  • a data prediction method, device, and storage medium provided in the embodiments of the present application.
  • the embodiment of the present application provides a data prediction method, including:
  • hierarchical time series data are multiple sets of data corresponding to time series of each level, wherein the sum of the data of the sub-levels of each level in each level is equal to the data of the corresponding parent level;
  • the preset data prediction model is based on the hierarchical time series data, the prediction errors of multiple sets of training data in the historical preset time period, and the errors between each level are jointly trained.
  • the method uses the preset data forecasting model to predict the hierarchical time series data, before determining the forecast results in the preset time period after multiple historical time periods, after obtaining the hierarchical time series data, the method also includes :
  • the training set includes: multiple sets of training data;
  • the test set includes: Multiple sets of test data;
  • the loss function of the initial prediction model uses the loss function of the initial prediction model to calculate the prediction error of the training set and the error between each level, and iteratively adjust the model parameters of the initial prediction model according to the prediction error and the error between each level until the training conditions are met.
  • a preset data prediction model is determined by comparing multiple sets of test data with the first prediction data set.
  • the loss function of the initial prediction model uses the loss function of the initial prediction model to calculate the prediction error of the training set and the error between each level, and iteratively adjust the model parameters of the initial prediction model according to the prediction error and the error between each level until it meets the training requirements.
  • the first prediction data set corresponding to the test set is obtained, including:
  • the second forecasting data set includes: forecasting data of various levels in multiple historical time periods;
  • the prediction error and the error between each level are calculated in combination with a loss function
  • the prediction data of each level of each historical time period corresponding to the test set is extracted, and then the first prediction data set in the iterative process is obtained.
  • the prediction error and the error between each level are calculated in combination with the loss function, including:
  • the prediction error is calculated;
  • the first prediction data is the prediction data of each level in multiple first time periods in the second prediction data set;
  • multiple The first time period is a time period before a preset historical time period among the plurality of historical time periods;
  • the second prediction data is the prediction data of each level in a plurality of second time periods in the second prediction data set; a plurality of second time periods The time period after the preset historical time period for multiple historical time periods.
  • the prediction error is calculated based on the first prediction data in the second prediction data set and multiple sets of training data, including:
  • the calculation of the error between each level includes:
  • multiple sets of test data are compared with the first prediction data set to determine a preset data prediction model, including:
  • a preset data prediction model corresponding to the target iteration is determined among multiple prediction models.
  • multiple sets of training data include: multiple sets of first processed data; multiple sets of test data include: multiple sets of second processed data;
  • a preset historical time period is determined in a plurality of historical time periods, and multiple groups of first processed data corresponding to a plurality of first time periods before the preset historical time period are combined into the training set, and the preset historical time period is Multiple groups of second processed data corresponding to multiple second time periods after the first time period are combined into the test set.
  • the method also includes:
  • a preset data forecasting model is used to process multiple sets of logistics cargo volume data to obtain predicted logistics cargo volume data for a preset time period after multiple historical time periods.
  • the embodiment of the present application also provides a data prediction device, including:
  • the data acquisition module is configured to obtain hierarchical time series data;
  • the hierarchical time series data are multiple sets of data corresponding to the time series of each level, wherein the sum of the data of the sub-levels of each level in each level is equal to the data of the corresponding parent level data;
  • the prediction module is configured to use a preset data prediction model to predict hierarchical time series data, and determine the prediction results within a preset time period after multiple historical time periods; wherein,
  • the preset data prediction model is obtained by joint training based on the prediction errors of multiple sets of training data in the historical preset time period in the hierarchical time series data, and the errors between each level.
  • the embodiment of the present application also provides a data prediction device, including a memory and a processor, the memory stores a computer program that can run on the processor, and the processor implements the steps in the above method when executing the program.
  • the embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above method are implemented.
  • FIG. 1 is an optional schematic flow chart of the data prediction method provided by the embodiment of the present application.
  • FIG. 2 is a schematic diagram of an optional effect of the data prediction method provided by the embodiment of the present application.
  • FIG. 3 is a schematic diagram of an optional effect of the data prediction method provided by the embodiment of the present application.
  • FIG. 4 is an optional schematic flow chart of the data prediction method provided in the embodiment of the present application.
  • FIG. 5 is an optional schematic flow chart of the data prediction method provided by the embodiment of the present application.
  • FIG. 6 is an optional schematic flow chart of the data prediction method provided by the embodiment of the present application.
  • FIG. 7 is an optional schematic flow chart of the data prediction method provided by the embodiment of the present application.
  • FIG. 8 is an optional schematic flow chart of the data prediction method provided by the embodiment of the present application.
  • FIG. 9 is an optional schematic flow chart of the data prediction method provided by the embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a logistics volume forecasting device provided in an embodiment of the present application.
  • FIG. 11 is an optional schematic flow chart of the data prediction method provided by the embodiment of the present application.
  • FIG. 12 is a first structural schematic diagram of a data prediction device provided by an embodiment of the present application.
  • FIG. 13 is a second structural schematic diagram of the data prediction device provided by the embodiment of the present application.
  • FIG. 14 is a schematic diagram of a hardware entity of a data prediction device provided by an embodiment of the present application.
  • first/second in the application documents, add the following explanation.
  • first ⁇ second ⁇ third are only used to distinguish similar objects and do not mean Regarding the specific ordering of objects, it can be understood that “first ⁇ second ⁇ third” can be interchanged with specific order or sequence if allowed, so that the embodiment of the application described here can be used in addition to the performed in an order other than that shown or described.
  • a national fast-moving consumer goods manufacturer needs to predict the future sales of a certain product in the whole country and provinces at the same time in order to formulate inventory layout and stocking plan.
  • the forecasting scheme is to make a single time-series forecast for the sales time series of each province and the whole country, then the forecast results of these different levels often do not automatically meet the consistency, that is, the sales forecast of the whole country is not equal to the sum of the sales forecast of each province. "Inconsistent" prediction results cannot be used in the collaborative decision-making process at all levels.
  • the main forecasting methods include: “Top-Down”, “Bottom-Up”, “Middle-Out” and “Optimal Blending”.
  • top-down refers to forecasting the highest-level time series first, and then splitting the forecast results to lower levels according to a fixed ratio.
  • Bottom-up refers to first predicting the most granular time series, and then The prediction results are aggregated upwards.
  • the "break in the middle” approach combines bottom-up and top-down approaches. First, an “intermediate level” is selected and forecasts are generated for all series at that level. For series above the middle level, a bottom-up approach is used to generate consensus forecasts by aggregating forecasts from the "middle level” upwards.
  • a top-down approach is used to generate consensus forecasts by disaggregating the forecast for the "intermediate level” downwards.
  • the “optimal reconciliation” method is to first obtain the prediction results of all levels, and then process the prediction results through the optimal linear weighted reconciliation method, and then obtain the final result.
  • the embodiment of the present application also provides a data prediction method, please refer to Figure 1, which is an optional schematic flow chart of the data prediction method provided by the embodiment of the present application , will be described in conjunction with the steps shown in FIG. 1 .
  • the hierarchical time series data are multiple sets of data corresponding to the time series of each level, wherein the sum of the data of the sub-levels of each level in each level is equal to the data of the corresponding parent level.
  • the server acquires hierarchical time series data.
  • the hierarchical time series data are multiple sets of data corresponding to each hierarchical time series.
  • the sum of the data of the sub-levels of each level in each level is equal to the data of the corresponding parent level.
  • the server establishes communication connections with clients corresponding to each level in advance.
  • the server obtains multiple sets of data of various levels corresponding to multiple historical time periods from the client through the communication connection with the clients of each level. That is, the server obtains multiple sets of data corresponding to the time series of each level from the clients of each level.
  • the server acquires the pre-stored hierarchical time series data in its own database.
  • any set of data among the multiple sets of data may include: a combination of data corresponding to each level of any time series. That is, any set of data among multiple sets of data may include: a combination of data at various levels corresponding to any one of multiple historical time periods.
  • one data in a group of data may be any one of sales data, logistics data, and user age data of a corresponding level.
  • the logistics flow data may be one of the corresponding total logistics pieces, total logistics weight and total logistics volume.
  • the time series may be three time series respectively corresponding to three months before the current moment.
  • the time series may also be three time series respectively corresponding to the three days before the current moment, and in the embodiment of the present application, the time series are not limited.
  • the sub-level may be the city level, and the parent level may be the provincial level corresponding to the sub-level.
  • a provincial level can correspond to multiple city levels.
  • the parent level can also be a first-level agent, and the sub-level can be multiple second-level agents corresponding to the parent level.
  • One first-level agent can correspond to multiple second-level agents.
  • the sum of the data of multiple sub-levels is the data of the corresponding parent level.
  • the server first collects hierarchical time series data to be predicted.
  • the hierarchical time series data satisfies that the sum of the data of each sub-level is equal to the data of the corresponding parent level.
  • y 1 is the parent level data corresponding to y 2 and y 3
  • y 2 and y 3 are the child level data corresponding to y 1 .
  • y 2 is the parent level data corresponding to y 4 and y 5
  • y 3 is the parent level data corresponding to y 6 and y 7 .
  • the task of hierarchical time series forecasting is to predict the value of all time series in the future period t+h given the observation data at time 1,...,t 0 where y is the data in the time series data. When the time series is a day dimension, it is the daily volume.
  • y_Beijing (10, 20, 30, 40, 50)
  • y_Hebei province (30, 40, 50, 60, 10).
  • the constraint condition is often expressed graphically by the hierarchical structure diagram shown.
  • This type of constraint is the basic feature of hierarchical time series, and it is also the embodiment of the meaning of "layered”.
  • S102 Use the preset data prediction model to predict the hierarchical time series data, and determine the prediction results in the preset time period after multiple historical time periods; wherein, the preset data prediction model is based on the hierarchical time series data Among them, the prediction errors of multiple sets of training data in the historical preset time period, and the errors between the various levels are jointly trained.
  • the server uses the preset data prediction model to predict the hierarchical time series data, and determines the prediction results in the preset time period after multiple historical time periods; wherein, the preset data prediction model is based on In the hierarchical time series data, the prediction errors of multiple sets of training data in the historical preset time period, and the errors between the various levels are jointly trained.
  • the server divides multiple sets of data into a training set and a test set.
  • the server iteratively trains the initial prediction model by combining the training data with the loss function.
  • the server obtains multiple prediction models corresponding to multiple iterations through iterative training.
  • the server compares the forecast data of each iteration with the corresponding real data to obtain the forecast error of each iteration.
  • the server determines that the prediction model corresponding to the number of iterations with the smallest error is the preset data prediction model.
  • hierarchical time series data are multiple sets of data corresponding to time series of each level, wherein the sum of the sub-level data of each level in each level is equal to that of the corresponding parent level Data; use the preset data forecasting model to predict the hierarchical time series data, and determine the forecast results in the preset time period after multiple historical time periods; wherein, the preset data forecasting model is based on the hierarchical time series data Among them, the prediction errors of multiple sets of training data in the historical preset time period, and the errors between the various levels are jointly trained.
  • the preset data prediction model is based on the prediction error of multiple sets of training data in the historical time period and the error training between each level, not only the accuracy of the prediction error but also the difference between each level are taken into account during training. Error, so the pre-set data prediction model trained to predict the data is more accurate.
  • FIG. 4 is an optional flowchart of the data prediction method provided by the embodiment of the present application.
  • S101 shown in FIG. 1 also includes the implementation of S103 to S105, which will be described in conjunction with each step .
  • S103 Standardize the multiple sets of data of the hierarchical time series data, and divide the standardized multiple sets of data into a training set and a test set according to preset historical time periods.
  • the server standardizes multiple sets of data of hierarchical time series data, and divides the multiple sets of standardized data into a training set and a test set according to preset historical time periods.
  • the training set includes: multiple sets of training data.
  • the test set includes: multiple sets of test data.
  • the server can delete redundant data in multiple sets of data and fill them with the average data of the corresponding levels, or the server can fill the blank data of each level in the multiple sets of data with the average data of the corresponding levels to obtain the processed multiple sets of data. Since multiple sets of data correspond to multiple historical time periods.
  • the server determines a preset historical time period in multiple historical time periods, and the server determines several sets of training data corresponding to the preset historical time period as a training set.
  • the server determines the corresponding sets of test data after the preset historical time period as the test set.
  • the training set is the data set used to train the initial prediction model.
  • the test set is the data set used to determine the preset data prediction model.
  • the server uses the loss function of the initial prediction model to calculate the prediction error of the training set and the error between each level, and iteratively adjusts the model parameters of the initial prediction model according to the prediction error and the error between each level. Stop until the training condition is satisfied, and obtain the first prediction data set corresponding to the test set.
  • the first prediction data set includes: multiple prediction data in the iterative process of each level corresponding to each historical time period of the test set.
  • the server inputs multiple sets of training data in the training set into the initial prediction model.
  • a second forecast data set is obtained.
  • the second forecast data set includes: forecast data of various levels in multiple historical time periods.
  • the server calculates the prediction errors of the multiple sets of training data and the errors between levels by combining the loss function.
  • the server solves the loss function to obtain the model parameters for this training.
  • the server adjusts the initial prediction model according to the model parameters to obtain a new prediction model.
  • the server continues to train multiple sets of training data through the new prediction model, and stops when the training conditions are met, to obtain the final prediction model.
  • the first prediction data set corresponding to the test set in the iterative process is also obtained.
  • satisfying the training condition may be: reaching a preset number of training times or convergence of a loss function value.
  • the server compares multiple sets of test data with the first prediction data set to determine a preset data prediction model.
  • the first prediction data set includes: multiple prediction data corresponding to multiple iterations of the test set.
  • the server compares the data of each level in each time period in multiple sets of test data with the corresponding data in each forecast data to determine the error of each level, and then adds the errors of each level to obtain the error of each forecast data . Furthermore, multiple errors corresponding to multiple forecast data can be determined.
  • the server determines that the predictive model corresponding to the iteratively adjusted primary predictive data with the smallest error is the preset data predictive model.
  • the server subtracts the data of each level in each time period in multiple sets of test data from the corresponding data in a certain forecast data to obtain the error of the data in each level corresponding to each time period.
  • the server adds the errors of the data of each level in each time period to obtain the error corresponding to the forecast data.
  • the server iteratively adjusts the prediction model through the prediction error and the error between each level, and obtains multiple prediction models in the iterative process.
  • the server compares the multiple sets of test data with the first prediction data set to determine a preset data model. Since the preset data prediction model is based on the prediction error of multiple sets of training data in the historical time period and the error training between each level, not only the accuracy of the prediction error but also the difference between each level are taken into account during training. Error, so the pre-set data prediction model trained to predict the data is more accurate.
  • FIG. 5 is an optional flowchart of the data prediction method provided by the embodiment of the present application.
  • S104 shown in FIG. 4 can also be implemented through S106 to S110, which will be described in conjunction with each step .
  • the server inputs multiple sets of training data into the initial prediction model to obtain the second prediction data set of the first iteration in the iterative process.
  • the second forecast data set includes: forecast data of various levels in multiple historical time periods.
  • the server inputs multiple sets of training data into the initial prediction model to obtain the second prediction data set for the first training.
  • the server calculates the prediction error and the error between each level according to the first second prediction data set and the loss function.
  • the server obtains the model parameters according to the prediction error and the error between each level, adjusts the initial prediction model, and obtains the next updated prediction model.
  • the server again inputs multiple sets of training data into the prediction model to be updated next time, and then executes the above process to complete the iteration.
  • the server calculates the prediction error and the error between each level based on the second prediction data set and multiple sets of training data in combination with a loss function.
  • the loss function is the function corresponding to the initial prediction model.
  • the server calculates prediction errors corresponding to multiple sets of training data in multiple first time periods based on the second prediction data set and multiple sets of training data in combination with a loss function.
  • the multiple first time periods are the time periods before the preset historical time period among the multiple historical time periods.
  • the prediction error characterizes the error between the predicted data and the corresponding data in multiple sets of training data.
  • the server calculates errors between levels in the second prediction data set for multiple second time periods in combination with a loss function.
  • the multiple second time periods are time ends after the preset historical time period among the multiple historical time periods.
  • the error between the various levels represents the error between the data of the parent level and the data of the corresponding child level in the second predicted data set.
  • the server uses the prediction error and the error between each level to solve the gradient of the loss function to obtain the model parameters in the iterative process, thereby obtaining an updated prediction model.
  • the server uses the prediction error and the error between each level to solve the loss function gradient after each iteration, and obtains the model parameters of each iteration in the iterative process.
  • the server adjusts the current forecasting model through each model parameter to obtain an updated forecasting model.
  • the server continues to train multiple sets of training data by using the updated prediction model, and stops when the training conditions are met to obtain the final prediction model, thereby obtaining multiple prediction models in the iterative process.
  • the network structure of the prediction model will be based on the prediction error and the error between each layer through the output layer, and then back-transmit layer by layer to the intermediate layer and input layer, and correct the weights of each layer in the way of gradient descent.
  • a new prediction model is obtained.
  • the network structure of the new prediction model will continue to train the training set until the training conditions are met and stop, and multiple prediction models in the iterative process will be obtained.
  • the server extracts the prediction data of each level in each historical time period of the corresponding test set from each of the corresponding second prediction data sets obtained by using multiple prediction models, and then obtains the first prediction data in the iterative process.
  • a prediction data set obtained by using multiple prediction models.
  • the server extracts the prediction data of each level corresponding to each historical time period of the test set from each second prediction data set, and obtains a prediction data set corresponding to each iteration.
  • the server combines the prediction data set of each iteration to form the first prediction data set.
  • the server inputs multiple sets of training data into the initial prediction model to obtain the second set of prediction data.
  • the server calculates the prediction error and the error between each level through the second prediction data set.
  • the server iteratively adjusted the prediction model through the prediction error and the error between each level, and obtained multiple prediction models in the iterative process.
  • the server may extract the first prediction data set from the multiple second prediction data sets in the iterative process for comparison. Since the preset data prediction model is based on the prediction error of multiple sets of training data in the historical time period and the error training between each level, not only the accuracy of the prediction error but also the difference between each level are taken into account during training. Error, so the pre-set data prediction model trained to predict the data is more accurate.
  • FIG. 6 is an optional flowchart of the data prediction method provided by the embodiment of the present application.
  • S107 shown in FIG. 5 can also be implemented through S111 to S112, which will be described in conjunction with each step .
  • the server calculates the prediction error based on the first prediction data in the second prediction data set and multiple sets of training data.
  • the first forecast data is the forecast data of each level in the plurality of first time periods in the second forecast data set.
  • the multiple first time periods are time periods before the preset historical time period among the multiple historical time periods.
  • the server calculates errors between levels based on the second prediction data in the second prediction data set.
  • the second forecast data is the forecast data of each level in the multiple second time periods in the second forecast data set.
  • the multiple second time periods are time periods after the preset historical time period among the multiple historical time periods.
  • the server builds a DeepAR-based hierarchical time series prediction model.
  • the DeepAR model is a time series forecasting model based on a recurrent neural network, which can be used for general time series forecasting, but cannot be directly used for hierarchical time series forecasting. Therefore, for the hierarchical time series prediction task, the improved loss function (1) designed by the present application for hierarchical time series prediction is:
  • C is a set of constraints derived from the hierarchical structure. is the predicted value of the "parent node” time series in constraint c at time t, is the predicted value of the "leaf node” time series in constraint c at time t, and J(c) is the number of "leaf nodes”.
  • n is the number of each level
  • t0 is the number of multiple first time periods
  • T is the number of multiple second time periods.
  • FIG. 7 is an optional schematic flowchart of the data prediction method provided by the embodiment of the present application.
  • S111 to S112 shown in FIG. 6 can also be realized through S113 to S115, and each step will be combined Be explained.
  • the server calculates the sum of squares of the differences between the first prediction data in the same first time period and the training data of the corresponding level, and then obtains the first sum of each level in the same first time period.
  • the server adds the multiple first sums corresponding to the multiple first time periods to obtain the prediction error.
  • the multiple first time periods include: two first time periods.
  • Each level includes: a parent level (a first-level agent) and two corresponding sub-levels (two second-level agents).
  • the server calculates the sum of the squares of the difference between the data of the parent level and the corresponding forecast data in the first first time period, calculates the sum of the squares of the differences between the data of the two sub-levels and the corresponding forecast data, and then the server calculates the sum of the squares of the difference between the data of the parent level and the corresponding forecast data
  • the sum of squares is added to the sum of squares of the differences corresponding to the two sublevels, resulting in a first sum corresponding to the first first time period.
  • the server uses the same method to calculate the first sum corresponding to the second time period.
  • the server adds the two first sums to get the prediction error.
  • the server calculates the sum of the squares of the differences between the forecast data of each parent level of each layer in the second forecast data in the same second time period and the sum of the forecast data of the corresponding sub-levels, and combines the multiple The multiple sums of squares for the two time periods are added to obtain a second sum.
  • the multiple second time periods include: two second time periods.
  • Each level includes: a parent level (a first-level agent) and two corresponding sub-levels (two second-level agents).
  • the server calculates the sum of squares of differences between the data of the parent level and the sum of predicted data of corresponding sub-levels in the first second time period. Similarly, the server uses the same method to calculate the sum of squares corresponding to the second time period. The server adds the two sums of squares to get the second sum.
  • the server obtains the error between various levels by using multiple hyperparameters of the second sum and harmonic error penalty term.
  • the harmonic error penalty hyperparameter can be any positive number.
  • hierarchical time series forecasting essentially adds consistency constraints between levels to the final forecasting results, namely:
  • the hierarchical structure deviation term in the loss function is essentially a lower bound of the prediction error.
  • Intuitive understanding means that although the prediction results that satisfy the consistency between levels do not necessarily guarantee the highest prediction accuracy, since the future The real data must meet the consistency, then if the error between the levels of the prediction results is large, then the prediction accuracy rate must not be very high, so adding this item to the loss function can help improve the layering time Predictive Performance for Sequence Forecasting.
  • the server calculates the prediction error and the error between levels respectively by using the first prediction data and the second prediction data in the second prediction data set. Since the server considers the error between each level in the process of calculating the error in combination with the loss function, the prediction model adjusted by the model parameters of the loss function is more accurate in predicting the data.
  • FIG. 8 is an optional flowchart of the data prediction method provided by the embodiment of the present application.
  • S103 shown in FIG. 3 can be implemented through S116 to S118 , which will be described in conjunction with each step.
  • the server uses the average data of each level to update the abnormal value in each level.
  • the average data is the average value of the data of multiple levels in multiple historical time periods of the level corresponding to the abnormal value.
  • the server uses the average data corresponding to the levels with blank data to fill the blank data corresponding to each level in multiple sets of data, and then obtain multiple sets of processed data corresponding to the time series of each level.
  • S118 Determine a preset historical time period in a plurality of historical time periods, combine multiple sets of first processed data corresponding to a plurality of first time periods before the preset historical time period into a training set, and combine the preset historical time period Multiple groups of second processed data corresponding to multiple second time periods after the period are combined into a test set.
  • the server determines a preset historical time period in a plurality of historical time periods, and combines multiple sets of first processed data corresponding to a plurality of first time periods before the preset historical time period into a training set, Multiple groups of second processed data corresponding to multiple second time periods after the preset historical time period are combined into a test set.
  • the multiple historical time periods may include: 12 time periods corresponding to January to December.
  • the server may determine September as the preset historical time period.
  • the multiple first time periods are 8 time periods corresponding to January-August, and the multiple second time periods can also be 3 corresponding to October-December period.
  • the server standardizes multiple sets of data, deletes outliers and fills in blank data, thereby making the data structure of multiple sets of data more complete, which is beneficial to model training.
  • FIG. 8 is an optional flowchart of the data prediction method provided by the embodiment of the present application.
  • S105 shown in FIG. 3 can be implemented through S119 to S122 , which will be described in conjunction with each step.
  • the server compares multiple sets of test data with multiple prediction data in the first prediction data set, and determines multiple comparison errors corresponding to the multiple prediction data.
  • Each prediction data is the prediction data of each level of each historical time period obtained in each iteration training process.
  • the server compares the test data of each level in each time period in multiple sets of test data with the corresponding forecast data in a certain forecast data set of the first forecast data set.
  • the server determines the errors corresponding to the test data of each level in each time period.
  • the server adds the errors corresponding to the test data of each level in each time period to obtain the error corresponding to each time period, that is, the error of each set of test data is obtained.
  • the server then adds the errors corresponding to each set of test data to obtain the error corresponding to the predicted data. Furthermore, multiple comparison errors of multiple prediction data can be obtained.
  • the server determines a target comparison error within a preset error range from the multiple comparison errors.
  • the server determines the target iteration number corresponding to the target number of prediction data corresponding to the target comparison error.
  • multiple prediction models are formed in the iterative process.
  • the server determines a preset data prediction model corresponding to the target iteration number among multiple prediction models.
  • the server determines the preset data prediction model corresponding to the target iteration number with the smallest error of multiple sets of test data, and because the preset data prediction model does not affect the test set
  • the prediction accuracy is high, and then the hierarchical time series data can be processed through the preset data prediction model, and the prediction result with high prediction accuracy can be obtained.
  • FIG. 9 is an optional schematic flowchart of the data prediction method provided in the embodiment of the present application, which will be described in combination with various steps.
  • the server acquires multiple sets of logistics cargo volume data corresponding to multiple historical time periods.
  • multiple sets of logistics cargo volume data include: shipment volume data and hierarchical relationships of the whole country, each region, and each province.
  • the server uses a preset data prediction model to process multiple sets of logistics cargo volume data to obtain predicted logistics cargo volume data for preset time periods after multiple historical time periods.
  • the server uses the preset data prediction model to process multiple sets of logistics cargo data. Since the preset data prediction model is based on the prediction errors of multiple sets of training data in the historical preset time period, and the The error between them is obtained by training together. Furthermore, by using the preset data prediction model to predict multiple sets of logistics cargo volume data, a prediction result with high accuracy can be obtained.
  • the embodiment of the present application also provides a logistics cargo volume forecasting device 600 for implementing the data forecasting method provided in FIG. 9 .
  • a logistics cargo volume forecasting device 600 for implementing the data forecasting method provided in FIG. 9 .
  • FIG. 10 is a schematic structural diagram of the logistics cargo volume forecasting device provided in the embodiment of the present application.
  • the embodiment of the present application provides a logistics volume forecasting device 600 , including: a data acquisition module 601 , a data preprocessing module 602 , a target prediction model training module 603 and a data prediction model 604 .
  • the data acquisition module 601 is used to acquire the hierarchical relationship between the historical time series data of logistics cargo volume and time series. For example, the shipment data and hierarchical relationship of the whole country, each region, and each province.
  • the data acquisition module 601 is used to execute S123.
  • the data preprocessing module 602 is used for preprocessing the data, removing outliers and filling missing values, and standardizing the data. Then the preprocessed data is divided into training set and test set.
  • the target prediction model training module 603 is used to train the initial network model by using the historical time series data to obtain the target prediction model of the time series data.
  • the data prediction module 604 is configured to use the target prediction model to predict the data of the time series data in the future time period to obtain a prediction result, and store and display the prediction result.
  • FIG. 11 is an optional schematic flowchart of the data prediction method provided in the embodiment of the present application, which will be described in combination with each step.
  • S201 Collect hierarchical time series data to be predicted.
  • the data acquisition module 701 in the data prediction device 700 is used to acquire the hierarchical relationship between historical time series data and time series.
  • S202 Data preprocessing, removing outliers and filling in missing values; data segmentation, dividing training set and test set.
  • the data preprocessing module 702 in the data forecasting device 700 is used to preprocess the historical time series data, remove outliers and fill in missing values, and standardize the data. Then the preprocessed data is divided into training set and test set.
  • the target prediction model training module 703 in the data prediction device 700 is configured to use historical time series data to train an initial network model to obtain a target prediction model for time series data. That is the final model.
  • the data prediction module 704 in the data prediction device 700 is used to use the target prediction model (final model) to predict the data of the time series data in the future time period to obtain the prediction results, and store and display the prediction results .
  • target prediction model final model
  • the DeepAR time series prediction model is constructed based on the prediction errors of multiple sets of training data in the hierarchical time series data in the historical time period, and the errors between each level, not only the prediction error is taken into account when training the DeepAR time series prediction model Accuracy also takes into account the errors between the various levels, so the final model trained is more accurate in predicting the data.
  • the embodiment of the present application further provides a data prediction device 700 for executing the data prediction method provided in FIG. 11 .
  • a data prediction device 700 for executing the data prediction method provided in FIG. 11 .
  • FIG. 12 is a first structural diagram of the data prediction device provided in the embodiment of the present application.
  • the embodiment of the present application provides a data prediction device 700 , including: a data acquisition module 701 , a data preprocessing module 702 , a target prediction model training module 703 and a data prediction model 704 .
  • the data acquisition module 701 is used to acquire the hierarchical relationship between historical time series data and time series.
  • the data preprocessing module 702 is used for preprocessing the historical time series data, removing outliers and filling in missing values, and standardizing the data. Then the preprocessed data is divided into training set and test set. Module details are in S202 in the flow of the above prediction method.
  • the target prediction model training module 703 is used to train the initial network model by using the historical time series data to obtain the target prediction model of the time series data. Module details are in S203 to S207 in the flow of the above prediction method.
  • the data prediction module 704 is used to use the target prediction model to predict the data of the time series data in the future time period to obtain a prediction result, and store and display the prediction result. Module details are in S208 in the flow of the above prediction method.
  • FIG. 13 is a second structural schematic diagram of a data prediction device provided by an embodiment of the present application.
  • the embodiment of the present application also provides a data prediction device 800 , including: a data acquisition unit 803 and a prediction unit 804 .
  • the data acquisition unit 803 is used to acquire hierarchical time series data;
  • the hierarchical time series data are multiple sets of data corresponding to the time series of each level, wherein the sum of the sub-level data of each level in each level is equal to that of the corresponding parent level data;
  • the prediction unit 804 is configured to use a preset data prediction model to predict hierarchical time series data, and determine the prediction results within a preset time period after multiple historical time periods; wherein,
  • the preset data prediction model is obtained by joint training based on the prediction errors of multiple sets of training data in the historical preset time period in the hierarchical time series data, and the errors between each level.
  • the data prediction device 800 is used to standardize multiple sets of data of hierarchical time series data, and divide the standardized multiple sets of data into training sets and test sets according to preset historical time periods; training The set includes: multiple sets of training data; the test set includes: multiple sets of test data; use the loss function of the initial prediction model to calculate the prediction error of the training set, and the error between each level, and based on the prediction error, and the error between each level.
  • the model parameters of the initial prediction model are iteratively adjusted until the training conditions are met, and the first prediction data set corresponding to the test set is obtained; the first prediction data set includes: the iterative process of each level of each historical time period corresponding to the test set Multiple prediction data; use multiple sets of test data to compare with the first prediction data set, and determine a preset data prediction model.
  • the data prediction device 800 is used to input multiple sets of training data into the initial prediction model to obtain the second prediction data set;
  • the second prediction data set includes: prediction data of various levels in multiple historical time periods; based on the first Two prediction data sets and multiple sets of training data, combined with the loss function to calculate the prediction error and the error between each level; use the prediction error and the error between each level to solve the gradient of the loss function, and obtain the model parameters in the iterative process, so as to be updated prediction model; using the updated prediction model, continue to train multiple sets of training data until the training conditions are met, and stop to obtain the final prediction model, thereby obtaining multiple prediction models in the iterative process; when using multiple prediction models, From each corresponding second prediction data set, the prediction data of each level in each historical time period corresponding to the test set is extracted, and then the first prediction data set in the iterative process is obtained.
  • the data prediction device 800 is used to calculate the prediction error based on the first prediction data in the second prediction data set and multiple sets of training data;
  • the first prediction data is a plurality of first prediction data in the second prediction data set.
  • the forecast data of each level in the time period; the multiple first time periods are the time periods before the preset historical time period in the multiple historical time periods; based on the second forecast data in the second forecast data set, calculate the time period between each level
  • the second forecast data is the forecast data of each level in the multiple second time periods in the second forecast data set;
  • the multiple second time periods are the time periods after the preset historical time period among the multiple historical time periods.
  • the data prediction device 800 is used to calculate the sum of the squares of the difference between the first prediction data in the same first time period and the training data of the corresponding level, and then obtain the first sum of each level in the same first time period , adding the multiple first sums corresponding to the multiple first time periods to obtain the prediction error.
  • the data prediction device 800 is used to calculate the sum of the squares of the difference between the forecast data of each parent level of each layer in the second forecast data in the same second time period and the sum of the forecast data of the corresponding sub-levels , adding multiple sums of squares in multiple second time periods to obtain the second sum; multiplying the multiple second sums with the hyperparameter of the harmonic error penalty term to obtain the error between levels.
  • the data prediction device 800 is used to compare multiple sets of test data with multiple prediction data in the first prediction data set, and determine multiple comparison errors corresponding to multiple prediction data; Determine the target comparison error within the preset error range from the comparison error; determine the target iteration number corresponding to the target prediction data corresponding to the target comparison error; determine the preset data prediction model corresponding to the target iteration number in multiple prediction models .
  • the multiple sets of training data include: multiple sets of first processed data; multiple sets of test data include: multiple sets of second processed data; the data prediction device 800 is used to update each Outliers in the hierarchy; use the average data corresponding to the hierarchy with blank data to fill in the blank data corresponding to each hierarchy in multiple sets of data, and then obtain multiple sets of processed data corresponding to the time series of each hierarchy; in multiple historical time periods Determine the preset historical time period, combine multiple sets of first processed data corresponding to multiple first time periods before the preset historical time period into a training set, and combine multiple second time periods after the preset historical time period The corresponding sets of second processed data are combined into a test set.
  • the data acquisition unit 803 in the data prediction device 800 is used to obtain multiple sets of logistics cargo volume data corresponding to multiple historical time periods; the prediction unit 804 in the data prediction device 800 is used to use the preset data prediction model Multiple sets of logistics cargo volume data are processed to obtain forecasted logistics cargo volume data for preset time periods after multiple historical time periods.
  • the hierarchical time series data is obtained through the data acquisition unit 803; the hierarchical time series data are multiple sets of data corresponding to the time series of each level, wherein the sum of the sub-level data of each level in each level is equal to Corresponding to the data of the parent level; then use the preset data prediction model to predict the hierarchical time series data through the prediction unit 804, and determine the prediction results in the preset time period after multiple historical time periods; wherein, the preset data The prediction model is based on the hierarchical time series data, the prediction errors of multiple sets of training data in the historical preset time period, and the errors between each level are jointly trained.
  • the preset data prediction model is based on the prediction error of multiple sets of training data in the historical time period and the error training between each level, not only the accuracy of the prediction error but also the difference between each level are taken into account during training. Error, so the pre-set data prediction model trained to predict the data is more accurate.
  • the above-mentioned data prediction method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
  • the computer software products are stored in a storage medium and include several instructions to make A data prediction device (which may be a personal computer, etc.) executes all or part of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read-only memory (Read Only Memory, ROM), magnetic disk or optical disk.
  • embodiments of the present application are not limited to any specific combination of hardware and software.
  • an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above method are implemented.
  • the embodiment of the present application provides a data prediction device, including a memory 802 and a processor 801, the memory 802 stores a computer program that can be run on the processor 801, and the processor 801 implements when executing the program. steps in the method above.
  • FIG. 14 is a schematic diagram of a hardware entity of the data prediction device provided in the embodiment of the present application.
  • the hardware entity of the data prediction device 800 includes: a processor 801 and a memory 802, wherein;
  • the processor 801 generally controls the overall operation of the data prediction device 800 .
  • the memory 802 is configured to store instructions and applications executable by the processor 801, and can also cache data to be processed or processed by each module in the processor 801 and the data prediction device 800 (for example, image data, audio data, voice communication data) and video communication data), which can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM).
  • data prediction device 800 for example, image data, audio data, voice communication data
  • video communication data which can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM).
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division.
  • the coupling, or direct coupling, or communication connection between the various components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms. of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed to multiple network units; Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can be used as a single unit, or two or more units can be integrated into one unit; the above-mentioned integration
  • the unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
  • the above-mentioned integrated units of the present application are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.
  • the computer software products are stored in a storage medium and include several instructions to make A computer device (which may be a personal computer, a server, or a network device, etc.) executes all or part of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes various media capable of storing program codes such as a removable storage device, ROM, magnetic disk or optical disk.
  • the server obtains hierarchical time series data; the hierarchical time series data is multiple sets of data corresponding to the time series of each level, wherein the sum of the sub-level data of each level in each level is equal to the data of the corresponding parent level ; Use the preset data forecasting model to predict the hierarchical time series data, and determine the forecasting results in the preset time period after multiple historical time periods; wherein, the preset data forecasting model is based on the hierarchical time series data , which is obtained by jointly training the prediction errors of multiple sets of training data within the historical preset time period, and the errors between each level. Since the preset data prediction model not only takes into account the accuracy of the prediction error, but also considers the errors between various levels during training, the preset data prediction model obtained by the server training is more accurate in predicting data.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

La présente demande concerne un procédé et un appareil de prédiction de données, ainsi qu'un support de stockage. Le procédé comprend les étapes consistant à : acquérir des données de séries chronologiques hiérarchiques, les données de séries chronologiques hiérarchiques étant de multiples ensembles de données correspondant à diverses séries chronologiques hiérarchiques, et la somme des données de niveaux sous-hiérarchiques de chaque niveau hiérarchique étant égale à des données d'un niveau hiérarchique parent correspondant ; et prédire les données de séries chronologiques hiérarchiques à l'aide d'un modèle de prédiction de données prédéfini, et déterminer un résultat de prédiction dans une période de temps prédéfinie après de multiples périodes de temps historiques, le modèle de prédiction de données prédéfini étant obtenu en effectuant conjointement un apprentissage sur la base d'erreurs de prédiction de multiples ensembles de données d'apprentissage dans une période de temps prédéfinie historique dans les données de séries chronologiques hiérarchiques et des erreurs entre les niveaux hiérarchiques.
PCT/CN2022/108936 2021-08-17 2022-07-29 Procédé et appareil de prédiction de données et support de stockage WO2023020257A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110943383.6A CN113656691A (zh) 2021-08-17 2021-08-17 数据预测方法、装置及存储介质
CN202110943383.6 2021-08-17

Publications (1)

Publication Number Publication Date
WO2023020257A1 true WO2023020257A1 (fr) 2023-02-23

Family

ID=78479949

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/108936 WO2023020257A1 (fr) 2021-08-17 2022-07-29 Procédé et appareil de prédiction de données et support de stockage

Country Status (2)

Country Link
CN (1) CN113656691A (fr)
WO (1) WO2023020257A1 (fr)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116956049A (zh) * 2023-09-19 2023-10-27 中国联合网络通信集团有限公司 工业产能预测模型的训练方法、装置、设备及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656691A (zh) * 2021-08-17 2021-11-16 北京沃东天骏信息技术有限公司 数据预测方法、装置及存储介质
CN114626896A (zh) * 2022-04-02 2022-06-14 北京京东振世信息技术有限公司 物品数量预测方法及装置、电子设备和存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110263380A (zh) * 2019-05-23 2019-09-20 东华大学 一种纺丝工序级联建模分段区间参数配置方法
CN111915083A (zh) * 2020-08-03 2020-11-10 国网山东省电力公司电力科学研究院 一种基于时间分层组合的风电功率预测方法及预测系统
CN112348271A (zh) * 2020-11-12 2021-02-09 华北电力大学 基于vmd-ipso-gru的短期光伏功率预测方法
CN113656691A (zh) * 2021-08-17 2021-11-16 北京沃东天骏信息技术有限公司 数据预测方法、装置及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110263380A (zh) * 2019-05-23 2019-09-20 东华大学 一种纺丝工序级联建模分段区间参数配置方法
CN111915083A (zh) * 2020-08-03 2020-11-10 国网山东省电力公司电力科学研究院 一种基于时间分层组合的风电功率预测方法及预测系统
CN112348271A (zh) * 2020-11-12 2021-02-09 华北电力大学 基于vmd-ipso-gru的短期光伏功率预测方法
CN113656691A (zh) * 2021-08-17 2021-11-16 北京沃东天骏信息技术有限公司 数据预测方法、装置及存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116956049A (zh) * 2023-09-19 2023-10-27 中国联合网络通信集团有限公司 工业产能预测模型的训练方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN113656691A (zh) 2021-11-16

Similar Documents

Publication Publication Date Title
WO2023020257A1 (fr) Procédé et appareil de prédiction de données et support de stockage
Li et al. Effective tourist volume forecasting supported by PCA and improved BPNN using Baidu index
Wang et al. Rule induction for forecasting method selection: Meta-learning the characteristics of univariate time series
Srivastava et al. Software test effort estimation: a model based on cuckoo search
Liu et al. Particle swarm optimization‐based support vector regression for tourist arrivals forecasting
Lee et al. Location-based web service QoS prediction via preference propagation for improving cold start problem
Shakya et al. Neural network demand models and evolutionary optimisers for dynamic pricing
Chen et al. An effective matching algorithm with adaptive tie-breaking strategy for online food delivery problem
Davila Delgado et al. Big data analytics system for costing power transmission projects
Luo et al. Improving neighborhood based Collaborative Filtering via integrated folksonomy information
Gandhmal et al. Wrapper-enabled feature selection and CPLM-based NARX model for stock market prediction
Lee et al. Dynamic BIM component recommendation method based on probabilistic matrix factorization and grey model
Mahbub et al. A neural approach to product demand forecasting
Lee et al. An entropy decision model for selection of enterprise resource planning system
Zhai et al. Combining PSO-SVR and Random Forest Based Feature Selection for Day-ahead Peak Load Forecasting.
Zhang et al. RSVRs based on feature extraction: a novel method for prediction of construction projects’ costs
CN116777056A (zh) 预测模型的训练、确定物资需求量的方法和装置
Wang An analysis of the optimal customer clusters using dynamic multi-objective decision
CN104657429A (zh) 基于复杂网络的技术驱动型产品创新方法
Hao et al. A probability-based hybrid user model for recommendation system
Shi Cloud manufacturing service recommendation model based on GA-ACO and carbon emission hierarchy
Škulj et al. Stochastic blockmodeling of linked networks
Sakawa et al. Interactive fuzzy multiobjective stochastic programming with simple recourse
Chang et al. An interval-valued time series forecasting scheme with probability distribution features for electric power generation prediction
Shir‐Mohammadli et al. A comparative study of a hybrid Logit–Fratar and neural network models for trip distribution: case of the city of Isfahan

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22857569

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE