Abstract
Although the management and planning of water resources are extremely significant to human development, the complexity of implementation is unimaginable. To achieve this, the high-precision water consumption prediction is actually the key component of urban water optimization management system. Water consumption is usually affected by many factors, such as weather, economy, and water prices. If these impact factors are directly combined to predict water consumption, the weight of each perspective on the water consumption will be ignored, which will be greatly detrimental to the prediction accuracy. Therefore, this paper proposes a deep neural network-based complex system for urban water management. The essence of it is to formulate a water consumption prediction model with the aid of principal component analysis (PCA) and the integrated deep neural network, which is abbreviated as UWM-Id. The PCA classifies the factors affecting water consumption in the original data into three categories according to their correlation and inputs them into the neural network model. The results in the previous step are assigned weights and integrated into the form of fully connected layer. Finally, analyzing the sensitivity of the proposed UWM-Id and comparing its performance with a series of commonly used baseline methods for data mining, a large number of experiments have proved that UWM-Id has good performance and can be used for urban water management system.
1. Introductio
Due to the rapid economic development and explosive population growth, water shortages have appeared in many parts of the world [1, 2]. Urban water management system is of great significance to the sustainable development of urban water resources [3, 4]. And it can encourage the water sector to allocate water resources rationally and maximize the long-term value and reliability of available water resources [5–7]. However, the urban water management system is a process that is extremely complex and difficult to control [8, 9]. It includes the storage, distribution, and discharge of urban water [10–12]. And its main purpose is rational development, unified management, and optimal allocation for water resources [13, 14]. To realize the urban water management system, it is necessary to grasp the issue of urban water consumption [15, 16]. The expansion of the industry and the rise in global temperature have increased water consumption [17]; the government’s introduction of water-saving measures and higher water prices will curb the growth rate of water consumption [18]. Based on this difference, it can be found that urban water consumption has certain volatility and ambiguity. Therefore, it is necessary to analyze urban water consumption from multiple angles, which greatly increases the difficulty of predicting [19].
Many scholars have made contributions to the field of urban water management. They have successively proposed a series of water management models, including statistical analysis models (autoregressive integrated moving average model [20, 21], exponential smoothing [22, 23], etc.), gray theory models ( [24], [25], etc.), and neural network models (artificial neural network (ANN) [26, 27], and long- and short-term memory network (LSTM) [28–30], etc.). Statistical analysis methods usually require datasets to follow certain assumptions or distributions [31, 32]. However, the collected real datasets are unlikely to meet statistical assumptions. And gray theory models generally solve the modeling of small sample size and sparse data [33, 34]. But water consumption is affected by many factors, and it is more suitable for deep learning methods for such prediction problems with complex data volume and difficult to fit fluctuation patterns [35, 36]. Al-Zahrani and Abo-Monasar [26] proposed a neural network prediction model combined with coupled time series by considering climate variables. This model mainly combines the drought characteristics of the Middle East, and it can be very helpful in efficiently predicting water consumption in this region. Surendra and Deka [37] used an improved fuzzy-wavelet model to predict urban residential water consumption on the basis of considering climate change. This model introduces denoise and compress methods and uses climate data and water consumption at a certain time for model training and testing, which greatly improves the performance of the model compared with ordinary fuzzy models.
However, there are many factors influencing urban water consumption. To measure the relationship between each factor and the relationship between factors and water consumption is quite complex. In addition, current researches rarely classify impact factors through feature selection and consider the comprehensive impact of each category on water consumption. Therefore, this paper proposes a new Urban Water management Mechanism based on Integrated deep neural network (UWM-Id). Firstly, use principal component analysis (PCA) and gray relational analysis (GRA) methods to reduce dimensionality and classify 15 impact factors of urban water consumption. Dimensionality reduction is performed through PCA, and the factors with greater correlation are combined to finally obtain three principal components; dimensionality reduction is performed through GRA, and the impact factors are sorted according to the gray correlation degree. Then select indicators that are more relevant to water consumption by setting thresholds. Then, the indicators contained in the three principal components are, respectively, input into LSTM, and the three LSTMs are fused to output the predicted value. Finally, the indicators selected by the PCA are input into several baseline methods to evaluate the performance of the proposed UWM-Id.
The rest part of this paper is organized as follows. The framework and problem of this paper are illustrated in Section 2. The detailed principle and process of feature selection and integration model are described in Section 3. Section 4 includes a discussion of the data, experimental settings, and a series of experiments for UWM-Id. Section 5 includes the conclusions.
2. Overview
2.1. Framework of UWM-Id
This research put forward a novel architecture UWM-Id whose framework design is illustrated in Figure 1. The architecture includes four layers: data layer, feature selection layer, model computing layer, and model integration layer.(1)The data layer is the interface through which various data sources enter the model. The data source is the historical data of water consumption required for this study and indicators that affect water consumption used. The selection index should comply with the content of the evaluation, reflect the relevant content, and be scientific. Therefore, this study selects 15 indicators from the perspective of economic development, political culture, and living facilities based on the above rules.(2)After data acquisition, data is transmitted to the feature selection layer for feature dimensionality reduction and classification. The impact factors in the dataset are integrated into three principal components through PCA, and each principal component contains one type of factor. Calculate the gray correlation degree between the impact factor and water consumption through GAR, and do the following processing: sort based on the gray correlation degree, and set the threshold and select factors that are more relevant to water consumption.(3)Input through the feature selection layer into the model computing layer with water consumption data, respectively. The model computing layer selects the LSTM that is commonly used for time-series data prediction.(4)Finally, the prediction results of the three primary LSTMs are synthesized, optimized, and integrated into a new model. Therefore, comprehensive analysis and prediction of water consumption from three aspects improve the accuracy of predicting.

2.2. Problem Statement
This paper proposes a management mechanism based on integrated neural network (UWM-Id). It provides support for urban water management systems by predicting water consumption. The flowchart of the management mechanism is shown in Figure 2.

UWM-Id includes two stages: training and prediction of primary LSTMs (); raining and prediction of integrated model (). The task of the previous stage is to analyze three different dimensions to predict the annual water consumption. can actually be regarded as weak individual learners, respectively. The difference between them comes from the influence of different perspectives on water consumption. The goal of the second stage is to integrate the influence of the three perspectives. On the basis of the previous stage, weights are assigned according to the size of the loss so as to obtain a predicted value closer to the true value of water consumption. At this stage, the above individual learners are strongly combined to make the integrated more effective.
After the second stage, this paper will use GRA to reduce the dimensionality of features, then input the retained features into a series of baseline models, and take them as a comparative experiment to evaluate the performance and superiority of UWM-Id.
3. Methodology
3.1. Feature Selection
3.1.1. PCA-Based Method
The factor analysis method refers to a multivariate statistical analysis method based on the dependence relationship within the correlation matrix of the research index, which reduces some variables with overlapping information and intricate relationships into a few uncorrelated comprehensive factors [38, 39].
Principal component analysis (PCA) is a type of the factor analysis method, and its principle is shown in Figure 3. The basic idea is as follows:(1)Under the premise of losing little information, multiple indexes are transformed into several unrelated comprehensive indexes (principal component ) through dimensionality reduction (linear transformation).(2)Each principal component is a linear combination of the original variables, and the principal components are not related to each other. This makes the principal components have some superior properties than the original variables.

is the initial impact factor matrix of water consumption, :where is the corresponding value of factor in year (; ), is the dimension of , and represents the total number of years taken in the sample set. Step 1. First standardize the sample set, as shown in the following formula: where is the normalized value of and and are the sample mean and standard deviation, respectively. Step 2. Calculate the correlation coefficient matrix of . The correlation coefficient matrix of the standardized impact factor set is as follows: Step 3. Calculate the eigenvalues of and the corresponding factors. From the characteristic equation , the characteristic values of can be obtained. Then arrange the eigenvalues from large to small, . And calculate the eigenvector corresponding to the eigenvalue expressed as follows: Step 4. Calculate the variance contribution rate () and cumulative variance contribution rate () of each principal component.
When the cumulative variance contribution rate reaches more than 85%, the first factor is selected as the main component that affects water consumption and used in the integrated LSTM model. Specifically, the original feature space is subjected to dimensionality reduction processing by formula (8) to simplify the complexity of model solution. is the variable after factor takes into account the transformation of principal components, which effectively reduces the types of impact factors.
3.1.2. GRA-Based Method
GRA is a multifactor-based analysis method that originated in the 1980s, which usually takes uncertainty systems as the research object. Water consumption prediction has the characteristics of fewer data and strong uncertainty [40–42]. Therefore, GRA can be used to analyze the factors affecting water consumption.
This paper uses water consumption as a reference sequence and 15 indicators that affect water consumption as a comparison series, then calculates the gray correlation coefficient and gray correlation degree between the comparison sequence and the reference sequence, and according to the gray correlation coefficient and correlation degree finds out the key factors affecting urban water consumption and analyzes the influence degree of each index. The specific calculation steps are as follows. Step 1. Determine the reference sequence (urban water consumption): Determine the comparative sequence of water consumption: Step 2. Dimensionless processing is performed on the reference sequence and the comparison sequence. Step 3. Calculate the correlation factor between the reference sequence and the comparison sequence. Then the correlation factor between the comparison sequence and the reference sequence is defined as where refers to the resolution; the smaller is, the greater the resolution is. Step 4. Calculate the relevance degree. Since the correlation factor is the correlation factor value between the reference sequence and the comparison sequence in each component, there are many results and it is not easy to compare. Therefore, it is necessary to concentrate on the correlation factor of each index of each factor vector on one value, which is called the gray correlation degree. The gray correlation degree between and is defined as Step 5. Sort by the gray correlation degree. Arrange the gray correlation degree between the impact factor and water consumption in order of magnitude to form the correlation sequence, denoted as . It reflects the degree of correlation between each impact factor and water consumption. Step 6. Set threshold and select features. Set appropriate thresholds and select features that meet the conditions. Then input them into the baseline methods to compare with the UWM-Id proposed in this study.
3.2. Model Integration
The basic neural network predictor used by UWM-Id proposed in this paper is LSTM. Refer to Figure 4 for the internal neuron structure of LSTM. LSTM solves the vanishing gradient problem of the original recurrent neural network (RNN). It has strong time-series data processing capabilities and is widely used in time-series data modeling [43–45].

LSTM consists of input gate, forget gate, and output gate. The input gate is used to control the input of information; the forget gate determines the retention of the historical state information of the cell; the function of the output gate is to control the output of information. The activation function makes the output range of the forget gate between , which is usually the function. When the output of the forget gate is 0, it means that all information in the previous state is discarded; when it is 1, it means that all the information in the previous state is retained.where is the forget gate coefficient at the timestamp ; is the input gate coefficient at the timestamp ; is the input data obtained through the function; is the updated cell state at the timestamp ; is the output gate coefficient; is the output data at the timestamp ; is the output data at the timestamp ; is the input data at the timestamp ; is the cell state at the timestamp ; and are the weight function and bias of the forget gate corresponding to the neuron from the timestamp to the timestamp , respectively; and are the weight function and bias of the input gate corresponding to the neuron from the timestamp to the timestamp , respectively; and are the weight function and bias of the input data corresponding to the neuron from the timestamp to the timestamp , respectively; and are the weight function and bias of the output gate corresponding to the neuron from the timestamp to the timestamp , respectively.
after the PCA dimensionality reduction operation is input into the LSTM basic predictor. Then assign weights according to the prediction accuracy obtained by each predictor, and connect them with a fully connected layer.
The output is a linear transformation of , which is calculated aswhere and are the weight vector and the bias vector of at the t-th timestamp, respectively, and denotes the output from the full connection layer.
To avoid overfitting, the loss function is the following optimization objective:where and are, respectively, the prediction values and the real values of urban water consumption, denotes a conventional parameter in gradient descent method, refers to the learning rate, and represents the internal function of the selected model.
The principle of the optimization algorithm is to select data and calculate the difference between the value obtained according to the model and the actual value at this time. If the difference is large, the parameter update amplitude is large, and vice versa. The optimization algorithm adopted here is the stochastic gradient descent (SGD). Traditional GD uses all training data for each iteration. But the SGD algorithm only randomly selects a set of training data to update the parameters in each iteration.
4. Experiments and Analysis
4.1. Dataset
This paper takes Chongqing as an example of research. In this study, 15 indicators that may affect urban water consumption are selected from the aspects of weather, economy, and politics to carry out water consumption predicting and modeling. The above data comes from the Chongqing Water Resources Bulletin (http://www.cqwater.gov.cn/) and the 2004–2019 China National Statistical Yearbook (http://www.cq.gov.cn/).
The data mainly contains (water consumption ()), (resident population ()), (households with access to tap water ()), (urbanization rate ()), (total number of employed persons ()), (precipitation ()), (hospitals and health centers ()), (average relative humidity ()), (gross domestic product (GDP) ()), (electricity consumption ()), (number of students in institutions of higher learning ()), (average temperature ()), (natural gas consumption ()), (Engel’s coefficient ()), (irrigated area ()), and (water price ()). Table 1 displays the annual statistics of water consumption and the weather, economic, and political indicators in Chongqing from 2003 to 2018.
This study uses the PCA method to process the matrix of water consumption impact factors. The eigenvalues of the principal components, their corresponding variance contribution rates, and cumulative variance contribution rates are obtained by PCA, as shown in Table 2. This paper selects the principal component when . Therefore, the eigenvalue vectors corresponding to the first three principal components are selected to change the original eigenmatrix for further load decomposition. It can be observed from Table 2 that the difference between the transformed features is more obvious.
The impact factors contained in each principal component are expressed in Figure 5. contains indicators such as population, total number of employed persons, and GDP, so it is defined as a socioeconomic factor. contains indicators such as precipitation and average relative humidity, so it is defined as a natural weather factor. includes electricity consumption and gas consumption, so it is defined as an energy factor.

Use GRA to obtain the gray correlation degree between total water consumption and each impact factor. And sort them according to the degree of gray correlation, as shown in Figure 6. According to the gray theory, when the correlation degree is greater than or equal to 0.8, it is a strong correlation degree. Therefore, the top 9 correlation factors , , , , , , , , and are selected as the input of the baseline models in Figure 6.

4.2. Experimental Settings
This paper selects the average absolute error (MAE) and root mean square error (RMSE) of the predicted mechanism as the measure, expressed by the formulawhere represents the real value of water consumption at the year , represents the predicted value of water consumption at the year , and is the total number of test sets in water consumption prediction model. For the above metrics, the lower values of these metrics represent better performance.
In this experiment, it is necessary to select several water consumption prediction models as the baseline method to evaluate the performance of UWM-Id. Therefore, we compare the proposed UWM-Id with baseline models in order to verify whether UWM-Id can reflect good performance in the case of integrated predictions through different perspectives. The selected baselines are as follows:(1)Random Forest (RF): it is a predictive model that integrates multiple decision numbers through the idea of integrated learning.(2)Multilayer Preceptor (MLP): Ii is a feedforward ANN in which every neuron is fully connected.(3)LSTM: it is a kind of sequential neural network model specially designed to solve the long-term dependence problem.
This experiment adopts the SGD optimizer to optimize the model, and the default learning rate () is 0.005. And during the experiment, we randomly split the dataset into training set and test set; the default ratio is 7 : 3.
5. Results and Analysis
First, we evaluate and compare the proposed UWM-Id with three baseline methods. Tables 3–5, respectively, list the model performance (MAE and RMSE) of UWM-Id and the baseline under the ratio of training set to test set of 6 : 4, 7 : 3, and 8 : 2. And on the basis of determining the ratio of the training set and the test set, the learning rate is set to 0.01, 0.008, and 0.005, respectively. In the above table, the cells that display the results include the evaluation value and the ranking of this evaluation value in UWM-Id and the baseline methods. After our calculations, the performance of the proposed UWM-Id model is improved by 40%, 33%, and 20% compared with RF, MLP, and LSTM, respectively. It can be directly observed from these tables that the proposed UWM-Id is better than the baselines in almost all cases. And the baseline methods used for comparison can also be well used to predict urban water consumption.
Although UWM-Id cannot achieve the best performance in some cases, the gap will not be too great. This phenomenon can be attributed to two main reasons. First, the UWM-Id proposed in this paper uses the PCA method to reduce and classify the impact factors of urban water consumption, while other methods use the GRA method to reduce the dimensionality of features. The advantage of PCA lies in the more accurate and fine-grained classification and representation of features. Secondly, the UWM-Id proposed in this paper adopts an integrated model. The three types of features processed by the PCA method are input into the LSTM models, and then they are integrated by a fully connected layer according to the weight to capture the characteristic structure of water consumption under different perspectives.
In addition, we also conducted another set of experiments to evaluate the stability of the proposed UWM-Id. In this set of experiments, UWM-Id was only evaluated for parameter sensitivity alone and would not be compared with other baseline methods. The process of this experiment is as follows: set a series of values for the two parameters in the parameter combination; then input them into the UWM-Id model one by one; finally, test whether the experimental results are stable as a whole.
Figures 7 and 8, respectively, show the MAE and RMSE values of UWM-Id under different parameter settings. They all have three subgraphs, corresponding to the following parameter combinations: (a) training set ratio and optimizer, (b) learning rate and optimizer, and (c) learning rate and training set ratio. It can be seen from the above large number of subgraphs that, after adjusting the learning rate, optimizer, and dataset, the experimental results hardly change, which proves the stability of the proposed UWM-Id. The primary reason for this phenomenon is that UWM-Id integrates features from different perspectives of water consumption, making it less susceptible to parameter changes.

(a)

(b)

(c)

(a)

(b)

(c)
Based on the above two sets of experiments, the UWM-Id model was assessed from model performance and stability. Experimental results indicate that the UWM-Id proposed in this paper can effectively predict urban water consumption.
6. Conclusions
The urban water management system is a nonlinear, changeable process that is affected by many factors. It is complicated to consider the influence of multiple factors at the same time. Moreover, there are few or no examples of managing urban water resources by analyzing urban water consumption from multiple perspectives. Therefore, this paper established an urban water management framework based on integrated deep neural networks (UWM-Id). This study took Chongqing, China, as an example, and established a water management mechanism based on water consumption forecasts. Through PCA, the influencing factors of water consumption are divided into three categories: the socioeconomic factor, the natural weather factor, and the energy factor. Then, input these three types of factors into the UWM-Id established in this paper, and conduct a series of experiments. The experimental results prove that the proposed UWM-Id has better accuracy and stability. It can provide certain assistance to the urban water management system.
Data Availability
The source codes and datasets used to support the findings of this study are available from the submitting author upon request via email (http://www.zwguo@ctbu.edu.cn).
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
This work was supported by National Key Research & Development Program of China under (2016YFE0205600), Technical Project of Chongqing Education Commission (KJQN20200), Chongqing Natural Science Foundation of China (cstc2019jcyj-msxmX0747), Scientific Research Foundation of Chongqing Technology and Business University (ZDPTTD201917, KFJJ2018071, 1856033, and 1853061), and Japan Society for the Promotion of Science (JSPS) Grants-in-Aid for Scientific Research (KAKENHI) (JP18K18044).