Natural gas sales decomposition prediction method and device and readable storage medium

By decomposing and correlating the natural gas sales data and building multiple prediction models, the problem of low accuracy of natural gas sales prediction in the existing technology is solved, and higher prediction accuracy is achieved.

CN119250880APending Publication Date: 2025-01-03PETROCHINA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310809940.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-03
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

It is difficult for the prior art to accurately predict natural gas sales, and the accuracy of the prediction results is low due to multiple factors.

Method used

By decomposing the historical time series data of natural gas sales, the trend sequence, periodic sequence and random sequence are obtained, and the correlation analysis is carried out for each sub-sequence and influencing factors, the corresponding prediction model is constructed, and the neural network and other models are used to predict, and finally the sub-sequence is passed Sequence prediction model and achieve sales forecasting.

Benefits of technology

The accuracy of natural gas sales forecast is improved, and relevant factors are selected through decomposition and correlation analysis, and multiple prediction models are constructed to add and achieve the final prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119250880A_ABST
    Figure CN119250880A_ABST
Patent Text Reader

Abstract

The invention discloses a natural gas sales volume decomposition prediction method and device and a readable storage medium, and belongs to the technical field of energy sales volume prediction.The natural gas sales volume decomposition prediction method comprises the steps that sales volume first historical time period time series data are decomposed to obtain at least three subsequences; performing correlation analysis on each sub-sequence and each influence factor in the influence factor set; and respectively constructing a prediction model of each sub-sequence. Natural gas sales volume time series data are decomposed, correlation analysis is performed on a plurality of subsequences formed by decomposition and a plurality of influence factors, so that the influence factors with high correlation with each subsequence are selected, prediction models of the subsequences are constructed in sequence, and sub-prediction is performed based on the prediction models of the subsequences, so that the prediction accuracy of the natural gas sales volume time series data is improved. And the final prediction is realized through addition, so that the prediction accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of energy sales forecasting, and specifically relates to a method, device and readable storage medium for natural gas sales decomposition forecasting. Background Art

[0002] The world's oil and gas industry has entered an extraordinary period. Compared with previous years, the development of my country's natural gas market presents new characteristics, mainly manifested in: 1. The development of the natural gas market is cyclical, and my country's natural gas market has entered an adjustment period; 2. The long-term growth of the natural gas market has not changed, showing strong resilience; 3. The natural gas industry chain is becoming more and more flexible, and the downstream utilization selectivity is becoming more and more flexible; 4. The uncertainty affecting the development of the natural gas market is intensifying; in order to promote the rapid development of the group company's natural gas business, it is necessary to further enhance the flexibility of the company's natural gas industry chain and enhance its response capabilities; reasonably optimize resource allocation, scientifically guide natural gas consumption, and enhance the company's comprehensive competitiveness of natural gas; make good use of market-oriented tools and give play to the leverage and core role of prices.

[0003] However, since the gas demand of the group company's natural gas customers is affected by many factors, and the various factors are coupled with each other, natural gas consumption is affected by multiple factors, making the prediction of natural gas sales very difficult and the accuracy of the prediction results is low. Summary of the invention

[0004] The purpose of the present invention is to provide a method for decomposition prediction of natural gas sales volume, so as to solve the problems in the existing natural gas sales volume prediction process mentioned in the above background technology.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] On the one hand, the present application discloses a method for decomposition prediction of natural gas sales volume, comprising:

[0007] Decompose the time series data of the historical period with the highest sales volume to obtain at least three subsequences;

[0008] Perform correlation analysis on each subsequence and each influencing factor in the influencing factor set, and define one or more influencing factors in the influencing factor set with high correlation with the subsequence as the target factor set corresponding to the subsequence;

[0009] The prediction model for each subsequence is constructed separately. The prediction model of a single subsequence takes the data of the target factor set corresponding to the subsequence in the first historical period as input, and takes the sum of the outputs of all subsequence prediction models as the final sales forecast output.

[0010] Preferably, the method further comprises:

[0011] Obtain the time series data of each influencing factor in the influencing factor set.

[0012] Preferably, the performing correlation analysis on each of the subsequences and each influencing factor in the influencing factor set comprises:

[0013] The correlation coefficient of the time series data of each subsequence and each influencing factor in the influencing factor set is calculated respectively, and the correlation coefficient is compared with a preset threshold to determine the level of correlation.

[0014] Preferably, the step of decomposing the time series data of the first historical period of sales volume to obtain at least three subsequences includes:

[0015] Based on the STL algorithm, the time series data of the historical period with the highest sales volume is decomposed to obtain trend sequence, cycle sequence and random sequence.

[0016] Preferably, the time length of the historical time series data is not less than two years.

[0017] Preferably, the prediction model is trained based on data of a second historical period of the target factor set, and the second historical period is a historical period corresponding to the first historical period.

[0018] Preferably, the prediction model is a neural network model.

[0019] Preferably, the neural network model includes one or more of the following models: a post-feedback network model, a radial basis network model, a random forest model, and a support vector machine model.

[0020] On the other hand, the present application discloses a device for natural gas sales volume decomposition prediction, comprising:

[0021] A decomposition module is configured to decompose the time series data of the first historical period of sales volume into at least three subsequences;

[0022] A correlation analysis module is configured to perform correlation analysis on each subsequence and each influencing factor in the influencing factor set, and define one or more influencing factors in the influencing factor set with a high correlation with the subsequence as a target factor set corresponding to the subsequence;

[0023] The prediction module is configured to construct a prediction model for each subsequence respectively. The prediction model of a single subsequence takes the data of the target factor set corresponding to the subsequence in the first historical period as input, and takes the sum of the outputs of all subsequence prediction models as the final sales forecast output.

[0024] On the other hand, the present application discloses a computer-readable storage medium having a computer program stored thereon, and the computer program implements the above method when executed by a processor.

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] The present application decomposes the natural gas sales time series data, and performs correlation analysis with multiple influencing factors based on the multiple subsequences formed by the decomposition, thereby selecting influencing factors with high correlation with each subsequence, and sequentially constructs prediction models for the subsequences, and performs sub-predictions based on the prediction models of the subsequences, and achieves the final prediction by adding them together, thereby improving the accuracy of the prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 This is a flow chart of the application method;

[0028] Figure 2 This is a schematic diagram of the device for this application;

[0029] Figure 3 This is a diagram of a prediction process for an embodiment of the present application. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] Reference Figure 1 The method for natural gas sales volume decomposition prediction provided by the embodiment of the present invention comprises the following steps:

[0032] S100: Decompose the time series data of the historical period with the highest sales volume to obtain at least three subsequences;

[0033] S200: performing correlation analysis on each subsequence and each influencing factor in the influencing factor set respectively, and defining one or more influencing factors in the influencing factor set with high correlation with the subsequence as a target factor set corresponding to the subsequence;

[0034] S300: Construct a prediction model for each subsequence respectively. The prediction model of a single subsequence takes the data of the target factor set corresponding to the subsequence in the first historical period as input, and takes the sum of the outputs of all subsequence prediction models as the final sales forecast output.

[0035] Reference Figure 3 , the above method is now described in the form of a specific embodiment:

[0036] Specifically, in step S100, the historical time series data of sales may be daily sales data, weekly sales data or monthly sales data within a certain period of history; in order to improve the accuracy of the prediction, a collection of historical daily sales data within a period of time is preferably used as the historical time series data of sales in this embodiment. In order to further improve the accuracy of the prediction, the time length of the selected historical time series data is at least two years, that is, the above historical time series data includes at least two years of daily sales data, weekly sales data or monthly sales data. For example, if the sales in 2023 are predicted, correspondingly, the historical time series data obtained is a collection of daily sales data from 2021 to 2022. At the same time, the time granularity corresponding to the time period to be predicted under different time granularity is also different. For example, based on the historical time series data composed of historical daily sales data, daily sales data for one or more days in the future can be predicted; based on the historical time series data composed of historical weekly sales data, weekly sales data for one or more weeks in the future can be predicted.

[0037] At the same time, in order to distinguish the time period of the sales time series data from other times, the collection time of the sales time series data is correspondingly defined as the first historical period, and this description is used in subsequent descriptions.

[0038] Furthermore, considering that natural gas time series data has characteristics such as periodicity, trend and randomness within a longer period, this embodiment uses the STL algorithm to decompose the historical sales data to obtain trend sequence, period sequence and random sequence;

[0039] The STL (Seasonal and Trend decomposition using Loess) algorithm is a general and robust method for decomposing time series, where the Loess algorithm is a method for estimating nonlinear relationships.

[0040] The STL algorithm mainly decomposes the time series into three main components (which can also be described as subsequences): trend term, cycle term and random term. STL uses the LOESS (locally estimated scatterplot smoothing) algorithm to extract smooth estimates of the three components; the STL algorithm has four main input parameters: endog, period, season and trend.

[0041] endog: represents the data set to be decomposed. It is the first parameter of the STL method. The type of the data set can be a time series. For example, the historical sales time series data in step S110 in this embodiment is used as the input corresponding to endog.

[0042] period: represents the seasonal cycle; if endog is a tabular data structure (dataframe), the STL algorithm can infer the period based on the index, in which case peroid can be specified; in some cases, the period needs to be specified according to user needs. In some embodiments, the value of period is selected based on the sales volume in the time period to be predicted. For example, if monthly sales volume needs to be predicted, period=12 is taken, indicating monthly decomposition; if daily sales volume needs to be predicted, period=365 is taken, indicating daily decomposition.

[0043] season: indicates the length of the seasonal smoother, which must be an odd number, usually season value ≥ 7 (default). The parameter season can be selected by default or specified by the user. When specified by the user, it must meet the conditions described above (must be an odd number, usually season value ≥ 7). In some embodiments, the selected season value is 11.

[0044] trend: represents the length of the trend smoother, which is usually >1-1.5 times of period (or season), and it must be an odd number. In some embodiments, when period=7, the default value of trend is 9; when period=12, the default value of trend is 13. The parameter trend can be selected by default or specified by the user. When specified by the user, it must meet the conditions described above (it must be >1-1.5 times of period (or season), and it must be an odd number).

[0045] In step S200, the influencing factor set represents a collection of factors related to natural gas sales, that is, the influencing factor set is constituted as a set of influencing factors. Exemplarily, the influencing factors include but are not limited to: GDP, population, industrial structure, urbanization rate, energy structure, temperature, and natural gas-related policies. At the same time, in order to facilitate the analysis and reference of the data of the influencing factors, in some embodiments, it is necessary to obtain the time series data of each influencing factor in the influencing factor set, that is, to construct an influencing factor sequence. Exemplarily, such as obtaining the time series data corresponding to GDP, a GDP sequence is constructed.

[0046] Furthermore, considering that the dimensions of various influencing factors are different, in an embodiment of the present invention, the historical statistical data corresponding to each factor in the influencing factor set are first normalized, and then the correlation (specifically, the multiple correlation) analysis between the subsequent multiple influencing factors and the items after the decomposition of the historical sales time series data of natural gas is performed. The related technology lacks a method for adaptive normalization of influencing factors of different dimensions, and most of them are based on the correlation analysis after the units of the influencing factors of numerical type are unified.

[0047] In step S200, correlation analysis is performed on the influencing factors in the influencing factor set and the trend sequence, period sequence and random sequence to obtain one or more influencing factors in the influencing factor set that have high correlation with the trend sequence, period sequence and random sequence respectively (hereinafter referred to as the target factor set), that is, to determine the influencing factors in the influencing factor set that have a greater impact on the trend sequence, period sequence and random sequence respectively.

[0048] In some embodiments, in this step, the confirmation of the correlation between the influencing factors and the trend sequence, the periodic sequence and the random sequence is realized based on the calculation of the correlation coefficient, that is, by calculating the correlation coefficient between the time series data of each influencing factor and the trend sequence, the time series data of each influencing factor and the periodic sequence, and the time series data of each influencing factor and the random sequence. For the convenience of description, the multiple correlation coefficients between the time series data of each influencing factor and the trend sequence are recorded as the first correlation coefficient set, the multiple correlation coefficients between the time series data of each influencing factor and the periodic sequence are recorded as the second correlation coefficient set, and the multiple correlation coefficients between the time series data of each influencing factor and the random sequence are recorded as the third correlation coefficient set. After obtaining the first correlation coefficient set, the second correlation data set and the third correlation data set Afterwards, the correlation coefficients in the first correlation coefficient set, the second correlation coefficient set and the third correlation coefficient set are compared with a set threshold (such as 0.8) to obtain one or more influencing factors corresponding to one or more correlation coefficients whose correlation coefficients are greater than the threshold in the first correlation coefficient set, and recorded as the first target factor set, one or more influencing factors corresponding to one or more correlation coefficients whose correlation coefficients are greater than the threshold in the second correlation coefficient set, and recorded as the second target factor set, and one or more influencing factors corresponding to one or more correlation coefficients whose correlation coefficients are greater than the threshold in the third correlation coefficient set, and recorded as the third target factor set; that is, the target factor sets with high correlations with the trend sequence, the periodic sequence and the random sequence in the influencing factor set are obtained through the above steps;

[0049] In step S300, prediction models of trend sequence, period sequence and random sequence are constructed respectively. The prediction models of trend sequence, period sequence and random sequence can be selected according to the data characteristics of the trend sequence, period sequence and random sequence themselves, that is, the same or different models can be selected as the prediction models of the above trend sequence, period sequence and random sequence. Exemplarily, a neural network model is selected as the above prediction model, and the neural network model includes one or more of the following models: a post-feedback network model, a radial basis network model, a random forest model, and a support vector machine model; at the same time, for the convenience of description, the prediction models of the trend sequence, period sequence and random sequence are respectively recorded as the first model, the second model and the third model;

[0050] Furthermore, the first model, the second model and the third model are all constituted as sales prediction models based on the target factor set. The training process of the first model, the second model and the third model are now explained with the training and prediction process of the first model. For example, if it is necessary to predict the sales data of each month in 2023, it is necessary to collect the historical time series data of monthly sales from 2021 to 2022 (hereinafter referred to as the first time series data), and decompose the first time series data based on the STL algorithm to form a first trend sequence, a first period sequence and a first random sequence, and after performing correlation analysis on the influencing factors in the influencing factor set and the first trend sequence, it is obtained The first target factor set (such as GDP and population) with a high correlation with the first trend sequence is obtained, and then the data of the first target factor set from 2019 to 2020 (such as GDP and population data of each month) and the monthly sales data from 2021 to 2022 are used as training data of the first model to train the first model. For the convenience of description, the time corresponding to the target factor set data during the training of the prediction model is recorded as the second historical period. At this time, the above prediction model is composed of a prediction model that uses the data of the target factor set in the second historical period as training data, uses the data of the target factor set in the second historical period as input of the prediction model, and uses the sales volume in the future period as output;

[0051] Furthermore, based on the above-trained prediction model, sales volume prediction can be achieved. Specifically, the first target factor set data of the first historical period is used as the first model input, the second target factor set data of the first historical period is used as the second model input, and the third target factor set data of the first historical period is used as the third model input, so as to obtain the predicted sales volume of the first model, the second model and the third model in the prediction period respectively, and take the sum of the predicted sales volume of the first model, the second model and the third model as the final sales volume of the prediction period, thereby completing the prediction process.

[0052] Reference Figure 2 On the other hand, the present application discloses a device 400 for natural gas sales volume decomposition prediction, comprising:

[0053] Decomposition module 401, configured to decompose the time series data of the first historical period of sales volume to obtain at least three subsequences;

[0054] A correlation analysis module 402, which is configured to perform correlation analysis on each subsequence and each influencing factor in the influencing factor set, and define one or more influencing factors in the influencing factor set with a high correlation with the subsequence as a target factor set corresponding to the subsequence;

[0055] The prediction module 403 is configured to construct a prediction model for each subsequence respectively. The prediction model of a single subsequence takes the data of the target factor set corresponding to the subsequence in the first historical period as input, and takes the sum of the outputs of all subsequence prediction models as the final sales prediction output.

[0056] Any multiple of the functional modules included in the above-mentioned device 400 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. At least one of the functional modules included in the above-mentioned device can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the functional modules included in the above-mentioned device 400 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.

[0057] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for natural gas sales volume decomposition prediction as described above is implemented.

[0058] The computer-readable storage medium may be included in the device / apparatus described in the above embodiment; or it may exist independently without being assembled into the device / apparatus. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present invention is implemented.

[0059] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.

[0060] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for decomposition forecasting of natural gas sales volume, characterized by: Decompose the time series data of the historical period with the highest sales volume to obtain at least three subsequences; Perform correlation analysis on each subsequence and each influencing factor in the influencing factor set, and define one or more influencing factors in the influencing factor set with high correlation with the subsequence as the target factor set corresponding to the subsequence; The prediction model for each subsequence is constructed separately. The prediction model of a single subsequence takes the data of the target factor set corresponding to the subsequence in the first historical period as input, and takes the sum of the outputs of all subsequence prediction models as the final sales forecast output.

2. A method for natural gas sales volume decomposition prediction according to claim 1, characterized in that: The method further comprises: Obtain the time series data of each influencing factor in the influencing factor set.

3. A method for natural gas sales volume decomposition prediction according to claim 2, characterized in that: The performing correlation analysis on each of the subsequences and each influencing factor in the influencing factor set comprises: The correlation coefficient of the time series data of each subsequence and each influencing factor in the influencing factor set is calculated respectively, and the correlation coefficient is compared with a preset threshold to determine the level of correlation.

4. The method for natural gas sales volume decomposition prediction according to claim 1, characterized in that: The decomposition of the time series data of the first historical period of sales volume to obtain at least three subsequences includes: Based on the STL algorithm, the time series data of the historical period with the highest sales volume is decomposed to obtain trend sequence, cycle sequence and random sequence.

5. The method for natural gas sales volume decomposition prediction according to claim 1, characterized in that: The time length of the historical time series data is not less than two years.

6. The method for natural gas sales volume decomposition prediction according to claim 1, characterized in that: The prediction model is trained based on data of a second historical period of the target factor set, where the second historical period is a historical period corresponding to the first historical period.

7. The method for natural gas sales volume decomposition prediction according to claim 1, characterized in that: The prediction model is a neural network model.

8. A method for natural gas sales volume decomposition prediction according to claim 8, characterized in that: The neural network model includes one or more of the following models: a post-feedback network model, a radial basis network model, a random forest model, and a support vector machine model.

9. A device for decomposing and predicting natural gas sales volume, characterized in that: include: A decomposition module is configured to decompose the time series data of the first historical period of sales volume into at least three subsequences; A correlation analysis module is configured to perform correlation analysis on each subsequence and each influencing factor in the influencing factor set, and define one or more influencing factors in the influencing factor set with a high correlation with the subsequence as a target factor set corresponding to the subsequence; The prediction module is configured to construct a prediction model for each subsequence respectively. The prediction model of a single subsequence takes the data of the target factor set corresponding to the subsequence in the first historical period as input, and takes the sum of the outputs of all subsequence prediction models as the final sales forecast output.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.