Natural gas customer intelligent demand prediction method and system
By automating the construction of customer-level natural gas demand forecasting models and combining various machine learning algorithms and data processing technologies, the problems of insufficient accuracy and high cost of traditional forecasting methods for individual customers have been solved, achieving efficient and accurate demand forecasting and low-cost model management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PETROCHINA CO LTD
- Filing Date
- 2024-11-04
- Publication Date
- 2026-05-08
AI Technical Summary
Traditional natural gas demand forecasting methods struggle to capture the differences in demand from individual customers and cannot adapt to complex and ever-changing market environments, resulting in low forecast accuracy. Furthermore, developing a separate model for each customer is costly and data management is complex.
It employs modules for data acquisition and processing, correlation analysis, model selection, model training, parameter adjustment, model evaluation, and prediction, combined with various machine learning algorithms, to automatically construct customer-level demand prediction models. It uses Pearson correlation coefficient, SHAP value analysis, and regression analysis to screen influencing factors and dynamically adjusts model parameters to improve prediction accuracy.
It significantly improves the accuracy of demand forecasting, enables personalized and dynamic forecasting, reduces development and maintenance costs, improves R&D efficiency, simplifies operation processes, and enhances user experience.
Smart Images

Figure CN121998267A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of energy demand forecasting technology, and specifically relates to a method and system for intelligent demand forecasting of natural gas customers. Background Technology
[0002] With the deepening of domestic natural gas market reforms, market players are becoming increasingly diversified, and market competition is intensifying. In this diversified resource environment, natural gas suppliers urgently need to accurately understand their customers to accurately identify, respond quickly, and proactively adapt to market changes. Against this backdrop, traditional natural gas demand forecasting methods are gradually revealing their limitations and proving difficult to adapt to the rapidly changing market environment. To maintain a competitive edge, natural gas suppliers and related enterprises urgently need a demand forecasting analysis method and system that can dynamically respond to market changes and improve forecasting accuracy.
[0003] Natural gas suppliers and sales companies face the challenge of improving the accuracy of customer demand forecasting. Customer gas consumption characteristics are complex, exhibiting volatility, structural variations, industry-specific factors, and economic considerations. These characteristics comprehensively reflect the fluctuations in gas consumption across different end-users. Furthermore, the external factors influencing user gas consumption fluctuations are interconnected and interdependent, making it difficult for traditional forecasting methods to accurately capture these complex relationships. This results in significant discrepancies between forecasts and actual demand. Currently, natural gas demand forecasting methods primarily focus on national or provincial regions, lacking precise demand forecasts at the individual customer level.
[0004] Currently, existing technologies for natural gas demand forecasting are mainly concentrated at the national or provincial level.
[0005] Forecasting models based on macroeconomic data: These models typically use macroeconomic data, demographic data, and historical natural gas consumption data to predict future natural gas demand. This approach is suitable for broad-based demand forecasting, applicable at the national or provincial level. However, these models cannot capture the demand differences among individual customers and are difficult to apply to more granular customer-level demand forecasting.
[0006] For example, Chinese patent (publication number CN105894113A) discloses a method for short-term natural gas demand forecasting. Based on the collection of meteorological parameters, historical loads, and gas consumption structures in different regions at different times, the method uses MATLAB to perform correlation analysis to determine the load influencing factors. It then uses artificial neural networks, support vector machines, principal component analysis, mixed regression analysis, nodal ratio method, error correction model, and autoregressive distributed lag model to make predictions. Based on traditional classical statistical theory and artificial intelligence algorithms, and through prediction decision theory and optimization techniques, a complete short-term demand forecasting method is formed, which can predict the daily natural gas demand in different regions for the next month.
[0007] Time-series-based forecasting methods, such as the ARIMA model (Autoregressive Moving Average) or exponential smoothing, primarily rely on time-series analysis of historical data for prediction. These methods perform well when processing historical data, but their drawback lies in their lack of responsiveness to future market changes and industry dynamics. Especially when facing complex and volatile market environments, their forecasting accuracy is often unsatisfactory.
[0008] Furthermore, in recent years, machine learning techniques have been widely used in natural gas demand forecasting, such as linear regression, support vector machines (SVM), and random forests. These methods can handle more complex data and improve forecast accuracy to some extent. However, these models have limited generalization ability and cannot adapt to complex and ever-changing market demands. Especially when facing multi-dimensional data and nonlinear relationships, the prediction results of a single model are often less than ideal, and it is difficult to achieve personalized and dynamic forecasts.
[0009] The current natural gas market has a large number of customers, and developing a separate demand forecasting model for each customer faces challenges such as high development costs, complex data management, and difficulties in model maintenance and updates. Therefore, a new method and system for natural gas demand forecasting is needed. Summary of the Invention
[0010] To address the above problems, this invention discloses a natural gas customer intelligent demand forecasting system, comprising:
[0011] The data acquisition and processing module is used to process the acquired natural gas demand influencing factors and natural gas demand data;
[0012] The correlation analysis module is used to analyze the relationship between all influencing factors and natural gas demand, and to filter out the input influencing factors.
[0013] The model selection module is used to select the algorithm model for the input influencing factors;
[0014] The model training module is used to train the algorithm model based on the input influencing factors;
[0015] The parameter adjustment module is used to adjust the parameters of the algorithm model during training and to determine the parameters of the algorithm model.
[0016] The model evaluation module is used to evaluate the performance of the algorithm model after parameter adjustment and select the algorithm model with the highest score as the prediction model.
[0017] The forecasting module is used to predict customers' natural gas demand based on a forecasting model.
[0018] Furthermore, the data acquisition and processing module is specifically used for:
[0019] Collect data on factors influencing natural gas demand and natural gas demand data;
[0020] Data cleaning and completion were performed on the factors influencing natural gas demand and natural gas demand data.
[0021] Preprocessing and data transformation are performed on the natural gas demand influencing factors and natural gas demand data after data completion;
[0022] Data alignment and customer alignment are performed on the natural gas demand influencing factors and natural gas demand data after data transformation, so that all natural gas demand influencing factors and natural gas demand data are mapped to the corresponding customers.
[0023] Furthermore, the correlation analysis module includes a Pearson correlation coefficient analysis unit, a SHAP value analysis unit, and a regression analysis unit;
[0024] The Pearson correlation coefficient analysis unit is used to calculate the Pearson correlation coefficient based on the data of each selected influencing factor and the natural gas demand data, and sort all the calculated Pearson correlation coefficients from largest to smallest absolute value, selecting the top 30%-70% of influencing factors;
[0025] The SHAP value analysis unit is used to determine the contribution of each influencing factor to the natural gas demand forecast based on the SHAP value algorithm, and to sort all the contribution values and select the top 30%-70% of the influencing factors.
[0026] The regression analysis unit is used to build multiple regression models based on each influencing factor and natural gas demand data, calculate the coefficient of determination for each regression model, select the largest coefficient of determination from the multiple coefficients of determination calculated by different regression models for each influencing factor, sort the largest coefficients of determination for each influencing factor, and select the top 30%-70% of influencing factors.
[0027] The correlation analysis module is also used to take the union of the influencing factors selected by the Pearson correlation coefficient analysis unit, the SHAP value analysis unit, and the regression analysis unit, and use it as the input influencing factors.
[0028] Furthermore, the algorithm models include random forest algorithm, support vector regression model, BP neural network algorithm, long short-term memory network algorithm, Lasso regression algorithm, ridge regression algorithm, extreme gradient boosting algorithm, Prophet time series prediction algorithm, lightweight gradient boosting machine learning algorithm, gradient boosting decision tree model, linear regression algorithm, gradient boosting algorithm, Bayesian ridge regression algorithm, active relevance decision theory algorithm, and adaptive boosting algorithm.
[0029] Furthermore, the model training module is used to split the input influencing factors and natural gas demand data into training sets, validation sets, and test sets, and use the training set data to train the selected algorithm model and fit the algorithm model parameters.
[0030] Furthermore, the parameter adjustment module is used to perform an exhaustive search in a predefined hyperparameter space to find the parameter combination of the algorithm model during the training of each algorithm model.
[0031] Furthermore, the model evaluation module uses a validation set to evaluate the performance of the algorithm model after parameter adjustment, and calculates the mean absolute error, mean absolute percentage error, root mean square error, and coefficient of determination.
[0032] Normalize the mean absolute error, mean absolute percentage error, and root mean square error.
[0033] Based on the coefficient of determination, as well as the normalized mean absolute error, mean absolute percentage error, and root mean square error, the algorithm model with adjusted parameters is comprehensively scored, and the algorithm model with the highest score is selected as the prediction model.
[0034] Furthermore, the comprehensive score is determined using the following formula:
[0035] Overall score = R 2 -RMSE norm -MAPE norm -MAE norm
[0036] Among them, R 2 RMSE is the coefficient of determination. norm The root mean square error after normalization; MAPE norm The mean absolute percentage error (MAE) after normalization. norm This represents the mean absolute error after normalization.
[0037] Furthermore, the forecasting module is used to select a forecasting period, periodically update data, and forecast customer natural gas demand.
[0038] Furthermore, it also includes a presentation and application module, which is used to visualize the prediction model and prediction results for each customer.
[0039] This invention also discloses a method for intelligent demand forecasting of natural gas customers, comprising:
[0040] The data acquisition and processing module processes the collected natural gas demand influencing factors and natural gas demand data.
[0041] The correlation analysis module analyzes the relationship between all influencing factors and natural gas demand, and filters out the input influencing factors.
[0042] The algorithm model for selecting input influencing factors is chosen through the model selection module;
[0043] The algorithm model is trained using the model training module based on the input influencing factors;
[0044] The parameters of the algorithm model are adjusted through the parameter adjustment module to determine the parameters of the algorithm model during training.
[0045] The model evaluation module evaluates the performance of the algorithm model after parameter adjustment and selects the algorithm model with the highest score as the prediction model.
[0046] The forecasting module predicts customer natural gas demand based on a forecasting model.
[0047] The display and application module showcases the forecasting model, the forecast results of natural gas demand, and the model parameters.
[0048] Compared with the prior art, the embodiments of the present invention have at least the following advantages:
[0049] 1. Significantly improves demand forecasting accuracy; Personalized forecasting: Through customer-level demand forecasting models, personalized gas usage characteristics and multi-dimensional external influencing factors are considered, significantly improving forecast accuracy; Dynamic adjustment: The system can respond to market changes in real time and dynamically adjust the forecasting model to ensure that the forecast results are closer to actual demand.
[0050] 2. Significantly improves R&D efficiency; Automated processes: From data collection and processing to model building and optimization, the entire process is highly automated, reducing human intervention and significantly improving model development efficiency; Batch support: The system can generate demand forecasting models for a large number of customers simultaneously, solving the problems of high cost and low efficiency in developing individual models.
[0051] 3. Reduced implementation costs; Unified platform: Through a one-stop intelligent demand forecasting system, enterprises do not need to develop separate models for each customer, reducing development and maintenance costs; Easy to expand: The system architecture is flexible and can be easily expanded according to the size and needs of the enterprise to adapt to the business needs of different sizes;
[0052] 4. Enhance data processing and analysis capabilities; Multi-source data integration: The system can integrate complex data from multiple data sources, automatically clean, filter, and extract features, improving data processing efficiency; Intelligent analysis: Through intelligent correlation analysis technology, the system can automatically identify and recommend key influencing factors that have a significant impact on demand forecasting, helping users better understand the data;
[0053] 5. Improved user experience; simplified operation process: The system provides a user-friendly interface, allowing users to complete complex demand forecasting modeling without writing code, thus lowering the barrier to entry; intuitive result display: The system displays forecast results through visualization tools, allowing users to intuitively understand the forecast data and use it for decision support.
[0054] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures pointed out in the description and the drawings. Attached Figure Description
[0055] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0056] Figure 1 A schematic diagram of a natural gas customer intelligent demand forecasting system according to an embodiment of the present invention is shown;
[0057] Figure 2 A flowchart of a natural gas customer intelligent demand forecasting method according to an embodiment of the present invention is shown. Detailed Implementation
[0058] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0059] like Figure 1 As shown, the present invention proposes a natural gas customer intelligent demand forecasting system, comprising:
[0060] The data acquisition and processing module is used to process the acquired natural gas demand influencing factors and natural gas demand data;
[0061] The correlation analysis module is used to analyze the relationship between all influencing factors and natural gas demand, and to filter out the input influencing factors.
[0062] The model selection module is used to select the algorithm model for the input influencing factors;
[0063] The model training module is used to train the algorithm model based on the input influencing factors;
[0064] The parameter adjustment module is used to adjust the parameters of the algorithm model during training and to determine the parameters of the algorithm model.
[0065] The model evaluation module is used to evaluate the performance of the algorithm model after parameter adjustment and select the algorithm model with the highest score as the prediction model.
[0066] The forecasting module is used to predict customers' natural gas demand based on a forecasting model.
[0067] The present invention provides a natural gas customer intelligent demand forecasting system that significantly improves the accuracy of demand forecasting. By using a customer-level demand forecasting model, it takes into account the customer's personalized gas consumption characteristics and multi-dimensional external influencing factors, thus significantly improving the accuracy of forecasting. The system can respond to market changes in real time and dynamically adjust the forecasting model to ensure that the forecast results are closer to actual demand.
[0068] 1. Data Acquisition and Processing Module:
[0069] a) Automated Data Acquisition: Automatically acquires massive amounts of data related to the natural gas market from multiple data sources, including factors influencing natural gas demand and natural gas demand data. This involves six major data domains: customer basic data (full name, abbreviation, province, city, industry classification, equity information, etc.), sales and operations (natural gas purchase contracts, contract prices, auction volume, auction price, daily gas consumption, etc.), natural gas market (natural gas production, import volume, imported LNG (liquefied natural gas) shipping schedules, residential gas prices in various provinces and cities, industrial and commercial gas prices in various provinces and cities, gas storage levels (gas storage and peak-shaving facility capacity and capacity), macroeconomics (GDP (Gross Domestic Product), CPI (Consumer Price Index), PPI (Producer Price Index), etc.), gas-consuming industries (gas-consuming industry classification, industry prosperity index, product prices, product inventory, operating rate, raw material prices, etc.), and infrastructure (pipelines, stations, gas storage facilities, gas storage facilities).
[0070] API (Application Programming Interface) data integration allows for the acquisition of basic customer information, operational information (sales contracts, settlement volume, settlement price, etc.), and sales data (daily gas consumption, monthly plan, etc.) from internal enterprise systems such as CRM (Customer Relationship Management), ERP (Enterprise Resource Planning), and e-sales.
[0071] Data Acquisition: Data related to the natural gas market is collected from publicly available market reports, news, social media, and other channels. All collected data on factors influencing natural gas demand are stored to form an influencing factor database. All collected customer-related information is also stored to form a customer information database. The data acquisition and processing module retrieves relevant data as needed.
[0072] b) Processing and feature extraction of factors influencing natural gas demand and natural gas demand data:
[0073] Data cleaning: Deduplication and noise reduction: Identifying and removing duplicate, erroneous, or abnormal data to ensure data accuracy. Data completion: For missing data, the system will complete the missing values through interpolation or external data sources to ensure data integrity.
[0074] Data preprocessing: Standardizing data with different units or dimensions to eliminate differences between data. Data transformation: Transforming the raw data, such as logarithmic transformation and exponential smoothing, to extract more meaningful features.
[0075] Data Alignment: Timestamp Synchronization: For time-series data (such as historical gas usage data for customers, market price trends, etc.), timestamp synchronization technology is used to align data from different data sources onto the same timeline. Timestamp interpolation or linear interpolation methods are used to handle time points of different frequencies or missing data, ensuring that all customer-related data is available within the same time window. Customer Alignment: Using the customer ID as the primary key, multi-dimensional data from different data sources (such as basic customer information, market dynamics, macroeconomic data, etc.) are aligned with customer information. For data that cannot be directly matched, fuzzy matching technology or foreign key relationships are used to associate them, ensuring that all data can be correctly mapped to the corresponding customer.
[0076] Automated information collection from multiple data sources is the foundation of the entire solution. Efficient, comprehensive, and real-time data collection ensures the model has accurate and timely input data. The collected data needs to be cleaned and filtered to remove invalid data and extract features crucial for demand forecasting. Effective data processing and feature extraction ensure the model can capture the key factors influencing demand.
[0077] 2. Correlation Analysis Module: Its main function is to analyze the relationship between various influencing factors and customer natural gas demand, identifying the most important features for natural gas demand forecasting as input for the model. The module calculates correlations using three different methods, and the system recommends using the union of the 30%-70% of factors with the highest correlation after ranking each method as input for the model. Users can adjust this according to their specific needs. Iterative analysis is possible to filter until the required number of influencing factors is reached. The correlation analysis module includes a Pearson correlation coefficient analysis unit, a SHAP value analysis unit, and a regression analysis unit.
[0078] a) Pearson Correlation Coefficient Analysis Unit: This unit calculates the Pearson correlation coefficient between the historical data of each selected influencing factor and historical natural gas demand figures. Factors are then sorted from largest to smallest based on their absolute values, and the top 30%-70% of influencing factors are selected. The Pearson correlation coefficient only measures linear relationships and is insensitive to nonlinear relationships; therefore, it needs to be combined with other correlation analysis methods for selection. For example, the top 50% of influencing factors are selected.
[0079] The Pearson correlation coefficient is a statistic used to measure the linear relationship between two variables. Its value ranges from -1 to 1, where:
[0080] 1 indicates a perfect positive correlation, meaning that both variables increase linearly as one variable increases.
[0081] 0 indicates no linear relationship, meaning there is no obvious linear trend between the two variables.
[0082] -1 indicates a perfect negative correlation, meaning that when one variable increases, the other variable decreases linearly.
[0083] The formula for calculating the Pearson correlation coefficient r is:
[0084]
[0085] Among them, X i and Y i It is the i-th data point of two variables; and are the means of variables X and Y, respectively; n is the number of data points.
[0086] b) SHAP (SHapley Additive exPlanations) value analysis unit: Based on the SHAP value algorithm, an Xgboost machine learning model is constructed using all influencing factors to be analyzed as input. The SHAP value is calculated to quantify the contribution of each influencing factor to the natural gas demand model prediction, and all contribution values are sorted from largest to smallest, selecting the top 30%-70% of influencing factors. For example, the top 50% of influencing factors are selected.
[0087] SHAP (Shapley Additive Explanations) value analysis is a technique for interpreting the output of machine learning models. Based on Shapley values from game theory, it aims to quantify the contribution of each feature to the model's predictions. SHAP value analysis provides clear explanations for complex machine learning models (such as deep learning and ensemble models), helping to understand the model's behavior and decision-making logic.
[0088] Specifically, given a feature set S and a model f, the Shapley value φ i The formula for calculating the i-th feature is:
[0089]
[0090] Where N is the set of all features; S is a subset of the feature set that does not include the i-th feature; f(S) is the predicted value of the model when only the feature set S is used; |S| is the size of the set S.
[0091] This formula represents the weighted average of the marginal contribution f(S∪{i})-f(S) of the i-th feature across all possible feature subsets S.
[0092] c) Regression Analysis Unit: Multiple regression models (linear regression, multinomial regression, exponential regression, logarithmic regression, power function regression) are established for each influencing factor and its relation to natural gas demand. The R-squared value for each regression model is calculated. 2 The coefficient of determination is used to measure the goodness of fit of the regression model, comparing the maximum R-value of different regression models for each influencing factor. 2 As a comparison, the factors with the largest coefficient of determination are sorted from largest to smallest, and the factors with the largest coefficient of determination are selected from the top 30% to 70%; for example, the factors with the largest coefficient of determination are selected from the top 50%.
[0093] R 2 The coefficient of determination (R²) is an important indicator in regression analysis, used to measure the goodness of fit of a model. It represents the extent to which the independent variables explain the variation in the dependent variable, and its value ranges from 0 to 1. 2 The closer the value is to 1, the better the model fits the data.
[0094] R 2 The calculation formula is:
[0095]
[0096] Where SSR stands for Sum of Squared Residuals, representing the difference between the model's predicted values and the actual values:
[0097]
[0098] Among them, y i It is the actual value of the i-th sample. It is the predicted value of the i-th sample.
[0099] SST stands for Total Sum of Squares, which represents the total difference between the observed values and the mean.
[0100]
[0101] in, It is the average of the actual values in the sample.
[0102] The correlation analysis module is also used to take the union of the influencing factors selected by the Pearson correlation coefficient analysis unit, the SHAP value analysis unit, and the regression analysis unit, and use it as the input influencing factors.
[0103] 3. Model Selection Module
[0104] After screening, 15 commonly used machine learning models have been implemented and built into the system. Users can select one or multiple models. The algorithm model library includes: Random Forest (RF), Support Vector Regression (SVR), Backpropagation (BP), Long Short-Term Memory (LSTM), Lasso Regression, Ridge Regression, XGBoost (Extreme Gradient Boosting), Prophet (Time Series Forecasting), Lightweight Gradient Boosting (LGBM), CatBoost (Gradient Boosting Decision Tree), Linear Regression, Gradient Boosting, Bayesian Ridge Regression, Active Relevance Decision Theory (ARD), and AdaBoost (Adaptive Boosting).
[0105] Multi-algorithm integration and selection: The system integrates multiple artificial intelligence algorithms, including the BP neural network algorithm, and can automatically recommend and select the optimal algorithm model based on the specific scenario. This step ensures the adaptability and predictive performance of the model in different business scenarios.
[0106] 4. Model Training Module: Automatically trains the model based on the selected input influencing factors and algorithm model. The input influencing factors and natural gas demand data are automatically split into training, validation, and test sets, with default ratios of 80%, 10%, and 10%, respectively. The selected algorithm model is trained using the training set data to fit the algorithm model parameters.
[0107] 5. Parameter Tuning Module: During the training of each algorithm model, an exhaustive search is performed in the predefined hyperparameter space to find the optimal parameter combination for the algorithm model. A visual parameter tuning interface has been developed, supporting manual adjustment.
[0108] Automated Algorithm Model Building: Based on feature data, the system automatically builds demand forecasting models, reducing human intervention and improving R&D efficiency. Parameter Tuning and Model Optimization: The system optimizes model parameters through automated tuning technology to improve the prediction accuracy and robustness of the algorithm model. Automated model selection technology can match the best prediction model for customers.
[0109] 6. Model Evaluation Module: Uses the validation set to evaluate the performance of the algorithm model after parameter tuning, and calculates the mean absolute error (MAE), mean absolute percentage error (MAPE), root mean square error (RMSE), and coefficient of determination (R²). 2 Four indicators.
[0110] Mean Absolute Error (MAE)
[0111] Definition: Mean absolute error is the average of the absolute values of the differences between the predicted and actual values.
[0112]
[0113] Where n is the total number of samples; y i It is the actual value of the i-th sample; It is the predicted value of the i-th sample.
[0114] Coefficient of determination (R) 2 ):R 2 It represents the proportion of variance explained by the model to the total variance, and is a measure of the model's goodness of fit.
[0115]
[0116] in, It is the mean of the actual values of the sample.
[0117] Root Mean Squared Error (RMSE): RMSE is the square root of MSE and is used to measure the difference between predicted and actual values. The smaller the RMSE, the better the model's prediction performance.
[0118]
[0119] Mean Absolute Percentage Error (MAPE): It represents the magnitude of the model's error by calculating the absolute percentage of the error between the predicted and actual values and averaging the error percentages across all samples.
[0120]
[0121] Comprehensive indicator evaluation process:
[0122] Because these four indicators have different dimensions and numerical ranges, they need to be normalized in order to be evaluated together. 2 The value is already between 0 and 1, so no further normalization is needed.
[0123] For each indicator, normalization can be performed using the following formula:
[0124]
[0125] Among them, MAE min The minimum value of MAE; MAE max MAPE is the maximum value of MAE; min This is the minimum value of MAPE; MAPEmax The maximum value of MAPE; RMSE min Minimum RMSE; RMSE max The maximum value of RMSE; RMSE norm The root mean square error after normalization; MAPE norm The mean absolute percentage error (MAE) after normalization. norm This represents the mean absolute error after normalization.
[0126] Based on the coefficient of determination and four indicators—mean absolute error, mean absolute percentage error, and root mean square error—after normalization, and combining these indicators with their weights, the comprehensive score of the algorithm model is calculated.
[0127] Overall score = R 2 -RMSE norm -MAPE norm -MAE norm (13)
[0128] A higher R² value is better, as it indicates higher RMSE. norm MAPE norm MAE norm The smaller the value, the better.
[0129] The system automatically recommends the algorithm model with the highest comprehensive score as the prediction model, and manual adjustment is also supported.
[0130] 7. Forecasting Module: Based on the selected input influencing factors, forecasting model, and parameters, the module updates data and forecasts customer natural gas demand periodically according to the selected forecasting cycle, achieving automatic forecasting.
[0131] 8. Display and Application Module: This module visualizes the forecasting model, forecast results, and model parameters selected by each customer. Customer demand is aggregated by province and industry to generate regional and industry-specific demand forecasts. The demand forecast results are compared with actual sales data to evaluate the forecast accuracy.
[0132] Visualization of forecast results: Through intuitive visualization tools, users can clearly see the forecast results and make business decisions based on these results.
[0133] like Figure 2 As shown, based on the above-mentioned intelligent demand forecasting system for natural gas customers, this embodiment proposes an intelligent demand forecasting method for natural gas customers, including:
[0134] The data acquisition and processing module processes the collected natural gas demand influencing factors and natural gas demand data.
[0135] The correlation analysis module analyzes the relationship between all influencing factors and natural gas demand, and filters out the input influencing factors.
[0136] The algorithm model for selecting input influencing factors is chosen through the model selection module;
[0137] The algorithm model is trained using the model training module based on the input influencing factors;
[0138] The parameters of the algorithm model are adjusted through the parameter adjustment module to determine the parameters of the algorithm model during training.
[0139] The model evaluation module evaluates the performance of the algorithm model after parameter adjustment and selects the algorithm model with the highest score as the prediction model.
[0140] The forecasting module predicts customer natural gas demand based on a forecasting model.
[0141] The display and application module showcases the forecasting model, the forecast results of natural gas demand, and the model parameters.
[0142] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A natural gas customer intelligent demand forecasting system, characterized in that, include: The data acquisition and processing module is used to process the acquired natural gas demand influencing factors and natural gas demand data; The correlation analysis module is used to analyze the relationship between all influencing factors and natural gas demand, and to filter out the input influencing factors. The model selection module is used to select the algorithm model for the input influencing factors; The model training module is used to train the algorithm model based on the input influencing factors; The parameter adjustment module is used to adjust the parameters of the algorithm model during training and to determine the parameters of the algorithm model. The model evaluation module is used to evaluate the performance of the algorithm model after parameter adjustment and select the algorithm model with the highest score as the prediction model. The forecasting module is used to predict customers' natural gas demand based on a forecasting model.
2. The intelligent demand forecasting system for natural gas customers according to claim 1, characterized in that, The data acquisition and processing module is specifically used for: Collect data on factors influencing natural gas demand and natural gas demand data; Data cleaning and completion were performed on the factors influencing natural gas demand and natural gas demand data. Preprocessing and data transformation are performed on the natural gas demand influencing factors and natural gas demand data after data completion; Data alignment and customer alignment are performed on the natural gas demand influencing factors and natural gas demand data after data transformation, so that all natural gas demand influencing factors and natural gas demand data are mapped to the corresponding customers.
3. The intelligent demand forecasting system for natural gas customers according to claim 1 or 2, characterized in that, The correlation analysis module includes a Pearson correlation coefficient analysis unit, a SHAP value analysis unit, and a regression analysis unit; The Pearson correlation coefficient analysis unit is used to calculate the Pearson correlation coefficient based on the data of each selected influencing factor and the natural gas demand data, and sort all the calculated Pearson correlation coefficients from largest to smallest absolute value, selecting the top 30%-70% of influencing factors; The SHAP value analysis unit is used to determine the contribution of each influencing factor to the natural gas demand forecast based on the SHAP value algorithm, and to sort all the contribution values and select the top 30%-70% of the influencing factors. The regression analysis unit is used to build multiple regression models based on each influencing factor and natural gas demand data, calculate the coefficient of determination for each regression model, select the largest coefficient of determination from the multiple coefficients of determination calculated by different regression models for each influencing factor, sort the largest coefficients of determination for each influencing factor, and select the top 30%-70% of influencing factors. The correlation analysis module is also used to take the union of the influencing factors selected by the Pearson correlation coefficient analysis unit, the SHAP value analysis unit, and the regression analysis unit, and use it as the input influencing factors.
4. The intelligent demand forecasting system for natural gas customers according to claim 1, characterized in that, The algorithm models include random forest algorithm, support vector regression model, BP neural network algorithm, long short-term memory network algorithm, Lasso regression algorithm, ridge regression algorithm, extreme gradient boosting algorithm, Prophet time series prediction algorithm, lightweight gradient boosting machine learning algorithm, gradient boosting decision tree model, linear regression algorithm, gradient boosting algorithm, Bayesian ridge regression algorithm, active relevance decision theory algorithm, and adaptive boosting algorithm.
5. The intelligent demand forecasting system for natural gas customers according to claim 1, characterized in that, The model training module is used to split the input influencing factors and natural gas demand data into training sets, validation sets, and test sets, and use the training set data to train the selected algorithm model and fit the algorithm model parameters.
6. The intelligent demand forecasting system for natural gas customers according to claim 1, characterized in that, The parameter adjustment module is used to perform an exhaustive search in a predefined hyperparameter space to find the parameter combination of the algorithm model during training.
7. The intelligent demand forecasting system for natural gas customers according to claim 5, characterized in that, The model evaluation module uses a validation set to evaluate the performance of the algorithm model after parameter adjustment, and calculates the mean absolute error, mean absolute percentage error, root mean square error, and coefficient of determination. Normalize the mean absolute error, mean absolute percentage error, and root mean square error. Based on the coefficient of determination, as well as the normalized mean absolute error, mean absolute percentage error, and root mean square error, the algorithm model with adjusted parameters is comprehensively scored, and the algorithm model with the highest score is selected as the prediction model.
8. The intelligent demand forecasting system for natural gas customers according to claim 7, characterized in that, The overall score is determined using the following formula: Overall score = R 2 -RMSE norm -MAPE norm -MAE norm Among them, R 2 RMSE is the coefficient of determination. norm The root mean square error after normalization; MAPE norm The mean absolute percentage error (MAE) after normalization. norm This represents the mean absolute error after normalization.
9. The intelligent demand forecasting system for natural gas customers according to claim 1, characterized in that, The forecasting module is used to select the forecasting period, regularly update data, and forecast customer natural gas demand.
10. The intelligent demand forecasting system for natural gas customers according to claim 1, characterized in that, Also includes: The Display and Application module is used to visualize the prediction models and prediction results for each customer.
11. A method for intelligent demand forecasting of natural gas customers, characterized in that, include: The data acquisition and processing module processes the collected natural gas demand influencing factors and natural gas demand data. The correlation analysis module analyzes the relationship between all influencing factors and natural gas demand, and filters out the input influencing factors. The algorithm model for selecting input influencing factors is chosen through the model selection module; The algorithm model is trained using the model training module based on the input influencing factors; The parameters of the algorithm model are adjusted through the parameter adjustment module to determine the parameters of the algorithm model during training. The model evaluation module evaluates the performance of the algorithm model after parameter adjustment and selects the algorithm model with the highest score as the prediction model. The forecasting module predicts customer natural gas demand based on a forecasting model. The display and application module showcases the forecasting model, the forecast results of natural gas demand, and the model parameters.
Citation Information
Patent Citations
Natural gas short-period demand prediction method
CN105894113A