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

Coal sales data prediction method, equipment and medium Download PDF

Info

Publication number
CN113962741B
CN113962741B CN202111262945.7A CN202111262945A CN113962741B CN 113962741 B CN113962741 B CN 113962741B CN 202111262945 A CN202111262945 A CN 202111262945A CN 113962741 B CN113962741 B CN 113962741B
Authority
CN
China
Prior art keywords
data
coal sales
time series
coal
series data
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.)
Active
Application number
CN202111262945.7A
Other languages
Chinese (zh)
Other versions
CN113962741A (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

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 coal sales data prediction method, equipment and medium, which are used for solving the technical problems that the existing prediction algorithm can not accurately reflect the seasonal periodical change of the coal sales and is low in accuracy. Acquiring historical coal sales data of enterprises from a database, and filling missing values of the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time sequence data; carrying out stabilization treatment on the coal sales time series data to obtain stable time series data; estimating model parameters of a differential integration moving average autoregressive model according to the autocorrelation diagrams and the partial autocorrelation diagrams to obtain a product season model for estimating coal sales data; inputting the stable time sequence data into a product season model for model fitting, and adjusting model parameters; and predicting the coal sales data based on the product season model after the model parameters are adjusted.

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 coal sales data prediction method, equipment and medium.
Background
The coal sales data has important significance for purchasing plan assignment, inventory management, fund turnover, production decision-making and the like of energy enterprises, the accurate trend change of the data is difficult to grasp in manual prediction, the subjectivity is high, and the requirements for market experience, strategic light and the like of decision-making staff are high. Therefore, the data prediction algorithm is rapidly developed in recent years, and the coal industry has special seasonal characteristics, but the common data prediction algorithm does not consider the trend factors and the seasonal factors in the time sequence, and the fitting degree of the model to the data is low, so that the prediction of the coal sales data is inaccurate. In addition, when the obtained data has a missing value, the common data preprocessing method mostly adopts statistics such as a fixed value, an average value, a median, a mode and the like to fill the missing value, and the actual condition of the missing value can not be accurately reflected, so that the reliability of the predicted data is reduced.
Disclosure of Invention
The embodiment of the application provides a coal sales data prediction method, equipment and medium, which are used for solving the technical problems that the existing prediction algorithm can not accurately reflect the seasonal periodical change of the coal sales and is low in accuracy.
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 of the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time sequence data; performing stabilization treatment on the coal sales time series data to obtain stable time series data; constructing a differential integration moving average autoregressive model, and an autocorrelation graph and a partial autocorrelation graph of the stable time sequence data, and estimating model parameters of the differential integration moving average autoregressive model according to the autocorrelation graph and the partial autocorrelation graph to obtain a product season model for estimating coal sales data; inputting the stable time sequence data into the product season model for model fitting, and adjusting the model parameters; and predicting the coal sales data based on the product season model after the model parameters are adjusted.
In one implementation mode of the application, the stabilizing treatment is carried out on the coal sales time series data, and the method specifically comprises the following steps: performing stability verification on the coal sales time series data, and determining whether the coal sales time series data is a stable series or not; under the condition that the coal sales time series data is a non-stable series, carrying out first-order difference on the coal sales time series data, and carrying out stability verification 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 is still a non-stable series; and if the coal sales time series data is still a non-stable series, performing second-order difference on the coal sales time series 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 after the first-order difference and the second-order difference to obtain periodic effect information in the coal sales time sequence data.
In one implementation of the present application, before constructing the differential integrated moving average autoregressive model, the method further includes: performing pure randomness verification on the stable time sequence data, and judging whether a correlation exists between sequence values in the stable time sequence data; under the condition that a correlation exists between sequence values, the stable time sequence data is determined to be not a purely random sequence, and the stable time sequence data can be input into the product season model to perform model fitting.
In one implementation of the present application, estimating model parameters of the differential integrated moving average autoregressive model according to the autocorrelation diagrams and the partial autocorrelation diagrams specifically includes: estimating an autocorrelation coefficient corresponding to the autocorrelation diagram and the offset autocorrelation diagram according to the autocorrelation diagram and the offset autocorrelation coefficient corresponding to the offset autocorrelation diagram; the order is a model parameter of the differential integration moving average autoregressive model.
In one implementation manner of the application, the stability check is performed on the coal sales time series data to determine whether the coal sales time series data is a stable series, which specifically includes: constructing a corresponding coal sales time sequence diagram according to the coal sales time sequence data; determining 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; under the condition that each sequence value fluctuates up and down around a constant value and the fluctuation range is limited, determining the coal sales time sequence data as a stable sequence; or determining an autocorrelation graph of the coal sales time series data, and determining whether the coal sales time series data is a stable sequence according to the attenuation speed of an autocorrelation coefficient in the autocorrelation graph; or judging whether the coal sales time series data has a unit root, and if the unit root does not exist, determining that the coal sales time series data is a stable sequence.
In one implementation of the present application, the filling of missing values for the historical coal sales data by an exponential smoothing algorithm specifically includes: calculating a horizontal component, a trend component and a season 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 sequence data; or calculating horizontal components, trend components and season components of the historical coal sales data through a multiplication model; and multiplying the horizontal component, the trend component and the seasonal component together, and predicting to obtain continuous coal sales time sequence data.
In one implementation mode of the application, the coal sales time series data is a continuous sequence which takes months as a unit and consists of sequence values corresponding to the months; 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: acquiring historical coal sales data of enterprises from a database, and filling missing values of the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time sequence data; performing stabilization treatment on the coal sales time series data to obtain stable time series data; constructing a differential integration moving average autoregressive model, an autocorrelation graph and a partial autocorrelation graph of the stable time sequence data, and estimating model parameters of the differential integration moving average autoregressive model according to the autocorrelation graph and the partial autocorrelation graph to obtain a product season model for estimating coal sales data; inputting the stable time sequence data into the product season model for model fitting, and adjusting the model parameters; and predicting the coal sales data based on the product season model after the model parameters are adjusted.
The embodiment of the application also provides a nonvolatile computer storage medium, which stores computer executable instructions, and is characterized in that the computer executable instructions are configured to: acquiring historical coal sales data of enterprises from a database, and filling missing values of the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time sequence data; performing stabilization treatment on the coal sales time series data to obtain stable time series data; constructing a differential integration moving average autoregressive model, an autocorrelation graph and a partial autocorrelation graph of the stable time sequence data, and estimating model parameters of the differential integration moving average autoregressive model according to the autocorrelation graph and the partial autocorrelation graph to obtain a product season model for estimating coal sales data; inputting the stable time sequence data into the product season model for model fitting, and adjusting the model parameters; and predicting the coal sales data based on the product season model after the model parameters are adjusted.
According to the coal sales data prediction method, the device and the medium, the missing value filling is carried out on the coal sales data through the prediction algorithm, the actual situation of the missing value can be accurately reflected, and compared with the manual prediction and the original filling method, the coal sales data prediction method, the device and the medium are more accurate and higher in efficiency. The continuous coal sales time series data is subjected to stabilization treatment, each influencing factor 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 stable time sequence data as a sample, constructing a corresponding product seasonal model and carrying out parameter adjustment, and improving the fitting degree of the model and the accuracy of the prediction of the corresponding sales data while considering the trend factors and seasonal factors of the coal sales time sequence.
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 specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of a coal sales data prediction method provided by an embodiment of the application;
FIG. 2 is a diagram of an example of filling of raw data of a coal sales volume according to an embodiment of the present application;
FIG. 3 is a diagram of an example of a time series of coal sales data filled by a predictive algorithm according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a time sequence after the stabilization of the coal sales data according to the embodiment of the present application;
FIG. 5 is an exploded view of coal sales time series data factors provided by an embodiment of the present application;
FIG. 6 is a graph of a fitting of a multiplicative seasonal model provided by an embodiment of the application;
FIG. 7 is a schematic diagram of predicted data of coal sales according to an embodiment of the present application;
FIG. 8 is a flowchart of another method for predicting coal sales data according to an embodiment of the present application;
Fig. 9 is a schematic diagram of a coal sales data prediction structure 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 clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The following describes the technical scheme provided by the embodiment of the application in detail through the attached drawings.
Fig. 1 is a flowchart of a coal sales data prediction method provided by an embodiment of the application. As shown in fig. 1, the method for predicting coal sales data provided by the embodiment of the application mainly comprises the following steps:
s101: the server acquires historical coal sales data of enterprises from the database, and performs missing value filling on the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time sequence data.
The historical coal sales data obtained from the database inevitably has individual missing values, and the server needs to ensure that the obtained coal sales time sequence data is continuous and uninterrupted, so that complete and accurate sequence data characteristics can be represented, and the prediction accuracy is improved.
In one embodiment, the server replaces the existing fixed value, mean, median, mode filling methods by an exponential smoothing algorithm to improve the reliability of the filling data. The exponential smoothing algorithm is divided into three forms, namely a primary exponential smoothing method, a secondary exponential smoothing method and a tertiary exponential smoothing method. The primary exponential smoothing method is directed to sequence data with no trend and no seasonality, the secondary exponential smoothing method is directed to sequence data with trend but no seasonality, and the tertiary exponential smoothing method is directed to sequence data with trend and seasonality. Because the coal sales has obvious seasonal effect, the embodiment of the application fills the missing values by adopting a Holt-windows algorithm, namely a three-time exponential smoothing method, thereby ensuring that the filled continuous time sequence has obvious seasonal effect and trend effect and facilitating the subsequent model fitting and feature extraction. The time sequence data of the coal sales obtained after filling the missing values is a continuous sequence consisting of sequence values corresponding to months by taking the months as a unit, and the sequence values are the data of the coal sales.
Specifically, the Holt-windows algorithm is divided into two modes, accumulation and accumulation. The server can calculate the horizontal component, the trend component and the season component of the historical coal sales data through an addition model, and the method is realized through the following formula:
Wherein, Representing horizontal components,/>Representing trend components,/>The season components are represented by primary exponential smoothing, secondary exponential smoothing and tertiary exponential smoothing, respectively. Alpha is a horizontal smoothing coefficient, beta is a trend smoothing coefficient, gamma is a seasonal smoothing coefficient, t represents a period, and pi is a seasonal length (1 month in the embodiment of the present application).
Then, the primary smoothing component, the trend component and the seasonal component are accumulated, and the continuous sequence data is predicted by the following formula:
Where k is the period 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 season component of the historical coal sales data through a multiplication model, and the method is specifically realized through the following formula:
Then, the primary smoothing component, the trend component and the seasonal component are accumulated, and the continuous sequence data is predicted by the following formula:
it should be noted that, the addition model or the multiplication model can predict and obtain sequence data with trends and seasonality, and the application is not limited to the model which is selected to fill the missing value of the historical coal sales data.
Fig. 2 and fig. 3 are respectively a graph of an example of filling of raw data of a coal sales volume and a graph of an example of a time sequence after filling of the raw data of the coal sales volume by a prediction algorithm according to an embodiment of the present application. The abscissa represents time, the ordinate represents coal sales, as shown in fig. 2 and 3, the missing value obtained by the original median and fixed value filling method is too simple to reflect the actual sales situation, and the continuous time sequence estimated by the prediction algorithm takes into account the seasonality, the trend and the periodicity of the coal sales data, so that the reference significance is greater.
S102: and the server performs stabilization treatment on the coal sales time series data to obtain stable time series data.
The server needs to perform stationarity check on the continuous coal sales time series data to judge whether the time series data has stationarity. Only when the characteristics of time series data are stable, the data distribution trend is trace-rotatable, and the distribution trend of future coal sales data can be predicted based on historical data, so that references are provided for coal purchasing of enterprises.
In one embodiment, the server is capable of stationarity checking the coal sales time series data through a timing diagram check, an autocorrelation diagram check, and a unit root check method. The stationarity check for time series data { X t } generally only needs to ensure that it meets the broad stationary condition:
(1) Taking t.epsilon.T, there is A second order matrix representing random variables exists at any time.
(2) Taking T e T, there is EX t = μ, μ is a constant, the first order matrix representing the random variable does not change over time.
(3) Taking T, s, k e T, and k+s-T e T, there is γ (T, s) =γ (k, k+s-T), representing the autocorrelation coefficient between the random variables at two points, only related to the time difference of these two points, and not changing over time.
When the coal sales time series data meets the above three conditions, it can be determined to be a smooth series. Based on the data, the server constructs a corresponding coal sales time sequence diagram according to the coal sales time sequence data. Fig. 3 is a time-series diagram of the coal sales after filling the missing values, and as shown in fig. 3, the abscissa represents time and the ordinate represents the corresponding 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. If each sequence value fluctuates up and down around a constant value and the fluctuation range is limited, 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 alternatively
The server can judge whether the coal sales time series data is a stable series or not according to the autocorrelation graph of the coal sales time series data. This is because stationary sequences have a short-term correlation, and the autocorrelation coefficients decay rapidly to zero as the delay period increases, and decay at a relatively slower rate for non-stationary sequences. If the autocorrelation coefficient decays rapidly, determining the coal sales time series data as a stable series. The autocorrelation coefficients are used for describing the correlation relationship between sequence values in the time sequence data, and the autocorrelation diagrams are used for representing the autocorrelation coefficients in a graphical manner. Or alternatively
The server judges whether the unit root exists in the coal sales time series data, and if the unit root does not exist, the server determines that the coal sales time series data is a stable series.
According to the method, the server can realize stability verification of the coal sales time series data, if the verified result is a non-stable sequence, the server also needs to conduct stabilization treatment on the time series data so as to obtain stable time series data, and 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 treatment on time series data.
Specifically, the server performs a first order difference on the non-steady coal sales time series data, wherein the first order difference is to subtract the last sequence value from the last sequence value in the time series data. And then carrying out stability verification again on the coal sales time series data subjected to the first-order difference, and if the data is still a non-stable series, carrying out second-order difference on the coal sales time series data subjected to the first-order difference, wherein the time series data subjected to the second-order difference is stable time series data.
As shown in the time series schematic diagram of the coal sales data stabilization treatment shown in fig. 4, compared with fig. 3, the data is relatively stable, and has a certain trend and periodicity, and the coal sales in different months also have relatively large fluctuation due to different seasons.
In one embodiment, the server can extract trend effects, seasonal effects, and periodic effects of the time series by differencing the coal sales time series data. The trend effect information in the coal sales time series data can be extracted by performing first-order difference on the coal sales time series data. The 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. The periodic effect information in the coal sales time sequence data can be obtained by periodically analyzing the coal sales residual sequence after the first-order difference and the second-order difference. And (3) carrying out influence factor decomposition on the coal sales time series data, and modeling the time series data by selecting a proper model on the basis of acquiring complex effect information.
Fig. 5 is an exploded view of coal sales time series data factors provided by an embodiment of the present application. In fig. 5, the first graph from top to bottom is a steady time series data, the second graph is a trend effect graph of the coal sales time series data, the third graph is a seasonal effect graph, and the fourth graph is a residual sequence diagram through second-order difference. According to the trend effect graph, the coal sales volume is increased along with the increase of years and the continuous improvement of living standard. According to the seasonal effect map, the coal sales volume is periodic and seasonal, and the peak value of the sales volume in winter is obviously larger than that in other seasons. According to the residual sequence diagram, the residual sequence after the first-order difference and the second-order difference is a stable sequence, and each sequence value has small fluctuation and is basically stable at a fixed value.
In one embodiment, after obtaining the stable time series data of the coal sales, the server also needs to perform a pure randomness check on the stable time series data to determine whether a correlation exists between each sequence value in the stable time series data. If the correlation exists, the current stable time sequence data is not a pure random sequence, and the sequence values have close relations. Only if the sequence values have a correlation with each other, the time series data have an analytical value, and the history data can influence the future data trend. The stable time sequence data does not have an analysis value, and the pure randomness check is carried out before modeling the stable time sequence data, so that whether the current time sequence has the need of continuous analysis or not can be directly determined, thereby avoiding useless data processing and reducing the waste of computer resources.
S103: the server builds a differential integration moving average autoregressive model, an autocorrelation diagram and a partial autocorrelation diagram of the stable time sequence data, and estimates model parameters of the differential integration moving average autoregressive model according to the autocorrelation diagram and the partial autocorrelation diagram to obtain a product season model for estimating coal sales data.
After the server acquires the stable time sequence, the complex interaction relationship among the trend effect, the seasonal effect and the random fluctuation of the time sequence is considered, and a product seasonal model is selected to model the stable time sequence of the coal sales so as to improve the prediction accuracy.
First, the server builds a differentially integrated moving average autoregressive model (Autoregressive IntegratedMoving Average mode, ARIMA):
Where p is an autoregressive coefficient, q is a moving average coefficient, d is the number of differences, Φ (B) =1- Φ 1B-…-φpBp is the autoregressive coefficient polynomial of the ARIMA (p, q) model, Θ (B) =1- θ 1B-…-θqBp is the moving average coefficient polynomial of the ARIMA (p, q) model, x t is the sequence value.
And then, the server constructs an autocorrelation chart and a partial autocorrelation chart of the stable time sequence data, and determines autocorrelation coefficients and the tail-cutting orders of the partial autocorrelation coefficients in the autocorrelation chart and the partial autocorrelation chart, wherein the orders are model parameters, namely p and q, of the differential integration moving average autoregressive model. Thus, the construction of the model is completed, and the product season model for estimating the coal sales data is obtained by determining the unknown parameters in the ARIMA model. The model can accurately predict future coal sales based on complex effect information of time sequence data.
S104: the server inputs the stable time sequence data into the product season model for model fitting, and adjusts model parameters.
The server takes the stable time sequence data corresponding to the sales amount of the coal as sample data, inputs the sample data into the product season model obtained in the step S103 for model fitting, continuously adjusts model parameters in the fitting process, and finally obtains the product season model with the best prediction effect.
Fig. 6 is a graph of a fitting of a multiplicative seasonal model provided by an embodiment of the application. As can be seen from fig. 6, the prediction curve and the actual curve have almost the same difference, and the fitting degree of the product season model is higher.
S105: and the server predicts the coal sales data based on the product season model after the model parameters are adjusted.
Based on the product season model with the optimal prediction effect obtained in the S104 process, the coal sales time series data of different energy enterprises are input into the model, so that future coal sales data of the enterprises can be predicted, and references are provided for purchasing plans, fund distribution and production decisions of the coal.
Fig. 7 is a schematic diagram of predicted data of coal sales according to an embodiment of the present application. As shown in fig. 7, the actual coal sales time series chart and the predicted coal sales time series chart are relatively similar, which indicates that the prediction effect of the currently used product season model is optimal.
Fig. 8 is a flowchart of another method for predicting coal sales data according to an embodiment of the present application, as shown in fig. 8, firstly, historical coal sales data is obtained, and then missing value filling 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 treatment on the continuous coal sales data, and decomposing trend effect, periodic effect and seasonal effect on the time sequence data. Then, based on the ARIMA model constructed in advance, unknown parameters of the model are estimated through an autocorrelation diagram and a partial autocorrelation diagram of time sequence data, so that a prediction model, namely a product season model, is constructed. And then, taking the coal sales time series data as a sample, fitting the product season model, and adjusting model parameters of the product season model so as to obtain an optimal prediction model. And finally, predicting the sales of the coal through the adjusted model to obtain final sales prediction data.
Fig. 9 is a schematic structural diagram 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, the instructions being executable by the at least one processor to enable the at least one processor to: acquiring historical coal sales data of enterprises from a database, and filling missing values of the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time sequence data; carrying out stabilization treatment on the coal sales time series data to obtain stable time series data; constructing a differential integration moving average autoregressive model, an autocorrelation graph and a partial autocorrelation graph of stable time sequence data, and estimating model parameters of the differential integration moving average autoregressive model according to the autocorrelation graph and the partial autocorrelation graph to obtain a product season model for estimating coal sales data; inputting the stable time sequence data into a product season model for model fitting, and adjusting model parameters; and predicting the coal sales data based on the product season model after the model parameters are adjusted.
Some embodiments of the application provide a non-volatile computer storage medium storing computer-executable instructions configured to: acquiring historical coal sales data of enterprises from a database, and filling missing values of the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time sequence data; carrying out stabilization treatment on the coal sales time series data to obtain stable time series data; constructing a differential integration moving average autoregressive model, an autocorrelation graph and a partial autocorrelation graph of stable time sequence data, and estimating model parameters of the differential integration moving average autoregressive model according to the autocorrelation graph and the partial autocorrelation graph to obtain a product season model for estimating coal sales data; inputting the stable time sequence data into a product season model for model fitting, and adjusting model parameters; and predicting the coal sales data based on the product season model after the model parameters are adjusted.
The embodiments of the present application are described in a progressive manner, and the same and similar parts of the embodiments are all referred to each other, and each embodiment is mainly described in the differences from the other embodiments. In particular, for the apparatus and medium embodiments, the description is relatively simple, as it is substantially similar to the method embodiments, with reference to the section of the method embodiments being relevant.
The devices and media provided in the embodiments of the present application are in one-to-one correspondence with the methods, so that the devices and media also have similar beneficial technical effects as the corresponding methods, and since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media are not repeated here.
It will be appreciated by those skilled in the art that 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
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 storage media for a computer 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, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
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. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (7)

1. A method for predicting coal sales data, the method comprising:
acquiring historical coal sales data of an energy enterprise from a database, and filling missing values of the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time sequence data;
performing stabilization treatment on the coal sales time series data to obtain stable time series data;
Constructing a differential integration moving average autoregressive model, and an autocorrelation graph and a partial autocorrelation graph of the stable time sequence data, and estimating model parameters of the differential integration moving average autoregressive model according to the autocorrelation graph and the partial autocorrelation graph to obtain a product season model for estimating coal sales data;
inputting the stable time sequence data into the product season model for model fitting, and adjusting the model parameters;
Predicting the coal sales data based on the product season model with the model parameters adjusted;
the stabilizing treatment of the coal sales time series data specifically comprises the following steps:
Performing stability verification on the coal sales time series data, and determining whether the coal sales time series data is a stable series or not;
Under the condition that the coal sales time series data is a non-stable series, carrying out first-order difference on the coal sales time series data, and carrying out stability verification 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 is still a non-stable series;
If the coal sales time series data is still a non-stable series, performing second-order difference on the coal sales time series data;
The method further comprises the steps of:
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;
Periodically analyzing the coal sales residual sequence after the first-order difference and the second-order difference to obtain periodic effect information in the coal sales time sequence data;
performing stability verification on the coal sales time series data to determine whether the coal sales time series data is a stable series, wherein the method specifically comprises the following steps of:
constructing a corresponding coal sales time sequence diagram according to the coal sales time sequence data; determining 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;
Under the condition that each sequence value fluctuates up and down around a constant value and the fluctuation range is limited, determining the coal sales time sequence data as a stable sequence; or alternatively
Determining an autocorrelation graph of the coal sales time series data, and determining whether the coal sales time series data is a stable sequence or not according to the attenuation speed of an autocorrelation coefficient in the autocorrelation graph; or alternatively
Judging whether the coal sales time series data has a unit root or not, and if the unit root does not exist, determining that the coal sales time series data is a stable series.
2. The method of claim 1, wherein prior to constructing the differential integrated moving average autoregressive model, the method further comprises:
Performing pure randomness verification on the stable time sequence data, and judging whether a correlation exists between sequence values in the stable time sequence data;
Under the condition that a correlation exists between sequence values, the stable time sequence data is determined to be not a purely random sequence, and the stable time sequence data can be input into the product season model to perform model fitting.
3. The method for predicting coal sales data according to claim 1, wherein estimating model parameters of the differential integrated moving average autoregressive model according to the autocorrelation diagrams and the partial autocorrelation diagrams specifically comprises:
Estimating an autocorrelation coefficient corresponding to the autocorrelation diagram and the offset autocorrelation diagram according to the autocorrelation diagram and the offset autocorrelation coefficient corresponding to the offset autocorrelation diagram; the order is a model parameter of the differential integration moving average autoregressive model.
4. The method for predicting the coal sales data according to claim 1, wherein the missing value filling is performed on the historical coal sales data by an exponential smoothing algorithm, and the method specifically comprises the following steps:
Calculating a horizontal component, a trend component and a season 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 sequence data; or alternatively
Calculating a horizontal component, a trend component and a season component of the historical coal sales data through a multiplication model; and multiplying the horizontal component, the trend component and the seasonal component together, and predicting to obtain continuous coal sales time sequence data.
5. The method for predicting coal sales data according to claim 1, wherein the time series data of coal sales is a continuous series consisting of corresponding series values of months in units of months; the sequence value is coal sales data.
6. A coal sales data prediction apparatus, the 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:
Acquiring historical coal sales data of enterprises from a database, and filling missing values of the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time sequence data;
performing stabilization treatment on the coal sales time series data to obtain stable time series data;
Constructing a differential integration moving average autoregressive model, an autocorrelation graph and a partial autocorrelation graph of the stable time sequence data, and estimating model parameters of the differential integration moving average autoregressive model according to the autocorrelation graph and the partial autocorrelation graph to obtain a product season model for estimating coal sales data;
inputting the stable time sequence data into the product season model for model fitting, and adjusting the model parameters;
Predicting the coal sales data based on the product season model with the model parameters adjusted;
the stabilizing treatment of the coal sales time series data specifically comprises the following steps:
Performing stability verification on the coal sales time series data, and determining whether the coal sales time series data is a stable series or not;
Under the condition that the coal sales time series data is a non-stable series, carrying out first-order difference on the coal sales time series data, and carrying out stability verification 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 is still a non-stable series;
If the coal sales time series data is still a non-stable series, performing second-order difference on the coal sales time series data;
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;
Periodically analyzing the coal sales residual sequence after the first-order difference and the second-order difference to obtain periodic effect information in the coal sales time sequence data;
performing stability verification on the coal sales time series data to determine whether the coal sales time series data is a stable series, wherein the method specifically comprises the following steps of:
constructing a corresponding coal sales time sequence diagram according to the coal sales time sequence data; determining 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;
Under the condition that each sequence value fluctuates up and down around a constant value and the fluctuation range is limited, determining the coal sales time sequence data as a stable sequence; or alternatively
Determining an autocorrelation graph of the coal sales time series data, and determining whether the coal sales time series data is a stable sequence or not according to the attenuation speed of an autocorrelation coefficient in the autocorrelation graph; or alternatively
Judging whether the coal sales time series data has a unit root or not, and if the unit root does not exist, determining that the coal sales time series data is a stable series.
7. A non-transitory computer storage medium storing computer-executable instructions, the computer-executable instructions configured to:
Acquiring historical coal sales data of enterprises from a database, and filling missing values of the historical coal sales data through an exponential smoothing algorithm to obtain continuous coal sales time sequence data;
performing stabilization treatment on the coal sales time series data to obtain stable time series data;
Constructing a differential integration moving average autoregressive model, an autocorrelation graph and a partial autocorrelation graph of the stable time sequence data, and estimating model parameters of the differential integration moving average autoregressive model according to the autocorrelation graph and the partial autocorrelation graph to obtain a product season model for estimating coal sales data;
inputting the stable time sequence data into the product season model for model fitting, and adjusting the model parameters;
Predicting the coal sales data based on the product season model with the model parameters adjusted;
the stabilizing treatment of the coal sales time series data specifically comprises the following steps:
Performing stability verification on the coal sales time series data, and determining whether the coal sales time series data is a stable series or not;
Under the condition that the coal sales time series data is a non-stable series, carrying out first-order difference on the coal sales time series data, and carrying out stability verification 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 is still a non-stable series;
If the coal sales time series data is still a non-stable series, performing second-order difference on the coal sales time series data;
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;
Periodically analyzing the coal sales residual sequence after the first-order difference and the second-order difference to obtain periodic effect information in the coal sales time sequence data;
performing stability verification on the coal sales time series data to determine whether the coal sales time series data is a stable series, wherein the method specifically comprises the following steps of:
constructing a corresponding coal sales time sequence diagram according to the coal sales time sequence data; determining 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;
Under the condition that each sequence value fluctuates up and down around a constant value and the fluctuation range is limited, determining the coal sales time sequence data as a stable sequence; or alternatively
Determining an autocorrelation graph of the coal sales time series data, and determining whether the coal sales time series data is a stable sequence or not according to the attenuation speed of an autocorrelation coefficient in the autocorrelation graph; or alternatively
Judging whether the coal sales time series data has a unit root or not, and if the unit root does not exist, determining that the coal sales time series data is a stable series.
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 CN113962741A (en) 2022-01-21
CN113962741B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115575417B (en) * 2022-08-03 2023-10-31 华能应城热电有限责任公司 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

Also Published As

Publication number Publication date
CN113962741A (en) 2022-01-21

Similar Documents

Publication Publication Date Title
US11488074B2 (en) Method for quantile probabilistic short-term power load ensemble forecasting, electronic device and storage medium
KR102044205B1 (en) Target information prediction system using big data and machine learning and method thereof
US7865389B2 (en) Analyzing time series data that exhibits seasonal effects
CN107016571A (en) Data predication method and its system
CN111310981B (en) Reservoir water level trend prediction method based on time series
CN103778474A (en) Resource load capacity prediction method, analysis prediction system and service operation monitoring system
US20110302112A1 (en) Forecasting through time domain analysis
KR20170079161A (en) Target information prediction system using big data and machine learning and method thereof
CN113962741B (en) Coal sales data prediction method, equipment and medium
CN111881058B (en) Software engineering quality prediction method
CA3050952A1 (en) Inspection risk estimation using historical inspection data
CN111415027A (en) Method and device for constructing component prediction model
CN111738507A (en) Bank clearing position fund payment amount prediction method, device, equipment and medium
CN112149907A (en) Sample data prediction method, device and computer readable medium
CN116091118A (en) Electricity price prediction method, device, equipment, medium and product
CN117575187A (en) Dynamic calibration method and system for empty container allocation capacity parameters of railway container
CN114549233A (en) Floating population prediction method based on combination of LGB algorithm and ARIMA algorithm
Boyko Data Interpretation Algorithm for Adaptive Methods of Modeling and Forecasting Time Series
CN114900443B (en) Method and device for establishing incoming line traffic prediction model
CN118095573B (en) Groundwater reserve prediction method
CN111008721A (en) Self-adaptive prediction method and system based on time series prediction model
CN114135794B (en) Method and device for detecting leakage of water network
CN116894716A (en) Method, system, equipment and storage medium for determining interest rate risk index
CN117422176A (en) Business trend prediction method, equipment and medium based on optimization model
Mendes An overview of web effort estimation

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