CN113408786B - Traffic characteristic prediction method and system - Google Patents

Traffic characteristic prediction method and system Download PDF

Info

Publication number
CN113408786B
CN113408786B CN202110555841.9A CN202110555841A CN113408786B CN 113408786 B CN113408786 B CN 113408786B CN 202110555841 A CN202110555841 A CN 202110555841A CN 113408786 B CN113408786 B CN 113408786B
Authority
CN
China
Prior art keywords
time
traffic
embedding
space
attention mechanism
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.)
Active
Application number
CN202110555841.9A
Other languages
Chinese (zh)
Other versions
CN113408786A (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.)
Zhejiang Yinjiang Intelligent Transportation Engineering Technology Research Institute Co ltd
Original Assignee
Zhejiang Yinjiang Intelligent Transportation Engineering Technology Research Institute Co ltd
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 Zhejiang Yinjiang Intelligent Transportation Engineering Technology Research Institute Co ltd filed Critical Zhejiang Yinjiang Intelligent Transportation Engineering Technology Research Institute Co ltd
Priority to CN202110555841.9A priority Critical patent/CN113408786B/en
Publication of CN113408786A publication Critical patent/CN113408786A/en
Application granted granted Critical
Publication of CN113408786B publication Critical patent/CN113408786B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Business, Economics & Management (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Molecular Biology (AREA)
  • Traffic Control Systems (AREA)
  • General Business, Economics & Management (AREA)
  • Geometry (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Game Theory and Decision Science (AREA)
  • Computer Hardware Design (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Development Economics (AREA)

Abstract

The invention relates to a traffic characteristic prediction method and a system, control information is introduced into traffic characteristic prediction to respectively process traffic speed, road network structure and traffic control data; the data are respectively sent to a neural network to obtain space embedding, time embedding and control embedding, and the space embedding, the time embedding and the control embedding are combined to form comprehensive embedding; and finally obtaining the predicted traffic speed value through an encoder based on a space-time attention mechanism module, a data conversion module and a decoder based on the space-time attention mechanism module. The invention improves the effectiveness of the speed prediction of the signal control road network, can better model the dynamic space correlation and the nonlinear time correlation, and simultaneously can avoid the error accumulation to relieve the error propagation effect, thereby improving the long-term traffic flow prediction performance and solving the problem of being suitable for long-term traffic prediction.

Description

Traffic characteristic prediction method and system
Technical Field
The invention relates to the technical field of intelligent traffic, in particular to a traffic characteristic prediction method and system.
Background
Traffic characteristic prediction is a classic time series prediction problem, and the future traffic condition is predicted according to the observed value of the historical traffic condition. The accuracy of traffic characteristic prediction influences various applications such as traffic signal control, traffic navigation and the like. Accurate traffic prediction may increase the effectiveness of traffic decisions, thereby better reducing traffic congestion. However, the existing traffic characteristic prediction method still has defects, which are specifically represented as follows: 1) The effect on long-time traffic characteristic prediction is not optimistic because the traffic characteristics have complex space-time relationship and the error of the long-time prediction is amplified at each step; 2) In the prior art, the relation between the predicted traffic characteristics and historical traffic characteristics and the traffic characteristics of the similar regions is constructed from the perspective of time correlation or space correlation, and the influence of control information on the predicted values of the traffic characteristics is ignored. In order to effectively solve the above problems, it is necessary to design a traffic characteristic prediction method and system.
Disclosure of Invention
The invention aims to overcome the defects and provides a traffic characteristic prediction method and a system, control information is introduced into traffic characteristic prediction to respectively process traffic speed, road network structure and traffic control data; the data are respectively sent to a neural network to obtain spatial embedding, time embedding and control embedding, and comprehensive embedding is combined; and finally obtaining the predicted traffic speed value through an encoder based on a space-time attention mechanism module, a data conversion module and a decoder based on the space-time attention mechanism module. The invention improves the effectiveness of the speed prediction of the signal control road network, can better model the dynamic space correlation and the nonlinear time correlation, and simultaneously can avoid the error accumulation to relieve the error propagation effect, thereby improving the long-term traffic flow prediction performance and solving the problem of being suitable for long-term traffic prediction.
The invention achieves the aim through the following technical scheme: a traffic characteristic prediction method comprises the following steps:
(1) The data preprocessing module acquires a first traffic characteristic, a second traffic characteristic and a third traffic characteristic and processes the first traffic characteristic, the second traffic characteristic and the third traffic characteristic into the input of the space-time data embedding module; the first traffic characteristic is characteristic data with time variation generated by traffic operation, including but not limited to: traffic speed, flow, occupancy, queuing length, congestion index; the second traffic characteristic is characteristic data with short-time invariance of the environment where the traffic runs, and the characteristic data comprises but is not limited to: road network structure, POI distribution and traffic infrastructure distribution; the third characteristic of the traffic is characteristic data with time variation generated by controlling traffic operation, including but not limited to: traffic control data, traffic guidance data, traffic restriction data;
(2) The space-time data embedding module is used for respectively sending the traffic first characteristic, the traffic second characteristic and the traffic third characteristic processed in the step (1) into a neural network to obtain space embedding, time embedding and control embedding, and combining the space embedding, the time embedding and the control embedding into comprehensive embedding;
(3) Processing the comprehensive embedding obtained in the step (2) by utilizing an encoder based on a space-time attention mechanism module;
(4) The data conversion module converts the coded comprehensive embedding into the input of a decoder by using a transfer attention mechanism;
(5) And (4) processing the output of the data conversion module in the step (4) by using a decoder of the space-time attention mechanism module to obtain the finally predicted traffic characteristics.
Preferably, the step (1) specifically includes the steps of:
(1.1) constructing a connection graph by using the traffic second characteristic data; the second traffic characteristic is that, taking road network structure data as an example, topology of an urban road network is converted into a weighted directed connection graph G = (V, E, a), where V is a set of nodes, represents a road segment in an actual road network, is a finite set, and | = N, | V | = N, that is, the number of road segments in the actual road network is N; e is a set of edges, represents the connectivity among the road sections in the actual road network, and takes the direction of traffic flow among the road sections as the direction of the edges; a is an element of R N×N Representing a weighted adjacency matrix in which,
Figure GDA0003790017070000031
representing a node v i To node v j The weight of (c); specifically, the weight of the adjacent matrix is calculated by utilizing a Gaussian weight model, and the density of the adjacent matrix can be effectively controlled by utilizing a threshold value;
Figure GDA0003790017070000032
wherein, the first and the second end of the pipe are connected with each other,
Figure GDA0003790017070000033
is a node v i To node v j By the distance of node v i And node v j Half of the sum of the lengths of the represented road segments is approximately replaced; sigma is the standard deviation of all distance values, epsilon is a threshold value used for controlling the sparsity of the adjacent matrix and is set to be 0.1;
(1.2) normalizing the traffic first characteristic data; the traffic first characteristic data takes traffic speed data as an example, and the specific processing flow is as follows: the original traffic data speed at time t is represented as X t ∈R N×C Wherein N is the number of nodes, C is the number of node characteristics, and 1 is taken here and only includes the speed characteristics of the road section; taking 2, road section speed and road section flow; taking 3, including road section speed, road section flow and road section density; finally, the Z-score method and the max-min method are used for aligning X t Carrying out normalization;
(1.3) matching the traffic third characteristic data to a road section, converting the road section into a period index and a green signal ratio index, carrying out discretization treatment, and processing the road section into a single-hot code; the third traffic characteristic is exemplified by control data, the control data indicates cycle and split data of the road, and the matching of the control data to the road section specifically comprises the following steps: combining the road network structure data, taking the period of the downstream intersection of the road section as the period of the road section, and taking the split of the phase of the vehicle which can enter the intersection of the road section as the split of the road section; then, calculating a period index as a ratio of a road section period to a historical road section maximum period, and calculating a green signal ratio index as a ratio of a road section green signal ratio to a historical maximum green signal ratio; and discretizing the period index and the green signal ratio index according to the corresponding table.
Preferably, the step (2) is specifically as follows:
(2.1) generating spatial embedding, specifically: learning the vector representation of the vertex by using any one method of Deepwalk, node2Vec and GraphSAGE on the connection graph constructed in the step (1.1); and feeding the vectors into a two-layer fully-connected neural network to obtain spatial embedding represented as
Figure GDA0003790017070000041
(2.2) generating time embedding, specifically: encoding each time corresponding to the traffic speed data in the step (1.2) into a vector; encoding time as R according to the time of seven days of the week and each day as time steps 7 And R T And splicing them into R 7+T The vector of (a); wherein the value of T can be 24 in terms of hour value, and 1440 in terms of minute value; sending the vector into a neural network such as a full-connection neural network, a circulation neural network, a deep belief network and the like with two or more layers, converting the vector into a D-dimension vector, namely time embedding, and expressing the D-dimension vector as time embedding
Figure GDA0003790017070000042
Wherein P represents the historical time step number of the input, Q represents the time step number of the output needing to be predicted;
(2.3) generating control embedding, specifically: respectively processing the discretization period index and the green signal ratio index obtained in the step (1.3) with R 10 And splicing them into R 20 The vector of (a); collecting a vector corresponding to each control data, and sending into a two-layer or more than two-layer fully-connected neural network, cyclic neural network, deep belief network, etc. to obtain control embedding represented as
Figure GDA0003790017070000043
(2.4) synthesizing comprehensive embedding, specifically, synthesizing comprehensive embedding by fusing the spatial embedding and the temporal embedding and the control embedding; for at time step t j Node v i Comprehensive embedding is defined as
Figure GDA0003790017070000051
Or
Figure GDA0003790017070000052
α, β, and γ are trainable weights, respectively; thus the integrated embedding of N nodes containing P + Q time steps is denoted as E ∈ R (P+Q)×N×D (ii) a Where the composite embedding contains both temporal, spatial and control information.
Preferably, when the step (3) utilizes a space-time attention mechanism module to process the comprehensive embedding obtained in the encoding step (2), before entering the encoder, the speed data X ∈ R normalized in the step (1.2) P×N×C Is converted into H through the full connection layer (0) ∈R P×N×D (ii) a Then H (0) Obtaining an H through an encoder of an L-layer space-time attention mechanism module (L) ∈R P×N×D An output of (d); the space-time attention mechanism module is formed by fusing a time attention mechanism and a space attention mechanism by a gate control fusion device; denote the input of the l-th layer spatiotemporal attention Module as H (l-1) Wherein at time step t j Node v of i Is represented as
Figure GDA0003790017070000053
The spatial attention mechanism and the temporal attention mechanism output in the l-th layer space-time attention module are respectively expressed as
Figure GDA0003790017070000054
And
Figure GDA0003790017070000055
preferably, the spatial attention mechanism is used for adaptively grasping the relation among the traffic characteristics of different road sections in the road network, and the core of the spatial attention mechanism is to dynamically set different weights at different time steps to be connected to different nodes; wherein at time step t j Node v of i The weighted sum of all nodes is calculated as:
Figure GDA0003790017070000056
where V represents the set of all nodes,
Figure GDA0003790017070000057
is to represent node v to node v i Attention score of importance, the sum of which is 1, i.e.
Figure GDA0003790017070000058
For attention at time step t in the space-time attention mechanism module of the l-th layer j Node v of i The input of (a) is performed,
Figure GDA0003790017070000059
for attention at time step t in the space-time attention mechanism module of the l-th layer j Node v of i The output of the spatial attention mechanism.
Preferably, the calculation of the attention score is specifically as follows: at a specific time step, the current traffic state and the road network structure simultaneously influence the relationship between the sensors; considering traffic characteristics and graph structure and control information to learn an overall attention score, in particularThe comprehensive embedding and the hidden state are connected, and a scaling dot product method is applied to calculate the node v and the node v i The correlation between:
Figure GDA0003790017070000061
wherein the content of the first and second substances,
Figure GDA0003790017070000062
is shown at time step t j Node v i The comprehensive embedding of (1), the splicing operation is represented by,<·,·>inner product representation, 2D representation
Figure GDA0003790017070000063
Dimension (d); function pairs are then activated with softmax
Figure GDA0003790017070000064
Normalization:
Figure GDA0003790017070000065
in particular, in order to make the learning process more stable, the spatial attention mechanism is upgraded to a multi-head attention mechanism; namely, K parallel attention mechanisms are set, and K sets of different learnable equations are set:
Figure GDA0003790017070000066
Figure GDA0003790017070000067
Figure GDA0003790017070000068
wherein the content of the first and second substances,
Figure GDA0003790017070000069
and
Figure GDA00037900170700000610
three different non-linear equations representing the kth spatial attention mechanism, which ultimately can output a D = D/K dimensional vector; the nonlinear equation is of the form:
f(x)=ReLU(xW+b)
where W and b are trainable parameters, respectively, and ReLU is an activation function.
Preferably, the time attention mechanism is used for adaptively modeling the nonlinear relation between different time steps of the same node; the time correlation continuously changes between different time steps and is influenced by factors such as traffic state, related time, control state and the like; therefore, the comprehensive embedding containing the information of the three is utilized to combine the hidden state, and a multi-head attention mechanism is applied to calculate the time attention score; wherein for node v i Time step t j The correlation with t is defined as follows:
Figure GDA0003790017070000071
Figure GDA0003790017070000072
wherein the content of the first and second substances,
Figure GDA0003790017070000073
representing the time step t in the kth time attention mechanism j The correlation with the time step t,
Figure GDA0003790017070000074
representing time step t versus time step t in the kth attention mechanism j Attention score of importance of;
Figure GDA0003790017070000075
in the attention mechanism for representing the kth timeTwo different learnable non-linear equations, the form of the non-linear equations being the same as in spatial attention;
Figure GDA0003790017070000076
represents t j A set of all time steps prior to the time step; an attention score is obtained
Figure GDA0003790017070000077
Then at t j Vertex v of time step i The hidden state of (c) may be updated according to:
Figure GDA0003790017070000078
wherein the content of the first and second substances,
Figure GDA0003790017070000079
represents a non-linear equation in the kth temporal attention mechanism, of the same form as in spatial attention; the learnable parameters in the above three equations are shared among all nodes and time steps when computed in parallel.
Preferably, the gated fuser functions to adaptively fuse temporal and spatial representations, or fused temporal, spatial, controlled representations; at layer I the output of the spatial and temporal attention module, temporal and spatial attention module are respectively represented as
Figure GDA00037900170700000710
And
Figure GDA00037900170700000711
the fusion mode is as follows:
Figure GDA00037900170700000712
Figure GDA0003790017070000081
wherein, W z,1 ∈R D×D 、W z,2 ∈R D×D And b z ∈R D As a learnable parameter, [ (-) denotes a point multiplication, [ (-) denotes a sigmoid activation function, and z denotes a gate; h (l) The output of the space-time attention mechanism module is the first layer; this gated fuser can adaptively control the weight of the spatio-temporal dependencies for each vertex and each time step.
Preferably, the data conversion module of step (4) models a direct relationship between each future time step and the historical time step to convert the encoded traffic characteristics to generate a future representation as an input to the decoder; in particular, the encoded features H are transformed (L) ∈R P×N×D To generate a future sequence representation H (L+1) ∈R Q×N×D (ii) a For each node v i Predicting the time step t j (t j =t P+1 ,...,t P+Q ) And historical time step t (t = t) 1 ,...,t P ) The relationship of (c) is measured by synthetic embedding:
Figure GDA0003790017070000082
Figure GDA0003790017070000083
wherein, the first and the second end of the pipe are connected with each other,
Figure GDA0003790017070000084
representing the predicted time step t in the kth time attention mechanism j The correlation with the historical time step t,
Figure GDA0003790017070000085
representing the historical time step t versus the predicted time step t in the kth attention mechanism j Attention score of importance of;
Figure GDA0003790017070000086
represents two different learnable nonlinear equations in the kth head distraction mechanism, the form of the nonlinear equations being the same as in spatial attention; attention scores are then used
Figure GDA0003790017070000087
Adaptively selecting the relevant characteristics of historical P time steps, and converting the coded traffic characteristics into the input of a decoder:
Figure GDA0003790017070000088
Figure GDA0003790017070000089
represents a non-linear equation in the kth temporal attention mechanism, of the same form as in spatial attention;
Figure GDA00037900170700000810
is a node v i Historical time step t, input at level l,
Figure GDA00037900170700000811
for after conversion, node v i At the predicted time step t j A vector representation of the output of (a); in the three formulas, trainable parameters of all nodes and time steps can be calculated in parallel and shared.
Preferably, the output of the data conversion module in the step (5) is H (L+1) ∈R Q×N×D The decoder of the space-time attention mechanism module comprises an L-layer space-time attention mechanism module and outputs H (2L+1) ∈R Q×N×D (ii) a Finally, outputting predicted values in advance of Q time steps by full connection layer
Figure GDA0003790017070000091
A traffic characteristic prediction system comprises a data preprocessing module, a space-time data embedding module, a space-time attention mechanism module and a data conversion module; the data preprocessing module is used for acquiring a first traffic characteristic, a second traffic characteristic and a third traffic characteristic and processing the first traffic characteristic, the second traffic characteristic and the third traffic characteristic into input of the space-time data embedding module; the space-time data embedding module respectively sends the first traffic characteristic, the second traffic characteristic and the third traffic characteristic to a neural network to obtain space embedding, time embedding and control embedding, and the space embedding, the time embedding and the control embedding are combined into comprehensive embedding; the data conversion module is used for converting the coded comprehensive embedding to be used as the input of a decoder; the space-time attention mechanism module comprises an encoder and a decoder, wherein the encoder of the space-time attention mechanism module is used for processing the comprehensive embedding of the output of the encoding space-time data embedding module; and the decoder of the space-time attention mechanism module is used for processing the output of the decoded data conversion module to obtain the finally predicted traffic characteristics.
The invention has the beneficial effects that: (1) The invention introduces traffic control information, combines the control information with traffic speed and road network structure information according to specific processing, effectively captures the influence of the control information on traffic characteristics, and improves the effectiveness of speed prediction of a signal control road network; (2) The invention provides a space-time attention mechanism which can better model dynamic space correlation and nonlinear time correlation, and designs a gating fusion device for adaptively fusing information extracted by the space-time attention mechanism; (3) The invention designs a data conversion module, which transfers the historical traffic characteristics to the future representation, models the direct relation between the historical time step and the future time step, avoids error accumulation, relieves the error propagation effect, improves the long-term traffic flow prediction performance and solves the problem of being suitable for long-term traffic prediction.
Drawings
FIG. 1 is a schematic of the system of the present invention;
FIG. 2 is a schematic flow diagram of the method of the present invention;
FIG. 3 is a schematic diagram of a spatial attention mechanism capturing relationships between nodes over time in accordance with an embodiment of the present invention;
FIG. 4 is a schematic diagram of a temporal attention mechanism capturing relationships between nodes as a function of time in accordance with an embodiment of the present invention.
Detailed Description
The invention will be further described with reference to specific examples, but the scope of the invention is not limited thereto:
example (b): as shown in fig. 1, a traffic characteristic prediction system includes a data preprocessing module, a spatiotemporal data embedding module, a spatiotemporal attention mechanism module, and a data conversion module; the data preprocessing module is used for acquiring a first traffic characteristic, a second traffic characteristic and a third traffic characteristic and processing the first traffic characteristic, the second traffic characteristic and the third traffic characteristic into input of the space-time data embedding module; the space-time data embedding module respectively sends the first traffic characteristic, the second traffic characteristic and the third traffic characteristic to a neural network to obtain space embedding, time embedding and control embedding, and the space embedding, the time embedding and the control embedding are combined into comprehensive embedding; the data conversion module is used for converting the coded comprehensive embedding to be used as the input of a decoder; the space-time attention mechanism module comprises an encoder and a decoder, wherein the encoder of the space-time attention mechanism module is used for processing the comprehensive embedding of the output of the encoding space-time data embedding module; and the decoder of the space-time attention mechanism module is used for processing the output of the decoded data conversion module to obtain the finally predicted traffic characteristics.
As shown in fig. 2, a traffic characteristic prediction method includes the following steps:
s1, a data preprocessing module: the method comprises the steps of acquiring first traffic characteristics (traffic operation generated characteristic data with time-varying property, including but not limited to traffic speed, flow, occupancy, queue length and congestion index), second traffic characteristics (traffic operation environment characteristic data with short-time invariance, including but not limited to road network structure, POI distribution and traffic infrastructure distribution) and third traffic characteristics (traffic operation controlled characteristic data with time-varying property, including but not limited to traffic control data, traffic induction data and traffic restriction data), and processing the first traffic characteristics (traffic operation generated characteristic data with time-varying property), wherein the first traffic characteristics, including but not limited to traffic speed, flow, occupancy, queue length and congestion index, and the third traffic characteristics (traffic operation controlled characteristic data with time-varying property, including but not limited to traffic control data, traffic induction data and traffic restriction data) into input of a space-time data embedding module. The method specifically comprises the following steps:
s1.1, a connection diagram is constructed by utilizing the traffic second characteristic data. The second traffic characteristic is described as follows by taking a road network structure as an example: the road network structure data includes, but is not limited to, the connection relationship between intersections in the actual road network, the length of road segments connecting intersections, and the like, and can be acquired from each of the map network stations and government agencies. Data samples are shown in table 1 below:
Figure GDA0003790017070000111
TABLE 1
Further, a connection graph is constructed by using the road network structure data. Converting the topology of the urban road network into a weighted directed connection graph G = (V, E, A), wherein V is a set of nodes, represents road segments in the actual road network, is a finite set, and | < V | = N, namely the number of the road segments in the actual road network is N; e is a set of edges representing connectivity between road segments in the actual road network, and the direction in which traffic flows between road segments is taken as the direction of the edge. A is an element of R N×N Representing a weighted adjacency matrix in which,
Figure GDA0003790017070000121
representing a node v i To node v j The weight of (c). Specifically, the weight of the adjacency matrix is calculated by using a Gaussian weight model, and the density of the adjacency matrix can be effectively controlled by using a threshold value.
Figure GDA0003790017070000122
Wherein the content of the first and second substances,
Figure GDA0003790017070000123
is a node v i To node v j By the distance of node v i And node v j Half of the sum of the lengths of the represented road segments is approximately substituted. σ is the standard deviation of all distance values, and ε is a threshold used to control the sparsity of the adjacency matrix, set to 0.1.
S1.2, traffic first characteristic data are normalized. The traffic speed is taken as an example for explanation: the traffic speed data refers to road segment traffic speed data acquired based on a movement detection technology or a section detection technology, and includes, but is not limited to, a road segment number, time, and speed. Data samples are shown in table 2 below:
road segment numbering Time Speed of rotation
14L020980T0 2021-03-1209:02:00 30
14L020979T0 2021-03-1209:03:00 40
14L020978T0 2021-03-1209:04:00 35
14L020977T0 2021-03-1209:05:00 36
TABLE 2
The specific treatment process comprises the following steps: the original traffic data speed at time t is represented as X t ∈R N×C Wherein N is the number of nodes, C is the number of node characteristics, and 1 is taken here and only includes the speed characteristics of the road section; taking 2, road section speed and road section flow; get 3, including road speed, road flow and roadSegment density. Then, X is subjected to the Z-score method and the max-min method t And (6) carrying out normalization.
S1.3, matching the traffic third characteristic data to a road section, converting the road section into a period index and a green signal ratio index, and then carrying out discretization processing. The third traffic characteristic is illustrated by taking control data as an example: the control data refers to the period, the split ratio and other data of the intersection. Data samples are shown in table 3 below:
Figure GDA0003790017070000124
Figure GDA0003790017070000131
TABLE 3
Matching the control data to the road segment specifically is: and combining the road network structure data, taking the period of the downstream intersection of the road section as the period of the road section, and taking the split of the phases of the vehicles which can enter the intersection of the road section and the split of the road section. Then, the period index is calculated as the ratio of the road section period to the maximum period of the historical road sections, and the green ratio index is calculated as the ratio of the road section green ratio to the maximum historical green ratio. The data obtained are shown in Table 4 below:
Figure GDA0003790017070000132
TABLE 4
Then, discretizing the period index and the green signal ratio index according to a corresponding table shown in the following table 5:
Figure GDA0003790017070000133
TABLE 5
S2, a space-time data embedding module: and respectively sending the traffic first characteristic, the traffic second characteristic and the traffic third characteristic processed in the last step into a neural network to obtain spatial embedding, time embedding and control embedding, and finally combining the spatial embedding, the time embedding and the control embedding into comprehensive embedding. The method specifically comprises the following steps:
s2.1 generating spatial embedding. The method specifically comprises the following steps: and (3) learning the vector representation of the vertex by using methods such as Deepwalk, node2Vec, graphSAGE and the like on the connection graph constructed by the S1.1. These vectors are then fed into a two-layer fully-connected neural network, resulting in spatial embedding, denoted as
Figure GDA0003790017070000141
S2.2 generate time embedding. The method comprises the following specific steps: and coding each time corresponding to the traffic speed data in the S1.2 into a vector. Encoding time as R according to the time of seven days of the week and each day as time steps 7 And R T (the value of T can be 24 according to the hour value and 1440 according to the minute value) and splicing the two into R 7+T The vector of (2). For example, 2021-03-1209]) The time value is encoded into 24-dimensional vector ([ 000000000100000000000000) according to 24 hours per day]) Splicing the two into a 31-dimensional vector ([ 0000100000000000100000000000000)]). Then, the vector is sent into a neural network with two or more layers, such as a fully-connected neural network, a cyclic neural network, a deep belief network and the like, and is converted into a D-dimension vector, namely, the D-dimension vector is time-embedded and is represented as time
Figure GDA0003790017070000142
Where P represents the historical number of time steps of the input and Q represents the number of time steps of the output that need to be predicted.
S2.3 generating control embedding. The method specifically comprises the following steps: respectively processing the discretized period index and the green ratio index obtained from S1.3 by R 10 And splicing them into R 20 The vector of (2). For example, if the period index of the discretization is (0.5, 1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5, 9.5), the converted one-hot codes are respectively ([ 0000000000 ]],[1000000000],[0100000000],[00100000000],[0001000000],[0000100000],[0000010000],[0000001000],[0000000100],[0000000010]). If the period index is obtainedHas a unique heat code of [1000000000]The unique heat code obtained from the split green index is [0000100000 ]]Then the vector formed by splicing is [10000000000000100000 ]]. Then, these vectors (each control data corresponds to a vector) are sent into a neural network with two or more layers, such as a fully-connected neural network, a cyclic neural network, a deep belief network, etc., to obtain control embedding, which is expressed as control embedding
Figure GDA0003790017070000151
S2.4 Synthesis of synthetic intercalations. The method specifically comprises the following steps: and integrating the spatial embedding and the temporal embedding and the control embedding into comprehensive embedding. For at time step t j Node v i Comprehensive embedding is defined as
Figure GDA0003790017070000152
Or
Figure GDA0003790017070000153
α, β, and γ are trainable weights, respectively. Thus the integrated embedding of N nodes containing P + Q time steps is denoted as E ∈ R (P+Q)×N×D . The integrated embedding contains both temporal, spatial and control information.
S3, an encoder based on a space-time attention mechanism module: processing the comprehensive embedding obtained in the previous step of coding by utilizing a space-time attention mechanism module; the method comprises the following specific steps:
and processing the comprehensive embedding obtained in the last step of coding by utilizing a space-time attention mechanism module. Normalized speed data X ∈ R in S1.2 before entering the encoder P×N×C Is converted into H through the full connection layer (0) ∈R P×N×D . Then, H (0) Obtaining an H through an encoder of an L-layer space-time attention mechanism module (L) ∈R P×N×D To output of (c).
The space-time attention module is formed by fusing a time attention mechanism and a space attention mechanism through a gating fusion device. The input to the l-th layer spatiotemporal attention module is denoted as H (l-1) Wherein at time step t j Node v of i Hidden state ofIs shown as
Figure GDA0003790017070000154
The spatial attention mechanism and the temporal attention mechanism output in the l-th layer space-time attention module are respectively expressed as
Figure GDA0003790017070000155
And
Figure GDA0003790017070000156
the spatial attention mechanism is to capture spatial correlation. Spatial correlation means that the traffic state of one road (or segment) is influenced by other roads (or segments), these factors being highly dynamic and changing over time. In order to model such characteristics, the invention designs a spatial attention mechanism to adaptively grasp the relation between the traffic characteristics of different road sections in the road network. The core of the method is to dynamically set different weights at different time steps to be connected to different nodes, as shown in FIG. 3.
At time step t j Node v of i The weighted sum of all nodes is calculated as:
Figure GDA0003790017070000161
where V represents the set of all nodes,
Figure GDA0003790017070000162
is to represent node v to node v i Attention score of importance, the sum of which is 1, i.e.
Figure GDA0003790017070000163
For attention at time step t in the space-time attention mechanism module of the l-th layer j Node v of i The input of (a) is performed,
Figure GDA0003790017070000164
in a space-time attention mechanism module at the first layerAt time step t j Node v of i The output of the spatial attention mechanism.
Further, the attention score is calculated as follows, at a particular time step, the current traffic state and the road network structure simultaneously affect the relationship between the sensors. For example, congestion on one road may affect the traffic status of his neighboring roads. With this organizational heuristic, the entire attention score is learned while taking into account traffic characteristics and graph structure and control information. In particular, the synthetic embedding is connected with the hidden state, and the scaling dot product method is applied to calculate the node v and the node v i The relevance between the two is as follows:
Figure GDA0003790017070000165
wherein, the first and the second end of the pipe are connected with each other,
Figure GDA0003790017070000166
is shown at time step t j Node v i The comprehensive embedding of (1), the splicing operation is represented by,<·,·>inner product representation, 2D representation
Figure GDA0003790017070000167
Of (c) is calculated. Then activate function pairs with softmax
Figure GDA0003790017070000168
Normalization:
Figure GDA0003790017070000169
in particular, to make the learning process more stable, the spatial attention mechanism is upgraded to a multi-head attention mechanism. That is, setting K parallel attention mechanisms, K sets of different learnable equations are set:
Figure GDA0003790017070000171
Figure GDA0003790017070000172
Figure GDA0003790017070000173
wherein the content of the first and second substances,
Figure GDA0003790017070000174
and
Figure GDA0003790017070000175
three different non-linear equations representing the kth head space attention mechanism can ultimately output a D = D/K dimensional vector. The nonlinear equation is of the form:
f(x)=ReLU(xW+b)
where W and b are trainable parameters, respectively, and ReLU is an activation function.
Further, the time attention mechanism is used for adaptively modeling the nonlinear relation between different time steps of the same node. The time dependency varies continuously between non-use time steps and is influenced by traffic conditions and related time and control conditions. Thus, the present invention combines hidden states with comprehensive embedding that contains the three pieces of information and applies a multi-point attention mechanism to calculate the temporal attention score, as shown in FIG. 4.
For node v i Time step t j The correlation with t is defined as follows:
Figure GDA0003790017070000176
Figure GDA0003790017070000177
wherein the content of the first and second substances,
Figure GDA0003790017070000178
representing time step t in kth time attention mechanism j The correlation with the time step t,
Figure GDA0003790017070000179
representing time step t versus time step t in the kth attention mechanism j Attention to the importance of.
Figure GDA00037900170700001710
Represents two different learnable non-linear equations in the kth temporal attention mechanism, the form of the non-linear equations being the same as in the spatial attention mechanism mentioned above.
Figure GDA0003790017070000181
Represents t j The set of all time steps before a time step, i.e. only causal relationships between time steps earlier than the target step are considered. An attention score is obtained
Figure GDA0003790017070000182
Then at t j Vertex v of time step i May be updated according to:
Figure GDA0003790017070000183
wherein the content of the first and second substances,
Figure GDA0003790017070000184
represents a non-linear equation in the kth temporal attention mechanism, of the same form as in the spatial attention mechanism mentioned above. The learnable parameters in the above three equations are shared among all nodes and time steps when computed in parallel.
Further, the gated fusion device is used for adaptively fusing the representations of time and space or fusing the representations of time, space and control. At layer I the output of the spatial and temporal attention module, temporal and spatial attention module are respectively represented as
Figure GDA0003790017070000185
And
Figure GDA0003790017070000186
the fusion mode is as follows:
Figure GDA0003790017070000187
Figure GDA0003790017070000188
wherein, W z,1 ∈R D×D 、W z,2 ∈R D×D And b z ∈R D As a learnable parameter, ", indicates a point multiplication, (. Sigma.)" indicates a sigmoid activation function, and z indicates a gate. H (l) The output of the attention module is the space-time attention of the layer I. This gated fuser can adaptively control the weight of the spatio-temporal dependencies of each vertex and each time step.
S4, a data conversion module: the transform-coded synthesis is embedded as input to the decoder. The method specifically comprises the following steps: with the shift attention mechanism, the synthesis in which the conversion is encoded is embedded as input to the decoder. In order to reduce error propagation at different prediction time steps in long-term prediction, the invention adds a data conversion module between a decoder and an encoder. It models the direct relationship of each future time step to the historical time step to convert the encoded traffic characteristics to generate a future representation as input to the decoder. In particular, the encoded features H are transformed (L) ∈R P×N×D To generate a future sequence representation H (L+1) ∈R Q ×N×D . For each node v i Predicting the time step t j (t j =t P+1 ,...,t P+Q ) And historical time step t (t = t) 1 ,...,t P ) The relationship of (c) is measured by synthetic embedding.
Figure GDA0003790017070000191
Figure GDA0003790017070000192
Wherein the content of the first and second substances,
Figure GDA0003790017070000193
representing the predicted time step t in the kth time attention mechanism j The correlation with the historical time step t,
Figure GDA0003790017070000194
representing the historical time step t versus the predicted time step t in the kth attention mechanism j Attention to the importance of.
Figure GDA0003790017070000195
Representing two different learnable non-linear equations in the kth head distraction mechanism, the form of the non-linear equations being the same as in the spatial attention referred to above. Then, the attention score is used
Figure GDA0003790017070000196
Adaptively selecting the relevant characteristics of historical P time steps, and converting the coded traffic characteristics into the input of a decoder:
Figure GDA0003790017070000197
Figure GDA0003790017070000198
represents a non-linear equation in the kth temporal attention mechanism, of the same form as in the spatial attention mechanism mentioned above.
Figure GDA0003790017070000199
Is a node v i Historical time step t, input at level l,
Figure GDA00037900170700001910
for after conversion, node v i At the predicted time step t j Is detected. In the three formulas, trainable parameters of all nodes and time steps can be calculated in parallel and shared.
S5, a decoder based on a space-time attention mechanism module: and processing and decoding the output of the data conversion module in the last step by using a space-time attention mechanism module to obtain the finally predicted traffic characteristics. Wherein the output of the data conversion module is H (L+1) ∈R Q ×N×D . The decoder comprises an L-layer space-time attention mechanism module and outputs H (2L+1) ∈R Q×N×D . Finally, the all-connected layer outputs the predicted values in advance of Q time steps
Figure GDA00037900170700001911
In conclusion, the invention introduces the control information into the traffic characteristic prediction, and respectively processes the traffic speed, the road network structure and the traffic control data; the data are respectively sent to a neural network to obtain spatial embedding, time embedding and control embedding, and comprehensive embedding is combined; and finally obtaining the predicted traffic speed value through an encoder based on a space-time attention mechanism module, a data conversion module and a decoder based on the space-time attention mechanism module. The beneficial effects are mainly shown as follows:
in the prior correlation study, the relation between the predicted traffic characteristics and the historical traffic characteristics and the traffic characteristics of the similar areas is constructed generally from the perspective of time correlation or space correlation, and the influence of control information on the predicted values of the traffic characteristics is ignored. The invention introduces traffic control information, combines the control information with traffic speed and road network structure information according to specific processing, effectively captures the influence of the control information on traffic characteristics, and improves the effectiveness of speed prediction of the traffic control road network. In a road network, a signal control intersection controls the vehicles at the intersection to pass through, under the normal condition, the vehicles at the intersection normally pass through, if the signal control is carried out, the vehicles can be blocked from directly entering the next road section, and the correlation of speed, flow and the like between upstream and downstream can be influenced by the change of the duration of a green light. The control information is introduced as embedded to calculate the attention scores of time and space, and is used for describing the influence as a supplement besides the space information and the time information.
And (II) a space-time attention mechanism is provided, dynamic space correlation and nonlinear time correlation can be better modeled, and a gating fusion device is designed to adaptively fuse the information extracted by the space-time attention mechanism.
And (III) designing a data conversion module, transferring the historical traffic characteristics to future characteristics, modeling a direct relation between the historical time step and the future time step, and avoiding error accumulation to relieve an error propagation effect, thereby improving the long-term traffic flow prediction performance and solving the problem of being suitable for long-term traffic prediction.
While the invention has been described in connection with specific embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A traffic characteristic prediction method is characterized by comprising the following steps:
(1) The data preprocessing module acquires a first traffic characteristic, a second traffic characteristic and a third traffic characteristic and processes the first traffic characteristic, the second traffic characteristic and the third traffic characteristic into the input of the space-time data embedding module; wherein the first traffic characteristic is characteristic data with time variation generated by traffic operation; the second traffic characteristic is characteristic data with short-time invariance of the environment where the traffic runs; the traffic third characteristic is characteristic data with time variation generated by controlling traffic operation; the method specifically comprises the following steps:
(1.1) constructing a connection diagram by using the traffic second characteristic data; wherein the second characteristic of traffic refers to road network structure data, and the topology of the urban road network is converted into weighted directed connectionGraph G = (V, E, a), where V is a set of nodes, represents links in the actual road network, is a finite set, | V | = N, that is, the number of links in the actual road network is N; e is a set of edges, represents the connectivity among the road sections in the actual road network, and takes the direction of traffic flow among the road sections as the direction of the edges; a is equal to R N×N Representing a weighted adjacency matrix in which,
Figure FDA0003835588620000011
representing a node v i To node v j The weight of (c); specifically, the weight of the adjacent matrix is calculated by using a Gaussian weight model, and the density of the adjacent matrix can be effectively controlled by using a threshold value;
Figure FDA0003835588620000012
wherein, the first and the second end of the pipe are connected with each other,
Figure FDA0003835588620000013
is a node v i To node v j By the distance of node v i And node v j Half of the sum of the lengths of the represented road segments is approximately replaced; sigma is the standard deviation of all distance values, and epsilon is a threshold value used for controlling the sparsity of the adjacent matrix;
(1.2) normalizing the traffic first characteristic data; the first traffic characteristic data refers to traffic speed data, and the specific processing flow comprises the following steps: the original traffic data speed at time t is represented as X t ∈R N×C Wherein N is the number of nodes, C is the number of node characteristics, and 1 is taken here and only includes the speed characteristics of the road section; taking 2, road section speed and road section flow; taking 3, including road speed, road flow and road density; finally, X is subjected to the Z-score method or the max-min method t Carrying out normalization;
(1.3) matching the traffic third characteristic data to a road section, converting the road section into a period index and a green signal ratio index, carrying out discretization treatment, and processing the road section into a unique hot code; the third feature of the traffic refers to control data, the control data refers to cycle and split ratio data of the road, and the matching of the control data to the road section specifically comprises the following steps: combining the road network structure data, taking the period of the downstream intersection of the road section as the period of the road section, and taking the split of the phase of the vehicle which can enter the intersection of the road section as the split of the road section; then, calculating a period index as a ratio of a road section period to a historical road section maximum period, and calculating a green signal ratio index as a ratio of a road section green signal ratio to a historical maximum green signal ratio; discretizing the period index and the green signal ratio index according to a corresponding table;
(2) The space-time data embedding module respectively sends the traffic first characteristic, the traffic second characteristic and the traffic third characteristic processed in the step (1) into a neural network to obtain space embedding, time embedding and control embedding, and the space embedding, the time embedding and the control embedding are combined into comprehensive embedding;
(3) Processing the comprehensive embedding obtained in the step (2) by utilizing an encoder based on a space-time attention mechanism module;
(4) The data conversion module converts the coded comprehensive embedding into the input of a decoder by using a transfer attention mechanism;
(5) And (4) processing the output of the data conversion module in the step (4) by using a decoder of the space-time attention mechanism module to obtain the finally predicted traffic characteristics.
2. A traffic characteristic prediction method according to claim 1, characterized in that: the step (2) is specifically as follows:
(2.1) generating spatial embedding, specifically: learning the vector representation of the vertex by using any one method of Deepwalk, node2Vec and GraphSAGE on the connection graph constructed in the step (1.1); and feeding the vectors into a two-layer fully-connected neural network to obtain spatial embedding represented as
Figure FDA0003835588620000021
v i ∈V;
(2.2) generating time embedding, specifically: encoding each time corresponding to the traffic speed data in the step (1.2) into a vector; respectively encode the time according to the time of seven days of the week and each day as the time stepR 7 And R T And splicing them into R 7+T The vector of (a); sending into a neural network with two or more layers, converting into a D-dimension vector, which is time-embedded and expressed as
Figure FDA0003835588620000031
t j ∈t 1 ,...,t P ,...,t P+Q Wherein P represents the historical time step number of the input, and Q represents the time step number of the output needing to be predicted;
(2.3) generating control embedding, specifically: respectively processing the discretized period index and the discretized green ratio index obtained in the step (1.3) by R 10 And splicing them into R 20 The vector of (a); collecting a vector corresponding to each control data, and sending the vector into a neural network with two or more layers to obtain control embedding represented as
Figure FDA0003835588620000032
v i ∈V,t j ∈t 1 ,...,t P ,...,t P+Q
(2.4) synthesizing and integrating the embedding, in particular, integrating the spatial embedding and the temporal embedding and the control embedding into the integrated embedding; for at time step t j Node v i Comprehensive embedding is defined as
Figure FDA0003835588620000033
Or
Figure FDA0003835588620000034
α, β, and γ are trainable weights, respectively; thus the integrated embedding of N nodes containing P + Q time steps is denoted as E ∈ R (P +Q)×N×D (ii) a Where the composite embedding contains both temporal, spatial and control information.
3. A traffic characteristic prediction method according to claim 1, characterized in that: said step (3) utilizes space-time attentionWhen the mechanism module processes the comprehensive embedding obtained in the step (2), before entering the encoder, the speed data X belonging to the R after normalization in the step (1.2) P×N×C Is converted into H through the full connection layer (0) ∈R P×N×D (ii) a Then H (0) Obtaining an H through an encoder of an L-layer space-time attention mechanism module (L) ∈R P×N×D An output of (d); the space-time attention mechanism module is formed by fusing a time attention mechanism and a space attention mechanism through a gate control fusion device; the input to the l-th layer spatiotemporal attention module is denoted as H (l-1) Wherein at time step t j Node v of i Is represented as
Figure FDA0003835588620000035
The spatial attention mechanism and the temporal attention mechanism output in the l-th layer space-time attention module are respectively expressed as
Figure FDA0003835588620000036
And
Figure FDA0003835588620000037
4. a traffic feature prediction method according to claim 3, characterized in that: the spatial attention mechanism is used for self-adaptively mastering the relation among the traffic characteristics of different road sections in the road network, and the core of the spatial attention mechanism is that different weights are dynamically set at different time steps and are connected to different nodes; wherein at time step t j Node v of i The weighted sum of all nodes is calculated as:
Figure FDA0003835588620000041
where V represents the set of all nodes,
Figure FDA0003835588620000042
watch with clockShow node v to node v i Attention scores of importance, the sum of which is 1, i.e.
Figure FDA0003835588620000043
Figure FDA0003835588620000044
For the time step t in the space-time attention mechanism module at the l layer j Node v of i The input of (a) is performed,
Figure FDA0003835588620000045
for attention at time step t in the space-time attention mechanism module of the l-th layer j Node v of i The output of the spatial attention mechanism.
5. The traffic feature prediction method of claim 4, wherein: the attention score calculation specifically comprises the following steps: at a particular time step, the current traffic state and road network structure simultaneously affect the relationship between the sensors; considering traffic characteristics and graph structure and control information to learn the whole attention score, connecting the comprehensive embedding and the hidden state, and applying a scaling dot product method to calculate the node v and the node v i The correlation between:
Figure FDA0003835588620000046
wherein the content of the first and second substances,
Figure FDA0003835588620000047
is shown at time step t j Node v i The comprehensive embedding of (1), the splicing operation is represented by | l,<·,·>inner product representation, 2D representation
Figure FDA0003835588620000048
Dimension (d); then activate function pairs with softmax
Figure FDA0003835588620000049
Normalization:
Figure FDA00038355886200000410
in order to make the learning process more stable, the space attention mechanism is upgraded to a multi-head attention mechanism; namely, K parallel attention mechanisms are set, and K sets of different learnable equations are set:
Figure FDA00038355886200000411
Figure FDA0003835588620000051
Figure FDA0003835588620000052
wherein the content of the first and second substances,
Figure FDA0003835588620000053
and
Figure FDA0003835588620000054
three different nonlinear equations representing the kth spatial attention mechanism can finally output a D = D/K dimensional vector; the nonlinear equation is of the form:
f(x)=ReLU(xW+b)
where W and b are trainable parameters, respectively, and ReLU is an activation function.
6. A traffic feature prediction method according to claim 3, characterized in that: the time attention mechanism is used for adaptively modeling the nonlinear relation between different time steps of the same node(ii) a The nonlinear relation continuously changes in different time steps and is influenced by factors such as traffic states, relevant time, control states and the like; therefore, the comprehensive embedding containing the information of the three is utilized to combine the hidden state, and a multi-head attention mechanism is applied to calculate the time attention score; wherein for node v i Time step t j The correlation with t is defined as follows:
Figure FDA0003835588620000055
Figure FDA0003835588620000056
wherein the content of the first and second substances,
Figure FDA0003835588620000057
representing time step t in kth time attention mechanism j The correlation with the time step t,
Figure FDA0003835588620000058
representing time step t versus time step t in the kth attention mechanism j Attention score of importance of;
Figure FDA0003835588620000059
represents two different learnable non-linear equations in the kth temporal attention mechanism, the form of the non-linear equations being the same as in the spatial attention mechanism;
Figure FDA00038355886200000510
represents t j A set of all time steps prior to the time step; an attention score is obtained
Figure FDA00038355886200000511
Then at t j Vertex v of time step i Can be updated according to:
Figure FDA0003835588620000061
Wherein the content of the first and second substances,
Figure FDA0003835588620000062
represents a non-linear equation in the kth temporal attention mechanism, of the same form as in spatial attention; the learnable parameters in the above three equations are shared among all nodes and time steps when computed in parallel.
7. A traffic feature prediction method according to claim 3, characterized in that: the gated fuser has the function of adaptively fusing representations of time and space, or representations of time, space, control; at layer I the output of the spatial and temporal attention module, temporal and spatial attention module are respectively represented as
Figure FDA0003835588620000063
And
Figure FDA0003835588620000064
the fusion mode is as follows:
Figure FDA0003835588620000065
Figure FDA0003835588620000066
wherein, W z,1 ∈R D×D 、W z,2 ∈R D×D And b z ∈R D For a learnable parameter, <' > indicates a point multiplication, (. Sigma.. Cndot.) indicates a sigmoid activation function, and z indicates a gate; h (l) The output of the space-time attention mechanism module of the l layer; this gated fuser can be adaptiveThe weight of the spatio-temporal dependencies at each vertex and each time step should be controlled.
8. A traffic characteristic prediction method according to claim 1, characterized in that: the data conversion module of step (4) modeling a direct relationship between each future time step and the historical time step to convert the encoded traffic characteristics to generate a future representation as input to a decoder; in particular, the encoded features H are transformed (L) ∈R P×N×D To generate a future sequence representation H (L+1) ∈R Q×N×D (ii) a For each node v i Predicting the time step t j (t j =t P+1 ,...,t P+Q ) And historical time step t (t = t) 1 ,...,t P ) The relationship of (c) is measured by synthetic embedding:
Figure FDA0003835588620000067
Figure FDA0003835588620000068
wherein the content of the first and second substances,
Figure FDA0003835588620000071
representing the predicted time step t in the kth time attention mechanism j The correlation with the historical time step t,
Figure FDA0003835588620000072
representing historical time step t versus predicted time step t in the kth attention mechanism j Attention score of importance of;
Figure FDA0003835588620000073
represents two different learnable nonlinear equations in the kth head distraction mechanism, the form of the nonlinear equations being the same as in spatial attention; then using the notesScore of intention
Figure FDA0003835588620000074
Adaptively selecting the relevant characteristics of historical P time steps, and converting the coded traffic characteristics into the input of a decoder:
Figure FDA0003835588620000075
Figure FDA0003835588620000076
representing a non-linear equation in the kth temporal attention mechanism, of the same form as in spatial attention;
Figure FDA0003835588620000077
is a node v i Historical time step t, input at level l,
Figure FDA0003835588620000078
for after conversion, node v i At the predicted time step t j A vector representation of the output of (a); in the three formulas, trainable parameters of all nodes and time steps can be calculated in parallel and shared.
9. A traffic characteristic prediction method according to claim 1, characterized in that: the output of the data conversion module in the step (5) is H (L+1) ∈R Q×N×D The decoder of the space-time attention mechanism module comprises an L-layer space-time attention mechanism module and outputs H (2L+1) ∈R Q×N×D (ii) a Finally, the full connection layer outputs the predicted values in advance of Q time steps
Figure FDA0003835588620000079
10. A traffic characteristic prediction system applying the method of claim 1, comprising a data preprocessing module, a spatiotemporal data embedding module, a spatiotemporal attention mechanism module and a data conversion module; the data preprocessing module is used for acquiring a first traffic characteristic, a second traffic characteristic and a third traffic characteristic and processing the first traffic characteristic, the second traffic characteristic and the third traffic characteristic into input of the space-time data embedding module; the space-time data embedding module respectively sends the first traffic characteristic, the second traffic characteristic and the third traffic characteristic to a neural network to obtain space embedding, time embedding and control embedding, and the space embedding, the time embedding and the control embedding are combined into comprehensive embedding; the data conversion module is used for converting the coded comprehensive embedding to be used as the input of a decoder; the space-time attention mechanism module comprises an encoder and a decoder, wherein the encoder of the space-time attention mechanism module is used for processing the comprehensive embedding of the output of the encoding space-time data embedding module; and the decoder of the space-time attention mechanism module is used for processing the output of the decoded data conversion module to obtain the finally predicted traffic characteristics.
CN202110555841.9A 2021-05-21 2021-05-21 Traffic characteristic prediction method and system Active CN113408786B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110555841.9A CN113408786B (en) 2021-05-21 2021-05-21 Traffic characteristic prediction method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110555841.9A CN113408786B (en) 2021-05-21 2021-05-21 Traffic characteristic prediction method and system

Publications (2)

Publication Number Publication Date
CN113408786A CN113408786A (en) 2021-09-17
CN113408786B true CN113408786B (en) 2023-03-14

Family

ID=77679143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110555841.9A Active CN113408786B (en) 2021-05-21 2021-05-21 Traffic characteristic prediction method and system

Country Status (1)

Country Link
CN (1) CN113408786B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114091772A (en) * 2021-11-26 2022-02-25 东北大学 Multi-angle fusion road traffic flow prediction method based on encoder and decoder
CN115204470A (en) * 2022-06-24 2022-10-18 中远海运科技股份有限公司 Travel time prediction method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110570651A (en) * 2019-07-15 2019-12-13 浙江工业大学 Road network traffic situation prediction method and system based on deep learning
CN111260919A (en) * 2020-01-15 2020-06-09 厦门大学 Traffic flow prediction method
CN111932026A (en) * 2020-08-27 2020-11-13 西南交通大学 Urban traffic pattern mining method based on data fusion and knowledge graph embedding
CN112382082A (en) * 2020-09-30 2021-02-19 银江股份有限公司 Method and system for predicting traffic running state in congested area
CN112801404A (en) * 2021-02-14 2021-05-14 北京工业大学 Traffic prediction method based on self-adaptive spatial self-attention-seeking convolution

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9342982B2 (en) * 2013-09-09 2016-05-17 International Business Machines Corporation Traffic control agency deployment and signal optimization for event planning

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110570651A (en) * 2019-07-15 2019-12-13 浙江工业大学 Road network traffic situation prediction method and system based on deep learning
CN111260919A (en) * 2020-01-15 2020-06-09 厦门大学 Traffic flow prediction method
CN111932026A (en) * 2020-08-27 2020-11-13 西南交通大学 Urban traffic pattern mining method based on data fusion and knowledge graph embedding
CN112382082A (en) * 2020-09-30 2021-02-19 银江股份有限公司 Method and system for predicting traffic running state in congested area
CN112801404A (en) * 2021-02-14 2021-05-14 北京工业大学 Traffic prediction method based on self-adaptive spatial self-attention-seeking convolution

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
PRECOM: A parallel recommendation engine for control, operations, and management on congested urban traffic networks;Rong D 等;《 IEEE Transactions on Intelligent Transportation 》;20210402;全文 *
基于深度学*** 等;《***仿真学报》;20180906;全文 *

Also Published As

Publication number Publication date
CN113408786A (en) 2021-09-17

Similar Documents

Publication Publication Date Title
CN109697852B (en) Urban road congestion degree prediction method based on time sequence traffic events
CN111612243B (en) Traffic speed prediction method, system and storage medium
CN114299723B (en) Traffic flow prediction method
CN113408786B (en) Traffic characteristic prediction method and system
CN110766942A (en) Traffic network congestion prediction method based on convolution long-term and short-term memory network
CN111260919B (en) Traffic flow prediction method
CN115240425A (en) Traffic prediction method based on multi-scale space-time fusion graph network
CN114202120A (en) Urban traffic travel time prediction method aiming at multi-source heterogeneous data
CN111340543B (en) Fine granularity taxi taking demand prediction method based on attention mechanism
Liang et al. A deep spatio-temporal fuzzy neural network for passenger demand prediction
CN113762338B (en) Traffic flow prediction method, equipment and medium based on multiple graph attention mechanism
CN113780665B (en) Private car stay position prediction method and system based on enhanced recurrent neural network
CN114925836B (en) Urban traffic flow reasoning method based on dynamic multi-view graph neural network
CN112071062A (en) Driving time estimation method based on graph convolution network and graph attention network
CN114495500B (en) Traffic prediction method based on dual dynamic space-time diagram convolution
CN110163449A (en) A kind of motor vehicle blowdown monitoring node dispositions method based on active space-time diagram convolution
CN115376317A (en) Traffic flow prediction method based on dynamic graph convolution and time sequence convolution network
Xu et al. A taxi dispatch system based on prediction of demand and destination
CN117610734A (en) Deep learning-based user behavior prediction method, system and electronic equipment
CN113159371A (en) Unknown target feature modeling and demand prediction method based on cross-modal data fusion
CN117371571A (en) Regional air quality prediction model based on multi-scale dynamic synchronous diagram mechanism
CN117236492A (en) Traffic demand prediction method based on dynamic multi-scale graph learning
CN116052427A (en) Inter-city inter-regional mobility prediction method and device based on private car travel track data
CN114372627B (en) Urban vehicle travel time estimation method based on hybrid deep learning framework
CN116258253A (en) Vehicle OD prediction method based on Bayesian neural network

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