Road Resource Optimization and Restructuring Based on BP Neural Network

In order to solve the problem of uneven distribution of road resources during rush hour of commuter traffic in cities, a method called “tidal lane” was designed to optimize and restructure the road resources after calculation and measurement of the road occupation rate and the speed of the vehicle. The algorithm based on BP neural network is designed to judge whether the road is changing lanes or reversing with the input of road occupation rate and vehicle speed. The signal is controlled according to the results obtained by the algorithm to achieve the optimization and restructuring of road resources. After the simulation, the trained BP neural network is obtained, and then the test results are obtained. Finally, the correct rate of the network is calculated to reach 97%, which meets the design requirements and proves the reliability and correctness of the method.


Introduction
According to the survey traffic flow data, there will be imbalance in the use of road resources in two directions of a section of road in a certain period of road traffic. The traffic flow in one direction is less, the existing resources of the road are surplus, while the traffic flow in the other direction is in a state of slow congestion. In view of this phenomenon, the concept of "tidal lane" is put forward [1] , and the intelligent road resource optimization and restructuring are realized by using the control method based on BP neural network algorithm through the signal lamp control. According to the investigation and analysis, the design is reasonable, and the simulation test of the algorithm verifies the feasibility of the design, and hopes to achieve the universality of the design in the intelligent transportation in the research.

Scheme design
"Tidal lane" is to divide road resources into one lane in the direction of waste or incomplete utilization, and provide it to the other direction of slow congestion in traffic, so as to relieve the driving pressure in the direction of traffic congestion and improve the utilization rate of existing road resources. Taking the lane change in direction B as an example. Generally, there are three lanes in A and B directions, now it is necessary to reorganize the direction of the lane in the B direction, and control the traffic lights of the lanes in the B direction near the double yellow line. The original indicator light is traversable, that is, it is a green light. After the restructuring, the indicator light will turn red, and it will be prohibited to  The value of a, b, c, d, x, y, z is given according to the actual traffic congestion situation, here a=9, b=8, c=14, d=6, x=0.5, y=0.6, z=0.5.

Algorithm Design Based on BP Neural Network (1) Preparation of training samples
In this paper, through the 400 sets of data collected, the road occupation rate and the vehicle speed of the lanes in the A and B directions are calculated and the lane change value is obtained. Among them, 280 sets of data are used as data training samples, 60 sets of data are used as debugging samples, 60 sets of data are used as test samples, and there are also new 100 sets of data to retest existing networks.
(2) Input layer and output layer design Once you have selected the input and output variables, you need to describe them. Input and output variables are described differently depending on the needs of the network design. The input and output sample data used in this paper is mostly digital. Such data as the input neuron has a more direct and more intuitive effect on the target output node. When comparing, the input data has more obvious influence on the output data. In this paper, the input neuron is 4, and the BP neural network model structure is shown in Figure 2.  Figure 2. BP neural network model structure diagram (3) Hidden layer design The design of the hidden layer directly affects the characteristics of the neural network and the results of the output function [3] . There is no specific choice analytic formula to determine the number of learning neurons in the selection design of the hidden layer. The neuron design of the hidden layer basically depends on multiple simulation results to find a relatively appropriate value. The complexity of the problem, the number of input and output units, all of which directly affect the number of neurons in the hidden layer [4] . Theoretically, there will be a most appropriate number of hidden layer units. The number of hidden layer neurons in this paper is designed to be 4.
(4) Selection of initial weight The choice of the initial value of the nonlinear system determines whether the learning of the network satisfies the error requirement, how long the training time and whether it can converge. In order to ensure that the weight of each neuron can be adjusted where the amount of S-type activation function changes is large. Usually, in the interval (−2.4/ , 2.4/ ), F is the number of input layer neurons, so the initial weight selection interval in this paper is the random number in (−0.6,0.6) as the initial weight.
(5) Transfer function selection The general hidden layer uses the Sigmoid function, while the output layer uses a linear function. (6) Selection of training methods In addition to the standard steepest descent method, BP network has several improved training algorithms. The training algorithm is related to the problem itself and the number of training samples [5] . The choice of serial or batch training methods is also something that needs to be determined during the neural network design process. This paper chooses LM algorithm and batch training method.
(7) Selection of expected error During the whole network training period, the selection of expected error should be moderate, neither too large nor too small, so we can choose two expected value errors for network training, and get a more appropriate expected value error through continuous calculation and adjustment. In this paper, 1e-10 is selected as the adjusted expected error.
Algorithm flow chart shown in Figure 3.

Algorithm simulation and analysis
Set the maximum number of iterations to 1000, the initial learning rate is 0.01. Then train the network and get the structural diagram of the design as shown in Figure 4.

Correct rate analysis
100 groups of data are input into the network for calculation, and the value of the lane change calculated through the network is compared with the target value to obtain the correct rate of the trained network. Take 0.5 as the threshold, and the output less than or equal to the threshold is judged as 0 (no lane change). An output greater than or equal to the threshold is judged as 1 (lane change). A set of data with different training values and target values is selected to form a numerical comparison table. Only 3 out of 100 groups of test data have different results, namely, the 48th group, the 51th group, and the 96th group are as shown in Table 1, so the correct rate of the trained network is 97%. This result has reached the design requirements.

Conclusion
In this study, the design method of "tidal lane" is taken as the framework, and the lane change judgment based on BP neural network algorithm is mainly studied. The training network obtained through the experiment can be applied to new data, and the accuracy meets the design requirements, which shows the feasibility and universality of the algorithm, and it is completely feasible to control the traffic lights through the algorithm, which solves the problem of automatic and intelligent road resource optimization and restructuring. This paper combines the road design of road resource optimization and restructuring with the artificial intelligence algorithm to make the road resource utilization ratio higher and the traffic trip more intelligent, which is the inevitable trend in the future.