A shared bicycle demand prediction method based on a geographical distance enhanced spatio-temporal graph neural network
By integrating local and global spatiotemporal information through GestGNN, the shortcomings of existing models in multi-scale spatiotemporal feature capture and dynamic adjacency structure are addressed, achieving more accurate prediction of shared bicycle demand and improving prediction accuracy and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING BIG DATA CENT
- Filing Date
- 2025-09-08
- Publication Date
- 2026-05-29
AI Technical Summary
Existing shared bicycle demand forecasting models lack robustness in capturing complex multi-scale spatiotemporal features, dynamic adjacency structures, and heterogeneous data scenarios. In particular, they exhibit large prediction biases when local demand surges, and they ignore the geographical distance between stations, resulting in insufficient prediction accuracy.
We design a geodetic distance-enhanced spatiotemporal graph neural network (GestGNN) that integrates local and global spatiotemporal information through local and global information branches. We use a multi-scale Gaussian kernel function and a geodetic distance-enhanced graph attention network (GeoGAT) to extract site features. By combining a dynamic graph attention network and a temporal convolutional network, we can accurately capture multi-scale spatial features and global spatiotemporal information.
It significantly improves the accuracy and stability of shared bicycle demand forecasting, especially in long-term forecasting tasks, reducing the root mean square error and improving the model's predictive performance and adaptability.
Smart Images

Figure CN121304230B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of bicycle demand forecasting technology, specifically relating to a shared bicycle demand forecasting method based on a spatiotemporal graph neural network with enhanced geographic distance. Background Technology
[0002] With the rapid development of urban shared transportation systems, demand forecasting based on docked shared bicycles plays a crucial role in urban intelligent transportation management and operation optimization. A shared bicycle system consists of several fixed stations distributed throughout the city. By analyzing and mining historical rental and return data, accurate predictions of future travel demand at each station can be achieved. This guides maintenance personnel in scheduling and resource allocation, reducing losses caused by bicycle shortages or idleness, and improving user travel experience and system operational efficiency. Existing shared bicycle demand forecasting methods are mainly divided into four categories:
[0003] Models based on traditional statistics and machine learning: These methods mainly use autoregressive integral moving average, support vector regression, random forest, etc. to model the historical traffic sequences of each site. They only consider time series features and ignore spatial correlation, resulting in insufficient prediction accuracy when there is strong interconnection or geographical proximity between sites.
[0004] Hybrid spatiotemporal convolutional models based on deep learning: These methods typically first map urban areas to a regular grid or directly perform graph convolution on node features, and then capture temporal changes in traffic flow through temporal convolution or recurrent units. For example, some studies use convolutional long short-term memory networks or temporal convolutional networks to extract temporal features, while using 2D convolution or graph convolution to process spatial features. However, gridded representation loses the fine spatial structure at the node level, and computational costs are high when processing large-scale site networks.
[0005] Graph Neural Network-Based Models: These methods directly model the shared bicycle system as a graph structure, extracting spatial features between stations through operators such as graph convolution and graph attention, and then combining recurrent neural networks or temporal convolution modules to capture temporal dependencies. Although graph neural networks can better integrate spatial topological information, most methods use static adjacency matrices or predefined association matrices, making it difficult to adapt to scenarios where the relationships between stations change dynamically over time, and their characterization of long-range spatiotemporal dependencies remains insufficient.
[0006] Models based on attention mechanisms and self-attention networks: These methods dynamically allocate weights by calculating attention scores between nodes or time steps, enabling parallel capture of global spatiotemporal features. For example, the Transformer can be introduced into the shared bicycle demand prediction task. However, due to their complete reliance on global attention, these models suffer from high computational complexity when processing large-scale graphs and tend to overlook key local patterns, lacking accurate modeling of fine-grained features within the spatial neighborhood.
[0007] Among the aforementioned technologies, the method proposed in "A Spatial-Temporal Aggregated Graph Neural Network for Doked Bike-sharing Demand Forecasting" (hereinafter referred to as STAGNN) is the most advanced existing solution. STAGNN extracts global spatiotemporal features through a multi-layer spatial-temporal aggregated graph neural network module, simultaneously employing graph attention networks and temporal convolutional networks. Based on this, it further fuses and refines features through a shared graph neural network and a multi-layer perceptron, achieving efficient prediction of demand for docked shared bicycles. However, STAGNN still has the following key shortcomings:
[0008] 1. Insufficient feature reuse capability: STAGNN only uses the output of the last aggregation module as the final prediction input in the network structure, and does not make full use of the intermediate local features learned in the previous aggregation modules. For sites with high-frequency fluctuations in local environments (such as sites in a commercial area or residential area), it lacks fine-grained feature reuse, which can easily lead to prediction deviations when local demand suddenly increases.
[0009] 2. Adjacency Matrix Constraints: STAGNN relies on a predefined adjacency matrix constructed from road networks or cycling records, which ignores the actual distances between stations and potential geographic heterogeneity. This distance-agnostic graph structure limits the model's ability to learn subtle spatial dependencies, without considering their geographic distances. However, ignoring the distances between stations weakens micro-scale spatial modeling, which is crucial for capturing station interactions.
[0010] 3. Unstable cross-scenario generalization performance: Although STAGNN has achieved good performance on public datasets and effectively modeled short-term time patterns, its performance drops significantly in scenarios with longer time intervals. Especially in networks of sites that are far apart or have large geographical topological differences, it cannot adaptively learn multi-scale distance or temporal features, which limits its widespread application in practice.
[0011] To address the aforementioned technical bottlenecks, it is necessary to further enhance STAGNN's ability to capture multi-scale spatial neighborhood features, express dynamic adjacency structures, and improve its robustness in heterogeneous data scenarios, while retaining STAGNN's advantage in modeling global spatiotemporal dependencies. Summary of the Invention
[0012] To address the shortcomings of existing bicycle demand forecasting models in capturing complex multi-scale spatiotemporal features, this invention, based on an in-depth analysis of the STAGNN architecture, a representative existing spatiotemporal forecasting model, proposes a shared bicycle demand forecasting method based on a geographic distance-enhanced spatial-temporal graph neural network. The core of this method is the design of a geographic distance-enhanced spatial-temporal graph neural network (GestGNN). The overall structure of this model is mainly divided into a local information branch and a global information branch. By integrating local and global spatiotemporal information through this dual-branch framework, more accurate bicycle demand forecasting can be achieved.
[0013] This invention discloses a method for predicting shared bicycle demand based on a spatiotemporal graph neural network enhanced by geographic distance, comprising the following steps:
[0014] Step 1: Before inputting the data into GestGNN, the original bicycle data needs to be cleaned. The cleaned data is then divided according to the specified prediction time interval. The data is then grouped and aggregated; and riding records between two stations within the same time interval are considered to have an adjacency relationship. The station adjacency matrix and feature map for different time periods required by GestGNN are constructed. Simultaneously, the remaining stations after the cleaning operation are used to calculate the original geographical distance between station i and station j using the geodetic distance calculation method based on the WGS-84 Earth ellipsoid model. The aforementioned raw bicycle data includes the riding records for each shared bicycle, which include the starting station name, latitude and longitude, start time, and ending station name, latitude and longitude, and end time.
[0015] Step 2: Input the data processed in Step 1 into the global information branch and the local information branch of GestGNN respectively.
[0016] Step 3: Local information extraction.
[0017] A. In the local information branch, apply three sets of Gaussian kernels with learnable bandwidth to the original distance matrix D between stations, and use the multi-scale Gaussian kernel function to convert the original distance matrix D into a multi-scale distance-aware weight matrix.
[0018] B. Input the multi-scale distance-aware weight matrix obtained in step A into the three GeoGAT datasets respectively, and simultaneously input the original distance matrix and features. Figure 1The data is then fed into three GeoGAT datasets, which extract site feature representations at different scales from the spatial structures processed by the Gaussian kernel function at three different scales. The feature representations at three different scales are then concatenated. Obtain the overall representation And through a multilayer sensor Reducing dimensionality yields new representations .
[0019] Step 4: Global information extraction.
[0020] In the global information branch, a dynamic graph attention network and a temporal convolutional network are first used to initially extract spatiotemporal information from the data at each time step. The resulting global feature representation is shown below. Further refinement and fusion using shared graph neural networks and shared multilayer perceptrons yield new global feature representations. .
[0021] Step 5: Feature fusion and prediction.
[0022] First, the local feature representations extracted from different time periods by the local information branches are concatenated to form the result. and the global feature representation extracted from the global information branch. Perform concat operation , , The final feature representation is obtained. .
[0023] Subsequently, two fully connected layers were used to fuse the features. Dimensionality reduction is performed, and the predicted number of vehicle rentals and returns for each station at future time points is output. = .
[0024] The aforementioned new technical solutions are all indispensable and important components of this invention, and directly bring about the following technical effects:
[0025] 1. Accurately Capture Multi-Scale Spatial Features: Traditional methods often neglect the geographical distance between stations when modeling spatial features, resulting in inaccurate characterization of local spatial dependencies. This invention, through the design of a multi-scale Gaussian kernel function and GeoGAT, can fully consider spatial relationships at different distance scales, accurately capture local spatial features, and effectively improve the model's ability to model complex spatial interactions between stations, thereby more accurately predicting the spatial changing trends of bicycle demand.
[0026] 2. Effective Integration of Global Spatiotemporal Information: Previous models, when processing global information, either focused on spatial patterns or temporal trends, making it difficult to consider both simultaneously. This invention's global information branch, through the combination of GAT and TCN, can extract global spatial patterns and long-term temporal trends separately. This information is then further fused through shared GNN and shared MLP, achieving comprehensive integration of global spatiotemporal information. This allows the model to better grasp the overall changing patterns of bicycle demand in time and space, improving the accuracy and stability of predictions.
[0027] 3. Improved predictive performance: By performing detailed modeling at both the local and global levels and organically combining the two, the GestGNN model of this invention has achieved better prediction results than existing baseline methods on multiple real-world datasets. It has a significant advantage, especially in long-term prediction tasks. Compared with existing advanced technologies, it can achieve a root mean square error reduction of up to 10.65% in prediction tasks with a 90-minute time interval, which significantly improves the accuracy and reliability of bicycle demand prediction and provides stronger support for the operation management and resource allocation of bicycle sharing systems. Attached Figure Description
[0028] Figure 1 This is a diagram illustrating the overall framework of the shared bicycle demand prediction method based on a spatiotemporal graph neural network enhanced by geographic distance, as described in this invention.
[0029] Figure 2 Figure 'a' shows the visualization results of ablation experiments on a real-world dataset with key modules of GestGNN at 30-minute intervals.
[0030] Figure 2 b is a visualization of the ablation experiments performed on a real-world dataset with key modules of GestGNN at 60-minute intervals.
[0031] Figure 2 c is a visualization of the ablation experiment results of the key modules of GestGNN on a real-world dataset with a 90-minute time interval. Detailed Implementation
[0033] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0034] This invention relates to a shared bicycle demand prediction method based on a spatiotemporal graph neural network with enhanced geographic distance, such as... Figure 1 As shown, the specific process is as follows:
[0035] Step 1: Preprocessing of raw bicycle data.
[0036] Before inputting into GestGNN, the original bicycle data needs to be cleaned and aggregated. The original bicycle data is a collection of all shared bicycle riding records, where each shared bicycle riding record includes the starting station name, latitude and longitude, start time, and ending station name, latitude and longitude, and end time of the bicycle. Table 1 shows an example of the original bicycle data.
[0037] Table 1. Sample Original Bicycle Data
[0038]
[0039] First, the original bike data is cleaned to remove invalid shared bike riding records containing nan or inf. Then, the total number of shared bikes rented and returned per day at each station is counted according to the start and end times. Based on this, stations with fewer than three rides per day are filtered out. This filtering operation can effectively reduce noise interference.
[0040] The bike data, after the aforementioned cleaning process, is divided into specified prediction time intervals (e.g., 30 minutes, 60 minutes, 90 minutes). The data is then grouped and aggregated, merging data within the same time interval to obtain the shared bike rental and return volume characteristics for each station. Furthermore, bike rides between two stations within the same time interval are considered to have an adjacency relationship. Based on this, the station adjacency matrix and feature graph for different time periods required by GestGNN are constructed.
[0041] Meanwhile, after the cleaning operation, the original geographic distance between station i and station j was calculated using the geodetic distance calculation method based on the WGS-84 Earth ellipsoid model for the remaining stations. :
[0042]
[0043] In the formula, and Let i and j be the latitudes of stations i and j, respectively. and The longitudes of stations i and j are respectively. This is for an accurate geodesic algorithm. Therefore, the raw distance matrix between stations required by GestGNN is constructed, providing a geographical basis for subsequent calculations.
[0044] Step 2: For the prediction task at a future time step, first combine the original distance matrix, the historical seven-day data for the current time step, and the site adjacency matrix and features from the previous time step. Figure 1 The data is then extracted and fed into the global and local information branches of GestGNN. For a highly periodic task like shared bicycle prediction, using data from the same time step over the past seven days helps the model extract time patterns more accurately, while data from the previous time step helps the model perceive current trends, such as whether it is the morning rush hour. This approach effectively balances long-term patterns and short-term dynamic needs.
[0045] Step 3: Local information extraction.
[0046] A. In the local information branch, the traditional single-scale Gaussian kernel cannot simultaneously account for both proximity and distance trends. Therefore, the method of this invention applies three sets of Gaussian kernels with learnable bandwidth to the original distance matrix D between stations, and uses a multi-scale Gaussian kernel function to transform the original distance matrix D into a multi-scale distance-aware weight matrix to adapt to spatial relationship modeling at different distance scales. The transformation formula is as follows:
[0047]
[0048] in, This represents the distance between nodes i and j after processing with a Gaussian kernel function. This represents the original geographical distance between site i and site j. This is a learnable bandwidth parameter.
[0049] This method utilizes multi-scale processing and learnable bandwidth to allow the network to automatically adjust its receptive field according to the task, thereby modeling spatial structures at different scales. Specifically, GestGNN uses Gaussian kernel functions at small, medium, and large scales. At small scales, the kernel function decays rapidly, assigning significant non-zero weights only to neighboring nodes, enabling the model to focus on fine-grained local structural features. At medium scales, its behavior is similar to traditional methods, preserving basic spatial dependencies. At large scales, the weight distribution becomes more uniform, which is beneficial for modeling long-distance dependencies. Furthermore, GestGNN uses GeoGAT in local branches, employing learnable gating parameters in all cases.
[0050] B. Three Geographical Distance-based Graph Attention Networks (GeoGATs) are introduced, each employing learnable gating parameters. The multi-scale distance-aware weight matrix obtained in step A is then input into each of the three GeoGATs, while simultaneously incorporating the original distance matrix and features. Figure 1 The data is then fed into three GeoGAT datasets, which extract site feature representations at different scales from the spatial structures processed by the Gaussian kernel function at three different scales. The method is as follows:
[0051] First, the attention weights of station i and station j at time step t are calculated using the graph attention calculation formula designed in this invention. The specific formula is as follows:
[0052]
[0053] in, It is a learnable linear weight matrix. and These represent the original features of station i and station j extracted from the feature map at time step t, respectively. and The new embedding representation obtained after linear transformation and dimensionality increase is, i.e. = , = , ϵ is a learnable weight matrix; ϵ is a constant used to mitigate numerical fluctuations. Here, θ is the sigmoid function, and θ is a learnable gating parameter.
[0054] The above graph attention calculation method first calculates the original distance between stations. Introducing the reciprocal of the expression into the attention calculation process allows GeoGAT to consider the relative positions of site i and site j while capturing their feature relationships, which helps to better identify the spatial relationships between sites; and uses... As an attention gating mechanism, GeoGAT differs from traditional hard truncation methods. By using learnable gating parameters, GeoGAT can dynamically adjust the gating restrictions according to different tasks, thereby filtering out other sites unrelated to site i and focusing only on the few sites with the greatest impact, thus achieving fine-grained capture of site spatial features.
[0055] Subsequently, the features of site i are updated using the following formula:
[0056]
[0057] in, For the new feature representation of site i at time step t, Let i be the set of adjacent nodes of node i.
[0058] Finally, the feature representations at three different scales are concatenated using three GeoGAT datasets. Obtain the overall representation And through a multilayer sensor Reducing dimensionality yields new representations This modification to the attention mechanism allows GeoGAT to strengthen the influence of node spatial structure while selectively filtering out unimportant information, thereby more efficiently capturing dependencies between sites. In summary, the overall logic of local information branching is as follows:
[0059] Features of each node in the feature map Based on the distance to other nodes j Through linear transformation, the introduction of distance bias, and gating mechanisms, attention scores with other nodes j are calculated for feature updates. Multiple-scale updated features are obtained through a three-layer GeoGAT process, which is then fused and dimensionality reduced to finally obtain a local feature representation that incorporates local spatial dependencies. .
[0060] Step 2 above enhances the model's ability to extract local features and generalize, more effectively controls the flow of information, and enables the model to achieve better prediction results.
[0061] Step 4: Global information extraction.
[0062] In the global information branch, a dynamic graph attention network (GAT) and a temporal convolutional network (TCN) are first used to extract the spatiotemporal information from the data at each time step.
[0063] Dynamic GAT incorporates neighboring nodes to calculate attention scores between stations, capturing dynamic spatial information. Unlike traditional GAT using a fixed adjacency matrix, Dynamic GAT considers the dynamic changes in connections between shared bike stations, resulting in more flexible attention score calculations and effectively avoiding information leakage or overfitting. Meanwhile, TCN utilizes dilated causal convolution to efficiently capture long-term temporal dependencies. By leveraging dilated causal convolution, TCN can exponentially expand its receptive field, enabling it to model multi-scale temporal patterns crucial for extracting global temporal features from shared bike demand.
[0064] Global feature representation after initial extraction New global feature representations are obtained by further refining (sharpening and fusing) using a shared graph neural network (GNN) and a shared multi-layer perceptron (MLP). .
[0065] Among them, the shared GNN captures global spatial dependencies by propagating information across the entire graph structure of the bike-sharing network and applies a series of graph convolutional operations to update node features. The shared MLP, on the other hand, utilizes a two-dimensional convolutional network to fuse time series data, thereby capturing the nonlinear trend changes and cross-node consistency features in the time dimension of the bike-sharing network. It integrates complex spatiotemporal dynamics into a compact embedded representation, further refining global features. Throughout the process, by sharing the same network weight parameters across all time steps and site updates, the model can learn consistent feature mapping relationships from the feature graph structures of different time steps, stabilizing the training process and mitigating overfitting.
[0066] Step 5: Feature fusion and prediction.
[0067] First, the local feature representations extracted from different time periods by the local information branches are concatenated to form the result. and the global feature representation extracted from the global information branch. Perform concat operation , , The final feature representation is obtained. .
[0068] Subsequently, two fully connected layers are used to fuse the features. Dimensionality reduction is performed, and the predicted number of vehicle rentals and returns for each station at future time points is output. = .
[0069] In summary, this invention innovatively designs a local-global dual-branch network architecture to extract local and global information. Simultaneously, it introduces inter-site distance information into the local branches and designs a multi-scale Gaussian kernel for processing, incorporating it into the attention score calculation. This addresses the shortcomings of existing models in integrating global and local information and extracting real-world geographical distance information. Furthermore, this invention's method was applied to three real-world datasets (Capital, Divvy, and Bay) to evaluate its predictive performance on shared bicycle rental tasks, further validating the effectiveness and adaptability of the structural improvements in real-world scenarios. Comparisons were also made with several other baseline models, including:
[0070] HA (Historical Average): Uses the average of the data from the past seven days as a forecast value, providing a simple and effective benchmark.
[0071] DLinear combines data decomposition with linear layers to provide an efficient and interpretable prediction architecture.
[0072] TCN: Effectively captures temporal dependencies in sequences using dilated causal convolution.
[0073] ConvLSTM: It utilizes the local feature extraction capabilities similar to convolutional neural networks to model time series and spatiotemporal structures, and is suitable for site-level bicycle rental and return prediction.
[0074] STGCN: Enhances GNNs through spatiotemporal convolution, enabling parallel computation and effectively capturing the spatiotemporal features of data.
[0075] ASTGCN: Combines spatiotemporal attention mechanisms with convolutional operations to capture temporal and spatial information.
[0076] STAGNN creatively combines dynamic GAT with shared GNN to capture local and global spatiotemporal information. This effectively improves the accuracy of shared bicycle demand forecasting. Performance comparisons of different models at different time steps are shown in Tables 2-4.
[0077] As shown.
[0078] Table 2 Performance comparison of different models at 30-minute time intervals
[0079]
[0080] Table 3. Performance comparison of different models at a 60-minute time interval.
[0081]
[0082] Table 4. Performance comparison of different models at 90-minute time intervals.
[0083]
[0084] Experimental results show that GestGNN outperforms existing baseline models on all datasets. At a 60-minute time interval, GestGNN reduces MSE by 3.13%–6.70%, MAE by 1.01%–4.16%, and RMSE by 1.57%–3.38%. When the prediction interval is further extended to 90 minutes, GestGNN reduces MSE by 2.87%–5.67%, MAE by 1.98%–3.92%, and RMSE by 5.47%–10.65%.
[0085] Furthermore, to verify the effectiveness of the proposed method architecture, ablation experiments were conducted on the key modules of GestGNN on real-world datasets at three different time intervals. Specifically, the large-scale Gaussian kernel function (denoted as r-LGKF) was removed, and the learnable gating parameter θ was fixed at 0.3 (denoted as r-theta). Removing the large-scale Gaussian kernel function means that when data is input into the GeoGAT module, only small-scale and medium-scale Gaussian kernels are used to capture geographic information. Removing the learnable parameter θ means fixing θ to 0.3, a value that has been determined to be relatively optimal through extensive experiments. The ablation experiment results are summarized in Table 5.
[0086] Table 5 Ablation experimental results of large-scale Gaussian kernel and learnable gating parameters
[0087]
[0088] Ablation experiments show that removing the large-scale Gaussian kernel function or the learnable gating parameter θ leads to a significant performance degradation, thus verifying the effectiveness of these two components in the proposed method architecture. To more intuitively understand the impact of each component on GestGNN performance, the ablation results are visualized in this invention, such as... Figure 2 As shown in a, 2b, and 2c, the height of the bars represents the difference in performance between the ablation model and the complete GestGNN model. The higher the bar, the more significant the effect of the removed component.
[0089] At short time intervals (30 minutes), removing the large-scale Gaussian kernel has a smaller impact on the Capital dataset compared to removing learnable parameters. Both result in only a minor performance decrease compared to the full GestGNN, suggesting that the large-scale geographic kernel and gating mechanism are less effective over short time intervals, with temporal features dominating.
[0090] At a moderate time interval (60 minutes), the lack of learnable gating parameters negatively impacted model performance on all three datasets, highlighting the importance of learnable mechanisms in dynamic fusion of multi-scale features.
[0091] However, over long time intervals (90 minutes), both removing the large-scale Gaussian kernel and the learnable gating parameter θ lead to significant performance degradation. Specifically, on the Capital dataset, removing the large-scale Gaussian kernel causes a more severe performance degradation; however, on the Divvy and Bay datasets, the negative impact of removing the learnable gating parameter is slightly greater. This indicates that the synergy between large-scale geographic information and adaptive gating mechanisms is crucial for achieving superior prediction performance.
[0092] Overall, the experimental results show that removing the multi-scale Gaussian kernel function or learnable gating parameters leads to a significant performance degradation, verifying the necessity of these modules in GestGNN.
[0093] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for predicting shared bicycle demand based on a spatiotemporal graph neural network with enhanced geographic distance, characterized in that: The specific steps are as follows: Step 1: Before inputting into GestGNN, the original bicycle data needs to be cleaned. The cleaned data is divided according to the specified prediction time interval. Then, the data is grouped and aggregated. Two stations with riding records within the same time interval are considered to have an adjacency relationship. The station adjacency matrix and feature map at different times required by GestGNN are constructed. At the same time, the original geographical distance between station i and station j is calculated using the geodetic distance calculation method based on the WGS-84 Earth ellipsoid model for the remaining stations after the cleaning operation. The above-mentioned original bicycle data includes the riding record of each shared bicycle, which includes the starting station name, latitude and longitude, start time, and ending station name, latitude and longitude, and end time. Step 2: Input the data processed in Step 1 into the global information branch and the local information branch of GestGNN respectively; Step 3: Local information extraction; A. In the local information branch, apply three sets of Gaussian kernels with learnable bandwidth to the original distance matrix D between stations, and use the multi-scale Gaussian kernel function to convert the original distance matrix D into a multi-scale distance-aware weight matrix. B. Input the multi-scale distance-aware weight matrix obtained in step A into three GeoGAT datasets, and simultaneously input the original distance matrix and feature map into the three GeoGAT datasets. The three GeoGAT datasets will then extract site feature representations at different scales from the spatial structures processed by the Gaussian kernel function at three different scales. The feature representations at three different scales are then concatenated. Obtain the overall representation And through a multilayer sensor Reducing dimensionality yields new representations ; Step 4: Global information extraction; In the global information branch, a dynamic graph attention network and a temporal convolutional network are first used to initially extract spatiotemporal information from the data at each time step; the global feature representation after initial extraction... Further refinement and fusion using shared graph neural networks and shared multilayer perceptrons yield new global feature representations. Among them, the shared graph neural network captures global spatial dependencies and applies graph convolution operations to update node features by propagating information across the entire graph structure of the bicycle sharing network. The shared multilayer perceptron uses a two-dimensional convolutional network to fuse time series data, thereby capturing the nonlinear trend changes in the time dimension and the consistency features across nodes in the shared bicycle network. It integrates complex spatiotemporal dynamics into a compact embedded representation, achieving further refinement of global features. Step 5: Feature fusion and prediction; First, the local feature representations extracted from different time periods by the local information branches are concatenated to form the result. and the global feature representation extracted from the global information branch. Perform concat operation , , The final feature representation is obtained. ; Subsequently, two fully connected layers were used to fuse the features. Dimensionality reduction is performed, and the predicted number of vehicle rentals and returns for each station at future time points is output. = .
2. The shared bicycle demand prediction method based on a spatiotemporal graph neural network with enhanced geographic distance as described in claim 1, characterized in that: In step 1, the original bicycle data cleaning method is as follows: remove invalid shared bicycle riding records containing nan or inf, and then count the total number of shared bicycles rented and returned at each station per day according to the start and end times, thereby filtering out stations with an average daily number of rides of less than a set number.
3. The shared bicycle demand prediction method based on a spatiotemporal graph neural network with enhanced geographic distance as described in claim 1, characterized in that: The multi-scale distance-aware weight matrix transformation method in sub-step A of step 3 is as follows: ; in, This represents the distance between nodes i and j after processing with a Gaussian kernel function. This represents the original geographical distance between site i and site j. This is a learnable bandwidth parameter.
4. The shared bicycle demand prediction method based on a spatiotemporal graph neural network with enhanced geographic distance as described in claim 1, characterized in that: The specific method for sub-step B of step 3 is as follows: First, the attention weights of site i and site j at time step t are calculated using the graph attention calculation formula: ; in, It is a learnable linear weight matrix. and These represent the original features of station i and station j extracted from the feature map, respectively. and The new embedding representation obtained after linear transformation and dimensionality increase is, i.e. = , = , ϵ is a learnable weight matrix; ϵ is a constant used to mitigate numerical fluctuations. Here, θ is the sigmoid function, and θ is a learnable gating parameter. This represents the distance between nodes i and j after processing with a Gaussian kernel function. Subsequently, the features of site i are updated using the following formula: ; in, For the new feature representation of site i at time step t, Let be the set of neighboring nodes of node i; W is a learnable weight matrix. It is the original feature of site j at time step t.
5. The shared bicycle demand prediction method based on a spatiotemporal graph neural network with enhanced geographic distance as described in claim 1, characterized in that: In step 4, the dynamic graph attention network introduces neighboring nodes to calculate attention scores between sites to capture dynamic spatial information.
6. The shared bicycle demand prediction method based on a spatiotemporal graph neural network with enhanced geographic distance as described in claim 1, characterized in that: In step 4, the temporal convolutional network exponentially expands its receptive field by using dilated causal convolution to efficiently capture long-term temporal dependencies.
7. The shared bicycle demand prediction method based on a spatiotemporal graph neural network with enhanced geographic distance as described in claim 1, characterized in that: In step 4, the shared graph neural network captures global spatial dependencies and applies graph convolution operations to update node features by propagating information across the entire graph structure of the bike-sharing network. The shared multilayer perceptron uses a two-dimensional convolutional network to fuse time series data, thereby capturing the nonlinear trend changes in the time dimension and the consistency features across nodes in the shared bicycle network. It integrates complex spatiotemporal dynamics into a compact embedded representation, achieving further refinement of global features.
8. The shared bicycle demand prediction method based on a spatiotemporal graph neural network with enhanced geographic distance as described in claim 1, characterized in that: During the refinement and fusion process in step 4, the same network weight parameters are shared across all time steps and site updates.