A short-term prediction method for road traffic OD flow considering travel frequency
By stating and classifying travellers' travel frequency and using deep learning models to predict, the problem of difficult to reflect individual travel frequency in the prior art is solved, and the short-term prediction accuracy of traffic OD traffic is improved.
Patent Information
- Application Number
- CN202410819737.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2044-06-24
AI Technical Summary
The existing traffic OD traffic prediction methods are difficult to reflect individual travel frequency, resulting in large prediction errors under complex systems and no targeted response methods are available.
By extracting historical OD records in the area, counting the travel frequency of each license plate number, dividing travelers into categories according to travel frequency, aggregated into historical OD matrices of different groups, and inputting them into deep learning models for prediction.
It realizes short-term prediction of OD traffic for different categories of travelers, and improves the short-term prediction accuracy of the overall OD traffic.
Smart Images

Figure CN118747956B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of traffic flow prediction, and in particular to a short-term prediction method for road traffic OD flow taking travel frequency into consideration. Background Art
[0002] Urban traffic is a complex system, and the overall traffic matrix prediction method is difficult to reflect the travel frequency of individuals. People's travel is affected by many factors. Previous studies have found that there are more trips on weekdays than on weekends, and the peak hours on weekdays are more obvious than on weekends. However, for the prediction model, the full matrix prediction method will cause every possible OD pair in the OD matrix to be involved in the prediction. Specifically, when individual travel OD pairs suddenly appear or disappear, the applicability of the prediction model will decrease.
[0003] There is no targeted solution to the above prediction error caused by using the entire traffic OD flow prediction as the prediction model input in a complex system, and no invention patents for such methods have been retrieved.
[0004] After searching the literature on the existing technologies, it is found that the main methods for traffic OD flow prediction are as follows:
[0005] 1. Real-time traffic flow distribution prediction based on OD reverse calculation of road sections. Each road section in the traffic network is regarded as a traffic zone, namely O and D in the OD matrix. According to the passenger status field of the taxi GPS data, the OD pair of the trip is determined, and the OD points of the trip are extracted. The extracted OD points are matched with the traffic zones for road sections, and then the traffic volume between the OD pairs of each traffic zone is summarized, and a historical OD traffic volume database is constructed. According to the prediction time, the OD data within a certain range around the prediction time of a few days are selected from the historical OD traffic volume database, and the average result is taken as the basic OD matrix. According to the prediction time, the OD traffic volume data of the previous few moments of the prediction time of the day are selected, and the rolling prediction is performed according to the time series method to obtain the traffic volume prediction values of each traffic zone O and D at the prediction time, and the traffic volume prediction values are substituted into the OD matrix as the summary prediction values of each O and D. Based on this, the basic OD matrix and the summary prediction values of O and D are obtained, and the average growth coefficient method is used to reverse the OD matrix to obtain the traffic volume distribution between each OD pair at the prediction time. The shortest path allocation algorithm is used to allocate the real-time predicted traffic volume between each OD pair to each section of the road network, and the real-time traffic volume allocation prediction of each section in the road network at the prediction time is obtained. Representative achievements include "Real-time Traffic Flow Distribution Prediction System Based on Section OD Inversion" (Patent Authorization No. CN201410410008.5)
[0006] 2. Traffic OD passenger flow prediction based on time series characteristics. Collect historical data of traffic passenger flow OD, extract sequential time series and historical concurrent series, combine the sequential time series with the historical concurrent series to obtain a new time passenger flow series, establish an LSTM model, and use the new time passenger flow series from 0 to t as input to train the LSTM model, and then input the new time passenger flow series at time t into the trained LSTM model to obtain the OD passenger flow at time t+1. Representative achievements include "A method for predicting rail transit OD passenger flow based on time series characteristics" (patent authorization number CN201810382266.5), "A method for predicting OD passenger flow based on deep learning" (patent authorization number CN202010861302.3)
[0007] 3. Based on method 2, some studies further consider the topological relationship of the road network, use a graph convolutional network that can better represent adjacent points as the backbone model, and connect the encoder, multi-channel feature fusion module and decoder in sequence. The encoder and decoder are both built based on hypergraph convolutional networks and gated recurrent units; the encoder is used to extract the passenger flow characteristics of the O channel, D channel and OD channel according to the hypergraph set; the passenger flow characteristics of the O channel represent the implicit spatiotemporal neighbor relationship of the outflow passenger flow under the O channel; the passenger flow characteristics of the D channel represent the implicit spatiotemporal neighbor relationship of the inflow passenger flow under the D channel; the passenger flow characteristics of the OD channel represent the implicit spatiotemporal neighbor relationship and implicit semantic neighbor association relationship of the OD passenger flow under the OD channel; the multi-channel feature fusion module is used to fuse the passenger flow characteristics of the O channel, D channel and OD channel to obtain the OD passenger flow distribution characteristics; the decoder is used to obtain the OD passenger flow prediction value based on the OD passenger flow distribution characteristics. Representative achievements include "Traffic OD passenger flow prediction method and system based on multi-channel hypergraph convolutional network" (patent authorization number CN202311797056.X)
[0008] Method 1 is to use the actual traffic volume of the road section through mathematical methods to reversely calculate the OD prediction. It is difficult to adapt to the complex road network structure and it is difficult to fully consider the travel volume caused by occasional activities.
[0009] Method 2 is the traditional traffic OD flow prediction method, which inputs the traffic volume of each OD pair into the time series prediction model separately, but does not consider the differences in travel characteristics of different groups.
[0010] Method 3 further considers the road network topology relationship based on Method 2, but still regards all travelers as the same group, and does not consider the differences in travel characteristics of different groups in OD prediction.
[0011] Technical term: OD: Origin-Destination Summary of the invention
[0012] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a road traffic OD flow short-term prediction method considering travel frequency, which can not only obtain the OD flow short-term prediction of different categories of travelers, but also improve the short-term prediction accuracy of the overall OD flow. In order to achieve the above-mentioned purpose and other advantages according to the present invention, a road traffic OD flow short-term prediction method considering travel frequency is provided, comprising:
[0013] S1, extract historical OD records in the region;
[0014] S2, counting the travel frequency of each license plate number based on the OD records as the travel frequency of the traveler;
[0015] S3, classify travelers according to travel frequency;
[0016] S4, aggregating the historical OD records extracted in step S1 into historical OD matrices of different groups in different periods according to the division method of step S3;
[0017] S5, inputting the historical OD matrix time series of different types of travelers into multiple deep learning models for prediction model training, and using them to predict the OD matrix of each type of travelers;
[0018] S6. Perform summary OD matrix prediction.
[0019] Preferably, step S1 specifically sorts the license plate recognition data according to the license plate number and timestamp, obtains the traffic flow data through each traffic point in the area, classifies the records with a time interval of less than 30 minutes as one trip, extracts the departure and destination of each trip, and records the license plate number, departure time and arrival time of the trip.
[0020] Preferably, in step S3, the travelers are divided according to the travel frequency by using the K-means clustering method, and the optimal number of classifications is determined according to the silhouette coefficient; the silhouette coefficient of each travel frequency sample point is calculated by the following formula:
[0021]
[0022] Where a(i) represents the average distance between the travel frequency sample point i and all other points in the same cluster, that is, the similarity between the sample point and other points in the same cluster; b(i) represents the average distance between the travel frequency sample point i and all points in the next nearest cluster, that is, the similarity between the sample point and other points in the next nearest cluster;
[0023] For the case of being divided into k categories, the silhouette coefficient S of the entire clustering result k Calculated by the following formula:
[0024]
[0025] Where s(i) is the silhouette coefficient of each sample point, and n represents the number of sample points. The closer the silhouette coefficient is to 1, the better the clustering performance is. The number of classifications corresponding to the maximum silhouette coefficient is selected as shown in the following formula:
[0026]
[0027] Preferably, step S5 is represented by the following formula:
[0028]
[0029] in represents the OD matrix prediction of group p in time period t, F(·) represents the selected deep learning backbone model, represents the historical OD matrix time series of group p, L represents the time length of the input prediction model; the final predicted classification OD matrix is recorded as
[0030] Preferably, in step S6, the total OD matrix prediction y is obtained by the following formula: t ;
[0031]
[0032] Compared with the prior art, the invention has the following beneficial effects: it is applicable to short-term prediction of OD flow in urban road networks involving various types of travel groups. The method of the invention divides travelers into several categories according to travel frequency, and establishes prediction models for each category, which can not only obtain short-term prediction of OD flow of travelers of different categories, but also improve the short-term prediction accuracy of overall OD flow. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A model framework diagram of a road traffic OD flow short-term prediction method considering travel frequency according to the present invention;
[0034] Figure 2 A flowchart of a method for short-term prediction of road traffic OD flow considering travel frequency according to the present invention;
[0035] Figure 3 A flowchart of a method for short-term prediction of road traffic OD flow considering travel frequency according to the present invention;
[0036] Figure 4 This is a schematic diagram of a road network in Example 1 of the method for short-term prediction of road traffic OD flow considering travel frequency according to the present invention. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] Example 1
[0039] The regional observation points in Example 1 of the present invention are as follows: Figure 4 As shown in Figure 1, the data input is the license plate data collected from December 1 to December 30, 2023 in a certain area of Liuzhou City, Guangxi Zhuang Autonomous Region, China. The area of this area is 3 square kilometers, and there are 12 license plate recognition checkpoints. Every time a vehicle passes through the checkpoint, its license plate number, license plate color, timestamp, device location number, and vehicle color are recorded. Table 1 gives a sample of license plate recognition data.
[0040] Table 1 License plate recognition data sample
[0041]
[0042]
[0043] The method of the present invention is used to predict the traffic OD flow in the area, and the specific process is as follows:
[0044] Step 1: Extraction of historical OD records. First, all license plate recognition data are sorted by license plate number and timestamp, and then the data with a continuous time interval of less than 30 minutes is recorded as a trip. For example, a car passes through location 1 at 8:00:00, location 2 at 8:20:00, location 3 at 9:00:00, and location 4 at 9:20:00, then it is recorded as two trips, from location 1 to location 2 from 8:00:00 to 8:20:00, and from location 3 to location 4 from 9:00:00 to 9:20:00. After processing, 201,161 OD records were extracted from 2,592,519 original license plate recognition data. Table 2 shows an example of the extracted OD records.
[0045] Table 2 Examples of extracted OD records
[0046]
[0047]
[0048] Step 2: Travel frequency statistics. Based on the historical OD records extracted in step 1, the travel frequency of each license plate number is counted, as shown in Table 3, and this is used as the travel frequency of the traveler.
[0049] Table 3 Statistics of travel frequency for each license plate number
[0050] License plate number Travel frequency Gui B145xxx 138 Gui B143xxx 137 Gui B142xxx 135 Gui BDU2xxx 119
[0051] Step 3: Classification of travelers. Use K-means clustering to classify all travelers according to travel frequency, and calculate the silhouette coefficients corresponding to different numbers of classifications. The results are shown in Table 4.
[0052] Table 4 Silhouette coefficients corresponding to different numbers of categories
[0053] Number of categories 2 3 4 5 6 7 8 Silhouette coefficient 0.8182 0.7742 0.7538 0.7376 0.7252 0.7282 0.7282
[0054] The number of categories corresponding to the maximum silhouette coefficient (0.8182) is taken, that is, all travelers are divided into two categories according to their travel frequency, one is high-frequency travelers and the other is low-frequency travelers. The classification results are shown in Table 5.
[0055] Table 5 Classification results
[0056] Traveler Category Travel frequency Frequent travelers <10 Low-frequency travelers >=10
[0057] Step 4: Aggregate the historical OD matrix. Aggregate the historical OD records of the two types of travelers into the historical OD matrix for each hour. Tables 6 and 7 show the historical OD matrices of high-frequency travelers and low-frequency travelers in a certain hour, respectively. The first column and the first row represent the numbers of the departure and destination, respectively. The numbers in the table represent the OD from the departure to the destination.
[0058] Traffic volume, in vehicles.
[0059] Table 6 Historical OD matrix of high-frequency travelers within a certain hour
[0060]
[0061]
[0062] Table 7 Historical OD matrix of low-frequency travelers within a certain hour
[0063]
[0064] Step 5: Classified OD matrix prediction. For the OD matrices of the two types of travelers, build and train deep learning models for short-term prediction. The backbone model can be LSTM, GRU or Transformer. Tables 8 and 9 show examples of OD matrix prediction results for high-frequency travelers and low-frequency travelers in a certain hour.
[0065] Table 8 OD matrix prediction results for high-frequency travelers in a certain hour
[0066]
[0067] Table 9 OD matrix prediction results for low-frequency travelers in a certain hour
[0068]
[0069]
[0070] Step 6: Aggregated OD matrix prediction. Add the OD flows in Table 8 and Table 9 to obtain the aggregated OD matrix prediction results for all travelers, as shown in Table 10.
[0071] Table 10 OD matrix prediction results of all travelers after summary
[0072]
[0073]
[0074] Using MAE, RMSE and R 2 The prediction results are evaluated by using three backbone models: LSTM, GRU and Transformer. The prediction results of the models without considering the travel frequency classification (represented by LSTM, GRU and Transformer) and considering the travel frequency classification (represented by LSTM-C, GRU-C and Transformer-C) are compared. The indicators are shown in Table 11. The prediction results of the traffic OD flow matrix after classification are better than the results of directly predicting the entire traffic OD flow matrix. The three indicators of LSTM-C are improved by 7.45%, 2.80% and 1.95% respectively compared with LSTM; GRU-C is improved by 9.90%, 5.04% and 34.49% respectively compared with GRU; Transformer-C is improved by 34.09%, 42.26% and 21.98% respectively compared with Transformer. It can also be found from Table 11 that the results of GRU as the backbone prediction model are better than the other two models in terms of average performance, optimal performance and performance stability.
[0075] Table 11 Prediction results of different models
[0076]
[0077]
[0078] The number of devices and processing scales described here are used to simplify the description of the present invention, and the application, modification and variation of the present invention are obvious to those skilled in the art. Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and the implementation mode, and they can be fully applied to various fields suitable for the present invention. For those familiar with the art, other modifications can be easily realized, so without departing from the general concept defined by the claims and the equivalent scope, the present invention is not limited to the specific details and the legends shown and described here.
Claims
1. A short-term prediction method for road traffic OD flow considering travel frequency, characterized in that: The following steps are involved: S1, extract historical OD records in the region; S2, counting the travel frequency of each license plate number based on the OD records as the travel frequency of the traveler; S3, classify travelers according to travel frequency; S4, aggregating the historical OD records extracted in step S1 into historical OD matrices of different groups in different periods according to the division method of step S3; S5, inputting the historical OD matrix time series of different types of travelers into multiple deep learning models for prediction model training, and using them to predict the OD matrix of each type of travelers; S6. Perform the aggregated OD matrix prediction and obtain the total OD matrix prediction yt by the following formula; in Represents the OD matrix prediction of group p in time period t. Group p can be 1, 2, …, m, with a total of m categories.
2. A road traffic OD flow short-term prediction method considering travel frequency as claimed in claim 1, characterized in that: Specifically, step S1 sorts the license plate recognition data according to the license plate number and timestamp, obtains the traffic flow data through each traffic point in the area, classifies the records with a time interval of less than 30 minutes as one trip, extracts the departure and destination of each trip, and records the license plate number, departure time and arrival time of the trip.
3. A road traffic OD flow short-term prediction method considering travel frequency as claimed in claim 2, characterized in that: In step S3, travelers are divided according to travel frequency by using the K-means clustering method, and the optimal number of classifications is determined according to the silhouette coefficient; the silhouette coefficient of each travel frequency sample point is calculated by the following formula: Where a(i) represents the average distance between the travel frequency sample point i and all other points in the same cluster, that is, the similarity between the sample point and other points in the same cluster; b(i) represents the average distance between the travel frequency sample point i and all points in the next nearest cluster, that is, the similarity between the sample point and other points in the next nearest cluster; For the case of being divided into k categories, the silhouette coefficient S of the entire clustering result k Calculated by the following formula: Where s(i) is the silhouette coefficient of each sample point, and n represents the number of sample points. The closer the silhouette coefficient is to 1, the better the clustering performance is. The number of classifications corresponding to the maximum silhouette coefficient is selected as shown in the following formula: m=argmax k S k (3) Where S k is the silhouette coefficient when divided into k categories, and m is the optimal number of classifications taken.
4. A road traffic OD flow short-term prediction method considering travel frequency as claimed in claim 3, characterized in that: Step S5 is represented by the following formula: in represents the OD matrix prediction of group p in time period t, F(·) represents the selected deep learning backbone model, represents the historical OD matrix time series of group p, L represents the time length of the input prediction model; the final predicted classification OD matrix is recorded as
Citation Information
Patent Citations
Real-time traffic flow distribution prediction method based on reverse inference of section OD
CN104183119B
Method for forecasting rail traffic OD passenger flow volume based on sequential characteristics
CN108564228A
Traffic OD passenger flow prediction method and system based on multi-channel hypergraph convolutional network
CN117475638A
Dominant travel distance-based OD allocation method
CN107679653A
OD passenger flow prediction method based on deep learning
CN112001548A