Urban traffic network state evolution trend prediction method and system under the influence of activities
By constructing an activity-spatial-temporal fusion prediction model, combining attention mechanism and graph neural network, integrating spatio-temporal dependence and activity influence, it solves the problems of large error and low efficiency of existing technologies in predicting the evolution trend of urban traffic network status, and achieves Prediction results with higher accuracy and lower error.
Patent Information
- Application Number
- CN202111292800.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-03
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2041-11-03
AI Technical Summary
When predicting the evolution trend of urban traffic road network status under the influence of activities, the existing technology ignores the influencing factors of user travel, the serial impact of historical monitoring data, the static attribute characteristics of the traffic road network and the complex spatial characteristics of the cascade structure. This leads to large prediction errors and low computational efficiency.
By obtaining taxi GPS data, user travel search record data and urban traffic network static attribute data, a training set is constructed and an activity-spatial-temporal fusion prediction model is trained. This model combines attention mechanism and graph neural network, integrates spatiotemporal dependence and activity influence, and outputs traffic network status evolution trend prediction results.
It reduces the prediction error and improves the correlation coefficient of long-term trend prediction for multiple time periods in the future. It can better learn and predict the evolution trend of urban traffic network status under the influence of activities, and then evaluate the safety status of the traffic network.
Smart Images

Figure CN113971496B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of urban intelligent transportation and machine learning technology, and in particular to a method and system for predicting the evolution trend of urban traffic road network status under the influence of activities. Background Art
[0002] With the rapid development of my country's economy and the accelerating urbanization process, people's travel needs have increased significantly, leading to the construction of a large number of urban traffic networks. The traffic network facilities located in the city inevitably bear the travel pressure of urban residents, and it is more obvious during the event, which may cause road congestion and even traffic accidents. Therefore, developing a reliable method to predict the evolution trend of the traffic network state under the influence of activities is crucial for urban traffic management and user travel. In the past few years, many statistical and machine learning models have been proposed to solve this problem. However, due to the limitations of many internal and external factors such as the complex travel patterns of users during the event and the complex spatiotemporal dependence of urban traffic, this project is challenging. Therefore, it is urgent to establish a reasonable model to adapt to the complex urban traffic network and predict its speed state indicators with high accuracy.
[0003] In recent years, with the rapid development of computer science and technology, the real-time monitoring of urban traffic network status using urban intelligent transportation systems has attracted widespread attention. Various statistical and machine learning methods have gradually been used to analyze the monitoring data obtained from the system. The methods currently used are mostly divided into two categories: prediction methods based on multi-source time series and prediction methods based on statistical information. The prediction method based on multi-source spatiotemporal series is a method that uses the multi-source time series of multiple sections of traffic network status data observed in the past to predict the state change trend or potential dangerous accidents of the corresponding section in the future. In recent years, deep learning-based time series prediction models represented by recurrent neural networks have achieved excellent performance in this work. The method based on statistical information establishes a Gaussian model based on the distribution of user travel and estimates and predicts the change trend of the traffic network status based on the historical information of the same time period in the past. Previous studies have shown that the method of using multi-source time series linear regression and considering user travel distribution is reliable and effective, and has been widely used in urban intelligent transportation engineering.
[0004] However, both models have their own shortcomings. The prediction model based on multi-source time series ignores the influencing factors of user travel, and constructs the observed time series with dependencies between the previous and next cycles, which results in poor computational efficiency and effect when dealing with long-term dependencies. The prediction method based on statistical information ignores the impact of the seriality of historical monitoring data. In addition, both models do not fully consider the static attribute characteristics carried by the traffic network segments, the complex spatial characteristics of the cascade structure of the traffic network segments, and the rich temporal information of the long-period sequences and the influence of the sequences on the activities reflected by the user travel. Therefore, there is an urgent need for a new model that fully considers multiple factors and combines the advantages of these two types of models to overcome their shortcomings, so as to achieve a more accurate prediction of the evolution trend of the future traffic network state over a long period of time under the influence of activities. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a method and system for predicting the evolution trend of urban traffic network status under the influence of activities.
[0006] The technical solution of the present invention is: a method for predicting the evolution trend of urban traffic network status under the influence of activities, comprising:
[0007] Step S1: obtaining urban traffic network speed monitoring data based on taxi GPS data, wherein the taxi GPS data includes: speed, direction, longitude and latitude of the taxi;
[0008] Step S2: obtaining user travel search record data according to the search data records used by the user when traveling;
[0009] Step S3: Obtaining static attribute data of the urban traffic road network according to road test personnel's road test, wherein the static attribute data of the urban traffic road network includes: road section identification ID, latitude and longitude of the starting node of the road section, length, width, number of lanes, direction, charging method, road category and speed limit level;
[0010] Step S4: construct a training set, a validation set and a test set according to the urban traffic network speed monitoring data, the user travel search record data and the urban traffic network static attribute data; input the training set into and train the activity-space-time fusion prediction model; and combine the space-time dependency and the activity influence through the attention mechanism and the graph neural network, and output the prediction result of the traffic network state evolution trend under the influence of the activity; use the test set to verify that the activity-space-time fusion prediction model predicts the future evolution trend of the urban traffic network state under the influence of the activity.
[0011] Compared with the prior art, the present invention has the following advantages:
[0012] The present invention discloses a method for predicting the evolution trend of the state of an urban traffic network under the influence of an activity, which reduces the prediction error and has a higher correlation coefficient for long-term trend prediction in multiple time periods in the future. It can better learn the evolution trend of the state of an urban traffic network under the influence of an activity, and can more comprehensively evaluate the state of the surrounding traffic network corresponding to the activity, thereby evaluating its safety status. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 It is a flow chart of a method for predicting the evolution trend of urban traffic network status under the influence of an activity in an embodiment of the present invention;
[0014] Figure 2 It is a schematic diagram of the structure of the activity-time-space fusion prediction model in an embodiment of the present invention;
[0015] Figure 3 The present invention is a block diagram of a system for predicting the evolution trend of an urban traffic network state under the influence of an activity in an embodiment of the present invention. DETAILED DESCRIPTION
[0016] The present invention provides a method for predicting the evolution trend of the urban traffic road network state under the influence of an activity, which reduces the prediction error and has a higher correlation coefficient for long-term trend prediction in multiple time periods in the future. It can better learn the evolution trend of the urban traffic road network state under the influence of the activity, and can more comprehensively evaluate the surrounding traffic road network state corresponding to the activity, thereby evaluating its safety status.
[0017] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below through specific implementations and in conjunction with the accompanying drawings.
[0018] Embodiment 1
[0019] like Figure 1 As shown, an embodiment of the present invention provides a method for predicting the evolution trend of urban traffic network status under the influence of activities, comprising the following steps:
[0020] Step S1: Obtaining urban traffic network speed monitoring data based on taxi GPS data, where the taxi GPS data includes: speed, direction, longitude and latitude of the taxi;
[0021] Step S2: obtaining user travel search record data according to the search data records used by the user when traveling;
[0022] Step S3: Obtain static attribute data of the urban traffic road network according to road test personnel's road test, wherein the static attribute data of the urban traffic road network includes: road section identification ID, latitude and longitude of the starting node of the road section, length, width, number of lanes, direction, charging method, road category and speed limit level;
[0023] Step S4: Construct a training set, a validation set and a test set based on the urban traffic network speed monitoring data, the user travel search record data and the urban traffic network static attribute data; input the training set into the activity-space-time fusion prediction model to train the activity; and combine the space-time dependency and the activity influence through the attention mechanism and the graph neural network to output the prediction result of the evolution trend of the traffic network state under the influence of the activity; use the test set to verify the activity-space-time fusion prediction model to predict the future evolution trend of the urban traffic network state under the influence of the activity.
[0024] In one embodiment, the above step S1: obtaining urban traffic network speed monitoring data based on taxi GPS data, where the taxi GPS data includes: the speed, direction, longitude and latitude of the taxi, specifically including:
[0025] The embodiment of the present invention monitors and identifies the status of the urban traffic network by collecting taxi GPS data reflecting the urban traffic status of Beijing for a long time based on satellite acquisition, specifically collecting the speed, direction, longitude and latitude of taxis on each road section, so that the urban traffic network speed monitoring data monitored within a predetermined length of time forms time series data.
[0026] In one embodiment, the above step S2: obtaining the user travel search record data according to the search data record used by the user when traveling, specifically includes:
[0027] Search record data is the search data records generated by application software used by users when traveling, such as Baidu Maps, Amap, and Yitongxing, which are used to construct the impact of activities on the status of the traffic network.
[0028] In one embodiment, the above step S3: road testing is performed by road test personnel to obtain static attribute data of the urban traffic road network, wherein the static attribute data of the urban traffic road network includes: road section identification ID, latitude and longitude of the starting node of the road section, length, width, number of lanes, direction, charging method, road category and speed limit level, specifically including:
[0029] The static attribute data of the urban traffic road network is obtained by road test personnel through road testing. The static attribute data of the urban traffic road network includes: road section identification ID, longitude and latitude of the starting node of the road section, length, width, number of lanes, direction, charging method, road category and speed limit level.
[0030] In one embodiment, the above step S4: constructing a training set, a validation set and a test set according to the urban traffic network speed monitoring data, the user travel search record data and the urban traffic network static attribute data; inputting the training set and training the activity-time-space fusion prediction model; and combining the time-space dependency and the activity influence through the attention mechanism and the graph neural network, and outputting the prediction result of the evolution trend of the traffic network state under the influence of the activity; using the test set to verify the activity-time-space fusion prediction model to predict the future evolution trend of the urban traffic network state under the influence of the activity, specifically including:
[0031] Step S41: constructing a training set, a validation set and a test set according to the urban traffic network speed monitoring data, the user travel search record data and the urban traffic network static attribute data, specifically including:
[0032] Step S411: Matching the urban traffic road network speed monitoring data with the traffic road network and dividing the time periods, constructing an m×n matrix X, where m is the length of the urban traffic road network speed monitoring data, and n is the number of traffic road network sections;
[0033] According to the user's travel search record data, the road sections are matched by city area and the heat value is calculated to construct an m×n matrix Q;
[0034] According to the static attribute data of the urban traffic road network, an n×k matrix F is constructed, where k is the number of static features;
[0035] The cascade structure of the traffic network sections is calculated based on the latitude and longitude data of the static attribute data of the traffic network, and is constructed as an n×n matrix A;
[0036] The time-carrying data in the static attribute data of the traffic network is constructed into an m×1 matrix T;
[0037] Step S412: presetting three hyper parameters of the activity-time-space fusion prediction model: the historical time period step p of the time series used by the model for each learning, the future time period step q predicted by the model, and the hidden layer encoding vector dimension h of the model;
[0038] Step S413: select a set of n' of road segments i in the area surrounding the activity e, select the road segment number i to be predicted; take out the i-th column of the matrix X, that is, all the data of the road segment i; for any time period t and each road segment i in the area surrounding the activity e, construct a matrix X of p historical time period steps and q future time period steps including the time period to obtain a (mpq)×(p+q)×n' space-time sequence X';
[0039] Similarly, the matrix Q of the previous p historical time period steps and q future time period steps including time period t is constructed to obtain an activity heat matrix Q' of (mpq)×(p+q)×n';
[0040] Similarly, the matrix T of the previous p historical time period steps and q future time period steps including the time period t constructs a (mpq)×(p+q)×1 time information matrix T';
[0041] Extract the data of the corresponding road section i from the matrix F and the matrix A respectively, and construct an n'×k road network static attribute feature F' and an n'×n' road network section cascade matrix A';
[0042] Step S414: Divide the matrices X', Q', T' into a training set, a validation set, and a test set according to a preset ratio;
[0043] In the embodiment of the present invention, the data is divided into a ratio of 7:1:2 as a training set, a validation set, and a test set, respectively.
[0044] Step S42: Input the training set and train the activity-space-time fusion prediction model, combine the space-time dependency and activity influence through the attention mechanism and graph neural network, output the prediction result of the traffic network state evolution trend under the influence of the activity, and use the validation set to train and calculate the error between the predicted value and the true value until the parameters of the activity-space-time fusion prediction model converge, and obtain the trained activity-space-time fusion prediction model, which specifically includes:
[0045] Step S421: Use the training set to train the activity-time-space fusion prediction model, input the road network segment cascade matrix A' into the graph neural network in the activity-time-space fusion prediction model, and obtain the hidden layer representation of each segment i;
[0046] Step S422: Input the spatiotemporal sequence X', the time information matrix T', the activity heat matrix Q' and the road network static attribute feature F' of the historical time period t-p+1 to t into the spatiotemporal self-attention mechanism module in the activity-spatiotemporal fusion prediction model to obtain the hidden state of the historical road network segment;
[0047] Step S423: input the historical road network segment hidden state and the time information matrix T' and activity heat matrix Q' of the future time period from t+1 to t+q as mapping vectors into the cross attention mechanism module to obtain the future road network segment hidden state;
[0048] Step S424: input the future road network segment hidden state into the spatiotemporal self-attention mechanism module to obtain an updated future road network segment hidden state vector;
[0049] Step S425: input the updated future road network segment hidden state vector into the fully connected layer network, and output the traffic network state evolution trend prediction result under the influence of activities in the time period t+1 to t+q, that is, the speed value;
[0050] Step S426: Calculate the prediction error using the loss function, use the gradient descent method to update the parameters of the activity-time-space fusion prediction model, use the validation set to train and calculate the error between the predicted value and the true value until the parameters converge, and obtain the trained activity-time-space fusion prediction model;
[0051] like Figure 2 As shown, a structural schematic diagram of an activity-space-time fusion prediction model based on an attention mechanism and a graph neural network is shown, wherein the graph neural network is used to discover dependencies between road sections in space, and the attention mechanism is used to learn activity influences, time information dependencies, static features of road networks, and temporal dependencies in time series. The embodiment of the present invention combines the two for an activity-space-time fusion prediction model, which can excellently capture the activity-space-time dependencies of monitoring data.
[0052] Step S43: Use the test set to verify the activity-space-time fusion prediction model to predict the future evolution trend of the urban traffic network status under the influence of the activity.
[0053] For time period t, to predict the monitoring indicators for time period t+1 to t+q, the time series composed of the urban traffic network speed monitoring data and user travel search record data from time period t-p+1 to date t and the corresponding time information data, as well as the static attribute feature data of the urban traffic network and the cascade structure data of the traffic network sections, are used to form an input vector; the input vector is input into the trained activity-time-space fusion prediction model, and the predicted value of the monitoring indicators for time period t+1 to t+q is output. The above steps can be repeated for multiple different time periods to obtain the evolution trend of the urban traffic network status under the influence of activities in the next time period of the corresponding time period.
[0054] In addition, for all activities that are about to take place, they are matched according to the user travel search records and road sections up to the monitoring time, and the corresponding search heat value range is calculated; for each real activity and related search heat, it is taken together with the time series, time information data, traffic road network static attribute feature data and traffic road network section cascade structure data as input vectors, which are input into the trained activity-time-space fusion prediction model to obtain the predicted value of the monitoring indicator under such conditions, so as to obtain the possible range of the surrounding traffic road network status monitoring indicators corresponding to all activities, thereby making a comprehensive prediction of its safety.
[0055] In order to verify the effectiveness and accuracy of the method disclosed in the present invention, the embodiment of the present invention uses the speed monitoring data of the urban traffic road network composed of more than 15,000 road sections in the urban area of Beijing's urban intelligent transportation system, user travel search record data, and urban traffic road network static attribute data to conduct experiments. These data are distributed in different locations of the urban road network in each block of the urban area. In order to evaluate the prediction ability of the model, three evaluation indicators, mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) are used. MAE, RMSE, and MAPE are used to measure the error between the predicted value and the true value of the monitoring indicator. The prediction time period can be divided into 1≤q≤96 time periods based on the experience of traffic scenarios. The embodiment of the present invention sets q to 12 according to demand. In order to obtain the most suitable observation window and hidden layer encoding vector dimension h, that is, the parameter p in the model, 5≤p≤20 and 64≤h≤512 (h=2 n , n=6,7,8,9) were all tested, and p=12 was found to be optimal. In order to verify that this method performs better than other models, the embodiments of the present invention use commonly used prediction models such as vector autoregression, multi-layer perceptron, fully connected long short-term memory network, and spatiotemporal graph convolutional neural network for comparative experiments. The experiments show that the prediction error of the present invention is the lowest and the prediction correlation is the highest. As shown in Table 1, the comparison of prediction results using different prediction models in different time periods in the Capital Gymnasium area is shown.
[0056] Table 1 Comparison of prediction results of different prediction models
[0057]
[0058] In addition, in order to verify the accuracy of the method provided by the present invention in predicting trends in different time periods in the future, the embodiments of the present invention compare the prediction results of other methods in different time periods in the future. The experimental results show that the prediction error of this method increases as the number of prediction steps increases between 1 and q compared with other methods, but the prediction error of the entire prediction step number is maintained in a relatively small range, and the larger the number of prediction steps, the more accurate it is compared with other methods, indicating that this method can better and more completely predict the evolution trend of the traffic network state under the influence of activities.
[0059] The method provided by the present invention is applicable to the prediction of the road network status trend of various intelligent transportation road network facilities such as urban roads, highways, etc. The data to be predicted are commonly used monitoring indicators in the field of intelligent transportation, such as speed and passenger flow. By combining the urban transportation road network speed monitoring data, user travel search record data and urban transportation road network static attribute data, the activity-time-space fusion prediction model can learn the time-space dependency of the monitoring data in the road network static attribute data and the activity influence in the travel search record data, and predict the urban transportation road network status evolution trend under the influence of activities.
[0060] Compared with the existing technology, the method provided by the present invention reduces the prediction error, and has a higher correlation coefficient for long-term trend prediction in multiple time periods in the future, which can better learn the evolution trend of the urban traffic network status under the influence of activities. In addition, on this basis, the present invention proposes a method for providing coverage testing of the safety of the traffic network facilities under the influence of activities, which can more comprehensively evaluate the surrounding traffic network status corresponding to the activity, thereby evaluating its safety status.
[0061] Embodiment 2
[0062] like Figure 3 As shown, an embodiment of the present invention provides a system for predicting the evolution trend of urban traffic network status under the influence of activities, including the following modules:
[0063] The module 51 for obtaining the speed monitoring data of the urban traffic network is used to obtain the speed monitoring data of the urban traffic network according to the GPS data of the taxi, wherein the GPS data of the taxi includes: the speed, direction, longitude and latitude of the taxi;
[0064] The module 52 for obtaining user travel search record data is used to obtain user travel search record data according to the search data records used by the user when traveling;
[0065] The module 53 for acquiring static attribute data of urban traffic road network is used to acquire static attribute data of urban traffic road network according to road test personnel performing road test, wherein the static attribute data of urban traffic road network includes: latitude and longitude of the starting node of the road section, length and width, number of lanes, direction and charging method;
[0066] The module 54 for predicting the future evolution trend of the urban traffic network status is used to construct a training set, a verification set and a test set based on the urban traffic network speed monitoring data, the user travel search record data and the urban traffic network static attribute data; input the training set into and train the activity-time-space fusion prediction model; and combine the time-space dependency and the activity influence through the attention mechanism and the graph neural network, and output the prediction result of the traffic network status evolution trend under the influence of the activity; and use the test set to verify that the activity-time-space fusion prediction model predicts the future evolution trend of the urban traffic network status under the influence of the activity.
[0067] The above embodiments are provided only for the purpose of describing the present invention, and are not intended to limit the scope of the present invention. The scope of the present invention is defined by the appended claims. Various equivalent substitutions and modifications made without departing from the spirit and principles of the present invention should all be included within the scope of the present invention.
Claims
1. A method for predicting the evolution trend of urban traffic network status under the influence of activities, characterized in that: include: Step S1: obtaining urban traffic network speed monitoring data based on taxi GPS data, wherein the taxi GPS data includes: speed, direction, longitude and latitude of the taxi; Step S2: obtaining user travel search record data according to the search data records used by the user when traveling; Step S3: Obtaining static attribute data of the urban traffic road network according to road test personnel's road test, wherein the static attribute data of the urban traffic road network includes: road section identification ID, latitude and longitude of the starting node of the road section, length, width, number of lanes, direction, charging method, road category and speed limit level; Step S4: construct a training set, a validation set and a test set according to the urban traffic network speed monitoring data, the user travel search record data and the urban traffic network static attribute data; input the training set and train the activity-time-space fusion prediction model; and combine the time-space dependency and the activity influence through the attention mechanism and the graph neural network, and output the prediction result of the traffic network state evolution trend under the influence of the activity; use the test set to verify that the activity-time-space fusion prediction model predicts the future evolution trend of the urban traffic network state under the influence of the activity, specifically including: Step S41: constructing a training set, a validation set and a test set according to the urban traffic network speed monitoring data, the user travel search record data and the urban traffic network static attribute data, specifically including: Step S411: Matching the urban traffic network speed monitoring data with the traffic network and dividing the time periods to construct m×n The matrix X ,in, m is the length of the urban traffic network speed monitoring data, n is the number of road network sections; According to the user travel search record data, road segments are matched by city area and the heat value is calculated to construct m×n The matrix Q ; According to the static attribute data of the urban traffic road network, n×k The matrix F ,in, k is the number of static features; The cascade structure of the traffic network segments is calculated based on the latitude and longitude data of the static attribute data of the traffic network, and constructed as follows: n ×n The matrix A ; The data carrying time in the static attribute data of the traffic network is constructed as m×1 The matrix T ; Step S412: Preset three hyper parameters of the activity-time-space fusion prediction model: the historical time period step length of the time series used by the model for each learning p , the step length of the future time period predicted by the model q And the hidden encoding vector dimension of the model h ; Step S413: Select an activity e The size of road segment i in the surrounding area is n’ Set, select the road section number that needs to be predicted i ; Take out the matrix X No. i Column, i.e. road section i All data for any period of time t and every activity e Surrounding area roads i , including the time period p The historical time period step and q The matrix of future time step lengths X Build a (mpq)×(p+q)×n' The space-time sequence X’ ; Likewise, the time period will be included t Before p The historical time period step and q Matrix of future time step lengths Q Build a (mpq) ×(p+q)×n' Activity heat matrix Q’; Likewise, including this period t Before p The historical time period step and q Matrix of future time step lengths T Build a (mpq)×(p+q)×1 The time information matrix T’ ; From the matrix F and matrix A Extract the corresponding road section i data, construct a n'×k Static attribute characteristics of road network F’ and a n'× n' The cascade matrix of road network segments A’ ; Step S414: The matrix X’ , Q', T' Divide into training set, validation set and test set according to preset ratio; Step S42: input the training set and train the activity-space-time fusion prediction model, combine the space-time dependency and activity influence through the attention mechanism and graph neural network, output the prediction result of the traffic network state evolution trend under the influence of the activity, and use the validation set to train and calculate the error between the predicted value and the true value until the parameters of the activity-space-time fusion prediction model converge, and obtain the trained activity-space-time fusion prediction model, which specifically includes: Step S421: Use the training set to train the activity-time-space fusion prediction model, and convert the road network segment cascade matrix A’ Input the graph neural network in the activity-time-space fusion prediction model to obtain each of the road sections i The hidden layer representation of Step S422: t-p+1 arrive t The space-time sequence of the historical period X’ , time information matrix T’ , Activity Heat Matrix Q’ And the static attribute characteristics of the road network F’ Input into the spatiotemporal self-attention mechanism module in the activity-spatiotemporal fusion prediction model to obtain the hidden state of the historical road network segment; Step S423: The historical road network segment hidden state and t+1 arrive t+q Time information matrix for future time periods T’ and activity heat matrix Q’ It is input into the cross attention mechanism module as a mapping vector to obtain the hidden state of the future road network segment; Step S424: inputting the future road network segment hidden state into the spatiotemporal self-attention mechanism module to obtain an updated future road network segment hidden state vector; Step S425: Input the updated future road network segment hidden state vector into the fully connected layer network and output t+1 arrive t+ q The prediction results of the evolution trend of the traffic network status under the influence of activities in the time period, that is, the speed value; Step S426: using the loss function to calculate the prediction error, using the gradient descent method to update the parameters of the activity-time-space fusion prediction model, using the validation set to train and calculate the error between the predicted value and the true value, until the parameters converge, to obtain the trained activity-time-space fusion prediction model; Step S43: using the test set to verify that the activity-space-time fusion prediction model predicts the future evolution trend of the urban traffic network state under the influence of the activity.
2. A system for predicting the evolution trend of urban traffic network status under the influence of activities, characterized in that: Includes the following modules: A module for obtaining urban traffic network speed monitoring data is used to obtain urban traffic network speed monitoring data based on taxi GPS data, wherein the taxi GPS data includes: speed, direction, longitude and latitude of the taxi; A module for obtaining user travel search record data is used to obtain user travel search record data based on the search data records used by the user when traveling; A module for obtaining static attribute data of urban traffic road network is used to obtain static attribute data of urban traffic road network according to road test personnel performing road detection, wherein the static attribute data of urban traffic road network includes: longitude and latitude of the starting node of the road section, length and width, number of lanes, direction and charging method; The module for predicting the future evolution trend of the state of the urban traffic network is used to construct a training set, a verification set and a test set according to the urban traffic network speed monitoring data, the user travel search record data and the static attribute data of the urban traffic network; the training set is input into and the activity-time-space fusion prediction model is trained; and the time-space dependency and the activity influence are combined through the attention mechanism and the graph neural network, and the prediction result of the evolution trend of the state of the traffic network under the influence of the activity is output; the test set is used to verify that the activity-time-space fusion prediction model predicts the future evolution trend of the state of the urban traffic network under the influence of the activity, which specifically includes: Step S41: constructing a training set, a validation set and a test set according to the urban traffic network speed monitoring data, the user travel search record data and the urban traffic network static attribute data, specifically including: Step S411: Matching the urban traffic network speed monitoring data with the traffic network and dividing the time periods to construct m×n The matrix X ,in, m is the length of the urban traffic network speed monitoring data, n is the number of road network sections; According to the user travel search record data, road segments are matched by city area and the heat value is calculated to construct m×n The matrix Q ; According to the static attribute data of the urban traffic road network, n×k The matrix F ,in, k is the number of static features; The cascade structure of the traffic network segments is calculated based on the latitude and longitude data of the static attribute data of the traffic network, and constructed as follows: n ×n The matrix A ; The data carrying time in the static attribute data of the traffic network is constructed as m×1 The matrix T ; Step S412: Preset three hyper parameters of the activity-time-space fusion prediction model: the historical time period step length of the time series used by the model for each learning p , the step length of the future time period predicted by the model q And the hidden encoding vector dimension of the model h ; Step S413: Select an activity e The size of road segment i in the surrounding area is n’ Set, select the road section number that needs to be predicted i ; Take out the matrix X No. i Column, i.e. road section i All data for any period of time t and every activity e Surrounding area roads i , including the time period p The historical time period step and q The matrix of future time step lengths X Build a (mpq)×(p+q)×n' The space-time sequence X’ ; Likewise, the time period will be included t Before p The historical time period step and q Matrix of future time step lengths Q Build a (mpq) ×(p+q)×n' Activity heat matrix Q’; Likewise, including this period t Before p The historical time period step and q Matrix of future time step lengths T Build a (mpq)×(p+q)×1 The time information matrix T’ ; From the matrix F and matrix A Extract the corresponding road section i data, construct a n'×k Static attribute characteristics of road network F’ and a n'× n' The cascade matrix of road network segments A’ ; Step S414: The matrix X’ , Q', T' Divide into training set, validation set and test set according to preset ratio; Step S42: input the training set and train the activity-space-time fusion prediction model, combine the space-time dependency and activity influence through the attention mechanism and graph neural network, output the prediction result of the traffic network state evolution trend under the influence of the activity, and use the validation set to train and calculate the error between the predicted value and the true value until the parameters of the activity-space-time fusion prediction model converge, and obtain the trained activity-space-time fusion prediction model, which specifically includes: Step S421: Use the training set to train the activity-time-space fusion prediction model, and convert the road network segment cascade matrix A’ Input the graph neural network in the activity-time-space fusion prediction model to obtain each of the road sections i The hidden layer representation of Step S422: t-p+1 arrive t The space-time sequence of the historical period X’ , time information matrix T’ , Activity Heat Matrix Q’ And the static attribute characteristics of the road network F’ Input into the spatiotemporal self-attention mechanism module in the activity-spatiotemporal fusion prediction model to obtain the hidden state of the historical road network segment; Step S423: The historical road network segment hidden state and t+1 arrive t+q Time information matrix for future time periods T’ and activity heat matrix Q’ It is input into the cross attention mechanism module as a mapping vector to obtain the hidden state of the future road network segment; Step S424: inputting the future road network segment hidden state into the spatiotemporal self-attention mechanism module to obtain an updated future road network segment hidden state vector; Step S425: Input the updated future road network segment hidden state vector into the fully connected layer network and output t+1 arrive t+ q The prediction results of the evolution trend of the traffic network status under the influence of activities in the time period, that is, the speed value; Step S426: using the loss function to calculate the prediction error, using the gradient descent method to update the parameters of the activity-time-space fusion prediction model, using the validation set to train and calculate the error between the predicted value and the true value, until the parameters converge, to obtain the trained activity-time-space fusion prediction model; Step S43: using the test set to verify that the activity-space-time fusion prediction model predicts the future evolution trend of the urban traffic network state under the influence of the activity.
Citation Information
Patent Citations
Graph neural network traffic flow prediction method and system based on attention mechanism
CN111161535A