CN113962741A - Coal sales data prediction method, equipment and medium - Google Patents

Coal sales data prediction method, equipment and medium Download PDF

Info

Publication number
CN113962741A
CN113962741A CN202111262945.7A CN202111262945A CN113962741A CN 113962741 A CN113962741 A CN 113962741A CN 202111262945 A CN202111262945 A CN 202111262945A CN 113962741 A CN113962741 A CN 113962741A
Authority
CN
China
Prior art keywords
data
coal sales
coal
model
time series
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111262945.7A
Other languages
Chinese (zh)
Other versions
CN113962741B (en
Inventor
张通
张安举
崔乐乐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chaozhou Zhuoshu Big Data Industry Development Co Ltd
Original Assignee
Chaozhou Zhuoshu Big Data Industry Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chaozhou Zhuoshu Big Data Industry Development Co Ltd filed Critical Chaozhou Zhuoshu Big Data Industry Development Co Ltd
Priority to CN202111262945.7A priority Critical patent/CN113962741B/en
Publication of CN113962741A publication Critical patent/CN113962741A/en
Application granted granted Critical
Publication of CN113962741B publication Critical patent/CN113962741B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0202Market predictions or forecasting for commercial activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Mathematical Analysis (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Game Theory and Decision Science (AREA)
  • Marketing (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Operations Research (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Algebra (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a method, equipment and a medium for predicting coal sales data, which are used for solving the technical problems that the seasonal periodic change of the coal sales cannot be accurately reflected by the existing prediction algorithm and the accuracy is low. Obtaining historical coal sales data of an enterprise from a database, and filling missing values in the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time series data; carrying out stabilization processing on the coal sales time series data to obtain stable time series data; estimating model parameters of the difference integration moving average autoregressive model according to the autocorrelation graph and the partial autocorrelation graph to obtain a product seasonal model for estimating coal sales data; inputting the stationary time sequence data into a multiplicative seasonal model for model fitting, and adjusting model parameters; and predicting the coal sales data based on the seasonal model multiplied by the adjusted model parameters.

Description

Coal sales data prediction method, equipment and medium
Technical Field
The application relates to the technical field of data analysis, in particular to a method, equipment and medium for predicting coal sales data.
Background
The coal sales data has vital significance for purchase plan designation, inventory management, capital turnover, production decision and the like of energy enterprises, the accurate trend change of the data is often difficult to grasp through manual prediction, the subjectivity is strong, and the requirements on market experience, strategic eye sight and the like of decision makers are high. Therefore, data prediction algorithms are rapidly developed in recent years, while the coal industry has special seasonal characteristics, but the common data prediction algorithms do not consider trend factors and seasonal factors in time series, and the fitting degree of a model to data is low, so that the prediction of coal sales data is not accurate enough. In addition, when the acquired data has a missing value, the common data preprocessing method mostly fills the missing value with statistics such as a fixed value, a mean value, a median, a mode and the like, and cannot accurately reflect the actual situation of the missing value, so that the reliability of the predicted data is reduced.
Disclosure of Invention
The embodiment of the application provides a method, equipment and a medium for predicting coal sales data, which are used for solving the technical problems that the seasonal periodic change of the coal sales cannot be accurately reflected by the existing prediction algorithm and the accuracy is low.
The embodiment of the application provides a coal sales data prediction method, which comprises the following steps: acquiring historical coal sales data of an energy enterprise from a database, and filling missing values in the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time series data; carrying out stabilization processing on the coal sales time series data to obtain stable time series data; constructing a difference integration moving average autoregressive model, and an autocorrelation graph and a partial autocorrelation graph of the stationary time sequence data, and estimating model parameters of the difference integration moving average autoregressive model according to the autocorrelation graph and the partial autocorrelation graph so as to obtain a product seasonal model for estimating coal sales data; inputting the stationary time sequence data into the multiplicative seasonal model for model fitting, and adjusting the model parameters; and predicting the coal sales data based on the seasonal model multiplied by the adjusted model parameters.
In an implementation manner of the present application, the smoothing of the coal sales time-series data specifically includes: performing stability check on the coal sales time series data to determine whether the coal sales time series data is a stable sequence; under the condition that the coal sales time series data are non-stationary sequences, performing first-order difference on the coal sales time series data, and performing stationarity check on the coal sales time series data subjected to the first-order difference again to determine whether the coal sales time series data subjected to the first-order difference are still the non-stationary sequences; and if the coal sales time sequence data are still non-stationary sequences, performing second-order difference on the coal sales time sequence data.
In one implementation of the present application, the method further comprises: extracting trend effect information in the coal sales time series data by performing first-order difference on the coal sales time series data; extracting seasonal effect information in the coal sales time series data by performing second-order difference on the coal sales time series data; and periodically analyzing the coal sales residual sequence subjected to the first-order difference and the second-order difference to obtain periodic effect information in the coal sales time series data.
In one implementation of the present application, before constructing the differential integrated moving average autoregressive model, the method further includes: carrying out pure randomness verification on the stationary time sequence data, and judging whether correlation exists among sequence values in the stationary time sequence data or not; and determining that the stationary time sequence data is not a purely random sequence under the condition that a correlation exists between the sequence values, and inputting the stationary time sequence data into the multiplicative seasonal model for model fitting.
In an implementation manner of the present application, estimating a model parameter of the difference-integrated moving average autoregressive model according to the autocorrelation chart and the partial autocorrelation chart specifically includes: estimating an autocorrelation coefficient corresponding to the autocorrelation graph and an order of a partial autocorrelation coefficient truncation corresponding to the partial autocorrelation graph according to the autocorrelation graph and the partial autocorrelation graph; and the order is a model parameter of the difference integration moving average autoregressive model.
In an implementation manner of the present application, performing stationarity check on the coal sales time series data, and determining whether the coal sales time series data is a stationary sequence specifically includes: constructing a corresponding coal sales time series diagram according to the coal sales time series data; determining whether each sequence value in the coal sales time sequence chart fluctuates up and down around a constant value and whether a limit exists in the fluctuation range of each sequence value; determining the coal sales time series data as a stable sequence under the condition that each sequence value fluctuates up and down around a constant value and the fluctuation range has a limit; or determining an autocorrelation graph of the coal sales time-series data, and determining whether the coal sales time-series data are a stationary sequence according to the decay rate of an autocorrelation coefficient in the autocorrelation graph; or judging whether the coal sales time series data have a unit root or not, and if not, determining that the coal sales time series data are stable sequences.
In an implementation manner of the present application, performing missing value filling on the historical coal sales data by using an exponential smoothing algorithm specifically includes: calculating a horizontal component, a trend component and a seasonal component of the historical coal sales data through an addition model; accumulating the horizontal component, the trend component and the seasonal component, and predicting to obtain continuous coal sales time series data; or calculating a horizontal component, a trend component and a seasonal component of the historical coal sales data through a multiplication model; and accumulating and multiplying the horizontal component, the trend component and the seasonal component to predict and obtain continuous coal sales time series data.
In one implementation of the present application, the coal sales time series data is a continuous sequence composed of sequence values corresponding to months in units of months; wherein the sequence value is coal sales data.
The embodiment of the application also provides a coal sales data prediction device, which comprises: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to: obtaining historical coal sales data of an enterprise from a database, and filling missing values in the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time series data; carrying out stabilization processing on the coal sales time series data to obtain stable time series data; constructing a difference integration moving average autoregressive model, and an autocorrelation graph and a partial autocorrelation graph of the stationary time sequence data, and estimating model parameters of the difference integration moving average autoregressive model according to the autocorrelation graph and the partial autocorrelation graph so as to obtain a product seasonal model for estimating coal sales data; inputting the stationary time sequence data into the multiplicative seasonal model for model fitting, and adjusting the model parameters; and predicting the coal sales data based on the seasonal model multiplied by the adjusted model parameters.
An embodiment of the present application further provides a non-volatile computer storage medium storing computer-executable instructions, where the computer-executable instructions are configured to: obtaining historical coal sales data of an enterprise from a database, and filling missing values in the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time series data; carrying out stabilization processing on the coal sales time series data to obtain stable time series data; constructing a difference integration moving average autoregressive model, and an autocorrelation graph and a partial autocorrelation graph of the stationary time sequence data, and estimating model parameters of the difference integration moving average autoregressive model according to the autocorrelation graph and the partial autocorrelation graph so as to obtain a product seasonal model for estimating coal sales data; inputting the stationary time sequence data into the multiplicative seasonal model for model fitting, and adjusting the model parameters; and predicting the coal sales data based on the seasonal model multiplied by the adjusted model parameters.
According to the method, the device and the medium for predicting the coal sales data, the missing value filling is performed on the coal sales data through the prediction algorithm, the actual situation of the missing value can be accurately reflected, and compared with an artificial prediction method and an original filling method, the device and the medium are more accurate and higher in efficiency. The continuous coal sales time series data are subjected to stabilization processing, all influence factors of the data in the time series can be effectively extracted, the value of the coal sales time series is ensured, and only the stable time series can predict the future according to the historical trend. And taking the stationary time sequence data as a sample, constructing a corresponding seasonal model multiplied by the product, and adjusting parameters, so that the fitting degree of the model is improved while the trend factors and the seasonal factors of the coal sales time sequence are considered, and the accuracy of the prediction of the corresponding sales data is also improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart of a method for predicting coal sales data according to an embodiment of the present disclosure;
FIG. 2 is a diagram of an example of filling coal sales raw data provided in an embodiment of the present application;
FIG. 3 is a diagram of an example of a time series after coal sales data are filled by a prediction algorithm according to an embodiment of the present application;
FIG. 4 is a schematic time-series diagram of coal sales data after being processed for stabilization according to an embodiment of the present disclosure;
FIG. 5 is a factoring decomposition diagram of coal sales time series data provided in an embodiment of the present application;
FIG. 6 is a fitting graph of a multiplicative seasonal model provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of coal sales forecast data provided in an embodiment of the present application;
FIG. 8 is a flow chart of another coal sales data prediction method provided in the embodiments of the present application;
fig. 9 is a schematic structural diagram of coal sales data prediction according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The technical solutions proposed in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a coal sales data prediction method according to an embodiment of the present application. As shown in fig. 1, a method for predicting coal sales data provided in the embodiment of the present application may mainly include the following steps:
s101: the server acquires historical coal sales data of an enterprise from the database, and missing value filling is carried out on the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time series data.
Individual missing values inevitably exist in historical coal sales data acquired from a database, and a server needs to ensure that the acquired coal sales time sequence data is continuous and uninterrupted, so that the characteristics of complete and accurate sequence data can be embodied, and the prediction accuracy is improved.
In one embodiment, the server replaces the existing fixed value, mean, median, mode filling method with an exponential smoothing algorithm to improve the reliability of the filling data. The exponential smoothing algorithm is divided into three forms, namely a first exponential smoothing method, a second exponential smoothing method and a third exponential smoothing method. The first exponential smoothing method is for trending and seasonal sequence data, the second exponential smoothing method is for trending but seasonal sequence data, and the third exponential smoothing method is for trending and seasonal sequence data. Because the coal sales has obvious seasonal effect, the missing value is filled by adopting a Holt-Winters algorithm, namely a cubic exponential smoothing method, so that the filled continuous time sequence has obvious seasonal effect and trend effect, and the subsequent model fitting and feature extraction are facilitated. The coal sales time series data obtained after filling the missing values are continuous sequences which are formed by sequence values corresponding to months by taking the month as a unit, and the sequence values are coal sales data.
Specifically, the Holt-Winters algorithm is divided into two modes, namely an accumulation type and an accumulation type. The server can calculate the horizontal component, the trend component and the seasonal component of the historical coal sales data through an addition model, and the method is specifically realized through the following formula:
Figure BDA0003326132640000061
Figure BDA0003326132640000062
Figure BDA0003326132640000063
wherein,
Figure BDA0003326132640000064
the horizontal component is represented by a horizontal component,
Figure BDA0003326132640000065
the trend component is represented as a function of time,
Figure BDA0003326132640000066
representing the seasonal component, obtained by first exponential smoothing, second exponential smoothing and third exponential smoothing, respectively. Alpha is a horizontal smoothing coefficient and beta is a trendThe smoothing coefficient γ is a seasonal smoothing coefficient, t represents a time period, and π is a seasonal length (set to 1 month in the examples of the present application).
And then, accumulating the primary smooth component, the trend component and the seasonal component through the following formula, and predicting to obtain continuous sequence data:
Figure BDA0003326132640000067
wherein k is the cycle length, and h represents the number, i.e. the h-th sequence value after the first sequence value.
The server can also calculate a primary smooth component, a trend component and a seasonal component of the historical coal sales data through a multiplication model, and the method is specifically realized through the following formula:
Figure BDA0003326132640000071
Figure BDA0003326132640000072
Figure BDA0003326132640000073
and then, accumulating the primary smooth component, the trend component and the seasonal component through the following formula, and predicting to obtain continuous sequence data:
Figure BDA0003326132640000074
it should be noted that, the additive model or the multiplicative model can predict the trend and seasonal sequence data, and the model is not limited in the present application as to what kind of model is selected to fill missing values in the historical coal sales data.
Fig. 2 and 3 are an example graph of filling original coal sales data and an example graph of time series after filling the coal sales data by a prediction algorithm, which are provided in the embodiment of the present application, respectively. The abscissa represents time, the ordinate represents coal sales, as shown in fig. 2 and 3, a missing value obtained by an original median and fixed value filling method is too simple to reflect an actual sales situation, and a continuous time sequence estimated by a prediction algorithm takes the seasonality, the trend and the periodicity of coal sales data into consideration, so that the reference significance is larger.
S102: and the server performs stabilization processing on the coal sales time series data to obtain stable time series data.
The server needs to perform stability check on the time sequence data of the continuous coal sales time sequence data so as to judge whether the time sequence data has stability. Only when the characteristics of one time series data are maintained to be stable, the data distribution trend is traceable, and the distribution trend of the future coal sales data can be predicted based on the historical data, so that the reference is provided for the coal purchase of the enterprise.
In one embodiment, the server can perform stability check on the coal sales time series data through a timing diagram check method, an autocorrelation diagram check method and a unit root check method. For time series data { XtThe stationarity check of the } generally only needs to ensure that it satisfies wide stationarity:
(1) arbitrarily given T ∈ T, have
Figure BDA0003326132640000075
A second order matrix representing a random variable at any time exists.
(2) Let T be T ∈ T, having EXtμ is a constant, and the first order matrix representing the random variable does not change over time.
(3) Let T, s, k ∈ T, and k + s-T ∈ T, γ (T, s) ═ γ (k, k + s-T), denote the autocorrelation coefficient between the random variables at two time points, which only relates to the time difference between the two time points, and does not change with the passage of time.
When the coal sales time-series data satisfy the above three conditions, it can be determined as a stationary sequence. Based on the time sequence data, the server constructs a corresponding coal sales time sequence chart according to the coal sales time sequence data. Fig. 3 is a time-series diagram of coal sales after filling of missing values, and as shown in fig. 3, the abscissa represents time and the ordinate represents coal sales for each month. The server can determine whether the current sequence is stable according to whether each sequence value in the coal sales time sequence chart fluctuates up and down around a constant value and whether the fluctuation range of each sequence value has a limit. And if the sequence values fluctuate up and down around a constant value and the fluctuation range has a limit, the coal sales time sequence has obvious trend and periodicity, and the coal sales time sequence data can be determined to be a stable sequence. Or
The server can judge whether the coal sales time-series data are stable sequences according to the autocorrelation graph of the coal sales time-series data. This is because stationary sequences have short-term correlation, and the autocorrelation coefficients decay rapidly to zero as the number of delay periods increases, and for non-stationary sequences the decay rate is relatively slow. And if the autocorrelation coefficient is rapidly attenuated, determining the coal sales time series data as a stable sequence. The autocorrelation coefficients are used for describing the correlation between the sequence values in the time series data, and the autocorrelation graph is used for representing the autocorrelation coefficients in a graphical manner. Or
And the server judges whether the coal sales time series data have a unit root or not, and if the unit root does not exist, the coal sales time series data are determined to be a stable sequence.
By the method, the server can realize stability verification of the coal sales time series data, and if the verified result is a non-stable sequence, the server needs to perform stabilization processing on the time series data to obtain stable time series data, so that accuracy of subsequent model fitting and data prediction is guaranteed. The embodiment of the application adopts a second-order difference method to carry out stabilization processing on the time series data.
Specifically, the server performs a first order difference on the non-stationary coal sales time series data, wherein the first order difference is obtained by subtracting the last sequence value from the last sequence value in the time series data. And then, stability verification is carried out on the coal sales time sequence data subjected to the first-order difference again, if the coal sales time sequence data is still a non-stable sequence, second-order difference needs to be carried out on the coal sales time sequence data subjected to the first-order difference, and the time sequence data subjected to the second-order difference is stable time sequence data.
As shown in fig. 4, the time-series diagram after the coal sales data are smoothed is that, compared with fig. 3, fig. 4 shows that the data are more smooth and have a certain trend and periodicity, and the coal sales in different months also fluctuate greatly due to different seasons.
In one embodiment, the server can extract trend effects, seasonal effects and periodic effects of the time series by differentiating the coal sales time series data. By performing first-order difference on the coal sales time series data, trend effect information in the coal sales time series data can be extracted. Seasonal effect information in the coal sales time series data can be extracted by performing second order difference on the coal sales time series data. Periodic effect information in the coal sales time series data can be acquired by periodically analyzing the coal sales residual sequence subjected to the first-order difference and the second-order difference. Influence factor decomposition is carried out on the coal sales time series data, and an appropriate model can be selected to model the time series data on the basis of acquiring complex effect information.
FIG. 5 is a factoring decomposition diagram of coal sales time series data provided in the embodiments of the present application. In fig. 5, the first graph from top to bottom is the stationary time series data, the second graph is the trend effect graph of the coal sales time series data, the third graph is the seasonal effect graph, and the fourth graph is the residual sequence diagram after the second order difference. According to the trend effect graph, the coal sales volume is on the whole in an increasing trend along with the increase of years and the continuous improvement of living standard. According to the seasonal effect graph, the coal sales are periodic and seasonal, and the peak value of the winter sales is obviously larger than that of other seasons. According to the schematic diagram of the residual sequence, it can be known that the residual sequence after the first-order difference and the second-order difference is a stable sequence, and the fluctuation of each sequence value is small and is basically stable at a fixed value.
In one embodiment, after obtaining the stationary time series data of the coal sales, the server needs to check the stationary time series data for pure randomness to determine whether a correlation exists between the sequence values in the stationary time series data. If the correlation exists, the current stationary time sequence data is not a pure random sequence, and the sequence values have close relation. The time series data have analytical value only if the sequence values have correlation with each other, and the historical data can influence the future data trend. The stationary time series data does not necessarily have analysis value, and pure randomness check is carried out before modeling, so that whether the current time series needs to be analyzed continuously can be directly determined, useless data processing is avoided, and waste of computer resources is reduced.
S103: the server constructs a difference integration moving average autoregressive model, an autocorrelation graph and a partial autocorrelation graph of the stationary time sequence data, and estimates model parameters of the difference integration moving average autoregressive model according to the autocorrelation graph and the partial autocorrelation graph so as to obtain a product seasonal model for estimating coal sales data.
After the server obtains the stable time sequence, the server selects a product seasonal model to model the coal sales stable time sequence in consideration of the complex interactive relation among the trend effect, the seasonal effect and the random fluctuation of the time sequence so as to improve the accuracy of prediction.
First, the server constructs a differential integrated moving Average Autoregressive model (ARIMA):
Figure BDA0003326132640000101
wherein p is an autoregressive coefficient, q is a moving average coefficient, d is the number of differences,
Figure BDA0003326132640000102
Φ(B)=1-φ1B-…-φpBpis an autoregressive coefficient polynomial of an ARIMA (p, q) model, and theta (B) is 1-theta1B-…-θqBpPolynomial of moving average coefficient for ARIMA (p, q) model, xtIs a sequence value.
And then, the server constructs an autocorrelation graph and a partial autocorrelation graph of the stationary time sequence data, and determines the orders of the autocorrelation coefficients and the partial autocorrelation coefficient truncation in the autocorrelation graph and the partial autocorrelation graph, wherein the orders are the model parameters, namely p and q, of the difference integration moving average autoregressive model. So far, the construction of the model is completed, and a multiplicative seasonal model for estimating coal sales data is obtained by determining unknown parameters in the ARIMA model. The model can accurately predict the future coal sales amount based on the complex effect information of the time series data.
S104: and the server inputs the stable time sequence data into the multiplicative seasonal model for model fitting and adjusts model parameters.
And the server takes the stable time sequence data corresponding to the coal sales amount as sample data, inputs the sample data into the multiplicative seasonal model obtained in the S103 for model fitting, and continuously adjusts model parameters in the fitting process, so that the multiplicative seasonal model with the best prediction effect is finally obtained.
Fig. 6 is a fitting graph of the multiplicative seasonal model provided by the embodiment of the present application. As can be seen from FIG. 6, the difference between the predicted curve and the actual curve is almost the same, and the fitting degree of the seasonal model of multiplication is high.
S105: and the server predicts the coal sales data based on the seasonal model multiplied by the adjusted model parameters.
Based on the seasonal model with the best prediction effect obtained in the S104 process, the coal sales time series data of different energy enterprises are input into the model, and then the future coal sales data of the enterprises can be predicted, so that references are provided for purchasing plans, fund allocation and production decisions of coal.
Fig. 7 is a schematic diagram of coal sales prediction data provided in an embodiment of the present application. As shown in fig. 7, the actual coal sales time series diagram and the predicted coal sales time series diagram are relatively similar, which indicates that the prediction effect of the currently used multiplicative seasonal model is optimal.
Fig. 8 is a flowchart of another coal sales data prediction method according to an embodiment of the present application, and as shown in fig. 8, historical coal sales data is first obtained, and then missing value padding is performed on the historical coal sales data through an exponential smoothing algorithm, so as to obtain continuous time series data. And then, carrying out stationarity processing on the continuous coal sales data, and carrying out decomposition on the trend effect, the periodic effect and the seasonal effect on the time series data. Then, unknown parameters of the model are estimated through an autocorrelation graph and a partial autocorrelation graph of the time sequence data based on a pre-constructed ARIMA model, and a prediction model, namely a multiplicative seasonal model, is constructed. And then, taking the coal sales time series data as a sample, fitting the multiplicative seasonal model, and adjusting model parameters of the multiplicative seasonal model so as to obtain an optimal prediction model. And finally, predicting the coal sales through the adjusted model to obtain final sales prediction data.
Fig. 9 is a schematic structural diagram of a structure of a coal sales data prediction apparatus according to an embodiment of the present application. As shown in fig. 9, the apparatus includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to: obtaining historical coal sales data of an enterprise from a database, and filling missing values in the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time series data; carrying out stabilization processing on the coal sales time series data to obtain stable time series data; constructing a difference integration moving average autoregressive model, and an autocorrelation chart and a partial autocorrelation chart of stationary time sequence data, and estimating model parameters of the difference integration moving average autoregressive model according to the autocorrelation chart and the partial autocorrelation chart so as to obtain a product seasonal model for estimating coal sales data; inputting the stationary time sequence data into a multiplicative seasonal model for model fitting, and adjusting model parameters; and predicting the coal sales data based on the seasonal model multiplied by the adjusted model parameters.
Some embodiments of the present application provide a non-transitory computer storage medium storing computer-executable instructions configured to: obtaining historical coal sales data of an enterprise from a database, and filling missing values in the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time series data; carrying out stabilization processing on the coal sales time series data to obtain stable time series data; constructing a difference integration moving average autoregressive model, and an autocorrelation chart and a partial autocorrelation chart of stationary time sequence data, and estimating model parameters of the difference integration moving average autoregressive model according to the autocorrelation chart and the partial autocorrelation chart so as to obtain a product seasonal model for estimating coal sales data; inputting the stationary time sequence data into a multiplicative seasonal model for model fitting, and adjusting model parameters; and predicting the coal sales data based on the seasonal model multiplied by the adjusted model parameters.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the device and media embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference may be made to some descriptions of the method embodiments for relevant points.
The device and the medium provided by the embodiment of the application correspond to the method one to one, so the device and the medium also have the similar beneficial technical effects as the corresponding method, and the beneficial technical effects of the method are explained in detail above, so the beneficial technical effects of the device and the medium are not repeated herein.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The use of the phrase "including a" does not exclude the presence of other, identical elements in the process, method, article, or apparatus that comprises the same element, whether or not the same element is present in all of the same element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A coal sales data prediction method, characterized in that the method comprises:
acquiring historical coal sales data of an energy enterprise from a database, and filling missing values in the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time series data;
carrying out stabilization processing on the coal sales time series data to obtain stable time series data;
constructing a difference integration moving average autoregressive model, and an autocorrelation graph and a partial autocorrelation graph of the stationary time sequence data, and estimating model parameters of the difference integration moving average autoregressive model according to the autocorrelation graph and the partial autocorrelation graph so as to obtain a product seasonal model for estimating coal sales data;
inputting the stationary time sequence data into the multiplicative seasonal model for model fitting, and adjusting the model parameters;
and predicting the coal sales data based on the seasonal model multiplied by the adjusted model parameters.
2. The method for predicting coal sales data according to claim 1, wherein the smoothing of the coal sales time-series data specifically comprises:
performing stability check on the coal sales time series data to determine whether the coal sales time series data is a stable sequence;
under the condition that the coal sales time series data are non-stationary sequences, performing first-order difference on the coal sales time series data, and performing stationarity check on the coal sales time series data subjected to the first-order difference again to determine whether the coal sales time series data subjected to the first-order difference are still the non-stationary sequences;
and if the coal sales time sequence data are still non-stationary sequences, performing second-order difference on the coal sales time sequence data.
3. The method of predicting coal sales data of claim 2, further comprising:
extracting trend effect information in the coal sales time series data by performing first-order difference on the coal sales time series data;
extracting seasonal effect information in the coal sales time series data by performing second-order difference on the coal sales time series data;
and periodically analyzing the coal sales residual sequence subjected to the first-order difference and the second-order difference to obtain periodic effect information in the coal sales time series data.
4. The method for predicting coal sales data according to claim 1, wherein before constructing the differential integrated moving average autoregressive model, the method further comprises:
carrying out pure randomness verification on the stationary time sequence data, and judging whether correlation exists among sequence values in the stationary time sequence data or not;
and determining that the stationary time sequence data is not a purely random sequence under the condition that a correlation exists between the sequence values, and inputting the stationary time sequence data into the multiplicative seasonal model for model fitting.
5. The method for predicting coal sales data according to claim 1, wherein estimating model parameters of the difference-integrated moving average autoregressive model according to the autocorrelation graph and the partial autocorrelation graph specifically comprises:
estimating an autocorrelation coefficient corresponding to the autocorrelation graph and an order of a partial autocorrelation coefficient truncation corresponding to the partial autocorrelation graph according to the autocorrelation graph and the partial autocorrelation graph; and the order is a model parameter of the difference integration moving average autoregressive model.
6. The method for predicting coal sales data according to claim 1, wherein performing stationarity check on the coal sales time-series data to determine whether the coal sales time-series data is a stationary sequence specifically comprises:
constructing a corresponding coal sales time series diagram according to the coal sales time series data; determining whether each sequence value in the coal sales time sequence chart fluctuates up and down around a constant value and whether a limit exists in the fluctuation range of each sequence value;
determining the coal sales time series data as a stable sequence under the condition that each sequence value fluctuates up and down around a constant value and the fluctuation range has a limit; or
Determining an autocorrelation graph of the coal sales time-series data, and determining whether the coal sales time-series data are a stationary sequence according to the decay rate of an autocorrelation coefficient in the autocorrelation graph; or
And judging whether the coal sales time series data have a unit root or not, and if not, determining that the coal sales time series data are stable sequences.
7. The coal sales data prediction method according to claim 1, wherein the missing value filling is performed on the historical coal sales data through an exponential smoothing algorithm, and specifically comprises:
calculating a horizontal component, a trend component and a seasonal component of the historical coal sales data through an addition model; accumulating the horizontal component, the trend component and the seasonal component, and predicting to obtain continuous coal sales time series data; or
Calculating a horizontal component, a trend component and a seasonal component of the historical coal sales data through a multiplication model; and accumulating and multiplying the horizontal component, the trend component and the seasonal component to predict and obtain continuous coal sales time series data.
8. The method of predicting coal sales data according to claim 1, wherein the coal sales time-series data are a continuous series of sequential values in months, the sequential values corresponding to months; wherein the sequence value is coal sales data.
9. A coal sales data prediction apparatus, comprising:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to:
obtaining historical coal sales data of an enterprise from a database, and filling missing values in the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time series data;
carrying out stabilization processing on the coal sales time series data to obtain stable time series data;
constructing a difference integration moving average autoregressive model, and an autocorrelation graph and a partial autocorrelation graph of the stationary time sequence data, and estimating model parameters of the difference integration moving average autoregressive model according to the autocorrelation graph and the partial autocorrelation graph so as to obtain a product seasonal model for estimating coal sales data;
inputting the stationary time sequence data into the multiplicative seasonal model for model fitting, and adjusting the model parameters;
and predicting the coal sales data based on the seasonal model multiplied by the adjusted model parameters.
10. A non-transitory computer storage medium storing computer-executable instructions, the computer-executable instructions configured to:
obtaining historical coal sales data of an enterprise from a database, and filling missing values in the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time series data;
carrying out stabilization processing on the coal sales time series data to obtain stable time series data;
constructing a difference integration moving average autoregressive model, and an autocorrelation graph and a partial autocorrelation graph of the stationary time sequence data, and estimating model parameters of the difference integration moving average autoregressive model according to the autocorrelation graph and the partial autocorrelation graph so as to obtain a product seasonal model for estimating coal sales data;
inputting the stationary time sequence data into the multiplicative seasonal model for model fitting, and adjusting the model parameters;
and predicting the coal sales data based on the seasonal model multiplied by the adjusted model parameters.
CN202111262945.7A 2021-10-28 2021-10-28 Coal sales data prediction method, equipment and medium Active CN113962741B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111262945.7A CN113962741B (en) 2021-10-28 2021-10-28 Coal sales data prediction method, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111262945.7A CN113962741B (en) 2021-10-28 2021-10-28 Coal sales data prediction method, equipment and medium

Publications (2)

Publication Number Publication Date
CN113962741A true CN113962741A (en) 2022-01-21
CN113962741B CN113962741B (en) 2024-05-14

Family

ID=79467932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111262945.7A Active CN113962741B (en) 2021-10-28 2021-10-28 Coal sales data prediction method, equipment and medium

Country Status (1)

Country Link
CN (1) CN113962741B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115575417A (en) * 2022-08-03 2023-01-06 华能应城热电有限责任公司 Coal moisture detection method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104504465A (en) * 2014-12-16 2015-04-08 国电南京自动化股份有限公司 Power generation fuel supply prediction method
CN111210278A (en) * 2020-01-09 2020-05-29 河南科技大学 Coal industry stock price prediction method based on time series
WO2021072887A1 (en) * 2019-10-18 2021-04-22 平安科技(深圳)有限公司 Abnormal traffic monitoring method and apparatus, and device and storage medium
CN113506121A (en) * 2021-04-01 2021-10-15 常州工学院 Analysis method and device for price influence factors

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104504465A (en) * 2014-12-16 2015-04-08 国电南京自动化股份有限公司 Power generation fuel supply prediction method
WO2021072887A1 (en) * 2019-10-18 2021-04-22 平安科技(深圳)有限公司 Abnormal traffic monitoring method and apparatus, and device and storage medium
CN111210278A (en) * 2020-01-09 2020-05-29 河南科技大学 Coal industry stock price prediction method based on time series
CN113506121A (en) * 2021-04-01 2021-10-15 常州工学院 Analysis method and device for price influence factors

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115575417A (en) * 2022-08-03 2023-01-06 华能应城热电有限责任公司 Coal moisture detection method and device
CN115575417B (en) * 2022-08-03 2023-10-31 华能应城热电有限责任公司 Coal moisture detection method and device

Also Published As

Publication number Publication date
CN113962741B (en) 2024-05-14

Similar Documents

Publication Publication Date Title
CN110400021B (en) Bank branch cash usage prediction method and device
WO2019001120A1 (en) Method and system for processing dynamic pricing data of commodity
CN107016571A (en) Data predication method and its system
US8620834B2 (en) Forecasting through time domain analysis
CN103778474A (en) Resource load capacity prediction method, analysis prediction system and service operation monitoring system
CN109726865A (en) Customer charge probability density prediction technique, device and storage medium based on EMD-QRF
CN111738507A (en) Bank clearing position fund payment amount prediction method, device, equipment and medium
US8219368B1 (en) Capacity modeling system
CN113962741A (en) Coal sales data prediction method, equipment and medium
CN111626844A (en) Enterprise credit assessment method and device based on big data analysis
CN112418833A (en) Method and device for predicting price change trend of digital currency
CN117853158A (en) Enterprise operation data prediction method and device based on dynamic quantity benefit analysis
CN110956675B (en) Method and device for automatically generating technology maturity curve
Dagnino Estimating software-intensive projects in the absence of historical data
CN116957640A (en) Product sales prediction method and system
CN116883065A (en) Merchant risk prediction method and device
KR20140146437A (en) Apparatus and method for forecasting business performance based on patent information
JP2023169066A (en) Method for analyzing time-series data and obtaining prediction value, program, and storage medium for recording program
Jain et al. Analysis of Time Series Forecasting Techniques for Indian Automotive Industry
JP4461245B2 (en) Stock price fluctuation analysis system
CN114900443B (en) Method and device for establishing incoming line traffic prediction model
Gautam et al. A novel approach for decomposition of financial time series
CN112100913B (en) Data-driven clear electricity price boundary simulation method, system and storage medium
CN115587847A (en) Cigarette sales prediction method and device based on mixed model and storage medium
CN117422176A (en) Business trend prediction method, equipment and medium based on optimization model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant