Rural hourly water consumption prediction method based on deep learning

By establishing a water demand prediction model and a self-optimization model based on deep learning methods, combined with Zeiler's formula and multiple regression models, and deploying flow sensors, the problem of difficult prediction of water changes in rural water supply has been solved, and hourly water consumption in rural areas has been achieved. The precise monitoring and prediction of water resources improves the rational utilization of water resources and the guarantee of water supply.

CN118760840APending Publication Date: 2024-10-11HUNAN PROVINCIAL WATER CONSERVANCY & HYDROPOWER SURVEY & DESIGN INST GENERAL INST
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410937635.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

The existing rural water supply and drainage technology lacks a real-time hourly water consumption prediction method, making it difficult to accurately predict the changing patterns of water use in rural areas, resulting in unstable water supply pressure, insufficient water supply during peak periods, low informatization levels, and poor water supply guarantee rates.

Method used

Using methods based on deep learning, by collecting and preprocessing historical water use data and real-time data, we establish a water demand prediction model and a self-optimization model. Combined with Zeiler's formula and multiple regression models, we deploy flow sensors for real-time data collection and processing, and establish visualization Topological system enables accurate monitoring and prediction of hourly water consumption in rural areas.

Benefits of technology

It achieves precise monitoring and accurate prediction of dynamic changes in rural domestic water consumption, improves the rational dispatch and utilization of water resources, and improves the stability and guarantee rate of rural water supply.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760840A_ABST
    Figure CN118760840A_ABST
Patent Text Reader

Abstract

The invention discloses a rural hourly water consumption prediction method based on deep learning. The rural hourly water consumption prediction method comprises the steps of S1, collecting water consumption historical data and actual water consumption real-time data; s2, preprocessing the water consumption historical data and the actual water consumption real-time data; s3, establishing a water demand prediction model and a self-optimization model according to the preprocessed data; and S4, according to the actual predicted water demand output by the water demand prediction model and the self-optimization model and actual water consumption real-time data, establishing a visual topology system by taking a rural pipe network system as a topology. According to the method, analysis and data feature mining are performed based on historical data, a self-optimized water volume prediction model is established, and the method is used for accurately monitoring specific water consumption time points and positions, accurately predicting dynamic changes of rural domestic water demand and finally realizing reasonable scheduling and utilization of rural water resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of rural water supply and drainage technology, and more specifically, to a rural hourly water consumption prediction method based on deep learning. Background Art

[0002] In recent years, as my country vigorously promotes the integration of urban and rural water supply, the importance and urgency of rural water supply have become increasingly prominent. However, due to the fact that the infrastructure construction in the vast rural areas of my country is more backward than that in cities, the coverage rate and water safety guarantee rate of rural water supply still need to be greatly improved. Rural water supply faces the current situation of large terrain fluctuations, scattered water points for residents, long water supply pipelines, and dendritic distribution of pipelines. There are many problems such as unstable water pressure, insufficient water supply during peak hours, backward information level, and poor water supply guarantee rate. Traditional rural water supply planning, design and management adopt urban water supply methods and concepts, which are not in line with the current situation of rural water supply.

[0003] Rural domestic water demand forecasting has important economic and social benefits in water resources management. Among the existing rural water supply and drainage technologies, rural water demand forecasting research is mostly focused on improving forecast accuracy, and most of them are annual scale forecasts. There is a lack of real-time water demand forecasting systematic methods for analyzing the changing laws and characteristics of water demand in rural areas. Summary of the invention

[0004] The purpose of the present invention is to provide a rural hourly water consumption prediction method based on deep learning to overcome the defects of the prior art.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0006] A rural hourly water consumption prediction method based on deep learning includes the following steps:

[0007] S1. Collect historical water use data and real-time data on actual water use;

[0008] S2. Preprocessing the historical water use data and the real-time data of actual water use;

[0009] S3, establishing a water demand prediction model and a self-optimization model according to the pre-processed data;

[0010] S4. According to the actual predicted water demand output by the water demand prediction model and the self-optimization model, as well as the real-time data of actual water use, a visual topology system is established with the rural pipe network system as the topology.

[0011] Furthermore, the step S1 specifically includes: collecting historical water supply and actual water consumption hourly data of the rural area to be predicted, temperature and humidity data of corresponding time nodes, data on the day of the week corresponding to the time of the day, and numerical data on whether the day is a holiday.

[0012] Furthermore, the collected data on historical water supply and actual water use hours in the rural area to be predicted, temperature and humidity data at corresponding time nodes, data on the day of the week corresponding to the time of the day, and numerical data on whether the day is a holiday specifically include:

[0013] The Zeiller formula is used to calculate the week number data. The Zeiller formula is:

[0014]

[0015] Where h is the result of the day of the week, q is the day of the date, m is the month, K is the last two digits of the year, and J is the first two digits of the year;

[0016] Whether the current day is a holiday or not, the mapping rules are as follows:

[0017]

[0018] Furthermore, the step S2 is specifically as follows:

[0019] Store historical data and temperature, humidity data, holiday information, and weekday data at corresponding time nodes as a data sequence;

[0020] The real-time data and the predicted data obtained by the prediction model are stored as a data sequence. If there is no predicted data, the default value None is used;

[0021] Process abnormal data. If some parameter values ​​are missing, take the average of the corresponding data of the six hours before and after that hour for filling; if the parameter value is repeated for a long time, take the data of the same time period of the same month multiplied by the deviation coefficient for filling; if the parameter value fluctuates incorrectly, take the average of the data of the same time period in the last few days for filling.

[0022] Furthermore, the deviation coefficient is the divisor average of non-repetitive data in the same month and time period and non-repetitive data in the repeated time period.

[0023] Furthermore, the steps of obtaining the real-time data of actual water consumption in step S1 are as follows:

[0024] Select important nodes in the rural water supply network, deploy flow sensors, and attach corresponding data and power pipelines. The sensors upload and interact with data based on HTTP / HTTPS and TCP protocols.

[0025] Furthermore, the selection principle of the important nodes of the rural water supply network is: the user entry point or the intersection of the network.

[0026] Furthermore, the step of establishing the water demand prediction model in step S3 includes:

[0027] Based on historical data, take the data of each hour, the data of the set time before this time period, and the data of the same week of this month as input, and take the data of the next hour as the output label to establish a data set. Randomly use the first proportion of the data set size as the training set, and the rest as the validation set. Each independent data set contains at least one month of continuous running data.

[0028] Define the structure of the LSTM model, including the input layer, hidden layer, and output layer;

[0029] Load the training set data, train the LSTM model, adjust the model parameters to minimize the prediction error, and obtain the water demand prediction model;

[0030] The validation set is used to validate the trained water demand prediction model. If the validation set passes, the water demand prediction model is established. Otherwise, the first ratio is adjusted and retrained.

[0031] Furthermore, the steps of establishing the self-optimization model include:

[0032] Based on the actual water use real-time data, a self-optimization model is established as follows:

[0033] Q t2 =(α+β+γ)×Q t1 ÷3

[0034] In the formula, Q t2 represents the actual predicted water demand for the next hour, α is the deviation coefficient, β is the average time shift coefficient, γ is the environmental correction coefficient, Q t1 Output values ​​for the prediction model.

[0035] Furthermore, the step S4 specifically includes:

[0036] Collect information on rural pipe network layout, materials, diameter, length, and connection points, build a geometric model of the pipe network based on ArcGIS, and integrate historical data and real-time monitoring operation data into the pipe network to obtain a data model of the pipe network;

[0037] The backend program is written in Python to generate time series curves of real-time data and actual predicted water demand for visualization.

[0038] Compared with the prior art, the advantages of the present invention are: the present invention analyzes historical data, mines data features, and establishes a self-optimizing water volume prediction model, which is used to accurately monitor specific water use time points and locations, accurately predict the dynamic changes in rural living water demand, and ultimately achieve the rational scheduling and utilization of rural water resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only 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.

[0040] Figure 1 It is a flow chart of the rural hourly water consumption prediction method based on deep learning of the present invention.

[0041] Figure 2 It is a schematic diagram of the water demand prediction model and the self-optimization model in the present invention.

[0042] Figure 3 A time series graph of the forecast data is generated for the present invention.

[0043] Figure 4 A graph showing predicted water demand over time for the present invention.

[0044] Figure 5 A comparison chart showing real-time data and predicted data is provided for the present invention. DETAILED DESCRIPTION

[0045] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.

[0046] See also Figure 1 As shown, this embodiment discloses a rural hourly water consumption prediction method based on deep learning, comprising the following steps:

[0047] Step S1, collecting water usage history data and actual water usage real-time data.

[0048] Step S2: pre-processing the water usage history data and the actual water usage real-time data.

[0049] Step S3: establishing a water demand prediction model and a self-optimization model based on the preprocessed data.

[0050] Step S4: Based on the actual predicted water demand output by the water demand prediction model and the self-optimization model, as well as the real-time data of actual water use, a visual topology system is established with the rural pipe network system as the topology.

[0051] In this embodiment, step S1 specifically includes: collecting historical water supply and actual water use hour data of the rural area to be predicted, temperature and humidity data of the corresponding time node, data on the day of the week corresponding to the time of the day, and numerical data on whether the day is a holiday. The specific calculation method is:

[0052] The Zeiller formula is used to calculate the week number data. The Zeiller formula is:

[0053]

[0054] Wherein, h is the result of the day of the week, 0 represents Saturday, 1 represents Sunday, 2 represents Monday, and so on, q is the day of the date (1 to 31), m is the month (3 represents March, 4 represents April, ..., 12 represents December; 1 and 2 represent the 13th and 14th months of the previous year, i.e. January and February), K is the last two digits of the year, and J is the first two digits of the year.

[0055] Whether the current day is a holiday or not, the mapping rules are as follows:

[0056]

[0057] In terms of data collection, this embodiment selects important nodes of the rural water supply network, deploys flow sensors, and attaches corresponding data and power pipelines. The sensors upload and interact with data based on HTTP / HTTPS and TCP protocols. The selection principle of important nodes in the rural water supply network is: user introduction point or network intersection.

[0058] In this embodiment, in step S2, a data stream processing framework such as Kafka is used to collect the overall data and upload it to the deployed server. The preprocessing steps are specifically as follows:

[0059] Store historical data and temperature, humidity data, holiday information, and weekday data at corresponding time nodes as a data sequence;

[0060] The real-time data and the predicted data obtained by the prediction model are stored as a data sequence. If there is no predicted data, the default value None is used;

[0061] Process the abnormal data. If some parameter values ​​are missing, take the average of the corresponding data of the six hours before and after the hour for filling. If the parameter value is repeated for a long time, take the data of the same time period of the same month multiplied by the deviation coefficient for filling. The deviation coefficient is the average of the non-repeating data of the same time period of the same month and the divisor of the non-repeating data of the repeated time period. If the parameter value fluctuates incorrectly, take the average of the data of the same time period in the last few set days for filling.

[0062] A relational database management system is established based on MySQL, and Hadoop and Spark tools are used to batch process data.

[0063] In this embodiment, the step of establishing the water demand prediction model in step S3 includes:

[0064] Based on historical data, the data of each hour and the data of the set time before this time period (such as 6 hours), the temperature and humidity data of this hour, the holiday information data and the data of the same week of this month are used as input, and the data of the next hour is used as the output label to establish a data set. The first proportion (2 / 3) of the data set size is randomly used as the training set, and the remaining (1 / 3) is used as the validation set. Each independent data set contains at least one month of continuous running data.

[0065] Define the structure of the LSTM model, including the input layer, hidden layer, and output layer.

[0066] Load the training set data, train the LSTM model, adjust the model parameters to minimize the prediction error, and obtain the water demand prediction model.

[0067] The validation set is used to validate the trained water demand prediction model to evaluate the robustness and accuracy of the model. If it passes, the water demand prediction model is established. Otherwise, the first ratio is adjusted and retrained.

[0068] like Figure 2 As shown, the steps of establishing the self-optimization model include:

[0069] Based on the actual water use real-time data, a self-optimization model is established as follows:

[0070] Q t2 =(α+β+γ)×Q t1 ÷3

[0071] In the formula, Q t2 represents the actual predicted water demand for the next hour, α is the deviation coefficient, β is the average time shift coefficient, γ is the environmental correction coefficient, Q t1 Output values ​​for the prediction model.

[0072] In this embodiment, the deviation coefficient α is calculated by dividing the total real-time operating data of the same time node (i.e., the same week of the same month) by the total predicted data value; the average time-shift coefficient β is calculated by solving the average time-shift coefficient for the collected data of the same month, dividing the actual water consumption by the predicted data for each hour to obtain a single time-shift coefficient, summing the time-shift coefficients of the existing data for that month and dividing it by the data size to obtain the average time-shift coefficient.

[0073] The environmental correction coefficient γ is obtained by a multiple regression model. The specific calculation method is: take the temperature, humidity data, and holiday information data of a certain hour in the historical data as independent variables, and the water supply data of the hour as the dependent variable, and establish the following multiple regression model:

[0074] Q e =a 1 ×T+a 2 ×Wet+a 3 ×H×Q p

[0075] In the formula, Q e Indicates the water demand in the next hour determined by temperature, humidity, and holiday information. T indicates the temperature of the hour, Wet indicates the humidity of the hour, H indicates whether the hour is a holiday, and Q p It represents the difference between the average hourly water consumption during holidays and non-holidays, calculated from historical data. 1 、a 2 、a 3 are the multiple regression coefficients, obtained by solving the model.

[0076] Input the humidity, temperature, and holiday information at the predicted time point into the multivariate regression model to calculate the environmental predicted water volume Q e , and then divide the environmental predicted water volume by the predicted water volume output by the LSTM model to obtain the environmental correction coefficient γ.

[0077] In this embodiment, step S4 specifically includes:

[0078] Collect information on rural pipeline network layout, materials, diameter, length, and connection points, build a geometric model of the pipeline network based on ArcGIS, and integrate historical data and real-time monitored operation data into the pipeline network to obtain a data model of the pipeline network.

[0079] The backend program is written in Python to generate time series curves of real-time data and actual predicted water demand for visualization.

[0080] In this embodiment, a time series curve of real-time data can be generated to show the change of actual water consumption over time; Figure 3The following table shows the time series curve of the predicted water demand generated from the operation data of a certain place for two months. Figure 4 The following table shows the forecast data for a certain place for two months. The comparison between real-time data and forecast data is displayed through a visual interface to help users analyze and make decisions, such as Figure 5 Shown are analytical data for two months in a certain place.

[0081] Although the embodiments of the present invention are described in conjunction with the accompanying drawings, the patent owner may make various variations or modifications within the scope of the appended claims. As long as they do not exceed the protection scope described in the claims of the present invention, they should be within the protection scope of the present invention.

Claims

1. A rural hourly water consumption prediction method based on deep learning, characterized in that: The following steps are involved: S1. Collect historical water use data and real-time data on actual water use; S2. Preprocessing the historical water use data and the real-time data of actual water use; S3, establishing a water demand prediction model and a self-optimization model according to the pre-processed data; S4. According to the actual predicted water demand output by the water demand prediction model and the self-optimization model, as well as the real-time data of actual water use, a visual topology system is established with the rural pipe network system as the topology.

2. The rural hourly water consumption prediction method based on deep learning according to claim 1 is characterized in that: The step S1 specifically includes: collecting historical water supply and actual water use hour data of the rural area to be predicted, temperature and humidity data of corresponding time nodes, data on the day of the week corresponding to the time of the day, and numerical data on whether the day is a holiday.

3. The rural hourly water consumption prediction method based on deep learning according to claim 2 is characterized in that: The collected historical water supply and actual water use hourly data of the rural area to be predicted, the temperature and humidity data of the corresponding time nodes, the data of the day of the week corresponding to the time of the day, and the numerical data of whether the day is a holiday specifically include: The Zeiller formula is used to calculate the week number data. The Zeiller formula is: Where h is the result of the day of the week, q is the day of the date, m is the month, K is the last two digits of the year, and J is the first two digits of the year; Whether the current day is a holiday or not, the mapping rules are as follows:

4. The rural hourly water consumption prediction method based on deep learning according to claim 1 is characterized in that: The step S2 is specifically as follows: Store historical data and temperature, humidity data, holiday information, and weekday data at corresponding time nodes as a data sequence; The real-time data and the predicted data obtained by the prediction model are stored as a data sequence. If there is no predicted data, the default value None is used; Process abnormal data. If some parameter values ​​are missing, take the average of the corresponding data of the six hours before and after that hour for filling; if the parameter value is repeated for a long time, take the data of the same time period of the same month multiplied by the deviation coefficient for filling; if the parameter value fluctuates incorrectly, take the average of the data of the same time period in the last few days for filling.

5. The rural hourly water consumption prediction method based on deep learning according to claim 4 is characterized in that: The deviation coefficient is the divisor average of the non-repeated data in the same month and time period and the non-repeated data in the repeated time period.

6. The rural hourly water consumption prediction method based on deep learning according to claim 1 is characterized in that: The steps of actual water use real-time data in step S1 are: Select important nodes in the rural water supply network, deploy flow sensors, and attach corresponding data and power pipelines. The sensors upload and interact with data based on HTTP / HTTPS and TCP protocols.

7. The rural hourly water consumption prediction method based on deep learning according to claim 1 is characterized in that: The principle for selecting important nodes of the rural water supply network is: the user entry point or the intersection of the network.

8. The rural hourly water consumption prediction method based on deep learning according to claim 1 is characterized in that: The steps of establishing the water demand prediction model in step S3 include: Based on historical data, take the data of each hour, the data of the set time before this time period, and the data of the same week of this month as input, and take the data of the next hour as the output label to establish a data set. Randomly use the first proportion of the data set size as the training set, and the rest as the validation set. Each independent data set contains at least one month of continuous running data. Define the structure of the LSTM model, including the input layer, hidden layer, and output layer; Load the training set data, train the LSTM model, adjust the model parameters to minimize the prediction error, and obtain the water demand prediction model; The validation set is used to validate the trained water demand prediction model. If the validation set passes, the water demand prediction model is established. Otherwise, the first ratio is adjusted and retrained.

9. The rural hourly water consumption prediction method based on deep learning according to claim 1 is characterized in that: The steps of establishing the self-optimization model include: Based on the actual water use real-time data, a self-optimization model is established as follows: Q t2 =(α+β+γ)×Q t1 ÷3 In the formula, Q t2 represents the actual predicted water demand for the next hour, α is the deviation coefficient, β is the average time shift coefficient, γ is the environmental correction coefficient, Q t1 Output values ​​for the prediction model.

10. The rural hourly water consumption prediction method based on deep learning according to claim 1 is characterized in that: The step S4 specifically includes: Collect information on rural pipe network layout, materials, diameter, length, and connection points, build a geometric model of the pipe network based on ArcGIS, and integrate historical data and real-time monitoring operation data into the pipe network to obtain a data model of the pipe network; The backend program is written in Python to generate time series curves of real-time data and actual predicted water demand for visualization.

Citation Information

Cited By

  • Rural water supply pipe network pressure monitoring analysis method and device based on digital twinning

    CN119539469A

  • Intelligent accounting method for industrial water consumption

    CN120069220A