A traffic signal control method based on a federated learning framework
By employing a traffic signal control method based on a federated learning framework and leveraging the collaborative optimization between vehicles and roadside units, the problems of privacy and high resource consumption in existing technologies are addressed, enabling real-time and efficient traffic signal control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HOHAI UNIV
- Filing Date
- 2025-12-02
- Publication Date
- 2026-07-07
Smart Images

Figure CN121483059B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of intelligent transportation technology, and in particular relates to a traffic signal control method based on a federated learning framework. Background Technology
[0002] With the rapid growth in the number of motor vehicles in cities and the increasing complexity of road networks, urban traffic congestion has become a prominent problem affecting the efficiency of social operations. To alleviate traffic pressure, intelligent transportation systems (ITS) optimize signal control strategies by collecting vehicle operation data and building predictive models. Currently, a centralized training architecture is mainly adopted, which aggregates the raw data from each node to the cloud for unified processing and modeling; or a two-layer federated learning framework that directly interacts between onboard units and the cloud center is used, combined with methods such as fixed-sequence control, inductive control, or deep reinforcement learning to achieve signal timing optimization.
[0003] However, existing solutions generally suffer from high privacy and security risks, high communication and computing overhead, insufficient regional optimization capabilities, and difficulty in balancing global optimization and real-time response. Summary of the Invention
[0004] This application provides a traffic signal control method based on a federated learning framework, which can solve the problems of high privacy and security risks, large communication and computing overhead, insufficient regional optimization capabilities, and difficulty in balancing global optimization and real-time response in existing solutions.
[0005] In a first aspect, embodiments of this application provide a traffic signal control method based on a federated learning framework, comprising: S1, training a preset lightweight MLP prediction model based on local feature data collected during the driving process by the vehicle's on-board unit (OBU), inputting the local feature data into the trained preset lightweight MLP prediction model, outputting the predicted delay value for individual vehicles, and uploading the model parameters to the corresponding roadside unit (RSU); S2, after receiving the model parameters uploaded by multiple OBUs within its jurisdiction, each RSU performs a regional-level model aggregation operation to generate a regional-level delay prediction model. The regional sample pool is used to retrain and optimize the regional delay prediction model based on the MLP architecture to improve prediction accuracy. In S3, the RSUs score all candidate phases based on the optimized regional delay prediction model, using the predicted delay as the scoring function, and select the phase with the highest predicted delay score as the current traffic light switching scheme. In S4, the cloud receives the regional delay prediction model parameters uploaded by each RSU, performs adaptive weighted aggregation based on the sample size and delay improvement rate, generates a global model, and then sends it to each RSU for local fine-tuning. This process is repeated until the training round ends.
[0006] In one possible implementation of the first aspect, the local feature data includes departure time. Average speed Total waiting time Lane queue length Lane density and route length The above step S1 includes:
[0007] Departure time Average speed Total waiting time Lane queue length Lane density route length After collection, the input feature vector is constructed. The input feature vector is fed into a pre-defined lightweight MLP prediction model for training until the training objective is achieved. The training objective is to minimize the difference between the predicted delay value and the actual delay value, as detailed below:
[0008]
[0009] in, For vehicles eigenvectors, For OBU Model parameters, The predicted delay results are obtained from a pre-set lightweight MLP prediction model. For vehicles Delay value, N represents OBU The number of samples;
[0010] The model parameters are uploaded to the corresponding RSU, and a regional sample pool is constructed based on the local feature data uploaded by each OBU corresponding to the RSU.
[0011] Optionally, in another possible implementation of the first aspect, step S2 above includes:
[0012] Model parameters of multiple OBUs within each RSU region according to Aggregate the data to obtain the model parameters for the regional delay prediction model:
[0013]
[0014] in, Indicates the index of the RSU region. for Always covered in the RSU area The collection of vehicles inside, Representative vehicle The weighting coefficient is defined as:
[0015]
[0016] in, Indicates vehicle Sample size;
[0017] Using regional sample pool data, the regional delay prediction model is retrained and optimized with the goal of minimizing regional prediction error. Represented as:
[0018] .
[0019] Optionally, in another possible implementation of the first aspect, step S3 above includes:
[0020] Define the traffic light decision objective of RSUr at time t as minimizing the weighted sum of predicted delays for all vehicles within its region:
[0021]
[0022] To achieve the decision-making objectives, heuristic search methods are used for evaluation and selection, including:
[0023] Set at time Down, RSU The candidate phase set is ,in:
[0024]
[0025]
[0026]
[0027] ;
[0028] in, The green light indicates that east-west traffic is permitted. The red light indicates the north-south direction. This indicates that the east-west and north-south directions are both in the yellow light transition phase. This indicates that the east-west phase is green and the north-south phase is red. This indicates that the lights are yellow in all four directions: east, west, south, and north. This indicates that the north-south phase is green and the east-west phase is red. This indicates that the lights are yellow in all four directions: east, west, south, and north.
[0029] For any candidate phase Using the optimized regional delay prediction model, its predicted delay score is calculated. :
[0030]
[0031] in, Indicates the phase being executed The vehicles to be served will be assembled at that time;
[0032] The phase with the highest predicted delay score is selected as the switching scheme, as follows:
[0033]
[0034] Before performing a phase switch, determine whether the following constraints are simultaneously satisfied:
[0035] and
[0036] in, For the current phase Duration, The preset minimum green light duration, The switching threshold;
[0037] When the constraints are met, the RSU performs a phase switch. And reset the timer, otherwise maintain the current phase.
[0038] Optionally, in another possible implementation of the first aspect, step S4 above includes:
[0039] The cloud receives the regional delay prediction model parameters uploaded by each RSU, and performs adaptive weighted aggregation based on the sample size and delay improvement rate to generate a global model, as follows:
[0040]
[0041] in, , RSU Sample size RSU Delay improvement rate;
[0042] The global model is distributed to each RSU for local fine-tuning, and the upload-aggregation-distribution process is repeated until the global model converges.
[0043] The global optimization goal in the cloud is defined as:
[0044]
[0045] in, , These represent the computing overhead and communication overhead of the cloud system, respectively. This represents the weighted delay for all vehicles. The RSU regional weighting coefficient is defined as follows:
[0046]
[0047] Based on the global optimization objective, predicted delay is used to replace the actual delay, and computational and communication overheads are converted into constraints to generate an approximate global optimization objective:
[0048] The approximate global optimization objective satisfies the following constraints:
[0049]
[0050]
[0051] in, and These represent the upper limits for computation and communication overhead, respectively.
[0052] Secondly, embodiments of this application provide a traffic signal control device based on a federated learning framework, comprising: a data acquisition module, used to train a preset lightweight MLP prediction model based on local feature data collected during the driving process by the vehicle's on-board unit (OBU), inputting the local feature data into the trained preset lightweight MLP prediction model, outputting the predicted delay value for individual vehicles, and uploading the model parameters to the corresponding roadside unit (RSU); and an edge aggregation module, used by each RSU to perform a regional-level model aggregation operation after receiving model parameters uploaded by multiple OBUs within its jurisdiction, generating a regional-level delay prediction model. The system utilizes a regional sample pool and an MLP architecture to retrain and optimize the regional delay prediction model to improve prediction accuracy. A control decision module is used by the RSUs to score all candidate phases based on the optimized regional delay prediction model, using the predicted delay as the scoring function, and selecting the phase with the highest predicted delay score as the current traffic light switching scheme. A cloud aggregation module receives the regional delay prediction model parameters uploaded by each RSU in the cloud, performs adaptive weighted aggregation based on the sample size and delay improvement rate, generates a global model, and then distributes it to each RSU for local fine-tuning. This process is repeated until the training round ends.
[0053] Thirdly, embodiments of this application provide a terminal device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the traffic signal control method based on the federated learning framework as described above.
[0054] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the traffic signal control method based on the federated learning framework as described above.
[0055] Beneficial effects: First, a pre-set lightweight MLP prediction model is trained based on local feature data collected by the vehicle's On-Board Unit (OBU) during the driving process. The local feature data is then input into the trained lightweight MLP prediction model, which outputs the predicted delay value for each individual vehicle. The model parameters are then uploaded to the corresponding Roadside Unit (RSU). Each RSU, after receiving model parameters uploaded from multiple OBUs within its jurisdiction, performs a regional-level model aggregation operation to generate a regional-level delay prediction model. Using a regional sample pool, the regional-level delay prediction model is retrained and optimized based on the MLP architecture to improve prediction accuracy. Next, based on the optimized regional-level delay prediction model, the RSU scores all candidate phases using the predicted delay as the scoring function, and selects the phase with the highest predicted delay score as the current traffic light switching scheme. Finally, the cloud receives the regional-level delay prediction model parameters uploaded by each RSU, performs adaptive weighted aggregation based on the sample size and delay improvement rate, generates a global model, and distributes it to each RSU for local fine-tuning. This process is repeated until the training round ends. This application effectively reduces vehicle traffic delays while protecting data privacy, and significantly reduces the system's computing and communication resource overhead, thereby improving the real-time performance and effectiveness of traffic signal control. Attached Figure Description
[0056] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0057] Figure 1 This is a flowchart illustrating a traffic signal control method based on a federated learning framework provided in an embodiment of this application.
[0058] Figure 2 This is a schematic diagram of a system architecture for vehicle delay optimization and traffic signal control based on a three-layer federated learning framework provided in an embodiment of this application;
[0059] Figure 3 This is a schematic diagram of an MLP model structure for vehicle delay prediction provided in an embodiment of this application;
[0060] Figure 4 This is a schematic diagram of a three-layer federated learning collaborative communication process provided in an embodiment of this application;
[0061] Figure 5 This is a schematic diagram of the structure of a traffic signal control device based on a federated learning framework provided in an embodiment of this application;
[0062] Figure 6 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application. Detailed Implementation
[0063] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0064] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0065] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0066] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0067] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0068] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0069] The following description, with reference to the accompanying drawings, details a traffic signal control method, apparatus, terminal device, and storage medium based on a federated learning framework provided in this application.
[0070] Figure 1 The illustration shows a flowchart of a traffic signal control method based on a federated learning framework provided in an embodiment of this application.
[0071] like Figure 1 As shown, this traffic signal control method based on a federated learning framework includes the following steps:
[0072] S1. Train a preset lightweight MLP prediction model based on the local feature data collected during the driving process by the vehicle's on-board unit (OBU), input the local feature data into the trained preset lightweight MLP prediction model, output the prediction delay value of individual vehicles, and upload the model parameters to the corresponding roadside unit (RSU).
[0073] It should be noted that the aforementioned local feature data includes departure time. Average speed Total waiting time Lane queue length Lane density and route length .
[0074] Furthermore, in this embodiment of the application, step S1 includes:
[0075] Departure time Average speed Total waiting time Lane queue length Lane density route length After collection, the input feature vector is constructed. The input feature vector is fed into a pre-defined lightweight MLP prediction model for training until the training objective is achieved. The training objective is to minimize the difference between the predicted delay value and the actual delay value, as detailed below:
[0076]
[0077] in, For vehicles eigenvectors, For OBU Model parameters, The predicted delay results are obtained from a pre-set lightweight MLP prediction model. For vehicles Delay value, N represents OBU The number of samples;
[0078] The model parameters are uploaded to the corresponding RSU, and a regional sample pool is constructed based on the local feature data uploaded by each OBU corresponding to the RSU.
[0079] S2. After receiving model parameters uploaded by multiple OBUs within its jurisdiction, each RSU performs a regional-level model aggregation operation to generate a regional-level delay prediction model. It then uses the regional sample pool to retrain and optimize the regional-level delay prediction model based on the MLP architecture to improve prediction accuracy.
[0080] Furthermore, in this embodiment of the application, step S2 includes:
[0081] Model parameters of multiple OBUs within each RSU region according to Aggregate the data to obtain the model parameters for the regional delay prediction model:
[0082]
[0083] in, Indicates the index of the RSU region. for Always covered in the RSU area The collection of vehicles inside, Representative vehicle The weighting coefficient is defined as:
[0084]
[0085] in, Indicates vehicle Sample size;
[0086] Using regional sample pool data, the regional delay prediction model is retrained and optimized with the goal of minimizing regional prediction error. Represented as:
[0087] .
[0088] S3 and RSU are based on the optimized regional delay prediction model. They use the predicted delay as the scoring function to score all candidate phases and select the phase with the highest predicted delay score as the current traffic light switching scheme.
[0089] Furthermore, in this embodiment of the application, step S3 includes:
[0090] Define the traffic light decision objective of RSUr at time t as minimizing the weighted sum of predicted delays for all vehicles within its region:
[0091]
[0092] To achieve the decision-making objectives, heuristic search methods are used for evaluation and selection, including:
[0093] Set at time Down, RSU The candidate phase set is ,in:
[0094]
[0095]
[0096]
[0097] ;
[0098] in, The green light indicates that east-west traffic is permitted. The red light indicates the north-south direction. This indicates that the east-west and north-south directions are both in the yellow light transition phase. This indicates that the east-west phase is green and the north-south phase is red. This indicates that the lights are yellow in all four directions: east, west, south, and north. This indicates that the north-south phase is green and the east-west phase is red. This indicates that the lights are yellow in all four directions: east, west, south, and north.
[0099] For any candidate phase Using the optimized regional delay prediction model, its predicted delay score is calculated. :
[0100]
[0101] in, Indicates the phase being executed The vehicles to be served will be assembled at that time;
[0102] The phase with the highest predicted delay score is selected as the switching scheme, as follows:
[0103]
[0104] Before performing a phase switch, determine whether the following constraints are simultaneously satisfied:
[0105] and
[0106] in, For the current phase Duration, The preset minimum green light duration, The switching threshold;
[0107] When the constraints are met, the RSU performs a phase switch. And reset the timer, otherwise maintain the current phase.
[0108] S4. The cloud receives the regional delay prediction model parameters uploaded by each RSU, performs adaptive weighted aggregation based on the sample size and delay improvement rate, generates a global model, and then sends it to each RSU for local fine-tuning. This process is repeated until the training round ends.
[0109] Furthermore, in this embodiment of the application, step S4 includes:
[0110] The cloud receives regional delay prediction model parameters uploaded by each RSU, and performs adaptive weighted aggregation based on sample size and delay improvement rate to generate a global model, as follows:
[0111]
[0112] in, , RSU Sample size RSU Delay improvement rate;
[0113] The global model is distributed to each RSU for local fine-tuning, and the upload-aggregation-distribution process is repeated until the global model converges.
[0114] The global optimization goal in the cloud is defined as:
[0115]
[0116] in, , These represent the computing overhead and communication overhead of the cloud system, respectively. This represents the weighted delay for all vehicles. The RSU regional weighting coefficient is defined as follows:
[0117]
[0118] It should be noted that the traffic signal control optimization problem addressed in this application is essentially a typical high-dimensional combinatorial optimization problem, which is highly complex in terms of structure and computation.
[0119] First, the global objective function of the original problem is non-convex because the traffic light strategy consists of two parts: phase selection and traffic light duration. Traffic light phase is a discrete variable, while traffic light duration is a continuous variable. Therefore, the traffic light strategy is composed of both discrete and continuous variables. Furthermore, vehicle delays are affected by traffic flow fluctuations, signal phase switching, and multi-lane interactions, resulting in a complex non-convex optimization space. Moreover, at the cloud level, vehicle delays, computational costs, and communication overhead cannot be directly added mathematically, making it difficult to obtain the global optimum using conventional convex optimization methods.
[0120] Secondly, the original problem is significantly high-dimensional. Factors such as the number of vehicles, phase states, traffic flow characteristics, and historical delays all need to be modeled simultaneously, resulting in an extremely high dimensionality of the state space. This makes it difficult for traditional optimization methods to meet the demands of real-time traffic control in terms of computation and storage.
[0121] Furthermore, the problem exhibits dynamic and temporal coupling. The selection of the current traffic light phase will have a chain reaction on the queue length and delay level of future vehicles, showing obvious temporal dependence and cross-time period coupling, which further increases the difficulty of modeling and solving.
[0122] Therefore, the global optimization problem is a high-dimensional, non-convex, dynamically coupled NP-hard problem, requiring an approximate solution to replace the original problem representation. Specifically, since the actual delays of all vehicles cannot be solved in real time, predicted delays are used to approximate the actual vehicle delays. Furthermore, since vehicle delays, computational costs, and communication overhead cannot be directly added together, we change the computational and communication overhead into a constraint form, meaning that the consumption of computational and communication resources cannot exceed a certain upper limit.
[0123] Therefore, based on the global optimization objective, the predicted delay is used instead of the actual delay, and the computational and communication overheads are transformed into constraints to generate an approximate global optimization objective:
[0124] The approximate global optimization objective satisfies the following constraints:
[0125]
[0126]
[0127] in, and These represent the upper limits for computation and communication overhead, respectively.
[0128] This application provides a traffic signal control method based on a federated learning framework. Building upon the traditional vehicle-to-everything (V2X) system, it introduces a federated learning framework to construct a hierarchical federated learning architecture conforming to the three-layer structure of OBU–RSU–Cloud. This architecture, through hierarchical training and aggregation mechanisms, achieves collaborative optimization among the local vehicle model (OBU), the regional aggregation model (RSU), and the global optimization model (Cloud), thereby significantly improving training efficiency, reducing communication and computational overhead, and minimizing vehicle latency. Regarding signal control strategies, this invention combines the delay prediction capability of the multilayer perceptron (MLP) model with heuristic decision-making algorithms to achieve real-time response to dynamic traffic conditions. Compared to the insufficient flexibility of traditional fixed-phase control and the high computational demands of reinforcement learning methods, this invention effectively reduces computational complexity while ensuring real-time performance and scalability, achieving dual optimization of vehicle delay and system resource consumption.
[0129] In one embodiment, such as Figure 2 As shown in the example scenario of this application, the participating entities include On-Board Units (OBUs) that collect their own data, multiple Remote Units (RSUs) equipped with edge servers, and a cloud center, forming a three-layer OBU-RSU-CLOUD architecture. The cloud center communicates with multiple RSUs in the edge layer via a backbone network. Each RSU covers a traffic area within a crossroads, with a coverage radius of 300 meters, and is located at the center of the crossroads. The OBUs train vehicle delay prediction models locally and upload the model parameters and vehicle delay prediction results to the RSUs within their respective areas. The RSUs receive and aggregate the model parameters or prediction results uploaded by multiple OBUs within their jurisdiction to generate regional delay estimates.
[0130] In another specific embodiment, the present application includes the following steps:
[0131] Step 1: The Onboard Unit (OBU) of a civilian vehicle is responsible for collecting local traffic characteristic data during the vehicle's journey, including but not limited to: departure time, average speed, total waiting time, lane queue length, lane density, and route length. After data collection, the OBU uses the aforementioned characteristic data locally to train a lightweight Multilayer Perceptron (MLP) delay prediction model to predict the travel delay value of a single vehicle.
[0132] Step 2: After receiving model parameters or prediction results uploaded by multiple on-board units (OBUs) within its jurisdiction, the Roadside Unit (RSU) performs a regional-level model aggregation operation and further utilizes regional sample pool data to retrain and optimize the aggregated model based on the MLP architecture to improve prediction accuracy.
[0133] Step 3: After training and optimizing the regional delay prediction model, the Roadside Unit (RSU) uses a heuristic search method based on machine learning predictions to evaluate the obtained prediction results. The RSU scores all candidate phases and selects the phase with the best overall score as the current signal light switching scheme, thus executing the signal control decision.
[0134] Step 4: After the RSU completes the training of its own model and the adjustment of the traffic light strategy, it uploads these results to the cloud in an adaptive weighted manner. After receiving this information, the cloud will combine it with its own data to train and adjust the model again, and then send the adjusted model back to the RSU. The process of uploading, training and sending is repeated until the model converges or the delay effect no longer improves.
[0135] The specific implementation methods for each step are explained below:
[0136] In step one, the OBU acquires its own driving characteristics in real time through the TraCI interface of the SUMO traffic simulation platform. The collected characteristics include departure time. Average speed Total waiting time Lane queue length Lane density route length After standardization, the input feature vector is formed. ,in This represents the number of vehicle samples.
[0137] The corresponding output is the actual travel delay time for the vehicle:
[0138]
[0139] Each OBU is based on a local dataset. A multilayer perceptron (MLP) neural network model was used for local training. (Refer to...) Figure 3 The MLP model consists of an input layer, two hidden layers, and an output layer. The input layer receives vehicle feature vectors; the first hidden layer has 32 neurons and uses the ReLU activation function; the second hidden layer has 16 neurons and also uses the ReLU activation function; the output layer is a single node used to predict vehicle travel delay time; the model uses the mean squared error (MSE) loss function.
[0140] The prediction objective is to minimize the mean squared error (MSE).
[0141]
[0142] The trained model parameters are denoted as After local convergence, the parameters and training metrics are uploaded to the corresponding RSU node.
[0143] In step two, the roadside units (RSUs) receive the model parameter sets uploaded by multiple OBUs within their respective jurisdictions:
[0144]
[0145] RSU first aggregates features from vehicle samples within its jurisdiction to form a regional RSU sample pool:
[0146]
[0147] Then based on the sample size of each OBU :
[0148]
[0149] Perform regional model aggregation:
[0150]
[0151] Based on the obtained model, the aggregated model is further trained and adjusted using the sample pool of the RSU region, thereby improving the accuracy of delay prediction. The optimized model parameters are denoted as follows. .
[0152] In step three, after the RSU completes the training and optimization of the model, the RSU implements a heuristic control strategy based on the current traffic light status and the prediction results.
[0153] Set at time Down, :
[0154]
[0155] in, East-west green light, north-south red light; Yellow light phase; East-west traffic lights are red; north-south traffic lights are green. Yellow light phase.
[0156] RSU is based on the prediction delay results for each candidate phase. Rating:
[0157]
[0158] RSU selects the phase with the best score:
[0159]
[0160] And it is used as the current traffic light switching scheme for control.
[0161] Furthermore, to ensure smoothness and safety constraints, the RSU must also meet the minimum green light duration constraint and score improvement judgment when performing phase switching. Let the current phase be... The duration since the last switch is The minimum green light duration is The switching threshold is RSU will only perform a switchover if all of the following conditions are met:
[0162]
[0163]
[0164] The specific process of RSU controlling traffic lights is as follows:
[0165] (1) The RSU obtains the current road network status information from the simulation interface, including the traffic light phase set. Duration since the last switch and lane state matrix .
[0166] (2) Establish the phase-lane mapping function : ,in Indicates phase The set of lanes under control, and the current phase initialized. With minimum green light duration .
[0167] (3) In each decision cycle inside, if Or the decision interval has not been reached Then maintain the current phase. constant.
[0168] (4) If the decision conditions are met, RSU will evaluate all candidate phases. Calculate the predicted delay score .
[0169] (5) For each candidate phase Extract the set of vehicles within its controlled lane. ,like Then define .
[0170] (6) For each vehicle , to feature vector Input Model Predicted vehicle delays:
[0171]
[0172] And calculate the phase delay score cumulatively:
[0173]
[0174] (7) The set of RSU scores for all phases Sort the data and select the optimal phase. .
[0175] (8) If the optimal phase satisfy:
[0176] Furthermore, the phase switching interval meets the safety constraints:
[0177] Then execute the phase switching action. And reset the timer; otherwise, maintain the current phase.
[0178] (9) Update the signal light status parameters and timers, and record the decision log for subsequent cloud model aggregation and control optimization.
[0179] In step four, after completing local aggregation and signal control, the RSU uploads the optimized model parameters and performance metrics to the cloud center. The cloud center receives the model parameter sets from each RSU:
[0180]
[0181] The cloud center uses the sample size of each RSU region. With delay improvement rate Define adaptive aggregation weights: Perform global weighted aggregation:
[0182]
[0183] Reference Figure 4 Each communication round The cloud sends the latest model to the RSU. After receiving the model, the RSU retrains it using its local sample pool and then uploads it again until the model converges or the delay no longer improves.
[0184] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0185] Corresponding to the traffic signal control method based on a federated learning framework in the above embodiments, Figure 5 The diagram shows a structural block diagram of a traffic signal control device based on a federated learning framework according to an embodiment of this application. For ease of explanation, only the parts related to the embodiment of this application are shown.
[0186] Reference Figure 5 The device 500 includes:
[0187] The data acquisition module 501 is used to train a preset lightweight MLP prediction model based on the local feature data collected by the vehicle's on-board unit (OBU) during the driving process, input the local feature data into the trained preset lightweight MLP prediction model, output the prediction delay value of individual vehicles, and upload the model parameters to the corresponding roadside unit (RSU).
[0188] The edge aggregation module 502 is used by each RSU to perform regional-level model aggregation operation after receiving model parameters uploaded by multiple OBUs within its jurisdiction, generate a regional-level delay prediction model, and use the regional sample pool to retrain and optimize the regional-level delay prediction model based on the MLP architecture to improve prediction accuracy.
[0189] The control decision module 503 is used by the RSU to score all candidate phases based on the optimized regional delay prediction model, using the predicted delay as the scoring function, and select the phase with the highest predicted delay score as the current traffic light switching scheme.
[0190] The cloud aggregation module 504 is used to receive the regional delay prediction model parameters uploaded by each RSU in the cloud, perform adaptive weighted aggregation based on the sample size and delay improvement rate, generate a global model, and then send it to each RSU for local fine-tuning. This process is repeated until the training round ends.
[0191] In practical use, the traffic signal control device based on the federated learning framework provided in this application embodiment can be configured in any terminal device to execute the aforementioned traffic signal control method based on the federated learning framework.
[0192] This application provides a traffic signal control device based on a federated learning framework. First, a pre-set lightweight MLP prediction model is trained using local feature data collected by the vehicle's On-Board Unit (OBU) during the driving process. The local feature data is then input into the trained lightweight MLP prediction model, which outputs the predicted delay value for each individual vehicle. The model parameters are then uploaded to the corresponding Roadside Unit (RSU). Each RSU, after receiving model parameters from multiple OBUs within its jurisdiction, performs a regional-level model aggregation operation to generate a regional-level delay prediction model. Using a regional sample pool, the RSU retrains and optimizes the regional-level delay prediction model based on the MLP architecture to improve prediction accuracy. Next, based on the optimized regional-level delay prediction model, the RSU scores all candidate phases using the predicted delay as the scoring function, selecting the phase with the highest predicted delay score as the current signal light switching scheme. Finally, the cloud receives the regional-level delay prediction model parameters uploaded by each RSU, performs adaptive weighted aggregation based on the sample size and delay improvement rate, generates a global model, and distributes it to each RSU for local fine-tuning. This process is repeated until the training round ends. This application effectively reduces vehicle traffic delays while protecting data privacy, and significantly reduces the system's computing and communication resource overhead, thereby improving the real-time performance and effectiveness of traffic signal control.
[0193] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0194] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0195] To implement the above embodiments, this application also proposes a terminal device.
[0196] Figure 6 This is a schematic diagram of the structure of a terminal device according to an embodiment of this application.
[0197] like Figure 6 As shown, the terminal device 200 includes:
[0198] The system includes a memory 210 and at least one processor 220, and a bus 230 connecting different components (including the memory 210 and the processor 220). The memory 210 stores a computer program, which, when executed by the processor 220, implements a traffic signal control method based on a federated learning framework as described in this application embodiment.
[0199] Bus 230 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0200] Terminal device 200 typically includes various electronically readable media. These media can be any available media that can be accessed by terminal device 200, including volatile and non-volatile media, removable and non-removable media.
[0201] Memory 210 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 240 and / or cache memory 250. Terminal device 200 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 260 may be used to read and write non-removable, non-volatile magnetic media (… Figure 6 Not shown; usually referred to as a "hard drive"). Although Figure 6 As not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 230 via one or more data media interfaces. Memory 210 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application.
[0202] A program / utility 280 having a set (at least one) of program modules 270 may be stored in, for example, memory 210. Such program modules 270 include—but are not limited to—an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 270 typically perform the functions and / or methods described in the embodiments of this application.
[0203] Terminal device 200 can also communicate with one or more external devices 290 (e.g., keyboard, pointing device, display 291, etc.), and with one or more devices that enable a user to interact with terminal device 200, and / or with any device that enables terminal device 200 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 292. Furthermore, terminal device 200 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 293. As shown, network adapter 293 communicates with other modules of terminal device 200 via bus 230. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with terminal device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0204] The processor 220 performs various functional applications and data processing by running programs stored in the memory 210.
[0205] It should be noted that the implementation process and technical principles of the terminal device in this embodiment are explained in the foregoing description of a traffic signal control method based on a federated learning framework in this application embodiment, and will not be repeated here.
[0206] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0207] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the various method embodiments above.
[0208] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0209] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0210] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0211] In the embodiments provided in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0212] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0213] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A traffic signal control method based on a federated learning framework, characterized in that, Includes the following steps: S1. Train a preset lightweight MLP prediction model based on local feature data collected during the driving process by the vehicle's on-board unit (OBU), input the local feature data into the trained preset lightweight MLP prediction model, output the predicted delay value for individual vehicles, and upload the model parameters to the corresponding roadside unit (RSU); the local feature data includes departure time, average speed, total waiting time, lane queue length, lane density, and route length. S2. After receiving model parameters uploaded by multiple OBUs within its jurisdiction, each RSU performs a regional-level model aggregation operation to generate a regional-level delay prediction model. It then uses the regional sample pool to retrain and optimize the regional-level delay prediction model based on the MLP architecture to improve prediction accuracy. S3 and RSU are based on the optimized regional delay prediction model. They use the predicted delay as the scoring function to score all candidate phases and select the phase with the highest predicted delay score as the current traffic light switching scheme. S4. The cloud receives the regional delay prediction model parameters uploaded by each RSU, performs adaptive weighted aggregation based on the sample size and delay improvement rate, generates a global model, and then sends it to each RSU for local fine-tuning. This process is repeated until the training round ends. Specifically, the cloud receives the regional delay prediction model parameters uploaded by each RSU, performs adaptive weighted aggregation based on the sample size and delay improvement rate, and generates a global model, as follows: ; in, , RSU Sample size RSU Delay improvement rate; The global model is distributed to each RSU for local fine-tuning, and the upload-aggregation-distribution process is repeated until the global model converges. The global optimization goal of the cloud is defined as follows: ; in, , These represent the computing overhead and communication overhead of the cloud system, respectively. This represents the weighted delay for all vehicles. The RSU regional weighting coefficient is defined as follows: ; Based on the aforementioned global optimization objective, the predicted delay is replaced with the actual delay, and the computational and communication overheads are converted into constraints to generate an approximate global optimization objective: ; The approximate global optimization objective satisfies the following constraints: ; ; in, and These represent the upper limits for computation and communication overhead, respectively.
2. The method according to claim 1, characterized in that, Step S1 includes: The departure time Average speed Total waiting time Lane queue length Lane density route length After collection, the input feature vector is constructed. The input feature vector is fed into the preset lightweight MLP prediction model for training until the training objective is achieved. The training objective is to minimize the difference between the predicted delay value and the actual delay value, as follows: ; in, For vehicles eigenvectors, For OBU Model parameters, The prediction delay result is obtained through the preset lightweight MLP prediction model. For vehicles Delay value, N represents OBU The number of samples; The model parameters are uploaded to the corresponding RSU, and a regional sample pool is constructed based on the local feature data uploaded by each OBU corresponding to the RSU.
3. The method according to claim 2, characterized in that, Step S2 includes: Model parameters of multiple OBUs within each RSU region according to By aggregation, the model parameters of the regional delay prediction model are obtained: ; in, Indicates the index of the RSU region. for Always covered in the RSU area The collection of vehicles inside, Representative vehicle The weighting coefficient is defined as: ; in, Indicates vehicle Sample size; Using the regional sample pool data, the regional delay prediction model is retrained and optimized with the goal of minimizing regional prediction error. Represented as: 。 4. The method according to claim 3, characterized in that, Step S3 includes: Define the traffic light decision objective of RSUr at time t as minimizing the weighted sum of predicted delays for all vehicles in its region: ; To achieve the aforementioned decision-making objective, an evaluation and selection process is conducted using a heuristic search method, including: Set at time Down, RSU The candidate phase set is ,in: ; ; ; ; in, The green light indicates that east-west traffic is permitted. The red light indicates the north-south direction. This indicates that the east-west and north-south directions are both in the yellow light transition phase. This indicates that the east-west phase is green and the north-south phase is red. This indicates that the lights are yellow in all four directions: east, west, south, and north. This indicates that the north-south phase is green and the east-west phase is red. This indicates that the lights are yellow in all four directions: east, west, south, and north. For any candidate phase Using the optimized regional delay prediction model, its predicted delay score is calculated. : ; in, Indicates the phase being executed The vehicles to be served will be assembled at that time; The phase with the highest predicted delay score is selected as the switching scheme, as follows: ; Before performing a phase switch, determine whether the following constraints are simultaneously satisfied: and ; in, For the current phase Duration, The preset minimum green light duration, The switching threshold; When the aforementioned constraints are met, the RSU performs a phase switch. And reset the timer, otherwise maintain the current phase.
5. A traffic signal control device based on a federated learning framework, characterized in that, include: The data acquisition module is used to train a preset lightweight MLP prediction model based on local feature data collected during the driving process by the vehicle's on-board unit (OBU), input the local feature data into the trained preset lightweight MLP prediction model, output the predicted delay value for individual vehicles, and upload the model parameters to the corresponding roadside unit (RSU). The local feature data includes departure time, average speed, total waiting time, lane queue length, lane density, and route length. The edge aggregation module is used by each RSU to perform regional-level model aggregation operations after receiving model parameters uploaded by multiple OBUs within its jurisdiction, generate a regional-level delay prediction model, and use the regional sample pool to retrain and optimize the regional-level delay prediction model based on the MLP architecture to improve prediction accuracy. The control decision module is used by the RSU to score all candidate phases based on the optimized regional delay prediction model, using the predicted delay as the scoring function, and select the phase with the highest predicted delay score as the current traffic light switching scheme. The cloud aggregation module is used to receive regional delay prediction model parameters uploaded by each RSU in the cloud, perform adaptive weighted aggregation based on sample size and delay improvement rate, generate a global model, and then send it to each RSU for local fine-tuning. This process is repeated until the training round ends. Specifically, the cloud receives the regional delay prediction model parameters uploaded by each RSU, performs adaptive weighted aggregation based on the sample size and delay improvement rate, and generates a global model, as follows: ; in, , RSU Sample size RSU Delay improvement rate; The global model is distributed to each RSU for local fine-tuning, and the upload-aggregation-distribution process is repeated until the global model converges. The global optimization goal of the cloud is defined as follows: ; in, , These represent the computing overhead and communication overhead of the cloud system, respectively. This represents the weighted delay for all vehicles. The RSU regional weighting coefficient is defined as follows: ; Based on the aforementioned global optimization objective, the predicted delay is replaced with the actual delay, and the computational and communication overheads are converted into constraints to generate an approximate global optimization objective: ; The approximate global optimization objective satisfies the following constraints: ; ; in, and These represent the upper limits for computation and communication overhead, respectively.
6. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 4.