Traffic transportation scheduling method based on visual identification
By installing camera equipment and deep learning models at traffic nodes, combined with V2X communication technology, real-time traffic flow detection and prediction are achieved, solving the problem of limited response speed and scheduling effect of existing traffic scheduling systems, and improving the intelligence level of traffic scheduling and emergency response capabilities.
Patent Information
- Application Number
- CN202411514833.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-11
AI Technical Summary
When facing complex traffic environments and emergencies, the response speed and scheduling effects of existing traffic scheduling systems are relatively limited and cannot fully adapt to the needs of modern traffic systems.
By installing camera equipment at traffic nodes, traffic flow image data is collected and processed in real time, vehicle detection and classification is performed in combination with deep learning models, vehicle trajectory is generated using multi-objective tracking algorithm, and traffic flow prediction is performed based on long-term and short-term memory networks. According to the prediction results, the signal lights and vehicles interact with the V2X communication system, the signal light duration is adjusted in real time, and priority passage and dispatch of emergency vehicles.
Real-time and accurate traffic flow detection and prediction are realized, the intelligence level of traffic scheduling is improved, traffic congestion is reduced, emergency vehicles are ensured to fast pass, and scheduling strategies are continuously optimized through adaptive learning functions.
Smart Images

Figure CN119418522A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of transportation, and in particular to a transportation scheduling method based on visual recognition. Background Art
[0002] With the acceleration of urbanization and the continuous increase in the number of cars, traffic congestion is becoming increasingly serious, especially at key traffic nodes in large cities. Peak traffic hours pose a severe challenge to road efficiency and traffic safety. Traditional traffic dispatching and control systems mainly rely on fixed-cycle signal light control and limited traffic sensing equipment such as geomagnetic coils, radars, and infrared sensors. Although these methods can alleviate traffic pressure to a certain extent, their response speed and dispatching effect are often limited in the face of complex traffic environments and emergencies, and they cannot fully meet the needs of modern transportation systems.
[0003] In recent years, with the rapid development of computer vision, deep learning and V2X (Vehicle to Everything) communication technology, traffic dispatch methods based on visual recognition have gradually become a research hotspot. By installing cameras at traffic nodes, collecting and processing traffic flow image data in real time, and combining deep learning models for vehicle detection and classification, key information such as vehicle location, driving direction, speed, etc. can be obtained more accurately. In addition, multi-target tracking algorithms can continuously track multiple vehicles and obtain their motion trajectories, further providing an important basis for traffic flow prediction and dispatch.
[0004] In order to improve the intelligence of the transportation system, traffic flow prediction plays an increasingly important role in traffic scheduling. Traditional traffic flow prediction methods are often based on simple regression of historical data and cannot handle dynamic changes in traffic flow. Long short-term memory network (LSTM), as a deep learning model suitable for processing time series data, can effectively use historical traffic data and real-time image information to make more accurate short-term traffic flow predictions.
[0005] The development of V2X communication technology has made it possible for vehicles to interact with traffic infrastructure in real time, enabling traffic signal control systems to dynamically adjust the duration of traffic lights according to actual traffic flow conditions, thereby improving road traffic efficiency. In particular, in emergency situations, the V2X system can help dispatch emergency vehicles to have priority passage, by adjusting traffic lights in advance and communicating with surrounding vehicles to ensure that emergency vehicles pass safely in the shortest possible time.
[0006] However, the current traffic dispatch system based on visual recognition and V2X communication still faces some challenges, such as the accuracy of vehicle detection and classification, the robustness of multi-target tracking, the accuracy of traffic flow prediction, and the intelligence level of signal light duration adjustment. Solving these problems will greatly improve the performance of the traffic dispatch system and provide a more intelligent solution to alleviate traffic congestion. Summary of the invention
[0007] In view of the shortcomings of the existing technology, the present invention provides a transportation scheduling method based on visual recognition, which solves the problem of real-time and accurate detection and prediction of traffic flow at traffic nodes, and improves traffic efficiency and safety through intelligent scheduling of traffic lights and priority passage of emergency vehicles.
[0008] To achieve the above objectives, the present invention is implemented through the following technical solutions: a transportation scheduling method based on visual recognition, comprising the following steps:
[0009] Install cameras at multiple traffic nodes to collect real-time traffic flow image data;
[0010] Preprocessing the image data, including image denoising, resolution adjustment, and lane area division;
[0011] Perform vehicle detection and classification on the image data through a deep learning model to identify the location, speed, direction of travel, and type of vehicle;
[0012] Use a multi-target tracking algorithm to track the detected vehicles across frames and generate real-time trajectories for each vehicle;
[0013] Predict future traffic flow based on the long short-term memory network model and generate traffic flow change trends in the future;
[0014] According to the traffic prediction results, the V2X communication system interacts with traffic lights and vehicles to adjust the duration of traffic lights in real time;
[0015] Emergency vehicles are given priority in traffic dispatch, their routes are adjusted in advance through the V2X system, and traffic lights are controlled in real time.
[0016] Preferably, the camera device is a camera with high-definition resolution and adjustable angle, which can cover all lanes of the traffic node and has night vision and image enhancement functions in severe weather.
[0017] Preferably, the image data preprocessing further includes adjusting the resolution of the original image to the image size required for the deep learning model input and calibrating the lane boundaries.
[0018] Preferably, in the vehicle detection and classification step, a YOLO or SSD model is used for vehicle detection, and the model can identify multiple vehicle types through a trained data set.
[0019] Preferably, the multi-target tracking algorithm is a SORT algorithm that combines Kalman filtering with the Hungarian algorithm, which can accurately track the movement trajectory of each vehicle in a dense traffic environment.
[0020] Preferably, the LSTM model combines historical traffic data and real-time image data to predict traffic flow changes within the next 5 to 10 minutes based on traffic flow trends over a period of time in the past.
[0021] Preferably, the V2X communication system exchanges real-time data with traffic lights through the vehicle-mounted unit and the roadside unit, and can adjust the duration of traffic lights according to real-time traffic flow information.
[0022] Preferably, the system schedules emergency vehicles to have priority passage by detecting their travel paths, adjusting the traffic lights in the areas they pass through to green in advance, and sending avoidance prompts to surrounding vehicles.
[0023] Preferably, the traffic light duration adjustment is based on a reinforcement learning algorithm, and the system automatically adjusts the traffic light duration by analyzing historical traffic data and real-time feedback results.
[0024] Preferably, the system has an adaptive learning function and can continuously optimize the LSTM model and traffic light control algorithm according to historical scheduling strategies.
[0025] The present invention provides a transportation scheduling method based on visual recognition.
[0026] Beneficial effects:
[0027] 1. Through visual recognition and real-time traffic prediction, the system of the present invention can identify traffic congestion points in advance and make intelligent scheduling decisions, effectively reducing traffic congestion and improving vehicle traffic efficiency.
[0028] 2. The priority passage mechanism of the emergency vehicle passing system of the present invention can enable the emergency vehicle to pass through the intersection quickly and safely, thus shortening the rescue time.
[0029] 3. This system has adaptive learning capabilities and can be optimized based on the continuously accumulated traffic data to make future scheduling and predictions more accurate.
[0030] 4. The present invention realizes all-weather and all-scenario traffic dispatch management through the combination of cameras, V2X communication and deep learning. The system can maintain efficient operation regardless of day or night or in bad weather. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] Please see attached Figure 1 The embodiment of the present invention provides a transportation scheduling method based on visual recognition, comprising the following steps:
[0034] Step 1: Arrangement of traffic node cameras and image data collection
[0035] In this embodiment, during the layout of the main traffic nodes, the camera installation locations are first selected based on the complexity of the traffic flow and the distribution of the lanes. At a typical intersection, to ensure that all lanes can be effectively covered by the camera, the camera should be installed on each traffic light pole or at a high position on the roadside to provide the best viewing angle. The coverage of each camera needs to be pre-set in the system configuration.
[0036] In order to improve the image quality, in this embodiment, the camera used has an automatic adjustment function, such as automatically adjusting the brightness and contrast according to the changes in the ambient light, and has an infrared night vision function to provide high-quality image data at night or in low-light environments. In this step, the sampling frame rate is set to 30 frames per second (fps) to ensure that the vehicle's motion trajectory is continuous and clear.
[0037] In order to achieve real-time transmission, in this embodiment, the camera transmits image data to the central control system through a dedicated network protocol (such as RTSP protocol). The data can be stored and managed by combining local cache with cloud backup to ensure that the data is efficiently transmitted and redundant. The network delay should be controlled within 50 milliseconds during design to ensure the timeliness of image data and to respond to traffic changes in real time.
[0038] Data collection is the foundation of the entire dispatching system. The camera’s location and the quality of data collection directly affect subsequent image processing, vehicle detection, and traffic prediction. Ensuring that the camera’s viewing angle is complete and data is transmitted in real time can provide stable input for subsequent steps of the system.
[0039] The camera frame rate is set to 30fps, and 30 frames of images are collected per second. Assuming that the size of each frame is S_frame bytes, the amount of data in one second is: D = 30 × S frame (Bytes / second) Based on this data volume, the size of data stored per hour can be calculated: D hour= 30×S frame ×3600 (bytes / hour).
[0040] If the camera resolution is 1080P (each frame is about 2MB), then the data size for one hour is approximately: hour =30×2×10 6 ×3600=216GB
[0041] Step 2: Image data preprocessing
[0042] In this embodiment, the raw image data collected by the camera needs to undergo a series of preprocessing in order to be input into the subsequent deep learning model. The image denoising process uses Gaussian filtering technology to remove environmental noise and interference. Through multiple experiments, the filter kernel size is set to a 3x3 matrix in this solution, which can effectively smooth the noise in the image and maintain the clarity of the vehicle edge.
[0043] In this embodiment, the image resolution is adjusted to 640x480 pixels to adapt to the input size of the YOLO model. At the same time, in the process of adjusting the image resolution, it is ensured that the key feature information of the vehicle is not lost. In the preprocessing stage, the image segmentation technology based on lane calibration is also used to divide the lane area of each image. The geometric calibration algorithm is used to determine the precise boundary of the lane and provide a reference for subsequent vehicle positioning.
[0044] At the end of this step, all image data are standardized to ensure consistent data distribution and provide a stable input data source for the training and reasoning of deep learning models.
[0045] The preprocessing step ensures the quality and consistency of the data, optimizes the input conditions of the model, and provides accurate and effective image data input for vehicle detection, tracking and traffic analysis. If the preprocessing is not sufficient, the subsequent detection accuracy will be reduced.
[0046] Step 3: Vehicle Detection and Classification
[0047] In this embodiment, vehicle detection and classification relies on a deep learning algorithm based on the YOLO v3 model. The YOLO model is pre-trained and can identify different types of vehicles in a variety of traffic scenarios, including small cars, large trucks, and buses.
[0048] The system first inputs the preprocessed image into the YOLO v3 model, which extracts feature information from the image through a convolutional neural network and generates multiple candidate boxes in the image. Each candidate box corresponds to a potential target vehicle, and each target has a confidence value. In this embodiment, the confidence threshold is set to 0.5, that is, when the confidence of the target exceeds 50%, it is marked as a detected vehicle.
[0049] Through the post-processing step, the system will further classify the detected targets according to the vehicle's appearance characteristics, distinguishing between small cars, trucks, and buses. During the classification process, the system will refine the classification of targets based on the size, contour shape and other characteristics of the vehicle combined with the pre-trained classification model.
[0050] Vehicle detection and classification are important links in data processing in the dispatching system. Accurate vehicle detection and classification provide basic data for subsequent dispatching such as traffic forecasting and lane management. If the classification is inaccurate, it will affect the effectiveness of traffic statistics and dispatching strategies.
[0051] Step 4: Multi-target tracking and vehicle trajectory generation
[0052] In this embodiment, after vehicle detection, the system uses the SORT (Simple Online and Realtime Tracking) algorithm to achieve multi-target tracking to generate the motion trajectory of each vehicle. The SORT algorithm combines the Kalman filter and the Hungarian algorithm to achieve continuous vehicle tracking by predicting the position of each vehicle in the next frame of the image and matching it with the actual detected vehicle.
[0053] In the specific implementation, the Kalman filter predicts the position of each detected vehicle at the next moment, and infers the future position of the vehicle by trajectories and accelerations based on historical data. The Hungarian algorithm achieves cross-frame tracking of the vehicle by matching the actual position of the vehicle with the predicted position by minimizing the distance between the detection frame and the predicted position.
[0054] In this embodiment, the motion trajectory data of the vehicle is recorded in real time, including the coordinates, speed and direction changes of the vehicle. The trajectory data is not only used for real-time traffic scheduling, but can also be used as historical data for training traffic prediction models.
[0055] Step 5: Real-time traffic flow prediction
[0056] In this embodiment, the system uses LSTM (Long Short-Term Memory) neural network to predict real-time traffic flow. LSTM is a deep learning algorithm that can capture time series information and is suitable for processing traffic flow data containing time dependencies.
[0057] In the specific implementation, the system takes historical traffic flow data (such as the number of vehicles in each lane in the past hour, average speed, etc.) and real-time vehicle detection data as input and inputs them into the LSTM model. After training, the model can predict traffic flow trends in the next 5 to 10 minutes, including vehicle density, speed distribution and possible congestion in each lane.
[0058] Through the prediction results, the system can identify the upcoming traffic congestion points in advance and provide a decision basis for subsequent scheduling. In this embodiment, the LSTM model has been trained with a large amount of historical data and has a high prediction accuracy, and can make effective traffic flow predictions in a dynamic traffic environment.
[0059] Traffic flow prediction is an important basis for traffic dispatching decisions. Accurate traffic flow prediction can predict potential traffic problems in advance and provide a time window for the dispatching system to optimize and adjust.
[0060] Step 6: Traffic light dispatching and lane guidance based on V2X
[0061] In this embodiment, based on V2X (vehicle-to-everything) technology, the system communicates with vehicles and infrastructure (such as traffic lights and electronic road signs) in real time to achieve dynamic traffic scheduling.
[0062] The system first interacts with the traffic light through V2X communication based on the traffic prediction results output by the LSTM model, and adjusts the duration of the traffic light in real time. For example, when a lane is predicted to have high traffic, the system will give priority to extending the green light time of that lane to alleviate the impending congestion.
[0063] In addition, when it is predicted that a certain traffic node is about to be seriously congested, the system will guide vehicles to detour to alternative lanes or other routes through V2X to reduce traffic pressure on the main road. At this time, the electronic road signs will display detour prompts and notify the driver through the on-board system.
[0064] Through V2X technology, the system can interact with vehicles and infrastructure in real time to ensure that traffic scheduling strategies can be dynamically adjusted and traffic flow distribution can be optimized based on forecast results. If communication is delayed or traffic lights are not adjusted in time, traffic congestion may be aggravated.
[0065] In this embodiment, the system interacts with the traffic light system through V2X. Assuming that the lane flow at a certain moment is Flow(t), the system adjusts the traffic light duration according to the flow prediction model. Assuming that the traffic light duration adjustment formula is: T green =T base +ΔT·(Flow(t) / F max ) where T base is the basic green time, F maxis the maximum allowable flow rate of the lane, Flow(t) is the current flow rate, and ΔT is the adjustment coefficient.
[0066] When high traffic is detected, the system adjusts the duration of traffic lights through V2X communication to relieve congestion. At the same time, the V2X system notifies vehicles to change lanes or take detours through the on-board communication unit (OBU).
[0067] Step 7: Emergency Vehicle Priority Dispatch
[0068] In this embodiment, the system uses V2X communication technology to detect the driving status of emergency vehicles (such as ambulances and fire trucks) in real time, and prioritizes their driving paths.
[0069] When an emergency vehicle approaches a traffic node, the system notifies the traffic light system of the node in advance through V2X communication, and adjusts all the traffic lights on the route of the emergency vehicle to green to ensure its quick passage. In addition, the system also notifies other vehicles through V2X to give way to the emergency vehicle in time.
[0070] The priority passage of emergency vehicles requires a high real-time response speed of the system. Ensuring that emergency vehicles can pass quickly is the key goal of this step. Coordinated dispatch with other vehicles is an important guarantee for improving traffic safety and emergency efficiency.
[0071] Step 8: System Adaptive Learning and Optimization
[0072] In this embodiment, the system has an adaptive learning function, and continuously optimizes the dispatching strategy through reinforcement learning and feedback mechanism. The system evaluates the effect of each traffic light adjustment and records the changes in traffic flow.
[0073] Based on the feedback data, the system will dynamically adjust the weight of the traffic light control strategy. Through Q-learning or deep reinforcement learning algorithms, the system can automatically optimize the traffic light duration allocation strategy in different traffic environments and gradually improve the efficiency of traffic scheduling.
[0074] Adaptive learning enables the system to continuously optimize the model based on historical dispatch results, ensuring more accurate and efficient responses in the future under the same or similar traffic conditions. Through continuous optimization, the system can gradually improve dispatch efficiency and reduce traffic congestion.
[0075] Embodiment 1:
[0076] This embodiment discloses a method for traffic dispatching based on visual recognition during peak hours in the central area of a city. The method is applied during rush hour (such as morning and evening rush hours) to cope with large traffic, complex vehicle flow patterns and frequent lane switching. This embodiment achieves effective control of urban traffic during peak hours through camera data acquisition, image processing, vehicle detection and classification, multi-target tracking, traffic flow prediction and dynamic traffic light dispatching based on V2X.
[0077] Step 1: Arrangement of traffic node cameras and image data collection
[0078] In this embodiment, the system installs high-resolution cameras at major traffic intersections in the city center, such as crossroads and multi-lane intersections. Due to the large traffic volume during peak hours, it is necessary to ensure that the cameras cover all lanes without blind spots. The cameras should be installed at high places on traffic light poles or on both sides of the road to obtain the best monitoring angle.
[0079] The main configuration of the camera is as follows:
[0080] Resolution: At least 1080P, to ensure that the vehicle and its features can be clearly identified.
[0081] Frame rate: Set to 30 frames per second (fps) to ensure continuous acquisition of the vehicle's motion trajectory and reduce image blur caused by high vehicle speed.
[0082] Automatic adjustment function: The camera automatically adjusts brightness and contrast according to changes in ambient light, and is equipped with infrared night vision function to cope with the needs of different lighting conditions.
[0083] Data collection uses a dedicated real-time transmission protocol (such as RTSP) to transmit the images captured by the camera to the central control system. The data size of each frame is about 2MB. Calculated at a frame rate of 30fps, the data volume per hour is about 216GB. In order to prevent data loss, the data is stored in a combination of local cache and cloud backup to ensure efficient data transmission and security management. The network delay design of the camera should be controlled within 50 milliseconds to ensure that the system can respond to changes in traffic flow in a timely manner.
[0084] Through reasonable camera arrangement, the system can ensure that sufficiently clear and continuous vehicle images are captured during peak traffic hours, providing accurate data input for subsequent image processing and scheduling decisions.
[0085] Step 2: Image data preprocessing
[0086] In this embodiment, the raw image data collected by the camera needs to be preprocessed to ensure the quality of the data and provide stable input for the subsequent deep learning model. This step includes the following:
[0087] Image denoising: Use a Gaussian filter to denoise the image, and the filter kernel size is set to 3 × 3. This filtering method can effectively remove environmental noise and maintain the clarity of the vehicle outline, and is suitable for complex traffic environments during peak hours.
[0088] Image resolution adjustment: To adapt to the input requirements of the YOLO model, the system adjusts the original image resolution to 640×480 pixels while ensuring that key feature information (such as vehicle boundaries) is not lost.
[0089] Lane area division: The system divides lanes through image segmentation technology based on geometric calibration. Lane division ensures that the system can accurately identify the lane position of each vehicle, providing support for subsequent vehicle detection and multi-target tracking.
[0090] Image standardization processing: The system standardizes all image data to make the image data distribution consistent and ensure the input stability of the model.
[0091] The preprocessing step of the image data improves the quality and consistency of the images, optimizes the input conditions of the model, and ensures the accuracy of subsequent vehicle detection and tracking. During peak hours, this preprocessing step can effectively cope with complex traffic environments and multi-lane situations.
[0092] Step 3: Vehicle Detection and Classification
[0093] In this embodiment, the detection and classification of vehicles relies on the YOLO v3 (You Only Look Once) deep learning model. This model has been pre-trained and can recognize and classify different types of vehicles in a variety of complex traffic scenarios, including small cars, large trucks, and buses.
[0094] The specific implementation steps are as follows:
[0095] Input preprocessed image data: The system inputs the preprocessed image data into the YOLO v3 model. The model extracts features from the image through a convolutional neural network (CNN) and generates multiple candidate boxes in the image, each of which corresponds to a potential vehicle target.
[0096] Target detection and classification: The YOLO v3 model outputs the bounding box and confidence value of the target vehicle. The system marks the target with a confidence value higher than 0.5 as a vehicle and classifies it according to the vehicle's appearance characteristics. Vehicle classification mainly distinguishes between small cars, trucks and buses. Buses will be given priority in peak-hour dispatch.
[0097] Accurate vehicle detection and classification is the basis of traffic dispatch. This step provides accurate basic data for the system's subsequent traffic flow prediction, lane guidance and signal light control, ensuring efficient management under complex traffic conditions during peak hours.
[0098] Step 4: Multi-target tracking and vehicle trajectory generation
[0099] In this embodiment, the system realizes continuous tracking of each vehicle through the SORT (Simple Online and Realtime Tracking) algorithm to generate the real-time motion trajectory of the vehicle.
[0100] The specific steps are as follows:
[0101] Kalman filter prediction: For each detected vehicle, the system predicts its position in the next frame of the image through the Kalman filter, and combines the vehicle's historical position and acceleration data to calculate the vehicle's future position.
[0102] Hungarian matching: Using the Hungarian algorithm, the system matches the predicted vehicle position with the actual position detected in the next frame. The Hungarian algorithm ensures that the vehicle can be tracked continuously across frames by minimizing the distance between the detection box and the predicted position.
[0103] Trajectory data generation: The system generates the motion trajectory data of each vehicle in real time, including the vehicle's coordinates, speed, and direction changes. The vehicle's trajectory data is not only used for real-time traffic scheduling, but also used as input for the training of traffic flow prediction models.
[0104] The SORT algorithm, combined with the Kalman filter and the Hungarian algorithm, ensures accurate tracking of vehicles in high-traffic and high-speed conditions, and ensures that the system can accurately grasp the movement path of each vehicle in complex traffic environments.
[0105] Step 5: Real-time traffic flow prediction
[0106] In this embodiment, the system uses the LSTM (Long Short-Term Memory Network) neural network model to predict real-time traffic flow. The LSTM model can capture the time series changes in traffic flow and is suitable for handling dynamic and complex traffic environments.
[0107] The specific steps are as follows:
[0108] Data input: The system inputs the traffic flow data (including the number of vehicles, average speed, etc.) in the past 30 minutes and the current vehicle detection data into the LSTM model.
[0109] Traffic flow prediction: The LSTM model predicts traffic flow trends within the next 5 to 10 minutes based on historical and real-time data input. The system can predict vehicle density, speed distribution, and potential congestion points for each lane.
[0110] Output: The system identifies areas where congestion is about to occur based on the prediction results and generates traffic light adjustment strategies in advance.
[0111] The prediction results of the LSTM model provide the system with foresight for traffic scheduling, which can identify potential traffic problems in advance and provide sufficient preparation time for subsequent scheduling strategies.
[0112] Step 6: Traffic light dispatching and lane guidance based on V2X
[0113] In this embodiment, the system communicates with traffic lights and vehicles in real time through V2X (vehicle-to-everything) technology to achieve efficient traffic scheduling.
[0114] The specific implementation steps are as follows:
[0115] Traffic light duration adjustment: Based on the traffic results predicted by the LSTM model, the system interacts with the traffic light in real time through the V2X communication system to dynamically adjust the green light duration of the traffic light. The traffic light adjustment formula is set as:
[0116] T green =T base +ΔT·(Flow(t) / F max )
[0117] Among them, T base is the basic green time, F max is the maximum allowable flow rate of the lane, Flow(t) is the lane flow rate at the current moment, and ΔT is the adjustment coefficient.
[0118] Lane guidance and detour: When the system predicts that the flow rate of a lane is about to exceed the upper limit, it will issue a detour instruction to the vehicle through the V2X system. Electronic road signs will display diversion prompts to guide some vehicles into spare lanes or secondary roads, reducing traffic pressure on the main roads.
[0119] V2X technology enables real-time communication between the system and traffic lights and vehicles, allowing traffic scheduling strategies to be dynamically adjusted to ensure flow balance and smooth traffic during peak hours.
[0120] Step 7: Emergency Vehicle Priority Dispatch
[0121] In this embodiment, the system uses V2X communication technology to prioritize emergency vehicles (such as ambulances and fire trucks). When an emergency vehicle enters a traffic node, the system automatically adjusts the traffic lights to ensure that it has priority passage.
[0122] The specific steps are as follows:
[0123] Emergency vehicle detection: The system detects the location and driving status of emergency vehicles in real time through V2X communication.
[0124] Traffic light priority adjustment: Based on the emergency vehicle's route, the system adjusts all traffic lights on its route to green to ensure that the emergency vehicle is not blocked. In addition, the system notifies other vehicles through V2X to give way in time.
[0125] The system can prioritize emergency vehicles in real time to ensure traffic safety and efficiency in emergency situations.
[0126] Step 8: System Adaptive Learning and Optimization
[0127] In this embodiment, the system has an adaptive learning function, which continuously optimizes the scheduling strategy through reinforcement learning and feedback mechanism.
[0128] The specific steps are as follows:
[0129] Feedback data collection: The system records the changes in traffic flow after each traffic light adjustment, including the length of vehicle queues, average travel time, etc.
[0130] Reinforcement learning optimization: The system uses Q-learning or deep reinforcement learning algorithms to optimize the traffic light duration adjustment strategy based on historical data, gradually improving the system's scheduling efficiency.
[0131] The system's adaptive learning function ensures that the traffic light adjustment strategy is optimized as traffic flow changes, improving the system's scheduling effect and reducing traffic congestion.
[0132] This embodiment discloses in detail a method for traffic dispatching during urban peak hours. The system achieves efficient and real-time traffic dispatching through camera data collection, vehicle detection, trajectory tracking and traffic flow prediction. The introduction of V2X communication technology ensures the flexibility of traffic light dispatching and continuously optimizes system performance through adaptive learning, enabling it to maintain efficient operation in complex peak traffic environments.
[0133] Embodiment 2:
[0134] This embodiment discloses a method for emergency dispatch of traffic accidents based on visual recognition and vehicle-to-everything (V2X) technology. When a traffic accident occurs, the traffic system needs to respond quickly to avoid further congestion and provide priority for emergency vehicles. The present invention quickly responds to traffic accidents, diverts traffic, and ensures smooth passage of emergency vehicles through camera data acquisition, image preprocessing, vehicle detection and classification, multi-target tracking, real-time traffic flow prediction, V2X-based dynamic adjustment of traffic lights, and priority dispatch of emergency vehicles.
[0135] Step 1: Traffic node camera placement and image data collection
[0136] In this embodiment, the system first deploys high-resolution cameras at major traffic nodes. The cameras cover all lanes and are installed on traffic light poles or high up on the road to ensure that all vehicles in the accident area can be captured. The cameras have night vision capabilities and can provide high-quality images in low-light environments, which is suitable for accidents at night or in bad weather conditions.
[0137] When an accident occurs, the camera collects traffic image data and sends it to the central control system via the Real-time Transport Protocol (RTSP). At this time, the system immediately turns on the high-frequency sampling mode and increases the frame rate to 30fps to ensure that the continuous movement trajectory of the vehicle in the accident area is captured. With the high-definition resolution of the camera, the system can clearly capture the details of the accident scene, including the location of the accident vehicle, lane occupancy, etc.
[0138] The amount of image data collected by the system per second is:
[0139] D=30×S frame (Bytes / second)
[0140] The amount of data per hour is:
[0141] D hour =30×S frame ×3600 (bytes / hour)
[0142] If each frame of image is 2MB, the amount of image data in one hour is 216GB.
[0143] In the event of an emergency, the system can capture clear traffic conditions through high-frame-rate and high-resolution cameras, providing accurate data support for subsequent dispatch decisions and ensuring the timeliness and effectiveness of accident response.
[0144] Step 2: Image data preprocessing
[0145] In this embodiment, the system preprocesses the raw image data collected at the accident scene. When an accident occurs, the traffic flow may be very chaotic, so the preprocessing of image data is particularly important. The main steps include:
[0146] Image denoising: Gaussian filtering technology is used to denoise the image, and the filter kernel size is set to 3×3 to eliminate image blur caused by changes in ambient light or other noise, while keeping the outlines of the accident vehicle and surrounding vehicles clear.
[0147] Image resolution adjustment: The system adjusts the resolution of the original image to 640×480 pixels to ensure the accuracy of vehicle detection and the real-time performance of the model. In accident scenes, the density of vehicles is high, so after the resolution is adjusted, it is necessary to ensure that key vehicle features are not lost.
[0148] Lane area division: The system uses lane segmentation technology based on geometric calibration to clearly distinguish lanes affected by the accident from lanes that are not affected, facilitating subsequent vehicle scheduling and detour guidance.
[0149] Image standardization: To ensure the consistency of data input into the deep learning model, the system standardizes all images. Especially when a traffic accident occurs, ensuring that all data input formats are unified helps improve detection efficiency.
[0150] The preprocessing of image data ensures the clarity and consistency of the accident scene images. Even in high-density traffic or insufficient light, vehicles and lane conditions can be accurately identified, providing reliable data input for subsequent emergency dispatch.
[0151] Step 3: Vehicle Detection and Classification
[0152] In this embodiment, the system uses the YOLO v3 model to detect and classify vehicles in the accident area in real time. The YOLO model can quickly identify the location of the accident vehicle and its surrounding vehicles in complex scenarios and classify them.
[0153] Vehicle detection: The system inputs the preprocessed image data into the YOLO v3 model. The model extracts vehicle features in the image through a convolutional neural network and outputs multiple candidate boxes (Bounding Boxes), each of which represents a detected vehicle.
[0154] Vehicle classification: The system classifies vehicles according to their appearance characteristics (such as size and outline), including small cars, trucks, buses, etc. Special markings are given to accident vehicles and surrounding blocked vehicles to ensure that the system can identify which vehicles are the source of congestion caused by the accident.
[0155] Target vehicle confidence screening: The system sets the confidence threshold to 0.5 to ensure that the detected target vehicle is accurate. If the detected target confidence is higher than 50%, the system marks it as a valid vehicle and further tracks its location and trajectory.
[0156] Accurate vehicle detection and classification is the key to the system's effective emergency dispatch. Through the YOLO model, the system can quickly and accurately identify the accident vehicle and its surrounding affected vehicles when an accident occurs, providing a data basis for subsequent traffic diversion.
[0157] Step 4: Multi-target tracking and vehicle trajectory generation
[0158] In this embodiment, the system uses the SORT algorithm to track all detected vehicles at the accident scene in real time and generate the movement trajectory of the vehicles.
[0159] The specific steps are as follows:
[0160] Kalman filter prediction: The system uses the Kalman filter to predict the position of each vehicle in the next frame of the image, especially after an accident, to predict the future position of unaffected vehicles to help them avoid the accident area. The Kalman filter formula is as follows:
[0161] x^k=A·x k-1 +B·u k-1 +w k
[0162] Among them, x_k is the state vector at the current moment, A is the state transfer matrix, u_k is the control input, and w_k is the process noise.
[0163] Hungarian Algorithm Matching: The system uses the Hungarian algorithm to match the predicted position of the vehicle with the actual detected position of the vehicle. The algorithm achieves cross-frame tracking by minimizing the distance difference and can accurately match vehicles even in accident areas with dense vehicles.
[0164] Trajectory data generation: The system records the trajectory data of each vehicle, including the vehicle's coordinates, speed, and acceleration information. The trajectory data is used for real-time scheduling and accident analysis, and can provide basic data for subsequent traffic forecasts.
[0165] By combining the SORT algorithm with the Kalman filter and the Hungarian algorithm, the system is able to accurately track all vehicles after an accident, especially ensuring effective differentiation between vehicles in the accident area and unaffected vehicles to optimize traffic flow management.
[0166] Step 5: Real-time traffic flow prediction
[0167] In this embodiment, the system uses the LSTM model to perform real-time traffic flow prediction. Especially when an accident occurs, the system can accurately predict the impact of the accident on traffic flow and conduct traffic diversion based on the prediction results.
[0168] The specific steps are as follows:
[0169] Historical data input: The system inputs traffic flow data (including lane flow, vehicle speed, etc.) within one hour before the accident into the LSTM model, and also inputs the current real-time vehicle detection data.
[0170] Traffic flow trend prediction: The LSTM model predicts the traffic flow trend in the next 5 to 10 minutes based on time series data. After an accident occurs, the system can predict the reduction in traffic flow in the accident area and surrounding roads, and identify possible secondary congestion points in advance.
[0171] Prediction result output: The system generates a traffic light adjustment strategy based on the output of the LSTM model. For example, when the lane flow in the area surrounding the accident drops significantly, the system will reduce the green light duration and guide unaffected vehicles to divert through secondary roads.
[0172] The real-time traffic flow prediction of the LSTM model enables the system to respond promptly after an accident occurs, identify congestion points in advance and optimize traffic scheduling to avoid the adverse impact of the accident on traffic in a wider area.
[0173] Step 6: Traffic light dispatching and lane guidance based on V2X
[0174] In this embodiment, the system interacts with the traffic light system and vehicles in real time through V2X technology to ensure that traffic in the accident area can be quickly restored and to open a priority lane for emergency vehicles.
[0175] Traffic light duration adjustment: Based on the traffic prediction results of the LSTM model, the system interacts with the traffic light system through V2X technology to adjust the duration of traffic lights in the accident area and surrounding areas in real time. For example, after an accident occurs, the system will reduce the green light time of the accident lane and increase the green light time of secondary roads or detours. The traffic light adjustment formula is:
[0176] T green =T base +ΔT·(Flow(t) / F max )
[0177] Among them, T base is the basic green time, F max is the maximum allowable flow rate of the lane, Flow(t) is the lane flow rate at the current moment, and ΔT is the adjustment coefficient.
[0178] Lane guidance and detour: The system interacts with electronic road signs through V2X and issues detour instructions to vehicles around the accident area. The system notifies the driver in real time through the on-board communication unit (OBU) and displays detour prompts on electronic road signs to ensure that unaffected vehicles can be diverted through the backup lane.
[0179] Through V2X technology, the system can dynamically adjust the duration of traffic lights, reasonably guide traffic to detour, prevent accidents from causing wider traffic congestion, and ensure that traffic flow in surrounding areas can be quickly restored.
[0180] Step 7: Emergency Vehicle Priority Dispatch
[0181] In this embodiment, the system uses V2X technology to prioritize emergency vehicles to ensure that they can quickly arrive at the scene of the accident.
[0182] Emergency vehicle detection: The system monitors the driving status of emergency vehicles (such as ambulances and fire trucks) in real time through V2X, and adjusts traffic lights in advance according to their driving paths.
[0183] Traffic light priority adjustment: When an emergency vehicle approaches, the system automatically adjusts all traffic lights on its route to green to ensure that it has priority. At the same time, the system notifies other vehicles through V2X to give way, providing an unobstructed rescue channel for the emergency vehicle.
[0184] By giving priority to emergency vehicles, the system can quickly divert traffic within a critical period after an accident, gaining valuable time for rescue operations and ensuring the smooth progress of emergency rescue work.
[0185] Step 8: System Adaptive Learning and Optimization
[0186] In this embodiment, the system has an adaptive learning function, which optimizes the traffic dispatch strategy after the accident through reinforcement learning and feedback mechanism.
[0187] Feedback data collection: The system records the effect of traffic light adjustments after an accident, including traffic flow recovery speed, lane usage, etc.
[0188] Reinforcement learning optimization: The system uses the Q-learning algorithm to adaptively adjust the traffic light scheduling strategy and gradually optimize the traffic light adjustment plan for similar accident scenarios in the future.
[0189] Through adaptive learning, the system continuously optimizes accident emergency response and dispatch strategies to ensure that traffic problems can be handled more efficiently in future accident scenarios, thereby improving the overall intelligence level of the system.
[0190] Embodiment three:
[0191] Traffic management during low-volume periods at night
[0192] This embodiment is suitable for low traffic periods at night. Since there are fewer vehicles at night, the duration of the signal light needs to be dynamically adjusted to avoid long idle waiting.
[0193] Traffic node camera layout and data collection:
[0194] In nighttime environments, the camera's night vision function is activated to ensure clear images are captured in low-light conditions. The frame rate can be appropriately reduced to 15fps to reduce unnecessary data traffic.
[0195] Image data preprocessing:
[0196] The system removes noise and adjusts the resolution of images collected at night, paying special attention to noise problems caused by low light. Through image segmentation technology, lanes and road areas in night traffic environments are clearly divided to ensure that vehicle boundaries can be accurately identified.
[0197] Vehicle Detection and Classification:
[0198] The system uses the YOLO model to detect vehicles at night and classify small cars and trucks. There are fewer vehicles at night, so the system will track the vehicles in detail in order to adjust the duration of traffic lights and traffic strategies.
[0199] Multi-target tracking and vehicle trajectory generation:
[0200] The SORT algorithm continues to be used to track the movement of vehicles at night and record the vehicle's movement status in real time. The system uses the Kalman filter to predict the vehicle's position at the next moment and optimize the signal light duration based on its driving speed.
[0201] Real-time traffic flow prediction:
[0202] The LSTM model predicts traffic flow in the next 15 minutes based on the night traffic data of the past hour. Since the traffic flow is smaller at night, the system can optimize the green light duration based on the prediction results and reduce idle time.
[0203] Traffic light scheduling based on V2X:
[0204] At night, the system adjusts the duration of traffic lights in real time through V2X to reduce the occurrence of green lights without idle lanes. When a vehicle is detected approaching an intersection, the system dynamically shortens or lengthens the duration of traffic lights to ensure smooth passage.
[0205] Emergency vehicle dispatch priority:
[0206] Even at night, the system monitors the driving conditions of emergency vehicles in real time and adjusts the signal lights as needed to ensure that emergency vehicles can pass through the intersection quickly. Other vehicles are guided to secondary roads through V2X.
[0207] System adaptive learning and optimization:
[0208] The system analyzes nighttime traffic patterns and adjusts signal light strategies based on low-traffic scenarios at night, gradually optimizing nighttime traffic management solutions and reducing energy consumption and unnecessary waiting time.
[0209] By dynamically adjusting the duration of traffic lights, the system reduces vehicle waiting time at night, improves traffic efficiency, and ensures priority passage for emergency vehicles.
[0210] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A transportation scheduling method based on visual recognition, characterized in that: The following steps are involved: Step 1: Install camera equipment at multiple traffic nodes to collect traffic flow image data in real time; Step 2: preprocessing the image data, including image denoising, resolution adjustment and lane area division; Step 3: Detect and classify vehicles in the image data using a deep learning model to identify the location, speed, direction of travel, and type of vehicle; Step 4: Use a multi-target tracking algorithm to track the detected vehicles across frames and generate real-time trajectories for each vehicle; Step 5: Predict future traffic flow based on the long short-term memory network model and generate the traffic flow change trend in the future; Step 6: Based on the traffic prediction results, the V2X communication system interacts with traffic lights and vehicles to adjust the duration of traffic lights in real time; Step 7: Give priority to emergency vehicles, adjust their routes in advance through the V2X system, and control traffic lights in real time.
2. A transportation scheduling method based on visual recognition according to claim 1, characterized in that: The camera device is a camera with high-definition resolution and adjustable angle, which can cover all lanes of the traffic node and has night vision and image enhancement functions in bad weather.
3. The method for transport scheduling based on visual recognition according to claim 1, characterized in that: The image data preprocessing further includes adjusting the resolution of the original image to the image size required for the deep learning model input and calibrating the lane boundaries.
4. The method for transport scheduling based on visual recognition according to claim 1, characterized in that: In the vehicle detection and classification step, a YOLO or SSD model is used for vehicle detection, and the model can identify multiple vehicle types through a trained data set.
5. The method for transport scheduling based on visual recognition according to claim 1, characterized in that: The multi-target tracking algorithm is a SORT algorithm that combines Kalman filtering with the Hungarian algorithm, which can accurately track the movement trajectory of each vehicle in a dense traffic environment.
6. The method for transport scheduling based on visual recognition according to claim 1, characterized in that: The LSTM model combines historical traffic data and real-time image data to predict traffic flow changes in the next 5 to 10 minutes based on traffic trends over a period of time in the past.
7. The method for transport scheduling based on visual recognition according to claim 1, characterized in that: The V2X communication system exchanges real-time data with traffic lights through the vehicle-mounted unit and the roadside unit, and can adjust the duration of traffic lights according to real-time traffic flow information.
8. The method for transport scheduling based on visual recognition according to claim 1, characterized in that: The system gives priority to emergency vehicles by detecting their driving paths, adjusting the traffic lights in the areas they pass through to green in advance, and sending avoidance prompts to surrounding vehicles.
9. The method for transport scheduling based on visual recognition according to claim 1, characterized in that: The traffic light duration adjustment is based on a reinforcement learning algorithm. The system automatically adjusts the traffic light duration by analyzing historical traffic data and real-time feedback results.
10. The method for transport scheduling based on visual recognition according to claim 1, characterized in that: The system has an adaptive learning function and can continuously optimize the LSTM model and traffic light control algorithm based on historical scheduling strategies.
Citation Information
Cited By
Route linkage type traffic signal control method and system based on reinforcement learning
CN119851491A
Self-adaptive scheduling method and device based on fusion model
CN120089005A