Method for optimizing urban road intersection signal lamp timing

By combining the LightGBM model and the genetic-ant colony algorithm, the nonlinear problems of traffic flow prediction and traffic light timing were solved, achieving high-precision short-term traffic flow prediction and multi-objective optimization, reducing traffic congestion, and improving traffic efficiency and environmental quality.

CN121661851APending Publication Date: 2026-03-13CHONGQING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing traffic flow prediction models struggle to handle the nonlinear and stochastic characteristics of traffic flow, resulting in low prediction accuracy. Furthermore, traffic light timing schemes neglect pedestrian safety, non-motorized vehicle right-of-way, and exhaust emission control, leading to significant traffic conflicts.

Method used

A short-term traffic flow prediction model is constructed by combining the LightGBM model with Bayesian parameter optimization. A multi-objective optimization traffic light timing algorithm is designed by combining genetic algorithm and ant colony algorithm. Through data preprocessing and multi-objective function optimization, accurate traffic flow prediction and traffic light control are achieved.

Benefits of technology

It improved the accuracy of short-term traffic flow forecasting, optimized traffic light timing, reduced traffic congestion at intersections, alleviated traffic pressure, and improved traffic efficiency and environmental quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121661851A_ABST
    Figure CN121661851A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of intelligent traffic, and discloses a method for optimizing urban road intersection signal lamp timing, which comprises the following steps: S1, acquiring and preprocessing intersection flow data; s2, introducing a Light GBM model, and constructing a single intersection short-time flow prediction model based on Bayesian parameter optimization, namely a Bayer-Light GBM model; s3, the flow data preprocessed in the step S1 are input into a Bayer-LightGBM model, and the short-time flow of the single intersection in the next period is obtained through prediction; and S4, designing a single-intersection signal lamp timing optimization algorithm based on a genetic algorithm and an ant colony algorithm, converting a multi-signal lamp control problem into a mathematical multi-objective optimization problem, designing an objective function related to intersection passage, then inputting predicted short-time flow for solving, obtaining an optimization set of solutions, and finally obtaining a single-intersection signal lamp timing optimization algorithm. And then carrying out optimization configuration on traffic timing according to the optimization set. According to the method for optimizing the traffic light timing of the urban road intersection, the traffic efficiency of the intersection can be enhanced, the traffic jam of the intersection is reduced, and the traffic pressure of the intersection is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent transportation technology, specifically relating to a method for optimizing traffic light timing at urban road intersections. Background Technology

[0002] With over four decades of rapid economic growth and the deepening of the new urbanization strategy, the agglomeration effect of urban populations has become increasingly significant. According to data from the National Bureau of Statistics, by the end of 2023, China's urbanization rate of permanent residents had reached 66.15%, an increase of nearly 15 percentage points compared to 2010. While the population concentrates in cities, residents' consumption capacity continues to upgrade, and the number of cars, as a convenient means of transportation, has experienced explosive growth—by the end of 2023, the national car ownership exceeded 336 million vehicles, of which private cars accounted for over 86%, meaning that on average, one in four urban residents owns a private car. The widespread use of cars has greatly facilitated citizens' daily commutes, shopping, and intercity travel, becoming an indispensable mode of transportation in modern urban life, but it has also brought unprecedented pressure to urban transportation systems.

[0003] The core contradiction in urban traffic problems lies in the fact that limited land resources and lagging transportation infrastructure are unable to match the surging traffic demand. On the one hand, land resources in the core urban areas are scarce, and road construction is limited by building density, the protection of historical districts, and natural geographical conditions, resulting in very limited space for new road networks. On the other hand, some cities lacked foresight in their early transportation planning, resulting in an unreasonable road network structure and aging transportation facilities, leading to low traffic efficiency. This supply-demand imbalance directly leads to three major problems: First, traffic congestion has become the norm. During the morning rush hour (7:30-9:00) and evening rush hour (17:30-19:00), long queues of cars frequently appear on the city's main roads, with some sections experiencing speeds of less than 15 km / h, equivalent to the speed of a bicycle. Second, the traffic accident rate has increased. In congested conditions, vehicles accelerate and decelerate frequently, and lane changes increase, resulting in a 2-3 times higher incidence of minor collisions and rear-end accidents compared to free-flowing times. This not only threatens lives but also further exacerbates congestion. Third, exhaust pollution has intensified. The exhaust emission intensity of cars at idle is 3-5 times that of normal driving. PM2.5, NOx, and other pollutants account for 25%-35% of urban air pollution sources, seriously impacting the respiratory health of residents.

[0004] Short-term traffic flow is one of the core data points of intelligent transportation systems, specifically referring to the number of vehicles passing through a road section within a short period. Compared to macro-level data such as daily average traffic flow and peak hourly traffic flow, short-term traffic flow is characterized by its "high dynamism and randomness," and can more accurately reflect the real-time changes in traffic flow. For example, during the morning rush hour, intersections around schools experience short-term traffic peaks between 7:00 and 7:30 (due to a concentration of vehicles dropping off students), followed by a gradual decrease in flow. Rainy weather causes vehicles to slow down, reducing short-term traffic flow by 15%-20% during the same time period. This refined traffic flow data is of great significance for traffic management and urban planning: at the traffic management level, traffic light timings can be adjusted based on short-term traffic flow data; at the urban planning level, the spatiotemporal distribution characteristics of short-term traffic flow can be analyzed to determine whether the road network capacity meets demand, providing data support for new road construction and optimization of public transportation routes. Therefore, accurate prediction of short-term traffic flow is a prerequisite and foundation for achieving intelligent traffic control.

[0005] From a theoretical perspective, existing traffic flow prediction and timing schemes have significant shortcomings: traditional traffic flow prediction models struggle to handle the nonlinear and stochastic characteristics of traffic flow, resulting in low prediction accuracy for emergencies, with prediction errors often exceeding 20%; while existing traffic light timing schemes often prioritize "improving the efficiency of motor vehicle traffic" as the sole objective, neglecting needs such as pedestrian safety, non-motorized vehicle right-of-way, and exhaust emission control, leading to the contradiction of "motor vehicles moving faster, pedestrians moving slower" and "roads becoming more accessible, but pollution increasing."

[0006] Literature review shows that it is feasible to predict short-term traffic flow based on statistical and machine learning methods. Although previous researchers have conducted a lot of exploration and research in this field, some problems remain unsolved. The most important problem is that the prediction algorithm and the control algorithm cannot be coordinated. The control algorithm depends on the prediction algorithm. At the same time, the application of the algorithms studied by previous researchers in actual urban short-term traffic flow prediction is somewhat insufficient. Summary of the Invention

[0007] In view of this, the purpose of this invention is to provide a method for optimizing traffic light timing at urban road intersections, which can improve traffic efficiency at intersections, reduce traffic congestion, and effectively alleviate traffic pressure at intersections.

[0008] To achieve the above objectives, the present invention adopts the following technical solution:

[0009] A method for optimizing traffic light timing at urban road intersections includes the following steps:

[0010] S1. Collection and preprocessing of traffic flow data at intersections;

[0011] S2. Introduce the LightGBM model and construct a short-term traffic prediction model for a single intersection based on Bayesian parameter optimization, namely the Bayers-LightGBM model;

[0012] S3. Input the traffic data preprocessed in step S1 into the Bayers-LightGBM model to predict the short-term traffic flow of a single intersection in the next cycle;

[0013] S4. Design a signal timing optimization algorithm for a single intersection based on genetic algorithm and ant colony algorithm. Transform the multi-signal control problem into a mathematical multi-objective optimization problem. Design the objective function related to intersection traffic, and then input the short-term traffic flow predicted in step S3 to solve the problem. Obtain the optimized set of solutions, and then optimize the traffic timing configuration based on the optimized set.

[0014] Furthermore, step S1 includes the following sub-steps:

[0015] S1.1 Data Acquisition;

[0016] Extract point cloud roadside data and convert roadside image data into structured short-term traffic data;

[0017] The structured short-term traffic data includes traffic flow, lateral width of roads at traffic light intersections, frequency of road maintenance at traffic light intersections, population density within 2 kilometers of traffic light intersections, standard deviation of vehicle speed within 100 meters in both directions at traffic light intersections, vehicle accidents, intersection control, control measures, time, weather, and special times.

[0018] Structured short-term traffic data is collected every minute;

[0019] S1.2 Data Preprocessing;

[0020] Data preprocessing includes the following methods:

[0021] I. Data Cleaning: Lagrange interpolation is used to handle missing data values;

[0022] II. Outlier Correction or Removal: The 3σ rule is used to detect data, that is, data within ±3 times the standard deviation of the mean are considered normal values, and values ​​outside this range are considered outliers and are corrected or removed.

[0023] III. Unification of multi-source data: Time is used as a unique data identifier, and data with the same time are grouped into one row to ensure that multi-source data are merged based on time.

[0024] IV. Data normalization: Scaling the data to between 0 and 1;

[0025] The normalization calculation expression is:

[0026]

[0027] In the formula, X represents the original data; X norm For the normalized data, X min and X max These are the minimum and maximum values ​​in the dataset, respectively.

[0028] Furthermore, in step S2, the process of constructing the Bayers-LightGBM model is as follows:

[0029] The LightGBM model is introduced, and Bayesian constraints are used to optimize the parameters of the LightGBM model in each iteration, thereby ensuring that the parameters are at their optimal values ​​in each iteration; in each iteration, the parameters use a constant value;

[0030] The parameters of the LightGBM model include: learning rate, maximum number of iterations for the weak learner, maximum depth of the control tree, minimum weight of a single leaf node, and number of leaf nodes.

[0031] Furthermore, the specific content of step S4 is as follows:

[0032] This paper uses MATLAB code to combine ant colony algorithm and genetic algorithm. The combined algorithm has the global search function of genetic algorithm and can utilize the pheromone update process of ant colony algorithm.

[0033] The combined algorithm incorporates an adaptive gene mutation probability strategy, which adaptively calculates the mutation probability based on the fitness of the current generation, ensuring that the mutation probability is neither too high nor too low, thereby avoiding premature convergence or prolonged stay in a local optimum.

[0034] The objective functions of the algorithm include vehicle delay objective function, intersection capacity objective function, and number of stops objective function;

[0035] Vehicle delay objective function:

[0036]

[0037] In the formula, Vehicle delay time refers to the extra waiting time at the entrance lane of a signalized intersection, caused by vehicles having to queue and wait for the green light due to the obstruction of the red light signal; For traffic light intersection cycles; The percentage of time that the signal is green; Traffic flow at the first traffic light; The traffic flow percentage of the first traffic light; The saturation flow rate;

[0038] Objective function for intersection traffic capacity:

[0039]

[0040] In the formula, Intersection capacity refers to the ease with which traffic can pass through an intersection. This refers to the number of traffic lights at the intersection; For the effective green light time;

[0041] Objective function for the number of stops:

[0042]

[0043] In the formula, The total number of vehicles parked at any given traffic light intersection. Parking rate; Traffic saturation;

[0044] In summary, three objective functions were constructed. It is assumed that within the analyzed region, there are... For a given number of traffic light intersections, the requirement is that the average value of the coordination index for all traffic light intersections be minimized, i.e.:

[0045]

[0046] The traffic flow and number of vehicles at any traffic light intersection are not infinite; therefore, the following constraints need to be established during the solution process:

[0047]

[0048] in, It represents the minimum saturation level of traffic flow; This represents the maximum saturation level of traffic flow.

[0049] Furthermore, the calculation process of the adaptive gene mutation probability strategy is as follows:

[0050] 1) Set the encoding method;

[0051] Based on the joint optimization algorithm designed in step S4, the encoding method of the joint algorithm integrating the genetic algorithm is first given. The encoding, crossover and genetic functions are all retained. The encoding method of chromosome order integer in the genetic algorithm is used. The number of codes is set according to the number of stations for any given station, and it is combined with the traffic control center.

[0052] 2) Cross-operation;

[0053] Choose a matching crossover operation method to complete the crossover process;

[0054] 3) Mutation operation;

[0055] I. Traverse all chromosomes, obtaining a random number after each traversal. Compare this random number with the mutated chromosome value. If the value is less than the standard value, apply a linear adaptive strategy for mutation. The adaptive strategy is as follows:

[0056]

[0057] in, This represents the maximum value in population variation adaptation. This is the average value. This represents a value with a high fitness during the crossover operation. and Since it is a constant, through adaptive probability selection, the model will make selections based on fitness during the iteration process, and will not get stuck in local defects;

[0058] II. If further chromosomal mutations are required, then positional switching can be used;

[0059] III. Verify whether the generated new chromosome meets the requirements of the algorithm and indicators by observing the changes in the chromosome. If it meets the requirements, use the mutated chromosome as the new chromosome for the next step. If it does not meet the requirements, discard it.

[0060] Beneficial effects:

[0061] 1. A short-term traffic flow prediction algorithm was designed, identifying factors influencing traffic flow, including road factors, vehicle factors, control factors, time factors, weather factors, and special events. These factors were quantified using expert interviews, and data cleaning was further performed using general data preprocessing methods. A Bayesian parameter-optimized Bayers-Light GBM traffic flow prediction model was established, and model experiments were conducted based on publicly available data and the optimized model. Experimental results show that the proposed 15-minute traffic flow prediction model achieves an average accuracy of 93.4%, demonstrating its ability to predict intersection traffic flow for the next 15 minutes based on available conditions.

[0062] 2. A multi-objective optimization model for green light control based on a genetic-ant colony joint algorithm was constructed. Three objective functions were established: vehicle delay, vehicle passage, and stopping. The reliability of the factor optimization multi-objective joint model was verified using fitness, and a green light scheme aiming to minimize the objective functions was successfully implemented. Simulation results show that the proposed optimization algorithm has stronger convergence results than traditional multi-objective algorithms. Combining the outputs of the multi-objective algorithms, three technical solutions can be implemented: green light control, cycle setting, and time adjustment.

[0063] 3. The short-term traffic flow prediction and multi-objective control method proposed in this invention can improve the traffic efficiency of intersections, reduce traffic congestion at intersections, and effectively improve the traffic pressure at intersections.

[0064] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0065] Figure 1 This is a structural diagram of the combined genetic and ant colony algorithm;

[0066] Figure 2 This is an architecture diagram of the adaptive algorithm;

[0067] Figure 3 For the TESS simulation platform;

[0068] Figure 4 This is a two-dimensional diagram of traffic flow.

[0069] Figure 5 A comparison chart of actual traffic flow and predicted traffic flow;

[0070] Figure 6 The results are from the signal timing simulation. Detailed Implementation

[0071] To make the technical solutions, advantages, and objectives of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the protection scope of this application.

[0072] This invention provides a method for optimizing traffic light timing at urban road intersections, comprising the following steps:

[0073] S1. Collection and preprocessing of traffic flow data at intersections;

[0074] S1.1 Data Acquisition;

[0075] To complete the preliminary analysis and model calculations, an open-source dataset was used for model testing. The dataset introduced was the DAIR-V2X dataset, which contains all traffic flow data from large and medium-sized cities in my country, including 10,084 point cloud roadside data points. This dataset uses 22,325 frames of images from roadside cameras and roadside LiDAR sensors, plus point cloud vehicle-side data. In addition, the dataset also transforms the image data into a structured dataset, which can be directly preprocessed and calculated without transcoding.

[0076] By extracting point cloud roadside data, a structured dataset was obtained, realizing the transformation of raw data into structured data points. The image roadside data was transformed into structured short-term traffic data, and the recorded data structure is shown in Table 1.

[0077] Table 1

[0078]

[0079] Table 1 presents the collected multi-source data, including directly measurable and statistical data. The dataset covers the period from May 2023 to September 2024, with data collected every minute. The output is the number of vehicles passing through the traffic light per minute. The dataset contains 525,000 data entries.

[0080] Analysis of Factors and Indicators Affecting Short-Term Traffic Flow at Urban Intersections

[0081] Evaluation of influencing factors

[0082] 1. Road factors

[0083] When a car is driving on the road, the first thing to consider is the impact of road conditions. The main factors affecting the road include the following two aspects:

[0084] (1) Insufficient road capacity: Small road width, insufficient number of lanes, many intersections, lack of overtaking lanes, etc. will lead to insufficient road capacity, thereby limiting the speed of vehicles. Under the premise of fixed k, the value of q decreases and the traffic flow from free flow to congested flow increases.

[0085] (2) Poor road conditions: potholes, asphalt damage, water accumulation on the road, and damage to traffic facilities can all affect the speed of vehicle traffic, thus causing congestion.

[0086] 2. Vehicle factors

[0087] Traffic flow control is essentially about controlling vehicle passage; therefore, factors influencing vehicle movement need to be carefully considered. These factors mainly include the following:

[0088] (1) Too many motor vehicles: The number of vehicles exceeds the road's carrying capacity, resulting in traffic jams due to the need to travel at low speeds. This increases the value of k and decreases the critical value.

[0089] (2) Inconsistent vehicle speeds: Vehicles traveling too slowly will cause vehicles behind them to slow down as well, forming a "red chain" of traffic. This inconsistency in speed can easily cause congestion.

[0090] (3) Vehicle accidents: Traffic accidents not only cause traffic flow to be interrupted, but also cause vehicles and pedestrians to suddenly slow down or stop, resulting in traffic congestion. At this time, the value of k remains unchanged, but the value of q changes.

[0091] 3. Regulatory factors

[0092] In necessary situations, traffic control measures will be implemented to manage traffic flow. The changes in traffic flow caused by these measures will be mainly considered from the following perspectives:

[0093] (1) Improper intersection control: Improper traffic police command and road control, such as signaling vehicles to stop for too long, or traffic congestion at intersections causing vehicles to be unable to pass normally, will lead to traffic jams. At this time, the value of k remains unchanged, while the value of q changes.

[0094] (2) Inappropriate traffic control measures: If traffic control measures such as traffic mode restrictions, road closures for construction, etc. are not reasonably arranged, or the division of intersections is unclear, or there are special traffic controls at other intersections, they will affect traffic flow.

[0095] 4. Time factor

[0096] During rush hour, traffic volume is high and road capacity is clearly insufficient, which easily leads to traffic congestion. During other non-peak hours, traffic volume is relatively low. In order to improve traffic efficiency, traffic lights are often set to flashing yellow at night. Therefore, different time periods have different effects on traffic light flow.

[0097] 5. Weather factors

[0098] The impact on traffic flow varies considerably under different weather conditions. In particular, rain and snow can reduce vehicle motion, increase braking distance, and thus affect traffic speed, leading to traffic jams. In this case, the value of k remains unchanged, but the value of q changes.

[0099] 6. Special events

[0100] Events in the surrounding area: such as large-scale events, concerts, and sports competitions, attract a large number of vehicles to gather in one area, which can easily lead to traffic congestion on surrounding roads. There may also be traffic control measures in place, resulting in some traffic congestion.

[0101] In summary, traffic congestion is caused by a variety of factors, including road conditions, vehicle-related issues, traffic management practices, environmental factors, and driver behavior. To address traffic congestion, a multi-pronged approach is needed, including improving road infrastructure, strengthening traffic management, and enhancing driver skills, in order to reduce congestion levels and improve transportation efficiency.

[0102] Evaluation indicators

[0103] The deviation between model predictions and actual values ​​is typically quantified using error assessment metrics. Common metrics include Mean Absolute Percentage Error (MAPE) and Root Mean Square Error (RMSE), which quantitatively describe prediction accuracy. The smaller the error, the closer the predicted value is to the actual observed value. In climate prediction, the difference between the predicted and observed values ​​is called forecast bias. The selection of appropriate error assessment metrics should be determined based on factors such as data quality, the target of the forecast, and the climate context to ensure accurate evaluation of model performance.

[0104] 1) Mean Absolute Percentage Error (MAPE)

[0105]

[0106] 2) Root Mean Square Error (RMSE)

[0107]

[0108] In the two formulas above, This is the actual value. For predicted values, The length of the dataset.

[0109] S1.2 Data Preprocessing;

[0110] Data preprocessing includes the following methods:

[0111] I. Data Cleaning: Lagrange interpolation is used to handle missing data values;

[0112] II. Outlier Correction or Removal: The 3σ rule is used to detect data, that is, data within ±3 times the standard deviation of the mean are considered normal values, and values ​​outside this range are considered outliers and are corrected or removed.

[0113] III. Unification of multi-source data: Time is used as the unique data identifier, and data with the same time are grouped into one row to ensure that multi-source data are merged based on time. Data with missing time values ​​is not used.

[0114] IV. Data Normalization: Due to the significant differences in the value ranges of different experimental variables—for example, the extracted weather data and whether there were meetings have different units of measurement—directly using these data can lead to interference from different units of measurement during machine learning model training, making it difficult to effectively capture the relationships between variables. Therefore, data normalization is performed, scaling all data to the range of 0-1. The normalization calculation expression is:

[0115]

[0116] In the formula, X represents the original data; X norm For the normalized data, X min and X max These are the minimum and maximum values ​​in the dataset, respectively.

[0117] S2. Introduce the LightGBM model and construct a short-term traffic prediction model for a single intersection based on Bayesian parameter optimization, namely the Bayers-LightGBM model;

[0118] The process of constructing the Bayers-LightGBM model is as follows:

[0119] The LightGBM model is introduced, and Bayesian constraints are used to optimize the parameters of the LightGBM model in each iteration, thereby ensuring that the parameters are at their optimal values ​​in each iteration; in each iteration, the parameters use a constant value;

[0120] The parameters of the LightGBM model include: learning rate, maximum number of iterations for the weak learner, maximum depth of the control tree, minimum weight of a single leaf node, and number of leaf nodes.

[0121] 1) Learning rate: Determines the step size for weight adjustment, defaults to 0.1, ranges from 0.05 to 0.1. A lower learning rate improves stability and generalization ability, but too low a rate may lead to excessively long training time or poor fitting.

[0122] 2) Maximum number of iterations for weak learners (n_estimators): Default 100, range 100-1000. Appropriately reducing this number can improve performance on small samples or imbalanced data, while excessive iterations may lead to overfitting.

[0123] 3) Maximum tree depth (max_depth): Controls the maximum depth of the tree, usually set to 3-5, with a maximum of 10. Too deep a tree may lead to overfitting and affect generalization ability.

[0124] 4) Minimum Child Weight: Defines the minimum number of samples for a leaf node. Too high a weight will overly restrict splitting, leading to an overly simplistic model. This paper proposes an optimization method based on the maximum entropy algorithm.

[0125] 5) Number of leaf nodes (num_leaves): The number of leaf nodes in the tree, defaults to 31, range (0, 2^max_depth-1). A higher number of leaf nodes enhances the descriptive power, but too many may lead to overfitting.

[0126] Model construction based on Bayesian parameter optimization

[0127] This invention introduces data uncertainty into the LightGBM model, treating computational parameters as random variables and employing Bayesian methods for estimation. To overcome the slow convergence and susceptibility to local minima inherent in traditional backpropagation algorithms, this invention introduces an adaptive learning factor to enhance search capabilities. This method overcomes the limitations of backpropagation by applying probability distributions to model parameters and outputs, and improves prediction accuracy by considering inter-node correlations and the similarity between different samples. A prior distribution is applied to each weight parameter, and weight variations are analyzed to simulate uncertainty. This method is applicable to multi-input multi-output systems with various network structures and outperforms traditional single-network training by training multiple ensembles of networks sharing a shared probability distribution.

[0128] In the proposed Bayesian LIGHTGBM method, the weight parameters and bias These are treated as random variables. Based on the assumed probability distributions, these distributions must be sampled multiple times during forward propagation for parameter estimation. For a given dataset D, Bayes' theorem is used to solve... posterior probability Bayes' theorem is as follows:

[0129]

[0130]

[0131]

[0132] In the above formula, the posterior probability This means estimating each parameter of the model given a dataset D. The probability of; in the molecule Known as the prior probability, it represents an estimate of each parameter w in the absence of observed data; This is called the likelihood probability of the data; It is called evidence;

[0133] Due to the large number of model parameters, the posterior probability is directly calculated for all 𝑤. Estimating the posterior distribution is very difficult; therefore, this invention employs a variational inference method to estimate the posterior distribution. At that time, the basic idea of ​​variational inference is to introduce an approximate distribution. To approximate the posterior distribution, we use where is the variational parameter to be estimated. To measure the difference between these two distributions, this invention uses the Kullback-Leibler (KL) divergence as a metric. This is achieved by minimizing... and The KL divergence between the two distributions yields an efficient approximation of the posterior distribution.

[0134]

[0135]

[0136]

[0137]

[0138]

[0139] Since the KL divergence is also difficult to calculate precisely, we use a stochastic variational method to obtain the variational distribution. The weights w are sampled, and the resulting loss function to be optimized is called the variational free energy or the lower bound of evidence, denoted as:

[0140]

[0141] In the formula, w i From variational posterior distribution Sampling.

[0142] Based on the above algorithm model and content, the pseudocode is as follows:

[0143] ALGORITHM:Constructing training instances

[0144] Input:The original data base of time series x1,x2….xn

[0145] Output:predicted results of the load

[0146] Basic parameters for LIGHTGBM

[0147] Layers constructed of LIGHTGBM layer, Attention Layer

[0148] New data series of Attention output h1,h2,,,,,hn

[0149] Use h1…hn as the input of LIGHTGBM.

[0150] Predicted result of LIGHTGBM layers

[0151] 06.Return the predicted result of time series data;

[0152] The parameter optimization algorithm for LightGBM is named Bayers-LightGBM.

[0153] S3. Input the traffic data preprocessed in step S1 into the Bayers-LightGBM model to predict the short-term traffic flow of a single intersection in the next cycle;

[0154] S4. Design a signal timing optimization algorithm for a single intersection based on genetic algorithm and ant colony algorithm. Transform the multi-signal control problem into a mathematical multi-objective optimization problem. Design the objective function related to intersection traffic, and then input the short-term traffic flow predicted in step S3 to solve the problem. Obtain the optimization set of solutions, and then optimize the traffic timing configuration according to the optimization set.

[0155] This paper uses MATLAB code to combine ant colony optimization and genetic algorithm. The combined algorithm is as follows: Figure 1 As shown, it has the global search function of genetic algorithm and can utilize the pheromone update process of ant colony algorithm;

[0156] The characteristics of the joint algorithm are as follows:

[0157] (1) It can realize global search of computation space: individual individuals in the population are completed by ant colony, individual individuals in ant colony complete the formation of local optimal solution by updating pheromone, and then further utilize global convergence in genetic algorithm to improve the information update efficiency of the entire population.

[0158] (2) Encoding transformation process: Further utilize the encoding change to complete the ant colony update, ensuring that the ant colony update used in each iteration is synchronized with the latest time, the pheromone span of the ant colony can be guaranteed, thereby further improving the accuracy of ant colony calculation.

[0159] The combination of genetic and ant colony optimization algorithms can improve the accuracy of multi-objective optimization, and the mutation operation can increase the diversity of individuals. However, improper setting of the mutation probability in the joint algorithm can lead to premature convergence or prolonged stagnation in local optima. To avoid this, an adaptive gene mutation probability strategy is proposed. This strategy adaptively calculates the mutation probability based on the fitness of the current generation, ensuring that the mutation probability is neither too high nor too low, thus preventing the model from getting trapped in local optima. The optimization calculation process based on this adaptive strategy is as follows:

[0160] 1) Set the encoding method;

[0161] Based on the designed joint optimization algorithm, the encoding method of the joint algorithm integrating the genetic algorithm is first given. The encoding, crossover and genetic functions are all retained. In order to ensure the accuracy of the calculation, the encoding method of chromosome sequence integer in the genetic algorithm is used. The number of codes is set according to the number of stations for any given station, and it is combined with the traffic control center.

[0162] 2) Cross-operation;

[0163] The crossover operation is primarily aimed at obtaining the global optimum. To complement the local optima in the ant colony algorithm, a matching crossover method is chosen to perform the crossover process, preventing duplicate crossovers. The computational structure diagram based on the adaptive-genetic ant colony algorithm is shown below. Figure 2 As shown.

[0164] Step 1: Randomly select the start and end positions on a pair of parental chromosome genes;

[0165] Step 2: Switch gene locations;

[0166] Step 3: Conflict Detection. To improve computational efficiency, this invention proposes two optimization methods. First, a combined method using genetic algorithms is employed for conflict detection. Next, the connectivity between chromosomes is optimized by adjusting the crossover and mutation probabilities. Specifically, two chromosomes are randomly selected and operated according to the exchange principle. Then, their parameters are optimized using crossover and mutation probabilities to obtain the globally optimal solution. Matching is achieved by establishing correspondences between chromosomes. After conflict detection, a new set of chromosomes is generated, and through appropriate adjustments, it is ensured that these new chromosomes effectively avoid previous conflicts and satisfy relevant constraints.

[0167] 3) Mutation operation;

[0168] I. Traverse all chromosomes, obtaining a random number after each traversal. Compare this random number with the mutated chromosome value. If the value is less than the standard value, apply a linear adaptive strategy for mutation. The adaptive strategy is as follows:

[0169]

[0170] in, This represents the maximum value in population variation adaptation. This is the average value. This represents a value with a high fitness during the crossover operation. and Since it is a constant, through adaptive probability selection, the model will make selections based on fitness during the iteration process, and will not get stuck in local defects;

[0171] II. If further chromosomal mutations are required, then positional switching can be used;

[0172] III. Verify whether the generated new chromosome meets the requirements of the algorithm and indicators by observing the changes in the chromosome. If it meets the requirements, use the mutated chromosome as the new chromosome for the next step. If it does not meet the requirements, discard it.

[0173] The objective functions of the algorithm include vehicle delay objective function, intersection capacity objective function, and number of stops objective function;

[0174] Vehicle delay objective function:

[0175] When predicting traffic flow, vehicle delays are a primary concern, especially during periods of high traffic volume or congestion. Vehicle delay time refers to the extra waiting time at a signalized intersection's approach lanes, caused by red lights forcing vehicles to queue for the green light. Congestion is considered to have occurred when the traffic volume passing through the intersection per unit time exceeds a certain threshold. Delay time is closely related not only to the arrival speed and saturation flow of vehicles at the approach lanes but also directly to the intersection's signal timing parameters. Therefore, this invention focuses on the impact of signal timing on vehicle delays.

[0176]

[0177] In the formula, Vehicle delay time refers to the extra waiting time at the entrance lane of a signalized intersection, caused by vehicles having to queue and wait for the green light due to the obstruction of the red light signal; For traffic light intersection cycles; The percentage of time that the signal is green; Traffic flow at the first traffic light; The traffic flow percentage of the first traffic light; The saturation flow rate;

[0178] Objective function for intersection traffic capacity:

[0179]

[0180] In the formula, Intersection capacity refers to the ease with which traffic can pass through an intersection. This refers to the number of traffic lights at the intersection (4 for a crossroads). For the effective green light time;

[0181] Objective function for the number of stops:

[0182] Frequent stops by vehicles while queuing or at red lights can impact traffic efficiency and even lead to accidents. Congestion is particularly likely when vehicles fail to stop promptly at intersections. The number of stops at an intersection reflects the efficiency of its traffic light control. Analyzing the number of stops across different time periods reveals the relationship between intersection capacity and traffic flow, providing a basis for optimizing traffic organization schemes and ultimately improving the overall service level of the road network. Therefore, the number of stops is not only an important indicator for assessing traffic flow and delays but also an effective measure of the optimization effect of traffic light control strategies.

[0183]

[0184] In the formula, The total number of vehicles parked at any given traffic light intersection. Parking rate; Traffic saturation;

[0185] In summary, three objective functions were constructed. It is assumed that within the analyzed region, there are... For a given number of traffic light intersections, the requirement is that the average value of the coordination index for all traffic light intersections be minimized, i.e.:

[0186]

[0187] The traffic flow and number of vehicles at any traffic light intersection are not infinite; therefore, the following constraints need to be established during the solution process:

[0188]

[0189] in, It represents the minimum saturation level of traffic flow; This represents the maximum saturation level of traffic flow.

[0190] Simulation verification and result analysis

[0191] Simulation calculations were performed on the Wuling Road intersection in Yubei District, Chongqing, which has the highest traffic volume. Short-term traffic flow at the traffic light intersection was predicted and verified. The prediction model and optimization control model were then applied to the actual construction of urban traffic lights. This verified the stability and reliability of the model used in this invention and improved its effectiveness in practical applications.

[0192] 1. Simulation Platform Setup

[0193] To verify the comparison between actual and simulated traffic efficiency, the traffic simulation software MATLAB was used to perform road network simulation. The Wuling Road intersection in Yubei District, Chongqing was simulated. The traffic standards of the intersection are shown in Table 2. As can be seen from the table, the traffic light intersection status was previously set to fixed. In order to complete the model calculation, it needs to be set to a flexible and adjustable structure.

[0194] Table 2 - Intersection Traffic Status

[0195]

[0196] Figure 3 The diagram below shows the setup for the simulation in this paper. The traffic simulation software used in this invention is the TESS-NG traffic flow monitoring simulation model. The simulation software can obtain traffic flow data results under normal conditions. The software can also calculate the value of the traffic flow data. The simulated data and results are consistent with the actual urban traffic flow.

[0197] As can be seen from the figure, the intersection settings of the TESS simulation platform are consistent with the scenario settings in this paper. The platform can reflect the real-time traffic flow information of different intersections. The backend can obtain the traffic flow data, export the data as CSV format, and input it into the LSTM model to complete the prediction of intersection traffic. At the same time, by adjusting the green light time in the simulation software, the real-time traffic flow changes and traffic congestion status can be observed.

[0198] Figure 4 Screenshots of the system code integrating the prediction algorithm and multi-objective optimization algorithm of this invention into the platform are provided. The data and result files calculated by the model of this invention are transmitted to the TESS simulation platform via M-files. The interface settings are as follows:

[0199] (1) Data format: The data format of Matlab's flow prediction and multi-objective optimization analysis results is consistent with that of TESS, and all data types are selected from the list.

[0200] (2) Both share a file path: Ensure the file path is correct to avoid errors such as "file not found".

[0201] (3) API calls: If TESS provides an API, you need to configure and call it according to its documentation to ensure normal communication between files and normal model calls.

[0202] The 2D design diagram of the signal timing is derived as follows: Figure 4 As shown.

[0203] 2. Simulation of a short-term traffic flow prediction model for the Wuling Road intersection in Chongqing based on short-term traffic flow forecasting.

[0204] The model was simulated over a period of one week, and the 15-minute traffic flow prediction results for a single intersection and the green light control results for multiple objectives were given. The intersection was simulated and monitored for seven consecutive days, and the traffic flow prediction results and the intersection control results were calculated. The traffic flow prediction results used a Bayesian optimization tree model, and the objective control results used a multi-objective traffic system green light control model.

[0205] 2.1 Traffic Forecasting

[0206] The model design for predicting traffic flow over 15 minutes uses data from the previous 15 minutes to predict data for the next 15 minutes. Table 3 shows the traffic flow prediction error for the morning rush hour during this period, based on a 15-minute calculation. The error is for Monday morning rush hour in the simulation settings.

[0207] Table 3 - Flow Error

[0208]

[0209] As shown in Table 3, the prediction error for all intersections is generally around 3%, indicating that the traffic flow prediction is accurate. Furthermore, the predicted traffic flow data is saved, and a multi-objective control algorithm is used based on the predicted traffic flow data to give the green light control time for 23 traffic light intersections.

[0210] Further analysis of the results using a simulation platform is conducted. To illustrate the prediction effectiveness, a comparison is provided between the actual traffic flow data collected for intersection #1 on September 15, 2024, and the predicted results. Figure 4 As shown, the comparison results from 7:00 AM to 9:00 AM are presented.

[0211] from Figure 5 As can be seen, the actual traffic flow and the predicted traffic flow data show a consistent trend, and the error between the data is relatively small, which further proves the accuracy of the optimized model and further verifies that the experiment used can be applied to specific actual traffic flow prediction, and the traffic flow has been alleviated to a good extent.

[0212] like Figure 6The image shows the simulation results after signal timing. The results show the settings for green lights, red lights, etc., and the settings can be adjusted according to the specific traffic conditions.

[0213] 2.2 Simulation of Signal Light Timing Based on Predicted Short-Term Traffic Flow

[0214] This invention employs three methods for timing design: green light setting, overall traffic light cycle, and dynamic time adjustment scheme. The control method uses an adaptive green light control method, while the yellow light is not subject to control, and the red light time is defaulted to the green light time of another intersection. In summary, the average control time for a single intersection during the morning rush hour is shown in Table 4. Since the number of traffic light switching times at an intersection is relatively high within 15 minutes, in order to illustrate the timing scheme, the unadjusted average time, the adjusted average time within 15 minutes, and the number of green lights in the cycle after adjustment are given for a single intersection.

[0215] Table 4 - Green Light Timing Setting Scheme

[0216]

[0217] The non-green light time includes the yellow and red light times. The yellow light time is fixed at 3 seconds. The simulation is performed by controlling the green light in Table 4. By adjusting the green light time and all traffic light cycles, the time adjustment based on the green light setting is completed.

[0218] 2.3 Simulation Result Analysis and Evaluation

[0219] Based on the green light control given in Table 4, the average value of the actual results and the actual traffic results on that day are compared using traffic indicators. In accordance with other research papers, the number of delayed vehicles, the number of vehicles passing through, and the number of stops are given for comparison. The comparison results of vehicle delay rate, traffic rate, and number of stops for 20 simulations under a single intersection are given in Table 5.

[0220] Table 5 - Comparison of Indicators

[0221]

[0222] As can be seen from Table 5, the traffic capacity of all 20 simulations is better than that of the fixed timing. The target optimization of the model proposed in this invention is better than the actual results, indicating that the adaptive green light control strategy is more reliable in actual green light control applications compared with the traditional fixed-time green light control.

[0223] To achieve green light control, the following traffic intervention measures are proposed.

[0224] (1) Take a district of a city as a unit, establish an intelligent traffic control system, count the total number of traffic lights in the area, and draw a map.

[0225] (2) Data monitoring of the traffic flow in the region. After monitoring to a certain extent, the algorithm is used to calculate the traffic flow prediction and control results, and the traffic flow prediction and the optimal green light time based on the objective function are obtained.

[0226] (3) Set the green light time according to the actual traffic flow, do not set the time to a fixed time, give the green light time dynamically, and set the yellow light to 3 seconds and the red light to the green light time of another intersection.

[0227] This invention was validated using actual traffic data from Chongqing. During the validation process, an intelligent traffic flow prediction method and a multi-objective optimization method were used to predict the traffic flow at a single intersection 15 minutes in advance and to adjust the green light signal control time by 15 minutes. The actual traffic flow indicators and simulation indicators were compared over a week to verify the reliability of the method.

[0228] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the protection scope of the present invention.

Claims

1. A method for optimizing traffic light timing at urban road intersections, characterized in that, Includes the following steps: S1. Collection and preprocessing of traffic flow data at intersections; S2. Introduce the LightGBM model and construct a short-term traffic prediction model for a single intersection based on Bayesian parameter optimization, namely the Bayers-LightGBM model; S3. Input the traffic data preprocessed in step S1 into the Bayers-LightGBM model to predict the short-term traffic flow of a single intersection in the next cycle; S4. Design a signal timing optimization algorithm for a single intersection based on genetic algorithm and ant colony algorithm. Transform the multi-signal control problem into a mathematical multi-objective optimization problem. Design the objective function related to intersection traffic, and then input the short-term traffic flow predicted in step S3 to solve the problem. Obtain the optimized set of solutions, and then optimize the traffic timing configuration based on the optimized set.

2. The method for optimizing traffic light timing at urban road intersections according to claim 1, characterized in that, Step S1 includes the following sub-steps: S1.1 Data Acquisition; Extract point cloud roadside data and convert roadside image data into structured short-term traffic data; The structured short-term traffic data includes traffic flow, lateral width of roads at traffic light intersections, frequency of road maintenance at traffic light intersections, population density within 2 kilometers of traffic light intersections, standard deviation of vehicle speed within 100 meters in both directions at traffic light intersections, vehicle accidents, intersection control, control measures, time, weather, and special times. Structured short-term traffic data is collected every minute; S1.2 Data Preprocessing; Data preprocessing includes the following methods: I. Data Cleaning: Lagrange interpolation is used to handle missing data values; II. Outlier Correction or Removal: The 3σ rule is used to detect data, that is, data within ±3 times the standard deviation of the mean are considered normal values, and values ​​outside this range are considered outliers and are corrected or removed. III. Unification of multi-source data: Time is used as a unique data identifier, and data with the same time are grouped into one row to ensure that multi-source data are merged based on time. IV. Data normalization: Scaling the data to between 0 and 1; The normalization calculation expression is: In the formula, X represents the original data; X norm For the normalized data, X min and X max These are the minimum and maximum values ​​in the dataset, respectively.

3. The method for optimizing traffic light timing at urban road intersections according to claim 2, characterized in that, In step S2, the process of constructing the Bayers-LightGBM model is as follows: The LightGBM model is introduced, and Bayesian constraints are used to optimize the parameters of the LightGBM model in each iteration, thereby ensuring that the parameters are at their optimal values ​​in each iteration; in each iteration, the parameters use a constant value; The parameters of the LightGBM model include: learning rate, maximum number of iterations for the weak learner, maximum depth of the control tree, minimum weight of a single leaf node, and number of leaf nodes.

4. The method for optimizing traffic light timing at urban road intersections according to claim 3, characterized in that, The specific content of step S4 is as follows: This paper uses MATLAB code to combine ant colony algorithm and genetic algorithm. The combined algorithm has the global search function of genetic algorithm and can utilize the pheromone update process of ant colony algorithm. The combined algorithm incorporates an adaptive gene mutation probability strategy, which adaptively calculates the mutation probability based on the fitness of the current generation, ensuring that the mutation probability is neither too high nor too low, thereby avoiding premature convergence or prolonged stay in a local optimum. The objective functions of the algorithm include vehicle delay objective function, intersection capacity objective function, and number of stops objective function; Vehicle delay objective function: In the formula, Vehicle delay time refers to the extra waiting time at the entrance lane of a signalized intersection, caused by vehicles having to queue and wait for the green light due to the obstruction of the red light signal; For traffic light intersection cycles; The percentage of time that the signal is green; Traffic flow at the first traffic light; The traffic flow percentage of the first traffic light; The saturation flow rate; Objective function for intersection traffic capacity: In the formula, Intersection capacity refers to the ease with which traffic can pass through an intersection. This refers to the number of traffic lights at the intersection; For the effective green light time; Objective function for the number of stops: In the formula, The total number of vehicles parked at any given traffic light intersection. Parking rate; Traffic saturation; In summary, three objective functions were constructed. It is assumed that within the analyzed region, there are... For a given number of traffic light intersections, the requirement is that the average value of the coordination index for all traffic light intersections be minimized, i.e.: The traffic flow and number of vehicles at any traffic light intersection are not infinite; therefore, the following constraints need to be established during the solution process: in, It represents the minimum saturation level of traffic flow; This represents the maximum saturation level of traffic flow.

5. The method for optimizing traffic light timing at urban road intersections according to claim 4, characterized in that, The calculation process of the adaptive gene mutation probability strategy is as follows: 1) Set the encoding method; Based on the joint optimization algorithm designed in step S4, the encoding method of the joint algorithm integrating the genetic algorithm is first given. The encoding, crossover and genetic functions are all retained. The encoding method of chromosome order integer in the genetic algorithm is used. The number of codes is set according to the number of stations for any given station, and it is combined with the traffic control center. 2) Cross-operation; Choose a matching crossover operation method to complete the crossover process; 3) Mutation operation; I. Traverse all chromosomes, obtaining a random number after each traversal. Compare this random number with the mutated chromosome value. If the value is less than the standard value, apply a linear adaptive strategy for mutation. The adaptive strategy is as follows: in, This represents the maximum value in population variation adaptation. This is the average value. This represents a value with a high fitness during the crossover operation. and Since it is a constant, through adaptive probability selection, the model will make selections based on fitness during the iteration process, and will not get stuck in local defects; II. If further chromosomal mutations are required, then positional switching can be used; III. Verify whether the generated new chromosome meets the requirements of the algorithm and indicators by observing the changes in the chromosome. If it meets the requirements, use the mutated chromosome as the new chromosome for the next step. If it does not meet the requirements, discard it.