Temperature-based natural gas sales prediction method and device and medium

By constructing a linear fitting curve and prediction model of temperature-sales volume, the natural gas sales forecasting process is simplified, the problems of large and time-consuming calculations in the existing technology are solved, and fast and accurate sales forecasts are achieved.

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

Patent Information

Application Number
CN202310808995.3
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

The existing natural gas sales forecasting methods are computationally expensive, time-consuming, and require a lot of data for model training, resulting in a cumbersome prediction process.

Method used

By obtaining the sales data and temperature data of the natural gas interval point within the annual preset time period, a linear fitting curve of temperature-sales is constructed, the user's temperature elastic consumption prediction coefficient and predicted consumption base are obtained, and a prediction model is established to predict natural gas sales.

Benefits of technology

It simplifies influencing factors, improves computing efficiency, and can quickly and accurately predict natural gas sales, meeting the requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119250879A_ABST
    Figure CN119250879A_ABST
Patent Text Reader

Abstract

The invention discloses a temperature-based natural gas sales volume prediction method and device and a medium, and belongs to the technical field of energy demand quantity prediction.The temperature-based natural gas sales volume prediction method comprises the steps that interval point sales volume data and temperature data of natural gas in multiple annual preset time periods are obtained; fitting and constructing a linear fitting curve of the temperature-sales volume data in a preset time period of each year; obtaining a user air temperature elastic consumption prediction coefficient and a prediction consumption cardinal number; and constructing a prediction model based on the user air temperature elastic consumption prediction coefficient and the prediction consumption cardinal number, and performing prediction based on the prediction model. By simplifying influence factors, establishing data points for daily sales volume data and temperature data and performing linear fitting, a temperature-sales volume data linear fitting curve is obtained, and a prediction model is constructed based on the linear fitting curve to realize natural gas sales volume prediction, so that the calculation efficiency is high, sales volume prediction can be quickly performed, and the accuracy meets the requirement.
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 demand prediction, and in particular relates to a method, device and medium for predicting natural gas sales volume based on temperature. Background Art

[0002] As a high-quality, efficient, low-carbon disposable energy, natural gas is showing a rapid growth trend in the energy consumption structure and plays an important role in optimizing the national energy consumption structure.

[0003] User demand in the natural gas market is affected by many factors. Most of the existing predictions involve many factors, and the prediction process is cumbersome and labor-intensive. For example, patent document CN113326983B discloses a data processing system and method for predicting natural gas consumption. By analyzing various factors that affect sales, sales are predicted. This method involves a large amount of calculation and takes a long time to calculate. Another example is patent document CN114997525A discloses a natural gas consumption prediction method, device and medium based on a gray neural network. Prediction is performed through a machine learning model or a time series prediction method. It is necessary to train the model based on a large amount of data in advance, and the training process is also relatively time-consuming. Summary of the invention

[0004] The purpose of the present invention is to provide a method for predicting natural gas sales based on temperature, so as to solve the limitations of the existing natural gas sales prediction method proposed in the above background technology.

[0005] To achieve the above object, the present invention provides the following technical solution: a method for predicting natural gas sales based on temperature, comprising the following steps:

[0006] Obtain the interval point sales volume and temperature data of natural gas in multiple preset time periods of the year;

[0007] Based on the interval point sales data and temperature data, a linear fitting curve of temperature-sales data in each annual preset time period is constructed by fitting;

[0008] Based on the slope value and intercept value of the linear fitting curve of multiple annual preset time periods, the user's temperature elastic consumption prediction coefficient and predicted consumption base are obtained;

[0009] A prediction model is constructed based on the user's temperature elastic consumption prediction coefficient and the predicted consumption base, and prediction is performed based on the prediction model.

[0010] Preferably, the slope value and intercept value of the linear fitting curve based on multiple annual preset time periods to obtain the user temperature elastic consumption prediction coefficient and the predicted consumption base include:

[0011] A year-slope value linear fitting curve and a year-intercept value linear fitting curve are constructed by fitting, and the user temperature elasticity consumption prediction coefficient and the predicted consumption base are calculated based on the year-slope value linear fitting curve and the year-intercept value linear fitting curve.

[0012] Preferably, the method further comprises:

[0013] Evaluate the obtained linear fitting curve of temperature-sales data within each preset time period of each year;

[0014] Based on the evaluation results, the preset time period is segmented, and a linear fitting curve of the temperature-sales data of the segmented time period is constructed by fitting.

[0015] Preferably, the evaluation index for evaluating the linear fitting curve of temperature-sales data obtained in each preset time period is R 2 or MAPE.

[0016] Preferably, said segmenting the preset time period includes segmenting based on heating time and non-heating time.

[0017] Preferably, the interval points constitute a collection period of temperature-sales data.

[0018] Preferably, the interval point sales data and temperature data constitute a set of points of daily temperature data and daily sales data.

[0019] Preferably, the method further comprises:

[0020] Preprocessing is performed on the interval point sales data and temperature data of natural gas obtained within multiple preset time periods, and the preprocessing includes filling in missing data and eliminating abnormal data.

[0021] Preferably, the prediction model is constructed by taking the user temperature elasticity consumption prediction coefficient as the slope and the predicted consumption base as the intercept to construct a linear function of daily temperature-sales volume.

[0022] Preferably, the predicting based on the prediction model includes:

[0023] The average value of the temperature within the prediction time period is obtained, and the sales data within the prediction time period is predicted based on the average value of the temperature.

[0024] In another aspect, the present application discloses a temperature-based natural gas sales forecasting device, comprising:

[0025] An acquisition module configured to acquire interval point sales data and temperature data of natural gas within a plurality of annual preset time periods;

[0026] A curve generation module is configured to construct a linear fitting curve of temperature-sales data in each preset time period of each year through fitting based on the interval point sales data and temperature data;

[0027] A calculation module configured to obtain a user temperature elastic consumption prediction coefficient and a predicted consumption base based on the slope value and intercept value of a linear fitting curve corresponding to a plurality of annual preset time periods;

[0028] The prediction module is configured to build a prediction model based on the user's temperature elastic consumption prediction coefficient and the predicted consumption base, and perform prediction based on the prediction model.

[0029] Preferably, the curve generating module is further configured as follows:

[0030] Evaluate the obtained linear fitting curve of temperature-sales data within each preset time period of each year;

[0031] Based on the evaluation results, the preset time period is segmented, and a linear fitting curve of the temperature-sales data of the segmented time period is constructed by fitting.

[0032] The present application also discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.

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

[0034] This application simplifies the influencing factors, establishes data points for daily sales data and temperature data, and performs linear fitting to obtain a linear fitting curve of temperature-sales data. A prediction model is constructed based on the linear fitting curve to predict natural gas sales. The application has high computational efficiency, can quickly predict sales, and has an accuracy that meets the requirements. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0036] Figure 2 This is a schematic diagram of the device of this application. DETAILED DESCRIPTION

[0037] 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.

[0038] On the one hand, the present application discloses a method for predicting natural gas sales based on temperature. The method is based on analyzing the previous temperature data and sales data of the demand side (such as gas supply agencies, residents and factories) to obtain a relationship between the temperature and sales data, so that in a certain time interval in the future, based on the predicted temperature (such as the temperature information released by the weather network), the natural gas sales in a certain time interval in the future are predicted by the above relationship. Specifically, the present application analyzes the temperature data and sales data in a specific time period (hereinafter referred to as the preset time period) of multiple previous years to predict the sales data in the preset time period of this year (or future years). Specifically, the method includes the following steps:

[0039] S100: Obtaining interval point sales volume data and temperature data of natural gas within multiple annual preset time periods;

[0040] In step S100, the preset time period is constituted as a time in the historical year corresponding to the forecast time period. Preferably, the preset time period is constituted as a continuous time segment, such as a single month, a collection of multiple consecutive months (such as a quarter and multiple quarters). For example, if it is necessary to forecast the sales data of the first quarter of this year (i.e., January to March), the sales data of the first quarter of multiple previous years are collected and obtained accordingly;

[0041] At the same time, the above interval points are defined as data collection cycles, that is, the sales data and temperature data are continuously collected with interval points as cycles within a preset time period, so as to form a temperature-sales data point set, and subsequent operations are performed based on the temperature-sales data point set. Exemplarily, the collection cycle of the above temperature-sales data (i.e., interval points) is 24h or 168h. When the collection cycle is 24h, the sales data and temperature data at the interval points constitute a set of daily temperature-daily sales data points. When the collection cycle is 72h, the sales data and temperature data at the interval points constitute a set of weekly average temperature-weekly sales data points.

[0042] In some embodiments of the method, in step S100, the method further includes preprocessing the interval point temperature-sales data. Specifically, the preprocessing process includes supplementing the missing data. For example, if the temperature data of a certain day is missing, it can be obtained through other channels other than the weather network, or when the sales data of a certain day is missing, it can be obtained through the difference between the total sales and the sales of the rest of the time. Furthermore, the preprocessing process also includes eliminating abnormal data in the interval point temperature-sales data point set, such as eliminating data in the temperature and sales data that have obvious differences with the surrounding data;

[0043] S200: Based on the interval point sales data and temperature data, a linear fitting curve of temperature-sales data in each annual preset time period is constructed by fitting;

[0044] Step S200 is used to process the data obtained in step S100 to obtain a temperature-sales data curve. Specifically, in step S100, the data finally obtained is a set of interval point temperature-sales data points. For the convenience of description, in the subsequent description process, the collection cycle is described as 24 hours, that is, the data finally obtained in step S100 is a point set of daily temperature-sales data;

[0045] Based on this, in step S200, by performing linear fitting on the temperature-sales data points in the point set of daily temperature-daily sales data, a linear fitting curve corresponding to the preset time period of each year is obtained. After the linear fitting curve is obtained, the slope of the linear fitting curve corresponding to the year is calculated, and the slope is defined as the user temperature elasticity consumption coefficient in the preset time period of the year. At the same time, the intercept of the linear fitting curve corresponding to the year is calculated, and the intercept is defined as the consumption base of the year.

[0046] Based on step S200, the slope value and intercept value of the linear fitting curve of multiple years in the preset time period can be obtained, that is, the point set (hereinafter referred to as the first point set) of the annual-user temperature elasticity consumption coefficient (ie, slope value) and the point set (hereinafter referred to as the second point set) of the annual-consumption base (ie, intercept value) of multiple years can be obtained, which will be used in the subsequent step S300;

[0047] In some embodiments of the method, the method further comprises:

[0048] S201: Evaluate the obtained linear fitting curve of temperature-sales data within each annual preset time period;

[0049] S202: segmenting the preset time period based on the evaluation result, and constructing a linear fitting curve of the temperature-sales data of the segmented time period by fitting;

[0050] In step S201, the evaluation indexes of the linear fitting curve for each annual preset time period include R 2 or MAPE, and adopt different operations in step S202 according to the evaluation results;

[0051] For example, R 2 Evaluation indexes are used to evaluate the above fitting curves. When the R value of the linear fitting curve corresponding to a certain year is 2 When it is greater than 0.6, it indicates that the fitting result of the year is valid, that is, the fitting effect is good. Correspondingly, in step S202, it is not necessary to segment the preset time period, that is, the complete preset time period is used as the fitting time period, and the original linear fitting curve is used as the linear fitting curve of the preset time period for the current year;

[0052] When R 2 When the value of is not greater than 0.6, it indicates that the fitting result of the year is not good. Accordingly, in step S202, the preset time period needs to be segmented. Exemplarily, the segmentation basis of the preset time period may be whether heating is on or not, that is, the preset time period is divided into a heating section and a non-heating section, and fitting is performed based on the set of daily temperature-sales data points of the heating section and the set of daily temperature-sales data points of the non-heating section after segmentation, so as to obtain a first fitting curve of the heating section and a second fitting curve of the non-heating section, and a subsequent prediction process is performed based on the above-mentioned first fitting curve and second fitting curve. Specifically, after fitting the first fitting curve of the multi-year heating section, a set of points of the slope value of the year-first fitting curve in the multi-year period (hereinafter recorded as the third point set) and a set of points of the intercept value of the year-first fitting curve (hereinafter recorded as the fourth point set) are obtained, a set of points of the slope value of the year-second fitting curve in the multi-year period (hereinafter recorded as the fifth point set) and a set of points of the intercept value of the year-second fitting curve (hereinafter recorded as the sixth point set) are obtained.

[0053] S300: Obtaining a user temperature elastic consumption prediction coefficient and a predicted consumption base based on the slope value and intercept value of the linear fitting curve of multiple annual preset time periods;

[0054] Specifically, in step S300, based on the slope value and intercept value of the linear fitting curve of multiple annual preset time periods, obtaining the user temperature elastic consumption prediction coefficient and the predicted consumption base includes:

[0055] A year-slope value linear fitting curve and a year-intercept value linear fitting curve are constructed by fitting, and the user temperature elasticity consumption prediction coefficient and the predicted consumption base are calculated based on the year-slope value linear fitting curve and the year-intercept value linear fitting curve.

[0056] In some embodiments of the method, when the data obtained in step S200 is the first point set and the second point set data, that is, when the preset time period does not need to be segmented, the user temperature elastic consumption prediction coefficient corresponding to the preset time period of the predicted year can be obtained by fitting the first point set and substituting the predicted year into the formula, and the predicted consumption base corresponding to the preset time period of the predicted year can be obtained by fitting the second point set and substituting the predicted year into the formula;

[0057] After calculating the user temperature elastic consumption prediction coefficient and the predicted consumption base corresponding to the preset time period in the prediction year, step S400 is executed. Specifically, in step S400, a first prediction model is generated based on the calculated user temperature elastic consumption prediction coefficient and the predicted consumption base, and prediction is performed based on the first prediction model. Exemplarily, the first prediction model is constructed by taking the user temperature elastic consumption prediction coefficient as the slope and the predicted consumption base as the intercept to construct a linear function of daily temperature-sales volume, that is, the first prediction model is constructed as a calculation model with temperature as a single independent variable and sales volume as an output. At this time, when predicting sales volume, the staff only needs to obtain the temperature data of a certain interval point in the future (for example, obtained from the weather network) and input it into the prediction model to obtain the predicted value of sales volume;

[0058] In some other embodiments of the method, the data obtained in step S200 is a third point set, a fourth point set, a fifth point set and a sixth point set, that is, when the preset time period needs to be divided into a heating section and a non-heating section, the prediction process of the heating section is described later, and the prediction process of the non-heating section is roughly the same, so it is not repeated. Specifically, after obtaining the data of the third point set and the fourth point set, the user temperature elasticity consumption prediction coefficient corresponding to the heating section in the prediction year can be obtained by fitting the third point set, and the predicted consumption base corresponding to the heating section in the prediction year can be obtained by fitting the fourth point set;

[0059] At the same time, after obtaining the user temperature elastic consumption prediction coefficient and the predicted consumption base corresponding to the heating section in the forecast year, execute step S400, that is, generate a second prediction model based on the user temperature elastic consumption prediction coefficient and the predicted consumption base corresponding to the heating section in the forecast year, and make predictions based on the above second prediction model. Exemplarily, the above second prediction model is constructed by taking the user temperature elastic consumption prediction coefficient as the slope and the predicted consumption base as the intercept to construct a linear function of daily temperature-sales volume, that is, the first prediction model is constructed as a calculation model with temperature as the single independent variable and sales volume as the output. At this time, when predicting sales volume, the staff only needs to obtain the temperature data of a certain interval point in the future heating section (for example, obtained from the weather network, such as daily temperature, weekly average temperature), and input it into the prediction model to obtain the predicted value of sales volume.

[0060] The present application also discloses a device for predicting natural gas sales volume based on temperature, the device comprising:

[0061] An acquisition module 501 is configured to acquire interval point sales data and temperature data of natural gas within a plurality of annual preset time periods;

[0062] The curve generation module 502 is configured to construct a linear fitting curve of temperature-sales data in each preset time period of each year through fitting based on the interval point sales data and temperature data;

[0063] A calculation module 503, which is configured to obtain a user temperature elastic consumption prediction coefficient and a predicted consumption base based on the slope value and intercept value of the linear fitting curve corresponding to multiple annual preset time periods;

[0064] The prediction module 504 is configured to construct a prediction model based on the user's temperature elastic consumption prediction coefficient and the predicted consumption base, and perform prediction based on the prediction model.

[0065] The curve generating module 502 is further configured as follows:

[0066] Evaluate the obtained linear fitting curve of temperature-sales data within each preset time period of each year;

[0067] Based on the evaluation results, the preset time period is segmented, and a linear fitting curve of the temperature-sales data of the segmented time period is constructed by fitting.

[0068] Any multiple of the functional modules included in the above-mentioned device 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 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.

[0069] The present invention 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 predicting natural gas sales based on temperature as described above is implemented.

[0070] 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.

[0071] 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.

[0072] 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 predicting natural gas sales based on temperature, characterized in that: The steps include: Obtain the interval point sales volume and temperature data of natural gas in multiple preset time periods of the year; Based on the interval point sales data and temperature data, a linear fitting curve of temperature-sales data in each annual preset time period is constructed by fitting; Based on the slope value and intercept value of the linear fitting curve of multiple annual preset time periods, the user's temperature elastic consumption prediction coefficient and predicted consumption base are obtained; A prediction model is constructed based on the user's temperature elastic consumption prediction coefficient and the predicted consumption base, and prediction is performed based on the prediction model.

2. The method for predicting natural gas sales volume based on temperature according to claim 1, characterized in that: The slope value and intercept value of the linear fitting curve based on multiple annual preset time periods to obtain the user temperature elastic consumption prediction coefficient and the predicted consumption base include: A year-slope value linear fitting curve and a year-intercept value linear fitting curve are constructed by fitting, and the user temperature elasticity consumption prediction coefficient and the predicted consumption base are calculated based on the year-slope value linear fitting curve and the year-intercept value linear fitting curve.

3. A method for predicting natural gas sales based on temperature according to claim 1 or 2, characterized in that: The method further comprises: Evaluate the obtained linear fitting curve of temperature-sales data within each preset time period of each year; Based on the evaluation results, the preset time period is segmented, and a linear fitting curve of the temperature-sales data of the segmented time period is constructed by fitting.

4. The method for predicting natural gas sales volume based on temperature according to claim 3, characterized in that: The evaluation index for evaluating the linear fitting curve of temperature-sales data obtained in each preset time period is R 2 or MAPE.

5. The method for predicting natural gas sales volume based on temperature according to claim 4, characterized in that: The segmenting of the preset time period includes segmenting based on heating time and non-heating time.

6. The method for predicting natural gas sales volume based on temperature according to claim 1, characterized in that: The interval points constitute a collection period for temperature-sales data.

7. The method for predicting natural gas sales volume based on temperature according to claim 6, characterized in that: The interval point sales data and temperature data constitute a set of points of daily temperature data and daily sales data.

8. The method for predicting natural gas sales volume based on temperature according to claim 1, characterized in that: The method further comprises: Preprocessing is performed on the interval point sales data and temperature data of natural gas obtained within multiple preset time periods, and the preprocessing includes filling in missing data and eliminating abnormal data.

9. The method for predicting natural gas sales volume based on temperature according to claim 1, characterized in that: The prediction model is constructed by taking the user temperature elasticity consumption prediction coefficient as the slope and the predicted consumption base as the intercept to construct a linear function of daily temperature-sales volume.

10. The method for predicting natural gas sales volume based on temperature according to claim 9, characterized in that: The predicting based on the prediction model comprises: The average value of the temperature within the prediction time period is obtained, and the sales data within the prediction time period is predicted based on the average value of the temperature.

11. A temperature-based natural gas sales forecasting device, characterized in that: include: An acquisition module configured to acquire interval point sales data and temperature data of natural gas within a plurality of annual preset time periods; A curve generation module is configured to construct a linear fitting curve of temperature-sales data in each preset time period of each year through fitting based on the interval point sales data and temperature data; A calculation module configured to obtain a user temperature elastic consumption prediction coefficient and a predicted consumption base based on the slope value and intercept value of a linear fitting curve corresponding to a plurality of annual preset time periods; The prediction module is configured to build a prediction model based on the user's temperature elastic consumption prediction coefficient and the predicted consumption base, and perform prediction based on the prediction model.

12. The device according to claim 11, characterized in that: The curve generation module is further configured as: Evaluate the obtained linear fitting curve of temperature-sales data within each preset time period of each year; Based on the evaluation results, the preset time period is segmented, and a linear fitting curve of the temperature-sales data of the segmented time period is constructed by fitting.

13. 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 10 is implemented.

Citation Information

Cited By

  • Natural gas consumption prediction method and system based on temperature interval

    CN120181469A