Method for monitoring and predicting traffic jam induced by specific sudden aggregation event in real time
Through the combination of real-time monitoring and deep learning models, it solves the problem of insufficient accuracy and real-time performance of traditional traffic congestion prediction technology in emergencies, achieves timely and accurate traffic congestion prediction for specific sudden gathering events, and improves traffic congestion. Real-time and accurate management.
Patent Information
- Application Number
- CN202410681934.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-05-29
AI Technical Summary
Traditional traffic congestion prediction technology has insufficient accuracy and real-time performance when dealing with complex real-time traffic scenarios and emergencies. It is difficult to predict traffic congestion caused by specific sudden gathering events in a timely and accurate manner, and it relies on manual judgment and data lag.
Real-time monitoring is used to obtain historical and real-time data, UAV aerial images and deep learning models are used for high-resolution map data processing and traffic status prediction, and computer vision and sensing technology are combined for real-time data detection, automated traffic congestion prediction, and reduced human effort. intervention.
It achieves timely and accurate prediction of traffic congestion caused by specific sudden gathering events, improves system response speed and availability, avoids the uncertainty of human judgment, and enhances the real-time and accuracy of traffic management.
Smart Images

Figure CN118609356A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of traffic control methods for road vehicles, and in particular to a method for real-time monitoring and prediction of traffic congestion induced by specific sudden gathering events. Background Art
[0002] Traditional traffic congestion prediction technology uses a series of steps to identify potential congestion trends under specific sudden gathering events. First, historical traffic data is used for analysis to explore the changes in regular traffic patterns and data before and after congestion events. Second, statistical models and predefined rules are used to determine possible congestion situations, usually setting some thresholds as trigger conditions, such as a drop in vehicle speed or a traffic volume exceeding a certain level. At the same time, sensor networks are used to detect sudden gathering events, such as accidents or weather changes. Then, rule-based prediction methods rely on these predefined rules and empirical rules to predict possible congestion conditions by comparing real-time data with historical data. However, traditional technologies need to rely on manual intervention, usually requiring the judgment and decision-making of traffic managers. Finally, after predicting possible congestion, information is sent to drivers, traffic management departments, etc. through alarm systems or other notification methods so that timely measures can be taken.
[0003] Although the above traditional methods have certain feasibility, they are relatively simple and mainly based on pre-set rules and empirical rules. They may lack accuracy and real-time performance when dealing with complex real-time traffic scenarios and emergencies. First, the accuracy is insufficient: the prediction accuracy of traffic congestion caused by specific sudden gathering events is not high, and it is difficult to deal with complex real-time traffic scenarios. Because traditional methods mainly rely on historical data and set rules, they may not accurately predict the scale and impact of such emergencies. In fact, such gathering events may cause temporary congestion, and traditional technologies may not be able to predict such changes in a timely and accurate manner because the outbreak of such events is complex and changeable. Second, the real-time performance is poor: for emergencies, traditional methods react slowly and it is difficult to accurately predict future traffic congestion in advance. Due to incomplete data collection and failure to summarize and process in real time, and often relying on manual judgment, traditional technologies may not be able to perceive and predict the occurrence of this emergency in a timely manner. Even when congestion occurs, due to the lag and insufficiency of data, traditional technologies are difficult to provide accurate predictions within the time required by real-time performance. Therefore, the poor real-time performance further highlights the limitations of insufficient data collection, untimely processing and human subjective judgment, making traditional technologies more challenging in dealing with traffic congestion caused by emergencies. Summary of the invention
[0004] The present invention aims to provide a method for real-time monitoring and predicting traffic congestion induced by specific sudden gathering events, so as to solve the problem of insufficient accuracy and poor real-time performance of traditional methods in predicting traffic congestion induced by specific sudden gathering events.
[0005] The method for real-time monitoring and predicting traffic congestion caused by a specific sudden gathering event in this scheme includes the following steps:
[0006] S10, obtaining historical traffic data, data when specific events occur, and real-time monitoring data, including the traffic volume, speed, queue length, vehicle type, total traffic volume in a specific time period, and passenger flow in each lane;
[0007] S20, based on public roads, uses drone aerial images to collect high-resolution map data, and uses geographic information system tools to process the collected map data, including the extraction and modeling of road networks, terrain, buildings and other information, and uses virtual environments to build abstract and parameterized real scenes;
[0008] S30, inputting the real-time monitoring data into the trained deep learning model, updating the prediction results in real time, and providing real-time traffic congestion prediction information;
[0009] S40, sending the real-time traffic congestion prediction to the management end for display.
[0010] The beneficial effects of this program are:
[0011] Real-time data capture ensures that the system's perception of events is timely and comprehensive, and that it can promptly predict traffic congestion caused by specific sudden gathering events on the road, and manage traffic congestion through timely display; traffic congestion prediction is completed automatically without relying on human intervention, avoiding the uncertainty of human judgment; data processing gives prediction results in real time, improving the system's response speed and availability.
[0012] Further, in S10, the real-time monitoring data is sent to the edge device by collecting the real-time picture through the camera, and the edge device is responsible for real-time processing of the sensor data of the real-time picture, performing target detection according to computer vision and sensing technology, and obtaining the real-time monitoring data;
[0013] When detecting traffic flow, a rectangular area is divided in front and behind each lane with the stop line as the dividing point. When the target passes through these two areas, the counter is incremented by 1, and the number of vehicles passing through per unit time is regarded as the traffic flow of the lane.
[0014] When detecting vehicle speed, the vehicle speed is calculated by the position information and time difference of the target in the two frames before and after.
[0015] When detecting queue length, the queue length of each lane on the real-time screen is identified and calculated, and the distance from the rear of the last vehicle identified in each lane to the stop line is the queue length;
[0016] When detecting vehicle categories, the vehicle categories are classified into non-motor vehicles, small-class vehicles, cars, buses, and trucks according to the fine-grained vehicle classification. The vehicle speed is determined according to the vehicle category, and the congestion level of the vehicle category is determined according to the vehicle speed.
[0017] When detecting the total amount of traffic flow, a specific time is divided into multiple time periods, and the total number of vehicles passing through each time period is counted in real time as the total amount of traffic flow;
[0018] When monitoring pedestrian flow, the pedestrian flow on the sidewalk is monitored in real time, the pedestrian flow data is integrated with the lane-level traffic data, the correlation between pedestrian flow and vehicle flow in different time periods and areas is analyzed, a corresponding relationship model between pedestrian flow and vehicle flow is established, the lane's transport capacity is evaluated, and timely adjustments and optimizations are made.
[0019] The beneficial effect is that by detecting multiple real-time monitoring data on the real-time screen in different methods, the real-time monitoring data can be acquired in real time and accurately.
[0020] Furthermore, in S10, the difference between the total volume of vehicle flow in the two set time periods before and after the transfer point of two adjacent specific time periods is compared. If the difference between the total volume of vehicles in the two set time periods is within a set range, the specific time after will be shifted to the specific time before according to the set time period.
[0021] The beneficial effect is: because in some specific sudden gathering events, some people will consider the congestion after the completion of the specific sudden gathering event, and then arrange to leave or return in advance, which will eventually lead to a random increase in traffic flow in advance, and the situation during a peak gathering period will be divided into two specific times, causing errors in traffic flow judgment. Therefore, by comparing the difference in the total traffic volume of the set duration at two adjacent specific times, and then dynamically adjusting the specific time, the probability of the same gathering peak being at the same specific time is increased, making the detection and judgment of the total traffic volume more accurate.
[0022] Further, in S20, a plurality of pictures are taken at a fixed point by a drone, and the pictures are synthesized to show a panoramic view of the intersection, the flight altitude is set to 100m, and one picture is taken in each direction of the intersection;
[0023] When registering the aerial image with the geographic coordinate system, the sample control points collected in advance are used to perform a registration algorithm with the pictures taken by the drone, and the sample control points are registered using the affine transformation formula;
[0024] Suppose the coordinates of a point on the original image are (x, y), and the new coordinates after affine transformation are (x', y'). The affine transformation can be expressed in the following matrix form:
[0025]
[0026] Among them, (a, b) and (c, d) are the coefficients of the linear transformation that control the scaling, rotation and shearing transformation of the image; (e, f) are the translation vectors that control the translation of the image;
[0027] Image segmentation algorithms and feature extraction techniques are used to identify buildings and extract building boundaries. Based on the line features of the road and the shape, color and other features of the lane markings, image processing and pattern recognition algorithms are used to extract the road network and identify lane markings, and a map is built to obtain a virtualized and parameterized real scene.
[0028] The beneficial effect is that the virtualization and parameterization establishment method of the real scene can truly reflect the actual situation, so as to facilitate accurate analysis and prediction in the background.
[0029] Furthermore, in S20, icons are used in the virtual scene to replace real traffic signs and markings, and a real-time motion model is introduced to simulate dynamic changes in real traffic scenes;
[0030] Combining camera calibration and map modeling, images in the virtual environment are generated in real time to simulate real traffic scenarios, including vehicles driving on the road, pedestrians walking, and traffic flow at intersections.
[0031] The beneficial effects are: reducing the complexity of the virtual scene, making the virtual scene more visual and understandable, and ensuring that the virtual scene can truly reflect the traffic conditions of different roads and intersections.
[0032] Furthermore, in S20, the camera in the real scene is calibrated, and the landmark points with obvious features in the captured image are selected to obtain the pixel coordinates in the captured image and the world coordinates in the real scene. A mapping relationship between the captured image and the real scene is established through multiple groups of such points. The mapping formula is:
[0033]
[0034] Among them, R is the rotation matrix, T is the translation vector, (X, Y, Z) is the spatial point coordinates in the camera coordinate system, and (x, y, z) is the world coordinates.
[0035] The beneficial effect is that by describing the transformation relationship from the camera coordinate system to the world coordinate system, the captured image can be accurately matched to the actual coordinates.
[0036] Furthermore, in S30, the deep learning model is adjusted using a machine learning algorithm and a neural network to simulate the ever-changing traffic conditions, including a target recognition model that captures traffic information at each intersection in real time and a decision model that makes predictions based on the traffic information;
[0037] The YOLOv5 model is used as the target recognition model. Through the collection, annotation and training of specific scene pictures, the target recognition model integrates real-time monitoring data and divides the current traffic conditions into five states: smooth, slightly congested, moderately congested, severely congested, and extremely congested, for use by the decision-making model;
[0038] The decision model obtains state information from the target recognition model, and takes a continuous data segment at a time interval of 10 seconds, each data segment is 1 hour long, and pre-processes the obtained data;
[0039] The historical data is normalized into the format required by the deep learning model, the Transformer model is used as the prediction model, the preprocessed data is used as the input sequence, and training is performed to predict the traffic status for the next 60 time steps.
[0040] Furthermore, in S30, the Transformer model processes the time information of the traffic state through position coding to capture the change of the traffic state. The position coding represents the position coding of each position in the sequence through sine and cosine functions, which is expressed as:
[0041]
[0042]
[0043] Where pos is the position, i is the index of the dimension, and d model is the dimension of the model;
[0044] The feedforward neural network in the Transformer model performs nonlinear transformations on the positional encodings to capture complex patterns and relationships in the data. The calculation formula of the feedforward neural network is:
[0045] FFN(x)=ReLU(xW 1 +b 1 )W 2 +b 2 :
[0046] Among them, W 1 and W 2 is the parameter matrix of learning, b 1 and b 21 is the bias vector and ReLU is the activation function.
[0047] The beneficial effects are: through position encoding, the changes in traffic status at different time points can be accurately captured, and position encoding allows the model to consider time information when processing sequence data, which helps the model better understand the time sequence relationship of historical data and make accurate predictions.
[0048] Furthermore, in S10, the corresponding relationship model between the pedestrian flow and the vehicle flow adopts a three-section polynomial regression model, and the specific formula is:
[0049] y=β 0 +β 1 x+β 2 x 2 +β 3 x 3 +ε;
[0050] Among them, y is the traffic flow, x is the pedestrian flow, β 0 , β 1 , β 2 , β 3 are the coefficients of the model and ε is the error term.
[0051] The beneficial effect is that through model limitation, the corresponding situation of vehicle flow and pedestrian flow can be accurately reflected. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A flowchart of an embodiment of a method for real-time monitoring and prediction of traffic congestion caused by a specific sudden gathering event according to the present invention;
[0053] Figure 2 A system architecture diagram of an embodiment of a method for real-time monitoring and prediction of traffic congestion induced by a specific sudden gathering event according to the present invention;
[0054] Figure 3 This is a Transformer network structure diagram in an embodiment of the method for real-time monitoring and prediction of traffic congestion induced by specific sudden gathering events of the present invention. DETAILED DESCRIPTION
[0055] The following is further explained in detail through specific implementation methods.
[0056] Embodiment 1
[0057] Real-time monitoring and prediction of traffic congestion caused by specific sudden gathering events, such as Figure 1 and Figure 2 As shown, the following steps are included:
[0058] S10, obtaining historical traffic data, data when specific events occur, and real-time monitoring data, including the traffic volume, speed, queue length, vehicle type, total traffic volume in a specific time period, and passenger flow in each lane.
[0059] Real-time monitoring data is collected by the camera and sent to the edge device. The camera is installed at the lane. The edge device is an existing device installed at the lane. The edge device is responsible for real-time processing of sensor data of the real-time image, performing target detection based on computer vision and sensing technology to obtain real-time monitoring data.
[0060] Traffic flow is the total number of vehicles passing through per unit time. Traffic flow data is subdivided into different lanes to provide more detailed traffic information; using real-time data, a dynamic curve of traffic flow is generated to help traffic management personnel understand the changing trend of intersections more intuitively. When detecting traffic flow, lane-level data collection is achieved through various cameras. In each lane, the stop line is used as the dividing point, and a rectangular area is divided before and after each lane. After the target passes through these two areas, the counter is incremented by 1, and the number of vehicles passing through per unit time is used as the traffic flow of the lane. Monitor the traffic flow at a specific intersection in real time to capture any sudden changes, especially the influx of vehicles that may occur at the end of a special event.
[0061] The speed is the speed of the vehicle. The vehicle trajectory data is used to generate a speed distribution map to help identify possible congestion or fast-moving areas; combined with historical speed data, trend analysis is performed to predict possible future traffic conditions. When detecting the speed of the vehicle, the speed of the vehicle is calculated based on the position information and time difference of the target in the previous and next frames of the picture. Focus on the speed of specific intersections and identify potential congestion in advance by monitoring the speed changes in real time.
[0062] In another embodiment, cameras are used to monitor the jamming situation on different lanes to predict potential traffic congestion. A high-definition camera monitoring system is used to monitor the vehicle driving situation in each lane in real time, and automatically identify and record jamming behavior. The edge device processes data and analyzes the number of jams on major roads and intersections within a specific time period and 500 meters around the activity location. The specific time period is 2 hours before and after the start and end of the activity. These data can help determine the frequency and distribution of jams in different lanes. Correction to increase or decrease the degree of congestion: Increase the degree of congestion: If it is found that the number of jams in a lane exceeds the set value within the set time length, it is predicted that the congestion level of the lane will increase. Set the time length and the set value; Reduce the degree of congestion: Within the set time length, if the number of jams is less than half of the set value, it is predicted that the congestion expectation for the lane will be reduced.
[0063] The behavior of jamming may cause a congestion propagation effect, that is, the congestion in one lane will gradually spread to the adjacent lane. For example, when the congestion in the left-turn lane reaches a certain level, it will affect the speed of the through lane, causing the vehicles in the through lane to stagnate and increase the congestion level of the through lane. By analyzing the jamming situation in different lanes, the speed and congestion situation can be evaluated more accurately. If it is found that the jamming phenomenon in a certain lane is obvious, the speed prediction of the vehicle in that lane can be adjusted in time to correct the deviation caused by the speed judgment. This helps to improve the accuracy of congestion prediction and take traffic control measures to alleviate congestion more promptly. By analyzing the jamming situation in different lanes, traffic congestion can be predicted more accurately and the deviation caused by the speed judgment can be corrected in time.
[0064] The queue length is the length from the stop line to the rear of the last vehicle. Real-time monitoring of vehicle queues provides timely data support for intersection signal optimization. When detecting the queue length, the camera collects data images to identify and calculate the queue length of each lane, and the distance from the rear of the last vehicle identified in each lane to the stop line of the traffic light at the intersection is the queue length; when the gap between the front and rear vehicles in the lane is greater than 10 meters, the distance from the vehicle to the stop line is taken as the queue length, and the queue distance of the rear vehicle is discarded; the queue length of each lane on the real-time screen can also be identified and calculated, and the distance from the rear of the last vehicle identified in each lane to the stop line is taken as the queue length.
[0065] When detecting vehicle types, vehicles are classified into non-motor vehicles, small vehicles, cars, buses and trucks according to fine-grained vehicle classification. Small vehicles include bicycles, motorcycles and tricycles. The vehicle speed is determined according to the vehicle type, and the congestion level of the vehicle type is determined according to the vehicle speed:
[0066] High-level congestion: For slow-moving vehicles, such as large trucks and buses, high-density conditions can easily lead to high-level congestion. This is because they travel at a slow speed, so even at a low density, they may cause other vehicles to slow down, thus forming a high-level congestion. When these vehicles travel in narrow areas such as intersections, ramps, and turns, they are likely to cause traffic congestion, which has a significant impact on the overall traffic flow.
[0067] Medium-level congestion: For vehicles with faster speeds, such as small cars, medium-level congestion may occur in high-density situations. Although they travel at a faster speed, medium-level local congestion may still occur when the density is too high. When small vehicles are concentrated in certain bottleneck sections or high-traffic areas, traffic congestion may occur due to the need to maintain a distance between vehicles, but the degree of congestion is relatively light.
[0068] Low-level congestion: Under low-density conditions, most types of vehicles may not cause serious congestion, but low-level congestion may still occur in certain specific situations. For example, when small vehicles are driving on highways, low-level congestion may occur when the density is low but the speed is high. This congestion may be temporary, such as temporary congestion caused by traffic accidents, temporary construction, road closures, etc., and generally will not have a long-term impact on the overall traffic flow.
[0069] By classifying congestion into different levels, the contribution of different types of vehicles to traffic congestion can be assessed more accurately, which can improve the prediction accuracy of the model.
[0070] The total traffic volume is the total number of vehicles passing through a specific time. The specific time is set according to actual needs, for example, 12 hours. When detecting the total traffic volume, the specific time is divided into multiple time periods, and the total number of vehicles passing through each time period is counted in real time as the total traffic volume, so as to understand the changing trend of traffic flow in more detail. Combined with historical data, the trend of the total number of vehicles is analyzed, and the real-time distribution of the total number of vehicles is visualized using heat maps, which can intuitively understand the traffic density in different areas. Changes in multiple dimensions such as time, vehicle type, and location can provide a deeper and more comprehensive understanding of the characteristics and laws of traffic flow. At the same time, at specific intersections, such as the entrance and exit of exhibition halls, the statistics of the total number of vehicles have a great impact on traffic changes caused by specific sudden gathering events. Usually, a large number of vehicles will emerge in just a dozen minutes after the end of an exhibition or a performance. Using historical data and real-time monitoring information, the scale and time of traffic that may be caused by a specific intersection at the end of a performance or exhibition can be predicted, providing strong support for traffic management. Analyze the historical data of specific intersections, pay special attention to the changes in traffic volume related to special events such as performances and exhibitions, and provide experience references for the prediction of similar events in the future.
[0071] When monitoring pedestrian flow, the pedestrian flow on the sidewalk is monitored in real time, and the pedestrian flow data is integrated with the lane-level traffic data to analyze the correlation between pedestrian flow and vehicle flow in different time periods and different areas, and establish a corresponding relationship model between pedestrian flow and vehicle flow. The model adopts a three-section polynomial regression model, and the specific formula is as follows:
[0072] y=β 0 +β 1 x+β 2 x 2 +β 3 x 3 +ε;
[0073] Among them, y is the traffic flow, x is the pedestrian flow, β 0 , β 1 , β 2 , β 3is the coefficient of the model, and ε is the error term. Evaluate the transport capacity of the lane and make timely adjustments and optimizations. For changes in pedestrian flow caused by specific events, such as holding events, market fairs, etc., historical data analysis and model prediction can be used to pre-evaluate the occupancy of sidewalks and roadways and the impact of events on pedestrian evacuation. According to the prediction results, corresponding traffic control measures can be taken in advance, such as adjusting lane allocation, adding temporary traffic signs, setting up temporary pedestrian passages, etc., to ensure the smooth operation of the traffic system and the safe evacuation of people. In addition, for the correction of pedestrian and vehicle flow, data mining and machine learning technologies in intelligent traffic management systems can be used to train and optimize the model. Through deep learning and pattern recognition of historical data, the potential laws and correlations between pedestrian and vehicle flows can be discovered, thereby improving the model's adaptability to complex traffic environments and achieving more accurate prediction and correction of pedestrian and vehicle flows. In summary, through comprehensive analysis of pedestrian and vehicle flows and model optimization, the ability to predict traffic congestion caused by specific gathering events, the operating efficiency and safety of the transportation system can be more effectively improved.
[0074] Edge devices use the efficient communication protocol MQTT to transmit processed data to the central processor in real time. With edge computing technology, part of the data processing can be performed on the edge device, reducing the large amount of data transmission to the central processor and improving the real-time performance of the system.
[0075] The central processor is responsible for aggregating data from various edge devices and performing further integration and cleansing. A distributed system architecture is applied to ensure high availability and processing capacity, while real-time stream processing technology is used for data processing.
[0076] S20, based on public roads, uses drone aerial images to collect high-resolution map data, and uses geographic information system (GIS) tools to process the collected map data, including the extraction and modeling of road networks, terrain, buildings and other information, and uses virtual environments to build abstract and parameterized real scenes to ensure the accuracy and precision of the map, so that real traffic scenes can be accurately simulated in the virtual environment. Specifically:
[0077] Use a drone to take multiple pictures at a fixed point, and then synthesize the pictures to show the panoramic view of the intersection. The altitude is set to 100m, and one picture is taken in each direction of the intersection;
[0078] When registering the aerial image with the geographic coordinate system, in order to improve the accuracy of the map, the sample control points collected in advance are used to perform a registration algorithm with the pictures taken by the drone, and the sample control points are registered using the affine transformation formula. The sample control points collected in advance are collected using the existing method, which will not be repeated here;
[0079] Suppose the coordinates of a point on the original image are (x, y), and the new coordinates after affine transformation are (x', y'). The affine transformation can be expressed in the following matrix form:
[0080]
[0081] Among them, (a, b) and (c, d) are the coefficients of the linear transformation that control the scaling, rotation and shearing transformation of the image; (e, f) are the translation vectors that control the translation of the image;
[0082] Image segmentation algorithm and feature extraction technology are used to identify buildings and extract building boundaries. Image segmentation algorithm and feature extraction technology are existing and will not be repeated here. According to the line characteristics of the road and the shape, color and other features of the lane markings, image processing and pattern recognition algorithms are used to extract the road network and identify the lane markings, and a map is established to obtain a virtualized and parameterized real scene.
[0083] Icons are used in virtual scenes to replace real traffic signs and markings, and real-time motion models are introduced to simulate dynamic changes in real traffic scenes. Different types of signs, such as pedestrians, small vehicles, cars, buses and trucks, are expressed in the form of icons to make virtual scenes more visual and understandable. Combined with camera calibration and map modeling, images in virtual environments are generated in real time to simulate real traffic scenes, including vehicles driving on the road, pedestrians walking, and traffic flow at intersections, ensuring that virtual scenes can truly reflect the traffic conditions of different roads and intersections.
[0084] Calibrate the camera in the real scene, select the landmark points with obvious features in the captured image, obtain the pixel coordinates in the captured image and the world coordinates in the real scene, and establish the mapping relationship between the captured image and the real scene through multiple groups of such points. The mapping formula is:
[0085]
[0086] Among them, R is the rotation matrix, T is the translation vector, (X, Y, Z) is the spatial point coordinates in the camera coordinate system, and (x, y, z) is the world coordinates.
[0087] S30, inputs real-time monitoring data into the trained deep learning model, updates the prediction results in real time, and provides real-time traffic congestion prediction information. It uses machine learning algorithms and neural networks to adjust the deep learning model to simulate the ever-changing traffic conditions, including a target recognition model that captures traffic information at each intersection in real time and a decision model that makes predictions based on traffic information. The target recognition model and the decision model are effectively integrated so that they can work together to improve the system's integrated performance in real-time traffic monitoring and decision-making.
[0088] The YOLOv5 model is used as the target recognition model. The YOLO model is a deep learning model for real-time target recognition and positioning. Its unique design enables it to recognize multiple targets in an image at one time and locate their bounding boxes. The target recognition model has good generalization performance through the collection, annotation and training of specific scene pictures, and then a large number of optimizations of existing methods, and can adapt to various specific traffic scenes in this patent. The target recognition model integrates real-time monitoring data and divides the current traffic conditions into 5 states: unobstructed, slightly congested, moderately congested, severely congested, and super congested, for use in the decision-making model.
[0089] The decision model obtains state information from the target recognition model and takes a continuous data segment at 10s intervals. The length of each data segment is 1h, that is, each data segment contains 360 ordered state values. The obtained data is preprocessed. When there is noise and missing values in the data, the data is smoothed and the sliding average is used to reduce the impact of noise on the model. For missing values, interpolation is used to ensure the integrity and continuity of the data.
[0090] like Figure 3 As shown in the figure, the historical data is normalized into the format required by the deep learning model, the Transformer model is used as the prediction model, and the preprocessed data is used as the input sequence to train the model to predict the traffic status of the next 60 time steps. Transformer is a model suitable for sequence-to-sequence, which can effectively capture the long-range dependencies in the sequence. The Transformer model is trained using historical data, with the goal of minimizing the error between the predicted sequence and the true sequence. Indicators such as mean square error (MSE) are used to measure the accuracy of the prediction.
[0091] Traffic status data is time-series. By taking the historical traffic status data sequence as input, the Transformer model can learn the dependencies between sequence data and predict future traffic status. The self-attention mechanism of the Transformer model allows the model to pay attention to the entire historical sequence at each time step, which can better capture the long-term dependencies in the sequence, thereby improving the accuracy of the prediction. In the self-attention mechanism, given an input sequence X = {x 1 , x 2 , …, x n}, the attention weight is calculated by the following formula:
[0092]
[0093] Where Q = XWQ , K = XW K 、V=XW V are the query Q, key K, value V, and W obtained by linear transformation of the input sequence X. V is the learned parameter matrix, d k is the dimension of the key.
[0094] The Transformer model processes the temporal information of traffic status through position encoding, captures changes in traffic status, and thus accurately captures changes in traffic status at different time points. Position encoding allows the model to consider temporal information when processing sequence data, which helps the model better understand the temporal order relationship of historical data and make accurate predictions. The position encoding represents the position encoding of each position in the sequence through sine and cosine functions, expressed as:
[0095]
[0096]
[0097] Where pos is the position, i is the index of the dimension, and d model is the dimension of the model.
[0098] The feedforward neural network in the Transformer model performs nonlinear transformations on the positional encoding to capture complex patterns and relationships in the data. In the Transformer model, there is a residual connection between each sublayer output and its input. Residual connections allow information to be passed directly in the network, which helps alleviate the problem of gradient vanishing or gradient exploding and simplifies the training process. Residual connections also make the network easier to train, allowing layers to be stacked deeper and increasing the representational capabilities of the model. Residual connections and normalization can alleviate the problem of gradient vanishing or gradient exploding during model training and help improve the training stability and performance of the model.
[0099] A feedforward neural network is included at each position, using two fully connected layers and an activation function. The calculation formula of the feedforward neural network is:
[0100] FFN(x)=ReLU(xW 1 +b 1 )W 2 +b 2 ;
[0101] Among them, W 1 and W 2 is the parameter matrix of learning, b 1 and b 21 is the bias vector and ReLU is the activation function.
[0102] Use a portion of historical data as a validation set, use cross-validation techniques to evaluate the generalization ability of the deep learning model, and evaluate the performance of the model on the validation set. Tune the model based on the results of the validation set. Tuning is to adjust the model's hyperparameters, learning rate, etc., which is the t tuning process. You may need to adjust the model's hyperparameters, learning rate, etc. Iterate the training and tuning process until the model performs satisfactorily on the validation set. Deploy the trained Transformer model to the actual traffic system for real-time traffic status prediction. In actual use, update the model regularly to adapt to changes in traffic conditions and new data.
[0103] S40, sends the real-time traffic congestion forecast to the management end for display. The management end can be a terminal such as a tablet or mobile phone of a traffic control staff. The display of traffic congestion forecast is carried out through intuitive charts, maps and other elements, which can comprehensively display multi-dimensional traffic information, including key indicators such as vehicle flow, vehicle speed, and queue length, so as to provide traffic management personnel with prediction results and better deal with traffic congestion caused by specific sudden gathering events. Real-time dynamic monitoring of specific sudden gathering time, and real-time display of traffic conditions in a dynamic update method to ensure the timeliness of information, so that traffic management personnel can quickly capture the changing trend of traffic flow. Different traffic states are indicated by color coding, green for smooth flow, yellow for slow flow, and red for congestion, which helps to quickly identify problem areas.
[0104] Compared with the prior art, the solution of this embodiment uses real-time monitoring by each camera, uses local edge devices to process data, and finally predicts by the central processor, ensuring that the system can respond quickly and make accurate traffic condition predictions, and can promptly discover traffic congestion problems caused by specific sudden gathering events such as concerts and exhibitions, so as to carry out traffic control in advance before the corresponding congestion problem occurs, improve the effectiveness of traffic management, and prevent traffic congestion from being too serious to be cleared. The real-time monitoring and prediction module can more comprehensively consider key factors in data collection, processing, transmission, prediction, etc. to improve the real-time, accuracy and reliability of the system.
[0105] Embodiment 2
[0106] The method for real-time monitoring and predicting traffic congestion induced by specific sudden gathering events is different from the first embodiment in that, in S10, the difference between the total volume of vehicle flow within two set time periods before and after the transfer point of two adjacent specific time periods is compared, and the set time period is less than or equal to the specific time period, for example, the set time period is two-thirds of the length of the specific time period. If the difference in the total volume of vehicles within the two set time periods is within the set range, the specific time after is shifted to the specific time before according to the set time period.
[0107] Since the leaders of a specific sudden gathering event are people or cars, and the leaders of cars are also people, due to the influence of people's subjective thinking, they will anticipate various congestion problems after the end of the specific sudden gathering event. Therefore, some leaders will take the initiative to leave the corresponding area in advance before the end of the specific sudden gathering event, thereby causing some time periods before the end of the specific sudden gathering event to enter congestion in advance, and the division of specific time periods may divide the data that enters congestion in advance into two time periods, making the data look less congested. Therefore, this embodiment 2 compares the difference between the total amount of vehicle flow at the set time length at two adjacent specific times, and then dynamically adjusts the specific time, thereby increasing the probability that the same gathering peak is located at the same specific time, making the detection and judgment of the total amount of vehicle flow more accurate.
[0108] Embodiment 3
[0109] The method for real-time monitoring and prediction of traffic congestion induced by specific sudden gathering events is different from the first embodiment in that, in the S40, the congestion prediction information also includes the rising stage of human flow, the rising stage of vehicle flow, and the rising stage of human and vehicle flow. When the congestion prediction information is the rising stage of human flow and vehicle flow, no correction is made to the fetched data. When the congestion prediction information is the rising stage of human flow or the rising stage of vehicle flow, the background server obtains the event type of the specific sudden gathering event at the location of the congestion prediction information, and obtains it from the pre-registered large-scale gathering event information. The event type includes exhibition types, actor concerts, and various types of concentrated meetings.
[0110] The backend server counts the age distribution of the crowd in a specific sudden gathering event according to the event type. The age distribution of the crowd is obtained from the advance ticket purchase, registration and other information of participating in the specific sudden gathering event. If there is no advance ticket purchase, registration and other information, the age distribution of the crowd is estimated based on the type of event and the specific exhibition time. For example, if the exhibition type is a housing fair and the exhibition time is the weekend, and there is no ticket purchase and registration information, then the estimated participants of the housing fair are 60% young and middle-aged and 40% elderly people. If the exhibition type is furniture and the exhibition time is weekdays, then the estimated participants of the furniture fair are 75% elderly people and 25% young and middle-aged.
[0111] After obtaining the age distribution of the crowd, the background server obtains the distribution of venue exits at the location of the specific sudden gathering event, and obtains the transportation conditions in the direction of each venue exit, and estimates the flow trend and flow speed of the crowd based on the transportation conditions and the age distribution of the crowd. For example, when the transportation is the subway, the flow trend of the elderly is estimated to be in the direction of the transportation, and the flow speed is slower. When the transportation is a taxi or an online car-hailing car, the flow trend of young and middle-aged people is in this direction, and the flow speed is relatively faster. Real-time correction information of the acquired data is fed back to S10 according to the flow trend and flow speed, such as correction information of increasing the frequency of sending data acquired when the flow trend and flow speed are slow.
[0112] Since there are great differences in the participants of different specific sudden gathering events, and there are certain differences in the activity speed, transportation bias and other information of different participants, if a fixed data acquisition frequency is used, the acquisition of data changes or changes in different situations will not be timely. In this embodiment three, when it is judged that the congestion prediction information is an increase in the flow of vehicles or people, further relevant information and types of specific sudden gathering events are obtained, and the age of the participants is classified. Further, combined with the exit distribution of the venue and the transportation conditions in the exit direction, the flow trend and flow speed of participants of different age groups are estimated. Finally, the data acquisition frequency of different locations is corrected to obtain data at different locations in a targeted and timely manner, and ensure that the corresponding congestion situation can be analyzed in time, so that the analysis of the congestion situation is more accurate and timely.
[0113] The above is only an embodiment of the present invention, and the common knowledge such as the known specific structure and characteristics in the scheme is not described in detail here. It should be pointed out that for those skilled in the art, several deformations and improvements can be made without departing from the structure of the present invention, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.
Claims
1. A method for real-time monitoring and prediction of traffic congestion caused by a specific sudden gathering event, characterized in that: The following steps are involved: S10, obtaining historical traffic data, data when specific events occur, and real-time monitoring data, including the traffic volume, speed, queue length, vehicle type, total traffic volume in a specific time period, and passenger flow in each lane; S20, based on public roads, uses drone aerial images to collect high-resolution map data, and uses geographic information system tools to process the collected map data, including the extraction and modeling of road networks, terrain, buildings and other information, and uses virtual environments to build abstract and parameterized real scenes; S30, inputting the real-time monitoring data into the trained deep learning model, updating the prediction results in real time, and providing real-time traffic congestion prediction information; S40, sending the real-time traffic congestion prediction to the management end for display.
2. The method of real-time monitoring and predicting traffic congestion caused by a specific sudden gathering event according to claim 1, characterized in that: In S10, the real-time monitoring data is sent to the edge device through the real-time picture collected by the camera, and the edge device is responsible for real-time processing of the sensor data of the real-time picture, performing target detection according to computer vision and sensing technology, and obtaining the real-time monitoring data; When detecting traffic flow, a rectangular area is divided in front and behind each lane with the stop line as the dividing point. When the target passes through these two areas, the counter is incremented by 1, and the number of vehicles passing through per unit time is regarded as the traffic flow of the lane. When detecting vehicle speed, the vehicle speed is calculated by the position information and time difference of the target in the two frames before and after. When detecting queue length, the queue length of each lane on the real-time screen is identified and calculated, and the distance from the rear of the last vehicle identified in each lane to the stop line is the queue length; When detecting vehicle categories, the vehicle categories are classified into non-motor vehicles, small-class vehicles, cars, buses, and trucks according to the fine-grained vehicle classification. The vehicle speed is determined according to the vehicle category, and the congestion level of the vehicle category is determined according to the vehicle speed. When detecting the total amount of traffic flow, a specific time is divided into multiple time periods, and the total number of vehicles passing through each time period is counted in real time as the total amount of traffic flow; When monitoring pedestrian flow, the pedestrian flow on the sidewalk is monitored in real time, the pedestrian flow data is integrated with the lane-level traffic data, the correlation between pedestrian flow and vehicle flow in different time periods and areas is analyzed, a corresponding relationship model between pedestrian flow and vehicle flow is established, the lane's transport capacity is evaluated, and timely adjustments and optimizations are made.
3. The method for real-time monitoring and predicting traffic congestion caused by a specific sudden gathering event according to claim 2, characterized in that: In S10, the difference between the total volume of vehicle flow in the two set time periods before and after the transfer point of two adjacent specific time periods is compared. If the difference between the total volume of vehicles in the two set time periods is within the set range, the specific time after is shifted to the specific time before according to the set time period.
4. The method of real-time monitoring and predicting traffic congestion caused by a specific sudden gathering event according to claim 1, characterized in that: In the S20, a drone is used to take multiple pictures at a fixed point, and the pictures are synthesized to show a panoramic view of the intersection. The altitude is set to 100m, and one picture is taken in each direction of the intersection; When registering the aerial image with the geographic coordinate system, the sample control points collected in advance are used to perform a registration algorithm with the pictures taken by the drone, and the sample control points are registered using the affine transformation formula; Suppose the coordinates of a point on the original image are (x, y), and the new coordinates after affine transformation are (x', y'). The affine transformation can be expressed in the following matrix form: Among them, (a, b) and (c, d) are the coefficients of the linear transformation that control the scaling, rotation and shearing transformation of the image; (e, f) are the translation vectors that control the translation of the image; Image segmentation algorithms and feature extraction techniques are used to identify buildings and extract building boundaries. Based on the line features of the road and the shape, color and other features of the lane markings, image processing and pattern recognition algorithms are used to extract the road network and identify lane markings, and a map is built to obtain a virtualized and parameterized real scene.
5. The method of real-time monitoring and predicting traffic congestion caused by a specific sudden gathering event according to claim 4, characterized in that: In S20, icons are used in the virtual scene to replace real traffic signs and markings, and a real-time motion model is introduced to simulate dynamic changes in real traffic scenes; Combining camera calibration and map modeling, images in the virtual environment are generated in real time to simulate real traffic scenarios, including vehicles driving on the road, pedestrians walking, and traffic flow at intersections.
6. The method of real-time monitoring and predicting traffic congestion caused by a specific sudden gathering event according to claim 5, characterized in that: In S20, the camera in the real scene is calibrated, and the landmark points with obvious features in the captured image are selected to obtain the pixel coordinates in the captured image and the world coordinates in the real scene. A mapping relationship between the captured image and the real scene is established through multiple groups of such points. The mapping formula is: Among them, R is the rotation matrix, T is the translation vector, (X, Y, Z) is the spatial point coordinates in the camera coordinate system, and (x, y, z) is the world coordinates.
7. The method of real-time monitoring and predicting traffic congestion caused by a specific sudden gathering event according to claim 1, characterized in that: In the S30, the deep learning model is adjusted using a machine learning algorithm and a neural network to simulate the ever-changing traffic conditions, including a target recognition model that captures traffic information at each intersection in real time and a decision model that makes predictions based on the traffic information; The YOLOv5 model is used as the target recognition model. Through the collection, annotation and training of specific scene pictures, the target recognition model integrates real-time monitoring data and divides the current traffic conditions into five states: smooth, slightly congested, moderately congested, severely congested, and extremely congested, for use by the decision-making model; The decision model obtains state information from the target recognition model, and takes a continuous data segment at a time interval of 10 seconds, each data segment is 1 hour long, and pre-processes the obtained data; The historical data is normalized into the format required by the deep learning model, the Transformer model is used as the prediction model, the preprocessed data is used as the input sequence, and training is performed to predict the traffic status for the next 60 time steps.
8. The method for real-time monitoring and predicting traffic congestion caused by a specific sudden gathering event according to claim 7, characterized in that: In S30, the Transformer model processes the time information of the traffic state through position coding to capture the change of the traffic state. The position coding represents the position coding of each position in the sequence through sine and cosine functions, which is expressed as: Where pos is the position, i is the index of the dimension, and d model is the dimension of the model; The feedforward neural network in the Transformer model performs nonlinear transformations on the positional encodings to capture complex patterns and relationships in the data. The calculation formula of the feedforward neural network is: FFN(x)=ReLU(xW1+b1)W2+b2; Among them, W1 and W2 are the learning parameter matrices, b1 and b 21 is the bias vector and ReLU is the activation function.
9. The method of real-time monitoring and predicting traffic congestion caused by a specific sudden gathering event according to claim 2, characterized in that: In S10, the corresponding relationship model between the pedestrian flow and the vehicle flow adopts a three-section polynomial regression model, and the specific formula is: y=β0+β1x+β2x 2 +β3x 3 +e; Among them, y is the traffic flow, x is the pedestrian flow, β0, β1, β2, β3 are the coefficients of the model, and ε is the error term.
Citation Information
Patent Citations
TMIS traffic flow determination method and system based on cloud computing
CN103902838A
Vehicle information collection method and apparatus
CN103914978A
Depth learning-based regional traffic signal lamp control system and method
CN110349407A
Fusion method and system of mobile video and geographic scene and electronic equipment
CN111582022A
Traffic prediction method and system based on elastic learning framework
CN112216101A
Cited By
Road traffic safety intelligent early warning system and method based on artificial intelligence
CN119169824A
Highway road condition positioning method
CN119207083A
Data resource collecting and labeling method based on big data mining
CN119479280A
Smart city crowd dredging system and method based on Internet of Things large model, and medium
CN120564336A
Unmanned vehicle-machine cooperative task dynamic scheduling method for emergencies
CN121882515A
