An adaptive traffic light control method based on deep reinforcement learning

Through the Dueling Actor-Critic deep reinforcement learning framework, traffic data and traffic flow data are used to dynamically adjust the signal duration, solving the local optimal problem in intelligent signal control and improving the efficiency and safety of traffic flow.

CN116311979BActive Publication Date: 2024-08-23NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310235071.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-13
Publication Date
2024-08-23
Estimated Expiration
2043-03-13

AI Technical Summary

Technical Problem

Existing intelligent signal light control methods fail to effectively consider the mutual influence and collaboration between traffic intersections, and are prone to falling into local optimality, resulting in low vehicle traffic efficiency and high risk of traffic accidents.

Method used

It adopts the Dueling Actor-Critic deep reinforcement learning framework, trains on traffic data sets and traffic flow data sets, dynamically adjusts the signal duration, and uses the ε value and advantage value to calculate the optimal action to avoid local optimal problems.

Benefits of technology

It effectively avoids the local optimal problem of the ε-greedy method, improves the explorability and efficiency of signal light control, reduces traffic congestion and accident risks, and improves road traffic efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116311979B
    Figure CN116311979B
Patent Text Reader

Abstract

The present invention discloses an adaptive traffic light control method based on deep reinforcement learning. Traffic data sets and vehicle flow data sets are imported into the Dueling Actor-Critic deep reinforcement learning framework for training to obtain optimal actions, and action a is used to regulate the duration of traffic lights. The Dueling Actor-Critic deep reinforcement learning is established based on an adaptive ε-greedy algorithm, and the ε value changes continuously during the entire execution process, making it more exploratory. The ultimate goal is to obtain the optimal action and control the duration of traffic lights, avoiding the problem of falling into local optimality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an adaptive traffic light control method, in particular to an adaptive traffic light control method based on deep reinforcement learning. Background Art

[0002] In the process of urbanization, traffic congestion and traffic accidents are becoming increasingly serious. Traditional timed traffic lights can no longer meet the needs of urban road traffic. With the continuous development of technologies such as artificial intelligence and computer vision, smart traffic lights have come into being. Smart traffic lights use sensors, cameras, computers and other technologies to perceive and analyze traffic conditions at intersections in real time, and intelligently control traffic lights according to the conditions, thereby reducing traffic congestion, improving road traffic efficiency, and reducing the risk of traffic accidents. Smart traffic lights can also be connected with other traffic facilities such as vehicles, pedestrians, and traffic networks to form a more intelligent traffic management system.

[0003] In the research of intelligent traffic light control algorithms, most of the existing studies have not taken into account the mutual influence and cooperation between traffic intersections. Some studies only focus on dynamically controlling the duration of traffic lights, while some studies achieve regulation of traffic lights through overall control of the traffic network, that is, using graph neural networks to achieve overall control. However, the actual situation is more complicated than in the experiment. Traffic lights designed in this way will output vehicles from the entry lane to the exit lane as much as possible, which may cause a certain exit lane to be completely blocked.

[0004] CN115578870A discloses that the ε-greedy algorithm is used in the Actor New signal strategy network to sample the signal phase probability distribution and obtain the signal phase at time t in the nth round, but the ε-greedy method is prone to fall into the local optimum, thereby obtaining the signal phase corresponding to the local maximum value in the probability distribution; CN113868113A also directly uses the Actor-Critic algorithm and the ε-greedy method, and designs the reward function, but there is the problem of exploration and utilization dilemma, that is, this method cannot fully explore the environment and is prone to fall into the local optimum. Summary of the invention

[0005] Purpose of the invention: The purpose of the present invention is to provide a traffic light control method that is based on the conditions of the roads between traffic nodes and the degree of mutual influence between adjacent nodes and avoids falling into local optimality.

[0006] Technical solution: The adaptive traffic light control method based on deep reinforcement learning described in the present invention is characterized in that the traffic data set and the vehicle flow data set are imported into the Dueling Actor-Critic deep reinforcement learning framework for training to obtain the optimal action, and the action a is used to adjust the duration of the signal light;

[0007] The Dueling Actor-Critic deep reinforcement learning framework includes an Actor network and a Critic network; a state set S is obtained according to the number of vehicles on the lane, the state set S is input into the Q network in the Critic network to obtain an advantage value X, and then the ε value under the relative state is calculated, and the ε value is input into the Actor network to obtain the optimal action;

[0008] The advantage function is: The calculation formula of ε value is:

[0009] A is the action set, ω is the shared network parameter, α and β are the network parameters of the value function network and the advantage function network respectively; V is the value function, Q is the state action value function; action a is used to adjust the duration of the traffic light, a ′ Action for the next moment.

[0010] Furthermore, the ε value is used to guide the action a in the current state s to obtain the optimal action.

[0011] Furthermore, at regular intervals, the network parameters of the Q network are input into the target Q network in the Critic network, the parameters of the target Q network are updated, and the maximum Q value is calculated.

[0012] Furthermore, the traffic data set includes the location coordinate information and lane lengths of all traffic nodes in the city; the vehicle flow data set includes the time when all vehicles enter the road network, the time when they leave the road network, and the movement trajectory within a period of time in the city.

[0013] Furthermore, the action a is used to adjust the duration of the traffic light, including adding or subtracting the duration of the red light or the duration of the green light.

[0014] Furthermore, the Cityflow platform is used to visualize the results of training the traffic dataset and the vehicle flow dataset in the Dueling Actor-Critic deep reinforcement learning framework.

[0015] The electronic device described in the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the adaptive traffic light control method based on deep reinforcement learning is implemented.

[0016] The computer-readable storage medium of the present invention stores a computer program, and when the computer program is executed by a processor, the adaptive traffic light control method based on deep reinforcement learning is implemented.

[0017] Beneficial effect: Compared with the prior art, the advantages of the present invention are: the ε-greedy method is optimized: the ε value is dynamically processed, allowing the ε value to change continuously in a controlled manner during the entire execution process, that is, at the beginning of the learning process, making it more exploratory; at the same time, the present invention calculates the ε value according to the advantage value output by Dueling Actor-Critic, and the advantage value is used to evaluate the quality of an action. The ε value calculated in this way is the most appropriate value in this state, thereby constructing a deep reinforcement learning framework of Dueling Actor-Critic; its ultimate goal is to obtain the optimal action and control the duration of traffic lights, avoiding the problem of falling into local optimality. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a flow chart of the adaptive traffic light control method of the present invention.

[0019] Figure 2 This is a diagram of the Dueling Actor-Critic deep reinforcement learning framework of the present invention.

[0020] Figure 3 This is a visualization result diagram of the adaptive traffic light control in an embodiment of the present invention. DETAILED DESCRIPTION

[0021] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.

[0022] like Figure 1 As shown, the method for adaptive traffic light control based on deep reinforcement learning of the present invention comprises the following steps:

[0023] Step 1: Preprocess the urban traffic network data as follows:

[0024] Step 1.1: Collect information of all traffic nodes in a city to form a traffic data set.

[0025] For all traffic nodes in the city, the location coordinate information of the nodes and the length of all lanes are recorded and stored in a txt file to form a traffic data set.

[0026] Step 1.2: Collect traffic flow information of a city over a period of time to form a traffic flow dataset.

[0027] For the traffic flow in the city over a period of time, the time when all vehicles enter and leave the road network is recorded, and the movement trajectories of the vehicles are recorded to form a traffic flow data set.

[0028] Step 2: Establish a Dueling Actor-Critic deep reinforcement learning framework based on the adaptive ε-greedy algorithm.

[0029] The adaptive ε-greedy algorithm is as follows:

[0030] Step 2.1, according to the number of vehicles on the lane, the state set S is obtained, and the action a is used to control the duration of the traffic light. The state value function represents the vehicle status of all lanes at the current intersection, and the action function is used to add or subtract the duration of the red light or the duration of the green light. The action function adds or subtracts 10 seconds each time to the duration of the traffic light or keeps it unchanged.

[0031] Step 2.2: Input the state set into the Q network as input to obtain the advantage value X. The formula of the advantage function is:

[0032]

[0033] Where S is the state set, A is the action set, V is the state value function, which represents the vehicle status on all lanes of the current intersection, Q is the state action value function, ω is the shared network parameter, α and β are the network parameters of the state value function and advantage function respectively.

[0034] The advantage function is an important factor in calculating the subsequent ε value. The advantage function is used to evaluate the goodness of taking each action relative to the average return in state s. If the advantage value obtained is greater than 0, it means that the return of taking this action is better than the average return, and vice versa.

[0035] Step 2.3 calculates the reasonable ε value under the relative state based on the obtained advantage value. The ε value is a key parameter of the control action. By dynamicizing the ε value, the appropriate action can be selected under a certain state, that is, the traffic light duration can be adaptively controlled according to the traffic flow. The specific calculation expression is as follows:

[0036]

[0037] Step 2.4 inputs the ε value into the Actor network to obtain the optimal action and control the duration of the traffic light. Since this ε cannot be used to select the current action a, it can only be used to select the next state s ′ Action a ′ The present invention uses the idea of ​​Actor-Critic architecture to guide the selection of action a in the current state s to solve the problem of one-step deviation.

[0038] like Figure 2As shown in the figure, the Dueling Actor-Critic deep reinforcement learning framework inputs the current state into the Q network output to obtain the state value V and advantage value X, which are added to obtain the Q value. The new advantage value X is calculated in reverse, and the ε value at the current moment is calculated at the same time. The obtained ε value is put into the Actor network to guide the agent to select actions, and finally the optimal action under the current state is obtained. Every once in a while, the network parameters of the Q network are input into the target Q network, the parameters of the target network are updated, and the maximum Q estimate MaxQ is calculated. The Q network and the actor network are optimized using the TD error. The critic network guides the update of the Actor network by learning the relationship between the environment and the reward.

[0039] Step 3: Import the traffic dataset and vehicle flow dataset into the Dueling Actor-Critic deep reinforcement learning framework for training, and record the average travel time of vehicles and the traffic volume at the intersection.

[0040] Step 4: Generate a replay file of the best round trained in step 3 and import it into the Cityflow platform for visual display.

[0041] The present invention is described below through specific experiments.

[0042] As shown in Tables 1 and 2, there are 7 different traffic data sets and traffic flow data sets, which are respectively imported into the Actor-Critic framework and Dueling Actor-Critic deep reinforcement learning framework for training.

[0043] Figure 3 Shown is a visualization of the optimal results obtained by training using the Dueling Actor-Critic deep reinforcement learning framework.

[0044] Table 1

[0045]

[0046]

[0047] Table 2

[0048]

[0049] When the average number of vehicles passing through each intersection is the same, the average travel time data of Dueling Actor-Critic and Actor-Critic at each intersection are compared. It can be found that in most cases, the results obtained by using Dueling Actor-Critic are better than those of Actor-Critic. This shows that the improvement of the ε-greedy method is effective and reduces the possibility of the ε-greedy method falling into the local optimum.

[0050] The computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and that can be accessed by a computer.

[0051] The processor is used to execute the computer program stored in the memory to implement each step of the method involved in the above embodiment.

Claims

1. An adaptive traffic light control method based on deep reinforcement learning, characterized in that: Import the traffic data set and the vehicle flow data set into the Dueling Actor-Critic deep reinforcement learning framework for training to obtain the optimal action. Action a is used to adjust the duration of the traffic light. The Dueling Actor-Critic deep reinforcement learning framework includes an Actor network and a Critic network; a state set S is obtained according to the number of vehicles on the lane, the state set S is input into the Q network in the Critic network to obtain an advantage value X, and then the ε value under the relative state is calculated, the ε value is input into the Actor network to obtain the optimal action, and the ε value is used to guide the action a under the current state s to obtain the optimal action; The advantage function is: The calculation formula of ε value is: A is the action set, ω is the shared network parameter, α and β are the network parameters of the value function network and the advantage function network respectively; V is the value function, Q is the state action value function; action a is used to adjust the duration of the traffic light, a ′ Action for the next moment; The traffic data set includes the location coordinate information and lane lengths of all traffic nodes in the city; the vehicle flow data set includes the time when all vehicles enter the road network, the time when they leave the road network, and the movement trajectory within a period of time in the city.

2. The adaptive traffic light control method based on deep reinforcement learning according to claim 1 is characterized in that: At regular intervals, the network parameters of the Q network are input into the target Q network in the Critic network, the parameters of the target Q network are updated, and the maximum Q estimate is calculated.

3. The adaptive traffic light control method based on deep reinforcement learning according to claim 1 is characterized in that: The action a is used to adjust the duration of the traffic light, including adding or subtracting the duration of the red light or the duration of the green light.

4. The adaptive traffic light control method based on deep reinforcement learning according to claim 1 is characterized in that: The Cityflow platform is used to visualize the results of training the traffic dataset and the vehicle flow dataset in the Dueling Actor-Critic deep reinforcement learning framework.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into a processor, the adaptive traffic light control method based on deep reinforcement learning according to any one of claims 1 to 4 is implemented.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the adaptive traffic light control method based on deep reinforcement learning according to any one of claims 1 to 4 is implemented.