Gas consumption prediction method and system

By introducing user daily electricity data into the gas consumption prediction model and adopting the ARIMAX model, the problem of low accuracy of the traditional prediction model is solved, and higher gas consumption prediction accuracy and efficiency are achieved.

CN119740709AInactive Publication Date: 2025-04-01CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411941240.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The traditional gas consumption prediction model mainly relies on historical gas consumption data, ignoring other potential influencing factors, resulting in limited prediction accuracy, and the acquisition of user gas consumption data is not real-time and continuous.

Method used

By introducing user daily electricity consumption data as external variables, gas consumption prediction is performed using the ARIMAX model. The method includes data preprocessing, model training and output of prediction results, and uses BIC to automatically select model parameters to improve prediction accuracy.

Benefits of technology

It improves the accuracy of user gas usage prediction, uses sufficient user electricity data in reality to make up for the shortcomings of insufficient gas usage data, enhances the prediction ability of the model, and improves work efficiency especially when large-scale applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119740709A_ABST
    Figure CN119740709A_ABST
Patent Text Reader

Abstract

The invention discloses a gas consumption prediction method and system, and relates to the technical field of energy data processing. The method comprises the following steps: acquiring user gas consumption and daily power consumption data in a to-be-predicted area, and constructing a to-be-predicted time series data set by using the user gas consumption and daily power consumption data; preprocessing the to-be-predicted time sequence data set to obtain a preprocessed time sequence data set; and inputting the preprocessed time sequence data set into a pre-trained gas consumption prediction model to obtain a gas consumption prediction result. According to the method, daily electricity consumption data of a user is used as an external variable to predict the gas consumption of the user, and the improvement effect of the daily electricity consumption as the external variable on prediction accuracy is verified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention proposes a gas consumption prediction method and system, and relates to the technical field of energy data processing. Background Art

[0002] Gas consumption forecasting is of great significance in energy management, planning and scheduling. Traditional time series forecasting models, such as the ARIMA model, are mainly based on historical gas consumption data for forecasting. However, simply using gas consumption data for forecasting may ignore other potential influencing factors, resulting in limited forecasting accuracy. On the other hand, user gas consumption data is mostly collected by staff visiting or users reporting, and the data lacks real-time and continuity.

[0003] The electric energy data collected by the user's electric energy meter is collected by the smart grid through power line carrier communication technology, with a high collection success rate, and has basically covered all users' daily frozen electric energy data. With the help of user electricity consumption data, it can help predict the user's gas consumption. Summary of the invention

[0004] In order to solve the problems existing in the prior art, the present invention proposes a gas consumption prediction method and system. The method uses the user's daily electricity consumption data as an external variable to predict the user's gas consumption, aiming to verify the effect of daily electricity consumption as an external variable on improving the prediction accuracy.

[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: In a first aspect, the present invention provides a method for predicting gas usage, comprising: Obtain the gas consumption and daily electricity consumption data of users in the area to be predicted, and construct the time series data set to be predicted with the gas consumption and daily electricity consumption data of users; Preprocess the time series data set to be predicted to obtain a preprocessed time series data set; The preprocessed time series data set is input into the pre-trained gas consumption prediction model to obtain the gas consumption prediction result.

[0006] As a further improvement of the present invention, the training method of the pre-trained gas usage prediction model includes: Collect the daily electricity consumption data and daily gas consumption data of each sample user and construct a sample user time series data set; Preprocess the sample user time series data set to obtain the time series data set to be trained; The time series data set to be trained is divided into a training set and a test set according to time; Construct a time series analysis and prediction model, and automatically select the optimal model parameters of the time series analysis and prediction model based on BIC; use the user's training set daily electricity consumption data as an external variable, combine it with the training set gas consumption data for training, and use the test set to perform prediction errors to obtain a pre-trained gas consumption prediction model.

[0007] As a further improvement of the present invention, the pretreatment specifically includes: For single missing values, linear interpolation is performed using adjacent data, consecutive missing values ​​are skipped, and outliers are removed; Then, users are filtered according to the volatility of daily electricity consumption data and daily gas consumption data and the correlation between the two. The standard deviation of the two data and the Pearson correlation coefficient of the two are calculated respectively. If the standard deviation of any data is too low or the correlation coefficient of the two is lower than the threshold, the data is filtered.

[0008] As a further improvement of the present invention, the time series analysis and prediction model adopts an ARIMAX model, takes the daily electricity consumption data in the training set of users as external variables, and performs training in combination with the gas consumption data in the training set.

[0009] As a further improvement of the present invention, the ARIMAX model introduces external variables on the basis of the ARIMA model to enhance the prediction ability of the model; the expression is:

[0010] Among them, X t is the daily electricity consumption data, β is the regression coefficient, Φp(B) and Θq(B) are the polynomials of the autoregressive and moving average parts respectively, B is the lag operator, y t is the time series data, ϵ t is the error term; p is the order of the autoregressive part, d is the number of differences, and q is the order of the moving average part.

[0011] As a further improvement of the present invention, the automatic parameter selection based on BIC, the calculation formula of BIC is:

[0012] Where L is the likelihood function of the model, k is the number of model parameters, and n is the number of samples. By searching for different combinations of p, d, and q, the model with the smallest BIC is selected.

[0013] In a second aspect, the present invention provides a gas consumption prediction system, comprising: An acquisition module is used to acquire the gas consumption and daily electricity consumption data of users in the area to be predicted, and construct a time series data set to be predicted from the gas consumption and daily electricity consumption data of users; A preprocessing module, used for preprocessing the time series data set to be predicted to obtain a preprocessed time series data set; The prediction module is used to input the preprocessed time series data set into the pre-trained gas consumption prediction model to obtain the gas consumption prediction result.

[0014] In a third aspect, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the gas usage prediction method is implemented when the processor executes the computer program.

[0015] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the gas usage prediction method when executed by a processor.

[0016] In a fifth aspect, the present invention provides a computer program product, wherein the computer program product comprises computer instructions, wherein the computer instructions instruct a computer to execute the gas usage prediction method.

[0017] The beneficial effects of the present invention compared with the prior art are as follows: The present invention introduces the user's daily electricity consumption data as an external variable through the pre-trained gas consumption prediction model, thereby improving the accuracy of the user's gas consumption prediction. The use of sufficient user electricity data in reality can make up for the actual situation of insufficient gas consumption data, and provide a solid foundation for the subsequent practical application model to predict user gas consumption.

[0018] Furthermore, compared with the ARIMA time series model that only uses gas consumption data, the ARIMAX model better reflects the relationship between user electricity consumption and user gas consumption by capturing the correlation and trend of comprehensive energy use. In the process of selecting the model, BIC (Bayesian Information Criterion) is used as a standard to search for ARIMAX models with different parameters and select the parameters of the optimal model, which simplifies the model building process and improves work efficiency, especially when applied to a large number of users on a large scale. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the embodiments of the present invention or the drawings of related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1A flow chart of a method for predicting gas consumption provided by the present invention; Figure 2 It is a workflow diagram of a gas consumption prediction method based on ARIMAX model; Figure 3 The prediction results of ARIMA model and ARIMAX model for a certain user and the actual gas consumption curve and electricity consumption curve; (a) is the model prediction result; (b) is the actual gas consumption curve and electricity consumption curve; Figure 4 A gas consumption prediction device provided by the present invention; Figure 5 A schematic diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0021] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limitations of the present invention. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0022] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0023] Explanation of relevant terms The ARIMA model, or Autoregressive Integrated Moving Average Model, is a statistical model used for time series analysis and forecasting. It combines the concepts of autoregression (AR) and moving average (MA), as well as the operation of integration (I). It is based on three main parameters: autoregression term (AR), moving average term (MA), and integration term (I). Autoregression term (AR): refers to the relationship between the current value and the past value, indicating the linear relationship between the current value and the value at the previous few time points. Moving average term (MA): refers to the relationship between the current value and the past error term, indicating the linear relationship between the current value and the error at the previous few time points. Integration term (I): refers to the difference operation of the time series to eliminate non-stationarity, and is used to convert non-stationary time series into stationary time series. Parameter representation: The parameters of the ARIMA model are usually expressed as ARIMA (p, d, q), where p represents the order of the autoregression term, d represents the order of the integration term (i.e., the number of differences), and q represents the order of the moving average term.

[0024] The ARIMAX model, a general ARIMA model with an input sequence, is also called a dynamic regression model or an extended ARIMA model. It takes into account the impact of other sequences on one time series.

[0025] BIC (Bayesian Information Criterion) is usually referred to as "Bayesian Information Criterion", which is a criterion for model selection. BIC is a widely used method in statistics and machine learning. It is based on Bayesian probability theory and is used to compare the advantages and disadvantages of different models given a set of data.

[0026] In order to better predict the gas consumption of users, such as Figure 1 As shown, the first object of the present invention is to provide a method for predicting gas consumption, comprising: S1, obtaining the gas consumption and daily electricity consumption data of users in the area to be predicted, and constructing the time series data set to be predicted with the gas consumption and daily electricity consumption data of users; S2, preprocessing the time series data set to be predicted to obtain a preprocessed time series data set; S3, inputting the preprocessed time series data set into the pre-trained gas consumption prediction model to obtain the gas consumption prediction result.

[0027] The present invention uses the correlation between user electricity consumption and user gas consumption to add the variable factor of user electricity consumption into the model. At the same time, the sufficient electricity consumption data and limited gas consumption data of users in reality provide an opportunity to use electricity consumption data to assist in predicting gas consumption.

[0028] The present invention uses historical user daily electricity consumption data and daily gas consumption data, through the ARIMAX mathematical model, combined with the current user daily electricity consumption, to predict the user's gas consumption. The training method of the pre-trained gas consumption prediction model includes: Collect the daily electricity consumption data and daily gas consumption data of each sample user and construct a sample user time series data set; Preprocess the sample user time series data set to obtain the time series data set to be trained; The time series data set to be trained is divided into a training set and a test set according to time; Construct a time series analysis and prediction model, and automatically select the optimal model parameters of the time series analysis and prediction model based on BIC; use the user's training set daily electricity consumption data as an external variable, combine it with the training set gas consumption data for training, and use the test set to perform prediction errors to obtain a pre-trained gas consumption prediction model.

[0029] As an example, the time series analysis and prediction model adopts an ARIMAX model, uses the daily electricity consumption data in the training set of users as external variables, and performs training in combination with the gas consumption data in the training set.

[0030] The training method provided by the present invention has the following principles: collect the daily electricity consumption data and daily gas consumption data of each user in the sample users. Construct a sample user time series data set, which contains the user's historical electricity and gas consumption data. Perform preprocessing such as cleaning, missing value filling, and outlier processing on the sample user time series data set. The preprocessed data set is used as the time series data set to be trained.

[0031] Furthermore, the time series data set to be trained is divided into a training set and a test set according to the time sequence. The training set is used for model training, and the test set is used to evaluate the model performance. A time series analysis and prediction model, such as the ARIMAX model, is constructed. Among them, the BIC (Bayesian Information Criterion) is used to automatically select the optimal parameters of the model. The daily electricity consumption data in the training set is used as an external variable (X), and the gas consumption data in the training set is combined for model training.

[0032] Furthermore, the prediction error of the trained model is evaluated using the test set. Based on the evaluation results, a pre-trained gas consumption prediction model is obtained. The ARIMAX model is an extended version of the ARIMA model, which allows the introduction of other independent (prediction) variables in the model. In the present invention, the daily electricity consumption data is introduced as an external variable to improve the accuracy of gas consumption prediction.

[0033] Based on the above scheme, the present invention introduces daily electricity consumption data as an external variable, and the ARIMAX model can capture the changing rules of gas consumption more comprehensively. This makes the model more accurate and reliable when predicting gas consumption. The model has online learning capabilities and can update weights and parameters as new data continues to flow in. This enables the model to adapt to dynamic changes in gas consumption and improve the real-time and accuracy of predictions. Accurate gas consumption prediction helps enterprises and management departments optimize resource allocation. By planning gas supply and scheduling in advance, operating costs can be reduced and energy utilization efficiency can be improved. The method proposed in the present invention uses historical user daily electricity consumption data and daily gas consumption data to predict user gas consumption through the ARIMAX mathematical model, which has the advantages of high-precision prediction, dynamic adaptability, optimization of resource allocation, and response to emergencies. This method provides strong support for the digital transformation and intelligent development of the gas industry.

[0034] Therefore, based on the ARIMAX model, the present invention utilizes the user electricity consumption and user gas consumption in the comprehensive energy data and takes the user's daily electricity consumption data as an external variable to predict the user's gas consumption, aiming to verify the effect of daily electricity consumption as an external variable on improving the prediction accuracy.

[0035] As a more specific solution, the pretreatment specifically includes the following steps: For single missing values, linear interpolation is performed using adjacent data, consecutive missing values ​​are skipped, and outliers are removed; Then, users are filtered according to the volatility of daily electricity consumption data and daily gas consumption data and the correlation between the two. The standard deviation of the two data and the Pearson correlation coefficient of the two are calculated respectively. If the standard deviation of any data is too low or the correlation coefficient of the two is lower than the threshold, the data is filtered.

[0036] The principle of the above preprocessing scheme is to use adjacent data for linear interpolation. Linear interpolation is to estimate missing values ​​through straight lines between known data points. This method is simple and easy to implement. For multiple consecutive missing values, directly skipping can reduce the impact on the overall structure of the data and avoid the accumulation of errors caused by interpolation. Outliers refer to data points that are obviously inconsistent with other data, which may be caused by measurement errors or data entry errors. Eliminating outliers can improve the accuracy and reliability of data.

[0037] In addition, the data of daily electricity consumption and daily gas consumption are filtered according to their own volatility. Volatility can be measured by calculating the standard deviation of the data. The larger the standard deviation, the greater the dispersion of the data and the greater the volatility. If the standard deviation of a certain data is too low, it may mean that the data lacks sufficient variability and may not be suitable for subsequent analysis. Filter according to the correlation between daily electricity consumption data and daily gas consumption data. The correlation can be measured by calculating the Pearson correlation coefficient between the two. The Pearson correlation coefficient can reflect whether there is synchronization in the changes of two variables, that is, when one variable increases, whether the other variable also tends to increase (positive correlation), or when one variable increases, whether the other variable tends to decrease (negative correlation). If the correlation coefficient between the two is lower than a certain threshold, it may mean that there is a lack of sufficient correlation between the two data, which may affect the accuracy of subsequent analysis.

[0038] Linear interpolation assumes that the changes between adjacent data points are linear, that is, a straight line can be used to connect the two points, and the missing values ​​are estimated based on this line. This method is simple and easy to implement, and can quickly fill in a single missing value. In the case where the changes between adjacent data points are relatively smooth, the interpolation results are usually more accurate. For multiple consecutive missing values, directly skipping can avoid the accumulation of errors caused by interpolation and reduce the impact on the overall structure of the data. This method can maintain the originality of the data and avoid the errors that may be introduced by interpolation. At the same time, for the case of a large number of missing values, skipping processing can significantly reduce the amount of calculation. Outliers are usually caused by measurement errors or data entry errors, and there are significant differences from other data points. By eliminating these outliers, the accuracy and reliability of the data can be improved. Eliminating outliers can reduce noise and interference in the data, making subsequent analysis more accurate and reliable. At the same time, for occasions that require high-precision analysis, eliminating outliers is particularly important.

[0039] Standard deviation is an important indicator to measure the degree of data dispersion. If the standard deviation of a certain data is too low, it may mean that the data lacks sufficient variability and may not be suitable for subsequent analysis. Through volatility filtering, data with large volatility can be screened out, which are usually more valuable for analysis. At the same time, this also helps to reduce the impact of stationarity or monotonicity in the data on data analysis. The Pearson correlation coefficient is an important indicator to measure the degree of linear correlation between two variables. If the correlation coefficient between the two is lower than a certain threshold, it may mean that there is a lack of sufficient correlation between the two data. Through correlation filtering, data pairs with strong correlation can be screened out, which are usually more suitable for subsequent analysis. At the same time, this also helps to reduce the impact of redundancy and irrelevance between data on data analysis.

[0040] The present invention is described in detail below with reference to specific embodiments and drawings.

[0041] In order to better predict the user's gas consumption, effectively utilize sufficient user electricity consumption data, and reflect the advantages of the time series model, the present invention provides a method for predicting the user's future gas consumption based on the ARIMAX time series model and using the user's daily electricity consumption and daily gas consumption data.

[0042] like Figure 2 As shown, a method for predicting gas consumption provided by the present invention comprises the following steps: S1. Data collection and preprocessing: Collect the daily electricity consumption data and daily gas consumption data of each sample user and construct a sample user time series data set.

[0043] The sample user time series data set is preprocessed, including linear interpolation of single missing values ​​using adjacent data, skipping consecutive missing values, and removing outliers.

[0044] In the above scheme, the electricity or gas consumption Q on the jth day j , the formula for linear interpolation is:

[0045] Users are filtered based on the volatility of daily electricity consumption data and daily gas consumption data and the correlation between the two. The standard deviation of the two data of the user and the Pearson correlation coefficient of the two are calculated respectively. If the standard deviation of any data is too low or the correlation coefficient of the two is lower than the threshold, the user is filtered.

[0046] For example, if the standard deviation of any data is too low or the correlation coefficient between the two is too low, the threshold can be set to a value as needed, which means that the two data of the user have weak fluctuations or weak correlation, are not suitable for model building, and need to be filtered.

[0047] The formula for the sample standard deviation s is:

[0048] Where n is the number of data points, x is the variable, is the mean of the variable, x i is the ith data point.

[0049] Among them, the formula of Pearson correlation coefficient corr(x,y) is:

[0050] Among them, x and y are two variables. , is the mean of the two variables, x i ,y i is the ith data point.

[0051] Furthermore, the data is divided into training set and test set according to time. The training set data is used for model training, and the test set data is used to calculate the error of the model prediction results.

[0052] S2. Model establishment and parameter selection. This embodiment provides two models for comparison: The first one is the ARIMA model: it is trained using only the user's daily gas usage data in the training set.

[0053] The second is the ARIMAX model: the user's training set daily electricity consumption data is used as an external variable and combined with the training set gas consumption data for training.

[0054] For both models, the optimal model parameters were automatically selected based on the BIC (Bayesian Information Criterion).

[0055] S3. Model validation and result comparison: Based on the optimal model parameters, run the ARIMA and ARIMAX models, make predictions on the test set, and calculate the prediction errors of the two models respectively.

[0056] The model performance is evaluated by the root mean square error (RMSE) and mean absolute percentage error (MAPE). The prediction errors of ARIMA and ARIMAX models are compared, and the impact of external variables such as user electricity consumption on the model prediction accuracy is analyzed.

[0057] The mathematical principles of ARIMA and ARIMAX models are explained as follows: ARIMA model (Auto-Regressive Integrated Moving Average): ARIMA model is a model widely used in time series analysis and forecasting. Its mathematical expression is:

[0058] Where Φp(B) and Θq(B) are the polynomials of the autoregressive (AR) and moving average (MA) parts, respectively, B is the lag operator, and y t is the time series data, ϵ t is the error term. The parameters are explained as follows: p: The order of the autoregressive part, which indicates how many past values ​​the model uses to regress the current value.

[0059] d: The number of differences, which indicates how many times the difference operation is needed to make the time series stable.

[0060] q: The order of the moving average part, which indicates how many past error terms the model uses to regress the current value.

[0061] The ARIMAX model (ARIMA with Exogenous Variables) given in this embodiment introduces external variables on the basis of the ARIMA model to enhance the prediction ability of the model. Its mathematical expression is:

[0062] Among them, X t is an external variable (such as daily electricity consumption data), β is the regression coefficient, and the meanings of other symbols are the same as those of the ARIMA model.

[0063] This embodiment automatically selects parameters based on BIC, specifically: automatically selects the optimal model ARIMA and ARIMAX model parameters based on BIC (Bayesian Information Criterion). The calculation formula of BIC is:

[0064] Where L is the likelihood function of the model, k is the number of model parameters, and n is the number of samples. By searching for different combinations of p, d, and q, the model with the smallest BIC is selected.

[0065] It can be seen that the gas consumption prediction method based on the ARIMAX model of the present invention establishes an ARIMAX model, uses daily electricity consumption data as external variables for training, and improves the accuracy of daily gas consumption prediction. The optimal model parameters are selected by BIC, and the ARIMAX model is applied to the daily electricity consumption and daily gas consumption data of users on a large scale. The prediction accuracy is improved by introducing external variables, which has broad application prospects and practical value.

[0066] The following is a description of the implementation of the present invention by means of specific embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification.

[0067] This embodiment provides a method for predicting gas consumption based on an ARIMAX model, the process is as follows: Figure 2 , including the following steps: Step 1: Select the daily electricity consumption data and daily gas consumption data of more than 8,000 users in the comprehensive energy project in Shanghai in 2021 as the data set.

[0068] Step 2: Preprocess the data set. If there is a single missing value in the data, linear interpolation is performed using adjacent data. If the missing values ​​appear continuously, this segment of data is skipped. Users with outliers in the data are eliminated. Users with too low sample standard deviations or too low correlation coefficients between the two are filtered out. The filtering criteria are that the sample standard deviation of any type of data is less than 0.5 or the absolute value of the correlation coefficient between the two types of data is less than 0.2. After preprocessing, the data from February to October 2021 is used as the training set, and the data from November to December is used as the test set.

[0069] Step 3: Based on the data set in step 2, the daily electricity consumption is used as an external variable, and the ARIMAX model of each user is constructed with the daily gas consumption. The parameters (p, d, q) of the time series are determined by the model selection results based on BIC (Bayesian Information Criterion). The data and parameters are input into the constructed ARIMAX model to obtain the prediction of daily gas consumption in the test set time period.

[0070] Step 4: For comparison, the parameters of the ARIMA model are determined using the BIC-based method. The ARIMA model of each user is constructed using only the daily gas consumption data to obtain the prediction of their daily gas consumption in the test set time period.

[0071] Step 5: Compare the prediction errors of the ARIMA model and the ARIMAX model. For more than 70% of users, the prediction errors RMSE and MAPE of the ARIMAX model are lower than those of the ARIMA model. For example, Figure 3 In the data, on December 6, the user's daily gas consumption dropped to 0 cubic meters and lasted until December 31, while his daily electricity consumption also dropped to about 0.2 degrees from December 6 and lasted until December 31. The two are highly correlated. Compared with the stable prediction curve of the ARIMA model, the prediction curve of the ARIMAX model with electricity consumption changes with the electricity consumption and is closer to the actual gas consumption. The comparison results show that the ARIMAX model has significantly improved the prediction accuracy compared with the ARIMA model, proving that daily electricity consumption data as an external variable has a positive effect on gas consumption prediction.

[0072] It can be seen that the present invention introduces the user's daily electricity consumption data as an external variable by establishing an ARIMAX model. Compared with the ARIMA time series model that only uses gas consumption data, it utilizes the correlation between user electricity consumption and user gas consumption in the comprehensive energy data, thereby improving the accuracy of user gas consumption prediction.

[0073] like Figure 4 As shown, the third object of the present invention is to provide a gas consumption prediction system, comprising: The acquisition module 100 is used to acquire the gas consumption and daily electricity consumption data of users in the area to be predicted, and construct a time series data set to be predicted from the gas consumption and daily electricity consumption data of users; A preprocessing module 200 is used to preprocess the time series data set to be predicted to obtain a preprocessed time series data set; The prediction module 300 is used to input the pre-processed time series data set into the pre-trained gas usage prediction model to obtain the gas usage prediction result.

[0074] The gas usage prediction system of the present invention is based on the gas usage prediction method.

[0075] like Figure 5 As shown, the third object of the embodiment of the present invention is to provide an electronic device, including a memory 701, a processor 702, and a computer program stored in the memory 701 and executable on the processor, wherein the processor implements the above-mentioned gas consumption prediction method when executing the computer program. It also includes a communication interface 703 and a bus 704.

[0076] A fourth objective of an embodiment of the present invention is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned gas usage prediction method is implemented.

[0077] A fifth objective of an embodiment of the present invention is to provide a computer program product, wherein the computer program product includes computer instructions, and the computer instructions instruct a computer to execute the above-mentioned gas usage prediction method.

[0078] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0079] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0080] The present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, readable storage media, optical storage, etc.) containing computer-usable program codes.

[0081] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0082] 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 ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for predicting gas consumption, characterized in that: include: Obtain the gas consumption and daily electricity consumption data of users in the area to be predicted, and construct the time series data set to be predicted with the gas consumption and daily electricity consumption data of users; Preprocess the time series data set to be predicted to obtain a preprocessed time series data set; The preprocessed time series data set is input into the pre-trained gas consumption prediction model to obtain the gas consumption prediction result.

2. The method for predicting gas consumption according to claim 1, characterized in that: The training method of the pre-trained gas usage prediction model includes: Collect the daily electricity consumption data and daily gas consumption data of each sample user and construct a sample user time series data set; Preprocess the sample user time series data set to obtain the time series data set to be trained; The time series data set to be trained is divided into a training set and a test set according to time; Construct a time series analysis and prediction model, and automatically select the optimal model parameters of the time series analysis and prediction model based on BIC; use the user's training set daily electricity consumption data as an external variable, combine it with the training set gas consumption data for training, and use the test set to perform prediction errors to obtain a pre-trained gas consumption prediction model.

3. The method for predicting gas consumption according to claim 2, characterized in that: The preprocessing specifically includes: For single missing values, linear interpolation is performed using adjacent data, consecutive missing values ​​are skipped, and outliers are removed; Then, users are filtered according to the volatility of daily electricity consumption data and daily gas consumption data and the correlation between the two. The standard deviation of the two data and the Pearson correlation coefficient of the two are calculated respectively. If the standard deviation of any data is too low or the correlation coefficient of the two is lower than the threshold, the data is filtered.

4. The method for predicting gas consumption according to claim 2, characterized in that: The time series analysis and prediction model adopts the ARIMAX model, takes the daily electricity consumption data in the training set of users as external variables, and performs training in combination with the gas consumption data in the training set.

5. The method for predicting gas consumption according to claim 3, characterized in that: The ARIMAX model introduces external variables on the basis of the ARIMA model to enhance the prediction ability of the model; the expression is: Among them, X t is the daily electricity consumption data, β is the regression coefficient, Φp(B) and Θq(B) are the polynomials of the autoregressive and moving average parts respectively, B is the lag operator, y t is the time series data, ϵ t is the error term; p is the order of the autoregressive part, d is the number of differences, and q is the order of the moving average part.

6. The method for predicting gas consumption according to claim 1, characterized in that: The automatic parameter selection based on BIC, the calculation formula of BIC is: Among them, L is the likelihood function of the model, k is the number of model parameters, and n is the number of samples; by searching different combinations of p, d, q, the model with the smallest BIC is selected.

7. A gas consumption prediction system, characterized in that: include: An acquisition module is used to acquire the gas consumption and daily electricity consumption data of users in the area to be predicted, and construct a time series data set to be predicted from the gas consumption and daily electricity consumption data of users; A preprocessing module, used for preprocessing the time series data set to be predicted to obtain a preprocessed time series data set; The prediction module is used to input the preprocessed time series data set into the pre-trained gas consumption prediction model to obtain the gas consumption prediction result.

8. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the gas usage prediction method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the gas usage prediction method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising computer instructions, characterized in that: The computer instructions instruct the computer to execute the gas usage prediction method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Electricity consumption prediction method and device and storage medium

    CN112529301A

  • Fuel gas consumption prediction method based on artificial intelligence

    CN117370759A