Traffic prediction system based on historical trajectory set

By constructing a trajectory set hypergraph and using a hypergraph attention model, the problem of existing traffic prediction methods relying on static sensors and failing to utilize the semantic information of historical trajectories is solved, and high-precision prediction of future traffic speeds is achieved.

CN119495186AInactive Publication Date: 2025-02-21FUDAN UNIVERSITY

Patent Information

Application Number
CN202411398730.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-02-21
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN119495186A_ABST
    Figure CN119495186A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of intelligent traffic, and particularly relates to a traffic prediction system based on a historical track set. The method comprises the following steps of: collecting track data generated when a vehicle runs on a road network by using navigation positioning equipment, and constructing a hypergraph attention model based on a historical track set; the model is used for capturing space-time related characteristics on the hypergraph structure and the road network, so that the driving speed change of different roads in the future road network is accurately predicted; the system comprises a trajectory set feature extraction and enhancement module, a trajectory set hypergraph construction module, a hypergraph attention model module and a traffic prediction layer module. According to the method, heterogeneous and complex traffic semantic information is integrated by means of various space-time attention mechanisms; and meanwhile, a feature conversion relation between the road map and the track set hypergraph is established, so that features of a hypergraph space and a road network space are efficiently exchanged, and the future traffic speed is accurately predicted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of intelligent transportation, and in particular relates to a future traffic speed prediction system. Background Art

[0002] In recent years, with the development of economy and the improvement of living standards, the demand for traffic condition prediction of urban roads has been increasing. Accurate traffic prediction plays a vital role in daily life and traffic management. On the other hand, due to the continuous development of sensor technology, more traffic information generated by traffic sensors can be collected and used. By using big data and artificial intelligence technology to obtain traffic travel rules from a large amount of historical traffic information, an effective prediction model can be established to accurately predict the future traffic speed of urban roads. However, most of the current traffic prediction methods are still designed with static sensors as the center. Static sensors refer to sensor devices that are located at specific locations in the road network and are dedicated to collecting information on traffic conditions such as speed or flow. However, due to cost and maintenance constraints, in actual scenarios, many roads do not have static sensors, so it is impossible to obtain real historical traffic information for model training and prediction. Dynamic sensors provide real-time traffic data of vehicles through on-board positioning devices, and can cover different urban road sections as the vehicle travels. However, current dynamic sensors cannot fully utilize the rich semantic information in the complete historical trajectory set. They still regard each road section as the basic modeling unit and do not consider trajectory instances as the main modeling objects. Summary of the invention

[0003] The purpose of the present invention is to provide a future traffic speed prediction system based on a historical trajectory set to solve the problem that the current static sensor-based method relies on fixed sensor equipment, and the current dynamic sensor-based method does not fully utilize the collected trajectory context spatiotemporal semantic information.

[0004] The future traffic speed prediction system based on historical trajectory data provided by the present invention uses popular navigation and positioning equipment (such as GPS) to collect dynamic traffic data - trajectory data generated by vehicles traveling on the road network; each trajectory is regarded as a hyperedge, and the entire trajectory set is regarded as a hypergraph, and a hypergraph attention model based on the historical trajectory set is constructed; the model is used to effectively extract spatiotemporal features related to traffic speed on the hypergraph and the road network, so as to accurately predict the vehicle speed on different roads in the future. Among them, the model integrates heterogeneous and complex traffic semantic information with the help of a variety of spatiotemporal attention mechanisms; at the same time, a feature conversion module is established between the road graph and the trajectory set hypergraph, so that the features of the hypergraph space and the road network space can be efficiently exchanged, and the future traffic speed can be accurately predicted. Specifically, the system includes a trajectory set feature extraction and enhancement module, a trajectory set hypergraph construction module, a hypergraph attention model module, and a traffic prediction layer module; the trajectory set feature extraction and enhancement module, the trajectory set hypergraph construction module, the hypergraph attention model module, and the traffic prediction layer module are connected in series in sequence to form a complete road network speed prediction system. Among them:

[0005] The trajectory set feature extraction and enhancement module is used to collect trajectory data generated by vehicles driving on the road network in the past short period of time, and preprocess and enhance the features of these vehicle trajectory data. The trajectory speed-related information processed by this module will be further passed to the attention model as the input feature of the model; here, the trajectory mainly refers to the discrete point sequence composed of GPS sampling points; the speed information mainly refers to the trajectory moving speed between the front and rear points of each trajectory point. The model input feature mainly refers to the vector representation of each point.

[0006] The trajectory set hypergraph construction module is used to establish a trajectory set hypergraph to capture high-order spatiotemporal correlation relationships in the road network, thereby providing a correlation mapping reference between the hypergraph and the road network graph for the subsequent hypergraph attention model module.

[0007] The hypergraph attention model module is used to process the feature relationship within the trajectory set, the feature relationship between trajectories, and the spatiotemporal relationship between road sections on the road network, and input the refined spatiotemporal features of the road network into the traffic prediction layer module.

[0008] The traffic prediction layer module is used to integrate the road network features of different layers in the model and predict future traffic speed.

[0009] Further:

[0010] (1) The trajectory set feature extraction and enhancement module includes a unit for performing map matching on the trajectory, a unit for processing the speed and longitude and latitude information of the trajectory, and a unit for performing data enhancement on the trajectory; wherein:

[0011] The map matching unit is used to associate the GPS sampling points of the trajectory with specific sections on the road network;

[0012] The information processing unit includes a function for determining the longitude and latitude position of each trajectory point, and a distance and speed calculation function for processing the speed and position information of each trajectory point;

[0013] The data enhancement unit adopts a data enhancement strategy to perform a certain degree of noise interference on the trajectory points, change part of the trajectory information, and provide assistance for more stable learning of the subsequent model.

[0014] (2) The trajectory set hypergraph construction module is used to construct a hypergraph structure with trajectories as points, which can simultaneously model the complex spatial relationship between multiple road segments, the complex spatiotemporal relationship between each trajectory point, and the complex coupling relationship between the trajectory point and the road network; it includes a road network spatiotemporal graph construction unit, a matrix construction unit corresponding to the trajectory point and the road segment, and a matrix construction unit corresponding to the trajectory overall anchor point and the road segment set; wherein:

[0015] The road network spatiotemporal graph construction unit constructs a road network spatiotemporal feature tensor Represents the feature vector representation of each road segment in T time intervals in the past; N represents the number of road segments in the road network, and d represents the feature dimension of each road segment in the tensor at each time.

[0016] The matrix construction unit corresponding to the trajectory points and the road sections is used to construct each point p in the trajectory. i The road segment r in the tth time interval in the road network space-time graph it passes through i,t Correspondingly, we construct the correlation matrix:

[0017]

[0018] The matrix construction unit corresponding to the overall anchor point of the trajectory and the road section constructs a virtual anchor point p τ Corresponding to each road section in the road network space-time graph that the trajectory passes through, that is, constructing the association matrix:

[0019]

[0020] (3) The hypergraph attention model module aims to extract spatiotemporal features from trajectories and road networks, and can adaptively aggregate features from trajectory sequences and various road segments of the road network through a variety of different attention mechanisms; it includes an attention unit within a trajectory, an attention unit between trajectories, a conversion unit between a trajectory hypergraph and a road network spatiotemporal graph, and a time and space attention unit for the road network; wherein:

[0021] The attention unit inside the trajectory captures the temporal and spatial correlation between each trajectory point and the feature relationship of the entire trajectory through the attention mechanism. For the input trajectory hyperedge feature of the (l-1)th layer The internal attention is calculated as follows:

[0022]

[0023] in: is a learnable parameter of linear projection. The Softmax function is a commonly used activation function, mainly used in multi-classification problems; it converts a K-dimensional vector containing arbitrary real numbers into a probability distribution, that is, each element of the output vector is between 0 and 1, and the sum of all elements is 1.

[0024] FFNLN(x)=FFN(LN(x))+x, (8)

[0025] LN is a layer normalization operation on the tensor;

[0026] FFN(x)=ReLU(xW1+b1)W2+b2, (9)

[0027] It is a two-layer feedforward neural network. x is the input feature of the feedforward neural network, W1, b1, W2, b2 represent the learnable parameters of the linear projection in the feedforward neural network, and the ReLU function is an activation function that retains the positive value of each dimension in the vector and sets the negative value to 0.

[0028] The attention unit between the trajectories captures the spatiotemporal relationship between the hyperedges of each trajectory through the attention mechanism. In order to model the hyperedge features of each time, the trajectory set D is divided into P subsets D1, D2, ..., D according to the size of the time interval. P Then all the trajectory hyperedge features Also divided, get the vector representing the hyperedge feature of each trajectory and the vector representing the characteristics of the entire trajectory subset The details are as follows:

[0029]

[0030] The attention unit between trajectories includes two types of inter-super-edge attention mechanisms, namely, cross-super-edge attention in the same time interval and cross-super-edge attention across time intervals. Among them, the cross-super-edge attention in the same time interval mainly captures the complex spatiotemporal relationship between trajectories in each time interval. Under this attention mechanism, the feature vector is calculated for the trajectory set in the i-th time interval. as follows:

[0031]

[0032] in, are learnable parameters.

[0033] The cross-hyperedge attention module of different time intervals aims to calculate the spatiotemporal correlation of different time intervals. The feature vector of the trajectory of the i-th time interval under this attention mechanism is The calculation method is as follows:

[0034]

[0035] in, are learnable linear projection parameters.

[0036] Finally, for any trajectory τ, its overall hyperedge p in the hypergraph τ The spatiotemporal characteristics of It aggregates the results of multiple attention modules and inputs the results into the feedforward neural network, which is expressed as follows:

[0037]

[0038] The trajectory hypergraph and road network space-time graph conversion unit converts the trajectory features of the hypergraph space to the road network space-time graph through the association matrix Λ having the corresponding relationship between the trajectory set hypergraph and the road network space-time graph. The mean is calculated for the feature vectors of the nodes and edges of the space-time graph, and is assigned to each road section and the transfer edge between the road sections, as follows:

[0039]

[0040] Where X∈R P×N×d , The hypergraph features are projected onto the nodes and edges of the road network to obtain the corresponding node feature tensors and edge feature tensors; Represents a route from segment r j To section r k The connecting edge.

[0041] The temporal and spatial attention units of the road network capture the hypergraph-enhanced traffic semantics on the road network from the two aspects of spatial relationship and temporal relationship. When calculating the temporal attention, the feature relationship between each road segment in different time intervals is learned from the node feature X converted from the hypergraph structure to the road network structure. The temporal attention result for the i-th node is The calculation is as follows:

[0042]

[0043] in, are learnable parameters. X[:,i,:]∈RP×d Represents the hypergraph temporal features on the i-th road segment. Spatial attention learns the feature relationship between adjacent road segments from the node features X and edge features Ω mapped from the hypergraph to the road network. For the node spatial attention result in the t-th time interval The calculation is as follows:

[0044] 1≤t≤P,1≤i≤N,1≤j≤N,

[0045]

[0046] in, are learnable linear projection parameters, R d →R is the linear projection function, which will be at r at time t i and r j The edge feature tensor on α is projected into a value. ij It is a weight value, which indicates the weight when aggregating the features of other nodes in spatial attention.

[0047] The results of temporal attention and spatial attention on the road network are combined to obtain the road graph features. The details are as follows:

[0048]

[0049] (4) The speed prediction layer is used to effectively predict the traffic speed changes in the short term in the future by using the complex spatiotemporal relationships between the trajectory sets captured by the previous modules and the road network. Specifically, the temporal convolutional neural network regulated by the gating mechanism extracts the temporal features of the road section and combines the results of different attention layers to predict the future speed. The specific calculation is as follows:

[0050]

[0051] in, and Both represent one-dimensional convolutional layers, which are used to aggregate features of adjacent time in the time dimension. σ is an activation function in a neural network. W pred and b pred are learnable parameters of the linear projection.

[0052] Then the prediction results With the real speed Y∈R N×F Compare and train the model to approach the true value. The loss function of model training is

[0053]

[0054] Here, θ is the trainable parameter in the model and S is the number of samples in the training set.

[0055] The technical features of the present invention mainly include:

[0056] The present invention is based on the prediction of historical trajectory sets. It uses the historical trajectory data generated by vehicles traveling on the road network to predict traffic speed, overcoming the defects of the traditional static sensor method that relies on fixed sensor equipment. By constructing a trajectory set hypergraph, the system can capture the high-order spatiotemporal correlation in the road network, and use the hypergraph attention model to effectively extract spatiotemporal features related to traffic speed. The system integrates a variety of spatiotemporal attention mechanisms, including attention within the trajectory, attention between trajectories, and time and space attention on the road network, and can adaptively aggregate complex traffic semantic information. Finally, by establishing a feature conversion module between the road graph and the trajectory set hypergraph, the system can efficiently exchange features between the hypergraph space and the road network space to improve prediction accuracy.

[0057] The functional advantages of the present invention mainly include:

[0058] By making full use of historical trajectory data and a multi-level spatiotemporal attention mechanism, the system can achieve high-precision prediction of future traffic speeds to meet the actual needs of daily life and traffic management.

[0059] The system can process traffic data collected by dynamic sensors in real time, quickly generate prediction results, and provide support for real-time traffic management and scheduling. Finally, by introducing data enhancement and diversified attention mechanisms, the system has strong robustness, can cope with data noise and abnormal situations, and maintain stable prediction performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 It is a schematic diagram of the structure of the future traffic speed prediction system based on the historical trajectory set of the present invention.

[0061] Figure 2 Detailed schematic diagram of three historical sampling trajectories and eight covered road sections used by the traffic speed prediction system of the present invention. DETAILED DESCRIPTION

[0062] The present invention is further described below with reference to specific examples and accompanying drawings.

[0063] Figure 1The present invention provides a structural schematic diagram of a future traffic speed prediction system and method based on a historical trajectory set. One aspect of the invention provides a future traffic speed prediction system based on a historical trajectory set, the system comprising a trajectory set feature extraction module, a trajectory set hypergraph construction module, a hypergraph attention model module, and a traffic prediction layer module. The trajectory set feature extraction and enhancement module, the trajectory set hypergraph construction module, the hypergraph attention model module, and the traffic prediction layer module are sequentially connected in series to form a complete road network speed prediction system.

[0064] Figure 2 This is a schematic diagram of the three historically sampled trajectories and the 13 road sections involved in the future traffic speed prediction system proposed in the present invention. In this embodiment, there are 13 road sections; there are 3 vehicles driving on each road section, and the vehicle positioning sensor samples the trajectory information in real time. In this embodiment, there are 3 trajectories and 16 sampling points.

[0065] The trajectory set feature extraction and enhancement module processes the velocity and longitude and latitude information of the trajectory and performs data enhancement on the trajectory. It includes: a map matching unit, a trajectory information processing unit, and a trajectory point feature enhancement unit. The map matching unit processes the three input trajectories τ1, τ2 and τ3, and each point p i , find its corresponding road segment r on the road network through the map matching algorithm i For example, point p1 on trajectory τ1 corresponds to road segment r1. The trajectory point feature enhancement unit performs data enhancement on each trajectory. For example, for trajectory τ1 = (p1, ..., p5), two points p2 and p4 are randomly deleted, and the positions of the remaining p1, p3 and p5 are perturbed to obtain an enhanced trajectory τ'1. The trajectory information processing unit performs data enhancement on each point p i Calculate its speed and position information. For example, for p3, its position embedding vector is Its velocity vector is calculated as Where δ(p i-1 ,p i ) represents the distance between two points, W∈R 2×64 ,b∈R 64 are the parameters learned by the model.

[0066] The trajectory set hypergraph construction module constructs a hypergraph structure with trajectories as points, including a road network spatiotemporal graph construction unit, a trajectory point and road segment corresponding matrix construction unit, and a trajectory overall anchor point and road segment set corresponding matrix construction unit.

[0067] The road network space-time graph construction unit constructs a road network space-time graph and the spatiotemporal feature tensor The feature vector representation of each road segment in the past five short time intervals.

[0068] The trajectory point and road segment correspondence matrix construction unit is used to construct each point p in the trajectory. i The road segment r in the tth time interval in the road network space-time graph it passes through i,t Correspondingly, for example, if point p1 passes r2 in the second time interval, then in the association matrix Λ there is Λ[p1,R 2,2 ]=1.

[0069] The trajectory overall anchor point and the road segment correspondence matrix construction unit constructs a virtual anchor point p τ Corresponding to each road section in the road network space-time graph that the trajectory passes through, for example, for trajectory τ1, it passes through r2 in the second time interval, then in the association matrix Λ, there is Λ[τ1,R 2,2 ]=1.

[0070] The hypergraph attention model module is used to effectively extract the spatiotemporal features of trajectories and road networks. It includes the attention unit within the trajectory, the attention unit between trajectories, the conversion unit between the trajectory hypergraph and the spatiotemporal graph of the road network, and the time and space attention unit of the road network. Among them:

[0071] The attention unit inside the trajectory captures the temporal and spatial correlation between each trajectory point and the feature relationship of the entire trajectory through the attention mechanism. For the input trajectory hyperedge feature of the (l-1)th layer The internal attention can be calculated as follows:

[0072]

[0073] Among them, FFNLN(x)=FFN(LN(x))+x. LN is the layer normalization operation on the tensor. FFN(x)=ReLU(xW1+b1)W2+b2 is a two-layer feedforward neural network.

[0074] The attention unit between the trajectories captures the spatiotemporal relationship between the hyperedges of each trajectory through the attention mechanism. In order to model the hyperedge features of each time, the trajectory set D is divided into 5 subsets D1, D2, ..., D5 according to the divided time intervals. Then all the hyperedge features of the trajectory are Also divide it to get the vector representing the hyperedge feature of each trajectory and the vector representing the characteristics of the entire trajectory subset as follows:

[0075]

[0076] In this case, we can calculate

[0077] The attention unit between trajectories includes two types of hypergraph attention mechanisms, namely, cross-hyperedge attention in the same time interval and cross-hyperedge attention across time intervals. The cross-hyperedge attention in the same time interval can effectively capture the spatiotemporal correlation between trajectories at similar times. Under this attention mechanism, the feature vector of the trajectory set in the i-th time interval is It can be calculated as follows:

[0078]

[0079] Among them, this represents the learnable parameters of the linear projection. The purpose of the cross-hyperedge attention module for different time intervals is to calculate the spatiotemporal feature relationship between each time interval. Under this attention mechanism, the overall feature vector representing the i-th time interval is The calculation method is as follows:

[0080]

[0081] in, are learnable parameters.

[0082] Finally, for any trajectory τ, the spatiotemporal characteristics of its overall hyperedge pτ in the hypergraph are The results of multiple attention modules are aggregated and input into the feedforward neural network as shown below:

[0083]

[0084] In this case, there are

[0085]

[0086] The trajectory hypergraph and road network space-time graph conversion unit converts the trajectory features of the hypergraph space to the road network space-time graph through the association matrix Λ having the corresponding relationship between the trajectory set hypergraph and the road network space-time graph. The mean is calculated for the feature vectors of the nodes and edges of the space-time graph, and is assigned to each road section and the transfer edge between the road sections, as follows:

[0087]

[0088] In this case, we can get Assignment of .

[0089] Where X∈R 5×13×64 ,Ω∈R 5×20×64 The hypergraph features are projected onto the nodes and edges of the road network to obtain the corresponding node feature tensors and edge feature tensors.

[0090] The temporal and spatial attention units of the road network capture the hypergraph-enhanced traffic semantics on the road network from the two aspects of spatial relationship and temporal relationship. When calculating the temporal attention, the feature relationship between each road section in the five time intervals is learned from the node feature X converted from the hypergraph structure to the road network structure. The temporal attention result for the i-th node is The calculation is as follows:

[0091]

[0092] in, are learnable parameters. X[:,i,:]∈R 13×64 Represents the hypergraph temporal features on the i-th road segment. Spatial attention simultaneously learns the feature relationship between adjacent road segments from the node features X and edge features Ω mapped between the hypergraph and the road network. For the node spatial attention result in the t-th time interval The calculation is as follows:

[0093] 1≤t≤5,1≤i≤13,1≤j≤13

[0094]

[0095] The results of temporal attention and spatial attention on the road network are combined to obtain road graph features. The details are as follows:

[0096]

[0097] (4) Use the speed prediction layer to predict the traffic speed in the short term. The temporal convolutional neural network regulated by the gating mechanism extracts the temporal features of the road section, merges the results of different attention layers, and predicts the speed in the next five time intervals. The specific calculation is as follows:

[0098]

[0099] in, Then the prediction results With the real speed Y∈R 13×5 Compare and perform supervised learning. The loss function of model training is

[0100]

[0101] Where θ is a trainable parameter in the model. When the model is trained, the loss function Optimize and update the model parameters by gradient backpropagation. As the output result of the entire prediction system.

[0102] The real trajectory datasets and road network data of Shanghai and Chengdu were used as experimental objects for testing. Among them, the Shanghai dataset has a total of 1.13 million trajectories. The Chengdu dataset has a total of 1.26 million trajectories. The experiment selected 500 road sections in the core areas of the two cities for future speed prediction. This paper selected several advanced methods for comparison, namely

[0103] STGCN(YU B,YIN H,ZHU Z.Spatio-temporal graph convolutional networks:adeep learning framework for traffic forecasting[C] / / Proceedings of the 27thInternational Joint Conference on Artificial Intelligence.2018:3634-3640.),

[0104] ASTGCN(GUO S,LIN Y,FENG N,et al.Attention based spatial-temporalgraph convolutional networks for traffic flow forecasting[C] / / Proceedings of the 33th AAAI Conference on Artificial Intelligence:Vol.33.2019:922-929.)

[0105] and TWave (HUI B, YAN D, CHEN H, et al. Trajectory wavenet: A trajectory-based model for traffic forecasting[C] / / Proceedings of the IEEE International Conference on Data Mining. 2021:1114-1119.).

[0106] The task goal is to predict the average speed change of the road sections in the road network in the next 6 time intervals based on the historical trajectory information of the past 6 time intervals, where each time interval is 15 minutes. In terms of measurement, the experiment selected mean absolute percentage error (MAPE), mean absolute error (MAE) and root mean square error (RMSE), as well as their weighted versions WMAPE, WMAE and WRMSE as evaluation indicators. The following is a tabular statistical result of the experiment. It can be seen from the experimental results that the method of the present invention has achieved the best performance on two real data sets in Shanghai and Chengdu. This shows that the present invention fully extracts the complex spatiotemporal coupling relationship and traffic semantic information in historical trajectories and road networks, and effectively uses these spatiotemporal features to accurately predict future traffic change trends.

[0107]

Claims

1. A future traffic speed prediction system based on historical trajectory data, characterized in that: Use navigation and positioning equipment to collect dynamic traffic data - trajectory data generated by vehicles traveling on the road network; Consider each trajectory as a hyperedge and the entire trajectory set as a hypergraph, and build a hypergraph attention model based on the historical trajectory set; The model is used to effectively extract speed-related traffic features on the hypergraph and road network, so as to accurately predict the future changes in driving speed on different roads. The model integrates heterogeneous and complex traffic semantic information with the help of multiple spatiotemporal attention mechanisms. At the same time, a feature conversion relationship between the road graph and the trajectory set hypergraph is established, so that the features of the hypergraph space and the road network space can be efficiently exchanged to accurately predict future traffic speeds. Specifically, the system includes a trajectory set feature extraction and enhancement module, a trajectory set hypergraph construction module, a hypergraph attention model module, and a traffic prediction layer module. Among them: The trajectory set feature extraction and enhancement module is used to collect trajectory data generated by vehicles driving on the road network in the past short period of time, and preprocess and enhance the features of these vehicle trajectory data; the trajectory speed-related information processed by this module will be further passed to the attention model as the input feature of the model; here, the trajectory mainly refers to a discrete point sequence composed of GPS sampling points; the speed information mainly refers to the trajectory moving speed between the front and rear points of each trajectory point; the model input feature mainly refers to the vector representation of each point; The trajectory set hypergraph construction module is used to establish a trajectory set hypergraph to capture high-order spatiotemporal correlation relationships in the road network, thereby providing a correlation mapping reference between the hypergraph and the road network graph for the subsequent hypergraph attention model module; The hypergraph attention model module is used to process the feature relationship within the trajectory set, the feature relationship between trajectories, and the spatiotemporal relationship between road sections on the road network; and input the refined spatiotemporal features of the road network into the traffic prediction layer module; The traffic prediction layer module is used to integrate the road network features of different layers in the model and predict future traffic speed.

2. The future traffic speed prediction system based on historical trajectory data according to claim 1 is characterized in that: The trajectory set feature extraction and enhancement module includes a unit for performing map matching on the trajectory, a unit for processing the speed and longitude and latitude information of the trajectory, and a unit for performing data enhancement on the trajectory; wherein: The map matching unit is used to associate the GPS sampling points of the trajectory with specific sections on the road network; The information processing unit includes a function for determining the longitude and latitude position of each trajectory point, and a distance and speed calculation function for processing the speed and position information of each trajectory point; The data enhancement unit adopts a data enhancement strategy to perform a certain degree of noise interference on the trajectory points, change part of the trajectory information, and provide assistance for more stable learning of the subsequent model.

3. The future traffic speed prediction system based on historical trajectory data according to claim 2 is characterized in that: The trajectory set hypergraph construction module is used to construct a hypergraph structure with trajectories as points; it includes a road network spatiotemporal graph construction unit, a matrix construction unit corresponding to trajectory points and road sections, and a matrix construction unit corresponding to trajectory overall anchor points and road section sets; wherein: The road network spatiotemporal graph construction unit constructs a road network spatiotemporal feature tensor Represents the feature vector representation of each road segment in T time intervals in the past short period of time; N represents the number of road segments in the road network, and d represents the feature dimension of each road segment in the tensor at each time; The matrix construction unit corresponding to the trajectory points and the road sections is used to construct each point p in the trajectory. i The road segment r in the tth time interval in the road network space-time graph it passes through i,t Correspondingly, we construct the correlation matrix: The matrix construction unit corresponding to the overall anchor point of the trajectory and the road section constructs a virtual anchor point p τ Corresponding to each road section in the road network space-time graph that the trajectory passes through, that is, constructing the association matrix:

4. The future traffic speed prediction system based on historical trajectory data according to claim 3 is characterized in that: The hypergraph attention model module is used to extract the spatiotemporal features of trajectories and road networks; it includes an attention unit within the trajectory, an attention unit between trajectories, a trajectory hypergraph and road network spatiotemporal graph conversion unit, and a time and space attention unit of the road network; wherein: The attention unit inside the trajectory adaptively aggregates the spatiotemporal features between each trajectory point through the attention mechanism, and captures the feature relationship of the entire trajectory; for the input (l-1) layer trajectory hyperedge feature The internal attention is calculated as follows: in: is a learnable parameter of linear projection; the Softmax function is an activation function that converts a K-dimensional vector containing arbitrary real numbers into a probability distribution, that is, each element of the output vector is between 0 and 1, and the sum of all elements is 1; FFNLN(x)=FFN(LN(x))+x, (8) LN is a layer normalization operation on the tensor; FFN(x)=ReLU(xW1+b1)W2+b2, (9) is a two-layer feedforward neural network; x is the input feature of the feedforward neural network, W1, b1, W2, b2 represent the learnable parameters of the linear projection in the feedforward neural network, and the ReLU function is an activation function that retains the positive values ​​of each dimension in the vector and sets the negative values ​​to 0; The attention unit between the trajectories captures the spatiotemporal relationship between the hyperedges of each trajectory through the attention mechanism, and models the hyperedge features of each time; divides the historical trajectory set and the corresponding trajectory hyperedge features into subsets according to the P different time intervals; obtains the vector of each trajectory hyperedge feature and a vector representing the characteristics of the entire trajectory subset The details are as follows: The attention unit between trajectories includes two types of inter-super-edge attention mechanisms, namely, cross-super-edge attention in the same time interval and cross-super-edge attention across time intervals. The cross-super-edge attention in the same time interval can effectively capture the spatiotemporal correlation between trajectories at similar times. Under this attention mechanism, the feature vector is calculated for the trajectory set in the i-th time interval. as follows: in, is a learnable parameter; The purpose of the cross-hyperedge attention module in different time intervals is to calculate the spatiotemporal correlation between each time interval; under this attention mechanism, the overall feature vector of the trajectory of the i-th time interval is calculated as follows: in, are the parameters of the learnable linear projection; Finally, for any trajectory τ, its overall hyperedge p in the hypergraph τ The spatiotemporal characteristics of The results of multiple attention modules are aggregated and input into a feedforward neural network, which is expressed as follows: The trajectory hypergraph and road network spatiotemporal graph conversion unit converts the trajectory features of the hypergraph space to the road network spatiotemporal graph through the association matrix Λ having the corresponding relationship between the trajectory set hypergraph and the road network spatiotemporal graph; the spatiotemporal features on the hypergraph are calculated by calculating the mean of the feature vectors of the nodes and edges of the spatiotemporal graph, and assigning them to each road section and the transfer edge between the road sections, as follows: Where X∈R P×N×d , The hypergraph features are projected onto the nodes and edges of the road network to obtain the corresponding node feature tensors and edge feature tensors; Represents a route from segment r j To section r k The connecting edges of The temporal and spatial attention units of the road network capture the traffic semantics enhanced by the hypergraph on the road network from the two aspects of spatial relationship and temporal relationship respectively; when calculating the temporal attention, the feature relationship of each road section in different time intervals is learned from the node feature X converted from the hypergraph structure to the road network structure; the temporal attention result of the i-th node is The calculation is as follows: in, is a learnable parameter; X[:,i,:]∈R P×d Represents the hypergraph temporal features on the i-th road segment; spatial attention simultaneously learns the spatial feature relationship between road segments from the node features X and edge features Ω mapped between the hypergraph and the road network; for the node spatial attention result in the t-th time interval The calculation is as follows: 1≤t≤P,1≤i≤N,1≤j≤N, in, are learnable linear projection parameters, is a linear projection function that will be at r at time t i and r j The edge feature tensor on is projected into a value; α ij is a weight value, which indicates the weight of aggregating the features of other nodes in spatial attention; The results of temporal attention and spatial attention on the road network are combined to obtain the road graph features. The details are as follows:

5. The future traffic speed prediction system based on historical trajectory data according to claim 4 is characterized in that: The speed prediction layer is used to predict the traffic speed in the short term in the future. Specifically, the temporal convolutional neural network regulated by the gating mechanism extracts the temporal features of the road section and combines the results of different attention layers to predict the future speed. The specific calculation is as follows: in, and Both represent one-dimensional convolutional layers, which are used to aggregate the features of adjacent times in the time dimension; σ is an activation function in a neural network; W pred and b pred are the learnable parameters of the linear projection; Then the prediction results With the real speed Y∈R N×F Compare and train the model to approach the true value; the loss function of model training is Here, θ is all the trainable parameters in the entire model architecture, and S is the number of samples in the training set.

Citation Information

Patent Citations

  • Trajectory restoration system based on urban traffic road network

    CN116612631A

Cited By

  • Traffic network multi-mode perception abnormal event early warning method and system

    CN120088989A

  • Road advertisement putting method and system based on intelligent travel data

    CN120782493A