Urban traffic operation intelligent management and control system based on machine learning
The intelligent urban traffic management system based on machine learning utilizes an improved GATv2 model and genetic algorithm to optimize traffic flow prediction, dynamically adjust signal cycles and route planning, solves the problem that traditional systems cannot adapt to traffic changes in real time, and improves the efficiency and accuracy of urban traffic management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN DAHE LIGHTING TECH CO LTD
- Filing Date
- 2026-01-13
- Publication Date
- 2026-04-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing urban traffic management systems struggle to adapt to real-time changes in traffic flow, leading to traffic congestion and signal waste. Traditional traffic forecasting methods cannot effectively consider real-time changes in multi-source data and the impact of unforeseen events, and lack adaptive adjustment mechanisms.
An intelligent urban traffic management system based on machine learning is adopted. It uses an improved GATv2 model for traffic flow prediction and route planning, combines multimodal data and real-time traffic information to dynamically adjust traffic signal cycles and route planning, and uses genetic algorithms to optimize traffic flow prediction, thereby improving prediction accuracy and system adaptability.
It significantly improves the efficiency and accuracy of urban traffic management, enabling flexible responses to peak hours, emergencies, and traffic fluctuations, reducing vehicle waiting time, alleviating traffic congestion, reducing carbon emissions, and providing optimal driving routes and signal optimization solutions.
Smart Images

Figure CN121921955A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of urban traffic management technology, and in particular to an intelligent urban traffic operation management system based on machine learning. Background Technology
[0002] With the acceleration of urbanization, urban transportation faces increasingly severe challenges, especially during peak hours when traffic congestion and parking difficulties are frequent, significantly impacting urban operational efficiency and residents' travel experience. Existing urban traffic management systems largely rely on fixed traffic signal control and traffic flow prediction models. These traditional methods, typically based on empirical rules or simple flow models, struggle to adapt to constantly changing traffic conditions in real time. For example, many cities switch traffic light cycles according to preset schedules without considering real-time traffic flow changes, leading to congestion during peak hours and wasted signal power during low-flow periods. Furthermore, traditional traffic flow prediction methods often rely solely on historical data and fixed patterns, failing to effectively consider real-time changes in multi-source traffic data. For instance, existing flow prediction models often ignore complex spatiotemporal characteristics and the interplay of various factors, such as weather and unexpected accidents. This results in significant deviations in predictions, leading to inaccurate traffic signal control schemes and route planning strategies, further exacerbating traffic congestion. Traditional traffic control systems face numerous limitations when dealing with complex urban traffic environments. Due to the lack of real-time feedback and adaptive adjustment mechanisms, existing systems are unable to effectively cope with emergencies and traffic fluctuations, resulting in traffic management strategies failing to meet actual needs in terms of response speed and accuracy.
[0003] Therefore, how to provide an intelligent management and control system for urban traffic operations based on machine learning is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] One objective of this invention is to propose an intelligent urban traffic management system based on machine learning. This invention utilizes an improved GATv2 model for traffic flow prediction and route planning, combining multimodal data and real-time traffic information to dynamically adjust traffic signal cycles and route planning, thereby optimizing traffic flow management. A genetic algorithm is employed to optimize traffic flow prediction, improving prediction accuracy, alleviating traffic congestion, increasing overall traffic efficiency, reducing waiting time and carbon emissions, flexibly responding to peak hours, emergencies, and traffic fluctuations, significantly improving urban traffic management effectiveness, and enhancing the travel experience.
[0005] According to an embodiment of the present invention, an intelligent urban traffic operation management and control system based on machine learning includes the following modules:
[0006] The data acquisition and preprocessing module is used to collect raw multi-source traffic data of urban traffic operation through multiple channels, and to preprocess the raw multi-source traffic data to obtain a multimodal traffic dataset in a unified format.
[0007] The urban traffic network map construction module is used to extract features from the multimodal traffic dataset to obtain traffic feature vectors, and to use the traffic feature vectors of each road segment or intersection as nodes, calculate the Manhattan distance between nodes, and construct an urban traffic network map.
[0008] The traffic flow prediction modeling module is used to input the urban traffic network map into the improved GATv2 model, and perform traffic flow prediction modeling through the feature embedding module, spatiotemporal feature extraction module, traffic prediction module and traffic flow prediction optimization module to obtain the urban traffic flow prediction map.
[0009] The metric space generation module is used to generate the metric space of the urban traffic network based on the traffic flow prediction map, and optimize it through metric thresholds.
[0010] The optimal driving route generation module is used to define optimization objectives based on the traffic flow prediction map and the metric space, and to generate the optimal driving route in the urban traffic network.
[0011] The traffic signal adjustment module is used to dynamically adjust the traffic signals based on the optimal driving route and traffic flow prediction map to obtain an optimized traffic signal scheme.
[0012] According to an embodiment of the present invention, a machine learning-based intelligent management and control method for urban traffic operation includes the following steps:
[0013] Step 1: Collect raw multi-source traffic data of urban traffic operation through multiple channels, and preprocess the raw multi-source traffic data to obtain a multimodal traffic dataset in a unified format;
[0014] Step 2: Extract traffic feature vectors from the multimodal traffic dataset, and use the traffic feature vectors of each road segment or intersection as nodes to calculate the Manhattan distance between nodes and construct an urban traffic network map;
[0015] Step 3: Input the urban traffic network map into the improved GATv2 model, and perform traffic prediction modeling through the feature embedding module, spatiotemporal feature extraction module, traffic prediction module and traffic flow prediction optimization module to obtain the urban traffic flow prediction map;
[0016] Step 4: Based on the traffic flow prediction map, generate the metric space of the urban traffic network and optimize it using metric thresholds;
[0017] Step 5: Define the optimization objective based on the traffic flow prediction map and metric space, and generate the optimal driving route in the urban traffic network;
[0018] Step 6: Based on the optimal driving route and traffic flow prediction map, dynamically adjust the traffic signals to obtain an optimized traffic signal scheme.
[0019] Optionally, the original multi-source traffic data includes image data collected by traffic monitoring cameras, vehicle speed data collected by vehicle speed sensors, traffic signal status data collected by traffic light sensors, weather data collected by environmental sensors, and data from smartphone navigation apps.
[0020] The preprocessing steps include outlier removal, missing value imputation, timestamp alignment, and normalization of different types of data in the original multi-source traffic data to obtain a multimodal traffic dataset in a unified format.
[0021] Optionally, step two specifically includes:
[0022] Feature extraction is performed on various types of data in the multimodal traffic dataset. The feature extraction steps include traffic flow features, vehicle speed features, traffic light status features, environmental features, and accident and event features.
[0023] The traffic flow characteristic is the number of vehicles passing through each road segment per unit time; the vehicle speed characteristic is the average vehicle speed of each road segment.
[0024] The traffic light status characteristics are the red and green light cycles at each intersection; the accident and event characteristics are the time, location, and scope of impact of the traffic accident.
[0025] The extracted features of different types are arranged in a preset order to obtain the traffic feature vector;
[0026] Based on the traffic feature vectors, an urban traffic network map is constructed. The construction steps are as follows:
[0027] The traffic feature vector of each road segment or intersection is used as a node to obtain a node set;
[0028] Calculate the Manhattan distance between the traffic feature vectors of every two nodes in the node set;
[0029] If the Manhattan distance is less than the preset distance threshold, then an edge connection is established between the corresponding nodes to obtain a set of connecting edges;
[0030] Based on the connection relationships between the node set and the edge set, the urban traffic network map is obtained.
[0031] Optionally, the improved GATv2 model is specifically as follows:
[0032] The urban traffic network map is input into the feature embedding module. For each traffic segment or intersection, the feature embedding module collects the traffic feature vectors of adjacent segments to form a set of neighboring nodes.
[0033] Calculate the cosine similarity between the traffic feature vector corresponding to the current node and the traffic feature vector corresponding to each neighbor node in the neighbor node set;
[0034] If the cosine similarity is less than a preset similarity threshold, the traffic feature vector corresponding to the current node is weighted and summed with the traffic feature vectors corresponding to the neighboring nodes to obtain the initial node embedding vector of the current node. The weighting is the reciprocal of the corresponding cosine similarity.
[0035] The initial node embedding vector is input into the spatiotemporal feature extraction module. One-dimensional convolution is used to extract local spatial features from the initial node embedding vector, identify local traffic flow patterns, and obtain local spatial features.
[0036] By using gated cyclic units to model the time series features of the initial node embedding vector, the trend of traffic flow changes over time is captured, and the time features are obtained.
[0037] The local spatial features extracted by convolution are combined with temporal features to generate a spatiotemporal feature vector for each node;
[0038] The spatiotemporal feature vector is input into the traffic prediction module, and then input into the fully connected layer for feature transformation. Based on historical data and spatiotemporal features, the multi-layer neural network predicts the traffic flow of each road segment in a future time period, thus obtaining the traffic flow prediction result.
[0039] The traffic flow prediction results are input into the traffic flow prediction optimization module, and the traffic flow prediction results are optimized by a genetic algorithm to obtain the final urban traffic flow prediction map.
[0040] Optionally, the optimization of traffic flow prediction results using a genetic algorithm specifically involves:
[0041] Based on the traffic flow prediction results, a set of individuals is randomly generated, each individual representing a potential optimal solution for traffic flow prediction; each individual is composed of a set of genes.
[0042] The genes represent traffic flow prediction parameters, including traffic flow characteristics, vehicle speed characteristics, traffic light status characteristics, environmental characteristics, and accident and event characteristics for each road segment;
[0043] Using the mean squared error as the objective function, the fitness value between each individual and the actual traffic flow is calculated.
[0044] Individuals are selected based on their fitness values, and those with fitness values greater than a preset threshold are used to generate the parent individuals for the next generation.
[0045] Selected parent individuals undergo single-point crossover, whereby gene segments are exchanged, to generate two new offspring individuals;
[0046] Calculate the fitness value of the offspring individuals generated by a single-point intersection, select the individual with the highest fitness value as the optimal individual, and obtain the optimal traffic flow prediction map.
[0047] Optionally, step four specifically involves:
[0048] Based on the traffic flow prediction map, a measurement space is set between each road segment or intersection in the urban traffic network, and the measurement space takes each traffic road segment or intersection as a measurement node.
[0049] In the metric space, the distance between nodes is measured as the Euclidean distance between the traffic feature vectors corresponding to each traffic segment or intersection.
[0050] If the Euclidean distance between a pair of metric nodes is greater than the preset metric threshold, the metric node with the most non-measuring metric nodes is deleted first, until all pairs of metric nodes meet the preset metric threshold, thus obtaining the final optimized metric space.
[0051] Optionally, step five specifically includes:
[0052] Based on the traffic flow prediction map and metric space, collect traffic flow, vehicle speed, traffic light status, accidents and events occurring on each road or intersection;
[0053] The traffic flow prediction map provides future traffic flow predictions for each road segment, and the metric space provides the traffic capacity between road segments.
[0054] During the route planning process, an optimization objective is defined, which includes minimizing travel time and traffic light waiting time.
[0055] Generate the optimal driving path based on the optimization objective.
[0056] Optionally, step six specifically includes:
[0057] Based on the traffic flow prediction map and the optimal driving route, the traffic light cycle for each road segment is dynamically calculated.
[0058] By calculating the vehicle speed, traffic flow, and waiting time of each road segment, the duration of red and green lights is dynamically adjusted, increasing the green light duration of road segments with high traffic flow.
[0059] Based on traffic flow fluctuations at different times, the traffic light cycle is adjusted according to real-time traffic forecasts. During peak hours, the green light time is increased; during off-peak hours, the green light time is shortened to reduce waiting time.
[0060] Based on the optimal driving route and real-time traffic flow data, the traffic light switching cycle is dynamically adjusted. The adjusted traffic light switching cycle is calculated based on the predicted traffic flow and the optimal driving route to determine the best traffic light switching time for each road segment.
[0061] Based on the adjustment of traffic light duration and signal switching cycle, a traffic signal optimization scheme is generated, and the traffic flow distribution at intersections is optimized in real time.
[0062] The beneficial effects of this invention are:
[0063] The intelligent urban traffic management system of this invention significantly improves the efficiency and accuracy of urban traffic management. Traditional traffic management methods have significant limitations in dealing with traffic congestion during peak hours, emergencies, and traffic flow fluctuations. They typically rely on preset fixed patterns, ignoring the dynamic changes in various factors such as real-time traffic flow, vehicle speed, and traffic light status. This static traffic management approach cannot quickly adapt to and respond to complex urban traffic environments, leading to frequent traffic congestion, wasted signal cycles, and inefficient route planning. This invention, through a machine learning-based traffic flow prediction and route planning model, can dynamically adjust the cycle and switching timing of traffic signals, responding to changes in traffic flow in real time, reducing vehicle waiting time, and alleviating traffic congestion. Furthermore, through preprocessing and feature extraction of multimodal traffic datasets, the system comprehensively considers multiple influencing factors such as vehicle speed, traffic flow, traffic light cycle, weather, and accidents, making traffic flow prediction more accurate and providing a scientific basis for signal control and route optimization. Especially during peak hours, the system can dynamically adjust the traffic light cycle based on real-time traffic flow prediction and prioritize sections with high traffic volume, preventing the formation of traffic bottlenecks. Meanwhile, based on traffic flow prediction maps and metric spaces, the system optimizes route planning, providing optimal travel routes and avoiding congested sections and long waiting times. Furthermore, the traffic flow prediction optimization method based on genetic algorithms employed in this invention effectively improves the accuracy of traffic flow prediction. By adjusting the prediction results through genetic algorithms, the traffic flow model is continuously optimized, ensuring the real-time and accurate nature of traffic management. Compared with existing technologies, the intelligent control system of this invention has higher adaptability, enabling it to flexibly respond to complex situations such as emergencies and traffic fluctuations, improving the overall operational efficiency of urban traffic, reducing traffic accidents, lowering carbon emissions, and improving the urban travel experience. This highly intelligent system not only effectively alleviates urban traffic pressure but also provides new ideas and technical solutions for future intelligent traffic management. Attached Figure Description
[0064] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0065] Figure 1 This is a schematic diagram of the structure of an intelligent urban traffic operation control system based on machine learning proposed in this invention;
[0066] Figure 2 This is an overall flowchart of an intelligent management and control method for urban traffic operations based on machine learning proposed in this invention. Detailed Implementation
[0067] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0068] refer to Figure 1 A machine learning-based intelligent management and control system for urban traffic operations includes the following modules:
[0069] The data acquisition and preprocessing module is used to collect raw multi-source traffic data of urban traffic operation through multiple channels, and to preprocess the raw multi-source traffic data to obtain a multimodal traffic dataset in a unified format.
[0070] The urban traffic network map construction module is used to extract features from the multimodal traffic dataset to obtain traffic feature vectors, and to use the traffic feature vectors of each road segment or intersection as nodes, calculate the Manhattan distance between nodes, and construct an urban traffic network map.
[0071] The traffic flow prediction modeling module is used to input the urban traffic network map into the improved GATv2 model, and perform traffic flow prediction modeling through the feature embedding module, spatiotemporal feature extraction module, traffic prediction module and traffic flow prediction optimization module to obtain the urban traffic flow prediction map.
[0072] The metric space generation module is used to generate the metric space of the urban traffic network based on the traffic flow prediction map, and optimize it through metric thresholds.
[0073] The optimal driving route generation module is used to define optimization objectives based on the traffic flow prediction map and the metric space, and to generate the optimal driving route in the urban traffic network.
[0074] The traffic signal adjustment module is used to dynamically adjust the traffic signals based on the optimal driving route and traffic flow prediction map to obtain an optimized traffic signal scheme.
[0075] refer to Figure 2 A machine learning-based intelligent management and control method for urban traffic operations includes the following steps:
[0076] Step 1: Collect raw multi-source traffic data of urban traffic operation through multiple channels, and preprocess the raw multi-source traffic data to obtain a multimodal traffic dataset in a unified format;
[0077] Step 2: Extract traffic feature vectors from the multimodal traffic dataset, and use the traffic feature vectors of each road segment or intersection as nodes to calculate the Manhattan distance between nodes and construct an urban traffic network map;
[0078] Step 3: Input the urban traffic network map into the improved GATv2 model, and perform traffic prediction modeling through the feature embedding module, spatiotemporal feature extraction module, traffic prediction module and traffic flow prediction optimization module to obtain the urban traffic flow prediction map;
[0079] Step 4: Based on the traffic flow prediction map, generate the metric space of the urban traffic network and optimize it using metric thresholds;
[0080] Step 5: Define the optimization objective based on the traffic flow prediction map and metric space, and generate the optimal driving route in the urban traffic network;
[0081] Step 6: Based on the optimal driving route and traffic flow prediction map, dynamically adjust the traffic signals to obtain an optimized traffic signal scheme.
[0082] In this embodiment, the original multi-source traffic data includes: image data collected by traffic monitoring cameras, vehicle speed data collected by vehicle speed sensors, traffic signal status data collected by traffic light sensors, weather data collected by environmental sensors, and data from a smartphone navigation app. Specifically, the image data provided by traffic monitoring cameras is used to identify traffic flow, vehicle speed, traffic congestion, and traffic accidents on road sections in real time; the vehicle speed data provided by vehicle speed sensors can be used to determine road conditions and monitor traffic flow speed in real time; the traffic signal status data collected by traffic light sensors is used to record the traffic light cycle and switching status at each intersection to optimize traffic signal control; the weather data collected by environmental sensors (such as temperature, humidity, precipitation, visibility, etc.) helps to analyze the impact of weather on traffic flow and vehicle speed, especially under adverse weather conditions; and the smartphone navigation app data provides real-time information on road usage, traffic flow, traffic accidents, and route recommendations to help calculate the optimal driving route in real time.
[0083] The preprocessing steps include outlier removal, missing value imputation, timestamp alignment, and normalization of different types of data in the original multi-source traffic data to obtain a multimodal traffic dataset in a unified format.
[0084] In this embodiment, step two specifically includes:
[0085] Feature extraction is performed on various types of data in the multimodal traffic dataset. The feature extraction steps include the following:
[0086] Traffic flow characteristics: the number of vehicles passing through each road segment per unit time. Specifically, the traffic flow characteristics are calculated by the traffic monitoring system through real-time monitoring of the traffic flow of each road segment. The number of vehicles per unit time can be used to determine the road's capacity. The statistical period for the traffic flow characteristics is 5 minutes, with the vehicle throughput of the road segment counted every five minutes for subsequent traffic flow analysis and prediction.
[0087] Vehicle speed characteristic: The average vehicle speed for each road segment. This characteristic reflects the traffic efficiency of the road segment. Data collected by vehicle speed sensors is used to calculate the average vehicle speed for each road segment over a specific time period, with a statistical period of 5 minutes. Vehicle speed characteristics are crucial for traffic flow prediction and route planning, especially during peak hours, where vehicle speed data effectively reflects congestion levels.
[0088] Traffic light status characteristics: the red and green light cycle at each intersection. The traffic light cycle and green light duration have a significant impact on traffic flow, especially at intersections. This characteristic is acquired through traffic light sensors, recording the status of the traffic lights at each intersection, including the cycle duration of red, green, and yellow lights. The traffic light cycle characteristics are dynamically adjusted according to peak and off-peak traffic periods, with specific thresholds of no more than 120 seconds per signal cycle during peak hours and no more than 80 seconds during off-peak hours.
[0089] Environmental characteristics include weather, temperature, humidity, visibility, and other environmental data. Weather conditions directly affect traffic flow and vehicle speed, especially in severe weather (such as heavy rain, fog, etc.), which significantly reduces vehicle speed. This characteristic is collected by environmental sensors, recording factors such as weather type, precipitation, temperature, and humidity, with time windows on the hourly level. During route planning, environmental characteristics are weighted according to their impact on traffic flow and vehicle speed.
[0090] Accident and incident characteristics: These include the time, location, and impact range of a traffic accident. These characteristics are obtained through accident alarm data from smartphone navigation apps or traffic monitoring systems. These accident characteristics provide crucial information affecting traffic flow and can inform route planning and traffic signal optimization. The impact range of an accident typically extends in a radius of 200 meters.
[0091] The extracted features of different types are arranged in a preset order to obtain a traffic feature vector. The traffic feature vector of each road segment or intersection contains the above five features and is arranged in order to form a unified traffic feature vector, which serves as the basis for subsequent network construction and traffic flow prediction.
[0092] Based on the traffic feature vectors, an urban traffic network map is constructed. The construction steps are as follows:
[0093] The traffic feature vector of each road segment or intersection is used as a node to obtain a node set;
[0094] Calculate the Manhattan distance between the traffic feature vectors of every two nodes in the node set;
[0095] If the Manhattan distance is less than the preset distance threshold (the threshold is set to 50, meaning that if the distance is less than 50, the two nodes are considered similar), then an edge connection is established between the corresponding nodes to obtain a set of connecting edges. This connection represents the potential connection between road segments in the traffic network. The weight of the connection is reflected by its Manhattan distance. The smaller the distance, the higher the weight of the connection, indicating that the traffic characteristics of the two road segments are more similar.
[0096] Based on the connection relationships between the node set and the edge set, the urban traffic network map is obtained.
[0097] In this embodiment, the improved GATv2 model is specifically as follows:
[0098] The urban traffic network map is input into the feature embedding module. For each traffic segment or intersection, the feature embedding module collects the traffic feature vectors of adjacent segments to form a set of neighboring nodes.
[0099] Calculate the cosine similarity between the traffic feature vector corresponding to the current node and the traffic feature vector corresponding to each neighbor node in the neighbor node set;
[0100] If the cosine similarity is less than a preset similarity threshold, the traffic feature vector corresponding to the current node is weighted and summed with the traffic feature vectors corresponding to the neighboring nodes to obtain the initial node embedding vector of the current node. The weighting is the reciprocal of the corresponding cosine similarity.
[0101] The initial node embedding vector is input into the spatiotemporal feature extraction module. One-dimensional convolution is used to extract local spatial features from the initial node embedding vector, identify local traffic flow patterns, and obtain local spatial features.
[0102] By using gated cyclic units to model the time series features of the initial node embedding vector, the trend of traffic flow changes over time is captured, and the time features are obtained.
[0103] The local spatial features extracted by convolution are combined with temporal features to generate a spatiotemporal feature vector for each node;
[0104] The spatiotemporal feature vector is input into the traffic prediction module, and then input into the fully connected layer for feature transformation. Based on historical data and spatiotemporal features, the multi-layer neural network predicts the traffic flow of each road segment in a future time period, thus obtaining the traffic flow prediction result.
[0105] The traffic flow prediction results are input into the traffic flow prediction optimization module, and the traffic flow prediction results are optimized by a genetic algorithm to obtain the final urban traffic flow prediction map.
[0106] This step significantly improves the accuracy and intelligence of urban traffic flow prediction by using an improved GATv2 model, combining multiple modules such as feature embedding, spatiotemporal feature extraction, and traffic flow prediction optimization. The feature embedding module accurately models each road segment or intersection in the urban traffic network, calculating similarity using traffic feature vectors of adjacent road segments to optimize the modeling of relationships between road segments. This similarity-based weighted merging method allows the structure and features of the traffic network to more accurately reflect the actual traffic conditions. Combined with the spatiotemporal feature extraction module, the system extracts local spatial features and time-series features through one-dimensional convolution and gated recurrent units, comprehensively capturing the spatial changes and temporal trends of traffic flow, thereby obtaining more refined spatiotemporal feature vectors and providing strong support for subsequent traffic flow prediction.
[0107] By inputting spatiotemporal feature vectors into the traffic prediction module and combining them with a multi-layer neural network, the model can predict future traffic flow based on historical data and real-time traffic characteristics. It accurately predicts traffic flow changes for each road segment at different time periods, reducing prediction errors caused by simplistic assumptions in traditional methods. The introduction of a genetic algorithm further optimizes the prediction results, improving accuracy and stability through iterative adjustments to the prediction model.
[0108] This series of innovations effectively solves the problem that traditional traffic flow forecasting methods cannot adapt to changes in traffic conditions in real time, greatly improving the intelligence level of traffic signal control, route planning, and traffic flow scheduling. The resulting urban traffic flow forecast map provides more accurate data support for traffic management decisions, helps reduce traffic congestion, improves road efficiency, and provides efficient technical support for the sustainable development of urban transportation.
[0109] In this embodiment, optimizing the traffic flow prediction results using a genetic algorithm specifically involves:
[0110] Based on the traffic flow prediction results, a set of individuals is randomly generated, each individual representing a potential optimal solution for traffic flow prediction; each individual is composed of a set of genes.
[0111] The genes represent traffic flow prediction parameters, including traffic flow characteristics, vehicle speed characteristics, traffic light status characteristics, environmental characteristics, and accident and event characteristics for each road segment;
[0112] Using the mean squared error as the objective function, the fitness value between each individual and the actual traffic flow is calculated.
[0113] Individuals are selected based on their fitness values, and those with fitness values greater than a preset threshold are used to generate the parent individuals for the next generation.
[0114] Selected parent individuals undergo single-point crossover, whereby gene segments are exchanged, to generate two new offspring individuals;
[0115] Calculate the fitness value of the offspring individuals generated by a single-point intersection, select the individual with the highest fitness value as the optimal individual, and obtain the optimal traffic flow prediction map.
[0116] This step optimizes traffic flow prediction results using a genetic algorithm, significantly improving the accuracy and flexibility of traffic flow prediction. By simulating natural selection and evolution, the genetic algorithm effectively explores a multi-dimensional traffic data space, generating multiple potential traffic flow prediction solutions. This process involves multiple generations of optimization, continuously adjusting prediction parameters to reduce prediction errors. Specifically, by using mean squared error as the objective function, the system accurately evaluates the fitness of each prediction solution, ensuring the algorithm selects the prediction scheme that best matches the actual traffic conditions. Through crossover and mutation operations in the genetic algorithm, the system can exchange information between different solutions, exploring more possible solution spaces and avoiding getting trapped in local optima. Especially in optimizing multi-dimensional parameters such as traffic flow, vehicle speed, traffic light status, and environmental factors, the adaptability and diversity of the genetic algorithm make the optimization process more flexible and capable of handling complex traffic system changes.
[0117] Ultimately, through selection and crossover of individuals in each generation, the genetic algorithm obtains the optimal traffic flow prediction solution, generating a more accurate traffic flow prediction map. This optimization not only improves the accuracy of traffic flow prediction but also enables decision-making systems such as traffic signal control and route planning to make optimization adjustments based on more precise data, thereby effectively alleviating traffic congestion and improving the efficiency and responsiveness of urban traffic management. Furthermore, this method possesses strong adaptability, capable of real-time adjustments to cope with different traffic scenarios, and has high practical value.
[0118] In this embodiment, step four specifically includes:
[0119] Based on the traffic flow prediction map, a metric space is established between road segments or intersections in the urban traffic network. This metric space uses each traffic road segment or intersection as a metric node. Specifically, the metric space represents the relative "distances" between road segments or intersections in the traffic network. These "distances" reflect the differences in multi-dimensional information such as traffic flow, vehicle speed, and traffic light status between different road segments or intersections. In the metric space, each metric node represents a traffic road segment or intersection.
[0120] In the metric space, the distance between metric nodes is defined as the Euclidean distance between the traffic feature vectors corresponding to each traffic segment or intersection.
[0121] During the construction of the metric space, if the Euclidean distance between a pair of metric nodes exceeds a preset metric threshold, it indicates a significant difference in traffic conditions between the two nodes, requiring optimization. To ensure the compactness and accuracy of the metric space, a metric threshold of 100 is set. This means that when the Euclidean distance between two nodes is greater than 100, they are considered to have a significant difference in traffic conditions. In this case, the system will prioritize deleting metric nodes that do not meet the metric threshold requirement to optimize the structure of the metric space. The deletion strategy is as follows: first, delete the node with the greatest distance between metric node pairs, until all metric node pairs meet the preset metric threshold.
[0122] This optimization method ultimately yields a final optimized metric space that conforms to multiple dimensions such as traffic flow, vehicle speed, and traffic lights. This metric space can more accurately reflect the similarities and differences between road segments, providing more reasonable basic data for subsequent traffic flow prediction, route planning, and signal control optimization.
[0123] In this embodiment, step five specifically includes:
[0124] Based on the traffic flow prediction map and metric space, real-time traffic data for each road or intersection is collected, including multi-dimensional data such as traffic flow, vehicle speed, traffic light status, and accidents and events. Specifically, the traffic flow prediction map provides a forecast of traffic flow for each road segment over a future period, providing a reference for dynamic changes in traffic flow for route planning; the metric space provides the capacity between road segments, measuring the relative distance between segments and the quality of road traffic. Each node in the metric space represents a traffic segment or intersection, and the connections between nodes reflect the similarity of capacity or traffic characteristics between road segments.
[0125] In the route planning process, a comprehensive analysis of the traffic network is first conducted based on collected data on traffic flow, vehicle speed, traffic light status, and accidents and incidents to ensure that the real-time traffic conditions of all road segments are fully considered in the planning. Next, the optimization objectives of the route planning are defined, specifically including:
[0126] Minimize travel time: Select the shortest route from all available options to ensure the vehicle reaches its destination as quickly as possible.
[0127] Minimize traffic light waiting time: When planning routes, take into account the traffic light cycles and switching times on each road, and prioritize road sections with shorter traffic light switching cycles and smoother traffic flow to reduce the time wasted by vehicles waiting at red lights.
[0128] After considering these two main optimization objectives, the system generates optimal travel routes using classic path planning algorithms such as A* or Dijkstra's algorithm, based on the principles of minimizing travel time and minimizing traffic light waiting time, and in conjunction with collected traffic data. By calculating the travel time and traffic light waiting time for each route, the system ultimately selects a route that achieves the best balance between the two.
[0129] Ultimately, the generated optimal driving route is fed back to the vehicle's navigation system in real time, and the route planning is adjusted according to real-time traffic changes to ensure smooth traffic flow and reduce congestion. Simultaneously, the route planning is also periodically updated based on dynamic traffic flow and traffic light information to respond to changes in traffic conditions.
[0130] In this embodiment, step six specifically includes:
[0131] Based on the traffic flow prediction map and optimal travel routes, the system dynamically calculates the traffic light cycle for each road segment. Specifically, firstly, the system determines the traffic flow situation for each road in a future time period using the traffic flow prediction map and route planning results. Using this information, the system dynamically adjusts the red and green light durations and switching cycles of the traffic lights based on data such as vehicle speed, traffic flow, and traffic light status for each road segment to improve traffic efficiency.
[0132] When dynamically adjusting the traffic light cycle, the specific adjustment steps are as follows:
[0133] Traffic light duration adjustment: By calculating vehicle speed, traffic flow, and waiting time for each road segment, the system prioritizes extending the green light duration for segments with high traffic volume to allow more vehicles to pass smoothly. For segments with low traffic volume, the system reduces the green light duration to optimize intersection capacity.
[0134] Peak and Off-Peak Hour Adjustments: Based on traffic flow fluctuations at different times and combined with real-time traffic forecasts, the system dynamically adjusts traffic light cycles. During peak hours (such as morning and evening rush hours), due to high traffic volume, the system increases green light duration and reduces waiting time, thereby reducing traffic congestion; while during off-peak hours (such as late at night), green light duration is shortened to avoid wasting resources and improve the overall efficiency of urban traffic flow.
[0135] Based on optimal travel routes and real-time traffic flow data, the switching cycle of traffic lights is dynamically adjusted. Specifically, this adjustment is achieved by calculating the optimal switching time for each road segment. This calculation considers factors such as traffic flow forecasts, vehicle speed, and road segment congestion conditions. The switching cycle of the traffic lights at each intersection is adjusted with each traffic flow forecast update to ensure that the switching of traffic lights better matches the actual needs of traffic flow.
[0136] Finally, by comprehensively considering the results of adjustments to traffic light durations and switching cycles, the system generates a traffic signal optimization scheme. This scheme will include the real-time adjusted traffic light cycles and optimal switching times, and will be applied to the urban traffic signal system. This will optimize traffic flow distribution at intersections in real time to ensure maximum traffic efficiency on each road segment, further reducing congestion and improving the intelligence and efficiency of overall traffic management.
[0137] Example 1:
[0138] To verify the feasibility of this invention in practice, it was applied to a large city, aiming to address many challenges faced by traditional traffic signal control and flow prediction systems, particularly the inaccuracy of traffic flow prediction and the lag in signal light adjustments during peak hours or special events. Traditional traffic management systems often employ fixed signal light cycles and flow prediction models, which cannot respond to real-time fluctuations and emergencies in traffic flow, leading to traffic congestion and long queues. The system of this invention, through multimodal data acquisition and analysis, combined with advanced machine learning models and genetic algorithm optimization techniques, provides an intelligent and dynamic solution for urban traffic management.
[0139] Using the city center as the application scenario, we focused on traffic flow prediction and traffic light control optimization at three major intersections. These three intersections frequently experience congestion during peak hours, leading to prolonged vehicle stoppages and low driving efficiency. To effectively address this issue, we first collected raw traffic data for the area using multiple sensors and devices, including image data from traffic monitoring cameras, vehicle speed data from vehicle speed sensors, traffic signal status data from traffic light sensors, weather data from environmental sensors, and data from smartphone navigation apps. All of this data was preprocessed to obtain a unified-format multimodal traffic dataset, which served as the foundation for subsequent model training and prediction.
[0140] In the data preprocessing stage, all collected raw data underwent outlier removal and missing value imputation. For example, sudden outliers in vehicle speed data (such as unreasonable high speeds) were removed using the Z-score method, and missing parts in traffic flow data were filled using linear interpolation, ensuring data integrity and consistency. After these preprocessing steps, all data were converted into a unified format and integrated into traffic feature vectors. These feature vectors not only include traffic flow and vehicle speed but also factors such as traffic light cycles and weather, providing sufficient information for subsequent traffic flow prediction and route planning. Based on these traffic feature vectors, we constructed an urban traffic network map. Each road segment or intersection serves as a node in the network map, and the connections between nodes reflect factors such as traffic flow and traffic light status. To determine which road segments have strong connections, we calculated the Manhattan distance between nodes to assess the similarity of their traffic conditions. Through this process, we obtained a refined urban traffic network map, which provides data support for subsequent traffic flow prediction and route planning.
[0141] In the traffic flow prediction phase, the constructed traffic network map is input into an improved GATv2 model for training. Through feature embedding, spatiotemporal feature extraction, and traffic flow prediction optimization modules, the system can learn the temporal and spatial variation patterns of traffic flow from a large amount of historical data. Specifically, the system extracts features from information such as vehicle speed, traffic flow, and traffic light status for each road segment, and then combines this with historical data to predict traffic flow for each road segment within a specific future time period. This prediction not only considers daily traffic fluctuations but also the impact of special events (such as traffic accidents and severe weather) on traffic flow, thus providing more accurate traffic flow prediction data. Based on the traffic flow prediction map and metric space model, the system performs path planning to generate the optimal driving path for each road segment. In this process, the system sets multiple optimization objectives, mainly including minimizing travel time and minimizing traffic light waiting time. By calculating the comprehensive cost of different paths, the system ultimately provides the optimal driving route for each vehicle. Unlike traditional static path planning systems, this system can respond to changes in traffic flow and adjustments to traffic light status in real time, ensuring that vehicles can choose the path with the least traffic flow and the shortest traffic light waiting time.
[0142] During the traffic signal optimization phase, the system dynamically adjusts the signal light cycles at intersections based on optimal travel routes and traffic flow predictions. For example, during peak hours, the system increases the green light duration on high-flow sections and decreases the green light duration on low-flow sections to improve road capacity. Conversely, during off-peak hours, the system shortens green light durations to reduce unnecessary waiting times and improve traffic efficiency. All these optimization measures are implemented in real-time through the traffic signal control module and controlled by the intelligent transportation system.
[0143] To verify the effectiveness of this system, we selected three major intersections in the city center for practical application. The following is a comparison of traffic conditions before and after the application:
[0144] Table 1. Comparison of traffic conditions before traffic signal optimization
[0145] Intersection Number Average vehicle speed during peak hours (km / h) Average waiting time during peak hours (minutes) Peak Hour Congestion Index Traffic volume during peak hours (vehicles / hour) Intersection A 15 8 0.8 600 Intersection B 12 10 0.9 700 Intersection C 18 6 0.7 500
[0146] Table 2. Comparison of Traffic Conditions After Traffic Signal Optimization
[0147] Intersection Number Average vehicle speed during peak hours (km / h) Average waiting time during peak hours (minutes) Peak Hour Congestion Index Traffic volume during peak hours (vehicles / hour) Intersection A 25 4 0.5 650 Intersection B 20 5 0.6 750 Intersection C 22 3 0.4 550
[0148] A comparison of the data in Tables 1 and 2 shows that after implementing the intelligent traffic control system, the average vehicle speed during peak hours at all intersections significantly increased, the average waiting time decreased substantially, the congestion index also dropped significantly, and traffic flow improved. Particularly in high-traffic sections, the optimized traffic flow increased by approximately 10% compared to before optimization. This result fully demonstrates the effectiveness of the method of this invention in urban traffic management, especially during peak hours and in complex traffic environments, where it can significantly improve traffic flow and efficiency, alleviating common problems in traditional systems such as traffic congestion and unreasonable traffic light cycles.
[0149] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A machine learning-based intelligent management and control system for urban traffic operations, characterized in that, Includes the following modules: The data acquisition and preprocessing module is used to collect raw multi-source traffic data of urban traffic operation through multiple channels, and to preprocess the raw multi-source traffic data to obtain a multimodal traffic dataset in a unified format. The urban traffic network map construction module is used to extract features from the multimodal traffic dataset to obtain traffic feature vectors, and to use the traffic feature vectors of each road segment or intersection as nodes, calculate the Manhattan distance between nodes, and construct an urban traffic network map. The traffic flow prediction modeling module is used to input the urban traffic network map into the improved GATv2 model, and perform traffic flow prediction modeling through the feature embedding module, spatiotemporal feature extraction module, traffic prediction module and traffic flow prediction optimization module to obtain the urban traffic flow prediction map. The metric space generation module is used to generate the metric space of the urban traffic network based on the traffic flow prediction map, and optimize it through metric thresholds. The optimal driving route generation module is used to define optimization objectives based on the traffic flow prediction map and the metric space, and to generate the optimal driving route in the urban traffic network. The traffic signal adjustment module is used to dynamically adjust the traffic signals based on the optimal driving route and traffic flow prediction map to obtain an optimized traffic signal scheme.
2. The intelligent urban traffic operation control system based on machine learning according to claim 1, characterized in that, The modules are connected in the following way: Step 1: Collect raw multi-source traffic data of urban traffic operation through multiple channels, and preprocess the raw multi-source traffic data to obtain a multimodal traffic dataset in a unified format; Step 2: Extract traffic feature vectors from the multimodal traffic dataset, and use the traffic feature vectors of each road segment or intersection as nodes to calculate the Manhattan distance between nodes and construct an urban traffic network map; Step 3: Input the urban traffic network map into the improved GATv2 model, and perform traffic prediction modeling through the feature embedding module, spatiotemporal feature extraction module, traffic prediction module and traffic flow prediction optimization module to obtain the urban traffic flow prediction map; Step 4: Based on the traffic flow prediction map, generate the metric space of the urban traffic network and optimize it using metric thresholds; Step 5: Define the optimization objective based on the traffic flow prediction map and metric space, and generate the optimal driving path in the urban traffic network; Step 6: Based on the optimal driving route and traffic flow prediction map, dynamically adjust the traffic signals to obtain an optimized traffic signal scheme.
3. The intelligent urban traffic operation control system based on machine learning according to claim 2, characterized in that, The original multi-source traffic data includes image data collected by traffic monitoring cameras, vehicle speed data collected by vehicle speed sensors, traffic signal status data collected by traffic light sensors, weather data collected by environmental sensors, and data from smartphone navigation apps. The preprocessing steps include outlier removal, missing value imputation, timestamp alignment, and normalization of different types of data in the original multi-source traffic data to obtain a multimodal traffic dataset in a unified format.
4. The intelligent urban traffic operation control system based on machine learning according to claim 2, characterized in that, Step two specifically involves: Feature extraction is performed on various types of data in the multimodal traffic dataset. The feature extraction steps include traffic flow features, vehicle speed features, traffic light status features, environmental features, and accident and event features. The traffic flow characteristic is the number of vehicles passing through each road segment per unit time; the vehicle speed characteristic is the average vehicle speed of each road segment. The traffic light status characteristics are the red and green light cycles at each intersection; the accident and event characteristics are the time, location, and scope of impact of the traffic accident. The extracted features of different types are arranged in a preset order to obtain the traffic feature vector; Based on the traffic feature vectors, an urban traffic network map is constructed. The construction steps are as follows: The traffic feature vector of each road segment or intersection is used as a node to obtain a node set; Calculate the Manhattan distance between the traffic feature vectors of every two nodes in the node set; If the Manhattan distance is less than the preset distance threshold, then an edge connection is established between the corresponding nodes to obtain a set of connecting edges; Based on the connection relationships between the node set and the edge set, the urban traffic network map is obtained.
5. The intelligent urban traffic operation control system based on machine learning according to claim 2, characterized in that, The improved GATv2 model is specifically as follows: The urban traffic network map is input into the feature embedding module. For each traffic segment or intersection, the feature embedding module collects the traffic feature vectors of adjacent segments to form a set of neighboring nodes. Calculate the cosine similarity between the traffic feature vector corresponding to the current node and the traffic feature vector corresponding to each neighbor node in the neighbor node set; If the cosine similarity is less than a preset similarity threshold, the traffic feature vector corresponding to the current node is weighted and summed with the traffic feature vectors corresponding to the neighboring nodes to obtain the initial node embedding vector of the current node. The weighting is the reciprocal of the corresponding cosine similarity. The initial node embedding vector is input into the spatiotemporal feature extraction module. One-dimensional convolution is used to extract local spatial features from the initial node embedding vector, identify local traffic flow patterns, and obtain local spatial features. By using gated cyclic units to model the time series features of the initial node embedding vector, the trend of traffic flow changes over time is captured, and the time features are obtained. The local spatial features extracted by convolution are combined with temporal features to generate a spatiotemporal feature vector for each node; The spatiotemporal feature vector is input into the traffic prediction module, and then input into the fully connected layer for feature transformation. Based on historical data and spatiotemporal features, the multi-layer neural network predicts the traffic flow of each road segment in a future time period, thus obtaining the traffic flow prediction result. The traffic flow prediction results are input into the traffic flow prediction optimization module, and the traffic flow prediction results are optimized by a genetic algorithm to obtain the final urban traffic flow prediction map.
6. The intelligent urban traffic operation control system based on machine learning according to claim 5, characterized in that, The optimization of traffic flow prediction results using a genetic algorithm specifically involves: Based on the traffic flow prediction results, a set of individuals is randomly generated, each individual representing a potential optimal solution for traffic flow prediction; each individual is composed of a set of genes. The genes represent traffic flow prediction parameters, including traffic flow characteristics, vehicle speed characteristics, traffic light status characteristics, environmental characteristics, and accident and event characteristics for each road segment; Using the mean squared error as the objective function, the fitness value between each individual and the actual traffic flow is calculated. Individuals are selected based on their fitness values, and those with fitness values greater than a preset threshold are used to generate the parent individuals for the next generation. Selected parent individuals undergo single-point crossover, whereby gene segments are exchanged, to generate two new offspring individuals; Calculate the fitness value of the offspring individuals generated by a single-point intersection, select the individual with the highest fitness value as the optimal individual, and obtain the optimal traffic flow prediction map.
7. The intelligent urban traffic operation control system based on machine learning according to claim 2, characterized in that, Step four specifically involves: Based on the traffic flow prediction map, a measurement space is set between each road segment or intersection in the urban traffic network, and the measurement space takes each traffic road segment or intersection as a measurement node. In the metric space, the distance between nodes is measured as the Euclidean distance between the traffic feature vectors corresponding to each traffic segment or intersection. If the Euclidean distance between a pair of metric nodes is greater than the preset metric threshold, the metric node with the most non-measuring metric nodes is deleted first, until all pairs of metric nodes meet the preset metric threshold, thus obtaining the final optimized metric space.
8. The intelligent urban traffic operation control system based on machine learning according to claim 2, characterized in that, Step five specifically involves: Based on the traffic flow prediction map and metric space, collect traffic flow, vehicle speed, traffic light status, accidents and events occurring on each road or intersection; The traffic flow prediction map provides future traffic flow predictions for each road segment, and the metric space provides the traffic capacity between road segments. During the route planning process, an optimization objective is defined, which includes minimizing travel time and traffic light waiting time. Generate the optimal driving path based on the optimization objective.
9. The intelligent urban traffic operation control system based on machine learning according to claim 2, characterized in that, Step six specifically involves: Based on the traffic flow prediction map and the optimal driving route, the traffic light cycle for each road segment is dynamically calculated. By calculating the vehicle speed, traffic flow, and waiting time of each road segment, the duration of red and green lights is dynamically adjusted, increasing the green light duration of road segments with high traffic flow. Based on traffic flow fluctuations at different times, the traffic light cycle is adjusted according to real-time traffic forecasts, and the green light time is increased during peak hours. During off-peak hours, shorten green light times to reduce waiting times; Based on the optimal driving route and real-time traffic flow data, the traffic light switching cycle is dynamically adjusted. The adjusted traffic light switching cycle is calculated based on the predicted traffic flow and the optimal driving route to determine the best traffic light switching time for each road segment. Based on the adjustment of traffic light duration and signal switching cycle, a traffic signal optimization scheme is generated, and the traffic flow distribution at intersections is optimized in real time.