Urban gas monthly gas consumption prediction method and device and storage medium

By processing data from non-gas IoT tables and gas IoT tables, combined with the Prophet model, the problem of inaccurate natural gas prediction in the existing technology is solved, and accurate prediction of residents' monthly natural gas demand is achieved.

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

Patent Information

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

AI Technical Summary

Technical Problem

The existing natural gas prediction methods cannot accurately obtain residents' monthly natural gas demand, mainly due to changes in historical data, small sampling samples, and inconsistent meter reading cycles of industrial users and public service users.

Method used

The historical prepayment data of non-gas IoT table users and the historical gas use data of gas IoT table users are collected, and the data is processed through interpolation method and local anomaly factor algorithm, and the monthly total gas consumption demand of urban gas is predicted in combination with the Prophet model.

Benefits of technology

Through the combination of real data processing and machine learning models, the accuracy of natural gas prediction is improved and the accuracy of prediction results is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119250242A_ABST
    Figure CN119250242A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of natural gas demand prediction, and discloses an urban gas monthly gas consumption prediction method and device and a storage medium, and the prediction method comprises the steps: collecting historical pre-payment data of urban non-gas Internet of Things meter users and historical gas consumption data of gas Internet of Things meter users; according to the historical pre-payment data of the non-gas Internet of Things meter user, calculating the historical annual total gas consumption of the urban residents; preprocessing the historical gas consumption data of the gas Internet of Things meter user to obtain the historical gas consumption data of a non-abnormal gas Internet of Things meter user; according to the historical annual total gas consumption of the urban residents and the historical gas consumption data of the non-abnormal gas Internet of Things meter users, the historical monthly total gas consumption of all the urban residents is calculated; and based on the historical monthly total gas consumption of all residents in the city, predicting the monthly total gas consumption demand of the city by adopting a prophet model. According to the invention, based on the real resident pre-payment data and the gas consumption data of the Internet of Things meter, the prediction result is ensured to be accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of natural gas demand forecasting, and in particular relates to a method, a device and a storage medium for forecasting monthly city gas consumption. Background Art

[0002] At present, the city gas company adopts the "pay first, use gas later" system for residential users. The residents' payment cycle is affected by various factors such as personal payment habits and weather gas usage. At the same time, with the improvement of residents' living standards, many residents use natural gas for heating and domestic hot water, which brings about changes in natural gas demand, resulting in the city gas company being unable to accurately obtain residents' monthly demand.

[0003] The current residential natural gas forecasting methods mainly use the index method, sampling survey method and urban gas structure subtraction method to predict residential gas consumption. The index method mainly calculates the residential gas consumption index (m 3 / person.month), and the residential gasification rate (the ratio of households that have used natural gas to the total number of households that have installed natural gas) or the number of households using natural gas is used to predict the residential gas consumption. The sampling survey method is to obtain the residential gas consumption by reading the meters of a very small number of residential users of the city gas company. The urban gas structure subtraction method is that the city gas company uses total sales volume - industrial gas volume - public service gas volume to obtain the gas consumption of residents.

[0004] The index method is based on historical data or data from similar cities. Since the sales volume of residential users is affected by factors such as gas-using population, temperature, and changes in gas usage habits, the residential gas usage index changes year by year, and a single index cannot reflect the actual demand of residents. The sampling survey method, due to the small sampling sample, the gas usage behavior of different residential users of urban gas companies fluctuates greatly, and the sampling survey is troublesome and inefficient. The urban gas structure subtraction method, since many industrial users and public service users of urban gas companies use meter reading to calculate their gas consumption, and the meter reading cycle ranges from 0.5 months to 6 months, the natural gas consumption of industrial users and public service users is inaccurate, and therefore the calculated residential gas consumption is also inaccurate.

[0005] In summary, the existing natural gas forecasting methods cannot accurately obtain the monthly natural gas demand of residents. Summary of the invention

[0006] In view of the above problems, the present invention provides a method, device and storage medium for predicting monthly city gas consumption, which adopts the following technical solutions:

[0007] A method for predicting monthly city gas consumption comprises the following steps: collecting historical prepayment data of non-gas Internet of Things meter users and historical gas consumption data of gas Internet of Things meter users in the city; calculating the historical annual total gas consumption of city residents according to the historical prepayment data of non-gas Internet of Things meter users; preprocessing the historical gas consumption data of gas Internet of Things meter users to obtain the historical gas consumption data of non-abnormal gas Internet of Things meter users; calculating the historical monthly total gas consumption of all city residents according to the historical annual total gas consumption of city residents and the historical gas consumption data of non-abnormal gas Internet of Things meter users; and predicting the monthly total gas consumption demand of city gas by using a prophet model based on the historical monthly total gas consumption of all city residents.

[0008] Furthermore, collecting the historical prepayment data of urban non-gas IoT meter users and the historical gas usage data of gas IoT meter users includes the following steps:

[0009] According to the installation time of the city gas IoT meter, determine the time range for obtaining the historical prepayment data of the city's non-gas IoT meter users and the historical gas usage data of the gas IoT meter users.

[0010] Furthermore, the historical prepayment data of non-gas IoT meter users includes the prepayment gas volume and payment time of each household; the historical gas usage data of gas IoT meter users includes daily gas usage.

[0011] Furthermore, based on the historical prepayment data of non-gas IoT meter users, the calculation of the historical annual total gas consumption of urban residents includes the following steps:

[0012] Based on the gas volume purchased by residents with prepaid fees and the interval period, the annual natural gas consumption of each household in each year is calculated by interpolation method;

[0013] For newly installed users who have only paid once, if the payment time and the calculation year are in the same year, the gas volume purchased by residents with prepaid fees is calculated for that year; if the calculation year-the year of payment time>1, the annual natural gas consumption of residents in each year is obtained by interpolation calculation based on December of the calculation year and the month of payment time;

[0014] Determine that the total gas consumption of urban residents in the i-th year is equal to the sum of the annual natural gas consumption of each household in the i-th year.

[0015] Further, preprocessing the historical gas usage data of the gas IoT meter users to obtain the historical gas usage data of the non-abnormal gas IoT meter users includes the following steps:

[0016] In the historical gas usage data of gas IoT meter users, if the missing value of gas usage of a single residential user is greater than 14 days, the user will be deleted from the historical gas usage data;

[0017] Based on the local anomaly factor algorithm, the abnormal value of daily natural gas consumption in the historical gas consumption data of each month is determined;

[0018] For the natural gas consumption on the day determined to be an abnormal value, the average natural gas consumption in the three days before and after is used to replace the abnormal value to obtain the historical gas consumption data of non-abnormal gas IoT meter users.

[0019] Furthermore, according to the historical annual total gas consumption of urban residents and the historical gas consumption data of non-abnormal gas IoT meter users, the historical monthly total gas consumption of all urban residents is calculated, including the following steps:

[0020] Obtain the sum of natural gas usage of all non-abnormal gas IoT meter users in the jth month of the i-th year through the historical gas usage data of non-abnormal gas IoT meter users, and determine that the sum of natural gas usage of all non-abnormal gas IoT meter users in the jth month of the i-th year is equal to the total sales volume of non-abnormal gas IoT meter users in the jth month of the i-th year;

[0021] According to the total sales volume of non-abnormal gas IoT meter users in the jth month of the i-th year and the number of urban gas IoT meter users, determine the average gas consumption of urban gas IoT meter users in the jth month of the i-th year;

[0022] Determine the gas ventilation rate of urban users based on the total gas consumption of urban residents in the i-th year and the average gas consumption of urban gas IoT meter users in the j-th month of the i-th year;

[0023] Based on the gas penetration rate of residential users and the average gas consumption of urban gas IoT meter users in the jth month of the i-th year, the total monthly gas consumption of all urban residents in the j-th month of the i-th year is determined.

[0024] Furthermore, based on the historical monthly total gas consumption of all residents in the city, the prophet model is used to predict the monthly total gas consumption demand of the city gas, including the following steps:

[0025] Create a Prophet model and set the model parameters of the Prophet model;

[0026] The Prophet model is trained using the historical monthly total gas consumption of all city residents and the corresponding months as the training set;

[0027] Determine the time range for the forecast of the total monthly gas consumption demand of urban residents, and input the forecast time range into the trained Prophet model. The Prophet model outputs the trend of the total monthly gas consumption demand of urban gas in the forecast time range.

[0028] Furthermore, according to the total gas consumption of urban residents in the i-th year and the average gas consumption of urban gas IoT meter users in the j-th month of the i-th year, the gas ventilation rate of residential users is determined, including:

[0029]

[0030]

[0031] Furthermore, according to the gas ventilation rate of residential users and the average gas consumption of urban gas IoT meter users in the jth month of the i-th year, the total monthly gas consumption of all urban residents in the jth month of the i-th year is determined, including:

[0032] The total monthly gas consumption of all urban residents in the jth month of the i-th year = (the number of households with installed gas in the j-th month of the i-th year + the number of newly installed households in the j-th month of the i-th year) * the gas ventilation rate of residents * the average monthly gas consumption of urban residents in the j-th month of the i-th year.

[0033] The present invention also provides a device for predicting monthly city gas consumption, comprising:

[0034] A data collection module is used to collect historical prepayment data of urban non-gas IoT meter users and historical gas usage data of gas IoT meter users;

[0035] The first calculation module is used to calculate the historical annual total gas consumption of urban residents based on the historical prepayment data of non-gas IoT meter users;

[0036] A data preprocessing module is used to preprocess the historical gas usage data of gas IoT meter users to obtain the historical gas usage data of non-abnormal gas IoT meter users;

[0037] The second calculation module is used to calculate the historical monthly total gas consumption of all residents in the city based on the historical annual total gas consumption of urban residents and the historical gas consumption data of non-abnormal gas IoT meter users;

[0038] The prediction module is used to predict the monthly total gas demand of the city gas based on the historical monthly total gas consumption of all residents in the city using the prophet model.

[0039] Furthermore, the first computing module is specifically used for:

[0040] Based on the gas volume purchased by residents with prepaid fees and the interval period, the annual natural gas consumption of each household in each year is calculated by interpolation method;

[0041] For newly installed users who have only paid once, if the payment time and the calculation year are in the same year, the gas volume purchased by residents with prepaid fees is calculated for that year; if the calculation year-the year of payment time>1, the annual natural gas consumption of residents in each year is obtained by interpolation calculation based on December of the calculation year and the month of payment time;

[0042] Determine that the total gas consumption of urban residents in the i-th year is equal to the sum of the annual natural gas consumption of each household in the i-th year.

[0043] Furthermore, the data preprocessing module is specifically used for:

[0044] In the historical gas usage data of gas IoT meter users, if the missing value of gas usage of a single residential user is greater than 14 days, the user will be deleted from the historical gas usage data;

[0045] Based on the local anomaly factor algorithm, the abnormal value of daily natural gas consumption in the historical gas consumption data of each month is determined;

[0046] For the natural gas consumption on the day determined to be an abnormal value, the average natural gas consumption in the three days before and after is used to replace the abnormal value to obtain the historical gas consumption data of non-abnormal gas IoT meter users.

[0047] Furthermore, the second calculation module is specifically used for:

[0048] Obtain the sum of natural gas usage of all non-abnormal gas IoT meter users in the jth month of the i-th year through the historical gas usage data of non-abnormal gas IoT meter users, and determine that the sum of natural gas usage of all non-abnormal gas IoT meter users in the jth month of the i-th year is equal to the total sales volume of non-abnormal gas IoT meter users in the jth month of the i-th year;

[0049] According to the total sales volume of non-abnormal gas IoT meter users in the jth month of the i-th year and the number of urban gas IoT meter users, determine the average gas consumption of urban gas IoT meter users in the jth month of the i-th year;

[0050] Determine the gas ventilation rate of urban users based on the total gas consumption of urban residents in the i-th year and the average gas consumption of urban gas IoT meter users in the j-th month of the i-th year;

[0051] Based on the gas penetration rate of residential users and the average gas consumption of urban gas IoT meter users in the jth month of the i-th year, the total monthly gas consumption of all urban residents in the j-th month of the i-th year is determined.

[0052] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for predicting monthly city gas consumption is implemented.

[0053] The beneficial effects of the present invention are as follows: based on the real prepaid fee data of urban gas users and the gas usage data of residents' Internet of Things meters, the accuracy of the prediction results is guaranteed.

[0054] Other features and advantages of the present invention will be described in the following description, and partly become obvious from the description, or be understood by implementing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0056] Figure 1 A schematic diagram showing the main process of a method for predicting monthly city gas consumption according to an embodiment of the present invention is shown;

[0057] Figure 2 A schematic structural diagram of a device for predicting monthly city gas consumption according to an embodiment of the present invention is shown.

[0058] In the figure: 1. Data collection module; 2. First calculation module; 3. Data preprocessing module; 4. Second calculation module; 5. Prediction module. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0060] It should be noted that the terms "first", "second", etc. in the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0061] With the development of Internet of Things technology, the urban gas industry is gradually moving towards digital development. Some urban gas companies install Internet of Things meters for residents, while urban gas companies that have not installed Internet of Things meters have access to the prepayment data of residential users.

[0062] Therefore, the embodiment of the present invention proposes a method, device and storage medium for predicting monthly urban gas consumption, which can accurately predict the monthly residential natural gas demand of urban gas companies based on a small amount of residential IoT meter data and residents' "prepayment" data of the gas company. It can guide urban gas companies to understand the main influencing factors of their natural gas sales, and provide technical support for urban gas companies to sign monthly gas purchase contracts with upstream natural gas sales companies and for urban gas companies to formulate natural gas peak-shaving guarantee measures.

[0063] like Figure 1 As shown, a method for predicting monthly city gas consumption includes the following steps:

[0064] S1. Collect and store the historical prepayment data of urban non-gas IoT meter users and the historical gas usage data of gas IoT meter users, as follows: Determine the time range for obtaining the historical prepayment data of urban non-gas IoT meter users and the historical gas usage data of gas IoT meter users based on the installation time of the urban gas IoT meter.

[0065] For example, the calculation time range is K years, K = calculation year - gas IoT meter installation year.

[0066] Among them, the historical prepayment data of non-gas IoT meter users includes the prepayment gas volume and payment time of each household; the historical gas consumption data of gas IoT meter users includes daily gas consumption.

[0067] S2. Based on the historical prepayment data of non-gas IoT meter users, calculate the historical annual total gas consumption of urban residents, as follows:

[0068] S21. Based on the gas volume purchased with residents' prepaid fees and the interval period, the annual natural gas consumption of each household in each year (1, 2, ...K years) is calculated using the interpolation method.

[0069] S22. For newly installed users who have only paid once, if the payment time and the calculation year (the Kth year) are in the same year, the gas volume purchased by residents with prepayment is calculated for that year; if the calculation year - the year of payment time > 1, the annual natural gas consumption of residents in each year is obtained by interpolation calculation based on December of the calculation year and the month of payment time.

[0070] S23. Determine that the total gas consumption of urban residents in the i-th year is equal to the sum of the annual natural gas consumption of each household in the i-th year.

[0071] S3. Preprocess the historical gas usage data of gas IoT meter users to obtain the historical gas usage data of non-abnormal gas IoT meter users, as follows:

[0072] S31. In the historical gas usage data of gas IoT meter users, if the missing value of gas usage of a single residential user is greater than 14 days, the user will be deleted from the historical gas usage data.

[0073] S32. Based on the local anomaly factor algorithm, determine the abnormal value of daily natural gas consumption in the historical gas consumption data of each month, as follows:

[0074] S321. The daily natural gas consumption of each residential user in each month is represented as a data point to obtain a data set, and the k-th reachable distance of each data point in the k-th distance neighborhood of any data point p in the data set is calculated:

[0075] reach_dist k (p,o)=max{d k (o),d(p,o)}

[0076] Where, d k (o) is the kth distance of the neighborhood point o, and d(p,o) is the distance from the neighborhood point o to point p.

[0077] S322. Calculate the local kth local reachable density of any data point p:

[0078]

[0079] In the formula, |N k (p)|is the kth distance neighborhood N of point p k (p) The number of data points within.

[0080] S323. Calculate the kth local outlier factor of any data point p:

[0081]

[0082] 324. Select the data point corresponding to the local outlier factor > 1, and determine that the daily natural gas consumption of the residential user represented by the data point is an abnormal value.

[0083] S33. For the natural gas consumption on the day determined to be an abnormal value, the average natural gas consumption within the three days before and after is used to replace the abnormal value to obtain the historical gas consumption data of non-abnormal gas IoT meter users.

[0084] S4. Calculate the historical monthly total gas consumption of all residents in the city based on the historical annual total gas consumption of urban residents and the historical gas consumption data of non-abnormal gas IoT meter users, as follows:

[0085] S41. Obtain the sum of natural gas usage of all non-abnormal gas Internet of Things meter users in the jth month of the i-th year through historical gas usage data of non-abnormal gas Internet of Things meter users, and determine that the sum of natural gas usage of all non-abnormal gas Internet of Things meter users in the jth month of the i-th year is equal to the total sales volume of non-abnormal gas Internet of Things meter users in the jth month of the i-th year.

[0086] S42. According to the total sales volume of the non-abnormal gas IoT meter users in the jth month of the i-th year and the number of city gas IoT meter users, determine the average gas consumption of the city gas IoT meter users in the jth month of the i-th year, as follows:

[0087] The average gas consumption of city gas IoT meter users in the jth month of the i-th year = the total sales volume of non-abnormal gas IoT meter users in the j-th month of the i-th year / the number of city gas IoT meter users.

[0088] S43. Assume that the average monthly gas consumption of urban residents in the jth month of the i-th year is equal to the average monthly gas consumption of urban gas IoT meter users in the j-th month of the i-th year.

[0089] S44. According to the total gas consumption of urban residents in the i-th year and the average gas consumption of urban gas IoT meter users in the j-th month in the i-th year, the gas ventilation rate of residential users is determined as follows:

[0090]

[0091] S45. According to the gas ventilation rate of residential users and the average gas consumption of urban gas IoT meter users in the jth month of the i-th year, determine the total monthly gas consumption of all urban residents in the jth month of the i-th year, as follows:

[0092] The total monthly gas consumption of all urban residents in the jth month of the i-th year = (the number of households with installed gas in the j-th month of the i-th year + the number of newly installed households in the j-th month of the i-th year) * the gas ventilation rate of residents * the average monthly gas consumption of urban residents in the j-th month of the i-th year.

[0093] S5. Based on the historical monthly total gas consumption of all residents in the city, the prophet model is used to predict the monthly total gas demand of the city.

[0094] Among them, the Prophet model is a data prediction tool based on Python and R language. It is a time series model based on time and variable values ​​combined with time series decomposition and machine learning fitting.

[0095] Based on the historical monthly total gas consumption of all residents in the city, the prophet model is used to predict the monthly total gas consumption demand of the city gas, including the following steps:

[0096] S51. Create a Prophet model and set the model parameters of the Prophet model. The model parameters include trend item parameters, seasonal item parameters, external variable parameters (holiday impact parameters) and error item parameters. The created Prophet model is as follows:

[0097] y(t)=g(t)+s(t)+h(t)+∈ t

[0098] Wherein, y(t) is the Prophet model, g(t) is the trend term parameter indicating the non-periodic trend of the time series; s(t) is the seasonal term parameter, also known as the periodic term, which can be in units of weeks, months or years; h(t) is the external variable parameter (holiday impact parameter), indicating whether there is a holiday on that day. The embodiment of the present invention does not consider the impact of holidays; ∈ t is the error term parameter, which represents the fluctuation not predicted by the model and follows a Gaussian distribution.

[0099] Among them, the trend term parameter g(t) adopts a linear trend term, as follows:

[0100] g(t)=(k+a(t) T δ).t+(m+a(t) T γ)

[0101] In the formula, k represents the growth rate, δ represents the change in the growth rate, m represents the offset, and a(t) represents the number of times the mutation point changes before time t.

[0102] Among them, is the seasonal parameter s(t), as follows:

[0103]

[0104] β=(a1,b1,…,a N , b N ) T

[0105] Among them, the initialization of β is β~Normal(0,σ 2 ). Here σ is controlled by seasonality-prior_scale, that is, σ = seasonality-prior_scale. The larger the value, the more obvious the seasonal effect; the smaller the value, the less obvious the seasonal effect. σ is the smoothing parameter corresponding to the seasonal term.

[0106] In the formula, n represents the number of parameters that need to be estimated to fit the seasonality, N represents the number of cycles used, and P represents the cycle length of the expected time series.

[0107] S52. The historical monthly total gas consumption of all residents in the city and the corresponding months are used as training sets to train the Prophet model.

[0108] S53. Determine the time range for forecasting the total monthly gas consumption demand of urban residents, and input the forecasted time range into the trained Prophet model. The Prophet model outputs the trend of the total monthly gas consumption demand of urban gas within the forecasted time range.

[0109] The prediction method of the embodiment of the present invention is based on real prepaid data of urban gas users and gas usage data of residents' Internet of Things meters, thereby ensuring the accuracy of the prediction results.

[0110] like Figure 2 As shown, an embodiment of the present invention further provides a device for predicting monthly city gas consumption, comprising a data collection module 1, a first calculation module 2, a data preprocessing module 3, a second calculation module 4 and a prediction module 5.

[0111] Among them, the data collection module 1 is used to collect the historical prepayment data of non-gas Internet of Things meter users in the city and the historical gas consumption data of gas Internet of Things meter users. The first calculation module 2 is used to calculate the historical annual total gas consumption of urban residents based on the historical prepayment data of non-gas Internet of Things meter users. The data preprocessing module 3 is used to preprocess the historical gas consumption data of gas Internet of Things meter users to obtain the historical gas consumption data of non-abnormal gas Internet of Things meter users. The second calculation module 4 is used to calculate the historical monthly total gas consumption of all residents in the city based on the historical annual total gas consumption of urban residents and the historical gas consumption data of non-abnormal gas Internet of Things meter users. The prediction module 5 is used to use the prophet model to predict the monthly total gas consumption demand of urban gas based on the historical monthly total gas consumption of all residents in the city.

[0112] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the above-mentioned method for predicting monthly city gas consumption is implemented.

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

[0114] Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent substitutions for some of the technical features therein; and these modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting monthly city gas consumption, characterized in that: The following steps are involved: Collect historical prepayment data of urban non-gas IoT meter users and historical gas usage data of gas IoT meter users; Calculate the total annual gas consumption of urban residents based on the historical prepayment data of non-gas IoT meter users; Preprocess the historical gas usage data of gas IoT meter users to obtain the historical gas usage data of non-abnormal gas IoT meter users; Calculate the historical monthly total gas consumption of all residents in the city based on the historical annual total gas consumption of urban residents and the historical gas consumption data of non-abnormal gas IoT meter users; Based on the historical monthly total gas consumption of all urban residents, the prophet model is used to predict the monthly total gas demand of urban gas.

2. The method for predicting monthly city gas consumption according to claim 1, characterized in that: Collecting the historical prepayment data of urban non-gas IoT meter users and the historical gas usage data of gas IoT meter users includes the following steps: According to the installation time of the city gas IoT meter, determine the time range for obtaining the historical prepayment data of the city's non-gas IoT meter users and the historical gas usage data of the gas IoT meter users.

3. The method for predicting monthly city gas consumption according to claim 1, characterized in that: The historical prepayment data of non-gas IoT meter users includes the prepayment gas volume and payment time of each household; the historical gas usage data of gas IoT meter users includes daily gas usage.

4. The method for predicting monthly city gas consumption according to claim 1, characterized in that: Based on the historical prepayment data of non-gas IoT meter users, the calculation of the historical annual total gas consumption of urban residents includes the following steps: Based on the gas volume purchased by residents with prepaid fees and the interval period, the annual natural gas consumption of each household in each year is calculated by interpolation method; For newly installed users who have only paid once, if the payment time and the calculation year are in the same year, the gas volume purchased by residents with prepaid fees is calculated for that year; if the calculation year-the year of payment time>1, the annual natural gas consumption of residents in each year is obtained by interpolation calculation based on December of the calculation year and the month of payment time; Determine that the total gas consumption of urban residents in the i-th year is equal to the sum of the annual natural gas consumption of each household in the i-th year.

5. The method for predicting monthly city gas consumption according to claim 1, characterized in that: Preprocessing the historical gas usage data of gas IoT meter users to obtain the historical gas usage data of non-abnormal gas IoT meter users includes the following steps: In the historical gas usage data of gas IoT meter users, if the missing value of gas usage of a single residential user is greater than 14 days, the user will be deleted from the historical gas usage data; Based on the local anomaly factor algorithm, the abnormal value of daily natural gas consumption in the historical gas consumption data of each month is determined; For the natural gas consumption on the day determined to be an abnormal value, the average natural gas consumption in the three days before and after is used to replace the abnormal value to obtain the historical gas consumption data of non-abnormal gas IoT meter users.

6. The method for predicting monthly city gas consumption according to claim 1, characterized in that: Based on the historical annual total gas consumption of urban residents and the historical gas consumption data of non-abnormal gas IoT meter users, the calculation of the historical monthly total gas consumption of all urban residents includes the following steps: Obtain the sum of natural gas usage of all non-abnormal gas IoT meter users in the jth month of the i-th year through the historical gas usage data of non-abnormal gas IoT meter users, and determine that the sum of natural gas usage of all non-abnormal gas IoT meter users in the jth month of the i-th year is equal to the total sales volume of non-abnormal gas IoT meter users in the jth month of the i-th year; According to the total sales volume of non-abnormal gas IoT meter users in the jth month of the i-th year and the number of urban gas IoT meter users, determine the average gas consumption of urban gas IoT meter users in the jth month of the i-th year; Determine the gas ventilation rate of urban users based on the total gas consumption of urban residents in the i-th year and the average gas consumption of urban gas IoT meter users in the j-th month of the i-th year; Based on the gas penetration rate of residential users and the average gas consumption of urban gas IoT meter users in the jth month of the i-th year, the total monthly gas consumption of all urban residents in the j-th month of the i-th year is determined.

7. The method for predicting monthly city gas consumption according to any one of claims 1 to 6, characterized in that: Based on the historical monthly total gas consumption of all residents in the city, the prophet model is used to predict the monthly total gas consumption demand of the city gas, which includes the following steps: Create a Prophet model and set the model parameters of the Prophet model; The Prophet model is trained using the historical monthly total gas consumption of all city residents and the corresponding months as the training set; Determine the time range for the forecast of the total monthly gas consumption demand of urban residents, and input the forecast time range into the trained Prophet model. The Prophet model outputs the trend of the total monthly gas consumption demand of urban gas in the forecast time range.

8. The method for predicting monthly city gas consumption according to claim 6, characterized in that: According to the total gas consumption of urban residents in the i-th year and the average gas consumption of urban gas IoT meter users in the j-th month in the i-th year, the gas ventilation rate of residential users is determined, including:

9. The method for predicting monthly city gas consumption according to claim 6, characterized in that: According to the gas ventilation rate of residential users and the average gas consumption of urban gas IoT meter users in the jth month of the i-th year, the total monthly gas consumption of all urban residents in the jth month of the i-th year is determined, including: The total monthly gas consumption of all urban residents in the jth month of the i-th year = (the number of households with installed gas in the j-th month of the i-th year + the number of newly installed households in the j-th month of the i-th year) * the gas ventilation rate of residents * the average monthly gas consumption of urban residents in the j-th month of the i-th year.

10. A device for predicting monthly city gas consumption, characterized in that: include: A data collection module is used to collect historical prepayment data of urban non-gas IoT meter users and historical gas usage data of gas IoT meter users; The first calculation module is used to calculate the historical annual total gas consumption of urban residents based on the historical prepayment data of non-gas IoT meter users; A data preprocessing module is used to preprocess the historical gas usage data of gas IoT meter users to obtain the historical gas usage data of non-abnormal gas IoT meter users; The second calculation module is used to calculate the historical monthly total gas consumption of all residents in the city based on the historical annual total gas consumption of urban residents and the historical gas consumption data of non-abnormal gas IoT meter users; The prediction module is used to predict the monthly total gas demand of the city gas based on the historical monthly total gas consumption of all residents in the city using the prophet model.

11. The device for predicting monthly city gas consumption according to claim 10, characterized in that: The first calculation module is specifically used for: Based on the gas volume purchased by residents with prepaid fees and the interval period, the annual natural gas consumption of each household in each year is calculated by interpolation method; For newly installed users who have only paid once, if the payment time and the calculation year are in the same year, the gas volume purchased by residents with prepaid fees is calculated for that year; if the calculation year-the year of payment time>1, the annual natural gas consumption of residents in each year is obtained by interpolation calculation based on December of the calculation year and the month of payment time; Determine that the total gas consumption of urban residents in the i-th year is equal to the sum of the annual natural gas consumption of each household in the i-th year.

12. The city gas monthly consumption prediction device according to claim 10, characterized in that: The data preprocessing module is specifically used for: In the historical gas usage data of gas IoT meter users, if the missing value of gas usage of a single residential user is greater than 14 days, the user will be deleted from the historical gas usage data; Based on the local anomaly factor algorithm, the abnormal value of daily natural gas consumption in the historical gas consumption data of each month is determined; For the natural gas consumption on the day determined to be an abnormal value, the average natural gas consumption in the three days before and after is used to replace the abnormal value to obtain the historical gas consumption data of non-abnormal gas IoT meter users.

13. The city gas monthly consumption prediction device according to claim 10, characterized in that: The second calculation module is specifically used for: Obtain the sum of natural gas usage of all non-abnormal gas IoT meter users in the jth month of the i-th year through the historical gas usage data of non-abnormal gas IoT meter users, and determine that the sum of natural gas usage of all non-abnormal gas IoT meter users in the jth month of the i-th year is equal to the total sales volume of non-abnormal gas IoT meter users in the jth month of the i-th year; According to the total sales volume of non-abnormal gas IoT meter users in the jth month of the i-th year and the number of urban gas IoT meter users, determine the average gas consumption of urban gas IoT meter users in the jth month of the i-th year; Determine the gas ventilation rate of urban users based on the total gas consumption of urban residents in the i-th year and the average gas consumption of urban gas IoT meter users in the j-th month of the i-th year; Based on the gas penetration rate of residential users and the average gas consumption of urban gas IoT meter users in the jth month of the i-th year, the total monthly gas consumption of all urban residents in the j-th month of the i-th year is determined.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for predicting monthly city gas consumption according to any one of claims 1 to 9 is implemented.

Citation Information

Cited By

  • Method, device and equipment for monitoring gas consumption data abnormity of civilian users

    CN120011706A