CN114572229B - Vehicle speed prediction method, device, medium and equipment based on graph neural network - Google Patents

Vehicle speed prediction method, device, medium and equipment based on graph neural network Download PDF

Info

Publication number
CN114572229B
CN114572229B CN202210191590.5A CN202210191590A CN114572229B CN 114572229 B CN114572229 B CN 114572229B CN 202210191590 A CN202210191590 A CN 202210191590A CN 114572229 B CN114572229 B CN 114572229B
Authority
CN
China
Prior art keywords
graph
vehicle speed
module
time
information
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
CN202210191590.5A
Other languages
Chinese (zh)
Other versions
CN114572229A (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.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
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 South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN202210191590.5A priority Critical patent/CN114572229B/en
Publication of CN114572229A publication Critical patent/CN114572229A/en
Application granted granted Critical
Publication of CN114572229B publication Critical patent/CN114572229B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W40/00Estimation or calculation of non-directly measurable driving parameters for road vehicle drive control systems not related to the control of a particular sub unit, e.g. by using mathematical models
    • B60W40/10Estimation or calculation of non-directly measurable driving parameters for road vehicle drive control systems not related to the control of a particular sub unit, e.g. by using mathematical models related to vehicle motion
    • B60W40/105Speed
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W50/00Details of control systems for road vehicle drive control not related to the control of a particular sub-unit, e.g. process diagnostic or vehicle driver interfaces
    • B60W50/0097Predicting future conditions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • 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/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • 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
    • G06N3/048Activation functions
    • 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
    • G06N3/084Backpropagation, e.g. using gradient descent
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Automation & Control Theory (AREA)
  • Transportation (AREA)
  • Mechanical Engineering (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Human Computer Interaction (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention provides a vehicle speed prediction method, a vehicle speed prediction device, a vehicle speed prediction medium and vehicle speed prediction equipment based on a graph neural network; the method comprises the steps of collecting vehicle speed data within a set time range; normalizing the data to obtain preprocessed data information; generating a static diagram based on Euclidean distance by using the spatial characteristics; the graph learning module automatically captures hidden dependency relationships in the space, and generates an adaptive adjacency matrix so as to generate a dynamic graph; sequentially inputting data information into a time convolution module and a graph convolution module which are arranged at intervals in a multi-layer manner; the time convolution module carries out gate control three-branch time convolution on the data information to learn the dependency relationship between the speed and the time characteristic; the graph rolling module respectively carries out weighted confusion on the data information and the static graph and the dynamic graph to jointly learn potential spatial characteristics; and the input prediction output module predicts the vehicle speed to obtain a vehicle speed prediction result in a subsequent period. The method can effectively predict the speed of the vehicle and assist the implementation of travel planning and traffic control.

Description

Vehicle speed prediction method, device, medium and equipment based on graph neural network
Technical Field
The invention relates to the technical field of vehicle speed prediction, in particular to a vehicle speed prediction method, device, medium and equipment based on a graph neural network.
Background
In recent years, with the rapid increase of economy and the increasing of the living standard of people, the maintenance amount of motor vehicles is increasing. The current limited road resources and the increasingly-growing automobile conservation quantity are contradicted, a series of complex traffic problems are brought, and the urban traffic jam problem is increasingly prominent. Urban traffic jams not only increase the time cost of travelers, but also cause more traffic accidents.
Limited road resources lead to unavoidable traffic congestion, but accurate full road segment vehicle speed predictions can effectively alleviate this problem. On one hand, the accurate prediction result can enable the user to make more intelligent selection, thereby saving money and time and improving the overall road passing efficiency; on the other hand, highly accurate traffic information also helps to develop intelligent and sustainable mobile systems to reduce overall congestion levels.
Disclosure of Invention
In order to overcome the defects and shortcomings in the prior art, the invention aims to provide a vehicle speed prediction method, device, medium and equipment based on a graph neural network; the method can effectively predict the speed of the vehicle and assist the implementation of travel planning and traffic control.
In order to achieve the above purpose, the invention is realized by the following technical scheme: a vehicle speed prediction method based on a graph neural network is characterized by comprising the following steps of: comprises the following steps:
S1, acquiring vehicle speed data within a set time range; processing the vehicle speed data in the set time range into T time length units with the same time interval to obtain T multiplied by N multiplied by D dimensional data, wherein N is the number of sensors in the road network, and D is the characteristic number of each sensor; the D dimension characteristic comprises a vehicle speed measured by a sensor in the time length unit, and a time characteristic and a space characteristic corresponding to the vehicle speed; the time characteristics comprise week information and time information; the spatial features comprise longitude information and latitude information of the sensor ID; normalizing the data to obtain preprocessed data information;
s2, generating a static diagram based on Euclidean distance by utilizing spatial characteristics;
S3, embedding two nodes with the learnable parameters into a dictionary and inputting the nodes into a graph learning module; the graph learning module automatically captures hidden dependency relationships in the space, and generates an adaptive adjacency matrix so as to generate a dynamic graph;
S4, inputting the preprocessed data information into a time convolution module and a graph convolution module which are arranged at intervals in multiple layers in sequence; the time convolution module carries out gate control three-branch time convolution on the data information to learn the dependency relationship between the speed and the time characteristic; the graph rolling module respectively carries out weighted confusion on the data information and the static graph and the dynamic graph to jointly learn potential spatial characteristics;
S5, the preprocessed data information, the output information of each layer of time convolution module and the output information of the last layer of graph convolution module are connected in parallel, and then the characteristics connected in parallel are input into a prediction output module to conduct vehicle speed prediction, so that a vehicle speed prediction result of the following period T multiplied by N dimension is obtained.
Preferably, in the step S1, the normalizing the data means:
where x represents an original vehicle speed value, x μ represents an average value of vehicle speeds, x σ represents a standard deviation of vehicle speeds, and x s represents processed data.
Preferably, in the step S2, in the static diagram, the weight a S ij between the sensor v i and the sensor v j is:
Where dist (i, j) represents the road network distance between sensor v i and sensor v j, σ is the standard deviation of the road network distance, μ is a predefined threshold.
Preferably, in the step S3, the method for generating the dynamic diagram includes: each sensor in the road network is set to correspond to two nodes E 1、E2;E1、E2 representing potential features at the nodes, is initially initialized randomly, and then according to the formula:
M1=tanh(αE1Θ1)
M2=tanh(αE2Θ2)
for i=1,2,...,N
idx=argtopk(AD[i,:])
AD[i,-idx]=0
Wherein E 1、E2 updates learning in training, Θ 1、Θ2 is a model parameter, and α is a super parameter for controlling saturation rate of an activation function; argtok (·) returns an index of the k values for which the vector is maximum;
the generated a D is a dynamic diagram.
Preferably, in the step S4, the output h TC of the time convolution module is:
hTC=(z⊙g(θ1χTC+b)+(1-z)⊙γ(θ2χTC+c))⊙σ(θ3χTC+d)
Wherein θ 1、θ2、θ3, b, c, d are model parameters of the time convolution module, as well as the multiplication of element layers, γ (·) refers to a ReLU activation function, weak connection can be eliminated, g (·) refers to a tanh activation function, z controls the ratio of confusion of two branches, σ refers to a sigmod activation function, determines the ratio of information transferred to the next layer, χ TC refers to input from the previous layer.
Preferably, in the step S4, the output h GC of the graph rolling module is:
hGC=r·(fconv11;xGC,AD)+fconv22;xGC,(AD)T)+(1-r)·fconv33;xGC;AS)
Wherein f conv1,fconv2,fconv3 represents three Mix-hop propagation layers of the graph convolution module respectively, Θ 123 represents model parameters of the graph convolution module, a D represents a dynamic graph, a S represents a static graph, r controls confusion ratio of features extracted from the dynamic graph and the static graph, multiplication at element level is performed, and x GC represents input from the previous layer.
Preferably, the static diagram, the dynamic diagram, the time convolution module, the diagram convolution module and the output module together form a prediction model; training a prediction model; the predictive model training objective is set to minimize the absolute error between the actual vehicle speed and the predicted vehicle speed;
In the prediction model training process, an average absolute error loss function is adopted, an end-to-end training mode is adopted, and the network weight and bias are updated through back propagation, wherein the loss function is defined as follows:
Wherein, For prediction result,/>For a true value, T represents the predicted time length, N represents the number of sensors, D represents the number of features, and Θ is a model training parameter.
A vehicle speed prediction apparatus based on a graph neural network, comprising:
The sampling module is used for collecting vehicle speed data within a set time range; processing the vehicle speed data in the set time range into T time length units with the same time interval to obtain T multiplied by N multiplied by D dimensional data, wherein N is the number of sensors in the road network, and D is the characteristic number of each sensor; the D dimension characteristic comprises a vehicle speed measured by a sensor in the time length unit, and a time characteristic and a space characteristic corresponding to the vehicle speed; the time characteristics comprise week information and time information; the spatial features comprise longitude information and latitude information of the sensor ID;
the preprocessing module is used for carrying out normalization processing on the data to obtain preprocessed data information;
The static diagram module is used for generating a static diagram based on Euclidean distance by utilizing the spatial characteristics;
the dynamic graph module is used for embedding two nodes with the learnable parameters into the dictionary and inputting the nodes into the graph learning module; the graph learning module automatically captures hidden dependency relationships in the space, and generates an adaptive adjacency matrix so as to generate a dynamic graph;
the time convolution module is used for carrying out gate control three-branch time convolution on the data information to learn the dependency relationship between the speed and the time characteristic;
the graph rolling module is used for respectively carrying out weighted confusion on the data information and the static graph and the dynamic graph to learn potential spatial characteristics together; the time convolution module and the graph convolution module are distributed at intervals;
And the output module is used for carrying out parallel connection on the preprocessed data information, the output information of each layer of time convolution module and the output information of the last layer of graph convolution module, and then carrying out vehicle speed prediction on the features of parallel connection to obtain a vehicle speed prediction result of T multiplied by N dimension in the subsequent period.
A storage medium having stored therein a computer program which, when executed by a processor, causes the processor to perform the above-described graph neural network-based vehicle speed prediction method.
A computing device, including a processor and a memory for storing a program executable by the processor, wherein the processor implements the vehicle speed prediction method based on a graph neural network when executing the program stored in the memory.
The invention firstly adds other influencing factors (such as time, azimuth and the like) besides the vehicle speed to assist in prediction. Because the speed of the vehicle at a certain moment is related to the speeds of vehicles at other road sections and the historical speed of the road section, and has obvious time-space correlation, the invention adopts the time convolution module and the graph convolution module to capture the space dependence and the time dependence respectively. Because the road network presents a non-Euclidean structure, the spatial dependence extraction adopts graph convolution, the road attribute is fused into the graph signal, and the influence of the road attribute on the traffic flow is learned based on the graph convolution network. From a graph-based perspective, the present model treats all sensor locations of the full road segment at each moment in time series data as nodes in a graph and uses a graph adjacency matrix to describe the relationship between the nodes. The graph adjacency matrix consists of two parts, wherein one part is a static graph generated by original data, and the other part is a dynamic graph learned by a graph learning module. And (3) transmitting the result of the graph convolution network learning to a time convolution module, and capturing time dependence by learning, wherein the two modules act alternately, so that the controllable capturing of the time, space and space relation is further realized. And the residual error connection module is adopted to solve the degradation problem of the deep neural network, and finally the output module is utilized to output multi-step prediction results, so that the accumulated error caused by single-step output is reduced.
Compared with the prior art, the invention has the following advantages and beneficial effects:
1. According to the invention, the data preprocessing work is performed on the original input data, and the auxiliary information is added, so that the prediction precision is improved. Meanwhile, a static diagram is generated for the subsequent two-branch diagram convolution module to use, so that the space dependence can be better captured;
2. The invention utilizes the static diagram based on Euclidean distance and the dynamic diagram generated by the diagram learning module to weight and mix to form the two-branch diagram convolution layer, and learns the spatial characteristics together, thus capturing more useful road network spatial characteristics;
3. The gating three-branch time convolution module provided by the invention can effectively control information flow between time sequence convolution layers, eliminate weak connection, learn the most important time characteristic, and is beneficial to capturing long-term dependence so as to provide a more accurate prediction result.
Drawings
FIG. 1 is a flow chart diagram of a vehicle speed prediction method based on a graph neural network of the present invention;
FIG. 2 is a schematic diagram of data input for the vehicle speed prediction method based on the neural network of the present invention;
FIG. 3 is a schematic diagram of a time convolution module in the vehicle speed prediction method based on the graph neural network;
FIG. 4 is a schematic diagram of an initial layer of expansion of a time convolution module in the vehicle speed prediction method based on the neural network of the present invention;
FIG. 5 is a schematic diagram of a graph convolution module in the graph neural network-based vehicle speed prediction method of the present invention;
FIG. 6 is a schematic diagram of input data in the vehicle speed prediction method based on the neural network of the present invention;
Fig. 7 is a schematic diagram of output data in the vehicle speed prediction method based on the neural network of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and the detailed description.
Example 1
Traffic speed prediction is to predict future traffic speeds given historical traffic speeds and underlying road network constraints. Making multi-scale traffic speed predictions will provide great convenience for traffic planning. The method accurately and timely predicts the multi-scale traffic situation and is also of great importance to road users and management institutions. However, the prediction of the vehicle speed is very challenging, on the one hand, road networks in the real world have complex spatial structures, and the road traffic flow is non-euclidean; on the other hand, the change of road traffic flow with time is non-stationary, and has strong time dependence, such as peak in the morning and evening, holidays or unpredictable traffic accidents, all have influence on road traffic speed.
The vehicle speed prediction method based on the graph neural network in this embodiment, as shown in fig. 1, includes the following steps:
S1, acquiring vehicle speed data within a set time range; processing the vehicle speed data in the set time range into T time length units with the same time interval to obtain T multiplied by N multiplied by D dimensional data, wherein N is the number of sensors in the road network, and D is the characteristic number of each sensor; the D features comprise the vehicle speed measured by the sensor in the time length unit, and the time features and the space features corresponding to the vehicle speed; the time characteristics comprise week information and time information; the spatial features comprise longitude information and latitude information of the sensor ID; normalizing the data to obtain preprocessed data information;
In the present embodiment, D is 12, in which the vehicle speed and time information (which hour of the day) are 2 dimensions in total; week number information (day of week), represented by one hot vector, totaling 7 dimensions; sensor ID, longitude information, and latitude information, totaling 3 dimensions; thus, 12 pieces of dimension information are contained in total.
Normalization of the data means:
Where x represents an original vehicle speed value, x μ represents an average value of vehicle speeds, x σ represents a standard deviation of vehicle speeds, and x s represents processed data. After the Z-score data is normalized, the original data is mapped to a standard normal distribution space and is not easily affected by outliers.
S2, generating a static diagram based on Euclidean distance by utilizing spatial characteristics;
In the static diagram, the weight a S ij between the sensor v i and the sensor v j is:
Where dist (i, j) represents the road network distance between sensor v i and sensor v j, σ is the standard deviation of the road network distance, μ is a predefined threshold.
S3, embedding two nodes with the learnable parameters into a dictionary and inputting the nodes into a graph learning module; the graph learning module automatically captures hidden dependency relationships in the space, and generates an adaptive adjacency matrix so as to generate a dynamic graph;
Considering that the congestion of the upstream road section affects the downstream, the congestion of the downstream road section inevitably reacts to the upstream for a long time, and the speeds of the road sections in the road network affect each other. Therefore, the graph learning module provided by the invention generates a bidirectional graph to establish the relationship between two nodes.
The method for generating the dynamic diagram comprises the following steps:
Setting two corresponding nodes E 1、E2;E1、E2 of each sensor in the road network to represent potential characteristics at the nodes, wherein the potential characteristics cannot be represented by the random initialization at the beginning; then according to the formula:
M1=tanh(αE1Θ1)
M2=tanh(αE2Θ2)
for i=1,2,...,N
idx=argtopk(AD[i,:])
AD[i,-idx]=0
Wherein E 1、E2 updates learning in training, Θ 1、Θ2 is a model parameter, and α is a super parameter for controlling saturation rate of an activation function; argtok (·) returns an index of the k values for which the vector is maximum. This approach enables the adjacency matrix to be changed to a sparse matrix to reduce the computational cost of subsequent graph convolutions. For each node, selecting the nearest k nodes as neighbors, keeping the weight among the nodes, and setting the rest weight as 0; the operation can reduce the operation complexity and the training time.
The generated a D is a dynamic diagram.
The dynamic graph is used in a graph rolling module, the value of A D is changed in subsequent back propagation through the graph rolling module, and then the E 1、E2 node is changed in subsequent back propagation; the value of E 1、E2 after training can represent a potential feature of the node.
S4, inputting the preprocessed data information into a time convolution module and a graph convolution module which are arranged at intervals in multiple layers in sequence; the time convolution module carries out gate control on the data information to obtain a three-branch time convolution layer to learn the dependency relationship between the speed and the time characteristic; the graph rolling module respectively carries out weighted confusion on the data information and the static graph and the dynamic graph so as to learn potential spatial characteristics together;
as shown in fig. 3, the output h TC of the time convolution module is:
hTC=(z⊙g(θ1χTC+b)+(1-z)⊙γ(θ2χTc+c))⊙σ(θ3χTC+d)
Wherein θ 1、θ2、θ3, b, c, d are model parameters of the time convolution module, wherein, as the multiplication of the element layers, γ (·) refers to a ReLU activation function, weak connection can be eliminated, g (·) refers to a tanh activation function, z controls the ratio of confusion of two branches, σ refers to a sigmod activation function, determines the ratio of information transferred to the next layer, x T refers to input from the previous layer, h TC refers to output after conversion, and learned time dependence is included.
To process very long multivariate time series data, the three-branch temporal convolution module presented herein employs an expanded initial layer within to capture potentially different ranges of time series patterns within the multivariate time series data. The dilating initial layer combines two widely adopted strategies for convolutional neural networks: the internal structure of using filters of various sizes is shown in fig. 4, convolved with the use of dilation.
As shown in fig. 5, the output h GC of the graph rolling module is:
hGC=r·(fconv11;xGC,AD)+fconv22;xGC,(AD)T)+(1-r)·fconv33;xGC;AS)
wherein f conv1,fconv2,fconv3 represents three Mix-hop propagation layers of the graph convolution module, Θ 123 represents model parameters of the graph convolution module, a D represents a dynamic graph, a S represents a static graph, r controls confusion ratio of features extracted from the dynamic graph and the static graph, x GC represents input from the upper layer, h GC represents feature mapping of output, and captured spatial information is included.
Each branch internally utilizes a Mix-Hop propagation layer to process information flow between related nodes. The dynamic diagram information flow branch consists of two Mix-Hop propagation layers, inflow information and outflow information passing through each node are processed respectively, and the net inflow information is equal to the sum of the outputs of the two Mix-Hop propagation layers.
S5, the preprocessed data information, the output information of each layer of time convolution module and the output information of the last layer of graph convolution module are connected in parallel, and then the characteristics connected in parallel are input into a prediction output module to conduct vehicle speed prediction, so that a vehicle speed prediction result of the following period T multiplied by N dimension is obtained.
The static diagram, the dynamic diagram, the time convolution module, the diagram convolution module and the output module jointly form a prediction model; training a prediction model; the predictive model training objective is set to minimize the absolute error between the actual vehicle speed and the predicted vehicle speed. The method comprises the following specific steps:
In the experimental process, the data set is divided into a training set, a verification set and a test set according to the ratio of 7:1:2, the training set is verified by the test set to ensure that the performances of the model on the training set and the verification set are consistent, and an early stop strategy is adopted to obtain the optimal model.
In the prediction model training process, an average absolute error loss function is adopted, an end-to-end training mode is adopted, and the network weight and bias are updated through back propagation, wherein the loss function is defined as follows:
Wherein, For prediction result,/>For a true value, T represents the predicted time length, N represents the number of sensors, D represents the number of features, and Θ is a model training parameter.
The model is tested on METR-LA and PEMS-BAY data sets, and excellent effects are achieved in short-term prediction (15 min), medium-term prediction (30 min) and long-term prediction (60 min).
The invention firstly adds other influencing factors (such as time, azimuth and the like) besides the vehicle speed to assist in prediction. Because the speed of the vehicle at a certain moment is related to the speeds of vehicles at other road sections and the historical speed of the road section, and has obvious time-space correlation, the invention adopts the time convolution module and the graph convolution module to capture the space dependence and the time dependence respectively. Because the road network presents a non-Euclidean structure, the spatial dependence extraction adopts graph convolution, the road attribute is fused into the graph signal, and the influence of the road attribute on the traffic flow is learned based on the graph convolution network. From a graph-based perspective, the present model treats all sensor locations of the full road segment at each moment in time series data as nodes in a graph and uses a graph adjacency matrix to describe the relationship between the nodes. The graph adjacency matrix consists of two parts, wherein one part is a static graph generated by original data, and the other part is a dynamic graph learned by a graph learning module. And (3) conveying the result of the graph convolution network learning to a time convolution module, and learning the replenishment time dependence and alternately acting by the two modules so as to further realize the controllable capturing of the time, space and space-time relationship. And the residual error connection module is adopted to solve the degradation problem of the deep neural network, and finally the output module is utilized to output multi-step prediction results, so that the accumulated error caused by single-step output is reduced.
The following description is made in connection with a specific example:
the information collected by the sensor in the past 1 hour is input as dimension data after data preprocessing, and dimension data is finally output to represent the predicted vehicle speeds of N road sections in the future 1 hour. Dimension data representing the vehicle speed of N road segments within 1 hour in the future. Assuming a road network area with three sensors, the speed recorded by the sensors is processed as an average speed within five minutes.
The input data is shown in fig. 6, and the output data is shown in fig. 7.
In order to implement the vehicle speed prediction method based on the graph neural network according to the first embodiment, the present embodiment provides a vehicle speed prediction device based on the graph neural network, including:
The sampling module is used for collecting vehicle speed data within a set time range; processing the vehicle speed data in the set time range into T time length units with the same time interval to obtain T multiplied by N multiplied by D dimensional data, wherein N is the number of sensors in the road network, and D is the characteristic number of each sensor; the D dimension characteristic comprises a vehicle speed measured by a sensor in the time length unit, and a time characteristic and a space characteristic corresponding to the vehicle speed; the time characteristics comprise week information and time information; the spatial features comprise longitude information and latitude information of the sensor ID;
the preprocessing module is used for carrying out normalization processing on the data to obtain preprocessed data information;
The static diagram module is used for generating a static diagram based on Euclidean distance by utilizing the spatial characteristics;
the dynamic graph module is used for embedding two nodes with the learnable parameters into the dictionary and inputting the nodes into the graph learning module; the graph learning module automatically captures hidden dependency relationships in the space, and generates an adaptive adjacency matrix so as to generate a dynamic graph;
the time convolution module is used for carrying out gate control three-branch time convolution on the data information to learn the dependency relationship between the speed and the time characteristic;
the graph rolling module is used for respectively carrying out weighted confusion on the data information and the static graph and the dynamic graph to learn potential spatial characteristics together; the time convolution module and the graph convolution module are distributed at intervals;
And the output module is used for carrying out parallel connection on the preprocessed data information, the output information of each layer of time convolution module and the output information of the last layer of graph convolution module, and then carrying out vehicle speed prediction on the features of parallel connection to obtain a vehicle speed prediction result of T multiplied by N dimension in the subsequent period.
Example two
The storage medium of this embodiment is characterized in that the storage medium stores a computer program, and the computer program when executed by a processor causes the processor to execute the vehicle speed prediction method based on the graph neural network of the embodiment.
Example III
The computing device of the present embodiment includes a processor and a memory for storing a program executable by the processor, and is characterized in that when the processor executes the program stored in the memory, the vehicle speed prediction method based on the graph neural network of the first embodiment is implemented.
The above examples are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above examples, and any other changes, modifications, substitutions, combinations, and simplifications that do not depart from the spirit and principle of the present invention should be made in the equivalent manner, and the embodiments are included in the protection scope of the present invention.

Claims (7)

1. A vehicle speed prediction method based on a graph neural network is characterized by comprising the following steps of: comprises the following steps:
S1, acquiring vehicle speed data within a set time range; processing the vehicle speed data in the set time range into T time length units with the same time interval to obtain T multiplied by N multiplied by D dimensional data, wherein N is the number of sensors in the road network, and D is the characteristic number of each sensor; the D dimension characteristic comprises a vehicle speed measured by a sensor in the time length unit, and a time characteristic and a space characteristic corresponding to the vehicle speed; the time characteristics comprise week information and time information; the spatial features comprise longitude information and latitude information of the sensor ID; normalizing the data to obtain preprocessed data information;
s2, generating a static diagram based on Euclidean distance by utilizing spatial characteristics;
S3, embedding two nodes with the learnable parameters into a dictionary and inputting the nodes into a graph learning module; the graph learning module automatically captures hidden dependency relationships in the space, and generates an adaptive adjacency matrix so as to generate a dynamic graph;
S4, inputting the preprocessed data information into a time convolution module and a graph convolution module which are arranged at intervals in multiple layers in sequence; the time convolution module carries out gate control three-branch time convolution on the data information to learn the dependency relationship between the speed and the time characteristic; the graph rolling module respectively carries out weighted confusion on the data information and the static graph and the dynamic graph to jointly learn potential spatial characteristics;
S5, parallelly connecting the preprocessed data information, the output information of each layer of time convolution module and the output information of the last layer of graph convolution module, and then inputting the parallelly connected characteristics into a prediction output module for vehicle speed prediction to obtain a vehicle speed prediction result of a subsequent period T multiplied by N dimension;
In the step S4, the output h TC of the time convolution module is:
hTc=(z⊙g(θ1χTC+b)+(1-z)⊙γ(θ2χTC+C))⊙σ(θ3χTC+d)
Wherein θ 1、θ2、θ3, 2, c, d are model parameters of the time convolution module, as well as multiplication of element layers, γ (·) refers to a ReLU activation function, weak connection can be eliminated, g (·) refers to a tanh activation function, z controls the ratio of confusion of two branches, σ refers to a sigmod activation function, determines the ratio of information transferred to the next layer, χ TC refers to input from the previous layer;
in the step S4, the output h GC of the graph rolling module is:
hGC=r·(fconv11;xGC,AD)+fconv22;xGC,(AD)T)+(1-r)·fconv33;xGC;AS)
Wherein f conv1,fconv2,fconv3 represents three Mix-hop propagation layers of the graph convolution module respectively, Θ 123 represents model parameters of the graph convolution module, A D represents a dynamic graph, A S represents a static graph, r controls confusion ratio of features extracted from the dynamic graph and the static graph, multiplication at element level is performed, and x GC represents input from the previous layer;
the static diagram, the dynamic diagram, the time convolution module, the diagram convolution module and the output module jointly form a prediction model; training a prediction model; the predictive model training objective is set to minimize the absolute error between the actual vehicle speed and the predicted vehicle speed;
In the prediction model training process, an average absolute error loss function is adopted, an end-to-end training mode is adopted, and the network weight and bias are updated through back propagation, wherein the loss function is defined as follows:
Wherein, For prediction result,/>For a true value, T represents the predicted time length, N represents the number of sensors, D represents the number of features, and Θ is a model training parameter.
2. The graph neural network-based vehicle speed prediction method according to claim 1, characterized in that: in the step S1, the normalization processing of the data means:
where x represents an original vehicle speed value, x μ represents an average value of vehicle speeds, x σ represents a standard deviation of vehicle speeds, and x s represents processed data.
3. The graph neural network-based vehicle speed prediction method according to claim 1, characterized in that: in the step S2, in the static diagram, the weight a S ij between the sensor v i and the sensor v j is:
Where dist (i, j) represents the road network distance between sensor v i and sensor v j, σ is the standard deviation of the road network distance, μ is a predefined threshold.
4. The graph neural network-based vehicle speed prediction method according to claim 1, characterized in that: in the step S3, the method for generating the dynamic diagram includes: each sensor in the road network is set to correspond to two nodes E 1、E2;E1、E2 representing potential features at the nodes, is initially initialized randomly, and then according to the formula:
M1=tanh(αE1Θ1)
M2=tanh(αE2Θ2)
fori=1,2,...,N
idx=argtopk(AD[i,:])
AD[i,-idx]=0
Wherein E 1、E2 updates learning in training, Θ 1、Θ2 is a model parameter, and α is a super parameter for controlling saturation rate of an activation function; argtok (·) returns an index of the k values for which the vector is maximum;
the generated a D is a dynamic diagram.
5. A vehicle speed prediction apparatus based on a graph neural network, comprising:
The sampling module is used for collecting vehicle speed data within a set time range; processing the vehicle speed data in the set time range into T time length units with the same time interval to obtain T multiplied by N multiplied by D dimensional data, wherein N is the number of sensors in the road network, and D is the characteristic number of each sensor; the D dimension characteristic comprises a vehicle speed measured by a sensor in the time length unit, and a time characteristic and a space characteristic corresponding to the vehicle speed; the time characteristics comprise week information and time information; the spatial features comprise longitude information and latitude information of the sensor ID;
the preprocessing module is used for carrying out normalization processing on the data to obtain preprocessed data information;
The static diagram module is used for generating a static diagram based on Euclidean distance by utilizing the spatial characteristics;
the dynamic graph module is used for embedding two nodes with the learnable parameters into the dictionary and inputting the nodes into the graph learning module; the graph learning module automatically captures hidden dependency relationships in the space, and generates an adaptive adjacency matrix so as to generate a dynamic graph;
the time convolution module is used for carrying out gate control three-branch time convolution on the data information to learn the dependency relationship between the speed and the time characteristic;
the graph rolling module is used for respectively carrying out weighted confusion on the data information and the static graph and the dynamic graph to learn potential spatial characteristics together; the time convolution module and the graph convolution module are distributed at intervals;
the output module is used for carrying out parallel connection on the preprocessed data information, the output information of each layer of time convolution module and the output information of the last layer of graph convolution module, and then carrying out vehicle speed prediction on the features of parallel connection to obtain a vehicle speed prediction result of T multiplied by N dimension in the subsequent period;
the output h TC of the time convolution module is:
hTC=(z⊙g(θ1χTC+b)+(1-z)⊙γ(θ2χTC+c))⊙σ(θ3χTC+d)
Wherein θ 1、θ2、θ3, b, c, d are model parameters of the time convolution module, as well as multiplication of element layers, γ (·) refers to a ReLU activation function, weak connection can be eliminated, g (·) refers to a tanh activation function, z controls the ratio of confusion of two branches, σ refers to a sigmod activation function, determines the ratio of information transferred to the next layer, χ TC refers to input from the previous layer;
The output h GC of the graph convolution module is:
hGC=r·(fconv11;xGC,AD)+fconv22;xGC,(AD)T)+(1-r)·fconv33;xGC;AS)
Wherein f conv1,fconv2,fconv3 represents three Mix-hop propagation layers of the graph convolution module respectively, Θ 123 represents model parameters of the graph convolution module, A D represents a dynamic graph, A S represents a static graph, r controls confusion ratio of features extracted from the dynamic graph and the static graph, multiplication at element level is performed, and x GC represents input from the previous layer;
the static diagram, the dynamic diagram, the time convolution module, the diagram convolution module and the output module jointly form a prediction model; training a prediction model; the predictive model training objective is set to minimize the absolute error between the actual vehicle speed and the predicted vehicle speed;
In the prediction model training process, an average absolute error loss function is adopted, an end-to-end training mode is adopted, and the network weight and bias are updated through back propagation, wherein the loss function is defined as follows:
Wherein, For prediction result,/>For a true value, T represents the predicted time length, N represents the number of sensors, D represents the number of features, and Θ is a model training parameter.
6. A storage medium having stored therein a computer program which, when executed by a processor, causes the processor to perform the graph neural network-based vehicle speed prediction method of any one of claims 1-4.
7. A computing device comprising a processor and a memory for storing a program executable by the processor, wherein the processor, when executing the program stored in the memory, implements the graph neural network-based vehicle speed prediction method of any one of claims 1-4.
CN202210191590.5A 2022-02-28 2022-02-28 Vehicle speed prediction method, device, medium and equipment based on graph neural network Active CN114572229B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210191590.5A CN114572229B (en) 2022-02-28 2022-02-28 Vehicle speed prediction method, device, medium and equipment based on graph neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210191590.5A CN114572229B (en) 2022-02-28 2022-02-28 Vehicle speed prediction method, device, medium and equipment based on graph neural network

Publications (2)

Publication Number Publication Date
CN114572229A CN114572229A (en) 2022-06-03
CN114572229B true CN114572229B (en) 2024-06-11

Family

ID=81777032

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210191590.5A Active CN114572229B (en) 2022-02-28 2022-02-28 Vehicle speed prediction method, device, medium and equipment based on graph neural network

Country Status (1)

Country Link
CN (1) CN114572229B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115512545B (en) * 2022-09-30 2023-06-27 浙江财经大学 Traffic speed prediction method based on space-time dynamic graph convolution network
CN116443031B (en) * 2023-03-24 2023-10-20 凯晟动力技术(嘉兴)有限公司 Wheel speed processing system and method of vehicle body electronic stability control system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112561146B (en) * 2020-12-08 2023-04-18 哈尔滨工程大学 Large-scale real-time traffic flow prediction method based on fuzzy logic and depth LSTM

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
图卷积神经网络理论与应用;仝宗和;袁立宁;王洋;;信息技术与信息化;20200228(第02期);全文 *
基于时空信息的交通流预测;周明;卓为;郭志鹏;;工业控制计算机;20200425(第04期);全文 *

Also Published As

Publication number Publication date
CN114572229A (en) 2022-06-03

Similar Documents

Publication Publication Date Title
CN110223517B (en) Short-term traffic flow prediction method based on space-time correlation
CN112418547B (en) Bus stop passenger flow prediction method based on GCN-LSTM combination model
CN114572229B (en) Vehicle speed prediction method, device, medium and equipment based on graph neural network
CN108648457B (en) Method, device and computer readable storage medium for speed prediction
Bae et al. Monthly dam inflow forecasts using weather forecasting information and neuro-fuzzy technique
CN111210633A (en) Short-term traffic flow prediction method based on deep learning
CN110991713A (en) Irregular area flow prediction method based on multi-graph convolution sum GRU
CN102622418B (en) Prediction device and equipment based on BP (Back Propagation) nerve network
CN110942637B (en) SCATS system road traffic flow prediction method based on airspace map convolutional neural network
CN112819136A (en) Time sequence prediction method and system based on CNN-LSTM neural network model and ARIMA model
CN110543543A (en) user movement behavior prediction method and device based on multi-granularity neural network
CN110570035B (en) People flow prediction system for simultaneously modeling space-time dependency and daily flow dependency
CN109583565A (en) Forecasting Flood method based on the long memory network in short-term of attention model
CN113762338B (en) Traffic flow prediction method, equipment and medium based on multiple graph attention mechanism
CN106910199A (en) Towards the car networking mass-rent method of city space information gathering
CN112766600B (en) Urban area crowd flow prediction method and system
CN108091166A (en) Forecasting Methodology, device, equipment and the storage medium of available parking places number of variations
Li et al. Decomposition integration and error correction method for photovoltaic power forecasting
CN111160659B (en) Power load prediction method considering temperature fuzzification
CN110363349A (en) A kind of LSTM neural network hydrologic(al) prognosis method and system based on ASCS
CN112733307B (en) Urban natural gas load prediction method and device in heating season
CN112766603A (en) Traffic flow prediction method, system, computer device and storage medium
CN114492978A (en) Time-space sequence prediction method and device based on multi-layer attention mechanism
CN115376317B (en) Traffic flow prediction method based on dynamic graph convolution and time sequence convolution network
CN107704426A (en) Water level prediction method based on extension wavelet-neural network model

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