Spatio-temporal information enhance graph convolutional networks: A deep learning framework for ride-hailing demand prediction

: Ride-hailing demand prediction is essential in fundamental research areas such as optimizing vehicle scheduling, improving service quality, and reducing urban tra ffi c pressure. Therefore, achieving accurate and timely demand prediction is crucial. To solve the problems of inaccurate prediction results and di ffi culty in capturing the influence of external spatiotemporal factors in demand prediction of previous methods, this paper proposes a demand prediction model named as the spatiotemporal information enhance graph convolution network. Through correlation analysis, the model extracts the primary correlation information between external spatiotemporal factors and demand and encodes them to form feature units of the area. We utilize gated recurrent units and graph convolutional networks to capture the spatiotemporal dependencies between demand and external factors, respectively, thereby enhancing the model’s perceptiveness to external spatiotemporal factors. To verify the model’s validity, we conducted comparative and portability experiments on a relevant dataset of Chengdu City. The experimental results show that the model’s prediction is better than the baseline model when incorporating external factors, and the errors are very close under di ff erent experimental areas. This result highlights the importance of external spatiotemporal factors for model performance enhancement. Also, it demonstrates the robustness of the model in di ff erent environments, providing excellent performance and broad application potential for ride-hailing prediction studies.


Introduction
With the rapid development of companies such as Didi, Uber, and Grab in the global ride-hailing service sector, ride-hailing has become one of the primary modes of transportation for people.
According to statistics, there are currently 322 ride-hailing platform companies in China [1], and the number of users has reached 472 million [2].In addition, the number of ride-hailing drivers has reached a high of 5,976,000 as of July 2023, an increase of 1,376,000 compared to last year [3].In July, there were 821 million order information records.These data clearly show that the ride-hailing industry is in a stage of rapid growth and booming development.However, under the trend of expanding the ride-hailing market, balancing the distribution of supply and demand is still an urgent problem for ride-hailing platforms [4][5][6].This is mainly in two aspects: From a passenger's perspective, due to the uncertainty of passenger travel and the aggregation of passengers, there may be longer waiting times for vehicles during peak hours or in specific areas.From a driver's perspective, drivers often offer services in areas where they believe there is more passenger demand.However, this can lead to oversupply in some areas and undersupply in others [7].In the face of numerous driver and user demands, it has become crucial for ride-hailing platforms to fully utilize their existing operational data for effective demand forecasting and scheduling.This can enhance service quality, improve user experience, and increase vehicle utilization [8,9].
The prediction of ride-hailing demand shares many similarities with traditional taxi and traffic flow forecasting.Previous research in the field of transportation has laid the foundation for predicting ride-hailing demand.As early as 1978, Yang et al. [10] considered factors such as the number of taxis, taxi fares, and disposable income as endogenous variables in their study aimed at improving service levels.In 1972, Douglas [11] indicated that a reasonable number of taxis and pricing could enhance the service quality for passengers.With the widespread application of Global Positioning System (GPS) in taxis, a foundation was laid for research based on GPS data.In 2010, Bazzani et al. [12] utilized GPS data to analyze complex social systems.Asmundsdottir et al. [13] through the analysis of taxi GPS data, extracted travel characteristics of taxi passengers.However, predicting the demand for ride-hailing orders is a complex task.Its complexity is not only dependent on GPS data [14], but is also influenced by various factors such as time [15,16], space [17][18][19], and the environment [20,21].This can be regarded as a complex spatiotemporal data prediction problem.Currently, spatiotemporal data prediction encompasses various aspects such as taxi demand [7], traffic flow [16], shared bicycle demand [22], etc.These share similarities with ride-hailing demand, demonstrating continuous spatial distribution and interconnectedness between areas.To address spatial distribution challenges, it is essential to partition them into grids [23][24][25] or structures based on road networks [26], thereby transforming spatial issues into graph model processing.To investigate the impact of region partitioning methods, Davis et al. [27] analyzed the impact of different spatial partitioning strategies on taxi demand prediction and proposed an efficient hybrid surface subdivision algorithm.In addition, external environmental factors such as weather conditions, holidays, and the distribution of Points of Interest (POI) have a significant impact on the demand for ride-hailing services.For instance, during rainy or extremely hot weather, individuals may be more inclined to use ride-hailing services, leading to an increase in demand.Similarly, during holiday periods, people might prefer choosing ride-hailing as their mode of transportation for travel or social activities, resulting in a potential surge in demand.Furthermore, individuals tend to seek ride-hailing services more frequently in commercial areas, tourist attractions, or event centers.Taking into account these factors, a comprehensive analysis of external spatiotemporal elements enhances our understanding and prediction of fluctuations in ride-hailing demand.References [7,24] confirm that studies considering time and weather conditions are promising.In such a complex and dynamic predictive environment, designing an accurate prediction model is crucial for enhancing the quality of ride-hailing services.
Researchers in the field of transportation have already accumulated rich and in-depth achievements, covering aspects such as traffic flow prediction, taxi order prediction, and ride-hailing order prediction.We can categorize the research methods into the following three types: Prediction models based on statistical methods.Ride-hailing demand prediction is similar to other transportation prediction and can be viewed as a time series prediction problem [28].Representative models in this field of application include the historical average model (HA) [29], the differential autoregressive moving average model (ARIMA) [30], and its variants.Williams et al. [31] proposed and demonstrated in 2003 that the Seasonal Autoregressive Integrated Moving Average (SARIMA) model is capable of capturing the seasonality in time series data.Moreira-Matias et al. [32] validated the feasibility of the ARIMA model in predicting taxi passenger demand using GPS trajectory data from Porto.Singh et al. [33] demonstrated the superiority of the ARIMA model by predicting the performance of virtual machines.However, these traditional models impose strict linear assumptions, insufficiently consider spatiotemporal correlations and the influence of external factors, and are incapable of handling nonlinear features.Therefore, their predictive performance is suboptimal when influenced by external factors.
Prediction models based on traditional machine learning.In recent years, machine learning methods have gradually become the primary methods for demand prediction [34][35][36], and they can achieve higher prediction accuracy and more sophisticated data modeling.For example, Yang and Gonzales [37] mined the factors of taxi demand from the number of cab users and socio-economic and employment data in New York.They used a multiple linear regression model to analyze passenger flow prediction in a particular area and verified its validity.Jiang et al. [38] proposed a least-squares support vector machine (LS-SVM) based method for ride-hailing short-term prediction and demonstrated its excellent performance.Peñalvo et al. [39] proposed a machine learning framework for predicting the fluctuation of stock prices.Lippi et al. [40] constructed a Support Vector Regression (SVR) model with seasonal identification capability to extract the seasonality of traffic flow.Castro-Neto et al. [41] proposed the Online-SVR (OL-SVR) prediction model, considering both typical and atypical conditions, thereby enhancing predictive capabilities under atypical conditions.However, when machine learning is utilized for complex data prediction, challenges such as poor predictive accuracy and overfitting may arise, representing limitations inherent in machine learning.
Deep learning-based prediction modeling.With the rapid development of deep learning methods in various fields such as computer vision [42,43], natural language processing [44], and recommendation systems [45], the application scope continues to expand.Traffic prediction [46,47] is a crucial domain where deep learning methods excel in capturing the nonlinearity and dynamic trends of data for modeling [48][49][50].Demand prediction for ride-hailing is a typical time-series prediction problem.In the early stages, researchers commonly utilized Recurrent Neural Networks (RNN) for time-series data prediction.However, RNN faces challenges such as vanishing and exploding gradients, limiting its ability to capture long-term dependencies.Conversely, variants of RNN, such as Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU), demonstrate certain advantages in capturing temporal dependencies and are frequently utilized for extracting time-dependent features in time-series prediction data [15,16].Dogan [51] demonstrated that expanding the dataset of traffic flow can enhance the predictive performance of LSTMs.Kouziokas [52] optimized unidirectional LSTM and proposed Bidirectional LSTM (Bi-LSTM) to improve prediction accuracy.Dai et al. [53] proved in their research on traffic flow prediction that GRU outperforms LSTM in terms of performance.Additionally, spatial relationships are also a crucial factor that needs to be fully considered in this research field, contributing to extracting the spatial variations of transportation systems.Huang et al. [54] utilized a Convolutional Neural Network (CNN) model for regional partitioning to predict the demand for ride-hailing trips.However, CNN, when dealing with regional connectivity graphs, represents the regional network in the form of a two-dimensional image, limiting its applicability in non-Euclidean topology regional networks.Therefore, in recent years, many researchers have addressed the limitations of regional topology structures by employing Graph Convolutional Networks (GCNs) for processing [18].Compared to CNNs, GCNs are better suited for capturing the spatial dependencies of regional networks [55].Hence, Geng et al. [56] in their study of non-Euclidean regional structures, utilized GCN as a graph convolutional module and proposed the Spatiotemporal Multi-Graph Convolutional Network (ST-MGCN) model for demand prediction.
To better adapt to various complex environments and fully leverage the advantages of different algorithms in extracting spatiotemporal correlations, researchers are gradually and widely applying composite models [46,57,58].In 2009, Tsai et al. [59] demonstrated the superiority of composite models through Parallel Ensemble Neural Networks (PENN).Li and Zhu [60] enhanced traffic flow prediction performance by integrating graph modules and gated convolutional modules.Ke et al. [8], considering the temporal, spatial, and exogenous dependencies of ride-hailing demand, proposed a Fusion Convolutional Long Short-Term Memory Network (FCL-Net) by combining Cov-LSTM, LSTM, and CNN, showing strong adaptability in predictions.In 2018, Li et al. [47] proposed a model called the Diffusion Convolutional Recurrent Neural Network (DCRNN) to address the complex spatial characteristics of road networks and the non-linear temporal dynamics of road condition changes.The model utilizes bidirectional random walks in the graph structure to capture spatial dependencies and employs a predetermined sampling encoder-decoder architecture to capture temporal dependencies.Zhao et al. [61] introduced a Time Graph Convolutional Network (T-GCN) model, which combines GCN with GRU.This model takes advantage of GCN for spatial information extraction and GRU for capturing dynamic temporal relationships to predict traffic flow, producing predictions close to real dataset values.
According to the above analysis, despite the current capability of many studies in extracting spatiotemporal relationships for traffic prediction, there is still a deficiency in capturing the impact of external spatiotemporal factors.On one hand, a majority of studies either neglect external spatiotemporal factors or insufficiently extract key information during the extraction process.On the other hand, the use of a single model is often susceptible to the influence of data complexity, resulting in suboptimal predictive accuracy.To address these issues, this study proposes a Spatiotemporal Information-Enhanced Graph Convolutional Network model (EST-GCN) that effectively tackles both of these challenges.Our main contributions to the work are as follows: (1) The paper introduces an innovative model for predicting ride-hailing demand, named EST-GCN.It utilizes correlation analysis to extract essential information from external factors and integrates it with a spatiotemporal graph convolutional model.This is designed to accurately capture the spatiotemporal features of ride-hailing demand and the influence of external spatiotemporal factors.
(2) The EST-GCN model can adapt to the effects of weather conditions, date attributes, and the distribution of POIs, enabling more accurate prediction of ride-hailing demand in different environments.
(3) We evaluated the model using actual operational data, and the experimental results show that the EST-GCN model outperforms the baseline method in prediction and has vital portability.

Problem definition
Definition 1: Spatial Gridding Based on the latitude and longitude of the city, the size and shape of each hexagon are determined to partition the entire area.As illustrated in Figure 1, the city is partitioned into a spatial hexagonal grid of P × Q specifications, with each spatial grid referring to an area S i j (i ∈ 1...P, j ∈ 1...Q).

Figure 1. Spatial division of the city into hexagonal grids.
Definition 2: Demand Characterization Matrix X The demand for ride-hailing refers to the users' need for ride-hailing services during a specific period, typically measured using the number of orders placed.In this paper, x t represents the demand of the tth moment.
Definition 3:Areas Network G We approximate the spatial grid as a transportation network and utilize the graph structure G = (V, E) to represent the connectivity between different areas network.V = (v 1 , v 2 , ..., v n ) denotes the set of spatial area grids, n the number of grids, E = (e 1 , e 2 , ..., e m ) the set of edges denoting the connectivity between two areas, and m the number of edges.Then, the adjacency matrix A is used to represent the connectivity of the areas network.
Definition 4: External attribute matrix H We form factors such as time periodicity, POIs, weather, and date attributes into a feature matrix H = h 1 , h 2 , ..., h c , where c is the category number of external spatiotemporal factors.The time-varying information for the class j of factors is represented as H j = j 1 , j 2 , ..., j t , while for factors that do not vary with time, j t remains a fixed value.

Demand prediction
Ride-hailing demand prediction is a spatiotemporal data prediction problem that varies continuously over time in different areas.This type of problem requires extractive modeling of temporal and spatial relationships [26,62].Figure 2 illustrates the spatiotemporal correlation of ride-hailing demands.In the spatial dimension Figure 2   To summarize, the ride-hailing demand prediction problem can be understood as predicting the most probable demand result in the following T time steps given the topological network G, the demand feature matrix X, and the external attribute matrix H, combined with the given n historical demand measurement values.The mapping relationship for this problem can be defined and represented as

External spatial and temporal factors
To comprehensively account for the external spatiotemporal factors affecting ride-hailing demand, we divide these into two main categories: dynamic factors that change over time, and static factors that do not change with short-term fluctuations in time.
(1) Static Factors Static factors impact demand that does not change over a short-term time horizon.For example, POI distribution information and date attributes do not vary from area to area over short time scales.Still, the characteristics they imply have the potential to be able to influence the movement and aggregation of people within an area.As shown in Figure 3, we can observe a difference in the number of POIs and demand between Area 1 and Area 2. In Area 1, the number of POIs is higher, and the order is higher during the time of day when the activity occurs.Within a week, the demand on weekends is significantly higher than on weekdays.These analyses indicate that the distribution of POI and date attributes has an impact on ride-hailing demand.(2) Dynamic Factors Dynamic factors change over time and can impact ride-hailing demand.For example, weather conditions can significantly affect travel, which directly affects the demand for ride-hailing.Figure 4 shows the variation of ride-hailing demand in the same area under different weather conditions.Specifically, during the rainy period, the demand surges and deviates far from the order quantity during regular hours.The analysis shows that weather has an enormous impact on ride-hailing demand.

Framework
This method integrates the features of ride-hailing demand in the area with external factor features.It employs correlation analysis to extract the main features, utilizes a GRU layer to capture temporal features, and incorporates a GCN layer to extract spatial features, enhancing the accuracy of ride-hailing predictions.We present the framework of our work in Figure 5, comprising four main components: data preprocessing, integration of external attributes, modeling spatiotemporal dependencies, and prediction.

Mathematical Biosciences and Engineering
Volume 21, Issue 2, 2542-2567.In the data preprocessing phase, we conducted cleaning and feature engineering on the original dataset.For the extraction of spatiotemporal features, we employed the Pearson correlation coefficient to analyze the correlation.Features with correlations greater than the threshold α were selected for model training.Subsequently, we performed encoding and fusion processing on the selected external features and the ride-hailing demand data.
To effectively model spatiotemporal dependencies, we have chosen a combination of GRU and GCN models.These two models are used to extract the temporal and spatial features of ride-hailing demand data, enhancing the overall prediction accuracy.The GRU model is responsible for capturing temporal changes, while the GCN model focuses on modeling the spatial relationships between different locations in the transportation network.Through this combination, we expect to comprehensively consider spatiotemporal factors and improve the accurate prediction of ride-hailing demand.

Spatio-temporal factor feature extraction and enhance methods
This study conducts experiments by analyzing the correlation between external factors and shortterm demand for ride-hailing.It extracts highly correlated attributes to mitigate the impact of the specificity of numerical values on experimental results.
(1) Feature extraction We use the Pearson correlation coefficient to characterize the strength of linear correlation, denoted as r, between two attributes.We calculate the value of r using Eq (3.1) and select features with an r value greater than the threshold α for experimentation.
where x and ȳ are the means of the samples within the two feature sets, respectively, and r takes the value [−1 , 1].
Given that strongly correlated features typically yield more information about the relationships between data, the selection of such features can provide data with higher information content, thereby enhancing the reliability and predictive capability of experiments. (

2) Static factors extraction and enhance
Since the values of the static factors do not change over time, we use correlation analysis to extract the p static factors that are different in time but have a strong correlation to form the matrix S .Specifically, the matrix after fusing the static factors at time t is (3) Dynamic factors extraction and enhance Considering that the dynamics factors will be affected with time, we use the method of correlation analysis to extract m + 1 time slices with strong correlation from the continuous time series, i.e., we select . ., D t w as the dynamic factors D w for each submatrix.Finally, through the incorporation of relevant attribute enhancement units, we create an enhancement matrix containing all external spatiotemporal factors and demand characteristic information at time t.This enhancement matrix minimizes the loss of feature information during model training, thereby enhancing the model's perceptiveness to various factors.

Spatial dependency modeling
The demand for ride-hailing orders exhibits connectivity and fluidity between neighboring areas, resulting in mutual influence.In the transportation field, GCN is currently widely used [18], which can handle non-Euclidean spatial data and is very suitable for transportation data analysis and prediction tasks [9].Therefore, we utilize GCNs to model the spatial relationships between different areas in the transportation network.Through graph convolution, GCNs can learn the connectivity patterns between different areas and the impact of external spatial factors, thereby enhancing model understanding and prediction of spatial features.The GCN model can be represented as where σ is the activation function, A the adjacency matrix, D the corresponding degree matrix, W l the weight matrix of the lth convolutional layer, and O (l) the convolutional output of the lth layer.The architecture of the GCN model is shown in Figure 6.In this study, we will use a 2-layer GCN model for training.The model can be represented as where

Time-dependent modeling
Time dependency is also a vital issue in the prediction of demand.Currently, RNNs are a widely used method for processing time series data.However, during the backpropagation process, issues such as gradient vanishing or exploding can be encountered [63].LSTM [64] and GRU [65] are two variants of RNNs, and they solve this problem nicely by introducing gating mechanisms.GRU replaces the forgetting gate and the input gate with an update gate on top of LSTM, which results in a smaller number of parameters and lower computational complexity, thus improving the training speed of GRU.So, we choose the GRU model to obtain the time dependence of the demand.
As shown in Figure 7, GRU consists of a combination of a reset gate and an update gate: r t denotes the reset gate, which determines how the candidate's hidden state at the current time step selectively ignores the information of the previous time step; u t denotes the update gate, which controls the degree of updating of the hidden state in the previous time step at the current time step; respective c t denotes the candidate hidden state of the current time step, which contains the intermediate state between the current input and the information of the previous time step; σ and tanh refer to the sigmoid and tanh activation functions; C t denotes the characteristic information of the demand at the moment of t; and h t is the output state of the moment of t.
In the ride-hailing demand prediction model, GRU effectively captures the temporal dependencies in the time series data, such as hourly, daily, and weekly patterns, through its gating mechanism.This capability enables the model to capture the dynamic relationship between demand and external factors during training.

EST-GCN
This section introduces the formation process of the EST-GCN unit.
As shown in Figure 8, taking the input at time t as an example, we represent the attributes related to dynamic factors as a continuum D t−m , ..., D t−1 , D t , which includes time periodicity and weather conditions.Meanwhile, p attributes related to the target variable are extracted from static factors, denoted as s 1 , ..., s p−1 , s p .These static factors include POI information and date attributes.Subsequently, one-hot encoding is applied to these attribute values, transforming descriptive variables into continuous variable values, thereby reducing training errors.
Integrate external attributes with the continuously relevant historical demand quantities X t−m , ..., X t−2 , X t−1 , X t required at time t to obtain the related attribute enhancement unit C t , and subsequently, we incrementally input the fused feature unit into the GRU to capture the temporal dependencies of ride-hailing demand features.The output of the GRU further serves as the input for the GCN, utilizing graph convolution operations to learn the spatial correlations of ride-hailing demand across different areas.
The objective of this process is to systematically capture spatiotemporal features through the training of GRU and GCN.Ultimately, we attain accurate prediction results, integrating considerations of ride-hailing demand features in both temporal and spatial dimensions.The specific calculation process is shown below.
where gc denotes the graph convolution process, and W and b represent the weights and biases in the training process, respectively.

Loss function
During the training process, the goal is to minimize the error between the actual regional demand and the prediction.We add the L2 regularization to adjust the loss function, which helps to avoid the overfitting problem.The loss function of the model can be expressed as where X t is the actual demand, X t is the prediction demand, and λ is the hyperparameter.

Data description
To validate the effectiveness of the EST-GCN model, we opted for a real dataset from Chengdu's ride-hailing operations.This dataset covers two complete temporal cycles extensively and features detailed field content, making it well-suited for experimentation.
• MeiC Taxi: This dataset contains information on ride-hailing in Chengdu from June 3rd to June 17th, 2023, covering two weeks, to mine the impact of cyclicality on future demand.We count demand at five-minute intervals, i.e., we record demand every five minutes, totaling 730,000 pieces of total demand data.• Areas: Each hexagonal area of the division is 0.7373 square kilometers.The 169 crucial areas within the Chengdu city bypass are selected, and each area is regarded as a vertex of the graph, constituting a adjacency matrix.

Experimental setting and baseline model
In this paper, we compare the proposed EST-GCN with the widely used temporal prediction baseline models: • HA [29]: Predicting future demand based on the average demand from a past period; • Autoregressive Integral Moving Average Model (ARIMA) [66]: Analyzing trends, seasonality, and randomness in demand data to predict future demand; • SVR [67]: Mapping input demand features to continuous output values; • GCN [18]: Learning graph network information through convolution operations to predict demand; • Gated Recycling Unit Model (GRU) [16]: Predicting demand by learning the temporal dependencies of demand using temporal convolution; • Spatio-Temporal Graph Convolutional Model (ST-GCN) [61]: An extension to GCN, specialized for processing graph data with a temporal dimension; • Spatio-Temporal Attention Network (ST-GAT) [46]: Combines graph neural networks and attention mechanisms for learning representations and relationships of nodes in spatiotemporal graph data.
We trained using the same hyperparameters in the original paper for the above baseline model.

Evaluation criteria
To validate the EST-GCN model's capability in perceiving external spatiotemporal factors, we have selected the following four criteria for evaluation: 1. Root Mean Squared Error (RMSE).To measure the deviation between the predicted demand values and the actual values; a smaller value indicates higher accuracy.
2. Mean Absolute Error (MAE).Calculate the mean of the absolute error between the predicted demand values and the actual values; a smaller value indicates higher accuracy.
3. Coefficient of Determination (R 2 ).The model's explanatory power regarding the variability of actual values, with a range from 0 to 1; a value closer to 1 indicates a better model fit.
4. Explained variance score (var).To measure the average deviation squared between the actual data and its mean; a larger value indicates a higher degree of data dispersion.
where x t i and x t i denote the tth time period real demand and prediction demand in the ith area.

Parameter setting
During the model training, the EST-GCN model requires setting parameters, including the training set ratio, learning rate, number of training epochs, and batch size.In the spatiotemporal dependency extraction stage, we construct a stacked pattern with two layers of GRU and GCN.The GRU model is configured with 32 hidden states, and the GCN model is configured with 64 hidden units.We perform grid search to select the optimal parameters.
In our experiments, to assess the impact of the number of training sessions on the model's performance, the results of each training session are recorded, as shown in the training results in Figure 9, where the horizontal axis represents the number of training sessions.The vertical axis represents the changes of different metrics.

Prediction performance comparison
This experiment tested the performance of EST-GCN with other baseline methods in 15, 30, and 45-minute prediction tasks, and the performance comparison is shown in Table 1, where * denotes a negative number, which indicates that the model is less effective in prediction.It can be seen that our EST-GCN model outperforms other baseline models in the prediction performance of almost all evaluation indicators, demonstrating the effectiveness of external factors in predicting ride-hailing.Compared to GRU and GCN models, the EST-GCN model, leveraging the strengths of both, reduces RMSE errors by 6.6 and 19%, respectively.While ensemble models like ST-GCN, ST-GAT, and CCRNN demonstrate exceptional performance in transportation domain predictions, they do not account for the influence of external spatiotemporal factors.EST-GCN, by integrating features of external spatiotemporal factors, reduces RMSE errors by 3.5, 2.6, and 1.3%, respectively, compared to the ensemble models.
(2) Effective External Spatiotemporal Factors.To validate the impact of external spatiotemporal factors on ride-hailing demand, we compared the EST-GCN model with the ST-GAT and CCRNN models.As shown in Figure 10, taking a 15-minute ridesharing demand prediction as an example, compared to models that do not consider external spatiotemporal factors, the RMSE errors were reduced by 2.6 and 1.3%, respectively.
(3) Predictive Capability across Different Time Horizons.For various prediction ranges (15 minutes, 30 minutes, and 45 minutes), EST-GCN demonstrates superior performance.In the 15-minute prediction range, the EST-GCN model reduces RMSE errors by 2.6 and 1.3% compared to the ST-GAT and CCRNN models, respectively.Within the 30-minute prediction range, the EST-GCN model exhibits RMSE errors 1.7 and 1.0% lower than those of the ST-GAT and CCRNN models, respectively.In the 45-minute prediction range, the EST-GCN model achieves RMSE errors 2.0 and 1.6% lower than those of the ST-GAT and CCRNN models, respectively.
These results have had a significant impact on the application of EST-GCN in predicting ride-hailing demand.First, EST-GCN demonstrates outstanding predictive performance across different time horizons, indicating its reliability in addressing short-term and long-term demand variations.This provides ride-hailing platforms with more flexible and accurate demand predictions, contributing to the optimization of resource allocation and improvement of service efficiency.Second, EST-GCN, by effectively capturing external spatiotemporal factors, better adapts to the complex changes in ride-hailing demand.This underscores the model's sensitivity to environmental and external factors, enabling it to maintain robustness when dealing with dynamic urban changes and special events.This is crucial for ride-hailing platforms to offer reliable services in complex urban environments.

Ablation experiments
In this experiment, to verify the degree of influence of external correlation factors in ride-hailing demand prediction, an ablation experiment is set up to compare the interpretation.The external spatiotemporal factors in the experiment include weather condition information, relevant POI information, and date attribute information.The experimental results are shown in Table 2.The experimental comparison shows that the model works best when introducing a single factor with weather condition information, indicating that weather conditions affect demand more than date attributes and POIs.In addition, when multiple external factors are introduced, the model's performance is better than the performance of the model when only a single external factor is introduced.Specifically, with the addition of single-factor information, the RMSE errors of the EST-GCN model are reduced by 3.0, 2.6, and 2.1%, respectively, compared to the ST-GCN model.Considering multiple external factor information, including weather conditions with POI information (Weather+POIs), weather with date attributes (Weather+Date), POI information with date attributes (POIs+Date), and weather conditions with POI information and date attributes (Weather+POIs+Date), the EST-GCN model reduced the RMSE error by 3.4, 3.4, 3.0, and 3.5%, respectively, compared to the ST-GCN model.
In summary, the experimental results show that external spatiotemporal factors are effective in improving the accuracy of the demand prediction task.Both a single factor and a combination of factors can significantly improve the performance of prediction models.

Portability experiments
In this study, we conducted portability experiments on the EST-GCN model to verify its generalization ability.We chose four different geographic regions, as shown in Figure 11  We select a dataset and parameters consistent with the model training.To ensure portability, we apply a transfer learning strategy by training the model in one area and then transferring it to another.This facilitates the model in converging more rapidly in the new area.In the model design, we also incorporate data standardization and adaptive adjacency matrix to enhance its adaptability to diverse environments and datasets.
The prediction result indicators are shown in Table 3.According to the data in the table, we can notice that the prediction errors of the EST-GCN model are very similar in the four experimental areas.The result proves that the EST-GCN model has a strong generalization ability in dealing with the spatially heterogeneous features of ride-hailing demand, which implies good adaptability and transferability in different areas.The above graph shows the prediction results from June 15th, 2023 to June 17th, 2023.From the visualization results, we can draw the following conclusions: 1.For different prediction ranges, we find that the predictions of the EST-GCN model are consistent with the overall trend of the actual values, but the predictions are poor at the local extremes.This phenomenon is hypothesized to be due to the presence of unexpected events and the randomness of crowd movement, in addition to the external correlates considered in this study, which lead to unpredictable fluctuations in demand.
2. Short-term prediction is closer to the actual value.Because the EST-GCN model is more likely to capture short-term trends, as the prediction range increases the influence of external relevant factors may become complex and unstable, leading to relatively poorer prediction of the model in long-term prediction.
(2) Effect of external spatial and temporal factors.To deeply analyze the effect of external spatiotemporal factors, we chose data from the commercial area with the concentrated human flow in the ride-hailing dataset of Chengdu City to conduct the ablation experiment.The dataset contains information on different date attributes and weather conditions.We worked on demand prediction for different experimental conditions and visualized the prediction results as shown below Figures 13-15    1.The external dynamic-related factor (weather) significantly improves the prediction effect of ridehailing prediction at the peak and turning point.Especially in the early morning of June 17th, under heavy rainy weather conditions, the prediction effect of adding the weather condition information is shown in Figure 15, and its prediction value is closer to the actual value compared to adding the information of other factors.
2. External static factors, including date attributes and POI information, contribute significantly to the prediction accuracy of ride-hailing.In particular, the effect of date attributes is more significant during the transition between weekdays and days off.
3. The EST-GCN model can capture the various factors affecting ride-hailing more comprehensively by adding multiple external factors, including weather conditions, POI information, and date attributes, making the prediction model more flexible and adaptive, thus achieving better performance in the prediction task.
4. In different environments, the model's performance may excessively rely on external factors, potentially leading to a decrease in prediction accuracy in certain scenarios.For example, if the model relies heavily on POI information (such as popular events at specific locations), its predictive capability may be compromised in unconventional circumstances.

Conclusions
To address the problem that traditional ride-hailing prediction models do not comprehensively consider external spatiotemporal factors, we introduce the EST-GCN model for modeling the dependence of external spatiotemporal factors in ride-hailing prediction.We coded demand in each area with relevant external spatial and temporal factors to form area characterization units.Combining GCN and GRU models, spatiotemporal information is extracted from the feature units in different areas to explore the potential relationship between external spatiotemporal factors and demand.We conducted experiments on the Chengdu City operations dataset.The experimental results show that the spatiotemporal graph convolution model incorporating external factors can better adapt to changes in the external environment, and the overall prediction effect is better than that of the advanced baseline method, which proves the importance of external spatiotemporal factors in ride-hailing prediction.The model is essential for improving urban transportation systems' efficiency and intelligent scheduling.By accurately predicting ride-hailing demand and integrating external spatiotemporal factors, the model can assist ride-hailing companies in optimizing vehicle scheduling, improving operational efficiency, and reducing passenger wait times.Additionally, the model's insights into spatiotemporal dependencies can promote more effective urban traffic management, potentially reducing congestion and enhancing city resource allocation.
As future work, our planned research includes (1) considering using more external spatiotemporal information data to evaluate the model, (2) optimizing rules for dividing areas, and (3) applying this model to other cities to validate its applicability and effectiveness in different urban environments, thereby expanding the model's scope of application.

Use of AI tools declaration
The authors declare they have not used Artificial Intelligence (AI) tools in the creation of this article.
(a), the neighborhoods of different areas form a network graph, and each vertex state of the graph represents the ride-hailing demand of the area, and in the temporal dimension Figure2(b), the ride-hailing of the different areas is constantly changing with time.In conclusion, the correlation of ride-hailing demands shows strong dynamics in both spatial and temporal dimensions.
(a) Characteristics of ride-hailing demand in the spatial dimension.(b) Characteristics of ride-hailing demand in the temporal dimension.

Figure 2 .
Figure 2. Spatial and temporal variation of ride-hailing demand.

Figure 5 .
Figure 5. EST-GCN modeling framework.The P module is used for correlation extraction, and the C module is used for combining all the data.

Figure 8 .
Figure 8. Architecture of the EST-GCN unit.
Figure 9(a) shows the trend of RMSE and MAE as the number of training times increases.

Figure 9 (
b) shows the variation of R 2 and Var for different training times.The prediction results are better when the training number is set to 70.
(a) Trend of RMSE and MAE with training iterations.(b) Trend of R2 and Var with training iterations.

Figure 9 .
Figure 9. Trends in indicators at different training epochs.

Figure 10 .
Figure 10.Comparing metrics of different models across various prediction ranges.
, with (a)-(d) as the experimental areas.These experiments aimed to evaluate the prediction ability of the EST-GCN model in new and unseen geographic areas.

Figure 11 .
Figure 11.Schematic diagram of the distribution of the experimental area.

( 1 )
Prediction capacity analysis.To comprehensively evaluate the model's prediction ability, we choose the commercial areas in Chengdu City where the dataset is concentrated in human flow and visualize the actual demand values of the test set with the prediction results of the EST-GCN model.The results of the demand prediction for the next 15, 30, and 45 minutes are shown in Figure 12.

Figure 12 .
Figure 12.Visualization results over a range of prediction for different time limits. :

Figure 13 .
Figure 13.Comparison of Prediction with and without External Factors.

Figure 14 .
Figure 14.Comparison between predictions incorporating different external information.

Figure 15 .
Figure 15.Comparison of prediction residuals in different prediction environments.
/lbs.amap.com/api/webservice/guide/api/weatherinfo/),whichobtains real-time weather conditions in the study areas every five minutes.The weather data contains weather conditions from June 3rd to June 17th, 2023.•POIs: This dataset is the POI distribution information within the selected study area obtained through the API (https://lbs.amap.com/api/webservice/guide/api/search).When selecting POIs, we chose six indicators based on travel demand and study purpose: life, healthcare, tourism, transportation, residential, and companies and enterprises.• Time Attribute: This dataset contains weekday, non-workday, and holiday attributes from June 3rd to June 17th, 2023, in Chengdu.

Table 1 .
Comparison of performance under different prediction time frames.Excellent Prediction Performance.Methods based on deep learning neural networks have achieved remarkable predictive accuracy by modeling spatiotemporal features.In comparison to HA, SVR, and ARIMA models, the EST-GCN model consistently exhibits the best RMSE performance across different time horizons, reducing RMSE errors by 37.2, 24.7, and 32.4%, respectively.

Table 2 .
Results of ablation experiments.

Table 3 .
Prediction results for different experimental regions.