CN115641718A - Short-term traffic flow prediction method based on bayonet flow similarity and semantic association - Google Patents

Short-term traffic flow prediction method based on bayonet flow similarity and semantic association Download PDF

Info

Publication number
CN115641718A
CN115641718A CN202211299621.5A CN202211299621A CN115641718A CN 115641718 A CN115641718 A CN 115641718A CN 202211299621 A CN202211299621 A CN 202211299621A CN 115641718 A CN115641718 A CN 115641718A
Authority
CN
China
Prior art keywords
bayonet
traffic flow
node
road network
semantic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211299621.5A
Other languages
Chinese (zh)
Other versions
CN115641718B (en
Inventor
贾朝龙
何钰湄
王蓉
李暾
庞育才
段思睿
肖云鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN202211299621.5A priority Critical patent/CN115641718B/en
Publication of CN115641718A publication Critical patent/CN115641718A/en
Application granted granted Critical
Publication of CN115641718B publication Critical patent/CN115641718B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention belongs to the field of intelligent traffic management, and particularly relates to a short-term traffic flow prediction method based on bayonet flow similarity and semantic association; acquiring relevant attributes of traffic flow data, wherein the relevant attributes comprise a traffic flow characteristic matrix, multi-order neighbors and POI types; constructing a road network geographic map and a road network semantic map, respectively extracting the spatio-temporal characteristics of the road network geographic map and the road network semantic map by adopting a self-adaptive spatio-temporal GAT model, and dynamically fusing the two spatio-temporal characteristics to obtain a predicted value; the invention can dig and utilize the intrinsic information in similar traffic flow to dynamically capture the space-time characteristics of the road network, finally realize deeper digging of the space-time correlation between the related road section and the adjacent road section in the urban road network, and improve the accuracy of traffic flow prediction.

Description

Short-term traffic flow prediction method based on bayonet flow similarity and semantic association
Technical Field
The invention belongs to the field of intelligent traffic management, relates to traffic flow characteristic analysis, and particularly relates to a short-term traffic flow prediction method based on bayonet flow similarity and semantic association.
Background
The short-term traffic flow is one of the components of the intelligent traffic system, is an important guarantee for preventing traffic jam and is also a key technology for constructing the intelligent traffic system. By predicting the short-term traffic flow, a traffic department can better guide the traffic flow, the road congestion condition is relieved, and the road network operation efficiency is improved; the traveler can select the optimal travel route, and the travel cost is reduced.
In recent years, studies on short-term traffic flow prediction have been extensively conducted by scholars at home and abroad. At present, methods for predicting short-term traffic flow can be roughly divided into two categories: a statistical learning method for predicting a future traffic flow by performing mathematical statistical processing on a historical time series; the machine learning or deep learning method is used for mining the space-time characteristics in mass traffic data by constructing a machine learning model or a deep neural network model, so as to realize the prediction of short-term traffic flow in the future.
In the early short-term traffic flow prediction, because the traffic flow data volume is small and the acquisition path is difficult, the statistical learning method is mostly adopted for prediction, but only the historical time series of a certain position is considered. With the rise of the internet of things and the appearance of big data, deep learning becomes mainstream due to massive data, and great breakthrough is made in various fields of deep learning. The traffic prediction model constructed through deep learning not only considers the historical time sequence of the road, but also considers the spatial information and the external environment of the road.
Although short-term traffic flow prediction has achieved remarkable results and many scholars apply semantic processing to traffic flow prediction, the application of semantic technology to traffic flow prediction still has the following challenges:
1. how to dig the implication information of similar traffic flow roads in a road network. More distant road segments may have similar traffic flow patterns. Sequence similarity is measured by adopting Euclidean distance in a traditional excavation mode, and the characteristic of dynamic time lag of a traffic flow sequence is ignored. It is a challenge how to fully mine and utilize such similarity road segments.
2. How to capture the dynamic spatial dependence of the road to be predicted on the adjacent road. The spatial dependence degree of the same road section on the adjacent road sections in different time periods is different, and how to simultaneously capture the space-time correlation of each road section in different time intervals still remains a challenge.
3. How to assign the influence weight of the multi-graph feature matrix on the prediction result. The influence degrees of different feature matrixes on the flow prediction are different, and the influence weight dynamically changes along with the time. It is a challenge how to dynamically blend some potential influences with the direct influence of the road traffic to be predicted.
Disclosure of Invention
In order to solve the problems, the invention provides a short-time traffic flow prediction method based on bayonet flow similarity and semantic association, which is characterized by comprising the following steps of:
s1, obtaining a road network geographic map of a target area where a target gate is located and traffic flow data of the road network geographic map through a data query API provided by an enterprise or directly downloading an existing data source, and preprocessing the road network geographic map;
s2, extracting internal attributes and external attributes of the preprocessed traffic flow data; the internal attribute comprises a traffic flow characteristic matrix and multi-order neighbor information, and the external attribute is a POI type;
s3, obtaining similar bayonet nodes of each first-order neighbor of the target bayonet according to a DTW method, and performing position replacement on each first-order neighbor and the corresponding similar bayonet node to obtain a road network semantic graph of the target bayonet based on a spatial structure of a road network geographic graph;
s4, constructing a self-adaptive space-time GAT model, and extracting geographic space-time characteristics of a road network geographic map and semantic space-time characteristics of a road network semantic map through the self-adaptive space-time GAT model; the self-adaptive space-time GAT model comprises a space capturing layer number calculating module, a self-attention layer and a Bi-LSTM module;
s5, processing the geographic space-time characteristics through the first full connection layer to obtain geographic characteristics, and processing the semantic space-time characteristics through the second full connection layer to obtain semantic characteristics;
and S6, fusing the geographic characteristics and the semantic characteristics through the weight distribution full-connection layer, and outputting the traffic flow predicted value of the target gate.
Further, obtaining basic graph structure information G of the road network geographic graph g (V g ,E g ,A g ),V g ={v 1 ,v 2 ,...,v N Expressing a bayonet node set in the road network geographic graph; e g Representing a set of edges in a road network geographic graph;
Figure BDA0003903946210000031
a contiguous matrix is represented that is,
Figure BDA0003903946210000032
representing a bayonet node v i Node v with bayonet j Are directly connected in the geographic space and are connected with each other,
Figure BDA0003903946210000033
representing a bayonet node v i Node v with bayonet j Not directly connected in geographic space.
Further, after preprocessing historical traffic flow data in the target area, extracting traffic flow information of all bayonet nodes in the target area at different time steps, and constructing a traffic flow feature matrix X = [ X = [ ] 1 ,X 2 ,...,X T ,...,X P ]Wherein
Figure BDA0003903946210000034
N is the number of bayonet nodes in the target region, P is the number of time steps, X T Representing the traffic flow of N checkpoint nodes at time step T,
Figure BDA0003903946210000035
representBayonet node v i Traffic flow at time step T;
according to the geographical position information, the distance checkpoint node v i One-hop bayonet node is called as bayonet node v i The first-order neighbor of (1) will be away from the bayonet node v i Two-hop bayonet node is called as bayonet node v i The second-order neighbor of (2) and so on, and the distance bayonet node v i The bayonet node of K hops is called the bayonet node v i K order neighbors of (1);
the POI data are divided into 10 POI types according to different influence degrees of the POI data on traffic flow, and are numbered according to the sequence of numbers 1-10, and are sequentially education, catering, medical treatment, transportation, accommodation, office, scenic spot, shopping, life service and other types; and determining the POI type corresponding to the bayonet according to the POI type with the largest proportion of the periphery of the bayonet.
Further, the process of constructing the road network semantic graph of the target checkpoint comprises the following steps:
s11, forming a second bayonet set by all bayonet nodes except a target bayonet and first-order neighbors thereof in the road network geographic map;
s12, randomly selecting a first-order neighbor from a first-order neighbor set of a target gate as a first gate;
s13, calculating the similarity of all bayonet nodes in the first bayonet and the second bayonet set according to a DTW method, and selecting the bayonet node corresponding to the maximum similarity as a similar bayonet node of the first bayonet;
s14, exchanging the positions of the first bayonet and similar bayonet nodes in the road network geographic map to obtain a position exchange map;
s15, judging whether a first-order neighbor does not perform position exchange or not, if so, taking the first-order neighbor as a first bayonet and returning to the step S13; if not, the current position exchange graph is used as the road network semantic graph of the target gate.
Further, the process of extracting the geographic space-time features of the target checkpoint in the road network geographic map through the adaptive space-time GAT model in the step S4 includes:
s41, the flow attraction rate of each POI type is different at 24 hours a day, so that a POI flow attraction matrix P is constructed, and is expressed as:
Figure BDA0003903946210000041
wherein the content of the first and second substances,
Figure BDA0003903946210000042
represents the traffic attraction rate of the 1 st POI type at 24 hours;
s42, in a space capturing Layer number calculating module, calculating the Layer number Layer of a space capturing Layer according to the POI flow attraction matrix and the multi-order neighbor weight table;
s43, forming a neighbor node set from first-order neighbors of the target gate to Layer-order neighbors, calculating an attention coefficient of each node in the neighbor node set in a self-attention Layer, and performing weighted summation to obtain the geographic spatial characteristics of the target gate;
and S44, dividing the space characteristics into a plurality of sequence pieces in a time sequence, and acquiring the geographical space-time characteristics of the target gate through a Bi-LSTM module.
Further, calculating the number Layer of the spatial capturing Layer through the POI traffic attraction matrix and the multi-order neighbor weight table, and expressing that:
Figure BDA0003903946210000043
wherein LW i Representing the weights of the neighbors of the ith order,
Figure BDA0003903946210000044
denotes POI traffic attraction for the jth i-th neighbor in ith order, and n denotes the total number of i-th neighbors in ith order.
Further, the geographic features and the semantic features are fused through weight distribution of the full-link layer, and the method is represented as follows:
Figure BDA0003903946210000045
wherein y represents a traffic flow prediction value, FC () represents a weight distribution full link layer, W g The geographic weight is represented by a geographic weight,
Figure BDA0003903946210000046
representing a geographical feature, W s The weight of the semantic meaning is represented,
Figure BDA0003903946210000047
representing semantic features.
The invention has the beneficial effects that:
aiming at the prediction problem of short-term traffic flow, the invention constructs a road network semantic graph by context-based semantic processing, calculates the number of layers of spatial feature extraction by a self-adaptive space-time GAT component (self-adaptive space-time GAT model), and finally realizes dynamic fusion features by combining real-time traffic flow of roads. The global bayonet flow is utilized when the semantic graph is constructed, so that the constructed road semantic graph has certain global characteristics, the accuracy of a prediction result can be improved, and the overfitting of the prediction result can be reduced; in the previous layer number extraction of the spatial features, the characteristic that the spatial features at different time are different is ignored, and the adaptive space-time GAT component can calculate the spatial features at different time periods by utilizing the POI attribute influence, so that the dynamic extraction of the spatial features is realized; when the characteristics are fused, aiming at short-time traffic flow prediction, the traffic flow at the next moment is greatly influenced by the current moment, and the prediction can be more accurately completed by combining the characteristic fusion of real-time flow. The method can be used for mining and utilizing the intrinsic information in similar traffic flow to dynamically capture the space-time characteristics of the road network, finally realizing deeper mining of the space-time correlation between the relevant road sections and the adjacent road sections in the urban road network, and accurately predicting the traffic flow in the next time period in real time.
Drawings
FIG. 1 is a schematic view of a short-term traffic flow prediction framework of the present invention;
FIG. 2 is a DTW matrix according to an embodiment of the invention;
FIG. 3 is a road network semantic graph construction flow chart according to the embodiment of the present invention;
fig. 4 is a flow chart of the short-term traffic flow prediction method of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a short-term traffic flow prediction method based on bayonet flow similarity and semantic association, which is characterized in that similar flow road information is mined in a road network geographic map to construct a road network semantic map, a self-adaptive space-time GAT method is designed to dynamically extract space-time characteristics of the road network geographic map and the road network semantic map, the two space-time characteristics are dynamically fused, and accurate prediction of future short-term traffic flow is realized. The invention mainly comprises three parts:
a first part: and acquiring a data source, wherein the data source can be directly acquired from the data record of the electronic card port provided in the enterprise.
A second part: and extracting relevant attributes, namely extracting the relevant attributes from the adjacency relation of all the bayonets in the area, the geographical longitude and latitude of the bayonets and the historical flow of all the bayonets.
And a third part: traffic flow prediction, namely constructing a road network geographic graph to capture local spatial dependence, constructing a road network semantic graph through relevant attributes to capture global spatial dependence, and designing a self-adaptive space-time GAT (generic object transform) method to extract geographic space-time characteristics of the road network geographic graph and semantic space-time characteristics of the road network semantic graph; and dynamically fusing geographical space-time characteristics and semantic space-time characteristics based on a convolutional neural network, and finally realizing traffic flow prediction of the road to be predicted.
In an embodiment, as shown in fig. 1 and 4, a method for predicting short-term traffic flow based on intersection flow similarity and semantic association specifically includes:
s1, obtaining a road network geographic map of a target area where a target gate is located and traffic flow data of the road network geographic map through a data query API provided by an enterprise or directly downloading an existing data source, and preprocessing the road network geographic map;
specifically, the preprocessing of the traffic flow data includes deleting duplicate data, cleaning invalid information, and the like. The raw data that is usually acquired is unstructured and cannot be used directly for data analysis, and most unstructured data can be structured by simple data cleansing.
S2, extracting internal attributes and external attributes of the preprocessed traffic flow data; the internal attribute comprises a traffic flow characteristic matrix and a multi-order neighbor, and the external attribute is a POI type;
in traffic flow prediction, the traffic flow of a road is influenced by various factors, wherein the time characteristic of the historical flow of the road and the spatial characteristic of a road structure are key factors for prediction; meanwhile, surrounding functional areas of roads, POI types, weather, traffic accidents and the like also have certain influence on traffic flow prediction. Based on this, consideration is made herein for both internal and external attributes.
S3, obtaining similar bayonet nodes of each first-order neighbor of the target bayonet according to a DTW method, and performing position replacement on each first-order neighbor and the corresponding similar bayonet node based on a spatial structure of a road network geographic map to obtain a road network semantic map of the target bayonet;
s4, extracting geographic space-time characteristics of a road network geographic map and semantic space-time characteristics of a road network semantic map through a self-adaptive space-time GAT model;
s5, processing the geographic space-time characteristics through a first full connection layer to obtain geographic characteristics, and processing the semantic space-time characteristics through a second full connection layer to obtain semantic characteristics;
and S6, fusing the geographic characteristics and the semantic characteristics through the weight distribution full-connection layer, and outputting the traffic flow predicted value of the target gate.
In an embodiment, first, related information of a target area where a target gate is located is obtained, a road network geographic map is constructed according to geographic position information of all gate nodes (including the target gate) in the target area, and basic map structure information of the road network geographic map is represented as G g (V g ,E g ,A g ) Wherein V is g ={v 1 ,v 2 ,...,v N Representing a bayonet node set in a road network geographic graph; e g Representing a set of edges in a road network geographic graph;
Figure BDA0003903946210000071
a contiguous matrix is represented that is,
Figure BDA0003903946210000072
representing a bayonet node v i Node v with bayonet j Are directly connected in the geographic space and are connected with each other,
Figure BDA0003903946210000073
representing a bayonet node v i Node v with bayonet j Not directly connected in geographic space. And meanwhile, traffic flow data of each gate node in the road network geographic map is obtained and preprocessed.
And extracting relevant attributes from the preprocessed historical traffic flow data.
Specifically, internal attributes, which include traffic flow feature matrices and multi-order neighbor information, begin.
1. A traffic flow characteristic matrix:
extracting traffic flow information of all bayonet nodes in the target area at different time steps, and constructing a traffic flow characteristic matrix X = [ X = [ [ X ] 1 ,X 2 ,...,X T ,...,X P ]Wherein
Figure BDA0003903946210000074
N is the number of bayonet nodes in the target region, P is the number of time steps, X T Representing the traffic flow of N checkpoint nodes at time step T,
Figure BDA0003903946210000075
representing a bayonet node v i The traffic flow at time step T.
2. Multi-order neighbor information
Distance gate node v according to geographical position information of each gate node in road network geographical graph i One hop (i.e. node v with bayonet) i Directly connected) bayonet node is called as bayonet node v i The first-order neighbor of (1) will be away from the bayonet node v i Two-hop bayonet node is called as bayonet node v i The second-order neighbors of (2) and so on, and the distance bayonet node v i The bayonet node which is K hops is called as a bayonet node v i K order neighbors of (1).
Secondly, extracting external attributes, namely determining the POI type of each bayonet node, wherein the external attributes comprise:
the POI data are divided into 10 POI types according to different influence degrees of the POI data on traffic flow, the POI types are numbered according to the sequence of numbers 1-10, and the corresponding relations in sequence are 1-education type, 2-catering type, 3-medical type, 4-traffic type, 5-accommodation type, 6-office type, 7-scenic spot type, 8-shopping type, 9-life service type and 10-other type; and determining the POI type corresponding to the checkpoint according to the POI type with the largest checkpoint periphery proportion.
Aiming at the road network geographic graph constructed in the prior art and used for capturing the local spatial dependence, a road network semantic graph is further constructed to capture the global spatial dependence. The road network semantic graph is constructed according to the following principle:
if two bayonets 1 and 2 exist, and from the viewpoint of geographical location information, bayonets 1 and 2 are not connected and are far apart from each other, but bayonets 1 and 2 have similar traffic flow characteristics, the road network semantic graph can be constructed by using the similarity of the two, so as to capture the global flow characteristics.
In an embodiment, as shown in fig. 3, the process of constructing the road network semantic graph of the target checkpoint includes:
s11, forming a second bayonet set by all bayonet nodes except a target bayonet and first-order neighbors thereof in the road network geographic map;
s12, randomly selecting a first-order neighbor from a first-order neighbor set of a target gate as a first gate;
s13, calculating the similarity of all bayonet nodes in the first bayonet and the second bayonet set according to a DTW method, and selecting the bayonet node corresponding to the maximum similarity as a similar bayonet node of the first bayonet;
s14, exchanging the positions of the first gate and similar gate nodes in the road network geographic map to obtain a position exchange map;
specifically, as shown in fig. 3, when the position of the first bayonet a is exchanged with the similar bayonet node a ', the spatial structure of the road network geographical map is not changed, and the edges are not reduced or increased, but the similar bayonet node a ' refers to the position of the first bayonet a, so that the first-order neighbor of the target bayonet, which is originally the edge where the target bayonet is connected with the first bayonet a, is replaced with the edge where the target bayonet is connected with the similar bayonet node a '.
S15, judging whether a first-order neighbor does not perform position exchange or not, if so, taking the first-order neighbor as a first bayonet and returning to the step S13; if not, the current position exchange graph is taken as the road network semantic graph G of the target gate s =(V s ,E s ,A s )。
Specifically, for similarity judgment of the gate, different functional areas are generated in the city due to different POI functions, and areas with similar functions often have similar traffic modes. In order to capture traffic flow similarity between the bayonets, a DTW algorithm is introduced to calculate a similarity coefficient Sim between the traffic flows of the bayonets, and the larger the numerical value is, the more similar the similarity is.
Figure BDA0003903946210000091
Where sim (i, j) represents the bayonet node v i Node v with bayonet j Inter-traffic pattern similarity coefficient, DTW (v) i ,v j ) Representing a bayonet node v i Node v with bayonet j The DTW distance of (1); the DTW is selected for similarity determination because it can self-align the time series to obtain stronger traffic pattern similarity. The calculation of the DTW distance is the calculation of the accumulated distance, wherein the basic distance is calculated as the Euclidean distance, and the calculation formula is as follows:
Dis(x i ,y j )=|x i -y j |
with bayonet node v i And v j Taking the traffic flow sequence x = {3,1,4,3,5,4} and y = {2,6,2,7,2,5} as an example, calculating the distance between each point in two traffic flow sequences generates a DTW distance matrix as shown in fig. 2, and the number in the matrix is the distance between the ith point in x and the jth point in y, namely Dtw (x is the distance between the ith point in x and the jth point in y) i ,y j ) And finding a DTW path in the DTW matrix, wherein the sum of all numbers in the DTW path is the DTW distance. The process of calculating each distance in the DTW matrix is divided into four cases, and the following 4 calculation formulas are provided:
distance calculation formula of origin position: dtw (x) 0 ,y 0 )=Dis(x 0 ,y 0 )
Distance by x-axis calculation formula: dtw (x) i ,y 0 )=Dis(x i ,y 0 )+Dtw(x i-1 ,y 0 )
Distance by y-axis calculation formula: dtw (x) 0 ,y j )=Dis(x 0 ,y j )+Dtw(x 0 ,y j-1 )
Distance calculation formula for the remaining positions:
Figure BDA0003903946210000092
Figure BDA0003903946210000093
specifically, x 0 =3 and y 0 =2 as the origin, and the distance between the two is Dtw (x) using the distance calculation formula of the origin position 0 ,y 0 )=Dis(x 0 ,y 0 )=1,x 1 =1 and y 0 =2 as point to x-axis, calculated as Dtw (x) using the equation 1 ,y 0 )=Dis(x 1 ,y 0 )+Dtw(x 0 ,y 0 )=1+1=2。
And extracting the geographic space-time characteristics of the road network geographic map and the semantic space-time characteristics of the road network semantic map through a self-adaptive space-time GAT model. The self-adaptive space-time GAT model totally comprises 3 parts, namely, the number of GAT network layers (the number of space capturing layers) at different moments is dynamically extracted by using a self-adaptive function, the attention coefficients of peripheral bayonet nodes to be predicted bayonet nodes are calculated by adopting a self-attention layer to obtain spatial features, the spatial features are input into a Bi-LSTM module to extract time features, and finally, the joint extraction of space-time features is realized.
In one embodiment, the process of extracting the geographical spatio-temporal features of the target bayonet in the road network geographical graph through the adaptive spatio-temporal GAT model comprises the following steps:
s21, the traffic attraction rate of each POI type is different at 24 hours a day, so that a POI traffic attraction matrix P is constructed, and is expressed as:
Figure BDA0003903946210000101
wherein the content of the first and second substances,
Figure BDA0003903946210000102
indicating the flow attraction rate of the 1 st POI type at 24 hours.
S22, calculating a multi-neighbor weight table of the target gate, wherein the multi-neighbor weights are obtained by comparing a plurality of groups of random seed results, and are shown in table 1:
TABLE 1 Multi-order neighbor weight Table
Ith order neighbor 1 2 3 4
Magnitude of i-order neighbor weight 1.0 0.7 0.7 0.6
S23, in order to capture the dynamic dependency relationship of the space in different time, designing an adaptive function to calculate the Layer number Layer of the space capture Layer through a POI flow attraction matrix and a multi-order neighbor weight table, wherein the calculation formula is as follows:
Figure BDA0003903946210000111
wherein LW i Representing the weights of the neighbors of the ith order,
Figure BDA0003903946210000112
denotes POI traffic attraction for the jth i-th neighbor in ith order, and n denotes the total number of i-th neighbors in ith order.
Specifically, the POI traffic attraction rate of each POI type is different at different time periods, so that the calculated number of layers of the spatial capturing layer is different; when the traffic flow of the target gate at the next time K needs to be predicted, it is required to firstly determine which small time period of 24 hours the next time K belongs to, and then calculate the number of spatial capturing layers corresponding to the next time to be predicted by adopting the POI flow attraction rate of each POI type corresponding to the small time period.
And S24, forming a neighbor node set from the first-order neighbor of the target gate to the Layer-order neighbor, calculating the attention coefficient of each node in the neighbor node set in the self-attention Layer, and performing weighted summation to obtain the geographic space characteristics of the target gate.
The contribution degree of the surrounding bayonet nodes to the flow of the target bayonet node is different. Therefore, the self-attention layer is adopted in the self-adaptive space-time GAT model to solve the attention coefficient of the peripheral bayonet nodes to the target bayonet node, and the final characteristic value of the target bayonet node is obtained through weighted summation.
In one embodiment, a learnable weight matrix W is used in the self-attention layer Q 、W K 、W V To calculate the bayonet node v linearly i The corresponding query, key, value matrices, respectively denoted as Q i 、K i And V i (ii) a Then calculating a bayonet node v i Attention coefficient alpha of surrounding bayonet nodes to the node ij The specific calculation is as follows:
Figure BDA0003903946210000113
finally, weighting and summing the characteristics according to the calculated attention coefficient to obtain a bayonet node v i Spatial feature Z of i Expressed as:
Figure BDA0003903946210000114
wherein N is i Representing a bayonet node v i Set of neighbor nodes of, V j Representing a bayonet node v j The node characteristics of (1).
And finally constructing a Bi-LSTM module for capturing long-term time characteristics, which mainly comprises the steps of dividing a final characteristic value into a plurality of sequence pieces in a time sequence, respectively inputting the sequence pieces into a forward LSTM according to a time forward sequence and inputting the sequence pieces into a reverse LSTM according to a time reverse sequence in order to capture context information simultaneously, thereby realizing the extraction of the time characteristics.
The method captures respective space-time characteristics of the road network geographic graph and the road network semantic graph. Due to the structural difference of the graphs, aiming at the road network semantic graph, the model only captures the spatial characteristics of the first layer, the number of the road network geographic graph spatial information capturing layers is calculated according to the self-adaptive function, and the capturing result of the obtained space-time characteristics is the geographic space-time characteristics and the semantic space-time characteristics.
Aiming at the fusion of the space-time characteristics of the road network geographic graph and the road network semantic graph, the influence of the road network geographic graph and the road network semantic graph on the flow prediction is different, and the accuracy of a final predicted value is influenced by taking the mean value or directly splicing. Therefore, different weights need to be allocated to the space-time characteristics of the two, and in short-time traffic flow prediction, the traffic flow in the previous time period to be predicted, which has the largest influence on the traffic flow to be predicted in the next time step, is to be predicted, so the weights are allocated to the traffic flow in combination with the real-time flow. The method comprises the following specific steps:
respectively constructing fully-connected network layer calculation for the geographic space-time characteristics and semantic space-time characteristics extracted from the road network geographic map and the road network semantic map; the geographic space-time characteristics are processed through the first full connection layer to obtain geographic characteristics, the semantic space-time characteristics are processed through the second full connection layer to obtain semantic characteristics, and the semantic characteristics are expressed as follows:
Figure BDA0003903946210000121
Figure BDA0003903946210000122
wherein the content of the first and second substances,
Figure BDA0003903946210000123
a representation of a geographical feature or features of the scene,
Figure BDA0003903946210000124
representing a geographical space-time characteristic, FC g () A first fully-connected layer is shown,
Figure BDA0003903946210000125
the representation of the semantic features is carried out,
Figure BDA0003903946210000126
representing semantic spatio-temporal features, FC s () Representing a second fully connected layer.
And finally, constructing a fully-connected layer with trainable weight parameters, distributing weights for the geographic features and the semantic features, and outputting a traffic flow predicted value, wherein the weight is expressed as:
Figure BDA0003903946210000127
wherein, yDenotes a traffic flow prediction value, FC (denotes a weight distribution full-link layer, W) g A geographical weight is represented that is representative of the geographical weight,
Figure BDA0003903946210000128
representing a geographical feature, W s The semantic weight is represented by a weight of the semantic,
Figure BDA0003903946210000129
representing semantic features, geographic feature weights W g And semantic feature weight W s The method is obtained by calculation by combining back propagation with real-time flow.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (7)

1. A short-time traffic flow prediction method based on bayonet flow similarity and semantic association is characterized by comprising the following steps:
s1, obtaining a road network geographic map of a target area where a target gate is located and traffic flow data of the road network geographic map through a data query API provided by an enterprise or directly downloading an existing data source, and preprocessing the road network geographic map;
s2, extracting internal attributes and external attributes of the preprocessed traffic flow data; the internal attribute comprises a traffic flow characteristic matrix and multi-order neighbor information, and the external attribute is a POI type;
s3, obtaining similar bayonet nodes of each first-order neighbor of the target bayonet according to a DTW method, and performing position replacement on each first-order neighbor and the corresponding similar bayonet node to obtain a road network semantic graph of the target bayonet based on a spatial structure of a road network geographic graph;
s4, constructing a self-adaptive space-time GAT model, and extracting geographic space-time characteristics of a road network geographic map and semantic space-time characteristics of a road network semantic map through the self-adaptive space-time GAT model; the self-adaptive space-time GAT model comprises a space capturing layer number calculating module, a self-attention layer and a Bi-LSTM module;
s5, processing the geographic space-time characteristics through the first full connection layer to obtain geographic characteristics, and processing the semantic space-time characteristics through the second full connection layer to obtain semantic characteristics;
and S6, fusing the geographic characteristics and the semantic characteristics through the weight distribution full-connection layer, and outputting the traffic flow predicted value of the target gate.
2. The short-term traffic flow prediction method based on Bayonet flow similarity and semantic association as claimed in claim 1, wherein the basic graph structure information G of the road network geographic graph is obtained g (V g ,E g ,A g ),V g ={v 1 ,v 2 ,...,v N Expressing a bayonet node set in the road network geographic graph; e g Representing a set of edges in a road network geographic graph;
Figure FDA0003903946200000011
a matrix of adjacency is represented by a matrix of adjacency,
Figure FDA0003903946200000012
representing a bayonet node v i Node v with bayonet j Are directly connected in the geographic space and are connected with each other,
Figure FDA0003903946200000013
representing a bayonet node v i Node v with bayonet j Not directly connected in geographic space.
3. The short-time traffic flow prediction method based on intersection flow similarity and semantic correlation according to claim 1, characterized in that after historical traffic flow data in a target region are preprocessed, traffic flow information of all intersection nodes in the target region at different time steps is extracted, and a traffic flow feature matrix X = [ X ] is constructed 1 ,X 2 ,...,X T ,...,X P ]Wherein
Figure FDA0003903946200000021
N is the number of bayonet nodes in the target region, P is the number of time steps, X T Traffic flow representing N checkpoint nodes at time step T, xi T Representing a bayonet node v i Traffic flow at time step T;
according to the geographical position information, the distance checkpoint node v i One-hop bayonet node is called as bayonet node v i First order neighbors of (c), will be from the bayonet node v i Two-hop bayonet node is called as bayonet node v i The second-order neighbors of (2) and so on, and the distance bayonet node v i The bayonet node which is K hops is called as a bayonet node v i K order neighbors of (1);
the POI data are divided into 10 POI types according to different influence degrees of the POI data on the traffic flow, and are numbered according to the sequence of numbers from 1 to 10, and are sequentially an education type, a catering type, a medical type, a traffic type, an accommodation type, an office type, a scenic spot type, a shopping type, a life service type and other types; and determining the POI type corresponding to the checkpoint according to the POI type with the largest checkpoint periphery proportion.
4. The short-term traffic flow prediction method based on traffic flow similarity and semantic association of the bayonet according to claim 1, wherein the process of constructing the road network semantic graph of the target bayonet comprises the following steps:
s11, forming a second bayonet set by all bayonet nodes except a target bayonet and first-order neighbors thereof in the road network geographic map;
s12, randomly selecting a first-order neighbor from a first-order neighbor set of a target gate as a first gate;
s13, calculating the similarity of all bayonet nodes in the first bayonet and the second bayonet set according to a DTW method, and selecting the bayonet node corresponding to the maximum similarity as a similar bayonet node of the first bayonet;
s14, exchanging the positions of the first gate and similar gate nodes in the road network geographic map to obtain a position exchange map;
s15, judging whether a first-order neighbor does not perform position exchange or not, if so, taking the first-order neighbor as a first bayonet and returning to the step S13; if not, the current position exchange graph is used as the road network semantic graph of the target gate.
5. The method for predicting the short-term traffic flow based on traffic flow similarity and semantic association of the bayonets as claimed in claim 1, wherein the step S4 of extracting the geographic spatiotemporal features of the target bayonets in the road network geographic map by the adaptive spatiotemporal GAT model comprises the following steps:
s41, the flow attraction rate of each POI type is different at 24 hours a day, so that a POI flow attraction matrix P is constructed, and is expressed as:
Figure FDA0003903946200000031
wherein, the first and the second end of the pipe are connected with each other,
Figure FDA0003903946200000032
represents the traffic attraction rate of the 1 st POI type at 24 hours;
s42, in a space capturing Layer number calculating module, calculating the Layer number Layer of a space capturing Layer according to the POI flow attraction matrix and the multi-order neighbor weight table;
s43, forming a neighbor node set from first-order neighbors of the target gate to Layer-order neighbors, calculating an attention coefficient of each node in the neighbor node set in a self-attention Layer, and performing weighted summation to obtain the geographic spatial characteristics of the target gate;
and S44, dividing the space characteristics into a plurality of sequence pieces in a time sequence, and acquiring the geographical space-time characteristics of the target gate through a Bi-LSTM module.
6. The short-time traffic flow prediction method based on bayonet flow similarity and semantic association as claimed in claim 1, characterized in that, the number of layers Layer of the space capturing Layer is calculated by the POI flow attraction matrix and the multi-order neighbor weight table, and is expressed as:
Figure FDA0003903946200000033
wherein, LW i Representing the weights of the neighbors of the ith order,
Figure FDA0003903946200000034
represents the POI traffic attraction rate for the jth i-th neighbor in order i, and n represents the total number of i-th neighbors in order i.
7. The short-time traffic flow prediction method based on bayonet flow similarity and semantic association as claimed in claim 1, characterized in that the geographic features and semantic features are fused by weight distribution full-link layer, and expressed as:
Figure FDA0003903946200000035
wherein y represents a traffic flow prediction value, FC () represents a weight distribution full link layer, W g The geographic weight is represented by a geographic weight,
Figure FDA0003903946200000041
representing a geographical feature, W s The semantic weight is represented by a weight of the semantic,
Figure FDA0003903946200000042
representing semantic features.
CN202211299621.5A 2022-10-24 2022-10-24 Short-time traffic flow prediction method based on bayonet flow similarity and semantic association Active CN115641718B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211299621.5A CN115641718B (en) 2022-10-24 2022-10-24 Short-time traffic flow prediction method based on bayonet flow similarity and semantic association

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211299621.5A CN115641718B (en) 2022-10-24 2022-10-24 Short-time traffic flow prediction method based on bayonet flow similarity and semantic association

Publications (2)

Publication Number Publication Date
CN115641718A true CN115641718A (en) 2023-01-24
CN115641718B CN115641718B (en) 2023-12-08

Family

ID=84944471

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211299621.5A Active CN115641718B (en) 2022-10-24 2022-10-24 Short-time traffic flow prediction method based on bayonet flow similarity and semantic association

Country Status (1)

Country Link
CN (1) CN115641718B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116884222A (en) * 2023-08-09 2023-10-13 重庆邮电大学 Short-time traffic flow prediction method for bayonet nodes
CN117437786A (en) * 2023-12-21 2024-01-23 速度科技股份有限公司 Real-time traffic flow prediction method based on artificial intelligence for traffic network

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110160987A1 (en) * 2009-12-28 2011-06-30 Nec (China) Co., Ltd. Method and apparatus for processing traffic information based on intersections and sections
CN107170235A (en) * 2017-06-13 2017-09-15 广东石油化工学院 The traffic flow forecasting timing method of network is extracted based on depth characteristic
CN109767622A (en) * 2019-02-14 2019-05-17 重庆邮电大学 The traffic flow forecasting method with Recognition with Recurrent Neural Network is divided towards bayonet similitude
CN112365708A (en) * 2020-09-29 2021-02-12 西北大学 Scenic spot traffic volume prediction model establishing and predicting method based on multi-graph convolution network
CN113112792A (en) * 2021-03-29 2021-07-13 华南理工大学 Multi-module traffic intensity prediction method based on semantic information
CN113160563A (en) * 2021-03-31 2021-07-23 西安交通大学 Short-time road condition prediction method, system and equipment based on historical road conditions
KR20220005353A (en) * 2020-07-06 2022-01-13 세종대학교산학협력단 Method and apparatus for urban traffic network modeling with multiple cctv videos

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110160987A1 (en) * 2009-12-28 2011-06-30 Nec (China) Co., Ltd. Method and apparatus for processing traffic information based on intersections and sections
CN107170235A (en) * 2017-06-13 2017-09-15 广东石油化工学院 The traffic flow forecasting timing method of network is extracted based on depth characteristic
CN109767622A (en) * 2019-02-14 2019-05-17 重庆邮电大学 The traffic flow forecasting method with Recognition with Recurrent Neural Network is divided towards bayonet similitude
KR20220005353A (en) * 2020-07-06 2022-01-13 세종대학교산학협력단 Method and apparatus for urban traffic network modeling with multiple cctv videos
CN112365708A (en) * 2020-09-29 2021-02-12 西北大学 Scenic spot traffic volume prediction model establishing and predicting method based on multi-graph convolution network
CN113112792A (en) * 2021-03-29 2021-07-13 华南理工大学 Multi-module traffic intensity prediction method based on semantic information
CN113160563A (en) * 2021-03-31 2021-07-23 西安交通大学 Short-time road condition prediction method, system and equipment based on historical road conditions

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄靖 等: "用于交通流预测的自适应图生成跳跃网络", 《浙江大学学报(工学版)》, vol. 55, no. 10, pages 1825 - 1833 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116884222A (en) * 2023-08-09 2023-10-13 重庆邮电大学 Short-time traffic flow prediction method for bayonet nodes
CN116884222B (en) * 2023-08-09 2024-03-26 重庆邮电大学 Short-time traffic flow prediction method for bayonet nodes
CN117437786A (en) * 2023-12-21 2024-01-23 速度科技股份有限公司 Real-time traffic flow prediction method based on artificial intelligence for traffic network
CN117437786B (en) * 2023-12-21 2024-02-27 速度科技股份有限公司 Real-time traffic flow prediction method based on artificial intelligence for traffic network

Also Published As

Publication number Publication date
CN115641718B (en) 2023-12-08

Similar Documents

Publication Publication Date Title
Ahmadisharaf et al. Integrating flood hazard into site selection of detention basins using spatial multi-criteria decision-making
CN115641718B (en) Short-time traffic flow prediction method based on bayonet flow similarity and semantic association
Jeong et al. Integrating buildings into a rural landscape using a multi-criteria spatial decision analysis in GIS-enabled web environment
WO2022217839A1 (en) Air quality prediction method based on deep spatiotemporal similarity
CN110852577A (en) Urban flood assessment method based on urban toughness and urban drainage basin hydrological model
Song et al. An interactive detector for spatial associations
CN113673769B (en) Traffic flow prediction method of graph neural network based on multivariate time sequence interpolation
CN109919819B (en) Construction, evaluation and optimization method of regional ecological network
Ahmed Modelling spatio-temporal urban land cover growth dynamics using remote sensing and GIS techniques: A case study of Khulna City
CN112863182B (en) Cross-modal data prediction method based on transfer learning
Zhang et al. Detecting colocation flow patterns in the geographical interaction data
Dai et al. Ensemble learning technology for coastal flood forecasting in internet-of-things-enabled smart city
CN114662774A (en) City block vitality prediction method, storage medium and terminal
Sahalu Analysis of urban land use and land cover changes: A case study in Bahir Dar, Ethiopia
CN116884222B (en) Short-time traffic flow prediction method for bayonet nodes
Jagarnath et al. Modelling urban land change processes and patterns for climate change planning in the Durban metropolitan area, South Africa
CN112883133A (en) Flow prediction method based on time sequence data and function evolution data
Saeidi et al. Designing an integrated urban growth prediction model: a scenario-based approach for preserving scenic landscapes
CN115759883B (en) Ecological management partitioning method based on network group characteristics
Zhao et al. Learning region similarities via graph-based deep metric learning
Caccetta et al. A methodology to estimate the future extent of dryland salinity in the southwest of Western Australia
CN117151499A (en) Monitoring and evaluating method and system for homeland space planning
CN113408867B (en) Urban burglary crime risk assessment method based on mobile phone user and POI data
CN113239502B (en) Artificial intelligence image processing-based urban sewage pipe network simulation construction method
CN111369102B (en) Method and device for extracting waterlogging risk points

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant