Training method and device of traffic prediction model, prediction method and device and storage medium

By using multi-layer prediction model and residual correction technology in network traffic prediction, the problem of insufficient traffic prediction accuracy in the prior art is solved, and higher prediction accuracy and model convergence efficiency are achieved.

CN119484309AActive Publication Date: 2025-02-18CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202310997589.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-09
Publication Date
2025-02-18
Estimated Expiration
2043-08-09

AI Technical Summary

Technical Problem

The prior art has insufficient accuracy in network traffic prediction, making it difficult to effectively extract nonlinear feature relationships, resulting in unreasonable allocation of network resources and may cause network paralysis.

Method used

A training method for traffic prediction model is proposed. By obtaining traffic training sample data, the model parameters of the first prediction model and the second prediction model are determined, including model structure type, holiday characteristics and seasonal parameters. The initial prediction result is generated using the first prediction model, the residual value is calculated, and the second prediction model is corrected to improve the prediction accuracy.

Benefits of technology

It improves the accuracy of network traffic prediction, can more effectively utilize the trend, periodicity and holiday characteristics of traffic data, improves the accuracy and convergence efficiency of the model, corrects the part with poor prediction results, and improves the prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484309A_ABST
    Figure CN119484309A_ABST
Patent Text Reader

Abstract

The invention provides a traffic prediction model training method and device, a prediction method and device and a storage medium, and relates to the technical field of communication. The traffic prediction model training method comprises the following steps: acquiring traffic training sample data; determining model parameters of the first prediction model, wherein the model parameters comprise model structure type parameters, holiday and festival characteristic parameters and seasonal parameters; for each piece of data in the traffic training sample data, executing the following operations until training is completed: the first prediction model generates a first training prediction result according to a traffic training sample; obtaining a training residual value according to the traffic training sample data and the corresponding first training prediction result; the second training prediction model generates a second training prediction result according to the training residual value, and the first prediction model and the second prediction model are corrected according to the second training prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a training method, a prediction method and device, and a storage medium for a traffic prediction model. Background Art

[0002] As the scale of operators' business continues to grow, network traffic is growing exponentially. Irrational allocation of network traffic resources may cause the entire network to paralyze. Predicting future network traffic trends and making reasonable network resource plans in advance can minimize network congestion.

[0003] The research methods of traffic scheduling in related technologies are mainly based on three categories: statistical model-based, empirical pattern analysis-based and machine learning model-based. Based on the statistical model, the difference method is used to smooth the traffic data for preprocessing, and then the characteristics of the network traffic are captured; the smoothed model is fitted through a statistical model, such as the ARIMA (AutoRegressive, Integrated, Moving Average) model, but the data is required to have a stationary characteristic, and the model cannot extract nonlinear characteristic relationships. The model based on empirical pattern analysis decomposes the traffic data into countless IMFs (Intrinsic Mode Functions) and residual components, and then predicts them separately, but the uncertainty increases for components with large amplitude changes. The traffic prediction model based on machine learning can self-learn and use its powerful learning ability to seek the optimal solution. It mainly includes regression models, decision trees and LSTM (Long Short Term Memory). Summary of the invention

[0004] One object of the present disclosure is to improve the accuracy of network traffic prediction.

[0005] According to one aspect of some embodiments of the present disclosure, a training method for a traffic prediction model is proposed, including: obtaining traffic training sample data; determining model parameters of a first prediction model, the model parameters including model structure type parameters, holiday characteristic parameters and seasonal parameters; for each data in the traffic training sample data, performing the following operations until the training is completed: the first prediction model generates a first training prediction result based on the traffic training sample; obtaining a training residual value based on the traffic training sample data and the corresponding first training prediction result; and the second training prediction model generates a second training prediction result based on the training residual value, wherein the first prediction model and the second prediction model are corrected according to the second training prediction result.

[0006] In some embodiments, the training method complies with at least one of the following: the first prediction model includes a prophet model; or the second prediction model includes a dilated convolution and a bidirectional long short-term memory (LSTM) model.

[0007] In some embodiments, determining the model parameters of the first prediction model includes: determining that the first prediction model adopts a linear model type; determining holiday characteristic parameters based on the degree of holiday characteristics of the traffic training sample data; and determining seasonal parameters based on whether the traffic training sample data has seasonal characteristics.

[0008] In some embodiments, obtaining a training residual value according to the traffic training sample data and the corresponding first training prediction result includes: obtaining a difference between the first training prediction result and the corresponding traffic training sample data as the training residual value.

[0009] In some embodiments, obtaining traffic training sample data includes: extracting traffic data from historical data; and performing data padding and cleaning on the traffic data to serve as traffic training sample data.

[0010] In some embodiments, the training method also includes: after completing the training, obtaining traffic verification sample data; the first prediction model obtains a first verification prediction result based on the traffic verification sample; obtains a verification residual value based on the traffic verification sample data and the corresponding first verification prediction result; the second prediction model obtains a second verification prediction result based on the verification residual value; determines the traffic verification prediction value based on the first verification prediction result and the second verification prediction result; and determines the model evaluation value based on the traffic verification prediction value and historical data.

[0011] In some embodiments, determining the traffic verification prediction value based on the first verification prediction result and the second verification prediction result includes: obtaining the sum of the first verification prediction result and the second verification prediction result as the traffic verification prediction value.

[0012] In some embodiments, determining a model evaluation value based on traffic verification prediction values ​​and historical data includes: obtaining at least one of root mean square error, mean absolute error, mean absolute percentage error, and accuracy parameters as a model evaluation value based on the traffic verification prediction values ​​and historical data.

[0013] According to one aspect of some embodiments of the present disclosure, a traffic prediction method is proposed, including: obtaining current traffic data; processing the current traffic data through a first prediction model to obtain a prediction initial value; obtaining a prediction residual value based on the current traffic data and the prediction initial value; processing the prediction residual value through a second prediction model to obtain a prediction correction value; and obtaining a traffic prediction value based on the prediction initial value and the prediction correction value, wherein the first prediction model and the second prediction model are generated by training according to any one of the above-mentioned traffic prediction model training methods.

[0014] According to one aspect of some embodiments of the present disclosure, a model training device is proposed, comprising: a sample data acquisition unit, configured to acquire traffic training sample data; a parameter determination unit, configured to determine model parameters of a first prediction model, the model parameters including model structure type parameters, holiday characteristic parameters and seasonal parameters; a training unit, configured to perform the following operations for each data in the traffic training sample data until the training is completed: the first prediction model generates a first training prediction result based on the traffic training sample; obtains a training residual value based on the traffic training sample data and the corresponding first training prediction result; and the second training prediction model generates a second training prediction result based on the training residual value, wherein the first prediction model and the second prediction model are corrected according to the second training prediction result.

[0015] In some embodiments, the device also includes: a verification unit, configured to obtain traffic verification sample data after completing training; a first prediction model obtains a first verification prediction result based on the traffic verification sample; a verification residual value is obtained based on the traffic verification sample data and the corresponding first verification prediction result; a second prediction model obtains a second verification prediction result based on the verification residual value; a traffic verification prediction value is determined based on the first verification prediction result and the second verification prediction result; and a model evaluation value is determined based on the traffic verification prediction value and historical data.

[0016] According to one aspect of some embodiments of the present disclosure, a flow prediction device is proposed, comprising: a flow acquisition unit, configured to acquire current flow data; and a prediction unit, configured to: process the current flow data through a first prediction model to acquire a prediction initial value; acquire a prediction residual value based on the current flow data and the prediction initial value; process the prediction residual value through a second prediction model to acquire a prediction correction value; and acquire a flow prediction value based on the prediction initial value and the prediction correction value, wherein the first prediction model and the second prediction model are generated by training according to the training method of the flow prediction model according to any one of claims 1 to 8.

[0017] According to one aspect of some embodiments of the present disclosure, a data processing device is provided, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute any one of the above methods based on instructions stored in the memory.

[0018] According to one aspect of some embodiments of the present disclosure, a non-transitory computer-readable storage medium is provided, on which computer program instructions are stored, and when the instructions are executed by a processor, the steps of any one of the above methods are implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:

[0020] Figure 1 The present invention is a flowchart of some embodiments of the method for training the traffic prediction model of the present invention.

[0021] Figure 2 Flowcharts of other embodiments of the training method of the traffic prediction model disclosed in the present invention.

[0022] Figure 3 The present invention is a flowchart of some embodiments of the training method of the traffic prediction model disclosed in the present invention.

[0023] Figure 4A -B is a schematic diagram of some embodiments of the second prediction model in the training method of the traffic prediction model disclosed in the present invention.

[0024] Figure 5A -B is a schematic diagram of the model effects of some other embodiments of the training method of the traffic prediction model disclosed in the present invention.

[0025] Figure 6 The flowcharts are of some embodiments of the traffic prediction method disclosed in the present invention.

[0026] Figure 7 Schematic diagrams of some embodiments of the model training device disclosed in the present invention.

[0027] Figure 8 Schematic diagrams of some embodiments of the traffic prediction device disclosed in the present invention.

[0028] Fig. 9 Schematic diagrams of some embodiments of the data processing device disclosed herein.

[0029] Fig.10 Schematic diagrams of other embodiments of the data processing device disclosed in the present invention. DETAILED DESCRIPTION

[0030] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments.

[0031] The flowcharts of some embodiments of the training method of the traffic prediction model disclosed in the present invention are as follows: Figure 1 shown.

[0032] In step 110, traffic training sample data is obtained. The traffic training sample data may be extracted from historical data, such as real traffic data that has been generated in a predetermined format. In some embodiments, the traffic training sample data may be arranged in time from the earliest to the latest time of the traffic generation moment. In some embodiments, the traffic training sample data may be data within a continuous time.

[0033] In some embodiments, after extracting traffic data from historical data, the traffic data can be padded and cleaned as traffic training sample data, so that the traffic training sample data conforms to a predetermined format, thereby increasing the amount of information that the traffic training sample data can provide for model training.

[0034] In step 120, model parameters of the first prediction model are determined, and the model parameters include model structure type parameters, holiday characteristic parameters and seasonal parameters.

[0035] In some embodiments, the first prediction model comprises a prophet model.

[0036] In some embodiments, the model structure types may include linear model types and logistic regression growth models. In some embodiments, considering that the traffic data is time series data and there is no prior knowledge to refer to, a linear model is used.

[0037] In some embodiments, the degree of holiday characteristics of the traffic training sample data is predetermined. Holiday characteristics refer to the difference between traffic data on holidays and weekdays exceeding a predetermined threshold. For example, the traffic data in an area where office spaces are concentrated has relatively strong holiday characteristics, while the traffic data in an area where office spaces and residential areas are included has relatively weak holiday characteristics. The holiday characteristic parameter value is determined based on the predetermined relationship between the degree of holiday characteristics and the holiday characteristic parameter item in the first prediction model.

[0038] In some embodiments, it is predetermined whether the flow training sample data has seasonal characteristics. The seasonal characteristics refer to the difference of flow data in different seasons exceeding a predetermined threshold. The seasonal characteristic parameter value is determined based on the predetermined relationship between whether the seasonal characteristics exist and the seasonal characteristic parameter item in the first prediction model.

[0039] The initial configuration of the first prediction model is completed through step 120. Further, the model training operation is performed using the sample data obtained in step 110. The traffic training sample data is input into the first prediction model one by one, and step 131 is performed.

[0040] In step 131, the first prediction model generates a first training prediction result according to the traffic training sample.

[0041] In step 132, a training residual value is obtained according to the traffic training sample data and the corresponding first training prediction result.

[0042] In some embodiments, the difference between the first training prediction result and the corresponding traffic training sample data can be used as a training residual value.

[0043] In step 133, the training residual value is input into the second training prediction model. The second training prediction model generates a second training prediction result according to the training residual value. In some embodiments, the second prediction model includes a dilated convolution and a bidirectional long short-term memory (LSTM) model.

[0044] During the training process, the first prediction model and the second prediction model will be modified according to the second training prediction result.

[0045] In step 134, it is determined whether the training is completed. In some embodiments, the amount of traffic training sample data can be used to control the end of training, for example, the training ends when the traffic training sample data is used up. In some embodiments, the degree of convergence of the model can be determined by the loss function of the model, and when the degree of convergence is greater than a predetermined convergence threshold, it is determined that the model training ends.

[0046] If the training is completed, a traffic prediction model is obtained. In some embodiments, the traffic prediction model may include a first prediction model and a second prediction model that have been trained, and a residual value calculation unit between the first and second prediction models.

[0047] If the training is not completed, return to step 131 and input the next traffic training sample data into the first prediction model.

[0048] Based on the method in the embodiment shown above, the trend characteristics, periodic characteristics and holiday characteristics of the traffic data can be utilized, which improves the pertinence and accuracy of the information utilization in the sample data, and improves the accuracy and convergence efficiency of the model; the residual terms are reused to improve the prediction accuracy of the model, and correct the parts with poor prediction effects, which is conducive to improving the prediction accuracy when the model is used for prediction in the future.

[0049] In some embodiments, after the training is completed, the model can be verified first. If the verification passes, it can be put into use. If the verification fails, the training continues to avoid affecting the stability of production.

[0050] Flow charts of other embodiments of the training method of the traffic prediction model disclosed in the present invention are as follows: Figure 2 Based on the above Figure 1 In the embodiment shown in the figure, after completing the training, execute the following Figure 2 Operation in the illustrated embodiment.

[0051] In step 241, traffic verification sample data is obtained. The traffic verification sample data can be extracted from historical data, such as real traffic data that has been generated in a predetermined format. In some embodiments, the traffic verification sample data can be arranged in time from the earliest to the latest time according to the time when the traffic was generated. In some embodiments, the traffic verification sample data can be data in a continuous time.

[0052] In some embodiments, after extracting traffic data from historical data, the traffic data can be padded and cleaned as traffic verification sample data, so that the traffic verification sample data conforms to a predetermined format, thereby increasing the amount of information that the traffic verification sample data can provide for model training.

[0053] In some embodiments, a predetermined amount of traffic sample data can be obtained and then divided into two parts: traffic training sample data and traffic verification sample data, wherein the amount of traffic training sample data is greater than the amount of traffic verification sample data, thereby reducing the steps of repeatedly acquiring sample data and improving the convenience of data acquisition.

[0054] In step 242, the traffic verification sample data is input into the first prediction model, and the first prediction model obtains a first verification prediction result based on the traffic verification sample.

[0055] In step 243, a verification residual value is obtained according to the flow verification sample data and the corresponding first verification prediction result. In some embodiments, the difference between the first verification prediction result and the corresponding flow verification sample data is used as the verification residual value.

[0056] In step 244, the verification residual value is input into the second prediction model, and the second prediction model obtains a second verification prediction result based on the verification residual value.

[0057] In step 245, a flow verification prediction value is determined according to the first verification prediction result and the second verification prediction result. In some embodiments, the sum of the first verification prediction result and the second verification prediction result is calculated as the flow verification prediction value.

[0058] In step 250, a model evaluation value is determined based on the flow verification prediction value and historical data.

[0059] In some embodiments, at least one of the root mean square error, mean absolute error, mean absolute percentage error, and accuracy parameter is obtained as a model evaluation value based on the traffic verification prediction value and historical data. In some embodiments, a threshold of the model evaluation value can be set. If the threshold requirement is met, such as the root mean square error is less than a predetermined root mean square error threshold, the mean absolute error is less than a predetermined verification residual value threshold, the mean absolute percentage error is less than the mean absolute percentage error threshold, and the accuracy parameter is greater than a predetermined accuracy parameter threshold, it is determined that the threshold requirement is met and the current traffic prediction model can be put into production. In some embodiments, if the threshold requirement is not met, including at least one model evaluation value not meeting the corresponding threshold requirement, the current traffic prediction model cannot be put into production and needs to be trained further.

[0060] Based on the method in the embodiment shown above, the trained model can be verified, and whether the requirements are met is determined by evaluating the predicted value, thereby improving the reliability of the model, which is conducive to improving the accuracy and reliability of subsequent traffic prediction using the model.

[0061] The flow chart of some embodiments of the training method of the traffic prediction model disclosed in the present invention is as follows: Figure 3 shown.

[0062] The time series traffic data of a branch of the operator is used as the basis of the sample data. Check whether the original traffic data is complete. If there is any missing data, fill and clean the original data. Furthermore, the prophet model is used for predictive analysis.

[0063] The Prophet algorithm decomposes the time series, which can not only process abnormal time series data but also fill and recover missing data. The Prophet model consists of four terms: trend term, cycle term, holiday term and error term, as shown in formula (1):

[0064] p(t)=g(t)+s(t)+h(t)+ε t (1)

[0065] g(t) represents the trend of change in non-periodic data; s(t) is the seasonal term of periodic change; h(t) represents the holiday term, which can be used to determine whether there is a holiday on that day; ε t represents the error term.

[0066] In some embodiments, the model structure used for the trend term g(t) is observed based on prior knowledge. Considering that there is no prior knowledge to refer to for the time series data of traffic extracted from the operator, a linear model is used, as shown in formula (2):

[0067] g(t)=k+a(t)+m+a(t)T γ (2)

[0068] In this formula, k represents the growth rate, m is the offset parameter, a(t) represents the translated step function, and γ is the adjustment factor.

[0069] The periodic term in s(t) can be used to simulate the periodicity of the time series using Fourier series, as shown in formula (3):

[0070]

[0071] In this formula, a n and b n is the data fitting term, P represents the time parameter, N is the period parameter, and n is an integer ranging from 1 to N. Determine whether the data has seasonality. If so, set the empirical coefficient in s(t).

[0072] According to the data characteristics, query whether it contains holiday features and input h(t). The holiday model is as follows:

[0073]

[0074] Among them, k obeys (0, v 2 ), the larger the value of v is, the greater the impact of holidays on the model.

[0075] Through the above operations, the initial configuration of the prophet model is completed.

[0076] Furthermore, the traffic training sample data is input into the prophet model to obtain the predicted value Y predict . Using the true value Y in the sample data true Get the residual term with the predicted value: Residuals = Y predict -Y true .

[0077] The residual sequence Residuals is used for modeling including dilated convolution and bidirectional LSTM, and the prediction results of dilated convolution and bidirectional LSTM are the residual prediction results Y of the residual term. Bi-LSTM .

[0078] In some embodiments, considering that in the process of extracting features from a neural network, the use of a pooling operation will expand the receptive field of the operation, and the dilated convolution can add many dilated positions, allowing the model to obtain a lot of related information, such as Figure 4A as shown in . Figure 4A (a) is a normal convolution, the size of the convolution kernel is 3x3, 4A(b) is a dilated convolution, the dilated convolution size is 1, and the receptive field of the convolution kernel is 7x7. Figure 4A(c) The number of atrous convolutions is 3, the receptive field becomes 7x7, and the receptive field of the convolution kernel increases to 15x15. By dilating the convolution, the receptive field of the model is expanded, which is beneficial to improving the prediction accuracy of the model.

[0079] In some embodiments, the dilated convolution structure is introduced into the bidirectional LSTM to effectively compensate for the gradient diffusion problem that occurs in the one-dimensional scale convolution. The Bi-LSTM network model is as follows: Figure 4B As shown: The Bi-LSTM module consists of three forward modules and three backward modules. front Get the forward hidden vector {h f1 ,h f2 ,h f3}, by LSTM behind Get the backward hidden vector {h b1 ,h b2 ,h b3}, the forward and backward features are combined to obtain: {[h f1 ,h b1 ],[h f2 ,h b2 ],[h f3 ,h b3 ]}, that is, fused to: η={h0,h1,h2}.

[0080] Furthermore, Y Bi-LSTM Feedback is given to the prophet model and the model containing dilated convolution and bidirectional LSTM to achieve model adjustment. The training process is repeated using different sample data to complete the training using sample data. After the training is completed, the prediction result is Y realpredict =Y predict +Y Bi-LSTM .

[0081] Through the method in the embodiment shown above, it is possible to capture the spatiotemporal domain features of the data based on the improved prophet algorithm and introduce a fusion of void convolution and bidirectional LSTM structure, solve the problem that the residual cannot be iterated again, and improve the prediction accuracy.

[0082] In some embodiments, the accuracy of the model trained in the present disclosure can be proved by experimental analysis. In some embodiments, at least one of RMSE (Root Mean Square Error), MAE (Mean Absolute Error), MAPE (Mean Absolute Percentage Error) and Accuracy can be used to evaluate the prediction effect of time series traffic data, and their expressions are as shown in Formulas 5, 6, 7 and 8 respectively:

[0083]

[0084]

[0085]

[0086]

[0087] Among them, x i is x′ i One of them is the predicted value, and the other is the corresponding true value. n is the number of data in the sequence, i is the data label, and i is an integer from 1 to n.

[0088] In order to verify the time efficiency of the model proposed in the present invention, ARIMA, SVR (Support Vector Regression), GRU (Gated Recurrent Unit) and LSTM algorithms are used for comparative analysis. The experimental results are shown in Table 1.

[0089] Table 1 Comparison of running time of each model

[0090]

[0091] As can be seen from Table 1, when the network parameters are the same, the training time and prediction time of the traffic prediction model in the present disclosure are the shortest. The network convergence time of the ARIMA algorithm, SVR, LSTM and GRU algorithms are all relatively long, and their convergence speed is not as fast as that of the traffic prediction model in the present disclosure. It can be seen that the traffic prediction model in the present disclosure has greatly improved the time efficiency and reduced the time complexity.

[0092] In order to analyze the high prediction accuracy of the traffic prediction model in this disclosure, performance tests and evaluations are carried out on real data sets and other algorithms. The experimental results are as follows: Figure 5A As shown, since ARIMA can only predict the linear part of the data, the prediction effect is the worst and the error is the largest. The SVR, GRU and LSTM models are feature extraction frameworks based on deep learning, and their prediction effects are in the middle. The traffic prediction model in the present disclosure has the highest prediction accuracy, and its prediction curve is closest to the actual presentation curve of the original traffic data, so it is confirmed that the traffic prediction model in the present disclosure has high prediction accuracy. By comparing with the prediction curve of the baseline model, it can be seen that the prediction curve of the traffic prediction model in the present disclosure has a significant improvement in the prediction effect at the point of traffic mutation, and the algorithm of the traffic prediction model in the present disclosure is more stable than the prediction results of the baseline model.

[0093] The average of the three experimental results of 20 minutes, 40 minutes and 60 minutes is taken. The obtained Accuracy data is shown in Table 2. The experimental results are shown in Figure 5B .

[0094] Table 2 Comparison of model prediction performance

[0095] 20min 40min 60min ARIMA 0.73 0.67 0.61 SVR 0.74 0.73 0.72 GRU 0.78 0.70 0.71 LSTM 0.80 0.75 0.74 Models in this disclosure 0.83 0.82 0.79

[0096] From Table 2 and Figure 5B It is observed that no matter the training time is 20min, 40min or 60min, the Accuracy values ​​of the traffic prediction model and algorithm in the present disclosure are higher than those of other models. Taking the data at 60min as an example, the model and algorithm proposed in the present invention are 29.5%, 9.4%, 11.2% and 6.7% higher than the Accuracy of ARIMA, SVR, GRU and LSTM respectively. This is because the hybrid model has a strong learning ability for time series, which shows that the accuracy of the traffic prediction model and algorithm in the present disclosure is generally good.

[0097] In some embodiments, after model training is performed based on any of the above-mentioned traffic prediction model training methods, a traffic prediction model is obtained, and the traffic prediction model may include a trained first prediction model, a second prediction model, and a residual calculation unit between the first and second prediction models. Based on the traffic prediction model, the flowcharts of some embodiments of the traffic prediction method of the present disclosure are as follows: Figure 6 shown.

[0098] In step 601, current traffic data is obtained. In some embodiments, real-time traffic data of the area to be predicted may be obtained. In some embodiments, the current traffic data may be preprocessed, including data filling and cleaning, to improve the accuracy of subsequent predictions.

[0099] In step 602, the current traffic data is input into the first prediction model, and the current traffic data is processed by the first prediction model to obtain a prediction initial value. The first prediction model is a first prediction model generated after training by any one of the training methods described above in the present disclosure.

[0100] In step 603, a prediction residual value is obtained according to the current flow data and the prediction initial value. In some embodiments, the difference between the prediction initial value and the current flow data is calculated as the prediction residual value.

[0101] In step 604, the prediction residual value is input into the second prediction model, and the prediction residual value is processed by the second prediction model to obtain the prediction correction value. The second prediction model is a second prediction model generated after training by any one of the training methods described above in the present disclosure.

[0102] In step 604, a flow prediction value is obtained according to the prediction initial value and the prediction correction value. In some embodiments, the sum of the prediction initial value and the prediction correction value may be calculated as the flow prediction value.

[0103] Through the method in the above embodiment, the trend characteristics, periodic characteristics and holiday characteristics of the traffic data can be utilized, thereby improving the pertinence and accuracy of the use of information in the data; the residual items are reused to improve the prediction accuracy of the model, correct the parts with poor prediction effects, and improve the prediction accuracy.

[0104] Schematic diagrams of some embodiments of the model training device disclosed in the present invention are as follows Figure 7 shown.

[0105] The sample data acquisition unit 701 can acquire traffic training sample data. Acquire traffic training sample data. The traffic training sample data can be extracted from historical data, such as real traffic data that has been generated in a predetermined format. In some embodiments, the traffic training sample data can be arranged in time from the earliest to the latest time according to the time of the traffic generation moment. In some embodiments, the traffic training sample data can be data within a continuous time. In some embodiments, after the sample data acquisition unit 701 extracts traffic data from historical data, it can fill and clean the traffic data as traffic training sample data, so that the traffic training sample data conforms to the predetermined format, and the amount of information that the traffic training sample data can provide for model training is increased.

[0106] The parameter determination unit 702 can determine the model parameters of the first prediction model, and the model parameters include model structure type parameters, holiday characteristic parameters and seasonal parameters. In some embodiments, the first prediction model includes a prophet model. In some embodiments, the model structure type may include a linear model type and a logistic regression growth model. In some embodiments, considering that the traffic data is time series data and there is no prior knowledge to refer to, a linear model is used. In some embodiments, the degree of holiday characteristics of the traffic training sample data is predetermined. The holiday characteristic refers to that the difference between the traffic data on holidays and working days exceeds a predetermined threshold. For example, the traffic data in an area where office places are concentrated has a relatively strong holiday characteristic, and the traffic data in an area including office places and residential areas has a weaker holiday characteristic. According to the predetermined relationship between the degree of holiday characteristics and the holiday characteristic parameter item in the first prediction model, the holiday characteristic parameter value is determined. In some embodiments, it is predetermined whether the traffic training sample data has seasonal characteristics. The seasonal characteristic refers to that the difference between the traffic data in different seasons exceeds a predetermined threshold. According to the predetermined relationship between whether there is a seasonal characteristic and the seasonal characteristic parameter item in the first prediction model, the seasonal characteristic parameter value is determined.

[0107] The training unit 703 can perform the following operations for each piece of data in the traffic training sample data until the training is completed: the first prediction model generates a first training prediction result based on the traffic training sample; obtains a training residual value based on the traffic training sample data and the corresponding first training prediction result; and generates a second training prediction result based on the training residual value with the second training prediction model, wherein the first prediction model and the second prediction model are corrected according to the second training prediction result.

[0108] Such a model training device can utilize the trend characteristics, periodic characteristics and holiday characteristics of traffic data, improve the pertinence and accuracy of the use of information in the sample data, and improve the accuracy and convergence efficiency of the model; reuse the residual terms to improve the prediction accuracy of the model, and correct the parts with poor prediction effects, which is conducive to improving the prediction accuracy when the model is used for prediction in the future.

[0109] In some embodiments, Figure 7 As shown, the model training device also includes a verification unit 704, which can verify the accuracy of the trained model after the training is completed. In some embodiments, the verification unit 704 can obtain traffic verification sample data, the first prediction model obtains a first verification prediction result based on the traffic verification sample, obtains a verification residual value based on the traffic verification sample data and the corresponding first verification prediction result, uses the second prediction model to obtain a second verification prediction result based on the verification residual value, and determines the traffic verification prediction value based on the first verification prediction result and the second verification prediction result; further, the verification unit determines the model evaluation value based on the traffic verification prediction value and historical data. In some embodiments, the verification unit 704 can be based on Figure 2 The method in any of the embodiments shown completes model verification.

[0110] Such a model training device can verify the trained model and determine whether it meets the requirements by evaluating the predicted value, thereby improving the reliability of the model, which is conducive to improving the accuracy and reliability of subsequent traffic prediction using the model.

[0111] Schematic diagrams of some embodiments of the flow prediction device disclosed in the present invention are as follows Figure 8 shown.

[0112] The flow acquisition unit 801 can acquire current flow data;

[0113] The prediction unit 802 can process the current flow data through the first prediction model to obtain the prediction initial value; obtain the prediction residual value based on the current flow data and the prediction initial value; process the prediction residual value through the second prediction model to obtain the prediction correction value; and obtain the flow prediction value based on the prediction initial value and the prediction correction value, wherein the first prediction model and the second prediction model are generated by training according to any one of the flow prediction model training methods mentioned above.

[0114] In some embodiments, the flow prediction device can be based on the above Figure 6 Any one of the methods in the illustrated embodiments completes traffic prediction.

[0115] Such a traffic prediction device can utilize the trend characteristics, periodic characteristics and holiday characteristics of traffic data, improve the pertinence and accuracy of the use of information in the data; reuse the residual terms to improve the prediction accuracy of the model, correct the parts with poor prediction effects, and improve the prediction accuracy.

[0116] A structural diagram of an embodiment of the data processing device disclosed in the present invention is shown in FIG. Fig. 9 As shown. The data processing device includes a memory 901 and a processor 902. Among them: the memory 901 can be a disk, a flash memory or any other non-volatile storage medium. The memory is used to store the instructions in the corresponding embodiments of the training method of the traffic prediction model or the traffic prediction method mentioned above. The processor 902 is coupled to the memory 901 and can be implemented as one or more integrated circuits, such as a microprocessor or a microcontroller. The processor 702 is used to execute the instructions stored in the memory, which can improve the prediction accuracy of the model.

[0117] In one embodiment, it is also possible to Fig.10 As shown, the data processing device 1000 includes a memory 1001 and a processor 1002. The processor 1002 is coupled to the memory 1001 via a BUS 1003. The data processing device 1000 can also be connected to an external storage device 1005 via a storage interface 1004 to call external data, and can also be connected to a network or another computer system (not shown) via a network interface 1006. No detailed description will be given here.

[0118] In this embodiment, the accuracy of model prediction can be improved by storing data instructions in a memory and processing the instructions through a processor.

[0119] In another embodiment, a computer-readable storage medium stores computer program instructions thereon, which, when executed by a processor, implement the training method of a traffic prediction model or the steps of the method in the corresponding embodiment of the traffic prediction method. Those skilled in the art should understand that the embodiments of the present disclosure may be provided as methods, devices, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable non-transitory storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0120] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0123] So far, the present disclosure has been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.

[0124] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

[0125] It should be noted that the terms "first", "second", etc. in the specification, claims, and drawings of the present disclosure are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present disclosure rather than to limit it. Although the present disclosure has been described in detail with reference to the preferred embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present disclosure can still be modified or some technical features can be replaced by equivalents without departing from the spirit of the technical solution of the present disclosure, which should be included in the scope of the technical solution for protection of the present disclosure.

Claims

1. A method for training a traffic prediction model, comprising: Obtain traffic training sample data; Determining model parameters of the first prediction model, wherein the model parameters include model structure type parameters, holiday characteristic parameters and seasonal parameters; and For each piece of data in the traffic training sample data, perform the following operations until the training is completed: The first prediction model generates a first training prediction result according to the traffic training sample; Obtaining a training residual value according to the traffic training sample data and the corresponding first training prediction result; and The second training prediction model generates a second training prediction result according to the training residual value, wherein the first prediction model and the second prediction model are modified according to the second training prediction result.

2. The training method according to claim 1, wherein: The training method meets at least one of the following requirements: The first prediction model comprises a prophet model; or The second prediction model includes dilated convolution and bidirectional long short-term memory (LSTM) model.

3. The training method according to claim 2, wherein: Determining the model parameters of the first prediction model includes: Determining that the first prediction model adopts a linear model type; Determining the holiday characteristic parameters according to the holiday characteristic degree of the traffic training sample data; and The seasonal parameter is determined according to whether the traffic training sample data has seasonal characteristics.

4. The training method according to claim 1, wherein: The obtaining of the training residual value according to the traffic training sample data and the corresponding first training prediction result comprises: The difference between the first training prediction result and the corresponding traffic training sample data is obtained as the training residual value.

5. The training method according to claim 1, wherein: The obtaining of flow training sample data includes: Extracting traffic data from historical data; The flow data is padded and cleaned to serve as the flow training sample data.

6. The training method according to claim 1, further comprising: After completing the training, Obtain traffic verification sample data; The first prediction model obtains a first verification prediction result according to the traffic verification sample; Obtaining a verification residual value according to the flow verification sample data and the corresponding first verification prediction result; The second prediction model obtains a second verification prediction result according to the verification residual value; Determine a flow verification prediction value according to the first verification prediction result and the second verification prediction result; and A model evaluation value is determined based on the flow verification prediction value and historical data.

7. The training method according to claim 6, wherein: Determining the flow verification prediction value according to the first verification prediction result and the second verification prediction result includes: Obtain the sum of the first verification prediction result and the second verification prediction result as the traffic verification prediction value.

8. The training method according to claim 6, wherein: Determining the model evaluation value according to the traffic verification prediction value and historical data includes: At least one of a root mean square error, a mean absolute error, a mean absolute percentage error, and an accuracy parameter is obtained as the model evaluation value according to the flow verification prediction value and historical data.

9. A flow prediction method, comprising: Get current traffic data; Processing the current flow data through a first prediction model to obtain a prediction initial value; Acquire a prediction residual value according to the current flow data and the prediction initial value; Processing the prediction residual value through a second prediction model to obtain a prediction correction value; and According to the prediction initial value and the prediction correction value, a flow prediction value is obtained, The first prediction model and the second prediction model are generated by training according to the training method of the traffic prediction model according to any one of claims 1 to 8.

10. A model training device, comprising: A sample data acquisition unit, configured to acquire flow training sample data; A parameter determination unit is configured to determine model parameters of the first prediction model, wherein the model parameters include model structure type parameters, holiday characteristic parameters and seasonal parameters; and The training unit is configured to perform the following operations for each piece of data in the traffic training sample data until the training is completed: The first prediction model generates a first training prediction result according to the traffic training sample; Obtaining a training residual value according to the traffic training sample data and the corresponding first training prediction result; and The second training prediction model generates a second training prediction result according to the training residual value, wherein the first prediction model and the second prediction model are modified according to the second training prediction result.

11. The training device according to claim 10, further comprising: The validation unit is configured to, after training, Obtain traffic verification sample data; The first prediction model obtains a first verification prediction result according to the traffic verification sample; Obtaining a verification residual value according to the flow verification sample data and the corresponding first verification prediction result; The second prediction model obtains a second verification prediction result according to the verification residual value; Determine a flow verification prediction value according to the first verification prediction result and the second verification prediction result; and A model evaluation value is determined based on the flow verification prediction value and historical data.

12. A flow prediction device, comprising: A flow acquisition unit, configured to acquire current flow data; and The prediction unit is configured as: Processing the current flow data through a first prediction model to obtain a prediction initial value; Acquire a prediction residual value according to the current flow data and the prediction initial value; Processing the prediction residual value through a second prediction model to obtain a prediction correction value; and According to the prediction initial value and the prediction correction value, a flow prediction value is obtained, The first prediction model and the second prediction model are generated by training according to the training method of the traffic prediction model according to any one of claims 1 to 8.

13. A data processing device, comprising: Memory; as well as A processor coupled to the memory, the processor being configured to execute the method according to any one of claims 1 to 9 based on instructions stored in the memory.

14. A non-transitory computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Prediction method, device, electronic equipment and computer readable storage medium

    CN110400010A

  • Prophet-DCRNN traffic flow prediction method fusing multi-modal information

    CN113066288A

  • Website page view prediction method and system based on LSTM-prophet

    CN113949644A

  • Network traffic prediction method and device and computer readable storage medium

    CN114726745A

  • Festival and holiday passenger flow volume prediction method

    CN116205329A