Traffic signal control method based on ABM and deep learning model
By combining agent-based model (ABM) and deep learning model, traffic signal control methods are constructed, and the problem that traffic signal control in the existing technology cannot adapt to flow changes is solved, intelligent traffic signal adjustment is achieved, and traffic efficiency and safety are improved.
Patent Information
- Application Number
- CN202411979629.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-22
AI Technical Summary
The existing traffic signal control methods cannot effectively handle the dynamic changes in traffic flow, resulting in traffic congestion during peak hours and waste of signal light resources during non-peak hours, lack of deep learning and optimization capabilities, and cannot achieve optimal traffic signal control.
The combination of agent-based model (ABM) and deep learning model is adopted to collect traffic flow data and road topology information, build the ABM model, and use the deep learning model for training and optimization to generate real-time traffic signal control strategies.
It has achieved dynamic adjustment of the signal light duration according to real-time traffic conditions, alleviating traffic congestion, improving road usage efficiency, reducing vehicle waiting time and energy consumption, optimizing traffic flow distribution, and reducing traffic accident incidence.
Smart Images

Figure CN119863935A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation, and more specifically, to a traffic signal control method based on ABM and deep learning model. Background Art
[0002] Existing traffic signal control methods mainly rely on traditional timing control strategies, which usually switch traffic lights based on a fixed schedule without considering changes in real-time traffic flow. Although this method is simple and easy to implement, it cannot adapt to the dynamic changes in traffic flow, resulting in increased traffic congestion during peak hours and possible waste of traffic light resources during non-peak hours. In addition, some advanced control systems attempt to adjust traffic lights by collecting real-time traffic data, but these systems often lack effective prediction and optimization mechanisms, making it difficult to achieve optimal distribution of global traffic flow. With the acceleration of urbanization and the increase in the number of motor vehicles, traffic congestion is becoming increasingly serious, and there is an urgent need for an intelligent traffic signal control method that can respond to changes in traffic conditions in real time.
[0003] In the process of implementing the embodiments of the present invention, the inventors found that there are at least the following problems or defects in the prior art: the existing traffic signal control method cannot effectively handle the dynamic changes of traffic flow, resulting in prominent traffic congestion problems during peak hours and waste of traffic light resources during non-peak hours; at the same time, the lack of the ability to deeply learn and optimize traffic flow makes it impossible to achieve the optimal traffic signal control strategy, and it is impossible to fully improve traffic efficiency and reduce congestion. Summary of the invention
[0004] The present invention provides a traffic signal control method based on ABM and deep learning model, comprising:
[0005] Step A: Collect traffic flow data and road topology information;
[0006] Step B: Build an ABM model based on the collected data;
[0007] Step C: Use deep learning models to train and optimize the ABM model;
[0008] Step D: Generate a traffic signal control strategy based on the optimized model;
[0009] Step E: Apply the traffic signal control strategy to the actual traffic signal control system to perform traffic signal control, and step A is a prerequisite for step B, step B is a prerequisite for step C, step C is a prerequisite for step D, and step D is a prerequisite for step E.
[0010] Furthermore, the step A of collecting traffic flow data and road topology information includes the following steps:
[0011] Step A1: Install sensors at key locations on the road to obtain vehicle flow and speed information as traffic flow data;
[0012] Step A2: Use the geographic information system to obtain the road connection relationship, lane number, and road length information as road topology information.
[0013] Furthermore, the step B of constructing the ABM model based on the collected data includes the following steps:
[0014] Step B1: Divide the road into multiple road section units, and set each road section unit as an agent in an ABM;
[0015] Step B2: Determine the attributes of the agent based on traffic flow data and road topology information, including the road segment length attribute L i , Lane number attribute N i , Initial traffic flow attribute Q i (0), where i represents the i-th agent.
[0016] Furthermore, the step C of training and optimizing the ABM model using a deep learning model includes the following steps:
[0017] Step C1: Build a deep learning model, set the number of neurons in the input layer to n, and the number of neurons in the output layer to m;
[0018] Step C2: The agent state information S of multiple time steps during the operation of the ABM model t =(S 1 t,S 2 t,…,S i t,…,S n t) as the input of the deep learning model, where S t Represents the state information of the i-th agent at the t-th time step, which includes the traffic flow Q i (t), average vehicle speed V i (t);
[0019] Step C3: The traffic efficiency index E under the current traffic signal control strategy is used as the output of the deep learning model. The calculation formula of the traffic efficiency index E is:
[0020]
[0021] Among them, k is the total number of monitored sections, and T is the statistical time period;
[0022] Step C4: Use the back propagation algorithm to train the deep learning model and adjust the model parameters to minimize the error between the predicted traffic efficiency index and the actual traffic efficiency index. The error function is:
[0023]
[0024] Among them, E p Redicted j is the traffic efficiency index predicted for the jth time, E a ctual j is the actual traffic efficiency index for the jth time.
[0025] Furthermore, the step D of generating a traffic signal control strategy according to the optimized model includes the following steps:
[0026] Step D1: Input the current traffic flow data and road topology information into the optimized deep learning model;
[0027] Step D2: The deep learning model outputs the recommended signal duration T for each road section unit i , recommended signal duration T i The calculation formula is:
[0028] T i =f(S i )
[0029] Among them, f is the functional relationship obtained by deep learning model training, S i is the current status information of the i-th road section unit.
[0030] Furthermore, the state information S_i_t also includes vehicle queue length information LQ i (t), and the traffic flow Q i The calculation formula of (t) is:
[0031]
[0032] Among them, q i (τ) is the instantaneous traffic flow of the ith agent at time τ, and Δt is the time interval for calculating the traffic flow.
[0033] Furthermore, the average vehicle speed V i The calculation formula of (t) is:
[0034]
[0035] Among them, n j is the number of vehicles contained in the ith agent at time t, v j (t) is the speed of the jth vehicle at time t.
[0036] Furthermore, the vehicle queue length information LQ i The calculation method of (t) is:
[0037] According to the vehicle position information detected by the sensor, the number of vehicles waiting at the entrance of the road section unit is determined, and then combined with the average length of the vehicles l, the length of the vehicle queue is calculated
[0038] LQ i (t) = n waiting *l
[0039] Among them, n waiting The number of waiting vehicles.
[0040] Furthermore, the deep learning model is a multi-layer perceptron model, the number of neurons in the hidden layer is h, the activation function of the hidden layer is the ReLU function, and the activation function of the output layer is the Sigmoid function.
[0041] Furthermore, in the step D2, the recommended signal duration T i To verify the rationality, if T i Exceeds the preset maximum signal duration T m ax or less than the preset minimum signal duration T m in, then for T i Make corrections, the correction formula is:
[0042] T i ′=min(max(T i ,T m in),T m ax)
[0043] Among them, T i ′ is the corrected recommended signal duration.
[0044] The above-mentioned embodiments of the present invention have at least the following beneficial effects: the traffic signal control method based on ABM and deep learning model can improve the intelligent level of traffic signal control, build an accurate ABM model by collecting traffic flow data and road topology information in real time, and use deep learning technology to train and optimize the model, thereby generating a more scientific and reasonable traffic signal control strategy. This method can dynamically adjust the duration of traffic lights according to real-time traffic conditions, effectively alleviate traffic congestion, improve road use efficiency, reduce vehicle waiting time, and thus reduce energy consumption and environmental pollution.
[0045] In addition, this method predicts traffic efficiency indicators through deep learning models and uses the back propagation algorithm to minimize the error between the predicted and actual traffic efficiency indicators, which can further improve the accuracy and reliability of traffic signal control strategies. In this way, the traffic flow of each section can be better balanced, the distribution of traffic flow can be optimized, the occurrence of traffic accidents can be reduced, driving safety can be improved, and strong technical support can be provided for urban traffic management. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:
[0047] Figure 1 A flow chart of a traffic signal control method based on ABM and deep learning model provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0048] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.
[0049] Those skilled in the art know that the embodiments of the present invention can be implemented as a system, device, apparatus, method or computer program product. Therefore, the present invention can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0050] It should be noted that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction and does not have any limiting meaning.
[0051] Reference below Figure 1 , Figure 1 The following is a flow chart of a traffic signal control method based on ABM and deep learning model provided by one embodiment of the present invention. Figure 1 As shown, a traffic signal control method 100 based on ABM and deep learning model includes:
[0052] Step A: Collect traffic flow data and road topology information;
[0053] Step B: Build an ABM model based on the collected data;
[0054] Step C: Use deep learning models to train and optimize the ABM model;
[0055] Step D: Generate a traffic signal control strategy based on the optimized model;
[0056] Step E: Apply the traffic signal control strategy to the actual traffic signal control system to perform traffic signal control, and step A is a prerequisite for step B, step B is a prerequisite for step C, step C is a prerequisite for step D, and step D is a prerequisite for step E.
[0057] It should be noted that this method first involves collecting traffic flow data and road topology information, which is the basis for building a traffic signal control model. Here, traffic flow data refers to real-time information such as vehicle volume and speed, while road topology information includes road connectivity, number of lanes, and road length. These data can be obtained by setting up sensors at key locations, and using a geographic information system (GIS) to obtain road topology information.
[0058] Specifically, traffic flow data can be collected by installing sensors at key locations such as intersections and main roads. These sensors can monitor and record vehicle flow and speed in real time. At the same time, GIS technology can provide detailed map information of roads, including road connection methods, the number of lanes on each road, and the length of the road. This information will be used as model input to provide necessary data support for subsequent model construction and optimization.
[0059] Preferably, the collected data may further include multiple steps. For example, in step A1, the location of the sensor may be determined based on the distribution of traffic flow and the importance of the road to ensure the representativeness and accuracy of the data. In step A2, the acquisition of GIS data may be combined with remote sensing technology and field surveys to improve the accuracy of the data. In addition, the collected data may also include the impact of weather conditions and special events (such as construction or accidents) on traffic flow, so that the model can more comprehensively reflect the actual situation.
[0060] In some embodiments, the step A of collecting traffic flow data and road topology information includes the following steps:
[0061] Step A1: Install sensors at key locations on the road to obtain vehicle flow and speed information as traffic flow data;
[0062] Step A2: Use the geographic information system to obtain the road connection relationship, lane number, and road length information as road topology information.
[0063] It should be noted that this implementation describes in detail the specific steps of collecting traffic flow data and road topology information. Here, traffic flow data refers to real-time information such as vehicle flow and speed, while road topology information involves the geometric and logical connection characteristics of the road. Step A1 involves deploying sensors at key road locations to collect traffic flow and speed information, and step A2 uses a geographic information system (GIS) to obtain information such as road connectivity, the number of lanes, and road length.
[0064] Specifically, the sensors in step A1 can be geomagnetic sensors, video surveillance cameras or radar sensors, etc., which are installed at key locations such as intersections and main roads to monitor traffic flow and speed in real time. The data collected by these sensors will be transmitted to the central processing system for analysis and modeling. In step A2, the application of GIS technology can provide detailed map information of the roads, including how the roads are connected, the number of lanes on each road, and the length of the roads. This information is crucial to understanding how traffic flow is distributed in the road network.
[0065] Preferably, the deployment of sensors in step A1 can be optimized based on peak traffic hours and accident-prone areas to ensure that data is collected at the most critical times and locations. In addition, the data collection frequency of the sensor can be adjusted according to actual conditions to balance the real-time nature of the data and the load of the processing system. In step A2, the acquisition of GIS data can be combined with the latest remote sensing images and field survey data to ensure the accuracy and up-to-dateness of the map information. In order to improve the accuracy of the data, machine learning algorithms can also be used to identify and correct potential errors in GIS data. In addition, it is also possible to consider integrating social media, traffic cameras and other open source data into the data collection process to obtain more comprehensive information on traffic conditions.
[0066] In some embodiments, the step B constructs the ABM model based on the collected data, including the following steps:
[0067] Step B1: Divide the road into multiple road section units, and set each road section unit as an agent in an ABM;
[0068] Step B2: Determine the attributes of the agent based on traffic flow data and road topology information, including the road segment length attribute L i , Lane number attribute N i , Initial traffic flow attribute Q i (0), where i represents the i-th agent.
[0069] It should be noted that this implementation describes the process of building an agent-based model (ABM) based on the collected data. ABM is a simulation method that studies complex systems by simulating the behavior and interactions of individuals (in this case, road segment units). Here, we divide the road into multiple road segment units, and each road segment unit is regarded as an intelligent agent with specific attributes and behavior rules.
[0070] Specifically, the road segment unit in step B1 can be a part of the actual road, such as an intersection or a section of road. Each road segment unit is given the identity of an agent, which means that it can independently react and make decisions based on traffic flow data and road topology information. Step B2 involves determining the attributes of these agents, including the length of the road segment, the number of lanes, and the initial traffic flow. These attributes can be set according to the actual road conditions and traffic conditions. For example, the length of a road segment can be 500 meters with two lanes, and the initial traffic flow can be determined based on historical data or real-time sensor data.
[0071] Preferably, the road division in step B1 can be optimized according to the distribution of traffic flow and the importance of the road to ensure that the model can simulate traffic flow more accurately. For example, a busy road section can be divided into smaller units to simulate traffic dynamics more finely. In step B2, the attribute settings of the agent can further include the type of vehicle (such as a car, truck, etc.), the driving behavior of the vehicle (such as acceleration, deceleration, lane change, etc.), and the environmental factors of the road section (such as weather conditions, road construction, etc.).
[0072] Furthermore, it is also possible to consider introducing machine learning algorithms to dynamically adjust the properties of the agent to make it closer to the real-time traffic conditions. Alternatives may include using different model building techniques, such as system dynamics models or rule-based models, to adapt to different traffic management and research needs.
[0073] In some embodiments, the step C of using a deep learning model to train and optimize the ABM model includes the following steps:
[0074] Step C1: Build a deep learning model, set the number of neurons in the input layer to n, and the number of neurons in the output layer to m;
[0075] Step C2: The agent state information S of multiple time steps during the operation of the ABM model t =(S 1 t,S 2 t,…,s i t,…,S n t) as the input of the deep learning model, where S t Represents the state information of the i-th agent at the t-th time step, which includes the traffic flow Qi (t), average vehicle speed V i (t);
[0076] Step C3: The traffic efficiency index E under the current traffic signal control strategy is used as the output of the deep learning model. The calculation formula of the traffic efficiency index E is:
[0077]
[0078] Among them, k is the total number of monitored sections, and T is the statistical time period;
[0079] Step C4: Use the back propagation algorithm to train the deep learning model and adjust the model parameters to minimize the error between the predicted traffic efficiency index and the actual traffic efficiency index. The error function is:
[0080]
[0081] Among them, E p Redicted j is the traffic efficiency index predicted for the jth time, E a ctual j is the actual traffic efficiency index for the jth time.
[0082] It should be noted that this implementation describes in detail the process of training and optimizing the agent-based model (ABM) using a deep learning model. A deep learning model is a machine learning technology that processes complex data patterns by simulating the neural network structure of the human brain. Here, we will build a deep learning model, set the number of neurons in the input layer and the output layer, and use the agent state information during the operation of the ABM model as training data.
[0083] Specifically, the construction of the deep learning model in step C1 involves determining the number of neurons in the input layer and the output layer. The number of neurons in the input layer n represents the number of agent state information received by the model, while the number of neurons in the output layer m represents the number of traffic efficiency indicators predicted by the model. These parameters can be set according to the actual scale and complexity of the traffic network. For example, if there are 100 agents in the traffic network, then the input layer may require 100 neurons; if the model needs to predict the traffic efficiency of each agent, then the output layer may also require 100 neurons.
[0084] Preferably, the selection of agent state information in step C2 may include key indicators such as traffic flow and average speed, which can be used as input features of the deep learning model. The state information St represents the state of the i-th agent at a specific time step t, and this state information can be generated by the ABM model during the simulation process. The calculation formula of the traffic efficiency index E in step C3 may further include consideration of the contribution of traffic flow and speed of different road sections to traffic efficiency.
[0085] Furthermore, more traffic efficiency indicators, such as vehicle queue length, travel time, etc., can be introduced to provide a more comprehensive assessment of traffic conditions. In step C4, the training process of the back propagation algorithm can optimize the model parameters to minimize the error between the predicted traffic efficiency indicators and the actual traffic efficiency indicators. The error function can use the mean square error (MSE) to measure the difference between the predicted value and the actual value. In order to improve the generalization ability of the model, regularization techniques, such as L1 or L2 regularization, can be used to prevent overfitting.
[0086] In some embodiments, the step D generates a traffic signal control strategy according to the optimized model, including the following steps:
[0087] Step D1: Input the current traffic flow data and road topology information into the optimized deep learning model;
[0088] Step D2: The deep learning model outputs the recommended signal duration T for each road section unit i , recommended signal duration T i The calculation formula is:
[0089] T i =f(S i )
[0090] Among them, f is the functional relationship obtained by deep learning model training, S i is the current status information of the i-th road section unit.
[0091] It should be noted that this implementation describes the process of generating a traffic signal control strategy based on an optimized model. This process involves inputting real-time traffic flow data and road topology information into a trained and optimized deep learning model, which will output the recommended signal duration for each road section unit. The recommended signal duration here refers to the optimal signal light switching time calculated by the model based on the current traffic conditions.
[0092] Specifically, the current traffic flow data and road topology information in step D1 may include real-time traffic flow, vehicle speed, vehicle queue length, etc., which can be obtained through sensors and GIS systems. The deep learning model uses this data as input and predicts the signal light duration of each road section unit through the functional relationship obtained by previous training. The recommended signal duration calculation formula in step D2 can be determined based on the results of model training, where f represents the functional relationship obtained by deep learning model training, and xi represents the current status information of the i-th road section unit.
[0093] Preferably, the data input in step D1 may further include traffic flow data in different time periods and under different weather conditions to adapt to changes in traffic conditions. The model can also predict future traffic flow based on historical data and trends, so as to adjust the signal light duration in advance. In step D2, the calculation of the recommended signal duration can take into account the traffic demand and supply of the intersection, as well as the traffic conditions of adjacent sections, to achieve regional coordinated control.
[0094] Furthermore, a real-time feedback mechanism can be introduced to fine-tune the recommended signal duration according to the actual traffic conditions to improve the adaptability and effectiveness of the control strategy. Alternatives may include using different deep learning architectures, such as convolutional neural networks (CNNs) or recurrent neural networks (RNNs), to adapt to different types of traffic data and control requirements.
[0095] In some embodiments, the state information S i t also includes vehicle queue length information LQ i (t), and the traffic flow Q i The calculation formula of (t) is:
[0096]
[0097] Among them, q i (τ) is the instantaneous traffic flow of the ith agent at time τ, and Δt is the time interval for calculating the traffic flow.
[0098] It should be noted that the vehicle queue length information Q i (t) refers to the number of vehicles waiting at the entrance of a specific road segment, while the traffic volume refers to the number of vehicles passing through the road segment within a specific time interval.
[0099] Specifically, the traffic flow Q i (t) can be calculated by integrating the instantaneous traffic flow of the ith agent at time τ within the time interval Δτ. The instantaneous traffic flow here refers to the number of vehicles passing through the road section at a specific time, and the time interval Δτ can be set according to the frequency and accuracy of data collection, for example, it can be the average traffic flow of one minute or five minutes.
[0100] Preferably, the vehicle queue length information Q i The calculation method of (t) can determine the number of vehicles waiting at the entrance of the road section unit based on the vehicle position information detected by the sensor. Combined with the average length l of the vehicle, the vehicle queue length Q is calculated. i (t) = (number of waiting vehicles) * l. The number of waiting vehicles here can be determined by video analysis, geomagnetic induction or other sensor technologies, and the average length l of the vehicle can be set to a standard value according to the distribution of vehicle models. For example, the average length of small vehicles can be set to 4 meters.
[0101] Furthermore, the dynamic changes in the length of the vehicle queue can be taken into account and the value of Q_i_t can be adjusted by updating the sensor data in real time. Alternative solutions include using more advanced image recognition technology to more accurately identify and calculate the length of the vehicle queue, or using the Internet of Vehicles technology to directly obtain queue information from vehicles.
[0102] In some embodiments, the average vehicle speed V i The calculation formula of (t) is:
[0103]
[0104] Among them, n j is the number of vehicles contained in the ith agent at time t, v j (t) is the speed of the jth vehicle at time t.
[0105] It should be noted that this embodiment describes in detail the calculation method of the average vehicle speed. Here, the average vehicle speed refers to the average speed of all vehicles in a road section unit at a specific time point. This indicator is crucial for evaluating the fluidity and efficiency of traffic flow.
[0106] Specifically, the average speed is obtained by calculating the number of vehicles contained in the i-th agent at time t and the speed of these vehicles. Specifically, the calculation formula for the average speed is:
[0107]
[0108] Among them, N i (t) represents the number of vehicles contained in the i-th agent at time t, v ij (t) represents the speed of the jth vehicle at time t. This formula calculates the average by adding the speeds of all vehicles and dividing by the number of vehicles.
[0109] Preferably, in order to adapt to the speed differences of different vehicle types, the calculation of the average vehicle speed can further set different speed weights for different types of vehicles (such as cars, trucks, buses) to more accurately reflect the actual traffic conditions.
[0110] Furthermore, real-time traffic data, such as speed information collected by vehicle GPS data or traffic monitoring systems, can be introduced to dynamically update the calculation of average vehicle speed. Alternative solutions include using vehicle acceleration data to assist in calculating average vehicle speed, or combining historical traffic data to predict average vehicle speeds in different time periods, thereby providing more comprehensive decision support for traffic signal control.
[0111] In some embodiments, the vehicle queue length information LQ i The calculation method of (t) is:
[0112] According to the vehicle position information detected by the sensor, the number of vehicles waiting at the entrance of the road section unit is determined, and then combined with the average length of the vehicles l, the length of the vehicle queue is calculated
[0113] LQ i (t) = n waiting *l
[0114] Among them, n waiting The number of waiting vehicles.
[0115] It should be noted that this embodiment describes a method for calculating vehicle queue length information. Here, vehicle queue length information refers to the length of the queue of vehicles waiting at the entrance of a specific road section, which is an important indicator for measuring the degree of traffic congestion.
[0116] Specifically, the vehicle queue length information is determined by the vehicle position information detected by the sensor. Specifically, it is necessary to first determine the number of vehicles waiting at the entrance of the road section unit, and then calculate the vehicle queue length in combination with the average length l of the vehicles. The average length l of the vehicles here can be set according to the distribution of vehicle models. For example, the average length of small vehicles can be set to 4 meters, and that of large vehicles to 12 meters.
[0117] Preferably, in order to improve accuracy and real-time performance, the calculation of vehicle queue length information can further adopt video analysis technology to automatically identify and count queued vehicles, or use geomagnetic sensors to detect the presence and movement of vehicles.
[0118] Furthermore, a dynamic adjustment mechanism for vehicle length can be introduced to adjust the value of the average vehicle length l according to real-time traffic data and vehicle type recognition results. Alternative solutions include using vehicle networking technology to obtain queue information directly from vehicles, or combining social media and traffic broadcast information to assist in judging traffic congestion. Through these methods, the degree of traffic congestion can be more accurately assessed and more effective data support can be provided for traffic signal control.
[0119] In some embodiments, the deep learning model is a multi-layer perceptron model, the number of neurons in its hidden layer is h, the activation function of the hidden layer is the ReLU function, and the activation function of the output layer is the Sigmoid function.
[0120] It should be noted that this implementation describes in detail the specific structure of the deep learning model and the selection of activation functions. Here, the multi-layer perceptron model refers to an artificial neural network consisting of multiple layers, each layer consisting of multiple neurons, which can learn complex patterns of input data. ReLU function and Sigmoid function are two commonly used activation functions, which are used to introduce nonlinearity in neural networks, enabling the model to learn and perform more complex tasks.
[0121] Specifically, the multilayer perceptron model consists of an input layer, one or more hidden layers, and an output layer. The number of neurons h in the hidden layer can be set according to the complexity of the model and the task requirements, for example, it can be set to 64, 128, or 256. The activation function of the hidden layer is the ReLU function, which is a commonly used activation function and is widely used because of its simple calculation and ability to effectively solve the gradient vanishing problem. The activation function of the output layer is the Sigmoid function, which can compress the output value between 0 and 1 and is suitable for binary classification problems or tasks that require output probability values.
[0122] Preferably, the structure of the multilayer perceptron model may include determining the specific number of neurons in each layer and the connection mode. For example, a network structure with two hidden layers may be selected, with the first hidden layer having 128 neurons and the second hidden layer having 64 neurons.
[0123] Further, dropout techniques can be introduced to reduce overfitting, or batch normalization can be used to speed up the training process. Alternatives may include using other types of neural networks, such as convolutional neural networks (CNN) or recurrent neural networks (RNN), which may be more suitable for processing image or sequence data. You can also consider using different activation functions, such as tanh or Leaky ReLU, to adapt to specific learning tasks and improve the performance of the model.
[0124] In some embodiments, in step D2, the recommended signal duration T is also included. i To verify the rationality, if T i Exceeds the preset maximum signal duration T max Or less than the preset minimum signal duration T min , then for T i Make corrections, the correction formula is:
[0125] T i ′=min(max(T i ,T min ),T max )
[0126] Among them, T i ′ is the corrected recommended signal duration.
[0127] It should be noted that this implementation describes the process of verifying the rationality of the recommended signal duration, and provides a method for correcting the recommended signal duration that exceeds the preset duration range. Here, the recommended signal duration refers to the signal light switching time calculated by the deep learning model based on the current traffic conditions, and the preset maximum signal duration and the preset minimum signal duration are time range limits set to ensure traffic safety and efficiency.
[0128] Specifically, in step D2, the deep learning model will output the recommended signal duration for each road section unit, which needs to be consistent with the preset maximum signal duration T max and minimum signal duration T min If the recommended signal duration exceeds these preset ranges, it needs to be corrected. max and T min It can be set according to traffic rules and actual traffic conditions, for example, T max It may be set to 120 seconds, and T min Probably set to 30 seconds.
[0129] Preferably, the correction of the recommended signal duration can be achieved through a specific correction function. This correction function can adjust the signal duration according to the deviation between the recommended signal duration and the preset duration, the change of traffic flow and other relevant factors. For example, the correction formula can be designed as:
[0130] T ′ =f(T,T min ,T max )
[0131] Among them, T ′ is the corrected duration of the recommendation signal. This function can be linear or nonlinear, depending on the actual situation.
[0132] Furthermore, a real-time feedback mechanism can be introduced to dynamically adjust the preset maximum and minimum signal durations according to changes in actual traffic conditions to improve the flexibility and adaptability of traffic signal control. Alternative solutions may include the use of intelligent optimization methods such as fuzzy logic or genetic algorithms to achieve automatic adjustment of signal durations to better adapt to complex traffic environments.
[0133] The above-mentioned embodiments of the present invention have the following beneficial effects: The traffic signal control method based on ABM and deep learning model described in the present invention can provide a highly automated and intelligent traffic management solution. By accurately collecting traffic flow data and road topology information, the constructed ABM model can simulate complex traffic flow dynamics, and the training optimization of the deep learning model can further improve the prediction accuracy of the model. This method can dynamically adjust the traffic signal control strategy to adapt to the ever-changing traffic conditions, thereby reducing traffic congestion, improving road traffic efficiency, reducing the incidence of traffic accidents, and improving the intelligence level of the urban transportation system.
[0134] In addition, the recommended signal duration and traffic efficiency indicators output by the deep learning model can more accurately control traffic lights and optimize the distribution of traffic flow. This method can reduce traffic delays caused by unreasonable signal light settings and improve the travel experience of drivers and passengers. At the same time, through rationality verification and correction of recommended signal duration, the safety and compliance of traffic signal control strategies can be ensured, and traffic chaos caused by improper signal duration settings can be avoided. This method of combining ABM and deep learning technology can provide an innovative technical means for urban traffic management and help build a more efficient, safe, and environmentally friendly traffic environment.
[0135] Furthermore, the storage medium of the embodiment of the present application stores program instructions that can implement all the above methods, wherein the program instructions can be stored in the above storage medium in the form of a software product, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or terminal devices such as a computer, a server, a mobile phone, and a tablet.
[0136] The above descriptions are only some preferred embodiments of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present invention is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present invention to form a technical solution.
Claims
1. A traffic signal control method based on ABM and deep learning model, characterized in that: The following steps are involved: Step A: Collect traffic flow data and road topology information; Step B: Build an ABM model based on the collected data; Step C: Use deep learning models to train and optimize the ABM model; Step D: Generate a traffic signal control strategy based on the optimized model; Step E: Applying the traffic signal control strategy to an actual traffic signal control system to perform traffic signal control.
2. The traffic signal control method based on ABM and deep learning model according to claim 1 is characterized in that: The step A of collecting traffic flow data and road topology information includes the following steps: Step A1: Install sensors at key locations on the road to obtain vehicle flow and speed information as traffic flow data; Step A2: Use the geographic information system to obtain the road connection relationship, lane number, and road length information as road topology information.
3. The traffic signal control method based on ABM and deep learning model according to claim 1 is characterized in that: The step B constructs the ABM model based on the collected data and includes the following steps: Step B1: Divide the road into multiple road section units, and set each road section unit as an agent in an ABM; Step B2: Determine the attributes of the agent based on traffic flow data and road topology information, including the road segment length attribute L i , Lane number attribute N i , Initial traffic flow attribute Q i (0), where i represents the i-th agent.
4. The traffic signal control method based on ABM and deep learning model according to claim 1 is characterized in that: The step C uses a deep learning model to train and optimize the ABM model, including the following steps: Step C1: Build a deep learning model, set the number of neurons in the input layer to n, and the number of neurons in the output layer to m; Step C2: The agent state information S of multiple time steps during the operation of the ABM model t =(S1t,S2t,…,s i t,…,S n t) as the input of the deep learning model, where S t Represents the state information of the i-th agent at the t-th time step, which includes the traffic flow Q i (t), average vehicle speed V i (t); Step C3: The traffic efficiency index E under the current traffic signal control strategy is used as the output of the deep learning model. The calculation formula of the traffic efficiency index E is: Among them, k is the total number of monitored sections, and T is the statistical time period; Step C4: Use the back propagation algorithm to train the deep learning model and adjust the model parameters to minimize the error between the predicted traffic efficiency index and the actual traffic efficiency index. The error function is: Among them, E p Redicted j is the traffic efficiency index predicted for the jth time, E a ctual j is the actual traffic efficiency index for the jth time.
5. The traffic signal control method based on ABM and deep learning model according to claim 1 is characterized in that: The step D generates a traffic signal control strategy according to the optimized model, comprising the following steps: Step D1: Input the current traffic flow data and road topology information into the optimized deep learning model; Step D2: The deep learning model outputs the recommended signal duration T for each road section unit i , recommended signal duration T i The calculation formula is: T i =f(S i ) Among them, f is the functional relationship obtained by deep learning model training, S i is the current status information of the i-th road section unit.
6. The traffic signal control method based on ABM and deep learning model according to claim 4 is characterized in that: The state information S t Also includes vehicle queue length information LQ i (t), and the traffic flow Q i The calculation formula of (t) is: Among them, q i (τ) is the instantaneous traffic flow of the ith agent at time τ, and Δt is the time interval for calculating the traffic flow.
7. The traffic signal control method based on ABM and deep learning model according to claim 4 is characterized in that: The average vehicle speed V i The calculation formula of (t) is: Among them, n j is the number of vehicles contained in the ith agent at time t, v j (t) is the speed of the jth vehicle at time t.
8. The traffic signal control method based on ABM and deep learning model according to claim 4 is characterized in that: The vehicle queue length information LQ i The calculation method of (t) is: According to the vehicle position information detected by the sensor, the number of vehicles waiting at the entrance of the road section unit is determined, and then combined with the average length of the vehicles l, the length of the vehicle queue is calculated LQ i (t)=n waiting *l Among them, n waiting The number of waiting vehicles.
9. The traffic signal control method based on ABM and deep learning model according to claim 5 is characterized in that: The deep learning model is a multi-layer perceptron model, the number of neurons in the hidden layer is h, the activation function of the hidden layer is the ReLU function, and the activation function of the output layer is the Sigmoid function.
10. The traffic signal control method based on ABM and deep learning model according to claim 5, characterized in that: In the step D2, the recommended signal duration T is also included. i To verify the rationality, if T i Exceeds the preset maximum signal duration T m ax or less than the preset minimum signal duration T m in, then for T i Make corrections, the correction formula is: T′ i =min(max(T i ,T m in),T m ax) Among them, T′ i is the revised recommended signal duration.