Static OD backstepping method based on intersection steering flow
By using the intersection turning flow and BP neural network in the traffic flow OD back estimation, the problems of low OD back calculation efficiency and unreliable results in the existing technology are solved, and higher traffic flow prediction accuracy and reliability are achieved. .
Patent Information
- Application Number
- CN202411237394.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-10-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology has the problems of low computational efficiency and unreliable results in the back estimation of traffic flow OD. In particular, it is difficult to ensure the accuracy of the back estimation results due to the multi-solution dilemma caused by insufficient road section flow data.
The static OD inversion method based on the intersection turning flow is used, combined with the BP neural network algorithm, and the intersection turning flow replaces the road segment flow as a constraint. The BP neural network automatically learns and extracts the relationship between the road segment flow and the OD matrix, and performs OD inversion. push.
It improves the accuracy and reliability of traffic flow prediction and provides richer information through intersection turning flow. The BP neural network can better learn and understand the inherent laws and patterns of traffic flow, and improves the prediction accuracy of OD matrix estimation.
Smart Images

Figure CN118762522A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of urban traffic planning, relates to OD reverse estimation, and relates to the field of ITS intelligent traffic system, and specifically is a static OD reverse estimation method based on intersection turning flow. Background Art
[0002] Traffic demand analysis is an important part of traffic planning, traffic impact analysis and other work. The traffic flow between the origin and destination (OD) is often the basic basis of this part. With the development of my country's transportation industry, the scale of the road network has become very large. It has become very difficult to obtain OD by traditional methods. Using the section flow to reverse OD is an important means to obtain the current OD. For example, Lin Yong proposed the "Road Network Refined Dynamic OD Flow Estimation Method Based on Network Segmentation", the core of which is to divide the road network into multiple small-scale sub-road networks, set the edge nodes of the sub-road network as OD points, and estimate the OD flow by combining historical OD flow and real-time section flow data. However, since the observed section flow data is far less than the number of OD pairs, the OD reverse problem often faces the dilemma of "multiple solutions", and it is difficult to ensure the absolute reliability of the reverse result in theory. At the same time, Lin Yong chose the generalized least squares model in the reverse model. Most traditional OD reverse models will choose a model to set the iteration direction, including maximum entropy model, Bayesian model, generalized least squares model, maximum likelihood model and bi-level programming model. However, no matter which model is used, it is difficult to estimate the OD flow while ensuring the computational efficiency in actual operation. Summary of the invention
[0003] In order to solve the above problems, the present invention provides a static OD reverse calculation method based on intersection turning flow and combined with BP neural network. The method uses intersection turning flow instead of road section flow as a constraint for static OD reverse calculation. The intersection turning flow information provides richer information on the basis of the original road section flow information. At the same time, the present invention adopts BP neural network algorithm for OD reverse calculation. Compared with the traditional model, BP neural network does not need a preset mathematical equation to describe the relationship between road section flow and OD matrix, but learns and trains through a large amount of sample data to automatically extract this relationship. This self-learning and adjustment ability makes BP neural network have significant advantages in dealing with traffic OD reverse calculation problems. This method can effectively improve the accuracy and reliability of traffic flow prediction.
[0004] The technical solution of the present invention:
[0005] A static OD reverse deduction method based on intersection turning flow. This method uses intersection turning flow instead of road section flow as a constraint, and uses a BP neural network instead of the traditional reverse deduction model for static OD reverse deduction. Specifically, the intersection turning flow is obtained by presetting a random OD matrix and performing traffic distribution through traffic distribution software. The preset random OD matrix and the corresponding intersection turning flow data are used as training development set data, and the training development set data is divided into a training set and a validation set. The BP neural network is trained using the data from the training set, and then the validation set and the trained BP neural network are used for prediction to verify the reverse deduction accuracy. The BP neural network finally formed can be used for static OD reverse deduction. The specific steps are as follows:
[0006] Step 1: Traffic measurement data preparation
[0007] Collect observation data of intersection turn flow in a specific time period on the target area traffic network, which can come from traffic sensors, video surveillance, etc. Obtain the road network structure and related traffic information of the target area, including the section length, lane capacity, speed limit, travel time, two-way flow, etc. of the target area road network.
[0008] Step 2: Build a road network model
[0009] Step 2-1: Road network infrastructure construction
[0010] Traffic simulation software is used to build a road network model, and the target area road network is drawn in the software to ensure that the road network map location matches the actual coordinates. Attribute data is also input for road sections and traffic zones in the road network, including section length, lane capacity, speed limit, travel time, two-way flow, etc.
[0011] Step 2-2: Intersection topology optimization
[0012] The flow distribution algorithm of common traffic simulation software can only obtain the traffic flow of the road section, but cannot directly obtain the intersection turn flow data. To solve this problem, this method proposes the optimization of the intersection topology structure. Specifically, the operation is as follows:
[0013] (1) Structural splitting of the intersection, converting a single node into multiple sub-nodes. The intersection formed by the intersection of n road sections is correspondingly split into n sub-nodes.
[0014] (2) Establish bidirectional connections between the split sub-nodes to form a new network topology.
[0015] By optimizing the intersection topology, the intersection turning flow data obtained by flow distribution can be directly obtained and can be directly used for subsequent BP neural network training.
[0016] Step 3: Get training and development set data
[0017] The training development set data combines intersection turn flow and OD data. The training of the BP neural network model needs to rely on a large amount of training development set data, which is the basis for building the model and ensuring its accuracy.
[0018] Therefore, a random number presets an OD matrix, and uses traffic simulation software to perform traffic allocation on the road network model established in step 2, thereby generating a set of training and development set data: the turning flow at each intersection. Repeat this process to obtain a large amount of training and development set data.
[0019] Step 4: Build the BP network model architecture
[0020] The present invention adopts BP neural network algorithm to perform static OD back-calculation. BP neural network is a multi-layer feedforward network, which is trained by error back propagation algorithm and can learn and simulate the complex nonlinear relationship between input and output. The BP network model of the present invention is as follows:
[0021] Input layer: Take the intersection turn flow as input and set the number of nodes according to the intersection turn flow data dimension.
[0022] Hidden layer: Two hidden layers are set, the number of nodes is determined by an empirical formula, and the Tan-Sigmoid function is used as the activation function. The relationship between the number of hidden layers x, the number of input layer nodes m and the number of output layer nodes n is as shown in formula (1).
[0023] x= [ m+n ] +1 (1)
[0024] in, [] Indicates integer.
[0025] Output layer: Outputs the OD matrix elements corresponding to the set number of nodes, and uses the Purelin function as the activation function.
[0026] Step 5: BP network model training
[0027] In order to evaluate the performance of the model, the training development set data is further divided into a training set and a validation set (80% of the total training development set data is used as a training set, and 20% is used as a validation set).
[0028] The BP neural network is trained using the training set. In each iteration, the following operations are performed: (1) Forward propagation is performed to calculate the prediction results of the output layer. (2) The loss function is calculated to evaluate the difference between the prediction results and the actual results. (3) Backward propagation is performed to update the network parameters according to the gradient of the loss function.
[0029] During the training process, set a cycle (after training a certain number of training set data), use the validation set to evaluate the model. Select the mean square error as the indicator, evaluate the performance of the model based on the indicator, and adjust the BP network parameters.
[0030] Step 6: OD reverse calculation
[0031] The trained BP neural network model is used to reverse the OD matrix. Specifically, the observed intersection turning flow in the study area is input into the input layer of the BP network, and the predicted OD matrix is obtained through the trained BP network model.
[0032] Beneficial effects of the present invention:
[0033] (1) Using BP neural network for OD inversion to improve inversion efficiency: Compared with the common OD inversion model, BP neural network can learn the mapping relationship between input and output through its own training without the need to determine the mathematical equation in advance, which makes it more flexible and adaptable when dealing with complex traffic flow and OD matrix relationships. This can improve the efficiency of OD inversion.
[0034] (2) Using intersection turn flow to perform OD inversion and improve the accuracy of inversion results: Traditional OD inversion technology mainly derives the OD matrix based on the road segment flow. Since the number of observed road segment flows is far less than the number of OD pairs, OD inversion is usually an infinite solution problem with a very large feasible solution space. Intersection turn flow not only provides traffic flow information on each road segment (for each road segment, the left turn flow + straight flow + right turn flow of its downstream intersection is its road segment flow), but also provides traffic flow information on each turn of the intersection. Combined with the BP network, the intersection turn flow data is included in the training set. The BP neural network can obtain richer traffic behavior features. These features not only cover the basic attributes of traffic flow, but also include complex traffic patterns (such as path selection methods, the occurrence and attraction of traffic flow in the road segment). This richness of data provides the BP neural network with a more comprehensive set of traffic behavior features, allowing the network to more clearly learn and understand the inherent laws and patterns of traffic flow. In this way, the BP neural network can capture subtle changes and nonlinear relationships in traffic flow, thereby showing higher generalization ability in the learning process of traffic flow distribution. This improvement in generalization ability is directly reflected in the prediction accuracy of the model for the OD matrix estimation task, enabling the model to more accurately predict the traffic distribution between different OD pairs.
[0035] (3) In order to solve the problem that existing software algorithms cannot directly obtain turning flow in flow distribution, the present invention proposes a network topology structure construction method. This method decomposes a single intersection into multiple nodes and connects these nodes using bidirectional sections, so that the turning flow obtained by flow distribution can be directly obtained for the training of the BP network model. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a basic flow chart of the method of the present invention.
[0037] Figure 2 It is a schematic diagram of the road network topology optimization of the present invention.
[0038] Figure 3 It is a schematic diagram of part of the road network in the study area of the present invention.
[0039] Figure 4 It is a relative error comparison diagram of the back-calculation results of the present invention.
[0040] Figure 5 It is the relative error frequency of the OD back-estimation result based on the steering flow rate of the present invention.
[0041] Figure 6 It is the relative error frequency of the OD reverse estimation result based on the road section flow in the present invention. DETAILED DESCRIPTION
[0042] The specific implementation modes of the present invention are described in detail below with reference to examples, and the implementation effects of the invention are simulated.
[0043] The basic process of the static OD reverse estimation method based on intersection turning flow of the present invention is as follows: Figure 1 This example selects a regional road network (15 intersections) as an example.
[0044] Step 1: Traffic measurement data preparation
[0045] Collect observation data of intersection turn flow in a specific time period on the target area traffic network, which can come from traffic sensors, video surveillance, etc. Obtain the data of the required area for the road network structure and related traffic information of the target area: the length, capacity, speed limit, travel time, etc. of the road network in the target area.
[0046] Step 2: Build a road network model
[0047] Step 2-1: Road network infrastructure construction
[0048] Traffic simulation software TransCAD is used to build the road network model, and the target area road network is drawn in the software to ensure that the road network map location matches the actual coordinates. Attribute data (number of lanes, speed limit, lane capacity, etc.) is input for the road sections and communities in the road network.
[0049] Step 2-2: Intersection topology optimization
[0050] (1) Structural splitting of the intersection, converting a single node into multiple sub-nodes. The intersection formed by the intersection of n road sections is correspondingly split into n sub-nodes.
[0051] (2) Establish bidirectional connections between the split sub-nodes to form a new network topology. Figure 2 .
[0052] Step 3: Get training and development set data
[0053] After the road network model is established, Figure 3 . Use the random number function of Excel to create a 21*21 random number matrix (a total of 21 traffic cells), clear the main diagonal of the matrix to zero (the occurrence and attraction of the same traffic cell to itself are not considered), use the travel time as the impedance, select the UE model for traffic allocation to obtain the turning flow at each intersection of the road network, and repeat 50 times. The turning flow data and its corresponding OD initial matrix data are used as the training development set data. Randomly select 40 groups of data as the training set data, and the remaining 10 groups are the validation set data.
[0054] Step 4: BP network model architecture
[0055] Step 4-1: Learning rate selection
[0056] The final learning rate chosen in this method is 0.01.
[0057] Step 4-2: Selection of activation function
[0058] The hidden layer uses the Tan-Sigmoid function, whose output value range is between -1 and 1, which is suitable for processing situations with negative output; the output layer uses the Purelin function, whose output value can be any value, which is suitable for directly outputting prediction results.
[0059] Step 4-3: Determine the number of hidden layers and nodes
[0060] Two hidden layers were selected. The empirical formula (1) was used to determine the number of hidden layer nodes. The number of input layer nodes was m = 2 (AB_FLOW, BA_FLOW) and the number of output layer nodes was n = 441 (21 traffic areas, so there are 441 OD pairs), which was finally determined to be 22 nodes.
[0061] Step 5: Model training
[0062] The BP neural network is trained with 40 sets of training data. In each iteration, the following operations are performed: (1) Forward propagation is performed to calculate the prediction results of the output layer. (2) The loss function is calculated to evaluate the difference between the prediction results and the actual results. (3) Backward propagation is performed to update the network parameters according to the gradient of the loss function.
[0063] During the training process, a cycle is set (after every 10 training set data), and the model is evaluated using the validation set. The mean square error is selected as the indicator, and the performance of the model is evaluated based on the indicator, so as to adjust the BP network parameters.
[0064] Step 6: Model training and accuracy verification
[0065] The observed intersection turn flow data of the study area is input into the trained BP model, and OD reverse calculation is performed to obtain the estimated OD matrix data.
[0066] The OD matrix obtained by reverse calculation is brought into TransCAD, and the UE model is selected for traffic distribution to obtain the intersection turning flow. The observed intersection turning flow and the intersection turning flow of reverse calculation result traffic distribution are analyzed for error. The results of the section flow group and the intersection turning flow group are compared and analyzed. The section flow group is trained using the flow data of each section in the road network, and the intersection turning flow group is trained using the turning flow of each intersection in the road network. Figure 4 , Figure 5It can be concluded from Table 1 that in the range where the error is less than 0.1, the algorithm based on steering flow proposed in the present invention shows a significant advantage. Compared with the traditional method based on road section flow, the algorithm of the present invention has a significantly lower relative error ratio in the low error range. This result shows that the algorithm of the present invention has excellent performance in achieving low error prediction.
[0067] Table 1: Comparison of static OD back-calculation results.
[0068]
Claims
1. The static OD inverse method based on intersection turning flow is characterized by: By presetting a random OD matrix and using traffic distribution software to perform traffic distribution, the intersection turn flow is obtained. The preset random OD matrix and the corresponding intersection turn flow data are used as training development set data, and the training development set data is divided into a training set and a validation set. The BP neural network is trained using the data of the training set, and then the validation set and the trained BP neural network are used for prediction to verify the inverse prediction accuracy. The BP neural network finally formed can be used for static OD inverse prediction. The specific steps are as follows: Step 1: Traffic measurement data preparation Collect observation data on intersection turn flow within a specific time period on the target area traffic network; obtain the road network structure and related traffic information of the target area, including the section length, lane capacity, speed limit, travel time and two-way flow of the target area road network; Step 2: Build a road network model Step 2-1: Road network infrastructure construction Use traffic simulation software to build a road network model, draw the target area road network in the software, and ensure that the road network map location matches the actual coordinates; and input attribute data for road sections and traffic zones in the road network, including section length, lane capacity, speed limit, travel time and two-way flow; Step 2-2: Intersection topology optimization (1) Structurally split the intersection and transform a single node into multiple sub-nodes. The intersection formed by the intersection of n road sections is correspondingly split into n sub-nodes; (2) Establish bidirectional connections between the split sub-nodes to form a new network topology; By optimizing the intersection topology, the intersection turning flow data obtained by flow distribution is directly obtained for subsequent BP neural network training; Step 3: Get training and development set data The random numbers preset an OD matrix, and the traffic simulation software is used to perform traffic allocation on the road network model established in step 2, thereby generating a set of training and development set data: the turning flow at each intersection; Repeat this process to obtain a large amount of training and development set data; Step 4: Build the BP network model architecture The BP neural network algorithm is used for static OD inversion. The BP network model is as follows: Input layer: Take the intersection turn flow as input and set the number of nodes according to the intersection turn flow data dimension; Hidden layer: Two hidden layers are set. The number of nodes is determined by an empirical formula, and the Tan-Sigmoid function is used as the activation function. The relationship between the number of hidden layers x, the number of input layer nodes m and the number of output layer nodes n is as shown in formula (1). (1) in, Indicates taking an integer; Output layer: outputs the OD matrix elements corresponding to the set number of nodes, and uses the Purelin function as the activation function; Step 5: BP network model training In order to evaluate the performance of the model, the training and development set data is further divided into training set and validation set; The BP neural network is trained using the training set. In each iteration, the following operations are performed: (1) forward propagation is performed to calculate the prediction results of the output layer; (2) the loss function is calculated to evaluate the difference between the prediction results and the actual results; (3) back propagation is performed to update the network parameters according to the gradient of the loss function; During the training process, a cycle is set and the model is evaluated using the validation set; mean square error is selected as the indicator, and the performance of the model is evaluated based on the indicator, thereby adjusting the BP network parameters; Step 6: OD reverse calculation The trained BP neural network model is used to reverse the OD matrix. Specifically, the observed intersection turning flow in the study area is input into the input layer of the BP network, and the predicted OD matrix is obtained through the trained BP network model.
Citation Information
Patent Citations
Section traffic neural network prediction method based on EMD
CN103729688A
Metropolitan area traffic flow prediction method based on knowledge graph and depth space-time convolution
CN112687102A
Traffic flow prediction device, traffic flow prediction method, and traffic flow prediction program
JP2013210941A
Cited By
AI-based common road traffic OD investigation optimization method
CN121075117A
