Highway toll station flow prediction method and system

Through the STGATwE model combined with the graph attention mechanism and convolutional neural network, the traffic flow transfer characteristics between highway toll stations is used to solve the problem of neglecting the traffic transfer characteristics of space dimension prediction in the existing technology, and more accurate highway tolls are achieved Station traffic forecasting improves traffic management efficiency.

CN117809456BActive Publication Date: 2024-12-31SHANDONG HI SPEED QINGDAO HIGHWAY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311861040.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-31
Publication Date
2024-12-31
Estimated Expiration
2043-12-31

AI Technical Summary

Technical Problem

The existing highway toll station flow prediction method ignores the traffic transfer characteristics of traffic flow in the spatial dimension, resulting in the time when calculating the spatial correlation between different nodes, and failing to accurately reflect the actual situation. .

Method used

Using the STGATwE traffic flow spatiotemporal prediction model, combined with the graph attention mechanism and convolutional neural network, the traffic flow transfer characteristics and traffic spatiotemporal characteristics between sites are used to predict through the spatiotemporal convolution module and the output module, and time and space characteristics are extracted to generate More accurate traffic prediction results.

Benefits of technology

By constructing the STGATwE model, it can more accurately predict the flow of highway toll stations, which improves the accuracy and practical application value of prediction, and provides more effective traffic management and control means.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117809456B_ABST
    Figure CN117809456B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for predicting traffic flow at highway toll stations, comprising: obtaining traffic flow data of each toll station in each time interval for prediction; inputting the obtained traffic flow data of each toll station in each time interval for prediction into a pre-trained traffic prediction model, and determining the future toll station traffic flow according to the output of the traffic prediction model; wherein, the training method of the traffic prediction model comprises: obtaining traffic flow data samples of each toll station in each time interval; pre-processing the traffic flow data samples to obtain a training sample library; obtaining manual annotation information of the traffic data in the training sample library, and establishing a training sample set and a test sample set; using the training sample set and the test sample set to train a pre-constructed STGATwE traffic flow spatiotemporal prediction network to obtain a STGATwE traffic flow spatiotemporal prediction model, which uses the traffic flow transfer characteristics of highway toll stations and the traffic spatiotemporal characteristics of traffic toll stations to make accurate predictions of traffic flow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent transportation technology, and specifically refers to a method and system for predicting traffic flow at a highway toll station. Background Art

[0002] In recent years, with the development of the economy, the number of cars and traffic in my country has continued to increase, which has promoted the rapid development of highway infrastructure construction. According to statistics from the Ministry of Public Security and the Ministry of Transport, by the end of 2022, my country's car ownership will reach 319 million, and the mileage of highways will reach 177,000 kilometers. At the same time, emerging technologies such as the Internet of Things, big data, and cloud computing continue to emerge, giving rise to the development of intelligent transportation systems. As one of the effective means of traffic management, intelligent transportation systems can provide assistance to traffic management departments and travelers by collecting, processing, and analyzing traffic information.

[0003] Due to the rapid growth of automobile ownership and the development of highway infrastructure, the traffic pressure of highway network has increased, the traffic congestion problem has become more prominent, and the importance of intelligent transportation system has become more obvious. As the core basic content of information processing in intelligent transportation system, short-term traffic flow prediction has received a lot of attention and research. Short-term traffic flow prediction refers to the prediction of future traffic flow information, such as traffic volume and traffic flow speed, through data preprocessing, model building and other methods after obtaining traffic information with the help of various acquisition equipment. At present, a large number of related studies focus on the traffic flow prediction of a certain cross-section of the road section, and there are fewer studies on the traffic flow of highway toll stations. However, with the completion of my country's highway network toll collection system, the advantages of highway toll data are very prominent. First, the nodes of the highway network can reflect a lot of traffic flow information, such as the starting and ending points of vehicles, the travel time of vehicles, etc.; secondly, after the highway is networked, the highway toll data is very easy to obtain and process. Therefore, highway toll data can be used to accurately grasp the traffic flow change trend of highways, thereby providing assistance to the effective management and timely implementation of control measures by traffic management departments and operation departments.

[0004] At present, the methods for predicting traffic flow at highway toll stations can be divided into time dimension, space dimension and time-space dimension. Among them, the traffic flow prediction methods in the time dimension are usually based on mathematical statistics or neural networks, and the prediction methods in the space dimension widely use traffic transfer matrix, graph neural network, etc.; in the time-space dimension, some studies predict and combine them in the time dimension and space dimension respectively, while some studies integrate the prediction methods of time dimension and space dimension into the same model. However, there are certain shortcomings in current research. It often ignores the traffic flow transfer characteristics in the spatial dimension, which makes the study fail to consider the time required for the nodes to influence each other when calculating the spatial correlation between different nodes, which is not in line with reality. Summary of the invention

[0005] In order to solve the problems existing in the prior art, the present invention provides a method and system for predicting traffic flow at a highway toll station, which can use the information generated by the traffic flow transfer characteristics between stations to more accurately predict the traffic flow at the traffic toll station.

[0006] The technical problem to be solved by the present invention is achieved through the following technical solutions:

[0007] In a first aspect, the present invention provides a method for predicting traffic flow at a highway toll station, comprising:

[0008] Obtaining traffic data of each toll station in each time interval for prediction;

[0009] Inputting the traffic data of each toll station in each time interval obtained for prediction into a pre-trained traffic prediction model, and determining the future toll station traffic according to the output of the traffic prediction model;

[0010] Among them, the training method of the traffic prediction model includes:

[0011] Obtain flow data samples at each toll station in each time interval;

[0012] Preprocess the traffic data samples to obtain a training sample library;

[0013] Obtain the manual annotation information of the traffic data in the training sample library and establish the training sample set and the test sample set;

[0014] The pre-built STGATwE traffic flow spatiotemporal prediction network is trained using the training sample set and the test sample set to obtain the STGATwE traffic flow spatiotemporal prediction model.

[0015] In combination with the first aspect, further, the traffic data includes:

[0016] The entrance and exit traffic of different toll stations in each time interval is shown in formula (1):

[0017]

[0018] Among them, q TN1 represents the inlet flow of the Nth toll station in T time intervals, q TN2 represents the exit flow of the Nth toll station in T time intervals;

[0019] The traffic flow transfer characteristics are shown in formula (2):

[0020]

[0021] Among them, eP1 represents the average travel time of all vehicles on the Pth edge in all time, e P2 represents the standard deviation of the travel time of all vehicles on the Pth edge in all time, e P3 Represents the total flow of the Pth edge at all times.

[0022] In combination with the first aspect, further, the sTGATwE traffic flow spatiotemporal prediction model includes:

[0023] Two spatiotemporal convolution modules and an output module;

[0024] The spatiotemporal convolution module is used to obtain spatiotemporal features, and the output module is used to transform the feature dimensions of data and extract time features;

[0025] The spatiotemporal convolution module includes two gated convolution layers and a graph attention layer. The order in which the input data flows through the spatiotemporal convolution module is gated convolution layer, graph attention layer, and gated convolution layer; the gated convolution layer is used to extract temporal features, and the graph attention layer is used to extract spatial features.

[0026] In combination with the first aspect, further, the gated convolution layer performs two convolutions on the input data, and the processing process is shown in formula (3):

[0027] h l (X) = (X + X * W 1 +a)⊙σ((X*W 2 +b)) (3)

[0028] Among them, W 1 , W 2 are the weights corresponding to the convolution kernels in two different convolution operations on the input data, a and b are the biases corresponding to the convolution kernels in two different convolution operations on the input data, X is the input of the gated convolution layer, σ is the activation function, and h l (X) is the output of the gated convolutional layer, where the input X is in the form of a three-dimensional tensor (T, N, C), where T represents the size of the time series, N is the number of toll stations, and C is the depth of the tensor, that is, the number of features of the data.

[0029] In combination with the first aspect, further, the data input to the graph attention layer includes the output of the gated convolutional layer and the traffic flow transfer feature, and the processing process is shown in formula (4):

[0030]

[0031] Among them, x′ i is the data output after the graph attention layer processes it, W is the weight of the graph convolution, and α i,jis the weight of the edge from the ith toll station to the jth toll station, x j represents the data of the j-th toll station, and N(i) represents all toll stations connected to the i-th toll station.

[0032] In a second aspect, a method for predicting traffic flow at a highway toll station is provided, characterized by comprising:

[0033] A data acquisition module, used to acquire the traffic data of each toll station in each time interval for prediction;

[0034] A traffic prediction module, used to input the acquired traffic data of each toll station in each time interval for prediction into a pre-trained traffic prediction model, and determine the future toll station traffic according to the output of the traffic prediction model;

[0035] The traffic prediction model training module is used to train the traffic prediction model, wherein the training method of the traffic prediction model includes:

[0036] Obtain flow data samples at each toll station in each time interval;

[0037] Preprocess the traffic data samples to obtain a training sample library;

[0038] Obtain the manual annotation information of the traffic data in the training sample library and establish the training sample set and the test sample set;

[0039] The pre-built STGATwE traffic flow spatiotemporal prediction network is trained using the training sample set and the test sample set to obtain the STGATwE traffic flow spatiotemporal prediction model.

[0040] Beneficial effect: The present invention constructs a traffic prediction model, which combines the graph attention mechanism and the convolutional neural network, and utilizes the traffic flow transfer characteristics of highway toll stations and the spatiotemporal characteristics of the traffic flow at traffic toll stations to make a more accurate prediction of traffic flow. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 is a flow chart of the flow prediction method in the present invention;

[0042] Figure 2 It is a structural schematic diagram of the flow prediction model in the present invention;

[0043] Figure 3 This is a schematic diagram of the forecast results of the exit flow of a highway toll station;

[0044] Figure 4 This is a schematic diagram of the traffic prediction results at the entrance of a highway toll station. DETAILED DESCRIPTION

[0045] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0046] Highway toll station traffic flow prediction can be performed using the spatiotemporal characteristics of traffic flow, but current research often ignores the flow transfer characteristics of traffic flow in the spatial dimension. This makes the study fail to consider the time required for nodes to influence each other when calculating the spatial correlation between different nodes, which is not in line with reality. Therefore, it is necessary to introduce edge information to solve the existing problem. To address this problem, the present invention proposes a spatial-temporal graph attention convolutional neural network with edge information (STGATwE), which can use the information generated by the traffic flow transfer characteristics between stations to make more accurate predictions of the traffic flow at traffic toll stations.

[0047] Example 1

[0048] like Figure 1-Figure 4 As shown, the present invention provides a method for predicting traffic flow at a highway toll station, comprising the following steps:

[0049] S1. Data Acquisition

[0050] The flow data collected at highway toll stations, that is, the information recorded when each vehicle passes through the toll station, is processed and converted into traffic flow data at each toll station in each time interval.

[0051] The processed data includes the entrance and exit traffic of each toll station and the traffic transfer characteristics between stations, as shown below:

[0052] The entrance and exit traffic of different toll stations in each time interval is shown in formula (1):

[0053]

[0054] Among them, q TN1 represents the inlet flow of the Nth toll station in T time intervals, q TN2 represents the exit flow of the Nth toll station in T time intervals;

[0055] The traffic flow transfer characteristics are shown in formula (2):

[0056]

[0057] Among them, e P1 represents the average travel time of all vehicles on the Pth edge in all time, eP2 represents the standard deviation of the travel time of all vehicles on the Pth edge (road) at all times, e P3 Represents the total flow of the Pth edge (road) at all times.

[0058] S2. Build a traffic prediction model

[0059] Design and implement a Spatial-Temporal Graph Attention Convolutional Neural Network with Edge Information (STGATwE). This model combines graph attention mechanism and convolutional neural network, and uses the traffic flow transfer characteristics between stations and the spatiotemporal characteristics of traffic flow at traffic toll stations to predict traffic flow.

[0060] The STGATwE model consists of two spatiotemporal convolution modules and an output module. The spatiotemporal convolution module acquires spatiotemporal features. The output module is used to transform the feature dimensions of the data so that the output form is the same as the form of the required prediction result and further extracts the time features.

[0061] The spatiotemporal convolution module is composed of a gated convolution layer Gated-CNN and a graph attention layer GAT. The order of input data in the module is Gated-CNN, GAT, and Gated-CNN. Gated-CNN is used to extract temporal features, and GAT is used to extract spatial features. The two are combined to analyze spatiotemporal features.

[0062] For the gated convolutional layer Gated-CNN, its input data is a three-dimensional tensor of (T, N, C), where T represents the size of the time series, N is the number of stations, and C is the depth of the tensor, that is, the number of features of the data. Gated-CNN needs to retain the shape of the data in the spatial dimension so that it remains the same size as the number of charging stations, and only processes the time dimension features of the data. Its calculation formula is as follows:

[0063] h l (X) = (X + X * W 1 +a)⊙σ((X*W 2 +b)) (3)

[0064] In the formula, Gated-CNN performs two different convolution operations on the input data. The convolution kernels corresponding to the two convolutions are: 1 , W 2are the weights corresponding to the convolution kernels in two different convolution operations on the input data, a and b are the biases corresponding to the convolution kernels in two different convolution operations on the input data, X is the input of the gated convolution layer, σ is the sigmoid activation function, and h l (X) is the output of the gated convolutional layer, where the input X is in the form of a three-dimensional tensor (T, N, C), where T represents the size of the time series, N is the number of toll stations, and C is the depth of the tensor, that is, the number of features of the data.

[0065] For the graph attention layer (GAT), the OD attributes (flow, latency, and discreteness) of edges are introduced, so that the graph attention layer can use edge information to generate attention coefficients that take into account OD attributes, thereby enabling the model to automatically generate edge weights related to OD attributes, thereby allowing the model to more effectively extract the spatial characteristics of traffic flow.

[0066] Moreover, the input data of the graph attention layer GAT is a three-dimensional tensor of (T, N, C), which performs graph convolution on each node and its adjacent nodes, and implements it by weighting the nodes in the convolution area. The weights are calculated through the attention mechanism. After GAT, the output data remains unchanged in both the time dimension and the spatial dimension, while the feature dimension is determined by the set C′, that is, the tensor shape of the output data is (T, N, C′).

[0067] The input data of the graph attention layer includes the output of the gated convolutional layer and the traffic flow transfer features. The processing process is shown in formula (4):

[0068]

[0069] Among them, x i ' is the data output after the graph attention layer is processed, W is the weight of the graph convolution, α i,j is the weight of the edge from the ith toll station to the jth toll station, x j represents the data of the j-th toll station, and N(i) represents all toll stations connected to the i-th toll station.

[0070] S3. Model training

[0071] After the model is built, we need to train the model. The training methods mainly include:

[0072] Obtain flow data samples at each toll station in each time interval;

[0073] Preprocess the traffic data samples to obtain a training sample library;

[0074] Obtain the manual annotation information of the traffic data in the training sample library and establish the training sample set and the test sample set;

[0075] The pre-built STGATwE traffic flow spatiotemporal prediction network is trained using the training sample set and the test sample set to obtain the STGATwE traffic flow spatiotemporal prediction model.

[0076] S4. Traffic flow prediction

[0077] The traffic data of each toll station in each time interval obtained for prediction is input into a trained traffic prediction model, and the future toll station traffic is determined according to the output of the traffic prediction model.

[0078] Example 2

[0079] The present invention also provides a highway toll station flow prediction system, comprising:

[0080] A data acquisition module, used to acquire the traffic data of each toll station in each time interval for prediction;

[0081] A traffic prediction module, used to input the acquired traffic data of each toll station in each time interval for prediction into a pre-trained traffic prediction model, and determine the future toll station traffic according to the output of the traffic prediction model;

[0082] The traffic prediction model training module is used to train the traffic prediction model, wherein the training method of the traffic prediction model includes:

[0083] Obtain flow data samples at each toll station in each time interval;

[0084] Preprocess the traffic data samples to obtain a training sample library;

[0085] Obtain the manual annotation information of the traffic data in the training sample library and establish the training sample set and the test sample set;

[0086] The pre-built STGATwE traffic flow spatiotemporal prediction network is trained using the training sample set and the test sample set to obtain the STGATwE traffic flow spatiotemporal prediction model.

[0087] Finally, we verify the prediction effect of the model

[0088] The mean absolute error (MAE), root mean square error (RMSE), and goodness of fit (R) were used. 2 As evaluation indicators, the smaller the MAE and RMSE, the higher the R 2 The larger it is, the better the model performance is. The formula is as follows:

[0089]

[0090]

[0091]

[0092] In the formula, y i is the true value of the data, is the predicted value of the data, is the average value of the data, and m is the total number of data;

[0093] The model's prediction results are as follows Figure 3 , Figure 4 As shown, ae in the figure corresponds to 5 toll stations respectively.

[0094] The present invention compares STGATwE with other models, and the selected comparison models are as follows:

[0095] 1) STGAT (GLU): A spatiotemporal graph attention convolutional network, but it uses a gated linear unit (GLU) in the temporal dimension and a graph attention convolution in the spatial dimension, but the graph attention convolution does not input side information.

[0096] 2) STGCN: Spatiotemporal Graph Convolutional Network, which uses GLU for one-dimensional convolution in the temporal dimension and graph convolution (GCN) in the spatial dimension.

[0097] 3) STGAT (LSTM): A spatiotemporal graph attention convolutional network, but it uses a long short-term memory layer (LSTM) in the temporal dimension and GAT for graph attention convolution in the spatial dimension without inputting side information.

[0098] 4) GLU: A convolutional network using gated linear units, which is only used to extract the temporal features of traffic toll station flow data.

[0099] 5) LSTM: Long short-term memory model, which is a special recurrent neural network (RNN) that can solve the gradient vanishing and exploding problems in time series training to a certain extent. Similar to GLU, it only extracts the time characteristics of traffic toll station flow data.

[0100] 6) MLP: Multilayer Perceptron, which consists of several fully connected layers and activation functions, is a simple and effective neural network prediction method. During construction, the study constructed MLP in both the time dimension and the space dimension to extract time features and space features.

[0101] The evaluation indicators of different models are summarized in Table 1 below. It can be seen that the STGATwE model performs best.

[0102] Table 1

[0103]

[0104] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0105] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0106] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for predicting traffic flow at a highway toll station, characterized in that: include: Obtaining traffic data of each toll station in each time interval for prediction; Inputting the traffic data of each toll station in each time interval obtained for prediction into a pre-trained traffic prediction model, and determining the future traffic of the toll station according to the output of the traffic prediction model; Among them, the training method of the traffic prediction model includes: Obtain flow data samples at each toll station in each time interval; Preprocess the traffic data samples to obtain a training sample library; Obtain the manual annotation information of the traffic data in the training sample library and establish the training sample set and the test sample set; The pre-built STGATwE traffic flow spatiotemporal prediction network is trained using the training sample set and the test sample set to obtain the STGATwE traffic flow spatiotemporal prediction model; The traffic data includes: The entrance and exit traffic of different toll stations in each time interval is shown in formula (1): Among them, q TN1 represents the inlet flow of the Nth toll station in T time intervals, q TN2 represents the exit flow of the Nth toll station in T time intervals; The traffic flow transfer characteristics are shown in formula (2): Among them, e P1 represents the average travel time of all vehicles on the Pth edge in all time, e P2 represents the standard deviation of the travel time of all vehicles on the Pth edge in all time, e P3 represents the total flow of the Pth edge at all times; The sTGATwE traffic flow spatiotemporal prediction model includes: Two spatiotemporal convolution modules and an output module; The spatiotemporal convolution module is used to obtain spatiotemporal features, and the output module is used to transform the feature dimensions of data and extract time features; The spatiotemporal convolution module includes two gated convolution layers and a graph attention layer. The order of input data flowing through the spatiotemporal convolution module is gated convolution layer, graph attention layer, and gated convolution layer; the gated convolution layer is used to extract temporal features, and the graph attention layer is used to extract spatial features; The gated convolutional layer performs two convolutions on the input data, and the processing process is shown in formula (3): h l (X)=(X+X*W1+a)⊙σ((X*W2+b))(3) Among them, W1 and W2 are the weights corresponding to the convolution kernels in two different convolution operations on the input data, a and b are the biases corresponding to the convolution kernels in two different convolution operations on the input data, X is the input of the gated convolution layer, σ is the activation function, and h l (X) is the output of the gated convolutional layer, where the input X is in the form of a three-dimensional tensor (T, N, C), where T represents the size of the time series, N is the number of toll stations, and C is the depth of the tensor, i.e., the number of features of the data; The input data of the graph attention layer includes the output of the gated convolutional layer and the traffic flow transfer features. The processing process is shown in formula (4): Among them, x i ' is the data output after the graph attention layer is processed, W is the weight of the graph convolution, α i,j is the weight of the edge from the ith toll station to the jth toll station, x j represents the data of the j-th toll station, and N(i) represents all toll stations connected to the i-th toll station.

2. A highway toll station traffic prediction system that implements the highway toll station traffic prediction method of claim 1, characterized in that: include: A data acquisition module, used to acquire the traffic data of each toll station in each time interval for prediction; A traffic prediction module, used to input the acquired traffic data of each toll station in each time interval for prediction into a pre-trained traffic prediction model, and determine the future toll station traffic according to the output of the traffic prediction model; The traffic prediction model training module is used to train the traffic prediction model, wherein the training method of the traffic prediction model includes: Obtain flow data samples at each toll station in each time interval; Preprocess the traffic data samples to obtain a training sample library; Obtain the manual annotation information of the traffic data in the training sample library and establish the training sample set and the test sample set; The pre-built STGATwE traffic flow spatiotemporal prediction network is trained using the training sample set and the test sample set to obtain the STGATwE traffic flow spatiotemporal prediction model.