CN115953907A - Traffic speed prediction method based on time-space gating graph convolution network and application thereof - Google Patents

Traffic speed prediction method based on time-space gating graph convolution network and application thereof Download PDF

Info

Publication number
CN115953907A
CN115953907A CN202211563036.1A CN202211563036A CN115953907A CN 115953907 A CN115953907 A CN 115953907A CN 202211563036 A CN202211563036 A CN 202211563036A CN 115953907 A CN115953907 A CN 115953907A
Authority
CN
China
Prior art keywords
space
time
traffic speed
traffic
gating
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.)
Pending
Application number
CN202211563036.1A
Other languages
Chinese (zh)
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.)
CCI China Co Ltd
Original Assignee
CCI China 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 CCI China Co Ltd filed Critical CCI China Co Ltd
Priority to CN202211563036.1A priority Critical patent/CN115953907A/en
Publication of CN115953907A publication Critical patent/CN115953907A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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

  • Traffic Control Systems (AREA)

Abstract

The application provides a traffic speed prediction method based on a space-time gating graph convolutional network and application thereof, and the method comprises the steps of firstly, obtaining traffic speed data through a sensor arranged on a traffic road to train a deep learning model, then, generating a global space graph with more comprehensive space characteristics by combining spatial position information of the sensor on the road with a K-hop algorithm, then, inputting the generated global space graph and the traffic speed data into the space-time gating graph convolutional network to extract time-varying space characteristics and time characteristics, then, extracting the global characteristics by using a self-attention module, and finally, outputting predicted future traffic speed data by using a fully-connected network. The model of the application pays attention to spatial information hidden in a traffic network, time-varying characteristics of spatial characteristics and global characteristics, and the accuracy of traffic speed prediction is effectively improved.

Description

Traffic speed prediction method based on time-space gating graph convolution network and application thereof
Technical Field
The application relates to the field of time sequence prediction, in particular to a traffic speed prediction method based on a time-space gating graph convolution network and application thereof.
Background
With the development of cities, traffic congestion becomes an increasingly serious problem, and accurate traffic speed prediction is a key to solving the problem. The reliable traffic speed prediction can not only help governments to reasonably arrange tidal lanes, but also help citizens to reasonably arrange travel roads, however, traffic networks have complex space-time relevance, so that the traffic speed is difficult to accurately predict.
The traffic speed has obvious periodicity in a day, the spatial position of the sensor has a great influence on the traffic speed, and the current traffic speed is also related to weather, traffic flow, time and the like, but the appearance is reflected in the time characteristic and the spatial characteristic, and the connection between the time characteristic and the spatial characteristic can be captured through a training model. The spatial dependence between traffic sensors is very important for accurate traffic speed prediction, but the current method usually ignores the time-varying characteristic of the spatial characteristic or only obtains the local spatial characteristic, so that the prediction effect is not ideal.
Therefore, a traffic speed prediction method based on a spatio-temporal gating graph convolution network and an application thereof are urgently needed to solve the problems in the prior art.
Disclosure of Invention
The embodiment of the application provides a traffic speed prediction method based on a time-space gating graph convolution network and application thereof, and aims to solve the problem that in the prior art, the time-varying characteristic of spatial characteristics is ignored or only local spatial characteristics are ignored, so that the prediction precision is low.
The core technology of the invention is mainly capable of analyzing sensor data and a distribution diagram of a sensor arranged on a road by utilizing technologies such as deep learning, time series data processing and the like to predict the traffic speed of the road after a certain time.
In a first aspect, the present application provides a traffic speed prediction method based on a convolutional network of a space-time gating graph, the method comprising the following steps:
s00, acquiring traffic speed data at a certain moment as a data set, wherein the traffic speed data are derived from a plurality of sensors arranged on a traffic road;
s10, inputting the spatial position information and traffic speed data of each sensor on a traffic road into a time-space gating graph convolution network so as to train and generate parameters of a space graph generation module, a time-space gating circulation unit module and a self-attention module of the time-space gating graph convolution network;
s20, in a space map generation module, generating an adjacency matrix by using a Gaussian kernel function with a threshold value and the space position information of the sensor, and generating a global space map based on the adjacency matrix;
s30, inputting the traffic speed data and the global space map into a time-space gate control circulation unit module to extract time-varying spatial features and time features in the traffic network;
s40, inputting the time-varying spatial features and the time features into a self-attention module, performing position coding, and inputting data obtained by the position coding into the self-attention module to extract global features in traffic data to be predicted;
and S50, outputting a traffic speed prediction result by using a full-link layer of the time-space gate control graph convolutional network, wherein the full-link layer is used as an output layer.
Further, in the step S00, missing value completion is performed on the data set, and the data set is divided into a training set, a verification set, and a test set according to a set proportion.
Further, in the step S10, the spatio-temporal gating graph convolution network uses a mean square error as a loss function, and uses a mean absolute error, a root mean square error, and a mean absolute percentage error as evaluation indexes.
Further, in step S20, a global space map is generated by combining the adjacency matrix with the K-hop algorithm.
Further, in step S40, the traffic speed data and the global space map are subjected to sinusoidal position coding, and then the self-attention module is used to extract global features in the predicted traffic data.
Further, in step S40, the self-attention module adopts a multi-head self-attention mechanism.
Further, in the step S40, the model training efficiency of the spatio-temporal gating graph convolution network is improved by adding a residual network of a plurality of branches, and different activation functions are added to at least two branches.
In a second aspect, the present application provides a traffic speed prediction apparatus based on a convolutional network of space-time gating patterns, comprising:
the system comprises an input module, a data acquisition module and a data processing module, wherein the input module is used for inputting acquired traffic speed data at a certain moment as a data set, and the traffic speed data is derived from a plurality of sensors arranged on a traffic road; inputting an input to be predicted into a model training module;
the model training module is used for inputting the spatial position information and traffic speed data of each sensor on a traffic road into the time-space gating graph convolution network so as to train and generate parameters of a space graph generation module, a time-space gating circulation unit module and a self-attention module of the time-space gating graph convolution network; in a space map generation module, generating an adjacency matrix by using a Gaussian kernel function with a threshold and the space position information of the sensor, and generating a global space map based on the adjacency matrix; inputting the traffic speed data and the global space map into a time-space gate control circulation unit module to extract time-varying spatial features and time features in a traffic network; inputting the time-varying spatial features and the time features into a self-attention module, performing position coding, and inputting data obtained by the position coding into the self-attention module to extract global features in traffic data to be predicted;
and the output module is used for outputting the traffic speed prediction result by utilizing a full connection layer of the time-space gate control graph convolutional network, wherein the full connection layer is used as an output layer.
In a third aspect, the present application provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the computer program to execute the traffic speed prediction method based on the spatio-temporal gating graph convolutional network.
In a fourth aspect, the present application provides a readable storage medium having stored therein a computer program comprising program code for controlling a process to execute a process comprising a traffic speed prediction method according to the above-described spatiotemporal gating map-based convolutional network.
The main contributions and innovation points of the invention are as follows: 1. compared with the prior art, the traffic input is predicted by a model formed by training of the time-space gated convolutional network by fully considering complete spatial characteristics and time-varying characteristics, spatial information hidden in a traffic network, time-varying characteristics of the spatial characteristics and global characteristics, so that the influence caused by obvious periodicity of the current traffic speed and different spatial positions of sensors can be well solved, and more accurate prediction data can be obtained;
2. compared with the prior art, the method can still adopt the current common mode of acquiring the traffic speed data by the sensor without changing the structure of a hardware part, thereby obviously reducing the improvement cost;
3. compared with the prior art (similar to a method for analyzing traffic speed by utilizing space-time gating), the method has the advantages that the structural main body is the cyclic gating unit and the graph convolution network, gating convolution is not adopted, the graph convolution calculation method is changed in the graph convolution network, the graph convolution calculation method is used as a gating unit and added into the cyclic gating unit, space-time characteristics are better fused, and the method is substantially different from the prior art;
4. compared with the prior art, the method and the device have the advantages that the problem that the cyclic gate control unit cannot capture the bidirectional spatial relationship is also considered besides the space-time characteristics, the self-attention module is added to obtain the global characteristics of the cyclic gate control unit, a new residual error network is provided to improve the training effect of the model, the key point is that the residual error network is a new structure, and the residual error structure is not seen to appear in other places at present.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more concise and understandable description of the application, and features, objects, and advantages of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart of a traffic speed prediction method based on a spatiotemporal gating graph convolutional network according to an embodiment of the present application;
FIG. 2 is a diagram of a network architecture as employed by the present application;
FIG. 3 is a block diagram of a spatiotemporal gating cycle unit of the present application;
fig. 4 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of one or more embodiments of the specification, as detailed in the claims that follow.
It should be noted that: in other embodiments, the steps of the corresponding methods are not necessarily performed in the order shown and described herein. In some other embodiments, the methods may include more or fewer steps than those described herein. Moreover, a single step described in this specification may be broken down into multiple steps in other embodiments; multiple steps described in this specification may be combined into a single step in other embodiments.
The current method usually ignores the time-varying characteristic of the spatial feature or only obtains the local spatial feature, which causes the problem of inaccurate prediction.
Based on the space-time gating graph convolution network, the model obtained by the space-time gating graph convolution network training adopts a space-time gating circulation unit module to extract time-varying spatial characteristics ST and time characteristics T in a traffic network, utilizes a self-attention module to extract global characteristics G in traffic data, and finally utilizes a full-connection layer to obtain final traffic speed prediction data, so that the problems in the prior art are solved.
Example one
The application aims to provide a traffic speed prediction method based on a spatio-temporal gating graph convolution network, and particularly, referring to fig. 1, the method comprises the following steps:
s00, acquiring traffic speed data at a certain moment as a data set, wherein the traffic speed data are derived from a plurality of sensors arranged on a traffic road;
in the embodiment, N sensors are arranged on a traffic road, traffic speed data at t moments are collected as a data set, and the data are
Figure BDA0003985489890000051
Represents the value at the ith sensor at time t;
preferably, N sensors are arranged on the road, the traffic speed data is collected once every 30 seconds, the traffic speed data is aggregated into data every 5 minutes when the sensors are used, and the traffic speed data of p moments is collected (N is a time period of one minute)
Figure BDA0003985489890000052
Representing the value in the ith sensor at time t) as a data set. Complementing the data set using a linear interpolation methodAnd (3) dividing the labeled data sample into a training set, a verification set and a test set according to the formula of 7, and finally adopting a Z-Score method to carry out standardization processing on the input data, wherein the Z-Score method formula is as follows:
Figure BDA0003985489890000061
wherein Z is the normalized data, X is the traffic speed data, mu is the mean value of the traffic speed data, and s is the variance of the traffic speed data.
S10, inputting the spatial position information and traffic speed data of each sensor on a traffic road into a time-space gating graph convolution network so as to train and generate parameters of a space graph generation module, a time-space gating circulation unit module and a self-attention module of the time-space gating graph convolution network;
in the present embodiment, as shown in fig. 2, the spatial position information of the sensor on the traffic road and the collected traffic speed data are input into the time-space gated graph convolution network to train the parameters of the space graph generation module, the time-space gated cycle unit module and the self-attention module (i.e. trainable parameters, such as the weight parameter W of the space graph generation module) 1 ,W 2 ,...,W k Weight parameters in space-time gated cyclic units
Figure BDA0003985489890000062
And matrix W in the self-attention module q 、W k And W v )。
Preferably, the space-time gating graph convolution network of the application adopts Mean Square Error (MSE) as a loss function, and average absolute error (MAE), mean square error (RMSE) and average absolute percentage error (MAPE) as evaluation indexes, and the calculation method is as follows:
Figure BDA0003985489890000063
Figure BDA0003985489890000064
Figure BDA0003985489890000071
Figure BDA0003985489890000072
/>
wherein mean is the average, H is the predicted time length, N is the number of sensors,
Figure BDA0003985489890000075
for the actual value at time t of the i-th sensor>
Figure BDA0003985489890000074
The predicted value of the ith sensor at the time t is shown.
Preferably, in the specific training process, the network input is the traffic speed data at T moments and the global space map G generated by the space map generating module st And outputting the traffic speed prediction data and the value of the loss function at the next moment. The specific parameters used in the training process are set as follows: the batch size is set to be 200, the total iteration number is set to be 100, the optimizer is set to be Adam, the initial learning rate is set to be 0.002 for training, and when the loss value loss of the network tends to be stable or the iteration number reaches 100, the training is stopped to obtain a final model.
Preferably, in the test process of the concrete model, traffic speed data and a global space map G at T moments of a test set are input st And the traffic speed prediction data at the next moment and the values of the three evaluation indexes are output.
S20, in a space map generation module, generating an adjacency matrix by using a Gaussian kernel function with a threshold and the space position information of the sensor, and generating a global space map based on the adjacency matrix;
in this embodiment, sensing is utilized in the spatial map generation moduleGenerating adjacency matrix A epsilon R by using spatial position information of device on traffic road and Gaussian kernel function with threshold value N×N Then using K-hop algorithm and adjacency matrix A ∈ R N×N Generating a global spatial map G st
Preferably, with particular reference to part A in FIG. 2, the adjacency matrix A ∈ R N×N : according to the spatial position distribution of the sensors, an adjacency matrix A belonging to R with local spatial characteristics is generated by utilizing a Gaussian kernel function with a threshold value N×N The formula of the gaussian kernel function with threshold is as follows:
Figure BDA0003985489890000081
wherein, W ij Is the spatial correlation degree between the sensor i and the sensor j, dis (i, j) is the Euclidean distance between the sensor i and the sensor j, and K is a set threshold value. Combining the calculated spatial correlation degrees W among all the sensors to obtain an adjacency matrix A belonging to R with local spatial characteristics N×N
K-hop adjacency matrix: let the adjacency matrix A be R N×N Combining with K-hop algorithm to obtain more comprehensive space characteristics, and in order to perform square calculation, making the adjacency matrix A be equal to R N×N Adding the unit diagonal matrix I, and then combining a K-hop algorithm to obtain a K-hop adjacency matrix, wherein the formula is as follows:
Figure BDA0003985489890000082
wherein the content of the first and second substances,
Figure BDA0003985489890000083
k is the K-hop adjacency matrix, K is the parameters of the K-hop algorithm, and norm is the min-max normalization function to ensure that each element in it is between 0 and 1.
Global space map G st : the K-hop adjacency matrixes generated by different K values contain space characteristics of different receptive fields, and in order to fuse the space characteristics, a space with a global space is obtainedGlobal space map G of inter-features st For these, the K-hop adjacency matrix is processed as follows:
Figure BDA0003985489890000084
/>
wherein relu is the relu activation function, layerorm is the layer normalization, W 1 ,W 2 ,...,W k Are trainable parameters.
S30, comparing the traffic speed data with the global space map G st Inputting the time-space gate control cycle unit module to extract time-varying spatial characteristics ST and time characteristics T in a traffic network;
in this embodiment, referring to part B of FIG. 2, to extract the time-varying spatial signature ST and the temporal signature T, the graph convolution network is used as a new spatial gate S g An update gate Z embedded in the cyclic gate control unit g And a reset gate r g And a space-time gating circulation unit is formed, and referring to fig. 3, the space-time gating circulation unit is one implementation mode of a module.
In this embodiment, the global space diagram G will be used when training and using the space-time gating cycle unit st And all traffic speed data at time t are input to the space gate S g The graph convolution operation is carried out, the time-varying spatial characteristic ST is obtained after a plurality of cycles, and meanwhile, the traffic speed data of the sensor to be predicted at the time t is input into an updating door Z g And a reset gate r g The time characteristic T is extracted, in order to avoid redundancy of input data, the data of a sensor to be predicted needs to be removed during graph convolution, so that a graph convolution calculation method is changed, and a new K-hop graph convolution calculation method has the following formula:
KGC=(G st -diag(G st ))⊙X t
in which KGC is the K-hop graph convolution, diag is a function to obtain the diagonal matrix, X t All traffic speed data at time t.
Couple KGC with reset gate r g The output values are added, and then the values obtained by the addition are used to generate the temporary filterTemporal cell state
Figure BDA0003985489890000091
Finally temporary cell status>
Figure BDA0003985489890000092
And update gate Z g Multiply to obtain the cell status at time t>
Figure BDA00039854898900000910
(i.e. the traffic speed characteristic at time t->
Figure BDA0003985489890000094
) The space-time gating cyclic unit formula is as follows:
Figure BDA0003985489890000095
Figure BDA0003985489890000096
Figure BDA0003985489890000097
Figure BDA0003985489890000098
Figure BDA0003985489890000099
wherein
Figure BDA0003985489890000101
Is a learnable weight matrix, b r ,b z And b n Is a bias that is a function of the bias,
Figure BDA0003985489890000102
is the cell state at time t-1, σ and tanh are sigmoid activation function and tanh activation function, respectively, is a matrix multiplication, and is a Hadamard product. After T space-time cyclic gate control units are passed, the obtained T traffic speed features are spliced together, and the global feature G is extracted.
S40, inputting the time-varying spatial feature ST and the time feature T into a self-attention module, performing position coding, and inputting data obtained by the position coding into the self-attention module to extract a global feature G in traffic data to be predicted;
in the present embodiment, referring to part C in fig. 2, in the position coding, the sinusoidal position coding is performed on the input features first, so as to prevent the temporal correlation between traffic speeds from being ignored when extracting the global features, and the sinusoidal position coding calculation method is as follows:
Figure BDA0003985489890000103
in the formula, pe pos For position-coded values sin and cos are sine and cosine functions, respectively, d model For the feature dimension, i is the encoding position, and i ∈ {1 model /2}. After the position-coded value is calculated, it is added directly to the input features, but does not participate in the back propagation.
Preferably, after the position encoding, the global feature of the traffic data is acquired by using a self-attention layer, wherein the self-attention layer uses a multi-head self-attention mechanism, and the calculation method of the multi-head self-attention mechanism is as follows:
Q=x t ·W q ;K=x t ·W k ;V=x t ·W v
Figure BDA0003985489890000111
head n =Attention(Q n ,K n V n )W n
Multihead(x t )=Concai(head 1 ,…,head n )
wherein Q, K and V are respectively a query vector, a key value vector and a content vector, W q ,W k And Wv are three trainable matrices, x t For the input features, softmax is the softmax function, d k For the feature dimension, attention (Q, K, V) is the self-Attention weight between sensors, n denotes the nth self-Attention head, multihead (x) t ) For a multi-headed self-attention output value, concat is the splicing function.
Preferably, after the self-attention layer, a residual error network is used to improve the training efficiency of the model, reduce the risk of gradient explosion during training and obtain global features of multiple aspects. In order to make the residual error network better suitable for traffic speed prediction, a conventional residual error network is added to three branches, and different activation functions are added to two branches, and the specific calculation method is as follows:
output=layernorm(σ(value)+relu(value)+value)
in the formula, output is global feature G after normalization, layerorm is layer normalization, sigma and relu are sigmoid activation function and relu activation function respectively, and value is input feature.
And S50, outputting a traffic speed prediction result by using a full-link layer of the time-space gate control graph convolutional network, wherein the full-link layer is used as an output layer.
Example two
Based on the same conception, the application also provides a traffic speed prediction device based on the convolution network of the space-time gating graph, which comprises the following steps:
the system comprises an input module, a data acquisition module and a data processing module, wherein the input module is used for inputting acquired traffic speed data at a certain moment as a data set, and the traffic speed data is derived from a plurality of sensors arranged on a traffic road; inputting an input to be predicted into a model training module;
the model training module is used for inputting the spatial position information and traffic speed data of each sensor on a traffic road into the time-space gating graph convolution network so as to train and generate parameters of a space graph generation module, a time-space gating circulation unit module and a self-attention module of the time-space gating graph convolution network; in a space map generation module, generating an adjacency matrix by using a Gaussian kernel function with a threshold and the space position information of the sensor, and generating a global space map based on the adjacency matrix; inputting the traffic speed data and the global space map into a time-space gate control circulation unit module to extract time-varying spatial features and time features in a traffic network; inputting the time-varying spatial features and the time features into a self-attention module, performing position coding, and inputting data obtained by the position coding into the self-attention module to extract global features in traffic data to be predicted;
and the output module is used for outputting the traffic speed prediction result by utilizing a full connection layer of the time-space gate control graph convolutional network, wherein the full connection layer is used as an output layer.
EXAMPLE III
The present embodiment also provides an electronic device, referring to fig. 4, comprising a memory 404 and a processor 402, wherein the memory 404 stores a computer program, and the processor 402 is configured to execute the computer program to perform the steps of any of the above method embodiments.
Specifically, the processor 402 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
Memory 404 may include, among other things, mass storage 404 for data or instructions. By way of example, and not limitation, memory 404 may include a hard disk drive (hard disk drive, HDD for short), a floppy disk drive, a solid state drive (SSD for short), flash memory, an optical disk, a magneto-optical disk, tape, or a Universal Serial Bus (USB) drive or a combination of two or more of these. Memory 404 may include removable or non-removable (or fixed) media, where appropriate. The memory 404 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 404 is a Non-Volatile (Non-Volatile) memory. In certain embodiments, memory 404 includes Read-only memory (ROM) and Random Access Memory (RAM). The ROM may be mask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or FLASH memory (FLASH), or a combination of two or more of these, where appropriate. The RAM may be a static random-access memory (SRAM) or a dynamic random-access memory (DRAM), where the DRAM may be a fast page mode dynamic random-access memory 404 (FPMDRAM), an extended data output dynamic random-access memory (EDODRAM), a synchronous dynamic random-access memory (SDRAM), or the like.
Memory 404 may be used to store or cache various data files for processing and/or communication use, as well as possibly computer program instructions for execution by processor 402.
The processor 402 reads and executes computer program instructions stored in the memory 404 to implement any of the methods of traffic speed prediction based on spatiotemporal gating graph convolution networks in the above embodiments.
Optionally, the electronic apparatus may further include a transmission device 406 and an input/output device 408, where the transmission device 406 is connected to the processor 402, and the input/output device 408 is connected to the processor 402.
The transmitting device 406 may be used to receive or transmit data via a network. Specific examples of the network described above may include wired or wireless networks provided by communication providers of the electronic devices. In one example, the transmission device includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmitting device 406 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
The input and output devices 408 are used to input or output information. In the present embodiment, the input information may be traffic data to be predicted or the like, and the output information may be a final traffic speed prediction result or the like.
Example four
The embodiment also provides a readable storage medium, wherein a computer program is stored in the readable storage medium, the computer program comprises program codes for controlling a process to execute the process, and the process comprises the traffic speed prediction method based on the space-time gating graph convolution network according to the embodiment A.
It should be noted that, for specific examples in this embodiment, reference may be made to examples described in the foregoing embodiments and optional implementations, and details of this embodiment are not described herein again.
In general, the various embodiments may be implemented in hardware or special purpose circuits, software, logic or any combination thereof. Some aspects of the invention may be implemented in hardware, while other aspects may be implemented in firmware or software which may be executed by a controller, microprocessor or other computing device, although the invention is not limited thereto. While various aspects of the invention may be illustrated and described as block diagrams, flow charts, or using some other pictorial representation, it is well understood that these blocks, apparatus, systems, techniques or methods described herein may be implemented in, as non-limiting examples, hardware, software, firmware, special purpose circuits or logic, general purpose hardware or controller or other computing devices, or some combination thereof.
Embodiments of the invention may be implemented by computer software executable by a data processor of the mobile device, such as in a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets and/or macros can be stored in any device-readable data storage medium and they include program instructions for performing particular tasks. The computer program product may include one or more computer-executable components configured to perform embodiments when the program is run. The one or more computer-executable components may be at least one software code or a portion thereof. Further in this regard it should be noted that any block of the logic flow as in the figures may represent a program step, or an interconnected logic circuit, block and function, or a combination of a program step and a logic circuit, block and function. The software may be stored on physical media such as memory chips or memory blocks implemented within the processor, magnetic media such as hard or floppy disks, and optical media such as, for example, DVDs and data variants thereof, CDs. The physical medium is a non-transitory medium.
It should be understood by those skilled in the art that various features of the above embodiments can be combined arbitrarily, and for the sake of brevity, all possible combinations of the features in the above embodiments are not described, but should be considered as within the scope of the present disclosure as long as there is no contradiction between the combinations of the features.
The above examples are merely illustrative of several embodiments of the present application, and the description is more specific and detailed, but not to be construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. The traffic speed prediction method based on the spatio-temporal gating graph convolution network is characterized by comprising the following steps of:
s00, acquiring traffic speed data at a certain moment as a data set, wherein the traffic speed data are derived from a plurality of sensors arranged on a traffic road;
s10, inputting the spatial position information and the traffic speed data of each sensor on the traffic road into a time-space gating graph convolution network so as to train and generate parameters of a space graph generation module, a time-space gating circulation unit module and a self-attention module of the time-space gating graph convolution network;
s20, in the space map generation module, generating an adjacency matrix by using a Gaussian kernel function with a threshold value and the space position information of the sensor, and generating a global space map based on the adjacency matrix;
s30, inputting the traffic speed data and the global space map into the space-time gating circulation unit module to extract time-varying space features and time features in a traffic network;
s40, inputting the time-varying spatial features and the time features into the self-attention module, performing position coding, and inputting data obtained by the position coding into the self-attention module to extract global features in traffic data to be predicted;
and S50, outputting a traffic speed prediction result by utilizing a full-connection layer of the time-space gate control graph convolutional network, wherein the full-connection layer is used as an output layer.
2. The method for predicting the traffic speed based on the spatio-temporal gating graph convolution network as claimed in claim 1, wherein in the step S00, missing value completion is performed on the data set, and the data set is divided into a training set, a verification set and a test set according to a set proportion.
3. The method for predicting traffic speed according to claim 1, wherein in step S10, the spatio-temporal gating graph convolutional network takes mean square error as a loss function, and takes mean absolute error, root mean square error and mean absolute percentage error as evaluation indexes.
4. The method for predicting traffic speed based on the spatio-temporal gate map convolutional network as set forth in claim 1, wherein in the S20 step, a global spatial map is generated by combining the adjacency matrix with a K-hop algorithm.
5. The method for predicting traffic speed based on the spatio-temporal gate diagram convolutional network as set forth in claim 1, wherein in the step S40, the traffic speed data and the global spatial diagram are subjected to sinusoidal position coding, and then the self-attention module is used to extract global features in the predicted traffic data.
6. The method for predicting traffic speed based on the spatiotemporal gating graph convolution network as claimed in claim 5, wherein in the step S40, the self-attention module adopts a multi-head self-attention mechanism.
7. The method for predicting traffic speed based on the spatio-temporal gating graph convolution network as claimed in claim 1, wherein in the step S40, the model training efficiency of the spatio-temporal gating graph convolution network is improved by adding a residual error network of a plurality of branches, and different activation functions are added to at least two branches.
8. Traffic speed prediction device based on time-space gating graph convolution network, its characterized in that includes:
the system comprises an input module, a data acquisition module and a data processing module, wherein the input module is used for inputting acquired traffic speed data at a certain moment as a data set, and the traffic speed data is derived from a plurality of sensors arranged on a traffic road; inputting an input to be predicted into a model training module;
the model training module is used for inputting the spatial position information and traffic speed data of each sensor on a traffic road into the time-space gating graph convolution network so as to train and generate parameters of a space graph generation module, a time-space gating circulation unit module and a self-attention module of the time-space gating graph convolution network; in a space map generation module, generating an adjacency matrix by using a Gaussian kernel function with a threshold and the space position information of the sensor, and generating a global space map based on the adjacency matrix; inputting the traffic speed data and the global space map into a time-space gate control circulation unit module to extract time-varying spatial features and time features in a traffic network; inputting the time-varying spatial features and the time features into a self-attention module, performing position coding, and inputting data obtained by the position coding into the self-attention module to extract global features in traffic data to be predicted;
and the output module is used for outputting the traffic speed prediction result by utilizing a full connection layer of the time-space gate control graph convolutional network, wherein the full connection layer is used as an output layer.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to perform the method for predicting traffic speed based on a spatiotemporal gating graph convolution network according to any one of claims 1 to 7.
10. A readable storage medium having stored therein a computer program comprising program code for controlling a process to execute a process, the process comprising a method of traffic speed prediction based on a spatio-temporal gating graph convolution network according to any one of claims 1 to 7.
CN202211563036.1A 2022-12-07 2022-12-07 Traffic speed prediction method based on time-space gating graph convolution network and application thereof Pending CN115953907A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211563036.1A CN115953907A (en) 2022-12-07 2022-12-07 Traffic speed prediction method based on time-space gating graph convolution network and application thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211563036.1A CN115953907A (en) 2022-12-07 2022-12-07 Traffic speed prediction method based on time-space gating graph convolution network and application thereof

Publications (1)

Publication Number Publication Date
CN115953907A true CN115953907A (en) 2023-04-11

Family

ID=87295933

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211563036.1A Pending CN115953907A (en) 2022-12-07 2022-12-07 Traffic speed prediction method based on time-space gating graph convolution network and application thereof

Country Status (1)

Country Link
CN (1) CN115953907A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116187210A (en) * 2023-05-04 2023-05-30 生态环境部华南环境科学研究所(生态环境部生态环境应急研究所) Time-space multisource offshore area water quality time sequence prediction method of LSTM coupling mechanism model
CN117485115A (en) * 2023-11-02 2024-02-02 广州市双宝电子科技股份有限公司 Speed limiting device for new energy automobile

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116187210A (en) * 2023-05-04 2023-05-30 生态环境部华南环境科学研究所(生态环境部生态环境应急研究所) Time-space multisource offshore area water quality time sequence prediction method of LSTM coupling mechanism model
CN117485115A (en) * 2023-11-02 2024-02-02 广州市双宝电子科技股份有限公司 Speed limiting device for new energy automobile
CN117485115B (en) * 2023-11-02 2024-05-28 广州市双宝电子科技股份有限公司 Speed limiting device for new energy automobile

Similar Documents

Publication Publication Date Title
Tekouabou et al. Improving parking availability prediction in smart cities with IoT and ensemble-based model
CN110827544B (en) Short-term traffic flow control method based on graph convolution recurrent neural network
CN115240425B (en) Traffic prediction method based on multi-scale space-time fusion graph network
CN115953907A (en) Traffic speed prediction method based on time-space gating graph convolution network and application thereof
Engelke et al. Estimation of hüsler–reiss distributions and brown–resnick processes
CN109120462B (en) Method and device for predicting opportunistic network link and readable storage medium
EP3767541A1 (en) A machine learnable system with conditional normalizing flow
CN112910711B (en) Wireless service flow prediction method, device and medium based on self-attention convolutional network
CN113762595B (en) Traffic time prediction model training method, traffic time prediction method and equipment
CN111047078B (en) Traffic characteristic prediction method, system and storage medium
CN113068131B (en) Method, device, equipment and storage medium for predicting user movement mode and track
CN112926742A (en) Holographic quantum dynamics simulation
CN114944053A (en) Traffic flow prediction method based on spatio-temporal hypergraph neural network
CN114694379B (en) Traffic flow prediction method and system based on self-adaptive dynamic graph convolution
Arunan et al. A federated learning-based industrial health prognostics for heterogeneous edge devices using matched feature extraction
Rivera-Muñoz et al. Missing data estimation in a low-cost sensor network for measuring air quality: A case study in Aburrá Valley
CN117407781A (en) Equipment fault diagnosis method and device based on federal learning
CN117076993A (en) Multi-agent game decision-making system and method based on cloud protogenesis
Liu et al. An adaptive traffic flow prediction model based on spatiotemporal graph neural network
CN116579468A (en) Typhoon generation prediction method, device, equipment and medium based on cloud system memory
CN113723006B (en) LS-SVM (least squares-support vector machine) -based single-station earth change magnetic field modeling prediction method and system
CN112668797B (en) Long-short-period traffic prediction method
Huang et al. Short-term traffic flow prediction based on graph convolutional network embedded lstm
Phung et al. Unsupervised Air Quality Interpolation with Attentive Graph Neural Network
CN117271959B (en) Uncertainty evaluation method and equipment for PM2.5 concentration prediction result

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