A taxi spatiotemporal hierarchical prediction method and storage medium based on quadtree

Through a quadtree-based method, the historical information of taxi origins and destinations is used for regional division and clustering. Combined with a dual-channel matrix and a prediction model, the accuracy problem of spatiotemporal hierarchical prediction of urban traffic flow is solved, and the accuracy of traffic flow prediction and the efficiency of urban traffic management are improved.

CN113901987BActive Publication Date: 2025-09-26TONGJI UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111054419.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-09
Publication Date
2025-09-26
Estimated Expiration
2041-09-09

AI Technical Summary

Technical Problem

Existing technologies cannot effectively capture the spatiotemporal characteristics of urban traffic flows, resulting in inaccurate traffic situation predictions.

Method used

A quadtree-based method is adopted to obtain the historical information of taxi start-end points, count the frequent times, use quadtree region partition and Gaussian mixture clustering algorithm, combine dual-channel matrix and spatiotemporal residual network prediction model to achieve spatiotemporal hierarchical prediction.

Benefits of technology

It improves the prediction accuracy of traffic flow data, alleviates urban traffic congestion problems, and ensures the accuracy of prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113901987B_ABST
    Figure CN113901987B_ABST
Patent Text Reader

Abstract

This invention relates to a quadtree-based spatiotemporal hierarchical taxi prediction method and storage medium. After acquiring a taxi origin-destination dataset, the method extracts the frequency of taxi trips at different locations, divides the city into regions, and uses a clustering algorithm to cluster central locations. A dual-channel matrix is ​​then used to analyze the data. Finally, a prediction model is used to predict taxi traffic flow within the divided regions, achieving spatiotemporal hierarchical prediction. Compared to existing technologies, this method offers advantages such as the ability to effectively and accurately predict urban traffic conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of traffic prediction, and in particular to a quadtree-based taxi spatiotemporal hierarchical prediction method and storage medium. Background Art

[0002] In modern intelligent transportation systems (ITS) and advanced traveler information systems (ATIS), traffic forecasting is considered an essential component for providing accurate and reliable traffic information to travelers and transportation authorities. Authorities can gain advance knowledge of traffic information (e.g., congestion conditions, traffic volume, and crowd flow), enabling them to implement better traffic management strategies, and travelers can make better route plans. Consequently, accurate traffic forecasting helps reduce time costs, financial losses, and carbon emissions. The goal of traffic forecasting is to provide future traffic information in advance based on historical traffic measurements, helping people make better travel decisions.

[0003] Urban traffic flow forecasting is important for assisting urban management (e.g., route optimization), preparing for drastic changes in transportation modes, and mitigating the spread of epidemics. Over the past few decades, urban traffic flow forecasting methods have been divided into three categories: time series analysis methods, deep learning methods, and urban traffic forecasting.

[0004] The vehicle-road cooperative system adopts advanced wireless communication and new generation Internet technologies to implement all-round dynamic real-time information interaction between vehicles, roads and people and vehicles. On the basis of full-time and space dynamic traffic information collection and integration, it carries out vehicle cooperative safety and road cooperative control, fully realizes the effective coordination of people, vehicles and roads, ensures traffic safety, improves traffic efficiency, and thus forms a safe, efficient and environmentally friendly road traffic system.

[0005] In time series analysis methods, traffic flow values ​​are predicted using the historical average (HA), which is based on the average of the previous time interval. The Autoregressive Integrated Moving Average (ARIMA) is a short-term forecasting analysis method. Seasonal ARIMA (SARIMA) takes into account seasonal conditions and is able to learn tightness and cyclical correlations, further improving the prediction of urban traffic flow. Vector Autoregression (VAR) is a "vector" autoregressive model that generalizes the univariate autoregressive model to a "vector" autoregressive model composed of multiple time series variables. However, time series analysis methods only consider time series characteristics and do not consider spatial structure, so in practice, the effectiveness of time series methods is relatively poor.

[0006] In recent years, deep learning methods have achieved remarkable results in processing multidimensional and nonlinear data. Consequently, a growing number of researchers are applying these methods to traffic data mining. Recurrent neural networks (RNNs) are a type of deep learning model that can capture temporal dependencies. To learn temporal dependencies over long timescales, long short-term memory (LSTM) networks are a special type of RNN capable of learning long-term temporal dependencies. ConvLSTMs add convolutional layers to LSTMs, providing training support for data mining. Gated recurrent unit (GRU) networks are a new type of RNN that captures long-term temporal dependencies.

[0007] However, due to the complex architecture of urban traffic flows, traditional deep learning methods become increasingly difficult to train as the number of training layers increases. Furthermore, traditional neural networks are unable to capture long-term temporal correlations and spatial information, such as cycles and mobility trends. Consequently, existing technologies are unable to achieve spatiotemporal hierarchical predictions of traffic conditions. Summary of the Invention

[0008] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a quadtree-based taxi spatiotemporal hierarchical prediction method and storage medium.

[0009] The purpose of the present invention can be achieved by the following technical solutions:

[0010] A taxi spatiotemporal hierarchical prediction method based on a quadtree comprises the following steps:

[0011] S1. Obtain the taxi origin-destination history information for the target city, including the time and location coordinates when the trip starts and the time and location coordinates when the trip ends;

[0012] S2. Use the Apriori algorithm to count the frequency of taxi start-end historical information;

[0013] S3. Divide the target city area using a quadtree region partitioning method according to the frequency count obtained in step S2 to obtain a new city area;

[0014] S4. Calculate the center location of each area based on the new urban area division results. The center location information includes latitude and longitude. Define the taxi start-end history information at the center location as the taxi start-end history information of the area.

[0015] S5. Cluster the center positions using the Gaussian mixture clustering algorithm to obtain the cluster to which each center position belongs;

[0016] S6. Use the dual-channel matrix to perform statistical analysis on the frequent times of the new urban area to obtain a dual-channel matrix of the time series;

[0017] S7. Use the prediction model to predict the taxi inflow / outflow traffic flow in the new urban area based on the dual-channel matrix of the time series, and obtain the spatiotemporal hierarchical prediction results.

[0018] Furthermore, the specific steps of the Apriori algorithm in step S2 are as follows:

[0019] The hourly visits of all taxis in all areas are grouped and the number of visits is converted into Boolean values ​​of the Apriori algorithm. A Boolean table is constructed based on the Boolean values. The rows of the Boolean table represent the list of locations visited by taxis every hour. After the Boolean table is constructed, the Apriori algorithm is used to generate a set of frequent visits per hour.

[0020] Furthermore, the specific steps of the quadtree region partitioning method described in step S3 are as follows:

[0021] Based on the frequency of taxis in all areas, the city is divided into four quadrilateral areas using the quadtree algorithm;

[0022] If the value of the frequency count of a quadrilateral area divided by the total frequency count of the city is greater than the set threshold, the quadrilateral area is divided into four new quadrilateral areas;

[0023] Until the value of the frequent times of all quadrilateral areas divided by the total frequent times of the city is greater than the set threshold.

[0024] Furthermore, the threshold value is set to be 0.05-0.15.

[0025] Furthermore, the center position described in step S4 is the position where the diagonals of each quadrilateral area intersect.

[0026] Furthermore, the Gaussian mixture model clustering algorithm described in step S5 has the following specific process:

[0027] Cluster the central location to obtain a new clustering area. Generate a migration matrix based on the taxi frequency in the new clustering area. Use the Fibonacci normal form to reduce the migration matrix to a number, which is used as the third eigenvector of the central location in addition to latitude and longitude to obtain a new clustering matrix.

[0028] Finally, the new clustering matrix is ​​clustered using the Gaussian mixture model and iterated until a stable clustering result is obtained.

[0029] Furthermore, the prediction models in step S7 are two different and independent prediction models, the input is a time series dual-channel matrix, and the output is a predicted dual-channel matrix.

[0030] Furthermore, the prediction models are respectively a spatiotemporal residual network prediction model and a spatiotemporal 3D network prediction model.

[0031] Furthermore, the location coordinates in the taxi origin-destination history information include latitude and longitude information, and the time is in hours.

[0032] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a quadtree-based spatiotemporal hierarchical prediction method for taxis.

[0033] Compared with the prior art, the present invention has the following advantages:

[0034] 1. The present invention obtains taxi start-end information and calculates the frequency of frequent trips. Based on the frequency of frequent trips, the OD location information of urban taxis is hierarchically clustered by finding new regional centers to obtain spatiotemporal hierarchical prediction results. This realizes the spatiotemporal hierarchical prediction of traffic conditions, improves the prediction accuracy of traffic flow data, and alleviates the problem of urban traffic congestion management to a certain extent.

[0035] 2. The present invention adopts two different and independent prediction models to predict traffic conditions at the same time, ensuring the accuracy of the prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a schematic diagram of the overall process of the present invention.

[0037] Figure 2 This is a schematic diagram for determining the center position of the present invention.

[0038] Figure 3 Schematic diagram of the process of steps S5, S6 and S7 of the present invention.

[0039] Figure 4 Schematic diagram of the segmentation of urban areas according to the present invention. DETAILED DESCRIPTION

[0040] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0041] This embodiment provides a method for taxi spatiotemporal hierarchical prediction based on quadtree, the process is as follows Figure 1 As shown, the following steps are included:

[0042] Step S1: Select a target city taxi history dataset, obtain the target city's taxi origin-destination (OD) history information, and preprocess the taxi origin-destination history information. The taxi origin-destination history information includes the time and location longitude and latitude coordinates of the start of the trip and the time and location longitude and latitude coordinates of the end of the trip, with time in hours.

[0043] Step S2: Use the Apriori algorithm to count the frequency of taxi origin-destination history. First, group the hourly taxi visits to the sub-region (a visit to a region means the taxi arrived at that region) and convert the taxi visits into Boolean values ​​for the Apriori algorithm. For example, suppose there are five sub-regions and three taxis. The number of times each taxi visited these five regions is 2, 3, 0, 2, 1, 1, 0, 0, 1, 2, and 0, 0, 0, 2, 2, respectively. We can construct a Boolean table consisting of (1, 1, 0, 1, 1), (1, 0, 0, 1, 1), and (0, 0, 0, 1, 1).

[0044] Each row here is a list of locations visited by a taxi. After constructing the Boolean table, the Apriori algorithm is used to generate frequent itemsets for each hour. Apriori is an algorithm that mines frequent itemsets and learns association rules through two stages: candidate set generation and downward closure detection. The threshold is set to 0.2 to prioritize frequent itemsets, resulting in [ ].

[0045] Step S3: Based on the frequency counts obtained in step S2, the target city area is divided using a quadtree region partitioning method. Based on the frequency counts of taxis in all areas, the city is divided into four quadrilateral areas using a quadtree algorithm. If the frequency count of a quadrilateral area divided by the total frequency count of the city is greater than 1%, the quadrilateral area is divided into four new quadrilateral areas. This continues until the frequency counts of all quadrilateral areas divided by the total frequency count of the city are greater than 1%.

[0046] Step S4: Calculate the center position of each area based on the new urban area division result, such as Figure 2 As shown, the center position is the intersection of the diagonal lines of each quadrilateral area. The center position information includes latitude and longitude, and the taxi start-end history information of the center position is defined as the taxi start-end history information of the area.

[0047] S5. Use the Gaussian mixture clustering algorithm to cluster the center positions. The specific process is as follows:

[0048] Cluster the central location to obtain a new cluster area. Generate a migration matrix based on the taxi frequency in the new cluster area. Use the Fibonacci normal form to reduce the migration matrix to a number, which is used as the third eigenvector of the central location in addition to latitude and longitude to obtain a new cluster matrix.

[0049] Finally, the new clustering matrix is ​​clustered using the Gaussian mixture model and iterated until a stable clustering result is obtained, and the class to which each center position belongs is obtained.

[0050] The Gaussian mixture model clustering algorithm cluster center location process is as follows:

[0051] Each Gaussian mixture model consists of K Gaussian distributions, each Gaussian becomes a component, and these components are linearly added together to form the probability density function of the Gaussian mixture model, as shown in the following formula:

[0052]

[0053] Among them, the K components of the Gaussian mixture model correspond to K classes, is the influence factor of each Gaussian distribution component on the data point, is the mean of each class, is the covariance matrix.

[0054] Now there are N taxi access data points, and it is assumed that they conform to a certain distribution (denoted as ), determine a set of parameters inside 、 and The value of , which determines the probability distribution that generates these given data points has the highest probability, and the probability is shown in the following formula:

[0055]

[0056] The product is the likelihood function. Usually the probability of a single point is very small, which may cause floating point underflow. Take the logarithm and convert the product into a sum, as shown in the following formula:

[0057]

[0058] Then find a set of parameters 、 and The value of , makes the likelihood function reach its maximum value.

[0059] Step S6: Use the dual-channel matrix to perform statistical analysis on the frequent occurrences of the new urban area to obtain a time series dual-channel matrix;

[0060] Step S7: Use the prediction model to predict taxi inflow / outflow traffic flow in the new urban area based on the time series dual-channel matrix, obtaining a spatiotemporal hierarchical prediction result. The prediction model is two different and independent prediction models: a spatiotemporal residual network prediction model and a spatiotemporal 3D network prediction model. The input is the time series dual-channel matrix, and the output is the predicted dual-channel matrix.

[0061] The flow chart of steps S5, S6 and S7 is as follows: Figure 3 As shown, Figure 4 Schematic diagram of the four-division of urban areas in different cities.

[0062] This embodiment further provides a computer-readable storage medium, on which a computer program is stored. The computer program is used by a processor to execute the above steps S1 to S7.

[0063] The above describes in detail the preferred embodiments of the present invention. It should be understood that those skilled in the art can make numerous modifications and variations based on the concepts of the present invention without inventive effort. Therefore, any technical solutions that can be derived by those skilled in the art through logical analysis, reasoning, or limited experimentation based on the concepts of the present invention and the prior art should be within the scope of protection defined by the claims.

Claims

1. A method for taxi spatiotemporal hierarchical prediction based on quadtree, characterized by: The following steps are involved: S1. Obtain the taxi origin-destination history information for the target city, including the time and location coordinates when the trip starts and the time and location coordinates when the trip ends; S2. Use the Apriori algorithm to count the frequency of taxi start-end historical information; S3. Divide the target city area into new city areas using a quadtree region partitioning method based on the frequency counts obtained in step S2; S4. Calculate the center location of each area based on the new urban area division results. The center location information includes latitude and longitude. Define the taxi start-end history information at the center location as the taxi start-end history information of the area. S5. Cluster the center positions using the Gaussian mixture clustering algorithm to obtain the cluster to which each center position belongs; S6. Use the dual-channel matrix to perform statistical analysis on the frequent times of the new urban area to obtain a dual-channel matrix of the time series; S7. Use the prediction model to predict the taxi inflow / outflow traffic flow in the new urban area based on the dual-channel matrix of the time series, and obtain the spatiotemporal hierarchical prediction results; The specific steps of the Apriori algorithm described in S2 are as follows: Group all taxi visits to all areas every hour and convert the visit counts into Boolean values ​​for the Apriori algorithm. A Boolean table is constructed based on the Boolean values. The rows of the Boolean table represent the list of locations visited by taxis every hour. After the Boolean table is constructed, the Apriori algorithm is used to generate a set of frequent visits per hour. The specific steps of the quadtree region partitioning method described in S3 are as follows: Based on the frequency of taxis in all areas, the city is divided into four quadrilateral areas using the quadtree algorithm; If the value of the frequency count of a quadrilateral area divided by the total frequency count of the city is greater than the set threshold, the quadrilateral area is divided into four new quadrilateral areas; Until the value of the frequency count of all quadrilateral areas divided by the total frequency count of the city is greater than the set threshold; The prediction models described in S7 are two different and independent prediction models, the input is a dual-channel matrix of time series, and the output is a predicted dual-channel matrix; the prediction models are respectively a spatiotemporal residual network prediction model and a spatiotemporal 3D network prediction model.

2. The method for taxi spatiotemporal prediction based on quadtree according to claim 1, characterized in that: The threshold value is set to 0.05-0.

15.

3. The method for finding the center of a taxi spatiotemporal prediction method based on a quadtree according to claim 1, characterized in that: The center position described in step S4 is the position where the diagonals of each quadrilateral area intersect.

4. The method for taxi spatiotemporal prediction based on quadtree according to claim 1, characterized in that: The Gaussian mixture model clustering algorithm described in step S5 has the following specific process: Cluster the central location to obtain a new clustering area. Generate a migration matrix based on the taxi frequency in the new clustering area. Use the Fibonacci normal form to reduce the migration matrix to a number, which is used as the third eigenvector of the central location in addition to latitude and longitude to obtain a new clustering matrix. Finally, the new clustering matrix is ​​clustered using the Gaussian mixture model and iterated until a stable clustering result is obtained.

5. The method for taxi spatiotemporal prediction based on quadtree according to claim 1, characterized in that: The location coordinates in the taxi start-end historical information include longitude and latitude information, and the time is in hours.

6. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the quadtree-based spatiotemporal hierarchical prediction method for taxis according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Shared bicycleflow prediction method and system

    CN113344240A