Intercity multi-region short-term demand prediction method based on hot spot region division and MT-STALGCN
By using the ST-HDBSCAN algorithm and Thiessen polygon segmentation to identify hotspot areas, and combining it with the MT-STALGCN model, the problem of insufficient hotspot area identification in intercity travel demand forecasting was solved, thereby improving forecast accuracy and scheduling response capability.
Patent Information
- Application Number
- CN202511492470.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-10-20
AI Technical Summary
Existing technologies are unable to effectively identify and delineate hotspots for intercity travel, neglecting the spatial dimension of inter-regional interactions. This results in insufficient accuracy in short-term demand forecasting across multiple intercity regions and fails to fully integrate the static functional characteristics and dynamic spatiotemporal features of the regions, thus affecting scheduling response.
The ST-HDBSCAN algorithm is used to identify persistent hotspots, combined with the Thiessen polygon method to divide regions, and the MT-STALGCN model is constructed, including region self-attention, spatial attention and multi-task learning modules, which improves the ability to capture spatiotemporal features and the prediction accuracy.
It improves the accuracy and robustness of short-term demand forecasting in multiple intercity areas, better reflects the clustering characteristics of travel behavior, and supports more accurate scheduling decisions.
Smart Images

Figure CN120975838A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intercity ride-hailing demand technology, specifically to a method for short-term intercity multi-regional demand forecasting based on hotspot area division and MT-STALGCN. Background Technology
[0002] The rapid growth in intercity travel demand, particularly the widespread adoption of flexible travel options such as ride-hailing, carpooling, and charter services, has presented unprecedented challenges to traditional urban traffic management and dispatch systems. Compared to intra-city commuting, intercity travel spans multiple cities or regions and exhibits more significant volatility, suddenness, and cyclicality in its temporal distribution. Peak demand often concentrates on holidays, weekends, or morning and evening rush hours, leading to frequent problems such as supply-demand imbalances, delayed capacity scheduling, and decreased user experience. Furthermore, intercity travel demand is not evenly distributed across the entire region but is highly concentrated in several "hotspot areas." These hotspot areas are often located in transportation hubs, commercial centers, tourist attractions, university campuses, or large residential areas, exhibiting clear spatial clustering and temporal dynamics. Traditional regional division methods based on administrative divisions or regular grids fail to accurately reflect the clustering characteristics of travel behavior, resulting in coarse-grained predictions and insufficient capture of spatial heterogeneity, thus affecting the accuracy of subsequent dispatch decisions. Therefore, how to dynamically identify and classify these hotspot areas based on real travel data has become the primary issue for improving the accuracy of intercity travel demand modeling.
[0003] At the demand forecasting technology level, short-term demand forecasting for intercity multi-regional travel not only requires models to have the ability to model time series data for a single region, but also to fully consider the complex spatial dependencies and interaction patterns between regions. The spatial structure of intercity travel is usually characterized by multi-level, non-linear, and dynamic connections between multiple cities and multiple hotspots within cities. Traditional forecasting methods based on statistical or single machine learning models (such as ARIMA, XGBoost, and LSTM) are often limited to modeling in the time dimension, neglecting the mutual influence between regions in the spatial dimension, which leads to limited forecasting accuracy. In recent years, Graph Neural Networks (GNNs) and their spatiotemporal extension models (such as ST-GCN, T-GCN, and STGAT) have made significant progress in single-city demand forecasting tasks by introducing graph structures to characterize spatial relationships between regions. However, directly transferring them to intercity scenarios still faces many challenges: On the one hand, intercity travel involves multiple cities, the number of regional nodes has surged, and the graph structure is more complex, making it difficult for traditional single graph convolution to fully capture cross-regional and cross-scale spatial dependencies; on the other hand, intercity travel demand is often composed of multiple modes of travel (carpooling, chartering), and different modes of travel have significant differences in demand generation mechanisms and spatiotemporal distribution characteristics, making it difficult for single-task modeling to take all factors into account. There is an urgent need to introduce a multi-task learning framework to share representations and improve generalization capabilities.
[0004] Furthermore, the factors influencing intercity travel demand include not only historical demand sequences themselves, but also factors closely related to the region's static functional attributes (such as POI distribution and land use type). For example, residential areas generate significant outward travel demand during the morning rush hour, while commercial areas become demand centers during the evening rush hour. Effectively integrating the region's static functional characteristics with its dynamic spatiotemporal features to construct more interpretable and robust predictive models remains a critical technological challenge.
[0005] In summary, the complexity of demand forecasting in intercity travel scenarios is reflected in multiple dimensions, including large spatial span, strong temporal fluctuations, high regional heterogeneity, and diverse travel modes. Existing technologies generally lack the ability to dynamically identify and finely segment intercity travel hotspots, and do not fully consider the impact of cross-regional spatial dependence and multi-mode coupling on demand forecasting, resulting in insufficient forecast accuracy and delayed scheduling response. Therefore, there is an urgent need for a comprehensive forecasting method that integrates spatiotemporal clustering, dynamic regional segmentation, multi-scale spatial modeling, and multi-task learning to achieve high-precision, interpretable, and scalable forecasting of short-term intercity travel demand across multiple regions, providing a scientific basis for decision-making by ride-hailing platforms and traffic management departments.
[0006] In view of the above, this application is hereby submitted. Summary of the Invention
[0007] This invention provides a method for short-term intercity multi-regional demand forecasting based on hotspot area division and MT-STALGCN, which can at least partially improve the above-mentioned problems.
[0008] To achieve the above objectives, the present invention adopts the following technical solution: A method for short-term intercity multi-regional demand forecasting based on hotspot area delineation and MT-STALGCN, comprising: Obtain historical carpooling demand data for two round-trip cities on a specific intercity travel route; The ST-HDBSCAN algorithm was used to cluster historical carpooling demand data by pick-up and departure points and booking times from both spatial and temporal dimensions to identify persistent hotspots. Based on persistent hotspots, the Thiessen polygon method is used to divide the urban study area and generate hotspot regions. Extract the input features of each hotspot region for each prediction time slice, and sort the input features in ascending order according to time to obtain the training dataset and the test dataset; An MT-STALGCN model is constructed for predicting short-term demand in multiple intercity areas. The MT-STALGCN model includes a regional self-attention mechanism module, a spatial attention mechanism module, a regional static functional similarity graph module, and a multi-task fusion learning module. The MT-STALGCN model was trained using the training dataset and tested using the test dataset until the output predicted travel demand reached the preset conditions, thus obtaining the trained MT-STALGCN model. Obtain the current carpooling demand data to be predicted, call the trained MT-STALGCN model to perform prediction processing on the current carpooling demand data to be predicted, and generate prediction results.
[0009] In summary, the intercity multi-region short-term demand forecasting method based on hotspot area division and MT-STALGCN incorporates a regional self-attention mechanism module, supplementing the potential correlation information between carpooling demand, charter demand, and regional inflow. The spatial attention mechanism module and the regional static functional similarity graph module provide more spatial node information helpful for prediction of the target area. Finally, a multi-task classification method is used to predict the regional demand for different categories, further improving the overall forecasting progress and achieving higher prediction accuracy in capturing spatiotemporal features and improving forecasting performance. Attached Figure Description
[0010] Figure 1 This is a flowchart illustrating the intercity multi-regional short-term demand forecasting method based on hotspot area division and MT-STALGCN provided in this embodiment of the invention. Figure 2 This is a schematic diagram of the regional prediction process provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the MT-STALGCN model structure provided in an embodiment of the present invention. Detailed Implementation
[0011] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0012] refer to Figures 1 to 3 As shown, the first embodiment of the present invention discloses an intercity multi-regional short-term demand forecasting method based on hotspot area division and MT-STALGCN, which can be executed by an intercity multi-regional short-term demand forecasting device based on hotspot area division and MT-STALGCN (hereinafter referred to as forecasting device), specifically, by one or more processors within the forecasting device, to implement the following method: S1, retrieve historical carpooling demand data for two round-trip cities on a certain intercity travel route; Specifically, step S1 further includes: the historical carpooling travel demand data includes: order ID, passenger ID, order time, reservation time, pick-up departure point, drop-off destination, order type, number of passengers, and rated passenger capacity. The order type includes carpooling orders and charter orders. The number of passengers in a charter order is the same as the rated passenger capacity (that is, the number of passengers in a charter order is considered to be the same as the rated passenger capacity).
[0013] S2 uses the ST-HDBSCAN algorithm to cluster historical carpooling travel demand data from spatial and temporal dimensions, identifying persistent hotspots. Specifically, step S2 further includes: calculating the spatiotemporal reach between point a and point b. ,in, Let a be the spacetime core distance of point a. Let b be the spacetime core distance. This represents the original distance between region a and region b. The minimum spanning tree of data points is constructed based on the spatiotemporal reach distance, the global spatial structure is preserved, and a clustering hierarchy is generated based on the minimum spanning tree and the preset minimum clustering size parameter mpts. Stable clusters are extracted from the clustering hierarchy as candidate spatial hotspots. Each candidate spatial hotspot is analyzed to determine the persistence characteristics of its internal points. When the active period of a candidate spatial hotspot exceeds a preset time (e.g., more than 10 hours), the candidate spatial hotspot is considered a persistent hotspot.
[0014] In this embodiment, the HDBSCAN algorithm is extended along the spatiotemporal dimension, taking into account both the spatial and temporal correlations between orders. The ST-HDBSCAN algorithm can simultaneously consider both spatial and temporal dimensions, retaining temporal information while identifying spatial clusters.
[0015] Specifically, the ST-HDBSCAN algorithm is invoked to first calculate the spatiotemporal reachability between any two points. This distance incorporates time-dimensional information, making it easier to aggregate spatially and temporally close points. Based on the calculated spatiotemporal reachability, the algorithm constructs a minimum spanning tree of data points, preserving the global spatial structure. Subsequently, it generates a hierarchical clustering structure according to a preset minimum clustering size parameter (mpts) and extracts stable clusters as candidate spatial hotspots. For each candidate spatial hotspot, the system analyzes the time span between the earliest and latest booking times of its internal orders. When this time span exceeds a preset threshold, the candidate spatial hotspot is marked as a persistent hotspot, and a set of persistent hotspots is output.
[0016] S3, based on persistent hotspots, uses the Thiessen polygon method to divide the urban study area and generate hotspot areas; Specifically, step S3 further includes: based on the number N of persistent hotspots, the city study area is divided into N sub-regions using the Thiessen polygon method, and a Delaunay triangulation is constructed, wherein each sub-region corresponds to a persistent hotspot, and the distance from any point in the sub-region to the persistent hotspot is the shortest. Find and number all triangles formed by each persistent hotspot according to the Delaunay triangulation, and obtain the circumcenter of all triangles. Connect the circumcenters of all triangles formed by persistent hotspots to form a Thiessen polygon, where the carpooling hotspots in the sub-region are used as the center nodes of the Thiessen polygon. The Thiessen polygon and urban administrative boundaries are merged and cropped to obtain a list of intercity travel service area boundaries, generating hotspot areas for intercity carpooling demand prediction.
[0017] In this embodiment, based on the persistent hotspots identified by the ST-HDBSCAN algorithm, the Thiessen polygon method is used to divide the urban area into spatial units serving the prediction of intercity carpooling demand. In the regional division of intercity carpooling demand, Thiessen polygons can divide the study area into N sub-regions (N being the number of popular carpooling demand points obtained through the ST-HDBSCAN clustering algorithm). Each sub-region corresponds to one popular carpooling demand point, and the distance from any point within that sub-region to that popular demand point is the shortest. The carpooling hotspots within the region are used as the center nodes of the Thiessen polygons to divide the urban area.
[0018] It's important to note that ST-HDBSCAN stands for Spatio-Temporal Hierarchical Density-Based Spatial Clustering of Applications with Noise. It's a spatio-temporal clustering algorithm extended from HDBSCAN (a density-based hierarchical clustering algorithm) to handle data with both temporal and spatial attributes. MT-STALGCN stands for Multi-Task Spatio-Temporal Attention-based Local Graph Convolutional Network. This multi-task spatio-temporal graph attention network can simultaneously extract information from spatio-temporal features and graph structure, and handle multiple tasks.
[0019] Specifically, after determining the persistent hotspot set, the number of hotspots N is read, and the planar coordinates of each hotspot are used as the center node. The computational geometry engine is then used to construct a Delaunay triangulation covering all center nodes in one go. This triangulation maintains the empty circle property without additional constraints, thus ensuring the convexity, uniqueness, and full coverage of the subsequent Thiessen polygons. This avoids edge overlap or hole problems caused by traditional regular mesh division and significantly reduces the computational cost of subsequent feature alignment. Subsequently, the algorithm traverses the adjacent triangles of each hotspot in the Delaunay mesh, numbers them in counterclockwise order, and records the coordinates of their circumcircle centers. Connecting all the circumcircle centers corresponding to the same hotspot forms the Thiessen polygon boundary around that hotspot. The Euclidean distance from any point within this boundary to the hotspot is less than the distance to other hotspots, making each sub-region highly consistent with the real travel aggregation center in spatial semantics. The generated Thiessen polygons are Boolean-fused with the original city administrative boundaries: first, a union operation is performed to ensure no topological cracks, then the administrative boundaries are used for external clipping to remove fragmented surfaces outside the research scope, and finally, a list of intercity travel service area boundaries is output. This list serves directly as the minimum spatial unit for subsequent feature extraction and graph convolution.
[0020] S4. Extract the input features of each hotspot region in each prediction time slice, and sort the input features in ascending order according to time to obtain the training dataset and the test dataset. Specifically, step S4 further includes: extracting the input features of each hotspot region for each prediction time slice, wherein the input features include temporal features, spatial features, and historical time series features; wherein, the temporal features... Including time period t, day of the week Holidays The spatial features Includes vector data of different entity categories Region ID z, the historical time sequence characteristics This includes the combination of demand quantities for region a in several time segments before the t-th time segment. (To capture short-term travel demand trends in the region), demand in region a during the same time segment on adjacent dates. (To capture the scale of travel demand), travel demand in region a during the same time period over the past week. (To capture periodic patterns over longer time intervals in a region), the demand for chartered vehicles in region a during the t-th time segment. Regional inflows to region a over a past period (To capture internal correlations); Where R is the set of real numbers, Let be the vector data of the i-th entity category within region a, where i is the i-th entity category, j is the total number of entity categories, and r is the difference from the current time segment. Let A be the combination of demand quantities for region A in several time segments before time segment t-1. Let A be the combination of demand quantities for region A in several time segments before time segment t-2. For region a, this represents the combination of demand quantities for several time segments before the time segment tr. The input features are arranged in ascending order of time to construct a dataset, and the dataset is divided according to a preset ratio to generate a training dataset and a test dataset.
[0021] Preferably, the different entity category data are further classified into a preset number of POI travel categories based on the entity categories of a preset map website to statistically analyze the different entity category data in the hotspot area. The preset map website is Gaode Map website, and the preset number is 6. The 6 POI categories are residential, commuting office, commuting education, entertainment and leisure services, transportation facilities services, and life and medical services. The preset ratio is training dataset: test dataset = 4:1.
[0022] In this embodiment, based on the divided hotspot regions, the input features of each region in each prediction time slice are extracted, arranged in ascending order of time, and the training dataset and test dataset of the model are constructed.
[0023] Specifically, the time period, day of the week, and holidays are first encoded into 3D real-valued vectors and directly written into the time feature cache. Then, the Gaode Map API is called to retrieve all POIs within the hotspot area, which are counted and normalized according to six categories: residential, commuting / office, commuting / education, entertainment / leisure services, transportation facilities services, and life / medical services, forming a 6D entity category vector. This vector is then concatenated with the area number z to obtain a 7D spatial feature, which is written into the spatial feature cache. The historical time-series feature module reads seat request volumes for multiple time segments of area a in parallel from a distributed time-series database. Simultaneously, it extracts the demand volume for adjacent dates at the same time, the demand volume for the same time in the past week, the charter seat request volume for the current segment, and the cumulative inflow volume over the past hour. After standardization, these are merged into historical time-series features. The three types of features are stacked in ascending order along the time dimension into a multi-dimensional dense vector. Then, the training and test sets are randomly divided in a 4:1 ratio, with the training set used for gradient updates and the test set used for early stopping and hyperparameter selection.
[0024] S5. Construct the MT-STALGCN model for predicting short-term demand in multiple intercity areas. The MT-STALGCN model includes a regional self-attention mechanism module, a spatial attention mechanism module, a regional static functional similarity graph module, and a multi-task fusion learning module. Specifically, step S5 further includes: (taking city A as an example, and city B as an example) the execution steps of the regional self-attention mechanism module, specifically: processing the regional data in the historical carpooling travel demand data. The former Carpooling order data in a time slice Charter bus order data and regional cumulative inflow data Perform set processing to obtain feature vectors. As input to the region self-attention mechanism module, For the set of regions in city A, To predict the target time series in the problem, For region a before the current time t Data on shared ride orders. For region a before the current time t Data on shared ride orders. For region a before the current time t Data on shared ride orders. For region a before the current time t Data on chartered car orders in segments For region a before the current time t Data on chartered bus orders (partial segments) For region a before the current time t Data on chartered car orders in segments For region a before the current time t Cumulative inflow data for the segment region For region a before the current time t Cumulative inflow data for the segment region For region a before the current time t Sliced data, For region a before the current time t Feature vectors of the fragment For region a before the current time t Feature vectors of the fragment; For the target sequence in region a, an attention mechanism is used to capture its correlation with other sequences, adjusting the model's ability to perceive different sequences. The formula is as follows: , Assign attention scores between the target sequence and other sequences. , These are all weight matrices, which will be continuously learned during model training. To train the dataset, region a is located before the current time t. Data on shared ride orders. For region a before the current time t Feature vectors of the fragment For bias terms; The normalized attention weights for different auxiliary sequences are calculated using the following formula: , Normalized attention weights for different sequences quantify the influence of different sequences on the target sequence. Let region a be at time t before the current time. Feature vectors of the fragment For the historical characteristic sequence of region a, The attention score between the historical target sequence and other sequences in region a; Attention weights are applied to the corresponding time series and then fused to obtain supplementary information for the target sequence. The model's perceptual capabilities are enhanced based on supplementary information. This represents the weight matrix between the weighted features and the output. An internal attention mechanism is used to mine the correlations between different time series, providing supplementary information to the model, enhancing its ability to perceive different time series information, and improving its predictive performance.
[0025] The execution steps of the spatial attention mechanism module are as follows: Taking city A as an example, city B is constructed similarly to city A, constructing a k-order adjacency matrix. Here is an example of a first-order adjacency matrix in city A, where regions a1 and a2 are directly adjacent, and regions a2 and a1 are directly adjacent. n Directly adjacent, and so on. This indicates that node i and node j are not adjacent at order k.
[0026] For a k-order adjacency matrix, it can be obtained through continuous matrix operations in the formula. Construct the k-order adjacency matrix of city A. In a k-order adjacency matrix, if two regions can be connected through k-1 intermediate regions, then the value of these two regions in the k-order adjacency matrix is 1; otherwise, the value is 0. Here is an example of a first-order adjacency matrix in city A; At each time step t, the feature vectors of all regional nodes within city A are used to form a feature matrix. Each row of the matrix A feature vector representing a node in a certain region; For the characteristic matrix Perform inner product processing to obtain the similarity matrix within the region of city A, and then introduce a k-order adjacency matrix to obtain the k-order similarity matrix of city A. T represents the transpose operation; Based on a certain order adjacency matrix, calculate the k-order normalized weights of region i and other regions. , Let be the corresponding values of region i and region j in the similarity matrix within city A. For region i and all other regions except region j in city A The corresponding value in the similarity matrix; Aggregate the weights of different order adjacency matrices for different order weights in region i. , As a learnable parameter, The order K specified for the algorithm indicates that the region will compute attention at target_k orders. These are learnable parameters of different orders; Based on weight The importance of neighbor sets of different orders is adaptively adjusted, where region i uses weights. The feature information of nodes is aggregated within each order of neighbor set, and different order of attention weights are used. The results of each order are weighted and summed to obtain the region. Spatial correlation information at time t , Let A be the set of regions in city A. Let i and j be the values of regions i and j in the k-th order adjacency matrix of city A. Let be the feature vector of region j. This enhances the model's spatial awareness.
[0027] The execution steps of the regional static functional similarity map module are as follows: Calculate the entity similarity matrix of urban regions based on different categories of POIs between regions. To avoid overlap with the spatial attention mechanism, when calculating the entity similarity matrix, only region nodes not extracted by the spatial attention mechanism are calculated. The formula is as follows: , Let be the POI vector of region i in city A. Let J be the POI vector of region j in city A. The target order in spatial attention mechanisms. Here is an example of the Kth order adjacency matrix in city A; Extract the most effective spatial node information from the entity similarity matrix, and update the entity similarity matrix based on the most effective spatial node information. The spatial graph structure is constructed. To select the top M regions with the highest similarity values in the similarity matrix; For critical matrix The weighted adjacency matrix is obtained by transformation. and the feature matrix of all regions and weighted adjacency matrix The input is processed through convolutional operations in the GCN module. The GCN module contains a total of L convolutional layers, with each layer using the output of the previous layer as data, until the output of the final layer is obtained. , For learnable parameters, The POI features of region i; The execution steps of the multi-task fusion learning module are as follows: the demand prediction task is divided into multiple sub-tasks, each sub-task is trained by an independent network, and each sub-network shares the core components of the MT-STALGCN network. The outputs of the regional self-attention mechanism module, the spatial attention mechanism module, and the regional static function map module are fused to obtain the predicted demand for all regions. , The feature vector output by the internal attention module. The feature vector output by the spatial attention module; Based on the predicted demand, the temporal demand sequences between regions are clustered. Specifically, all regions within the city are divided into several region sets, and each region set corresponds to a prediction task. The first Features of a set of regions The input time series is processed in the LSTM module and predicted. After predicting each set of regions, the prediction results are merged and the prediction results are restored according to the region number.
[0028] In this embodiment, the region self-attention mechanism module receives a region-level sequence tensor, generates a query, key, and value matrix through linear mapping, calculates attention weights, and outputs supplementary features with consistent dimensions. This feature is concatenated with the original sequence residual and normalized by layers before being fed into the next module. The spatial attention mechanism module calculates the power of the k-order adjacency matrix in parallel according to the adjacency order, obtains a mask, and applies it to the inner product of node features to generate a similarity matrix of each order. The learnable scalar is normalized and then weighted and summed for the aggregation results of each order to output spatial association information with the same dimension as the input features. The region static functional similarity graph module performs cosine similarity calculation on the POI vectors, masks node pairs already covered by spatial attention, retains the TopM highest similarity edges, constructs a sparse adjacency matrix, outputs static functional features through L layers of GCN convolution, and uses ReLU activation and Dropout regularization at each layer. The multi-task fusion learning module concatenates three types of features along the channel dimension to form a unified representation, and then performs k-means clustering according to the regional demand sequence. The number of cluster centers is automatically determined by the silhouette coefficient. Each cluster is assigned an independent LSTM prediction head, sharing the MT-STALGCN convolution weights and attention parameters. An optimizer is used during the training phase, which decays the loss on the validation set by a preset value if it does not decrease for three consecutive rounds. The batch size is dynamically adjusted based on the GPU memory. After training, all cluster prediction results are mapped back to the original space according to the region number, enabling one-time output of short-term intercity multi-regional demands.
[0029] S6. The MT-STALGCN model is trained using the training dataset and tested using the test dataset until the output predicted travel demand reaches the preset conditions, thus obtaining the trained MT-STALGCN model. Specifically, step S6 further includes: taking the feature matrix from the training dataset... As input to the MT-STALGCN model, it undergoes training processing and outputs the future... Travel demand in all regions during the specified time period ,in, For region 1 in the time period The travel demand, For region 2 in the time period The travel demand, For region a in time period Travel demand; Use test data from the test dataset. The trained MT-STALGCN model was tested to obtain test prediction values. ; Comparison test predicted values Compared with the true value (To evaluate model accuracy), obtain the comparison error, and when the comparison error is determined to be less than the preset threshold, the trained MT-STALGCN model is obtained.
[0030] In this embodiment, the training dataset is fed into the MT-STALGCN network in batches. The network forward propagation sequentially passes through region self-attention, spatial attention, static function graph convolution, and multi-task LSTM head, outputting prediction tensors for multiple future time steps. After each traversal, the verification thread reads the test dataset, performs gradient-free forward inference, and outputs test prediction values. When the error of each term is continuously below a preset threshold for a preset number of rounds or the early stopping condition is met, training terminates and the model weights are fixed to the trained MT-STALGCN model.
[0031] S7: Obtain the current carpooling demand data to be predicted, call the trained MT-STALGCN model to perform prediction processing on the current carpooling demand data to be predicted, and generate prediction results.
[0032] Specifically, in this embodiment, to further demonstrate the characteristics of this method, carpooling passenger transport data of a certain intercity round-trip route of a certain company, including carpooling request data, charter request data, and road network data, are selected as examples to verify the effectiveness of the method.
[0033] Region partitioning is achieved based on the ST-HDBSCAN algorithm and the Thiessen polygon partitioning method. Initial parameters for ST-HDBSCAN are also provided. and The choice of parameters has a significant impact on the clustering effect of the algorithm. However, when the distribution characteristics of intercity travel are unclear, it is difficult to determine the specific configuration of the parameters. Therefore, this invention uses the DBCV index as an evaluation index for detecting the clustering effect. Different parameter combinations are iterated in turn, and the optimal parameters are selected from multiple sets of parameter values. The clustering parameters are shown in Table 1.
[0034] Table 1 Clustering parameters
[0035] Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE) are used as methods and metrics to evaluate the performance of the prediction model. The specific formulas are as follows: , , ,in, Indicates the number of samples. Indicates sample The actual demand Indicates sample The predicted demand was calculated. The experimental results are shown in Table 2.
[0036] Table 2 Short-term demand forecast results for multiple regions
[0037] By comparing the MAE, RMSE, and MAPE of different methods, it can be found that the three evaluation indicators of the intercity multi-regional short-term demand forecasting method based on hotspot area division and MT-STALGCN provided by this invention are all lower than those of other typical forecasting models, and it shows better accuracy in multi-regional short-term demand forecasting.
[0038] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for short-term intercity multi-regional demand forecasting based on hotspot area division and MT-STALGCN, characterized in that, include: Obtain historical carpooling demand data for two round-trip cities on a specific intercity travel route; The ST-HDBSCAN algorithm was used to cluster historical carpooling demand data by pick-up and departure points and booking times from both spatial and temporal dimensions to identify persistent hotspots. Based on persistent hotspots, the Thiessen polygon method is used to divide the urban study area and generate hotspot regions. Extract the input features of each hotspot region for each prediction time slice, and sort the input features in ascending order according to time to obtain the training dataset and the test dataset; An MT-STALGCN model is constructed for predicting short-term demand in multiple intercity areas. The MT-STALGCN model includes a regional self-attention mechanism module, a spatial attention mechanism module, a regional static functional similarity graph module, and a multi-task fusion learning module. The MT-STALGCN model was trained using the training dataset and tested using the test dataset until the output predicted travel demand reached the preset conditions, thus obtaining the trained MT-STALGCN model. Obtain the current carpooling demand data to be predicted, call the trained MT-STALGCN model to perform prediction processing on the current carpooling demand data to be predicted, and generate prediction results.
2. The intercity multi-regional short-term demand forecasting method based on hotspot area division and MT-STALGCN as described in claim 1, characterized in that, The historical carpooling travel demand data includes: order ID, passenger ID, order time, reservation time, pick-up departure point, drop-off destination, order type, number of passengers, and rated passenger capacity. The order type includes carpooling orders and charter orders. The number of passengers in a charter order is the same as the rated passenger capacity.
3. The intercity multi-regional short-term demand forecasting method based on hotspot area division and MT-STALGCN as described in claim 1, characterized in that, The ST-HDBSCAN algorithm was used to cluster historical carpooling demand data by pick-up and departure points and booking times from both spatial and temporal dimensions, identifying persistent hotspots, specifically: Calculate the spatiotemporal reach between point a and point b. ,in, Let a be the spacetime core distance of point a. Let be the spacetime core distance of point b, which is the spatial distance from that point to its k-th nearest neighbor. This represents the original distance between region a and region b. The minimum spanning tree of data points is constructed based on the spatiotemporal reach distance, the global spatial structure is preserved, and a clustering hierarchy is generated based on the minimum spanning tree and the preset minimum clustering size parameter mpts. Stable clusters are extracted from the clustering hierarchy as candidate spatial hotspots. Each candidate spatial hotspot is analyzed to determine the persistence characteristics of its internal points. When the active period of a candidate spatial hotspot exceeds a preset time, the candidate spatial hotspot is considered a persistent hotspot.
4. The intercity multi-regional short-term demand forecasting method based on hotspot area division and MT-STALGCN as described in claim 1, characterized in that, Based on persistent hotspots, the Thiessen polygon method is used to divide the urban study area and generate hotspot regions, specifically: Based on the number of persistent hotspots N, the city study area is divided into N sub-regions using the Thiessen polygon method, and a Delaunay triangulation is constructed. Each sub-region corresponds to a persistent hotspot, and the distance from any point in the sub-region to the persistent hotspot is the shortest. Find and number all triangles formed by each persistent hotspot according to the Delaunay triangulation, and obtain the circumcenter of all triangles. Connect the circumcenters of all triangles formed by persistent hotspots to form a Thiessen polygon, where the carpooling hotspots in the sub-region are used as the center nodes of the Thiessen polygon. The Thiessen polygon and urban administrative boundaries are merged and cropped to obtain a list of intercity travel service area boundaries, generating hotspot areas for intercity carpooling demand prediction.
5. The intercity multi-regional short-term demand forecasting method based on hotspot area division and MT-STALGCN as described in claim 1, characterized in that, Extract the input features of each hotspot region for each prediction time slice, and sort the input features in ascending order according to time sequence to obtain the training dataset and the test dataset, as follows: The input features for each hotspot region in each prediction time slice are extracted. These input features include temporal features, spatial features, and historical time-series features; wherein, the temporal features... Including time period t, day of the week Holidays The spatial features Includes vector data of different entity categories Region ID z, the historical time sequence characteristics This includes the combination of demand quantities for region a in several time segments before the t-th time segment. Demand in region a during the same time period on adjacent dates Travel demand in region a during the same time period over the past week The demand for chartered vehicles in region a during the t-th time segment. Regional inflows to region a over a past period ; Where R is the set of real numbers, Let be the vector data of the i-th entity category within region a, where i is the i-th entity category, j is the total number of entity categories, and r is the difference from the current time segment. Let A be the combination of demand quantities for region A in several time segments before time segment t-1. Let A be the combination of demand quantities for region A in several time segments before time segment t-2. For region a, this represents the combination of demand quantities for several time segments before the time segment tr. The input features are arranged in ascending order of time to construct a dataset, and the dataset is divided according to a preset ratio to generate a training dataset and a test dataset.
6. The intercity multi-regional short-term demand forecasting method based on hotspot area division and MT-STALGCN as described in claim 5, is characterized in that, The different entity category data are further classified into a preset number of POI travel categories based on the entity categories of the preset map website to statistically analyze the different entity category data in hotspot areas. The preset map website is Gaode Map website, and the preset number of POIs is 6. The 6 POI categories are residential, commuting office, commuting education, entertainment and leisure services, transportation facilities services, and life and medical services. The preset ratio is training dataset: test dataset = 4:
1.
7. The intercity multi-regional short-term demand forecasting method based on hotspot area division and MT-STALGCN as described in claim 5, characterized in that, The execution steps of the region self-attention mechanism module are as follows: Regional data from historical carpooling demand The former Carpooling order data in a time slice Charter bus order data and regional cumulative inflow data Perform set processing to obtain feature vectors. As input to the region self-attention mechanism module, For the set of regions in city A, For region a before the current time t Data on shared ride orders. For region a before the current time t Data on shared ride orders. For region a before the current time t Data on shared ride orders. For region a before the current time t Data on chartered car orders in segments For region a before the current time t Data on chartered car orders in segments For region a before the current time t Data on chartered car orders in segments For region a before the current time t Cumulative inflow data for the segment region For region a before the current time t Cumulative inflow data for the segment region For region a before the current time t Cumulative inflow data for the segment region For region a before the current time t Sliced data, For region a before the current time t Feature vectors of the fragment For region a before the current time t Feature vectors of the fragment; For the target sequence in region a, an attention mechanism is used to capture its correlation with other sequences, adjusting the model's ability to perceive different sequences. The formula is as follows: , Assign attention scores between the target sequence and other sequences. , Both are weight matrices. To train the dataset, region a is located before the current time t. Data on shared ride orders. For region a before the current time t Feature vectors of the fragment For bias terms; The normalized attention weights for different auxiliary sequences are calculated using the following formula: , The attention weights are normalized for different sequences. For region a before the current time t Feature vectors of the fragment For the historical characteristic sequence of region a, The attention score between the historical target sequence and other sequences in region a; Attention weights are applied to the corresponding time series and then fused to obtain supplementary information for the target sequence. The model's perceptual capabilities are enhanced based on supplementary information. This is the weight matrix between the weighted features and the output.
8. The intercity multi-regional short-term demand forecasting method based on hotspot area division and MT-STALGCN as described in claim 7, characterized in that, The execution steps of the spatial attention mechanism module are as follows: Construct the k-order adjacency matrix of city A In a k-order adjacency matrix, if two regions can be connected through k-1 intermediate regions, then the value of these two regions in the k-order adjacency matrix is 1; otherwise, the value is 0. Here is an example of a first-order adjacency matrix in city A; At each time step t, the feature vectors of all regional nodes within city A are used to form a feature matrix. Each row of the matrix A feature vector representing a node in a certain region; For the characteristic matrix Perform inner product processing to obtain the similarity matrix within the region of city A, and then introduce a k-order adjacency matrix to obtain the k-order similarity matrix of city A. T represents the transpose operation; Based on a certain order adjacency matrix, calculate the k-order normalized weights of region i and other regions. , Let be the corresponding values of region i and region j in the similarity matrix within city A. For region i and all other regions except region j in city A The corresponding value in the similarity matrix; Aggregate the weights of different order adjacency matrices for different order weights in region i. , As a learnable parameter, The number of order K specified for the algorithm, These are learnable parameters of different orders; Based on weight The importance of neighbor sets of different orders is adaptively adjusted, where region i uses weights. The feature information of nodes is aggregated within each order of neighbor set, and different order of attention weights are used. The results of each order are weighted and summed to obtain the region. Spatial correlation information at time t , Let A be the set of regions in city A. Let i and j be the values of regions i and j in the k-th order adjacency matrix of city A. Let be the feature vector of region j.
9. The intercity multi-regional short-term demand forecasting method based on hotspot area division and MT-STALGCN as described in claim 8, characterized in that, The execution steps of the regional static functional similarity map module are as follows: Entity similarity matrix of urban regions is calculated based on different categories of POIs between regions. When calculating the entity similarity matrix, only region nodes not extracted by the spatial attention mechanism are considered. The formula is as follows: , Let i be the POI vector of region i in city A. Let J be the POI vector of region j in city A. The target order in spatial attention mechanisms. Here is an example of the Kth order adjacency matrix in city A; Extract the most effective spatial node information from the entity similarity matrix, and update the entity similarity matrix based on the most effective spatial node information. The spatial graph structure is constructed. To select the top M regions with the highest similarity values in the similarity matrix; For critical matrix The weighted adjacency matrix is obtained by transformation. and the feature matrix of all regions and weighted adjacency matrix The input is processed through convolutional operations in the GCN module. The GCN module contains a total of L convolutional layers, with each layer using the output of the previous layer as data, until the output of the final layer is obtained. , For learnable parameters, The POI features of region i; The execution steps of the multi-task fusion learning module are as follows: The demand forecasting task is divided into multiple subtasks, each of which is trained by an independent network, and each sub-network shares the core components of the MT-STALGCN network. The outputs of the regional self-attention mechanism module, the spatial attention mechanism module, and the regional static function map module are fused to obtain the predicted demand for all regions. , The feature vector output by the internal attention module. The feature vector output by the spatial attention module; Based on the predicted demand, the temporal demand sequences between regions are clustered. Specifically, all regions within the city are divided into several region sets, and each region set corresponds to a prediction task. The first Features of a set of regions The input time series is processed in the LSTM module and predicted. After predicting each set of regions, the prediction results are merged and the prediction results are restored according to the region number.
10. The intercity multi-regional short-term demand forecasting method based on hotspot area division and MT-STALGCN according to claim 1, characterized in that, The MT-STALGCN model was trained using a training dataset and tested using a test dataset until the predicted travel demand output met the preset conditions, thus obtaining the trained MT-STALGCN model. Specifically: The feature matrix from the training dataset As input to the MT-STALGCN model, it undergoes training processing and outputs the future... Travel demand in all regions during the specified time period ,in, For region 1 in the time period The travel demand, For region 2 in the time period The travel demand, For region a in time period Travel demand; Use test data from the test dataset. The trained MT-STALGCN model was tested to obtain test prediction values. ; Comparison test predicted values Compared with the true value The comparison error is obtained, and when the comparison error is less than the preset threshold, the trained MT-STALGCN model is obtained.
Citation Information
Patent Citations
Multi-region demand prediction method, device and equipment for inter-city back-and-forth passenger transportation and medium
CN117829375A
STZINB-GCN-based inter-city carpooling OD-to-region demand prediction method, apparatus and device, and medium
CN118410915A
Internet bicycle renting user preference type prediction method, system and device based on order data and storage medium
CN119477491A
Apparatus and method for identifying station locations and planning routes for public transportation
KR102728137B1
Cited By
POI semantic clustering-based multi-task space-time diagram convolutional online car-hailing demand prediction method
CN121788175A