Road freight turnover prediction method and system based on double-model combination
Through the GM(1,1)-ARIMA dual-model combination prediction method, the data fluctuation and instability problems of road freight turnover prediction in the prior art are solved, and higher prediction accuracy and robustness are achieved, suitable for complex freight data characteristics.
Patent Information
- Application Number
- CN202411854087.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-12-17
AI Technical Summary
The existing highway freight turnover forecasting model has problems such as large data demand, strict application conditions, overfitting, difficult parameter selection, high computational complexity, high fusion difficulty, insufficient prediction stability, and difficult prediction. It is difficult to adapt to the highway freight turnover forecasting. Problems with long periods, high data volatility and obvious uncertainty characteristics.
Using the dual-model combination prediction method based on GM(1,1)-ARIMA, data fluctuations are detected through the Z-fraction method and trend correction method, outliers are identified and removed, outliers are predicted using the GM(1,1) model to form optimization The sequence is then input into the ARIMA model for prediction, combining the advantages of the two models to improve the prediction accuracy.
It significantly improves the prediction accuracy, reduces mean square error and average absolute error, enhances the stationarity and robustness of the data, and is suitable for areas with missing freight data and many outliers, providing more reliable transportation forecast results.
Smart Images

Figure CN119313393A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of highway freight prediction, and in particular to a highway freight turnover prediction method and system based on a dual-model combination. Background Art
[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.
[0003] Highway transport volume is a physical quantity indicator that reflects the transportation production situation. It is generally measured by two indicators: transport volume and turnover. Among them, highway freight turnover refers to the sum of the product of the number of goods actually transported by a means of transport and its corresponding transportation distance in a certain period of time. It takes into account factors such as the number of transport objects and transportation distance, and can fully reflect the results of transportation production. Highway freight turnover forecasting is crucial to support highway transportation planning and investment decisions and ensure the efficient operation of the transportation system.
[0004] The existing highway transport volume forecasting methods mainly include single forecasting models based on time series, grey system, regression analysis, neural network, Kalman filter, etc., which use transport statistics as dependent variables to determine the fitting coefficient and verify the fitting accuracy. Although the prediction of a single model is simpler and easier to understand, it is difficult to achieve a good comprehensive effect in practical applications. For example, the prediction accuracy of the GM (1,1) model will drop significantly when the data volume is large; the ARIMA model has strict stationarity requirements on the data and is highly sensitive to outliers or outliers, which leads to poor accuracy of the single forecasting model.
[0005] In order to overcome the shortcomings of a single model, a combined prediction method has emerged. For example, the establishment of a GM (1,1)-MLP neural network model for grain production prediction can obtain higher prediction accuracy, but the stability of grain production data is relatively good, and the requirements for the prediction method are relatively low; the method of using the CEEMDAN-SE-LSSA-GRU combined model to predict short-term traffic flow fully exploits the nonlinear characteristics of traffic flow data, reduces the prediction error, and can well reflect the trend and law of traffic flow changes. However, this method only has good performance for short-term predictions. As the prediction time increases, its prediction accuracy decreases rapidly; the highway traffic volume combined prediction model based on the difference autoregressive integrated moving average model (ARIMA model) and the long short-term memory network (LSTM) takes into account the linear and nonlinear characteristics of traffic volume, etc., and has a certain improvement in prediction accuracy compared to a single model, but the ARIMA model has high requirements for data stability, and the training process of the LSTM model is complex and time-consuming, and is sensitive to parameter adjustments.
[0006] In summary, some research has been carried out on time series prediction in the field of road transportation, but most of the existing prediction models have problems such as large data demand, strict application conditions, overfitting, difficulty in parameter selection, high computational complexity, high fusion difficulty, insufficient prediction stability and low practicality. They are difficult to adapt to the prominent problems of road freight turnover prediction, such as long prediction cycle, large data volatility and obvious uncertainty characteristics. Summary of the invention
[0007] In order to solve the above problems, the present disclosure proposes a highway freight turnover prediction method and system based on a dual-model combination, constructs a combined prediction model based on GM(1,1)-ARIMA, and utilizes the high tolerance, simple calculation and advantage of the GM(1,1) model in solving uncertainty problems to meet the requirements of the ARIMA model for data stability and pure randomness, thereby improving the prediction accuracy. The basic idea is to use the unique characteristics of the GM(1,1) model and the ARIMA model to capture the characteristics of highway freight turnover data to improve the prediction accuracy.
[0008] According to some embodiments, the present disclosure adopts the following technical solutions: The highway freight turnover prediction method based on the dual-model combination includes: Obtain historical freight turnover as basic data; Use the Z-score method and trend correction method to detect data fluctuations on the basic data, set fluctuation thresholds, identify outliers based on the fluctuation thresholds, and remove outliers; Obtain the freight turnover volume of the historical set time period of the outlier value, construct an initial sequence, perform a level ratio test on the initial sequence, accumulate the initial sequence once after the test to generate a new sequence, use the GM (1,1) model to inversely calculate the new sequence to obtain the predicted value corresponding to the outlier value, realize the prediction of the outlier value, and use the obtained predicted value to replace the corresponding outlier value in the basic data to form a data optimization sequence; The data optimization sequence is input into the ARIMA model to predict the freight turnover data for the future set time period.
[0009] According to some embodiments, the present disclosure adopts the following technical solutions: Highway freight turnover prediction system based on dual model combination, including: Data acquisition module, used to obtain historical freight turnover as basic data; An outlier acquisition module is used to detect data fluctuations on the basic data using the Z-score method and the trend correction method, set a fluctuation threshold, identify outliers according to the fluctuation threshold, and remove outliers; The outlier optimization module is used to obtain the freight turnover volume of the outlier historical set time period, construct an initial sequence, perform a level ratio test on the initial sequence, accumulate the initial sequence once after the test to generate a new sequence, use the GM (1,1) model to inversely calculate the new sequence to obtain the predicted value corresponding to the outlier, realize the prediction of the outlier, and use the obtained predicted value to replace the corresponding outlier in the basic data to form a data optimization sequence; The target prediction module is used to input the data optimization sequence into the differential autoregressive moving average model ARIMA to predict the freight turnover data for a set time period in the future.
[0010] According to some embodiments, the present disclosure adopts the following technical solutions: A non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the highway freight turnover prediction method based on a dual-model combination is implemented.
[0011] According to some embodiments, the present disclosure adopts the following technical solutions: An electronic device comprises: a processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device implements the road freight turnover prediction method based on the dual-model combination.
[0012] Compared with the prior art, the present invention has the following beneficial effects: The highway freight turnover prediction method based on the dual-model combination disclosed in the present invention adopts the Z-score method and the trend correction method to detect the abnormal fluctuations generated by the data set. According to the characteristics of the method, the fluctuation thresholds are set respectively, and the abnormal data in the freight turnover are identified. The abnormal values are corrected by the grey GM (1,1) model; finally, the optimized data set is predicted by the differential autoregressive moving average model ARIMA.
[0013] The highway freight turnover prediction method based on the dual-model combination disclosed in the present invention takes advantage of the high efficiency of the GM (1,1) model prediction in solving uncertainty problems with short-term predictions of little data and little information, the accuracy and flexibility of the ARIMA model prediction, and the advantages of the two models under different sample sizes. Through the joint processing of the dual models, the stability of the data is improved while ensuring the pure randomness of the data. Compared with the existing transportation volume prediction model, the mean square error value and the mean absolute error value of the combined model are significantly reduced, the determination coefficient is also closer to 1, and the prediction accuracy is significantly improved.
[0014] Although the highway freight turnover prediction method based on dual-model combination disclosed in the present invention applies two different models, both the GM (1,1) and ARIMA models are simple to calculate, the dual-model application does not add any complex steps, and the combined model maintains efficient prediction performance, which is convenient for rapid application in practice in the future.
[0015] The highway freight turnover prediction method based on the dual-model combination disclosed in the present invention can more comprehensively capture the inherent laws of freight turnover time series data, and can provide more reliable prediction results for traffic forecasting in highway traffic planning, investment decision-making and other processes.
[0016] The highway freight turnover prediction method based on the dual model combination disclosed in the present invention has strong robustness. The method can not only grasp the overall trend of the prediction but also take into account the stability of the prediction by optimizing the data set. It has better applicability and flexibility when predicting highway freight turnover in areas where freight data is missing and there are many outliers.
[0017] The highway freight turnover prediction method based on the dual-model combination disclosed in the present invention will provide a better way to predict transportation indicators with similar data characteristics in processes such as highway traffic planning and investment decision-making. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings constituting a part of the present disclosure are used to provide a further understanding 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.
[0019] Figure 1 A schematic diagram of the data processing method architecture of an embodiment of the present disclosure; Figure 2 Comparison of replaced data and original data in the embodiment of the present disclosure; Figure 3 It is the ACF diagram of the first-order difference sequence of the optimized data of the embodiment of the present disclosure; Figure 4 It is the PACF diagram of the first-order difference sequence of the optimized data of the embodiment of the present disclosure; FIG5 is a time series diagram of optimized data according to an embodiment of the present disclosure; Figure 6 The change trend of highway freight turnover in a certain province from 2016 to 2019 in the embodiment of the present disclosure; Figure 7 This is the changing trend of highway freight turnover in a certain province from January 2016 to December 2019 according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0020] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.
[0021] It should be noted that the following detailed descriptions are all illustrative and are intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present disclosure belongs.
[0022] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present disclosure. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0023] Example 1 In one embodiment of the present disclosure, a method for predicting highway freight turnover based on a dual-model combination is provided, comprising the following steps: Step 1: Obtain historical freight turnover as basic data; Step 2: Use the Z-score method and trend correction method to detect data fluctuations on the basic data, set a fluctuation threshold, identify outliers based on the fluctuation threshold, and remove outliers; Step 3: Obtain the freight turnover volume of the historical set time period of the outlier value, and construct an initial sequence, perform a level ratio test on the initial sequence, accumulate the initial sequence once after the test to generate a new sequence, use the GM (1,1) model to inversely calculate the new sequence to obtain the predicted value corresponding to the outlier value, realize the prediction of the outlier value, and use the obtained predicted value to replace the corresponding outlier value in the basic data to form a data optimization sequence; Step 4: Input the data optimization sequence into the ARIMA model to predict the road freight turnover data for the future set time period.
[0024] As an embodiment, in the highway freight turnover prediction method based on the dual model combination disclosed in the present invention, a GM (1,1)-ARIMA combined model prediction method is proposed, which takes advantage of the high efficiency of the GM (1,1) model prediction in solving the uncertainty problem of short-term prediction with little data and little information and the accuracy and flexibility of the ARIMA model prediction, as well as the advantages of the two models under different sample sizes. Through the joint processing of the dual models, the data stability is improved while the pure randomness of the data is guaranteed; first, the Z score method and the trend correction method are used to detect abnormal fluctuations in the data set caused by natural factors, changes in market structure or unforeseen factors, etc. According to the characteristics of the method, the fluctuation thresholds are set respectively, and the abnormal data in the freight turnover are identified. The GM (1,1) model is used to correct the abnormal values, which can take into account the stability of the prediction by optimizing the data set. It has better applicability and flexibility when predicting highway freight turnover in areas where freight data is missing and there are many abnormal values. Finally, the differential autoregressive moving average model ARIMA is used to predict the optimized data set. The combined model maintains efficient prediction performance, which is convenient for rapid application in practice in the future. The specific process is as follows: Step 1: Obtain basic data and build a dataset Step 1.1 Data sources This paper selects the highway freight turnover of a province from January 2016 to December 2019 as the basic data, and obtains a total of 48 sets of monthly freight turnover data. The first 40 sets of data are the basic data of the model, and the next 8 sets are the prediction verification data.
[0025] Highway freight turnover is a typical time series data, which is affected by many external factors. Highway freight turnover in a certain province presents the following characteristics: 1) Annual highway freight turnover has grown steadily. From 2016 to 2019, the highway freight turnover of a certain province generally showed an increasing trend year by year, and the growth rate remained above 10%. Figure 6 shown.
[0026] 2) The monthly data has significant gray characteristics. The stability of the data can be judged by whether the mean and variance of the first-order difference sequence remain constant over time. This paper conducts first-order difference analysis on the monthly highway freight turnover of a province from January 2016 to December 2019 and finds that the data stability is poor and there are abnormal fluctuations, which reflects that the data has significant uncertainty and incompleteness, that is, grayness, such as Figure 7 shown.
[0027] Step 2: Construct a GM(1,1)-ARIMA combined forecasting model and train the GM(1,1)-ARIMA combined forecasting model; Step 2.1 Before training the model, due to the instability of data fluctuations in the data set, it is necessary to obtain outliers. Outliers are values that have a greater impact on the stability of the data. When applying the ARIMA model to predict data containing outliers, it is difficult to capture changes in data points in a timely manner. Using data after replacing outliers will be more conducive to the differential integration of the ARIMA model, thereby improving the prediction accuracy.
[0028] Specifically, the present disclosure uses the Z-score method and the trend correction method to detect data fluctuations. The Z-score method is a statistical method that describes and measures the degree to which data deviates from the average value, and is used to represent the distance between each data point and the data set; the trend correction method is to determine the abnormal fluctuation value in the trend of time series data by analyzing the sequence after difference.
[0029] Among them, the Z-score method is first used to determine the data points that deviate from the preset Z-score threshold, and the data points that exceed the Z-score threshold are removed as outliers. The basic data after removing the outliers is converted into a first-order difference sequence, and then the first-order difference sequence is subjected to data fluctuation detection using the trend correction method. By setting the fluctuation threshold, the outliers are determined again and removed again.
[0030] Under normal circumstances, data points with Z scores between -1 and 1 account for more than 65% of the total, and data points between -3 and 3 account for more than 90% of the total. Data points outside the range of -3 to 3 are generally defined as outliers, but the data points with Z scores between -1.5 and 1.5 in the disclosed data account for 90% of the total. In addition, the ARIMA model has strict stationarity requirements for data and is highly sensitive to outliers or outliers, which will lead to poor accuracy of a single prediction model. Therefore, a more rigorous definition is required, so data points with Z scores between -1.5 and 1.5 are regarded as normal values, that is, the Z score threshold is ±1.5.
[0031] By analyzing the Z scores of the basic data, it can be found that the Z score outliers exceeding the threshold appeared in February 2017, April 2018, March 2019 and April 2019, as shown in Table 1.
[0032] Table 1 Z score outliers
[0033] After the Z-score method was used to detect and remove outliers, the first-order difference sequence was observed and found that the data fluctuations were still large. Therefore, the trend correction method was used to detect the original data again. To avoid excessive screening, the number of original data should be above 80%, so the fluctuation threshold was set to ±15, and the original data exceeding the threshold was regarded as outliers. The outliers are shown in Table 2.
[0034] Table 2 Trend correction outliers
[0035] The present disclosure uses the Z-score method and the trend correction method to detect data fluctuations. The Z-score method is a statistical method that describes and measures the degree to which data deviates from the average value, and is used to represent the distance between each data point and the data set; the trend correction rule is to determine the value of abnormal fluctuations in the trend of time series data by analyzing the sequence after differentiation; the present disclosure first uses the Z-score method to determine the data points that deviate from the preset Z-score threshold, removes the data points that exceed the Z-score threshold as outliers, converts the basic data after removing the outliers into a first-order difference sequence, and then uses the trend correction method to detect data fluctuations on the first-order difference sequence, and by setting the fluctuation threshold, determines the outliers again and removes them again. It can be obtained from Tables 1 and 2 that in this embodiment, a total of 12 outliers are detected and determined using the Z-score method and the trend correction method, which improves the stability of the data while ensuring the pure randomness of the data.
[0036] Step 2.2: Obtain the freight turnover volume of the historical set time period of the outlier value, construct an initial sequence, perform a level ratio test on the initial sequence, accumulate the initial sequence once after the test to generate a new sequence, use the GM (1,1) model to inversely calculate the new sequence to obtain the predicted value corresponding to the outlier value, realize the prediction of the outlier value, and use the obtained predicted value to replace the corresponding outlier value in the basic data to form a data optimization sequence; Specifically, for abnormal data appearing in time series data sets, commonly used processing methods include data cleaning, interpolation, and data integration. Among them, data cleaning has high technical requirements, and it is easy for normal data to be cleaned and the original regularity of the data to be lost; interpolation is more sensitive to data processing of large-scale samples, but has limited processing capabilities for abnormal values; data integration is more complex, and the transmission and processing of large amounts of data may affect the effect of integration. In order to avoid the adverse effects of conventional processing methods, the present disclosure introduces the GM (1,1) grey model to process abnormal data determined by data set fluctuation detection.
[0037] The ARIMA model has strict stationarity requirements for data and is highly sensitive to outliers or outliers, which leads to the defect of poor accuracy of a single prediction model. Therefore, it is necessary to introduce the GM(1,1) model to give full play to the high efficiency of the GM(1,1) model in short-term predictions with little data and little information, and combine it with the prediction accuracy and flexibility of the ARIMA model, and make full use of the advantages of the two models under different sample sizes. Joint processing improves data stationarity while ensuring pure randomness, thereby improving prediction accuracy. Taking advantage of the GM(1,1) model in short-term predictions with little sample data and little information, replacing the outliers in the time series with the GM(1,1) gray model prediction value can not only maintain the regularity of the original data series, but also reduce the volatility of the data, thereby improving prediction accuracy. The main method is to obtain the freight turnover in the adjacent set time period before the outlier, and use the freight turnover in the adjacent set time period before to predict the corresponding prediction value of the month where the outlier is located, and continuously cycle the prediction. The modeling steps are as follows: 1) The initial sequence is constructed using the freight turnover in the adjacent set time period before the outlier; Specifically, let the freight turnover from January 2016 to April 2019 be the initial sequence, recorded as ,but, (1) In the formula, For the ( , is a positive integer) freight turnover data.
[0038] 2) performing a level ratio test on the initial sequence; To ensure that the initial sequence meets the requirements of grey prediction, a level ratio test is required for the initial sequence before grey prediction. The principle of the level ratio test is to compare whether the ratio of two adjacent items in the initial sequence is a constant, that is, to determine whether the level ratio property is met. If the initial sequence meets the level ratio property, the grey prediction model can be used for prediction; otherwise, the data needs to be processed or other prediction methods need to be selected.
[0039] The formula for the grade ratio test is:
[0040] (2) In the formula, is the level ratio. Only when all the level ratios The model can only be established when all fall within the calculation range.
[0041] 3) Constructing a sequence of adjacent mean values To weaken The disturbance caused by instability is accumulated once (1-AGO) to generate a new sequence, which is recorded as .
[0042] (3) In the formula, ( ) represents the distance from the first data point to the t The cumulative value of each data point can be generated by accumulation to weaken the randomness of the original data and strengthen the regularity.
[0043] 4) Solving model parameters The GM(1,1) model assumes that the accumulated data sequence can be described by a first-order linear differential equation, expressed as: (4) In the formula, The development coefficient, also known as the growth rate, refers to the ratio of each item in the sequence to the previous item. This ratio reflects the development trend and speed of the sequence. It is the gray action, which reflects the changing relationship of the series.
[0044] Integrating the above formula yields: (5) In the formula, Can indicate any point in time The accumulated data value of is the initial accumulated data value, Indicates each time point, , For parameters whose values are yet to be determined, they can be determined using the least squares method.
[0045] 5) Use the GM(1,1) model to inversely calculate the new sequence to obtain the predicted value corresponding to the outlier, thus realizing the prediction of the outlier; The formula for calculating the predicted value of the original data is as follows: (6) In the formula, ( , is the number of backward predictions) is the predicted value. That is, the predicted value of the month where the abnormal data determined by the fluctuation detection of the data set is located.
[0046] Furthermore, the small probability error value P and the posterior difference ratio C are used to evaluate and analyze the predicted value and the actual value to verify the eligibility of the predicted value. The small probability error value P reflects the prediction accuracy of the model, that is, the degree of deviation between the model prediction value and the actual value. The larger the P value, the higher the proportion of the model prediction error within the acceptable range; the posterior difference ratio C reflects the stability and reliability of the model, that is, whether the volatility of the model prediction matches the volatility of the actual value. The smaller the C value, the higher the model prediction accuracy. The accuracy test standard is shown in Table 3.
[0047] Table 3 Model accuracy test level reference table
[0048] The prediction results of the GM(1,1) model were evaluated. The results showed that the posterior difference ratio C of each outlier was less than 0.50, and the small probability error value P was greater than 0.7, indicating that the model accuracy met the requirements, as shown in Table 4.
[0049] Table 4 Comparison of outliers and GM(1,1) predictions
[0050] Therefore, the predicted values fitted by the GM(1,1) model can replace the abnormal data. Figure 2 shown.
[0051] The obtained predicted values are used to replace the corresponding abnormal values in the basic data to form a data optimization sequence.
[0052] Step 2.3 After the optimization of the basic data of freight turnover is completed, the data optimization sequence is used to predict the freight turnover data for the next 8 months through the ARIMA model. The ARIMA (p, d, q) model consists of an autoregressive model (AR), differential integration (I), and a moving average model (MA). p is the autoregressive term, d is the number of differences made until the time series becomes stationary, q is the number of moving average items. The formula is as follows: (7) In the formula, is time series data; is a constant term; it can be obtained by difference; is the autoregressive coefficient, used to fit the past The autoregressive relationship of the period; is the moving average coefficient, used to fit the past The moving average relationship between the period; is a white noise series; is the error term.
[0053] The training steps of the ARIMA model are as follows: 1) Stationarity test. Perform a stationarity test on the optimized data sequence. If the stationarity condition is not met, differential analysis is required to process the data for stationarity and determine the optimal parameters. d .
[0054] Stationarity is a prerequisite for establishing an ARIMA model. Non-stationary time series have a mean and variance that change over time, which does not meet the assumptions of the ARIMA model. The ADF (Augmented Dickey-Fuller, denoted as ADF) test is used to determine the T test results and the significant P value. When the T value is less than the critical value of rejecting the null hypothesis to varying degrees and P<0.05, it indicates that the original sequence can very well reject the null hypothesis, that is, the original sequence is a stationary sequence. If the original sequence is judged to be non-stationary, differential analysis is required to perform stability processing on the data, and then the Akaike Information Criterion (denoted as AIC) is used to evaluate the goodness of fit of the model and select the best. AIC penalizes the complexity of the model and is suitable for models with fewer parameters and simpler models. The lower the AIC value, the better the model fit. The test results are shown in Table 5.
[0055] Table 5 ADF inspection table
[0056] From the ADF test results, we can see that the T value of the original sequence is greater than the critical value, and P>0.05, so the optimized data set sequence is determined to be a non-stationary sequence, so stability processing is performed on it. After comparing and analyzing the first-order difference sequence and the second-order difference sequence, the first-order difference sequence with a lower AIC value is selected as the best difference sequence to determine d The value is 1.
[0057] 2) Model identification and estimation. Perform autocorrelation function (ACF) and partial autocorrelation function (PACF) analysis on the stationary series; determine the optimal parameters p , q , and observe the model fitting effect.
[0058] After taking the first-order difference of the optimized data set sequence, analyze the ACF and PACF graphs to check its truncation and tailing conditions and determine p , qACF is a statistic that measures the correlation between a time series and itself at different lags. The autocorrelation coefficient ranges from -1 to 1. If the time series is independent, then ACF will drop rapidly to 0. PACF is a statistic that measures the partial correlation between a time series and itself at different lags. If the partial autocorrelation coefficient suddenly drops to 0 after a certain lag, it indicates that the model may have an autoregressive component. The results are as follows Figure 3 , Figure 4 shown.
[0059] According to the judgment conditions shown in Table 6, it can be judged that the ACF graph is a 3rd order tail and the PACF graph is a 0th order tail. p The value is equal to 0, q The value is equal to 3.
[0060] Table 6 Parameters p , q And the judgment conditions of the model
[0061] By observing the ACF and PACF graphs, it can be found that there is no significant seasonality in the lagged peak, so the seasonal factor is eliminated and no seasonal analysis is performed. p , d , q The three best parameter values determine that the model is ARIMA (0,1,3), and the fitting effect is as follows Figure 5 shown.
[0062] 3) Model testing: After the final model is selected, the residual white noise test can still be carried out using the ACF and PACF graphs.
[0063] After selecting the final model, it is necessary to perform a white noise test on the residual sequence after model fitting in order to confirm whether the residual sequence is a white noise sequence. A white noise sequence means that each value in the sequence is random and independent of each other, with a constant variance and a mean of zero. The residual white noise test disclosed in this disclosure adopts the ACF and PACF graph test method. By analyzing the residual ACF graph and PACF graph of the final model fitting, it can be obtained that all the autocorrelation coefficients in the residual ACF graph are within the confidence interval and gradually approach 0; similarly, in the residual PACF graph, the partial autocorrelation coefficient also approaches 0, so the model residual sequence is a white noise sequence, and the constructed ARIMA (0,1,3) model better captures the regularity in the data.
[0064] 4) Model prediction.
[0065] The ARIMA (0,1,3) model is used to predict the freight turnover from May to December 2019. The results are shown in Table 7.
[0066] Table 7 Prediction results of combined model
[0067] Computational evaluation In order to compare with the prediction results of the above-mentioned GM(1,1)-ARIMA combined model, the present disclosure calculates the prediction results of a single ARIMA model, and comprehensively evaluates the prediction results of the single model and the combined model respectively using commonly used indicators for evaluating model performance.
[0068] 1. Single ARIMA model prediction results The monthly freight turnover data of a province from January 2016 to April 2019 was used for single ARIMA model forecasting. The optimal model was determined to be ARIMA (0,1,0) through ADF stationarity test, ACF and PACF graph identification, and residual white noise test, and the freight turnover from May to December 2019 was forecasted, and the results are shown in Table 8.
[0069] Table 8 Prediction results of single ARIMA model
[0070] 2. Evaluation indicators By comparing the prediction results of the combined model in Table 7 with the prediction results of the single ARIMA model in Table 8, it is found that the prediction results of the combined model are closer to the actual value. In order to further analyze the prediction results of the model, this disclosure simultaneously selects Mean Absolute Error (MAE), Mean Squared Error (MSE) and Coefficient of Determination (R²) as evaluation indicators to comprehensively evaluate the model, provide information on model performance from different angles, and make up for the limitations of a single indicator.
[0071] 2.1 Mean Square Error The mean square error is a commonly used indicator to measure the accuracy of model prediction. It can capture the volatility of prediction errors. The calculation formula is as follows: (8) In the formula, is the number of data points; It is Actual values; It is The smaller the mean square error, the smaller the difference between the model's predicted value and the actual observed value, that is, the better the model's fit.
[0072] 2.2 Mean Absolute Error The mean absolute error measures the accuracy of the model by calculating the average of the absolute values of the differences between the predicted values and the actual values. It describes the average size of the prediction error. The calculation formula is as follows: (9) The smaller the value of, the higher the prediction accuracy of the model. However, this indicator does not consider the direction of the error, so the mean absolute error is less sensitive to outliers than the mean square error.
[0073] 2.3 Coefficient of determination The coefficient of determination is an indicator of the goodness of fit of the regression model and provides a measure of the explanatory power of the model. The calculation formula is as follows: (10) (11) (12) Where SST is the total sum of squares, SSE is the residual sum of squares, and the value of R² is between 0 and 1. The closer it is to 1, the stronger the explanatory power of the model, that is, the closer the predicted value is to the actual value.
[0074] 3. Evaluation results The evaluation index results of the ARIMA model and the GM(1,1)-ARIMA combined model are calculated respectively, and the comparison is shown in Table 9.
[0075] Table 9 Model comparison parameters
[0076] The analysis results show that compared with the single model, the average absolute error and mean square error of the GM(1,1)-ARIMA combined model prediction results are significantly reduced, and the determination coefficient is closer to 1, indicating that the GM(1,1)-ARIMA combined model performs well in fitting data and predicting future values. The GM(1,1)-ARIMA combined model for predicting freight turnover fully utilizes the advantages of the GM(1,1) model and the ARIMA model, improving the adaptability of the model and the reliability of the prediction results.
[0077] Example 2 In one embodiment of the present disclosure, a highway freight turnover prediction system based on a dual-model combination is provided, comprising: Data acquisition module, used to obtain historical freight turnover as basic data; An outlier acquisition module is used to detect data fluctuations on the basic data using the Z-score method and the trend correction method, set a fluctuation threshold, identify outliers according to the fluctuation threshold, and remove outliers; The outlier optimization module is used to obtain the freight turnover volume of the outlier historical set time period, construct an initial sequence, perform a level ratio test on the initial sequence, accumulate the initial sequence once after the test to generate a new sequence, use the GM (1,1) model to inversely calculate the new sequence to obtain the predicted value corresponding to the outlier, realize the prediction of the outlier, and use the obtained predicted value to replace the corresponding outlier in the basic data to form a data optimization sequence; The target prediction module is used to input the data optimization sequence into the differential autoregressive moving average model ARIMA to predict the freight turnover data for a set time period in the future.
[0078] Example 3 In one embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the road freight turnover prediction method based on the dual-model combination is implemented.
[0079] Example 4 In one embodiment of the present disclosure, an electronic device is provided, including: a processor, a memory, and a computer program; wherein the processor is connected to the memory, and the computer program is stored in the memory. When the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device executes the road freight turnover prediction method based on the dual-model combination.
[0080] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the 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 generate 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.
[0081] 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 A step that specifies a function in one or more boxes.
[0082] Although the above describes the specific implementation methods of the present disclosure in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present disclosure. Technical personnel in the relevant field should understand that on the basis of the technical solution of the present disclosure, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present disclosure.
Claims
1. A highway freight turnover prediction method based on a dual-model combination, characterized in that: include: Obtain historical freight turnover as basic data; Use the Z-score method and trend correction method to detect data fluctuations on the basic data, set fluctuation thresholds, identify outliers based on the fluctuation thresholds, and remove outliers; Obtain the freight turnover volume of the historical set time period of the outlier value, construct an initial sequence, perform a level ratio test on the initial sequence, accumulate the initial sequence once after the test to generate a new sequence, use the GM (1,1) model to inversely calculate the new sequence to obtain the predicted value corresponding to the outlier value, realize the prediction of the outlier value, and use the obtained predicted value to replace the corresponding outlier value in the basic data to form a data optimization sequence; The data optimization sequence is input into the ARIMA model to predict the freight turnover data for the future set time period.
2. The highway freight turnover prediction method based on dual model combination as claimed in claim 1, characterized in that: The Z-score method and the trend correction method are used to perform data fluctuation detection on the basic data, including: first using the Z-score method to determine the data points that deviate from a preset Z-score threshold, removing the data points that exceed the Z-score threshold as outliers, converting the basic data after removing the outliers into a first-order difference sequence, and then performing data fluctuation detection on the first-order difference sequence using the trend correction method, and by setting the fluctuation threshold, determining the outliers again and removing them again.
3. The highway freight turnover prediction method based on dual model combination as claimed in claim 1, characterized in that: The freight turnover volume of the historical set time period of the abnormal value is obtained, and the initial sequence is constructed. The initial sequence is subjected to a level ratio test, including: comparing whether the ratio of two adjacent items in the initial sequence is a constant, that is, judging whether the level ratio property is satisfied. If the initial sequence satisfies the level ratio property, the grey prediction model - GM (1,1) model is used for prediction, specifically: in, σ ( i ) is the level ratio, only when all the level ratios σ ( i ) all fall within the calculation range before the model is established. For the ( =1, 2, …, , is a positive integer) freight turnover data.
4. The highway freight turnover prediction method based on dual model combination as claimed in claim 1, characterized in that: After verification, the initial sequence is accumulated to generate a new sequence, including: Weakened The disturbance caused by instability is accumulated once on the initial sequence to generate a new sequence, which is recorded as , In the formula, ( =1, 2, …, ) represents the distance from the first data point to the t The accumulated value of the data points.
5. The highway freight turnover prediction method based on dual model combination as claimed in claim 4 is characterized in that: The accumulated data sequence is described by a first-order linear differential equation, and the first-order linear differential equation is integrated to obtain the accumulated data value at any time point. The specific process is: In the formula, The development coefficient, also known as the growth rate, refers to the ratio of each item in the sequence to the previous item. This ratio reflects the development trend and speed of the sequence. is the gray action, reflecting the changing relationship of the series; Integrating the above formula yields: In the formula, Indicate any point in time The accumulated data value of is the initial accumulated data value, =1,2,…, Indicates each time point, , The parameters whose values are to be determined are determined by the least squares method.
6. The highway freight turnover prediction method based on dual model combination as claimed in claim 1, characterized in that: The GM(1,1) model is used to invert and calculate the new sequence to obtain the predicted value corresponding to the outlier, which is: In the formula, ( =1,2,… , is the backward forecast quantity) is the forecast value, that is, the forecast value of the month where the abnormal data determined by the fluctuation detection of the data set is located.
7. The highway freight turnover prediction method based on dual model combination as claimed in claim 1, characterized in that: After the optimization of the basic data of freight turnover is completed, the data optimization sequence is obtained, and the data optimization sequence is input into the ARIMA model to predict the freight turnover data for the future set time period; among them, the ARIMA (p, d, q) model is composed of autoregressive model, differential integration, and moving average model. p is the autoregressive term, d is the number of differences made until the time series becomes stationary, q is the number of moving average items, and the formula is as follows: In the formula, is time series data; is a constant term; obtained by difference; is the autoregressive coefficient, used to fit the past The autoregressive relationship of the period; is the moving average coefficient, used to fit the past The moving average relationship between the period; is a white noise series; is the error term.
8. The highway freight turnover prediction system based on dual model combination is characterized by: include: Data acquisition module, used to obtain historical freight turnover as basic data; An outlier acquisition module is used to detect data fluctuations on the basic data using the Z-score method and the trend correction method, set a fluctuation threshold, identify outliers according to the fluctuation threshold, and remove outliers; An outlier optimization module is used to obtain the freight turnover volume of the outlier historical set time period, construct an initial sequence, perform a level ratio test on the initial sequence, accumulate the initial sequence once after the test to generate a new sequence, use the GM (1,1) model to inversely calculate the new sequence to obtain the predicted value corresponding to the outlier, realize the prediction of the outlier, and use the obtained predicted value to replace the corresponding outlier in the basic data to form a data optimization sequence; The target prediction module is used to input the data optimization sequence into the differential autoregressive moving average model ARIMA to predict the freight turnover data for a set time period in the future.
9. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by the processor, the highway freight turnover prediction method based on dual-model combination as described in any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: include: A processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the road freight turnover prediction method based on the dual model combination as described in any one of claims 1-7.
Citation Information
Patent Citations
Prediction method and device for multi-model fusion
CN108492141A
Commodity sales prediction method under holiday and festival effects
CN109978597A
Prediction model construction method and device, prediction method and device, equipment and medium
CN110648026A
Electricity demand prediction method, device and system and computer storage medium
CN112418921A
Water demand prediction method based on grey linear regression-Markov chain model
CN114580151A