Weather-based natural gas sales forecasting and model building method and device
By building a weather-based natural gas sales forecast model, the problem of existing forecasts relying on experience judgment is solved, more accurate sales forecasts are achieved, resource waste and costs are reduced, and the company's market competitiveness is enhanced.
Patent Information
- Application Number
- CN202411923181.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-25
AI Technical Summary
Existing natural gas sales forecasts rely on empirical judgments and are prone to doping subjective factors, resulting in inaccurate predictions, low compliance rates, waste of resources and increased costs.
By obtaining weather data and natural gas sales data in the target area, a comprehensive weather index is constructed, and an exponential relationship model of weather index and natural gas sales is constructed based on this, and iterative adjustments are made to improve prediction accuracy.
It improves the accuracy of natural gas sales forecasts, reduces resource waste and costs, and enhances the profitability and market competitiveness of enterprises.
Smart Images

Figure CN119359356B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sales forecasting, and in particular to a method and device for forecasting and modeling natural gas sales based on weather. Background Art
[0002] The sales volume of natural gas is closely related to demand, and the demand for natural gas is affected by many factors, including but not limited to season, temperature, contracts, plans, policies, etc. The uncertainty of changes in natural gas demand leads to uncertainty in the sales volume of natural gas, which may cause the sales volume of natural gas to fluctuate widely, grow rapidly, and have high peaks.
[0003] Due to the serious trend of global warming, frequent extreme weather, and high international energy prices, energy costs have increased. In addition, the separation of pipeline companies and oil and gas companies has led to the compression of oil and gas companies' own peak-shaving capabilities, and the imbalance management of pipeline companies has become more stringent, making it more difficult to balance operations. Accurate prediction of natural gas sales is conducive to reducing energy costs and improving the peak-shaving capabilities of oil and gas companies; timely adjustment of gas supply according to sales forecast results can also effectively avoid waste of resources.
[0004] At present, natural gas sales forecasts still rely on experience and judgment, with market sales personnel predicting future natural gas sales based on contractual agreements with customers, formal plan formulation, pipeline conditions and market conditions. This forecasting method is easily mixed with subjective factors and cannot make accurate forecasts, resulting in low forecast compliance, waste of resources, increased costs, etc., and cannot meet current needs. Summary of the invention
[0005] In view of the above problems, the present invention is proposed to provide a method and device for weather-based natural gas sales forecasting and model building that overcomes the above problems or at least partially solves the above problems. The problem that natural gas sales forecasting is easily mixed with subjective factors and leads to inaccurate forecasting is solved, the compliance rate of natural gas forecasting is improved, resource waste is avoided, and costs are reduced.
[0006] An embodiment of the present invention provides a natural gas sales forecasting method based on weather, comprising:
[0007] Acquire weather data and natural gas sales data in a specified time period of a target area; the weather data includes data of weather indicators;
[0008] selecting at least one weather indicator, and determining a comprehensive weather index based on data of the selected weather indicator;
[0009] Constructing an exponential relationship model between the comprehensive weather index and the natural gas sales volume according to the natural gas sales volume data, the relationship between the comprehensive weather index and the preset weather index critical value;
[0010] Based on the preset model evaluation index, the prediction accuracy of the exponential relationship model is evaluated, and the exponential relationship model is iteratively adjusted based on the evaluation result until the evaluation result meets the requirements, thereby obtaining a constructed exponential relationship model of the comprehensive weather index and natural gas sales.
[0011] In some optional embodiments, the step of obtaining weather data and natural gas sales data in a specified time period of a target area includes:
[0012] Collect weather data of the target area within a specified time period according to a preset collection cycle, wherein the weather index includes at least one of temperature, wind speed, humidity and air pressure, and the weather data includes at least one of temperature data, wind speed data, temperature data and air pressure data;
[0013] According to the preset collection cycle, the natural gas sales volume in the target area within the specified area is collected.
[0014] In some optional embodiments, determining a comprehensive weather index based on data of selected weather indicators includes:
[0015] If the selected weather index is unique, the weather index is determined as the comprehensive weather index based on the base value of the selected weather index, the maximum value and the minimum value in the specified time period;
[0016] If the selected weather indicator is not unique, the weather index corresponding to each weather indicator is determined respectively, and the comprehensive weather index is determined according to the weather index corresponding to each weather indicator.
[0017] In some optional embodiments, if the selected weather index is unique, the comprehensive weather index E is calculated using the following formula:
[0018]
[0019] in: is the basic value of the weather index, is the maximum value of the weather indicator in the specified time period. The minimum value of the weather indicator in the specified time period.
[0020] In some optional embodiments, if the selected weather index is not unique, and the selected weather index includes temperature, wind speed, humidity and air pressure, the comprehensive weather index E is calculated using the following formula:
[0021]
[0022] Where: C is a constant, is the temperature index within a specified time period, is the wind speed index within the specified time period, is the humidity index within a specified time period, is the air pressure index within a specified time period; where:
[0023]
[0024] Where: is the mean temperature coefficient, is the daily average temperature, is the maximum daily temperature;
[0025]
[0026] Where: is the wind force coefficient, is the daily average temperature, is the human skin temperature, is the wind speed;
[0027]
[0028] In the formula, and h is the humidity coefficient, is the daily average temperature, is the relative humidity value;
[0029]
[0030] In the formula, Standard pressure coefficient, is the atmospheric pressure at the current altitude, is the daily average temperature, is the human skin temperature.
[0031] In some optional embodiments, an exponential relationship model between the comprehensive weather index and the natural gas sales volume is constructed according to the natural gas sales volume data, the relationship between the comprehensive weather index and a preset weather index critical value, including:
[0032] Based on the acquired natural gas sales data, the transaction time period corresponding to the sales data, and the determined comprehensive weather index, a natural gas sales transaction feature data set is extracted;
[0033] According to the natural gas sales data, the relationship between the comprehensive weather index and the preset weather index critical value, an initial index relationship model between the comprehensive weather index and the natural gas sales is constructed.
[0034] A training set is extracted from the natural gas sales transaction feature data set, and the constructed initial exponential relationship model is trained to obtain a trained exponential relationship model.
[0035] In some optional embodiments, the exponential relationship model between the weather index and the natural gas usage includes:
[0036] If the weather index is less than the preset first critical value of the weather index, the total amount of natural gas sales is determined based on the natural gas sales unit price and the natural gas sales volume;
[0037] If the weather index is between the first critical value of the weather index and the second critical value of the weather index, the natural gas sales volume is determined based on the natural gas sales unit price, the natural gas sales volume, the first critical value of the weather index and the second critical value of the weather index;
[0038] If the weather index is greater than a preset weather index second critical value, the total natural gas sales amount is zero.
[0039] In some optional embodiments, the exponential relationship model between the weather index and the natural gas usage is expressed as follows:
[0040]
[0041] Where: P is the total sales of natural gas, A is the unit price of natural gas, M is the sales volume of natural gas, is the weather index, and are the critical values of weather index, is a constant, e is a constant.
[0042] In some optional embodiments, the prediction accuracy of the exponential relationship model is evaluated based on a preset model evaluation index, including:
[0043] Based on the comprehensive weather index corresponding to the weather data in the specified time period of the target area, the natural gas sales forecast data is obtained using the exponential relationship model;
[0044] The root mean square error between the natural gas sales data and the natural gas sales forecast data in the target area within a specified time period is determined, and the forecast accuracy of the exponential relationship model is evaluated based on the root mean square error.
[0045] In some optional embodiments, the above method further includes: preprocessing the weather data and the natural gas usage data, wherein the preprocessing includes missing value filling and / or normalization processing.
[0046] In some optional embodiments, the normalization process includes at least one of min-max normalization and z-score normalization; wherein:
[0047] The min-max normalization process includes: linearly changing each raw data according to the maximum and minimum values of the raw data, and mapping each raw data to the specified data interval;
[0048] The z-score standardization process includes: standardizing each raw data according to the mean and standard deviation of the raw data, and mapping the raw data to the specified data interval according to the normal distribution principle;
[0049] The original data is weather data or natural gas sales data.
[0050] An embodiment of the present invention provides a natural gas sales forecasting method based on weather, comprising:
[0051] Obtain real-time weather data and natural gas usage data for the target area;
[0052] selecting at least one weather indicator, and determining a comprehensive weather index based on data of the selected weather indicator;
[0053] The comprehensive weather index is input into the constructed exponential relationship model between the comprehensive weather index and natural gas sales, and the natural gas sales forecast data of the target area is output;
[0054] The exponential relationship model is constructed using the above-mentioned weather-based natural gas sales forecasting model construction method.
[0055] In some optional embodiments, the above method further includes: preprocessing the weather data and the natural gas usage data, wherein the preprocessing includes missing value filling and / or normalization processing.
[0056] An embodiment of the present invention provides a device for constructing a weather-based natural gas sales forecasting model, comprising:
[0057] A first data acquisition module is used to acquire weather data and natural gas sales data in a specified time period of a target area; the weather data includes data of weather indicators;
[0058] A first index determination module, configured to select at least one weather index and determine a comprehensive weather index based on data of the selected weather index;
[0059] A model building module, used to build an exponential relationship model between the comprehensive weather index and the natural gas sales volume according to the natural gas sales volume data, the relationship between the comprehensive weather index and the preset weather index critical value;
[0060] The model evaluation module is used to evaluate the prediction accuracy of the exponential relationship model based on pre-constructed model evaluation indicators, and iteratively adjust the exponential relationship model based on the evaluation results until the evaluation results meet the requirements, thereby obtaining a constructed exponential relationship model of the comprehensive weather index and natural gas sales.
[0061] An embodiment of the present invention provides a weather-based natural gas sales forecasting device, comprising:
[0062] A second data acquisition module is used to acquire real-time weather data and natural gas usage data of a target area;
[0063] A second indicator determination module is used to select at least one weather indicator and determine a comprehensive weather index based on data of the selected weather indicator;
[0064] A prediction module is used to input the comprehensive weather index into the constructed exponential relationship model between the comprehensive weather index and natural gas sales, and output natural gas sales forecast data for the target area;
[0065] The exponential relationship model between the comprehensive weather index and natural gas sales volume is constructed using the above-mentioned weather-based natural gas sales volume prediction model construction device.
[0066] An embodiment of the present invention provides a computer storage medium, in which computer executable instructions are stored. When the computer executable instructions are executed by a processor, the above-mentioned weather-based natural gas sales forecasting model construction method and / or the above-mentioned weather-based natural gas sales forecasting method are implemented.
[0067] An embodiment of the present invention provides a prediction device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the above-mentioned weather-based natural gas sales prediction model construction method and / or the above-mentioned weather-based natural gas sales prediction method are implemented.
[0068] The beneficial effects of the above technical solution provided by the embodiment of the present invention include at least:
[0069] The weather-based natural gas sales forecasting model construction and sales forecasting method provided in the embodiments of the present invention use the collected weather data and natural gas sales data to build the model, determine the comprehensive weather index according to the weather data during modeling, comprehensively consider the relationship between historical sales data and the comprehensive weather index, build an exponential relationship model, and evaluate and adjust the model until an optimized model is obtained, which is used for natural gas sales forecasting, can accurately predict changes in user demand for natural gas, obtain accurate sales forecast data, and achieve accurate judgment and precise service on natural gas user consumption behavior, improve the stickiness of existing users, and deeply tap the sales value of natural gas customers, thereby helping natural gas sales branches to improve their market competitiveness, enhance corporate profitability, and promote the digital transformation of natural gas sales.
[0070] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0071] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0073] Figure 1 A flowchart of a method for constructing a weather-based natural gas sales forecasting model in an embodiment of the present invention;
[0074] Figure 2 is a flow chart of a natural gas sales forecasting method based on weather in an embodiment of the present invention;
[0075] Figure 3 It is a structural schematic diagram of a device for constructing a weather-based natural gas sales forecasting model in an embodiment of the present invention;
[0076] Figure 4 Schematic diagram of the structure of a weather-based natural gas sales forecasting device in an embodiment of the present invention. DETAILED DESCRIPTION
[0077] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0078] In order to solve the problem of inaccurate natural gas sales forecasting in the prior art, an embodiment of the present invention provides a weather-based natural gas sales forecasting model construction method and a sales forecasting method, which comprehensively considers historical data and weather factors when forecasting natural gas sales without mixing in subjective factors, making the forecast result more objective and accurate, thereby improving the accuracy of natural gas sales forecasting.
[0079] The embodiment of the present invention provides a method for constructing a natural gas sales forecasting model based on weather, and the process is as follows: Figure 1 As shown, the following steps are included:
[0080] S101: Acquire weather data and natural gas sales data in a specified time period of a target area. The weather data includes data of at least one weather indicator;
[0081] S102: Preprocessing weather data and natural gas usage data.
[0082] This step is an optional step, which may be executed or not executed. If not executed, step S103 is executed after step S101. The preprocessing includes missing value filling and / or normalization processing.
[0083] S103: Select at least one weather indicator, and determine a comprehensive weather index based on data of the selected weather indicator.
[0084] S104: constructing an exponential relationship model between the comprehensive weather index and the natural gas sales volume according to the relationship between the natural gas sales volume data, the comprehensive weather index and the preset weather index critical value.
[0085] S105: Based on the preset model evaluation index, the prediction accuracy of the exponential relationship model is evaluated, and the exponential relationship model is iteratively adjusted based on the evaluation result until the evaluation result meets the requirements, thereby obtaining a constructed exponential relationship model of the comprehensive weather index and natural gas sales.
[0086] In the above step S101, weather data and natural gas sales data within a specified time period of the target area are obtained, including: collecting weather data of the target area within a specified time period according to a preset collection cycle, the weather index includes at least one of temperature, wind speed, humidity and air pressure, and the weather data includes at least one of temperature data, wind speed data, temperature data and air pressure data; and collecting natural gas sales volume of the target area within a specified area according to a preset collection cycle. Natural gas sales data may include natural gas transaction volume within a certain area, for example, natural gas transaction volume of a province or a city. Natural gas transaction volume is, for example but not limited to, represented by total natural gas sales.
[0087] Weather data and natural gas sales data can be collected in real time, and natural gas sales data corresponding to different weather types can be collected. When building a model, models can be built for different target areas, and natural gas data and natural gas usage data within a specified time period can be used when building a model. That is, weather data and natural gas sales data are used as raw data for modeling.
[0088] In the above step S102, preprocessing the acquired data includes completing missing value processing on the data, and the completion processing may include modeling prediction, mean interpolation, and high-dimensional mapping of missing values.
[0089] Among them, modeling prediction refers to classifying the original data according to whether it contains missing attributes, and then using machine learning algorithms to predict the missing value data containing specific attributes, and obtain the predicted results to fill the missing values.
[0090] Mean interpolation refers to measuring the distance between the values of a sample attribute. When there is a missing value, the missing position is filled according to the average value of other values of the attribute. If the relationship between the sample attribute values cannot be measured, the mode of other values of the sample attribute except the missing position is directly used to fill it.
[0091] High-dimensional mapping of missing values refers to mapping attributes to high-dimensional space. If it is a continuous variable, the continuous variable is first binned and discretized using the mean, median, etc., and then N variables are mapped to N+1 variables. If it is a discrete variable, when there are missing values in the attribute, the N variables are expanded to N+1 variables, and the N+1th discretized attribute value is set to 1.
[0092] The normalization process includes at least one of min-max normalization and z-score normalization; wherein:
[0093] Optionally, the min-max normalization process includes: performing linear changes on each raw data according to the maximum and minimum values of the raw data, and mapping each raw data to a specified data interval, for example: [0,1] interval; the raw data is weather data or natural gas sales data.
[0094] For example, the min-max normalization calculation formula can be as follows:
[0095]
[0096] Among them: max represents the maximum value of the original data, min represents the minimum value of the original data, Indicates the i-th original data. Taking weather data as an example, max indicates the maximum value of weather data in the specified time period, and min indicates the minimum value of weather data in the specified time period. Represents the initial weather data of the i-th period in the specified time period.
[0097] Optionally, the z-score standardization process includes: standardizing each raw data according to the mean and standard deviation of the raw data, and mapping the raw data to a specified data interval according to a normal distribution principle; the raw data is weather data or natural gas sales data.
[0098] For example, z-score standardization can make the transformed data conform to a normal distribution with a mean of 0 and a standard deviation of 1. The formula for z-score standardization can be as follows:
[0099]
[0100]
[0101]
[0102] in: represents the i-th raw data in the specified time period, n represents the number of raw data, μ represents the mean of the raw data in the specified time period, Represents the standard deviation of the raw data within the specified time period.
[0103] In the above step S103, a comprehensive weather index is determined based on the data of the selected weather indicator, including: if the selected weather indicator is unique, the weather index is determined as the comprehensive weather index based on the basic value of the selected weather indicator, the maximum value and the minimum value within the specified time period; if the selected weather indicator is not unique, the weather index corresponding to each weather indicator is determined separately, and the comprehensive weather index is determined based on the weather index corresponding to each weather indicator.
[0104] If the selected weather index is unique, the comprehensive weather index E is calculated using the following formula:
[0105]
[0106] in: is the basic value of the weather index, is the maximum value of the weather indicator in the specified time period. The minimum value of the weather indicator in the specified time period.
[0107] If the selected weather index is not unique, the selected weather index can be comprehensively considered to calculate the comprehensive weather index. When the selected weather index includes temperature, wind speed, humidity and air pressure, the comprehensive weather index E is calculated using the following formula:
[0108]
[0109] Where: C is a constant, is the temperature index within a specified time period, is the wind speed index within the specified time period, is the humidity index within a specified time period, It is the air pressure index within the specified time period; the specified time period can be a week, a month, a quarter, a year, etc., and the collection period can also be selected in the specified time period, for example, the collection period can be selected as one day, one hour, etc. The following description takes the collection period of one day as an example, that is, the collection period is day. Among them:
[0110] The collection period is daily, and the temperature index in the specified time period is the daily temperature index, which can be expressed as the average of the daily average temperature and the maximum temperature:
[0111]
[0112] Where: is the mean temperature coefficient, is the daily average temperature, The maximum temperature of the day.
[0113] Since wind speed mainly affects people's perception of the temperature of the environment, the collection period is daily, and the wind speed index in the specified time period is the wind speed index for the day. The wind speed index can be expressed as follows:
[0114]
[0115] Where: is the wind force coefficient, is the daily average temperature, is the human skin temperature, is the wind speed.
[0116] The collection period is daily, and the humidity index in the specified time period is the humidity index of the day. There is a power function relationship between humidity and temperature. The humidity index can be expressed as follows:
[0117]
[0118] In the formula, and h is the humidity coefficient, is the daily average temperature, is the relative humidity value, ranging from (0 to 1).
[0119] The collection period is daily. The air pressure index in the specified time period is the air pressure index for the day. The air pressure will affect the thermal sensation of the human body. The air pressure index can be expressed as follows:
[0120]
[0121] In the formula, Standard pressure coefficient, is the atmospheric pressure at the current altitude, is the daily average temperature, is the human skin temperature.
[0122] In the above step S104, based on the relationship between the natural gas sales data, the comprehensive weather index and the preset weather index critical value, an exponential relationship model between the comprehensive weather index and the natural gas sales is constructed, including:
[0123] 1) Based on the acquired natural gas sales data, the trading time period corresponding to the sales data, and the determined comprehensive weather index, a natural gas sales transaction feature data set is extracted;
[0124] The natural gas sales transaction feature dataset can include weather data features and natural gas usage data features. For example, the following categories are selected as indicators: total natural gas sales M, weather index E, and transaction time period T corresponding to sales data, so as to obtain the natural gas sales transaction feature dataset at time t. ,in is the total sales of natural gas at time t, is the weather condition when natural gas is traded at time t, is the time period of natural gas trading at time t, and n is the number of records. Feature extraction is to convert raw data into data that can be interpreted by the model. Feature extraction can also be done by normalization.
[0125] 2) Based on the relationship between natural gas sales data, comprehensive weather index and preset weather index critical value, an initial index relationship model between comprehensive weather index and natural gas sales is constructed.
[0126] 3) Extract a training set from the natural gas sales transaction feature data set, train the constructed initial exponential relationship model, and obtain a trained exponential relationship model.
[0127] When building a model, for example but not limited to using XGBoost, when extracting a training set, for example, the weather data and natural gas sales data of the first n months can be used as the training set. When the model needs to be evaluated later, the weather data and natural gas sales data of the n+1th month can be used as the test set. The sample data in the training set and the test set can include multiple sample records under various weather types, and each sample record includes the natural gas sales data corresponding to the weather data collected at a time.
[0128] In the above step S104, taking the natural gas sales data as the total natural gas sales as an example, the exponential relationship model of the weather index and the natural gas usage constructed includes: if the weather index is less than the preset first critical value of the weather index, the total natural gas sales amount is determined based on the natural gas sales unit price and the natural gas sales volume; if the weather index is between the first critical value of the weather index and the second critical value of the weather index, the natural gas sales amount is determined based on the natural gas sales unit price, the natural gas sales volume, the first critical value of the weather index and the second critical value of the weather index; if the weather index is greater than the preset second critical value of the weather index, the total natural gas sales amount is zero.
[0129] Optionally, a specific form of the exponential relationship model between the weather index and the natural gas usage is expressed as follows:
[0130]
[0131] Where: P is the total sales of natural gas, A is the unit price of natural gas, M is the sales volume of natural gas, is the weather index, and are the critical values of weather index, is a constant, e is a constant.
[0132] An exponential relationship model between the comprehensive weather index and natural gas sales volume is constructed, and evaluation indicators can be further set. The evaluation indicators used in natural gas sales volume forecasting include, but are not limited to, the mean of the normalized root mean square error (NRMSE). When the constructed evaluation indicator is the normalized root mean square error (NRMSE), the calculation formula of the root mean square error (NRMSE) can be as follows:
[0133]
[0134] The mean of NRMSE is:
[0135]
[0136] Among them: when the sample data used to build the model includes several sample records, each sample record includes natural gas sales data corresponding to weather data, is the true value of natural gas sales in the i-th sample record, is the natural gas sales forecast value obtained based on the weather data forecast of the i-th sample, is the actual number of sample records used for prediction.
[0137] In the above step S105, when evaluating the model, RMSE (root mean square error) can be used to measure the gap between the predicted value and the true value. Based on the preset model evaluation index, the prediction accuracy of the exponential relationship model is evaluated, including: based on the comprehensive weather index corresponding to the weather data in the specified time period of the target area, using the exponential relationship model to obtain the natural gas sales forecast data; determining the root mean square error between the natural gas sales data and the natural gas sales forecast data in the specified time period of the target area, and evaluating the prediction accuracy of the exponential relationship model according to the root mean square error.
[0138] The above method collects weather data and natural gas consumption data, preprocesses the collected data, and then constructs evaluation indicators to increase the guarantee for the operation of the method, further make the data precise, and finally conducts model evaluation to ensure the effectiveness of the method in actual application and increase the feasibility of the method from a practical level.
[0139] Since weather has a great impact on the consumption of natural gas, for example, in cold seasons, natural gas demand increases and natural gas prices rise; on the contrary, in warm seasons, natural gas demand decreases and natural gas prices fall. At the same time, extreme weather may become a long-term factor that disturbs natural gas demand and brings about gas shortages in local areas. In this application, by analyzing historical data, the impact of weather factors on natural gas sales is obtained, an exponential relationship model between weather index and natural gas sales is established, and a forecast analysis is conducted on the impact of weather factors on natural gas sales, so that the impact of weather factors can be fully considered when predicting natural gas sales, thereby improving the accuracy of natural gas sales forecasts. The forecast results can be updated at any time according to the latest data, dynamic forecasting can be achieved, and the forecast results can be adjusted in time to help natural gas sales companies formulate corresponding strategies, and can greatly improve the ability of enterprises to grasp market changes.
[0140] Based on the same inventive concept, the embodiment of the present invention also provides a natural gas sales forecasting method based on weather, such as Figure 2 As shown, including:
[0141] S201: Acquire real-time weather data and natural gas usage data of a target area.
[0142] S202: Preprocessing weather data and natural gas usage data.
[0143] This step is optional and may or may not be performed. If it is not performed, step S203 is performed after step S201. The preprocessing includes missing value filling and / or normalization processing. For the preprocessing process, see Figure 1 Related description.
[0144] S203: Select at least one weather indicator, and determine a comprehensive weather index based on data of the selected weather indicator.
[0145] S204: Input the comprehensive weather index into the constructed exponential relationship model of the comprehensive weather index and natural gas sales, and output the natural gas sales forecast data of the target area. The exponential relationship model is constructed using the above-mentioned weather-based natural gas sales forecast model construction method. The latest data collected in real time can be used for prediction.
[0146] The weather-based natural gas sales forecasting model provided in the embodiment of the present invention constructs a sales forecasting method, which uses collected weather data and natural gas sales data to build a model. When modeling, a comprehensive weather index is determined according to the weather data, and the relationship between historical sales data and the comprehensive weather index is comprehensively considered to build an exponential relationship model. The model is evaluated and adjusted until an optimized model is obtained, which is used for natural gas sales forecasting. It can accurately predict changes in user demand for natural gas, obtain accurate sales forecast data, and achieve accurate judgment and precise service on natural gas user consumption behavior, improve the stickiness of existing customers, and deeply tap the sales value of natural gas customers, thereby helping natural gas sales branches to improve their market competitiveness, enhance corporate profitability, and promote the digital transformation of natural gas sales.
[0147] Based on the same inventive concept, the embodiment of the present invention also provides a weather-based natural gas sales forecasting model construction device, the structure of which is as follows: Figure 3 As shown, including:
[0148] The first data acquisition module 11 is used to acquire weather data and natural gas sales data in a specified time period of a target area; the weather data includes data of at least one weather indicator;
[0149] A first index determination module 12, configured to select at least one weather index and determine a comprehensive weather index based on data of the selected weather index;
[0150] The model building module 13 is used to build an exponential relationship model between the comprehensive weather index and the natural gas sales volume according to the relationship between the natural gas sales volume data, the comprehensive weather index and the preset weather index critical value.
[0151] The model evaluation module 14 is used to evaluate the prediction accuracy of the exponential relationship model based on preset model evaluation indicators, and iteratively adjust the exponential relationship model based on the evaluation results until the evaluation results meet the requirements, thereby obtaining a constructed exponential relationship model of the comprehensive weather index and natural gas sales.
[0152] In some optional embodiments, the above-mentioned weather-based natural gas sales forecasting model construction device also includes: a first preprocessing module 15, which is used to preprocess weather data and natural gas usage data, and the preprocessing includes missing value filling and / or normalization processing.
[0153] Based on the same inventive concept, the embodiment of the present invention also provides a weather-based natural gas sales forecasting device, the structure of which is as follows: Figure 4 As shown, including:
[0154] The second data acquisition module 21 is used to acquire real-time weather data and natural gas usage data of the target area;
[0155] A second indicator determination module 22, configured to select at least one weather indicator and determine a comprehensive weather index based on data of the selected weather indicator;
[0156] The prediction module 23 is used to input the comprehensive weather index into the constructed exponential relationship model between the comprehensive weather index and the natural gas sales volume, and output the natural gas sales volume prediction data of the target area.
[0157] The exponential relationship model between the comprehensive weather index and the natural gas sales volume is constructed by the above-mentioned weather-based natural gas sales volume forecasting model construction device. That is, the device also includes the above-mentioned weather-based natural gas sales volume forecasting model construction device 10.
[0158] In some optional embodiments, the above-mentioned weather-based natural gas sales forecasting model construction device also includes: a second preprocessing module, used to preprocess weather data and natural gas usage data, the preprocessing including missing value filling and / or normalization processing.
[0159] In specific applications, the first data acquisition module 11 and the second data acquisition module 21 may be the same functional module or different functional modules. The first index determination module 12 and the second index determination module 22 may be the same functional module or different functional modules. The first preprocessing module 15 and the second preprocessing module may be the same functional module or different functional modules.
[0160] Based on the same inventive concept, an embodiment of the present invention also provides a computer storage medium, in which computer executable instructions are stored. When the computer executable instructions are executed by a processor, the above-mentioned weather-based natural gas sales forecasting model construction method and / or the above-mentioned weather-based natural gas sales forecasting method are implemented.
[0161] Based on the same inventive concept, an embodiment of the present invention also provides a prediction device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the above-mentioned weather-based natural gas sales prediction model construction method and / or the above-mentioned weather-based natural gas sales prediction method are implemented.
[0162] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0163] Unless otherwise specifically stated, terms such as processing, computing, calculating, determining, displaying, etc. may refer to the actions and / or processes of one or more processing or computing systems, or similar devices, which operate and convert data represented as physical (e.g., electronic) quantities within registers or memories of a processing system into other data similarly represented as physical quantities within memories, registers, or other such information storage, transmission, or display devices of the processing system. Information and signals may be represented using any of a variety of different techniques and methods. For example, data, instructions, commands, information, signals, bits, symbols, and chips mentioned throughout the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, light fields or particles, or any combination thereof.
[0164] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process can be rearranged without departing from the scope of protection of the present disclosure. The attached method claims present the elements of the various steps in an exemplary order and are not intended to be limited to the specific order or hierarchy described.
[0165] In the above detailed description, various features are grouped together in a single embodiment to simplify the disclosure. This method of disclosure should not be interpreted as reflecting an intention that the embodiments of the claimed subject matter require more features than are clearly stated in each claim. On the contrary, as reflected in the appended claims, the invention is in a state of having less than all the features of the disclosed individual embodiments. Therefore, the appended claims are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.
[0166] Those skilled in the art will also appreciate that the various illustrative logic blocks, modules, circuits, and algorithmic steps described in conjunction with the embodiments herein can all be implemented as electronic hardware, computer software, or a combination thereof. In order to clearly illustrate the interchangeability between hardware and software, various illustrative components, blocks, modules, circuits, and steps are generally described above around their functions. Whether such functions are implemented as hardware or software depends on specific applications and the design constraints imposed on the entire system. A skilled person can implement the described functions in an alternative manner for each specific application, but such implementation decisions should not be interpreted as departing from the scope of protection of the present disclosure.
[0167] The steps of the method or algorithm described in conjunction with the embodiments herein may be directly embodied as hardware, a software module executed by a processor, or a combination thereof. The software module may be located in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a mobile disk, a CD-ROM, or any other form of storage medium well known in the art. An exemplary storage medium is connected to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium may also be an integral part of the processor. The processor and the storage medium may be located in an ASIC. The ASIC may be located in a user terminal. Of course, the processor and the storage medium may also be present in a user terminal as discrete components.
[0168] For software implementation, the techniques described in this application can be implemented with modules (e.g., procedures, functions, etc.) that perform the functions described in this application. These software codes can be stored in a memory unit and executed by a processor. The memory unit can be implemented within the processor or outside the processor. In the latter case, it is coupled to the processor in a communication manner via various means, which are well known in the art.
[0169] The above description includes examples of one or more embodiments. Of course, it is impossible to describe all possible combinations of components or methods for the purpose of describing the above embodiments, but it should be recognized by those skilled in the art that the various embodiments may be further combined and arranged. Therefore, the embodiments described herein are intended to cover all such changes, modifications and variations that fall within the scope of protection of the appended claims. In addition, with respect to the term "comprising" used in the specification or claims, the word is covered in a manner similar to the term "including", just as "including," is explained as a transitional word in the claims. In addition, any term "or" used in the specification of the claims is intended to mean "non-exclusive or".
Claims
1. A method for constructing a weather-based natural gas sales forecasting model, characterized in that: include: Acquire weather data and natural gas sales data in a specified time period of a target area; the weather data includes data of weather indicators; Select at least one weather indicator, and determine a comprehensive weather index based on the data of the selected weather indicator; wherein, if the selected weather indicator is unique, determine the weather index as the comprehensive weather index based on the basic value of the selected weather indicator, the maximum value and the minimum value within a specified time period; if the selected weather indicator is not unique, determine the weather index corresponding to each weather indicator respectively, and determine the comprehensive weather index based on the weather index corresponding to each weather indicator; According to the natural gas sales data, the relationship between the comprehensive weather index and the preset weather index critical value, an exponential relationship model between the comprehensive weather index and the natural gas sales is constructed; the exponential relationship model between the weather index and the natural gas consumption includes: if the weather index is less than the preset first critical value of the weather index, the total natural gas sales amount is determined according to the natural gas sales unit price and the natural gas sales volume; if the weather index is between the first critical value of the weather index and the second critical value of the weather index, the natural gas sales amount is determined according to the natural gas sales unit price, the natural gas sales volume, the first critical value of the weather index and the second critical value of the weather index; if the weather index is greater than the preset second critical value of the weather index, the total natural gas sales amount is zero; Based on the preset model evaluation index, the prediction accuracy of the exponential relationship model is evaluated, and the exponential relationship model is iteratively adjusted based on the evaluation result until the evaluation result meets the requirements, thereby obtaining a constructed exponential relationship model of the comprehensive weather index and natural gas sales.
2. The method according to claim 1, characterized in that The step of obtaining weather data and natural gas sales data in a specified time period of a target area includes: According to a preset collection cycle, weather data of the target area within a specified time period is collected, wherein the weather index includes at least one of temperature, wind speed, humidity and air pressure, and the weather data includes at least one of temperature data, wind speed data, humidity data and air pressure data; According to the preset collection cycle, the natural gas sales volume in the target area within the specified area is collected.
3. The method according to claim 1, characterized in that If the selected weather index is unique, the comprehensive weather index E is calculated using the following formula: ; in: is the basic value of the weather index, is the maximum value of the weather indicator in the specified time period. The minimum value of the weather indicator in the specified time period.
4. The method according to claim 1, characterized in that If the selected weather index is not unique, and the selected weather index includes temperature, wind speed, humidity and air pressure, the comprehensive weather index E is calculated using the following formula: ; Where: C is a constant, is the temperature index within a specified time period, is the wind speed index within the specified time period, is the humidity index within a specified time period, is the air pressure index within a specified time period; where: ; Where: is the mean temperature coefficient, is the daily average temperature, is the maximum daily temperature; ; Where: is the wind force coefficient, is the daily average temperature, is the human skin temperature, is the wind speed; ; In the formula, and h is the humidity coefficient, is the daily average temperature, is the relative humidity value; ; In the formula, Standard pressure coefficient, is the atmospheric pressure at the current altitude, is the daily average temperature, is the human skin temperature.
5. The method according to claim 1, characterized in that According to the natural gas sales data, the relationship between the comprehensive weather index and the preset weather index critical value, an exponential relationship model between the comprehensive weather index and the natural gas sales is constructed, including: Based on the acquired natural gas sales data, the transaction time period corresponding to the sales data, and the determined comprehensive weather index, a natural gas sales transaction feature data set is extracted; According to the natural gas sales data, the relationship between the comprehensive weather index and the preset weather index critical value, an initial index relationship model between the comprehensive weather index and the natural gas sales is constructed. A training set is extracted from the natural gas sales transaction feature data set, and the constructed initial exponential relationship model is trained to obtain a trained exponential relationship model.
6. The method according to claim 1, characterized in that The exponential relationship model between the weather index and the natural gas consumption is expressed as follows: ; Where: P is the total sales of natural gas, A is the unit price of natural gas, M is the sales volume of natural gas, is the weather index, and are the critical values of weather index, is a constant, e is a constant.
7. The method according to claim 1, characterized in that Based on the preset model evaluation indicators, the prediction accuracy of the exponential relationship model is evaluated, including: Based on the comprehensive weather index corresponding to the weather data in the specified time period of the target area, the natural gas sales forecast data is obtained using the exponential relationship model; The root mean square error between the natural gas sales data and the natural gas sales forecast data in the target area within a specified time period is determined, and the forecast accuracy of the exponential relationship model is evaluated based on the root mean square error.
8. The method according to claim 1, characterized in that Also includes: The weather data and the natural gas usage data are preprocessed, wherein the preprocessing includes missing value filling and / or normalization processing.
9. The method according to claim 8, characterized in that The normalization process includes at least one of min-max normalization and z-score normalization; wherein: The min-max normalization process includes: linearly changing each raw data according to the maximum and minimum values of the raw data, and mapping each raw data to the specified data interval; The z-score standardization process includes: standardizing each raw data according to the mean and standard deviation of the raw data, and mapping the raw data to the specified data interval according to the normal distribution principle; The original data is weather data or natural gas sales data.
10. A natural gas sales forecasting method based on weather, characterized in that: include: Obtain real-time weather data and natural gas usage data for the target area; selecting at least one weather indicator, and determining a comprehensive weather index based on data of the selected weather indicator; The comprehensive weather index is input into the constructed exponential relationship model between the comprehensive weather index and natural gas sales, and the natural gas sales forecast data of the target area is output; The exponential relationship model is constructed using the weather-based natural gas sales forecasting model construction method described in any one of claims 1-9.
11. The method according to claim 10, characterized in that Also includes: The weather data and the natural gas usage data are preprocessed, wherein the preprocessing includes missing value filling and / or normalization processing.
12. A weather-based natural gas sales forecasting model construction device, characterized in that: include: A first data acquisition module is used to acquire weather data and natural gas sales data in a specified time period of a target area; the weather data includes data of weather indicators; A first index determination module is used to select at least one weather indicator and determine a comprehensive weather index according to data of the selected weather indicator; wherein, if the selected weather indicator is unique, the weather index is determined as the comprehensive weather index according to a basic value of the selected weather indicator, a maximum value, and a minimum value within a specified time period; if the selected weather indicator is not unique, the weather index corresponding to each weather indicator is determined respectively, and the comprehensive weather index is determined according to the weather index corresponding to each weather indicator; A model building module is used to build an exponential relationship model between the comprehensive weather index and the natural gas sales volume according to the natural gas sales volume data, the relationship between the comprehensive weather index and the preset weather index critical value; the exponential relationship model between the weather index and the natural gas consumption includes: if the weather index is less than the preset first critical value of the weather index, the total natural gas sales amount is determined according to the natural gas sales unit price and the natural gas sales volume; if the weather index is between the first critical value of the weather index and the second critical value of the weather index, the natural gas sales amount is determined according to the natural gas sales unit price, the natural gas sales volume, the first critical value of the weather index and the second critical value of the weather index; if the weather index is greater than the preset second critical value of the weather index, the total natural gas sales amount is zero; The model evaluation module is used to evaluate the prediction accuracy of the exponential relationship model based on preset model evaluation indicators, and iteratively adjust the exponential relationship model based on the evaluation results until the evaluation results meet the requirements, thereby obtaining a constructed exponential relationship model of the comprehensive weather index and natural gas sales.
13. A weather-based natural gas sales forecasting device, characterized in that: include: The second data acquisition module is used to acquire real-time weather data and natural gas usage data of the target area; A second indicator determination module is used to select at least one weather indicator and determine a comprehensive weather index based on data of the selected weather indicator; A prediction module is used to input the comprehensive weather index into the constructed exponential relationship model between the comprehensive weather index and natural gas sales, and output natural gas sales forecast data for the target area; The exponential relationship model between the comprehensive weather index and natural gas sales volume is constructed using the weather-based natural gas sales volume prediction model construction device described in claim 12.
14. A computer storage medium, characterized in that: The computer storage medium stores computer executable instructions, which, when executed by a processor, implement the weather-based natural gas sales forecasting model construction method described in any one of claims 1-9 and / or the weather-based natural gas sales forecasting method described in any one of claims 10-11.
15. A prediction device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for constructing a weather-based natural gas sales forecasting model as described in any one of claims 1-9 and / or the method for constructing a weather-based natural gas sales forecasting model as described in any one of claims 10-11 are implemented.
Citation Information
Patent Citations
Electricity price prediction method and system based on power grid disclosure data and meteorological data
CN117911059A
Method for predicting short-term electricity price based on LCE algorithm
CN117974216A