1. Introduction
Despite China’s abundant total freshwater resources, the freshwater available per capita remains relatively low [
1]. Accelerated urbanization has led most Chinese cities to face the challenges of water scarcity, making the rational planning of urban residential water use crucial in resolving the supply–demand conundrum of water resources [
2]. Urban residential water consumption, influenced by a myriad of factors, exhibits complex nonlinear dynamic characteristics [
3,
4]. Traditional methods based on human experience are inadequate for predicting intricate water usage trends, whereas urban water demand prediction can effectively reveal consumption trends and inform the effective distribution and usage of water resources. Urban water demand prediction is categorized into short-term, medium-term, and long-term prediction [
5], with short-term prediction being particularly crucial for water resource management due to its immediacy and urgency. Through accurate short-term water demand prediction, cities can adjust their water supply strategies over time, effectively reduce energy consumption and costs, and improve the overall efficiency of the water supply system [
6,
7,
8].
Current short-term water demand prediction methods include traditional back propagation (BP) neural networks [
9,
10,
11], grey models [
12,
13], support vector machines (SVMs) [
14,
15], random forests [
16], and regression analysis models [
17,
18]. While effective under certain conditions, these methods generally face limitations in their generalization ability and predictive accuracy. With the advances in deep learning and neural network technologies, these methods have been extensively applied to urban water demand prediction. Particularly, the long short-term memory (LSTM) model [
19,
20] has demonstrated exceptional performance in water demand forecasting, adeptly handling data with high temporal resolution, abrupt changes, and uncertainties, as well as incorporating additional information such as the day of the week or national holidays. Nonetheless, the impacts of climatic conditions and data noise on prediction accuracy remain significant challenges. To address this, Du et al. [
7] developed a model capable of managing complex data patterns and capturing peaks in time series, employing discrete wavelet transform (DWT) and principal component analysis (PCA) to generate variance-stabilized, low-dimensional, high-quality input variables. Al-Ghamdi et al. [
21] utilized artificial neural networks (ANNs) to predict daily water demand under climatic conditions, adjusting the ANN hyperparameters with particle swarm optimization (PSO), and identified the dew point as the climatic condition with the most significant impact on water demand. Zubaidi et al. [
22] employed a combination of data preprocessing and an ANN optimized with the backtracking search algorithm (BSA-ANN) to estimate monthly water demand related to previous usage, proving the model’s capability for high-accuracy water demand forecasting in cities severely affected by climate change and population growth. These models have enhanced the ability to process complex data by integrating various techniques, yet have not fully considered non-stationarity and nonlinearity under multi-variable influences. To overcome this issue, Li et al. [
23] proposed a composite prediction model for urban water usage based on the new information priority theory (CPMBNIP), which more effectively utilizes new data to improve predictions for certain non-stationary time series. Hu et al. [
24] and Zhou et al. [
4] employed a hybrid model combining convolutional neural networks and bidirectional long short-term memory networks, considering the correlations among multiple variables to predict water demand under a range of nonlinear and uncertain temporal patterns.
Despite significant advancements, the current approaches predominantly rely on extracting the temporal features of time series data, overlooking the influence of spatial characteristics on these temporal characteristics. Current studies on spatiotemporal features primarily focus on multi-site analysis. For instance, Zheng et al. [
25] predicted daily variations in water quality parameters across 138 watersheds in southern China using variables such as meteorology, land use, and socioeconomic factors, employing the SHapley Additive exPlanations method to identify significant variables and infer the direction of their impact on water quality changes, effectively explaining the prediction results. Wang et al. [
26] identified complex relationships between various meteorological factors at different sites and dissolved oxygen (DO) concentration levels, demonstrating that the integration of graph-based learning and time transformers in environmental modeling is a promising direction for future research. Zanfei et al. [
27] developed a novel graph convolutional recurrent neural network (GCRNN) to analyze the spatial and temporal dependencies among different water-demand time series within the same geographical area. Wang et al. [
28] presented an LSTM model integrating spatiotemporal attention, focusing on more valuable time and spatial features, to predict water levels in the middle and lower reaches of the Han River. However, these studies have focused on correlations between spatial features at multiple observation sites rather than between the spatial features of different variables, which also affect the temporal features of the water use data, an aspect that has not been adequately considered in previous studies.
Based on this background, this paper combines the spatial and temporal features of variables and proposes an attention mechanism graph convolutional neural network–long short-term memory model (GCN-Att-LSTM). Compared with other approaches, this method exhibits a similar level of complexity, and yet it excels in achieving more precise short-term urban water demand predictions. Initially, the principles of the Prophet model are utilized for anomaly detection and correction in water data to enhance data quality. Subsequently, the maximal information coefficient (MIC) calculates the correlation between meteorological and water usage data. Building on this, the graph convolutional network (GCN) extracts spatial features between water consumption and meteorological data, with a multi-head attention mechanism applied to weigh these spatial features. Finally, the processed data are input into a three-layer LSTM with residual connections added to improve water demand prediction accuracy.
The structure of this paper is as follows:
Section 2 details the sources and data processing of urban water data.
Section 3 introduces the methods employed in the GCN-Att-LSTM model.
Section 4 analyzes the experimental results to verify the model’s performance. Finally,
Section 5 concludes and presents the research findings.
5. Conclusions
Forecasting urban water demand is a critical aspect of environmental sustainability and urban infrastructure planning. Accurate short-term predictions are essential for optimizing water distribution, enhancing resource efficiency, and mitigating shortages. Traditional models often only consider the temporal features among variables, neglecting the spatial features that also impact urban water demand prediction. This study addresses the challenge of short-term urban water demand forecasting by proposing the GCN-Att-LSTM model. This model integrates spatial and temporal features among variables to improve the accuracy of urban water demand forecasts.
The quality of data directly influences the performance and generalization capability of predictive models. This study employs the Prophet model for anomaly detection and correction, which effectively captures the seasonality and cyclicality of water usage series, thus enhancing data quality. Moreover, the model integrates spatial and temporal features, analyzes the relationship between water usage and climate data using the maximum information coefficient (MIC), extracts spatial features with the graph convolutional network (GCN), and strengthens features related to water data with the multi-head attention mechanism. Lastly, a long short-term memory (LSTM) model is utilized to comprehensively explore the intrinsic features of time series data. The experiments demonstrated that the GCN-Att-LSTM model surpassed traditional LSTM and CNN-LSTM models in accuracy, reducing the MAPE by 1.868–2.718%. Ablation studies further clarified the contribution of each component within the model, confirming the significance of integrating spatial and temporal features.
The GCN-Att-LSTM model presented in this paper not only demonstrates the effectiveness of integrating multiple advanced techniques, but also introduces novel concepts and approaches for future urban water usage forecasting. By fusing spatial and temporal features among variables, it can more accurately decipher complex patterns in water use data, thus improving the accuracy of water demand prediction. However, like many complex models, the GCN-Att-LSTM possesses a black-box nature, limiting its interpretability. Future research should further explore this model, incorporating additional influencing factors to improve its robustness, accuracy, and predictive capability.