Outlet data prediction method based on SARIMA model

The method optimizes SARIMA models for export data prediction by preprocessing and parameter selection, addressing the limitations of seasonal and periodic sequences, achieving high accuracy and low error rates.

CN120316626AInactive Publication Date: 2025-07-15ZHEJIANG ELECTRONIC PORT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510805973.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-17
Publication Date
2025-07-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing ARIMA models are difficult to effectively deal with the problem of export data prediction of seasonal and periodic sequences.

Method used

Using the SARIMA model, through data cleaning, feature extraction, autocorrelation and partial autocorrelation graph analysis, grid search method and AIC information criterion, model parameters are optimized to capture seasonal and periodic information, and an optimization model is established for prediction.

Benefits of technology

Accurate prediction of seasonal and periodic sequences is achieved, with high prediction accuracy and error within 5%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120316626A_ABST
    Figure CN120316626A_ABST
Patent Text Reader

Abstract

The invention discloses an exit data prediction method based on an SARIMA model. The exit data prediction method comprises the steps of inputting historical data into the SARIMA model, performing ADF inspection, extracting historical data after ADF inspection, then inspecting white noise, and extracting time sequence information of the inspected data from the inspected data through AR and MA processes; drawing an autocorrelation and partial autocorrelation graph taking seasons as a difference time sequence, and searching a first type of optimal parameters of the SARIMA model to establish a first optimization model; selecting a second type of optimal parameters from the candidate set according to an AIC information criterion for evaluating the time sequence model to establish a second optimization model; and selecting the model with the minimum deviation between the predicted value and the actual value in the first optimization model and the second optimization model as a final selection model, outputting the final selection model, and carrying out model verification. The method has the advantages that trend information existing in data can be well captured, the prediction precision in a relatively short period is high, and the error can be kept within 5%.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data prediction, and in particular to an export data prediction method based on the SARIMA model. Background Art

[0002] Among several processing methods for time series data, the ARMA model is the most commonly used and easy-to-analyze method. This model consists of two parts, namely the auto-regressive process and the moving-average process, and can capture the data information contained in a stationary time series better. However, the limitations of the ARMA model are obvious, that is, it requires the time series to be "stationary", while the data in real scenarios mostly have characteristics such as trends and seasonality, and it is difficult to meet the requirement of stationarity of this model. Therefore, a differencing operation is performed on the ARMA model and extended to the ARIMA model, which can be used to process non-stationary time series.

[0003] However, the ARIMA model also has deficiencies, that is, it cannot handle seasonal or periodic sequences well. Summary of the Invention

[0004] In view of the above and / or existing problems in the export data prediction method based on the SARIMA model, the present invention is proposed.

[0005] Therefore, the problem to be solved by the present invention is how to provide an export data prediction method that can handle seasonal and periodic sequences.

[0006] To solve the above technical problems, the present invention provides the following technical solution: An export data prediction method based on the SARIMA model, which includes, Collect historical export data, and the export data includes at least one of annual export volume, monthly export volume, and monthly average export volume; Perform data cleaning on the historical export data, and the data cleaning includes: performing an ADF test on the historical data in the SARIMA model; Input the data after cleaning the historical data into the SARIMA model for feature extraction. The feature extraction includes extracting the post-difference of the cleaned data, performing a delayed test for white noise on the differenced sequence, and extracting the time series information of the data after the test through the AR and MA processes; Based on the data after feature extraction, draw the autocorrelation and partial autocorrelation graphs in units of time series, judge the truncation and trailing of the autocorrelation coefficient and partial autocorrelation coefficient within the cycle length range, combine the time series, find the shortest cycle combination through graphical transformation trends, select the trailing correlation coefficient information within the shortest cycle as the first type of preferred parameter, replace the original parameters of the SARIMA model with the first type of preferred parameter, and establish the first optimized model; Based on the time series model, establish the second preferred model. Through the grid search method, based on the time series information, generate all parameter combinations through the Cartesian product algorithm and generate a candidate set. Select the second type of preferred parameter from the candidate set according to the AIC information criterion, replace the original parameters of the SARIMA model with the second type of preferred parameter, and establish the second optimized model; Take the historical data in units of time series, calculate the deviation between the actual value and the predicted value in the first preferred model and the second optimized model in the existing historical data, select the model with the smallest deviation between the predicted value and the actual value in the first optimized model and the second optimized model as the final selected model, and output the final selected model to achieve the prediction effect of export data.

[0007] As a preferred scheme of the export data prediction method based on the SARIMA model of the present invention, wherein: data cleaning of historical export data includes: detecting whether there is a unit root in the historical export data through ADF. If there is no unit root, it proves to be a stationary sequence and is input into the SARIMA model. If there is a unit root, it proves that the data is non-stationary, and the non-stationary data is discarded; The formation process of the ARIMA model includes: Establish a traditional ARMA prediction model; The ARMA prediction model extracts historical data in units of years, and performs 12-segment difference operations on the extracted historical data to form an ARIMA model; Expand the ARIMA model, introduce three hyperparameters and a seasonal cycle parameter to form a SARIMA model; The introduced hyperparameters at least include the seasonal autoregressive order, the seasonal difference times, and the seasonal moving average order; The seasonal autoregressive order includes using at least one past seasonal cycle parameter and predicting the current value to capture the autocorrelation across cycles; The seasonal difference times are used to eliminate the seasonal trend; The seasonal moving average order is to use the prediction errors of at least one past seasonal cycle to correct the current prediction and capture the residual fluctuations not explained by the seasonal autoregression.

[0008] As a preferred embodiment of the export data prediction method based on the SARIMA model of the present invention, the method includes: inputting the data after cleaning the historical data into the SARIMA model for feature extraction, including extracting the cleaned data on an annual basis, performing 12 segments of differencing on the extracted historical data, when the differenced sequence is delayed by 1 - 12 periods, testing for white noise, and extracting the time series information of the tested data through the AR and MA processes to establish a time series model.

[0009] As a preferred embodiment of the export data prediction method based on the SARIMA model of the present invention, the white noise test includes: screening out data with non - stationary white noise, and the judgment criterion for white noise is that the P - value of the statistic is significantly less than the significance level of 0.05. When it is detected that the random error term in the measurement model belongs to non - stationary white noise, that data is screened out.

[0010] As a preferred embodiment of the export data prediction method based on the SARIMA model of the present invention, substituting the original parameters of the SARIMA model with the first - type preferred parameters to establish the first optimized model includes: Drawing an autocorrelation graph and a partial autocorrelation graph based on the data after feature extraction; Judging the truncation and trailing of the autocorrelation coefficient and the partial autocorrelation coefficient within the cycle length range, combining the time series, and taking the sequence group that can make both the autocorrelation graph and the partial autocorrelation graph within the shortest time series group trailing as the shortest cycle, and selecting the trailing correlation coefficient information within the shortest cycle as the first - type preferred parameters; Verifying the first - type preferred parameters, and the verification of the first - type preferred parameters includes considering seasonal autocorrelation and partial autocorrelation characteristics, and judging whether the autocorrelation coefficient and the partial correlation coefficient in units of the time series length with a delay of at least 1 month are both significantly non - zero. When the autocorrelation coefficient and the partial correlation coefficient after delay are both significantly non - zero, the first - type preferred parameters are selected, otherwise the shortest cycle is re - selected. The correlation coefficient information includes the seasonal autoregressive order, the seasonal cycle length, the number of seasonal differencing times, and the seasonal moving average order.

[0011] As a preferred embodiment of the export data prediction method based on the SARIMA model of the present invention, substituting the original parameters of the SARIMA model with the second - type preferred parameters to establish the second optimized model includes: Through the grid search method, based on the time series information of the tested data extracted by the AR and MA processes, generating all parameter combinations through the Cartesian product and generating a candidate set; The candidate set includes all combinations of parameters in units of the time series cycle length with a delay of at least 1 month; The candidate set can be traversed by the grid search method. After traversing all the parameter combinations of the candidate set, the second preferred parameter is selected from the candidate set according to the AIC information criterion of the evaluation time series model.

[0012] As a preferred solution of the export data prediction method based on the SARIMA model according to the present invention, wherein: the time series information includes the trend, season and random effect of the sequence, and the time series information is extracted by AR and MA through the seasonal_decompose function in Python.

[0013] As a preferred solution of the export data prediction method based on the SARIMA model according to the present invention, wherein: the model verification process includes the residual verification after extracting the trend and seasonal effects from the historical data in years, and performing the ADF root test and the distribution characteristic trend verification of the residuals on the residuals; The distribution characteristic trend verification of the residuals is to judge whether the ordered distribution of the residuals follows the distribution characteristics and sample linear trend of the normal distribution N(0,1). If it follows, it is judged that the distribution characteristic trend verification of the residuals is qualified; The model verification is qualified when both the ADF root test of the residuals and the distribution characteristic trend verification of the residuals are qualified, and it is determined that the model verification is qualified.

[0014] In a second aspect, some embodiments of the present invention provide an electronic device, including: one or more processors; a storage device having one or more programs stored thereon. When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the above first aspect.

[0015] In a third aspect, some embodiments of the present invention provide a computer-readable medium having a computer program stored thereon, wherein the program implements the method described in any implementation manner in the above first aspect when executed by a processor.

[0016] The beneficial effect of the present invention is that it can better capture the trend information existing in the data, and has a higher prediction accuracy within a relatively short period, and can achieve an error of less than 5%. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to these drawings without creative efforts.

[0018] Among them: Figure 1The SARIMA model implementation prediction flowchart of the export data prediction method based on the SARIMA model in Embodiment 1; Figure 2 The monthly export data graph of a certain place from January 2015 to October 2024 of the export data prediction method based on the SARIMA model in Embodiment 2; Figure 3 The ADF test result of the monthly export data of a certain place for the export data prediction method based on the SARIMA model in Embodiment 2; Figure 4 The ADF unit root test result of the residuals for the export data prediction method based on the SARIMA model in Embodiment 2; Figure 5 The white noise test result of the lag 1 - 12 periods of the differenced series for the export data prediction method based on the SARIMA model in Embodiment 2; Figure 6 The autocorrelation and partial autocorrelation graph for the export data prediction method based on the SARIMA model in Embodiment 2; Figure 7 The model verification graph for the export data prediction method based on the SARIMA model in Embodiment 2; Figure 8 The model residual distribution verification graph for the export data prediction method based on the SARIMA model in Embodiment 2; Figure 9 The static verification graph for the export data prediction method based on the SARIMA model in Embodiment 2; Figure 10 The dynamic verification graph for the export data prediction method based on the SARIMA model in Embodiment 2. Detailed implementation manners

[0019] To make the above - mentioned objects, features and advantages of the present invention more obvious and understandable, the following detailed description of the specific implementation manners of the present invention will be given in conjunction with the accompanying drawings of the specification.

[0020] In the following description, many specific details are set forth to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.

[0021] Secondly, the so - called "one embodiment" or "embodiment" herein refers to a specific feature, structure or characteristic that can be included in at least one implementation manner of the present invention. The "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments.

[0022] Example 1 Reference Figure 1 , which is the first embodiment of the present invention. This embodiment provides a method for predicting export data based on the SARIMA model, which includes: Pre-establish a SARIMA model according to the characteristics of export data; The formation process of the ARIMA model is as follows: First, establish a traditional ARMA prediction model; Perform a differencing operation on the ARMA prediction model to form an ARIMA model; Expand the ARIMA model by introducing 3 hyperparameters and 1 additional seasonal cycle parameter to form a SARIMA model.

[0023] Among them, SARIMA refers to time series data with seasonal components, ARMA refers to the autoregressive moving average model, ARIMA refers to a new model formed by combining the split operation and the ARMA model, and the ADF test is a statistical method for detecting whether there is a unit root in time series data, also known as the unit root test.

[0024] The above three hyperparameters are used to handle periodic patterns in time series (such as monthly and quarterly patterns), and the specific descriptions are as follows: P: Seasonal autoregressive order. Use the values of the past P seasonal cycles to predict the current value, which is used to capture the autocorrelation across cycles. For example, in monthly data (S = 12), P = 1 means that the current value is affected by the value of the same month last year.

[0025] D: Seasonal differencing times. The value is generally taken as 0 or 1, which is used to eliminate the seasonal trend. For example, D = 1 means performing a first-order seasonal difference on the data, that is, in monthly data (S = 12), it means subtracting the same month last year from the current month.

[0026] Q: Seasonal moving average order. Use the prediction errors of the past Q seasonal cycles to correct the current prediction, which is used to capture the residual fluctuations not explained by the seasonal autoregression. For example, Q = 1 means adjusting the current prediction result using the error of the same month last year.

[0027] Seasonal parameter (S): S: Seasonal cycle length. It is used to define the time span of the seasonal pattern in the time series and is the core of the seasonal parameter. For example, S = 12 represents monthly data, S = 4 represents quarterly data, and S = 7 represents weekly data.

[0028] Input the historical data into the SARIMA model year by year; Perform the ADF test on the historical data; Extract historical data on an annual basis, difference the extracted historical data into 12 segments. When the differenced sequence is delayed by 1 - 12 periods, test for white noise. Extract the time series information of the tested data through AR and MA processes; Plot the autocorrelation and partial autocorrelation graphs of the seasonal differenced time series to find the first type of preferred parameters for the SARIMA model; Replace the original parameters of the SARIMA model with the first type of preferred parameters to establish the first optimized model, including: Based on the data after feature extraction, plot the autocorrelation graph and partial autocorrelation graph; Judge the truncation and trailing of the autocorrelation coefficient and partial autocorrelation coefficient within the period length range. Combine the time series, and take the sequence group that can make both the autocorrelation graph and partial autocorrelation graph within the shortest time series group trailing as the shortest period, and select the trailing correlation coefficient information within the shortest period as the first type of preferred parameters; Verify the first type of preferred parameters. Verifying the first type of preferred parameters includes considering seasonal autocorrelation and partial autocorrelation characteristics, and judging whether both the autocorrelation coefficient and partial autocorrelation coefficient with a time series length unit and a delay of at least 1 month are significantly non - zero. When both the autocorrelation coefficient and non - autocorrelation coefficient after delay are significantly non - zero, select the first type of preferred parameters, otherwise re - select the shortest period.

[0029] Among parameter selection, ACF: For seasonal time series, if the autocorrelation coefficient of the seasonal ACF rapidly becomes 0 or approaches 0 after a certain order, and 95% of the autocorrelation coefficients fall within the range of 2 standard deviations, then it is considered that ACF truncates. For example, if ACF suddenly becomes 0 after the lag order 2, Q = 2 can be considered.

[0030] PACF: If the partial autocorrelation coefficient in PACF rapidly becomes 0 or approaches 0 after a certain order, and 95% of the autocorrelation coefficients fall within the range of 2 standard deviations, then it is considered that PACF truncates. For example, if PACF suddenly becomes 0 after the lag order 3, P = 3 can be considered.

[0031] Select the second type of preferred parameters from the candidate set according to the AIC information criterion for evaluating time series models; Replace the original parameters of the SARIMA model with the first type of preferred parameters to establish the first optimized model. Take the historical data as a time series unit, and calculate the deviation between the predicted value and the actual value of the first optimized model in the existing historical data; Replace the original parameters of the SARIMA model with the second type of preferred parameters, establish the second optimized model by the grid search method. Take the historical data as a time series unit, and calculate the deviation between the predicted value and the actual value of the second optimized model in the existing historical data; The core idea of the grid search method is to find the optimal model parameters by traversing all possible parameter combinations. It is a method to systematically traverse all possible parameter combinations to determine the optimal parameters of the SARIMA model. Through this method, the parameter combination that makes the model performance best can be found.

[0032] The steps to determine the optimal parameters are as follows: 1. Define the parameter range: Determine the value ranges of the non-seasonal parameters p, d, q and the seasonal parameters P, D, Q, S. For example, the value ranges of p and q are generally [0, 1, 2], the value ranges of d and D are generally [0, 1], P and Q generally do not exceed 2, and the value range of S depends on the seasonal pattern. For monthly data, it is generally 12.

[0033] 2. Generate parameter combinations: Generate all possible parameter combinations through the Cartesian product. For example, in monthly data, the parameter combinations (p, d, q, P, D, Q) can be (1, 0, 1, 0, 1, 1, 12) or (1, 1, 1, 1, 1, 1, 12), and so on, and generate a series of candidate sets.

[0034] Model evaluation and parameter tuning: For each SARIMA model fitted with a parameter combination, calculate the corresponding information criteria (such as AIC, BIC), and select the parameter combination that makes the information criterion value the smallest as the optimal model.

[0035] Select the model with the smallest deviation between the predicted value and the actual value in the first optimized model and the second optimized model as the final selected model, output the final selected model, and perform model calibration.

[0036] The process of performing the ADF test on historical data is as follows: The test shows whether there is a unit root in the model statistics. If there is no unit root, directly use the traditional ARMA model to predict future data; otherwise, re-establish the parameters of the SARIMA model.

[0037] In the process of screening out white noise, the judgment criterion for white noise is that the p-values of the Q statistic are all significantly less than the significance level of 0.05. When it is detected that the random error term in the econometric model is not white noise, the data is screened out.

[0038] The selection process of the first type of preferred parameters is as follows: Plot the autocorrelation function (ACF) and partial autocorrelation function (PACF) graphs; Display the autocorrelation coefficients and partial autocorrelation coefficients within 1 - 12 units with the time series as the unit; Consider the seasonal autocorrelation and partial autocorrelation characteristics, and analyze the characteristics of the autocorrelation coefficients and partial autocorrelation coefficients with a delay of 1 or more units in the time series cycle length; Judge the truncation and trailing of the autocorrelation coefficient and partial autocorrelation coefficient within the judgment cycle length, and select the truncated correlation coefficient information within the shortest cycle as the first type of preferred parameter.

[0039] The selection process of the second preferred coefficient is as follows: Through the grid search method, based on the time series information of the data after extraction and inspection by the AR and MA processes, different combinations of all parameters are carried out, and the second type of preferred parameters are selected from the candidate set.

[0040] The time series information includes the trend, seasonality and random effects of the sequence. The time series information is extracted by AR and MA through the seasonal_decompose function in Python.

[0041] The model verification process is to verify the residuals after extracting the trend and seasonal effects from the historical data in years, and conduct the ADF root test and the trend test of the distribution characteristics of the residuals on the residuals; The trend test of the distribution characteristics of the residuals is to judge whether the ordered distribution of the residuals follows the distribution characteristics of the normal distribution N(0,1) and the sample linear trend. If it follows, it is judged that the trend test of the distribution characteristics of the residuals is qualified; The model verification is qualified when both the ADF root test and the trend test of the distribution characteristics of the residuals are qualified, and it is judged that the model verification is qualified.

[0042] Embodiment 2 Refer to Figures 2 to 10 , which is the second embodiment of the present invention. Different from the first embodiment, it further includes export data based on the monthly export data of a certain place from January 2015 to October 2024.

[0043] Before formally starting the modeling analysis, first import the monthly export data (in US dollars, the same below) of a certain place from January 2015 to October 2024 and draw a line chart, and the result is as Figure 2 shown.

[0044] Through analysis Figure 2 it can be known that there is an obvious upward trend and a seasonal trend with a cycle of 12 months in the monthly export data of a certain place.

[0045] After performing the ADF test on the monthly export data of a certain place, as shown Figure 3 is the ADF test result. Its statistical model indicates that there is a unit root in this sequence, which is a non-stationary sequence and cannot be directly modeled and analyzed using a relatively simple ARMA.

[0046] The trend, seasonality, and random effects of a sequence can be extracted using the seasonal_decompose function in Python. For non-stationary time series, non-stationary data can be transformed into stationary data by modeling the trend and seasonality and removing them from the model, and further analysis can be performed on its residuals.

[0047] After performing the ADF unit root test on the residuals, the results are as Figure 4 shown. At the 95% confidence interval, it can be considered that the residuals are stationary and can be used for modeling analysis.

[0048] First, after performing a first-order 12-step difference on the original sequence, a white noise test is conducted. The results are as Figure 5 , indicating that when the lag of the differenced sequence is 1 - 12 periods, the p-values of the Q-statistic are all significantly less than the significance level of 0.05, rejecting the null hypothesis. That is, the sequence after the first-order 12-step difference is a stationary non-white noise sequence, and the AR and MA processes can be used to extract the implicit time series information in the data.

[0049] In the second step, model order determination is carried out. The graphical method requires plotting the autocorrelation and partial autocorrelation plots of the differenced sequence, and finding the optimal parameters of the model by analyzing the autocorrelation and partial autocorrelation plots. From Figure 6 it can be seen that Figure 6 (a) The autocorrelation plot and Figure 6 (b) The partial autocorrelation plot show that both the autocorrelation coefficients and partial autocorrelation coefficients within 12 orders are trailing. Therefore, an ARMA(1,1) model is tried to extract the short-term autocorrelation information of the differenced sequence; then considering the seasonal autocorrelation and partial autocorrelation characteristics, the characteristics of the autocorrelation coefficients and partial autocorrelation coefficients with a lag of 12 orders and a cycle length as the unit are analyzed. It can be found that the autocorrelation plot shows that the autocorrelation coefficient at a lag of 12 orders is significantly non-zero. And the partial autocorrelation plot shows that the partial autocorrelation coefficients at a lag of 12 orders are all significantly non-zero. So it can be considered that the seasonal autocorrelation characteristic is that the autocorrelation coefficient is truncated and the partial autocorrelation coefficient is trailing, and an ARMA(1,1)12 model with a 12-step cycle can be considered to extract the seasonal autocorrelation information of the differenced sequence.

[0050] Furthermore, the grid search method is considered to select the optimal parameter values. The grid search method can traverse and explore different combinations of parameters. When all parameter combinations have been searched through, the best-performing parameters can be selected from the candidate set according to the AIC information criterion for evaluating time series models. For the monthly export data of a certain place, after traversing all combinations of 7 parameters, according to the AIC information criterion, SARIMAX(0,1,1)(0,1,1,12) is the optimal parameter.

[0051] Modeling with these parameters, the results of parameter determination by grid search show that at the 5% significance level, the coefficients of each variable pass the test.

[0052] In the last step, model verification is carried out. For example, Figure 7 as Figure 8 shown, it can be analyzed from the diagnostic result in Figure 7 (c) that the residuals are uncorrelated. At the same time, Figure 7 it is indicated in Figure 7 (a) that the residuals do not have obvious seasonality. Through the Q-Q quantile plot in

[0053] (b), it is found that the ordered distribution of the residuals generally follows the distribution characteristics of the normal distribution N(0,1) and the sample linear trend, and it can be considered that the modeling is effective. For example, Figure 9 shown, under the 95% confidence interval, the true export value is imported into the fitted SARIMA model for calculation (the prediction curve, the curve with a lower starting point), and compared with the true data (the basic data curve, the curve with a higher starting point). It is found that in the static prediction mode, except for individual time series with a large deviation from the true value, the trend of the predicted data fits well, and the predicted values basically fall within the confidence interval range.

[0054] For the prediction result of the prediction method of the present invention under dynamic verification: For example, Figure 10 shown, first 90% of the samples are selected as the test set, and the remaining 10% of the samples are predicted using the fitted model. The model fitting result shows that in the initial stage of fitting, the model effect is poor, and there are obvious deviations between the fitted values and the actual values of some time series. However, as the amount of data gradually increases, the fitting curve gradually becomes stable, and the deviation from the actual data gradually decreases. Figure 10 The trend on the right shows that the predicted value (forecast) and the actual value (ads) are highly synchronous, and the error basically remains within 5%.

[0055] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not restrictive. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered by the scope of the claims of the present invention.

Claims

1. A method for predicting export data based on the SARIMA model, characterized in that, Including, Collecting historical export data, where the export data includes at least one of annual export volume, monthly export volume, and monthly average export volume; Performing data cleaning on the historical export data, where the data cleaning includes: performing ADF test on historical data in the SARIMA model; Inputting the data after historical data cleaning into the SARIMA model for feature extraction, where the feature extraction includes taking the post-difference of the cleaned data, performing a deferred test for white noise on the differenced sequence, and extracting the time series information of the data after the test through AR and MA processes; Based on the data after feature extraction, drawing an autocorrelation and partial autocorrelation graph with time series as the unit, judging the truncation and trailing of autocorrelation coefficients and partial autocorrelation coefficients within the cycle length range, combining the time series, finding the shortest cycle combination through graphic transformation trends, selecting the trailing correlation coefficient information within the shortest cycle as the first type of preferred parameter, replacing the original parameters of the SARIMA model with the first type of preferred parameter, and establishing the first optimized model; Based on the time series model, through the grid search method, generating all parameter combinations based on time series information through the Cartesian product algorithm and generating a candidate set, selecting the second type of preferred parameter from the candidate set according to the AIC information criterion, replacing the original parameters of the SARIMA model with the second type of preferred parameter, and establishing the second optimized model; Taking the historical data with time series as the unit, calculating the deviation between the predicted values in the first preferred model and the second optimized model and the actual values in the existing historical data, selecting the model with the smallest deviation between the predicted value and the actual value in the first optimized model and the second optimized model as the final selected model, and outputting the final selected model to achieve the export data prediction effect.

2. The export data prediction method based on the SARIMA model according to claim 1, wherein Performing data cleaning on the historical export data includes: detecting whether there is a unit root in the historical export data through ADF. If there is no unit root, it is proved to be a stationary sequence and input into the SARIMA model. If there is a unit root, it is proved that the data is non-stationary and the non-stationary data is discarded; The formation process of the ARIMA model includes: Establishing a traditional ARMA prediction model; The ARMA prediction model extracts historical data in years, performs 12-segment differencing operations on the extracted historical data, and forms an ARIMA model; Expanding the ARIMA model, introducing three hyperparameters and a seasonal cycle parameter to form a SARIMA model; The introduced hyperparameters at least include seasonal autoregressive order, seasonal differencing times, and seasonal moving average order; The seasonal autoregressive order includes using at least one past seasonal cycle parameter and predicting the current value to capture the autocorrelation across cycles; The seasonal differencing times are used to eliminate seasonal trends; The seasonal moving average order is to correct the current prediction using the prediction errors of at least one past seasonal cycle and capture the residual fluctuations not explained by seasonal autoregression.

3. The export data prediction method based on the SARIMA model according to claim 1, wherein The data after cleaning historical data is input into the SARIMA model for feature extraction, including extracting the cleaned data on a yearly basis, differencing the extracted historical data by 12 segments, and when the differenced sequence is delayed by 1 - 12 periods, testing for white noise. After the test, the time series information of the tested data is extracted through the AR and MA processes, and a time series model is established.

4. The export data prediction method based on the SARIMA model according to claim 3, wherein The white noise test includes: screening out data with non - stationary white noise. The judgment criterion for white noise is that the P - values of the statistics are all significantly less than the significance level of 0.

05. When it is detected that the random error term in the measurement model belongs to non - stationary white noise, that data is screened out.

5. The export data prediction method based on the SARIMA model according to claim 1, wherein, Replacing the original parameters of the SARIMA model with the first - type preferred parameters to establish the first optimized model includes: Based on the data after feature extraction, drawing the autocorrelation graph and partial autocorrelation graph; Judging the truncation and trailing of the autocorrelation coefficient and partial autocorrelation coefficient within the cycle length range, combining the time series, and taking the sequence group that can cause both the autocorrelation graph and partial autocorrelation graph within the shortest time series group to be trailing as the shortest cycle, and selecting the trailing correlation coefficient information within the shortest cycle as the first - type preferred parameters; Verifying the first - type preferred parameters. The verification of the first - type preferred parameters includes considering seasonal autocorrelation and partial autocorrelation characteristics, and judging whether the autocorrelation coefficient and partial correlation coefficient with a time - series length unit and a delay of at least 1 month are both significantly non - zero. When the autocorrelation coefficient and partial correlation coefficient after delay are both significantly non - zero, select the first - type preferred parameters; otherwise, re - select the shortest cycle. The correlation coefficient information includes the seasonal autoregressive order, seasonal cycle length, seasonal differencing times, and seasonal moving average order.

6. The export data prediction method based on the SARIMA model according to claim 1, wherein, Replacing the original parameters of the SARIMA model with the second - type preferred parameters to establish the second optimized model includes: Through the grid search method, based on the time series information of the tested data extracted by the AR and MA processes, generating all parameter combinations through the Cartesian product and generating a candidate set; The candidate set includes all combinations of parameters with a time - series cycle length unit of at least 1 month; Through grid search, the candidate set can be traversed. After traversing all parameter combinations of the candidate set, the second - type preferred parameters are selected from the candidate set according to the AIC information criterion for evaluating the time series model.

7. The export data prediction method based on the SARIMA model according to claim 6, characterized in that, The time series information includes the trend, season, and random effects of the sequence, and the time series information is extracted by AR and MA through the seasonal_decompose function in Python.

8. The export data prediction method based on the SARIMA model according to claim 1, wherein, The model verification process includes verifying the residuals after extracting the trend and seasonal effects from the historical data on a yearly basis, and performing the ADF root test and the distribution characteristic trend test on the residuals; The distribution characteristic trend test of the residuals is to judge whether the ordered distribution of the residuals follows the distribution characteristics of the normal distribution N(0,1) and the sample linear trend. If it follows, it is judged that the distribution characteristic trend test of the residuals is qualified; The model is verified to be qualified when both the ADF root test and the distribution characteristic trend test of the residuals are qualified.

9. An electronic device, comprising: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-8.

10. A computer-readable storage medium, on which executable instructions are stored, and when the instructions are executed by a processor, the processor implements the method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Method for predicting elastic cloud computing resources based on SARIMA-WNN model

    CN108304355A

  • SARIMA-GRU time sequence prediction model based on BP neural network nonlinear combination

    CN114943328A

  • Systems and methods for advanced prediction using machine-learning and statistical models

    US20240420026A1