Deep learning-based traffic flow abnormity intelligent identification and early warning method and system

By processing traffic monitoring video data under lighting and weather conditions, extracting key features and matching them with historical data, the problems of poor robustness and insufficient intelligence in existing technologies are solved. This enables accurate identification and intelligent early warning of traffic flow anomalies, improving the efficiency and safety of traffic management.

CN120976871AInactive Publication Date: 2025-11-18JIANGSU TESHI INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511486423.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-17
Publication Date
2025-11-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing deep learning-based traffic anomaly identification technologies are not robust enough when processing video data under different lighting conditions and complex weather environments. They also suffer from inaccurate feature extraction and a lack of comprehensive analysis of multi-dimensional traffic features, resulting in poor anomaly identification performance. Furthermore, existing early warning systems lack intelligent control strategies and are not targeted or effective enough.

Method used

By acquiring traffic monitoring video data, processing it according to light intensity and weather conditions, generating target video frame sequences, extracting vehicle trajectory, speed and traffic density information, generating traffic state feature data, constructing a traffic feature combination matrix, determining dominant feature parameters, and performing time-series matching with historical data to generate dynamic traffic flow feature sequences, performing classification calculations, determining traffic flow state category information, and generating corresponding traffic control strategies.

Benefits of technology

It improved the quality of video data, ensured stable analysis results in different environments, enhanced system adaptability, enabled accurate capture and analysis of dynamic changes in traffic flow, improved the accuracy and real-time performance of traffic flow anomaly identification, and realized intelligent processing of the entire process from anomaly detection to early warning and control, reducing the probability of traffic accidents and congestion, and improving traffic operation efficiency and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120976871A_ABST
    Figure CN120976871A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of traffic monitoring and management, and particularly discloses a traffic flow abnormity intelligent identification and early warning method and system based on deep learning. According to the method, after traffic monitoring video data is obtained and processed, information such as vehicle tracks is extracted to generate traffic state feature data, a traffic feature combination matrix and dominant feature parameters are determined, a traffic flow dynamic feature sequence is generated, traffic flow states are classified, the traffic abnormal degree is determined, and a corresponding management and control strategy is generated. According to the invention, accurate identification and timely early warning of traffic flow anomalies can be realized, the traffic management efficiency is improved, and the probability of occurrence of traffic accidents is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of traffic monitoring and management, and in particular to a traffic flow anomaly intelligent identification and early warning method and system based on deep learning. BACKGROUND

[0002] With the acceleration of urbanization and the rapid growth of motor vehicle ownership, traffic congestion, traffic accidents and other traffic anomalies are becoming increasingly serious, posing a huge challenge to urban traffic management. Traditional traffic monitoring systems mainly rely on manual observation of video monitoring images to determine traffic status and identify anomalies, which is inefficient and easily affected by subjective factors. In recent years, with the development of artificial intelligence and deep learning technology, intelligent traffic systems based on video analysis have gradually become an important means of traffic management. These systems can automatically analyze traffic monitoring videos, extract vehicle trajectories, speeds and flow densities, and provide data support for traffic status assessment and anomaly early warning.

[0003] Existing deep learning-based traffic anomaly identification techniques have some obvious defects and shortcomings. Existing techniques have poor robustness when processing video data under different lighting conditions and complex weather conditions, which can lead to inaccurate feature extraction and affect the subsequent anomaly identification effect; most existing methods only focus on a single traffic parameter or static feature, lack comprehensive analysis of multi-dimensional traffic features and understanding of dynamic evolution rules, and are difficult to accurately reflect the actual state of traffic flow; existing traffic anomaly early warning systems often use fixed threshold judgment methods, lack intelligent traffic control strategy generation mechanisms, and are not effective in dealing with complex and variable traffic scenarios. SUMMARY

[0004] The embodiments of the present application provide a deep learning-based traffic flow anomaly intelligent identification and early warning method and system, which can at least solve some of the problems in the prior art.

[0005] In a first aspect of the embodiments of the present application, a deep learning-based traffic flow anomaly intelligent identification and early warning method is provided, comprising: Obtaining traffic monitoring video data, processing the traffic monitoring video data according to the light intensity and weather conditions of the traffic scene to generate a target video frame sequence; Extracting vehicle trajectory, speed and flow density information from the target video frame sequence, and generating traffic state feature data based on the vehicle trajectory, speed and flow density information; Determining a traffic feature combination matrix according to the traffic state feature data, determining a dominant feature parameter based on the traffic feature combination matrix, and performing time sequence matching between the dominant feature parameter and historical traffic data to generate a traffic flow dynamic feature sequence; According to the traffic flow dynamic feature sequence and the dominant feature parameter, the traffic flow state is classified and calculated to obtain category information of the traffic flow state; Based on the category information of the traffic flow state, the degree of traffic anomaly is determined, and a corresponding traffic control strategy is generated according to the degree of traffic anomaly; The traffic control strategy is sent to a traffic management system for realizing intelligent early warning of traffic flow anomaly.

[0006] Traffic monitoring video data is acquired, and the traffic monitoring video data is processed according to the light intensity and weather conditions of the traffic scene to generate a target video frame sequence, including: Traffic monitoring video data is acquired, and a multi-dimensional state evaluation matrix is determined according to the light intensity and weather conditions of the traffic scene, and a scene quality score is calculated according to the multi-dimensional state evaluation matrix; Based on the scene quality score, a light compensation factor and a weather influence factor are determined, an image brightness reference value is calculated according to the light compensation factor, and an image contrast reference value is calculated according to the weather influence factor; Based on the image brightness reference value and the image contrast reference value, a video enhancement mapping function is determined, the brightness of the traffic monitoring video data is dynamically compensated according to the brightness compensation parameter in the video enhancement mapping function, and the contrast of the traffic monitoring video data is adaptively adjusted according to the contrast adjustment parameter in the video enhancement mapping function; The traffic monitoring video data after brightness compensation and contrast adjustment is frame extracted to obtain a video frame image, and the video frame image is denoised to generate a target video frame sequence.

[0007] According to the traffic state feature data, a traffic feature combination matrix is determined, a dominant feature parameter is determined based on the traffic feature combination matrix, the dominant feature parameter is time sequence matched with historical traffic data, and a traffic flow dynamic feature sequence is generated, including: The smoothness of the vehicle trajectory data in the traffic state feature data is segmented to obtain a trajectory feature vector, the fluctuation frequency and fluctuation amplitude of the vehicle speed data in the traffic state feature data are time window divided to obtain a speed feature vector, and the spatial distribution density of the vehicle flow density data in the traffic state feature data is spatial region divided to obtain a density feature vector; The trajectory feature vector, the speed feature vector and the density feature vector are combined to obtain a traffic feature combination matrix; Based on the traffic feature combination matrix, a feature correlation degree is calculated, a feature importance sorting function is determined according to the feature correlation degree, and a dominant feature parameter is generated based on the feature importance sorting function; Calculate the time correlation and the space correlation of the dominant feature parameter with historical traffic data to generate a spatio-temporal comprehensive correlation coefficient; According to the spatio-temporal comprehensive correlation coefficient and the feature change rule, weight assignment is performed on the dominant feature parameter to generate a traffic flow dynamic feature sequence.

[0008] Based on the traffic feature combination matrix, a feature correlation degree is calculated, a feature importance ranking function is determined according to the feature correlation degree, and a dominant feature parameter is generated based on the feature importance ranking function, including: The traffic feature combination matrix is divided into different time periods, the feature fluctuation value in different time periods is calculated, and the change rate of adjacent feature data in different time periods is extracted to obtain a change rate sequence; The fluctuation amplitude of the change rate sequence is calculated to generate a feature correlation degree matrix, the feature correlation degree of each feature with other features is calculated according to the feature correlation degree matrix, and a positive correlation strength and a negative correlation strength are obtained; Based on the positive correlation strength, the negative correlation strength, and the feature fluctuation value, a feature mapping relationship is determined, and a feature correlation weight in different time periods is calculated; The feature correlation weight is processed in time sequence, a decay coefficient is set according to the time distance, a feature comprehensive score is calculated according to the decay coefficient and the feature correlation weight; The feature comprehensive score is weighted calculated with the change rate sequence to obtain a feature comprehensive score, the feature vectors in the traffic feature combination matrix are ranked in importance according to the feature comprehensive score, and a dominant feature parameter is determined according to the importance ranking result.

[0009] According to the traffic flow dynamic feature sequence and the dominant feature parameter, the traffic flow state is classified and calculated to obtain category information of the traffic flow state, including: The traffic flow dynamic feature sequence is divided into a high-frequency fluctuation sequence and a low-frequency fluctuation sequence according to the fluctuation frequency, and the dominant feature parameter is divided into a strong correlation feature group and a weak correlation feature group according to the spatial correlation; Based on the high-frequency fluctuation sequence and the low-frequency fluctuation sequence, a fluctuation period feature is calculated, based on the distribution density of the strong correlation feature group and the weak correlation feature group, a spatial distribution feature is calculated, and the fluctuation period feature and the spatial distribution feature are combined to generate a feature distribution vector; Based on the feature distribution vector, a classification optimization function is determined, the classification optimization function calculates a fluctuation coupling degree according to the ratio of the fluctuation amplitude of the high-frequency fluctuation sequence to the low-frequency fluctuation sequence, and calculates a spatial complementarity degree according to the difference between the distribution density of the strong correlation feature group and the weak correlation feature group; determine an adaptive classification interval based on a weighted combination of the fluctuation coupling degree and the spatial complementarity, divide the traffic flow state into different states according to the adaptive classification interval, and obtain category information of the traffic flow state.

[0010] determine a traffic anomaly degree based on the category information of the traffic flow state, and generate a corresponding traffic control strategy according to the traffic anomaly degree, including: calculate a spatiotemporal distribution feature of the traffic flow state according to the category information, calculate a traffic anomaly diffusion rate and a traffic anomaly propagation direction based on the spatiotemporal distribution feature, and combine the traffic anomaly diffusion rate and the traffic anomaly propagation direction to generate a traffic anomaly propagation feature; calculate a traffic anomaly level coefficient according to the traffic anomaly propagation feature, divide the traffic anomaly degree into different anomaly degrees based on the traffic anomaly level coefficient, and obtain a traffic anomaly development trend feature by calculating a conversion relationship between different anomaly degrees; calculate an evolution speed of a traffic anomaly diffusion boundary and a spatial migration distance of a traffic anomaly core area according to the traffic anomaly development trend feature, determine a control area range based on the evolution speed and the spatial migration distance, and determine a control intensity of each control area based on the traffic anomaly level coefficient; calculate a traffic flow transfer amount between adjacent control areas according to the control area range and the control intensity, hierarchically configure control measures based on the traffic flow transfer amount, and generate a traffic control strategy including a control area, a control time period, and a control measure.

[0011] calculate an evolution speed of a traffic anomaly diffusion boundary and a spatial migration distance of a traffic anomaly core area according to the traffic anomaly development trend feature, determine a control area range based on the evolution speed and the spatial migration distance, and determine a control intensity of each control area based on the traffic anomaly level coefficient, including: determine a traffic anomaly event occurrence position according to the traffic anomaly development trend feature, and determine the occurrence position as the traffic anomaly core area; calculate a traffic flow density change rate and a traffic flow speed change rate of the traffic anomaly core area, and determine an evolution speed of a traffic anomaly diffusion boundary according to the traffic flow density change rate and the traffic flow speed change rate; calculate a traffic anomaly influence range based on a position coordinate of the traffic anomaly core area, divide road segments within the traffic anomaly influence range into a plurality of sub-areas, and calculate a traffic flow parameter deviation degree of each sub-area; determine a spatial correlation intensity matrix according to the traffic flow parameter deviation degree, merge each sub-area with a spatial migration distance meeting a preset merging condition based on the spatial correlation intensity matrix, and generate a control area range. According to the traffic anomaly level coefficient, the management and control strength of each management and control area is calculated.

[0012] In a second aspect, the application provides a traffic flow anomaly intelligent identification and early warning system based on deep learning, comprising: A first unit is configured to acquire traffic monitoring video data, process the traffic monitoring video data according to the light intensity and weather conditions of the traffic scene, and generate a target video frame sequence. A second unit is configured to extract vehicle trajectory, speed and density information from the target video frame sequence, generate traffic state feature data based on the vehicle trajectory, speed and density information. A third unit is configured to determine a traffic feature combination matrix according to the traffic state feature data, determine a dominant feature parameter based on the traffic feature combination matrix, and perform time sequence matching between the dominant feature parameter and historical traffic data to generate a traffic flow dynamic feature sequence. A fourth unit is configured to classify and calculate the traffic flow state according to the traffic flow dynamic feature sequence and the dominant feature parameter, and obtain category information of the traffic flow state. A fifth unit is configured to determine the traffic anomaly degree based on the category information of the traffic flow state, and generate a corresponding traffic management strategy according to the traffic anomaly degree. A sixth unit is configured to send the traffic management strategy to a traffic management system to realize intelligent early warning of traffic flow anomalies.

[0013] In a third aspect, the application provides an electronic device, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to execute the method described above.

[0014] In a fourth aspect, the application provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions are executed by a processor to implement the method described above.

[0015] The traffic flow anomaly intelligent identification and early warning method based on deep learning provided by the application improves the quality of video data by processing traffic monitoring video under light and weather conditions, ensures stable analysis effect in different environments, and enhances system adaptability.

[0016] The application extracts key features such as vehicle trajectory, speed and density, and combines time sequence matching between the dominant feature parameter and historical data to realize accurate capture and analysis of dynamic changes of traffic flow, greatly improving the accuracy and real-time performance of traffic flow anomaly identification.

[0017] The application realizes intelligent processing of the whole process from anomaly detection to early warning management and control, automatically generates a targeted traffic control strategy according to the abnormal degree and pushes it to the traffic management system in real time, effectively reduces the probability of traffic accidents and congestion, and improves the overall traffic efficiency and safety. BRIEF DESCRIPTION OF DRAWINGS

[0018] Figure 1 A flowchart of a traffic flow anomaly intelligent recognition and early warning method based on deep learning according to an embodiment of the application.

[0019] Figure 2 A flowchart of determining a dominant feature parameter according to an embodiment of the application. DETAILED DESCRIPTION

[0020] To make the objectives, technical solutions and advantages of embodiments of the application clearer, the technical solutions in the embodiments of the application will be described below in a clear, complete manner with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only a part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the application.

[0021] The technical solutions of the application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in some embodiments.

[0022] Figure 1 A flowchart of a traffic flow anomaly intelligent recognition and early warning method based on deep learning according to an embodiment of the application. As shown in Figure 1 The method comprises the following steps. Traffic monitoring video data is acquired, the traffic monitoring video data is processed according to the light intensity and weather conditions of a traffic scene, and a target video frame sequence is generated; Vehicle trajectory, speed and flow density information are extracted from the target video frame sequence, and traffic state feature data is generated based on the vehicle trajectory, speed and flow density information; A traffic feature combination matrix is determined according to the traffic state feature data, a dominant feature parameter is determined based on the traffic feature combination matrix, the dominant feature parameter is time-series matched with historical traffic data, and a traffic flow dynamic feature sequence is generated; According to the traffic flow dynamic feature sequence and the dominant feature parameter, the traffic flow state is classified and calculated to obtain category information of the traffic flow state; determine a traffic anomaly degree based on the category information of the traffic flow state, and generate a corresponding traffic control strategy according to the traffic anomaly degree; send the traffic control strategy to a traffic management system to realize intelligent early warning of traffic flow anomalies.

[0023] The present application realizes intelligent early warning of traffic flow anomalies by analyzing traffic monitoring video data, processing in combination with light intensity and weather conditions, extracting vehicle trajectory, vehicle speed and traffic density information, and generating traffic state feature data.

[0024] Acquiring traffic monitoring video data is the basis for realizing intelligent early warning of traffic flow anomalies. Traffic monitoring video data is usually obtained from camera devices deployed at road intersections, highways and urban trunk roads and the like. These devices collect image frames at a preset time interval (for example, every 0.1 second) to form continuous video streams. Considering that traffic monitoring cameras at different locations use different resolutions, the original video data collected is standardized to be uniformly converted into a video format with a resolution of 1920x1080 and a frame rate of 30fps, facilitating subsequent processing.

[0025] For the collected traffic monitoring video data, processing is performed according to the light intensity and weather conditions of the traffic scene. Specifically, for the processing of light intensity, a brightness histogram analysis technique is used to calculate the pixel brightness distribution of the video frames to divide the light intensity into five levels: extremely weak light (average brightness value 0-50), weak light (average brightness value 51-100), normal light (average brightness value 101-150), strong light (average brightness value 151-200) and extremely strong light (average brightness value 201-255). For different light levels, corresponding image enhancement algorithms are used. For example, for video frames under extremely weak light and weak light conditions, a contrast enhancement technique is used to improve the visibility of the image; for video frames under strong light and extremely strong light conditions, a highlight suppression technique is used to reduce overexposure.

[0026] For the processing of weather conditions, the weather conditions are divided into five categories: sunny, cloudy, rainy, snowy and foggy by analyzing the texture features and contrast of the video frames. For different weather conditions, corresponding video enhancement techniques are used. For example, for rainy scenes, a raindrop detection and removal algorithm is used to reduce the impact of raindrops on video quality; for foggy scenes, a de-fogging algorithm is used to improve image clarity. Through the above processing, the original traffic monitoring video data is converted into a target video frame sequence suitable for subsequent analysis.

[0027] Extracting vehicle trajectories, speeds, and flow densities from target video frame sequences is a crucial step in intelligent traffic flow anomaly early warning. First, deep learning object detection techniques are used to identify and locate vehicles in video frames. A convolutional neural network model is used, which has been trained on a large number of traffic scene images and can effectively identify different types of vehicles, including small cars, large buses, and trucks, with an accuracy of over 95%. For each identified vehicle, its position coordinates (x, y) and bounding box size (width, height) are recorded.

[0028] For vehicle trajectory extraction, a multi-target tracking algorithm is used to assign a unique ID to each detected vehicle and establish a correspondence between consecutive frames. Specifically, by calculating the similarity of vehicle positions and the similarity of appearance features in adjacent frames, the correspondence of the same vehicle in different frames is determined. For each vehicle, its position coordinate sequence within the last 30 frames (about 1 second) is recorded, forming a vehicle trajectory.

[0029] Vehicle speed calculation is based on the displacement of vehicles in the actual road space and the time interval. First, through camera calibration technology, a mapping relationship between image pixel coordinates and actual road coordinates is established. For example, for a specific monitoring camera, a horizontal distance of 100 pixels corresponds to a distance of 5 meters on the actual road. Through this mapping relationship, the displacement of vehicles in the image is converted into the displacement on the actual road. The vehicle speed calculation formula is: the displacement of the vehicle on the actual road divided by the corresponding time interval. For example, if the actual displacement of a vehicle within 0.5 seconds is 5 meters, its speed is 10 meters / second, or 36 kilometers / hour.

[0030] Traffic flow density represents the number of vehicles per unit road length. The monitoring area is divided into multiple lanes, and the traffic flow density is calculated for each lane. Specifically, the number of vehicles passing through the lane within a certain time period (such as 1 minute) is counted, and divided by the lane length (unit: kilometers) to obtain the traffic flow density (vehicles / km). For example, if 60 vehicles pass through a 0.5 km long lane in 1 minute, the traffic flow density of that lane is 120 vehicles / km.

[0031] Based on the extracted vehicle trajectory, speed, and flow density information, traffic state feature data is generated, including: average speed, speed standard deviation, traffic flow density, vehicle spacing, lane occupancy rate, etc. The average speed represents the average speed of all vehicles within a certain time period; the speed standard deviation reflects the dispersion of the speed, the larger the value, the greater the speed difference; the vehicle spacing represents the average distance between adjacent vehicles; the lane occupancy rate represents the proportion of time that vehicles occupy the lane. These feature data comprehensively reflect the traffic conditions of the road.

[0032] According to the traffic state feature data, a traffic feature combination matrix is constructed to represent the correlation between different features. The traffic feature combination matrix is an N x N square matrix, where N is the number of features. Each element in the matrix represents the correlation coefficient between the corresponding two features, with a value range of [-1, 1]. A correlation coefficient close to 1 indicates a high positive correlation between the two features, close to -1 indicates a high negative correlation, and close to 0 indicates almost no correlation.

[0033] Based on the traffic feature combination matrix, a feature importance analysis method is used to determine the dominant feature parameters, which are the top few features that have the greatest impact on the traffic state. By calculating the average correlation of each feature with other features, the top 3-5 features with the highest average correlation are selected as the dominant feature parameters. For example, in a certain traffic scenario, average speed, traffic density, and lane occupancy are determined as the dominant feature parameters.

[0034] The determined dominant feature parameters are time-series matched with historical traffic data to generate a traffic flow dynamic feature sequence. The historical traffic data includes traffic state records of the same road segment and similar time period in the past period (e.g., 30 days). The time-series matching process finds the most similar historical traffic pattern by calculating the similarity of the current dominant feature parameters with the corresponding features in the historical data. The similarity calculation uses the Euclidean distance formula, with smaller distance indicating higher similarity. Through time-series matching, the development trend of the current traffic state can be identified and its future changes can be predicted.

[0035] Based on the traffic flow dynamic feature sequence and the dominant feature parameters, the traffic flow state is classified and calculated to obtain the class information of the traffic flow state, which is divided into five categories: smooth, light congestion, moderate congestion, heavy congestion, and severe congestion. The classification criteria are based on the threshold settings of the dominant feature parameters. For example, when the average speed is greater than 50 km / h and the traffic density is less than 30 vehicles / km, it is determined as smooth; when the average speed is between 30-50 km / h and the traffic density is between 30-60 vehicles / km, it is determined as light congestion; and so on. The accuracy of the classification results is verified by comparing with the manually labeled traffic state, with an accuracy rate of over 90%.

[0036] Based on the class information of the traffic flow state, the degree of traffic abnormality is further determined, which represents the degree of deviation of the current traffic state from the normal state, divided into four levels: normal, slight abnormality, moderate abnormality, and severe abnormality. The judgment criteria not only consider the current traffic state category, but also consider the difference between the current traffic state and the historical traffic state at the same time period. For example, if the current is the morning peak period and the traffic state is moderate congestion, while the historical traffic state at the same time period is usually light congestion, it is determined as slight abnormality; if the historical traffic state at the same time period is usually smooth, it is determined as moderate abnormality.

[0037] According to the determined traffic anomaly degree, a corresponding traffic control strategy is generated, and different control measures are taken for different levels of traffic anomalies. For example, for slight anomalies, it is recommended to increase the green light time of the signal light; for moderate anomalies, it is recommended to start the traffic guidance system to guide vehicles to choose alternative routes; for serious anomalies, it is recommended to start the emergency response mechanism to dispatch traffic police to the scene to guide traffic. The generation of the control strategy takes into account factors such as the type, duration, and impact range of the traffic anomaly.

[0038] Finally, the generated traffic control strategy is sent to the traffic management system to realize intelligent early warning of traffic flow anomalies. After receiving the early warning information, the traffic management system can automatically execute the corresponding control measures according to the preset response mechanism, or push the early warning information to traffic management personnel for manual decision-making to execute what kind of control measures. In this way, the whole process of automatic processing from traffic monitoring video data acquisition to traffic anomaly early warning is realized, providing effective technical support for urban traffic management.

[0039] In an optional implementation, traffic monitoring video data is acquired, and the traffic monitoring video data is processed according to the light intensity and weather conditions of the traffic scene to generate a target video frame sequence, including: Traffic monitoring video data is acquired, a multi-dimensional state evaluation matrix is determined according to the light intensity and weather conditions of the traffic scene, and a scene quality score is calculated according to the multi-dimensional state evaluation matrix; A light compensation factor and a weather influence factor are determined based on the scene quality score, an image brightness reference value is calculated according to the light compensation factor, and an image contrast reference value is calculated according to the weather influence factor; A video enhancement mapping function is determined based on the image brightness reference value and the image contrast reference value, the brightness of the traffic monitoring video data is dynamically compensated according to the brightness compensation parameter in the video enhancement mapping function, and the contrast of the traffic monitoring video data is adaptively adjusted according to the contrast adjustment parameter in the video enhancement mapping function; The traffic monitoring video data after brightness compensation and contrast adjustment is frame extracted to obtain a video frame image, and the video frame image is denoised to generate a target video frame sequence.

[0040] Real-time video data stream is acquired from a traffic monitoring camera, which is collected at a rate of 30 frames per second with a resolution of 1920x1080 pixels. At the same time of acquiring the video data, the ambient light intensity value is collected through the light sensor embedded in the camera, with a value range of 0-100, where 0 represents the night without light conditions, and 100 represents the noon strong light conditions. The weather conditions are acquired through the connection to the weather data API, including sunny, cloudy, overcast, rainy, foggy, etc. A multi-dimensional state evaluation matrix is constructed, which is a two-dimensional array of 5x5, the horizontal dimension represents the light intensity level (divided into five levels of extremely weak, weak, medium, strong, and extremely strong), and the vertical dimension represents the weather condition (sunny, cloudy, overcast, rainy, and foggy). For each matrix element, a preset scene quality score value is set, ranging from 0 to 10, and the higher the value, the better the video quality. For example, in the condition of extremely strong light and sunny, the scene quality score is 8.5; while in the condition of extremely weak light and foggy, the scene quality score is only 2.1.

[0041] Based on the calculated scene quality score, the light compensation factor and the weather influence factor are determined, and when the scene quality score is lower than the standard threshold of 6.0, the light compensation factor is calculated in the manner of "10 minus the scene quality score". For example, when the scene quality score is 4.5, the light compensation factor is 5.5. The weather influence factor is obtained according to the weather type table: 1.0 for sunny, 1.2 for cloudy, 1.5 for overcast, 1.8 for rainy, and 2.0 for foggy. The image brightness reference value is calculated according to the light compensation factor, and the calculation method is: the original image average brightness value (range 0-255) is multiplied by (1+light compensation factor / 10). For example, when the original image average brightness value is 120 and the light compensation factor is 5.5, the image brightness reference value is 120x(1+5.5 / 10)=186. At the same time, the image contrast reference value is calculated according to the weather influence factor, and the calculation method is: the standard contrast value 80 is multiplied by the weather influence factor. For example, in the foggy condition, the weather influence factor is 2.0, and the image contrast reference value is 80x2.0=160.

[0042] Based on the image brightness reference value and the image contrast reference value, a video enhancement mapping function is constructed, which is a piecewise linear function, mapping the brightness value of each pixel point of the original video to a new brightness value. In the brightness compensation stage, set the brightness compensation parameter α, which is equal to the image brightness reference value divided by 128. For example, when the image brightness reference value is 186, the brightness compensation parameter α = 186 / 128 = 1.45. Traverse each pixel point of each frame in the video data, and transform the brightness value Y of the pixel point: Y' = Y × α. If the transformed value exceeds 255, it is truncated to 255. In the contrast adjustment stage, set the contrast adjustment parameter β, which is equal to the image contrast reference value divided by 80. For example, when the image contrast reference value is 160, the contrast adjustment parameter β = 160 / 80 = 2. Apply contrast adjustment to each pixel point: Y'' = (Y'-128) × β + 128, to ensure that the transformed value is still within the range of 0-255.

[0043] After completing brightness compensation and contrast adjustment, key frames are extracted from the processed video data at a frequency of 5 frames per second to form a sequence of video frame images. For each video frame image, a Gaussian filter is applied for denoising processing, using a 5x5 convolution kernel and a standard deviation of 1.5. The specific operation is as follows: divide the image into multiple 5x5 pixel small regions, replace the original value of the center pixel of each region with the weighted average value of the surrounding pixels, and the weight is determined by the Gaussian function. The center point has the largest weight, and the farther away from the center, the smaller the weight. For example, the original value of the center point of a 5x5 region is 180, and the new value after Gaussian filtering calculation is 172. After the same denoising processing is performed on all extracted video frames, a target video frame sequence is generated, which is stored in standard H.264 encoding, with an average frame size of about 50KB.

[0044] In practical applications, this method shows significant results in different scenarios. For example, under low light conditions at night (light intensity is 15, sunny day), the original video cannot distinguish the vehicle outline, and the scene quality score is 3.2. After applying this method, the light compensation factor is 6.8, the brightness reference value is increased from the original 60 to 101, and the vehicle outline is clearly visible. Under foggy weather conditions (light intensity is 65, foggy day), the original video is blurred and has low contrast, with a scene quality score of 4.0. After applying this method, the weather influence factor is 2.0, the contrast reference value is increased from the original 80 to 160, and the edge definition of the vehicle and road markings is improved by 85%. Through multiple experiments, this method can effectively improve the quality of traffic monitoring video under various complex lighting and weather conditions, and significantly improve the accuracy of subsequent traffic event detection and vehicle recognition, from the original 72% to 91%.

[0045] In an alternative embodiment, a traffic feature combination matrix is determined according to the traffic state feature data, a dominant feature parameter is determined based on the traffic feature combination matrix, the dominant feature parameter is time-matched with historical traffic data, and a traffic flow dynamic feature sequence is generated, including: The smoothness of vehicle trajectory data in the traffic state feature data is processed in segments to obtain a trajectory feature vector, the fluctuation frequency and fluctuation amplitude of vehicle speed data in the traffic state feature data are divided by time window to obtain a speed feature vector, and the spatial distribution density of vehicle flow density data indicated in the traffic state feature data is divided by spatial region to obtain a density feature vector; The trajectory feature vector, the speed feature vector, and the density feature vector are combined to obtain a traffic feature combination matrix; The feature correlation degree is calculated based on the traffic feature combination matrix, the feature importance ranking function is determined according to the feature correlation degree, and the dominant feature parameter is generated based on the feature importance ranking function; The time correlation and spatial correlation of the dominant feature parameter with historical traffic data are calculated, and a spatio-temporal comprehensive correlation coefficient is generated; The dominant feature parameter is weighted according to the spatio-temporal comprehensive correlation coefficient and the feature change law, and a traffic flow dynamic feature sequence is generated.

[0046] In this embodiment, the smoothness of vehicle trajectory data in the traffic state feature data is processed in segments to obtain a trajectory feature vector. Specifically, vehicle trajectory data within a certain time window is collected, for example, the trajectory data of 100 vehicles driving on a specific road segment within 30 minutes is collected. The smoothness index of the trajectory curve of each vehicle is calculated, which can be quantified by the number of direction changes of the trajectory curve within a unit distance. The road is divided into several segments, for example, a 5-kilometer-long road is equally divided into 10 segments, each 500 meters long. The average smoothness value of all vehicle trajectories on each segment of the road is calculated to form a trajectory feature vector. For example, for a 10-segment road, a trajectory feature vector [0.85, 0.78, 0.92, 0.65, 0.73, 0.88, 0.79, 0.81, 0.76, 0.84] is obtained, where each value represents the average smoothness of vehicle trajectories on the corresponding road segment.

[0047] The fluctuation frequency and fluctuation amplitude of the vehicle speed data in the traffic state feature data are divided into time windows to obtain a speed feature vector. Specifically, a suitable time window is selected, for example, 5 minutes as a window, and 6 windows are divided in a 30-minute observation period. In each time window, the average speed fluctuation frequency of all vehicles is calculated, that is, the number of times the speed change direction (acceleration or deceleration) changes divided by the length of the time window. At the same time, the speed fluctuation amplitude is calculated, that is, the standard deviation of the speed change. The fluctuation frequency and fluctuation amplitude of each time window are combined into a pair, for example, the first window gets (3.2 times / minute, 8.5 km / h). Thus, a speed feature vector is formed, containing 6 pairs, represented as [(3.2, 8.5), (2.8, 7.2), (4.1, 10.3), (3.5, 9.1), (2.9, 7.8), (3.7, 9.6)].

[0048] The spatial distribution density of the vehicle flow density data in the traffic state feature data is divided into spatial regions to obtain a density feature vector. The observed road section is divided into grid-shaped regions, for example, the road section is divided into 10 regions. For each region, the average number of vehicles per unit time (such as 5 minutes) is calculated to obtain the regional vehicle flow density value. Combined with the vehicle spacing distribution, the uniformity index of vehicle distribution in each region is calculated. The density value and uniformity index of each region are combined to form a density feature vector. For example, the density feature vector [(25, 0.76), (32, 0.68), (18, 0.85), (42, 0.52), (28, 0.71), (35, 0.64), (22, 0.79), (38, 0.58), (30, 0.69), (20, 0.82)] is obtained, where the first value of each pair represents the number of vehicles in the region, and the second value represents the distribution uniformity index.

[0049] The trajectory feature vector, the speed feature vector, and the density feature vector are combined to obtain a traffic feature combination matrix. During the optimization and combination process, the feature vectors are normalized to make features of different dimensions comparable. The smoothness value in the trajectory feature vector is linearly normalized to the interval [0, 1]. The fluctuation frequency in the speed feature vector is normalized according to the historical maximum value (e.g., 6 times per minute); the fluctuation amplitude is normalized according to the historical maximum value (e.g., 15 km / h). The number of vehicles in the density feature vector is normalized according to the road capacity (e.g., 50 vehicles per region); the uniformity index is kept as the original value. The normalized feature vectors are arranged in row-major order to form a traffic feature combination matrix. For example, for 10 spatial regions and 6 time windows, a 10 x (1+2+2) = 10 x 5 matrix can be formed, where each row represents a spatial region and each row contains 5 elements: the normalized smoothness value, the normalized fluctuation frequency and fluctuation amplitude, and the normalized number of vehicles and uniformity index.

[0050] The feature correlation degree is calculated based on the traffic feature combination matrix, the feature importance ranking function is determined according to the feature correlation degree, and the dominant feature parameters are generated based on the feature importance ranking function. When calculating the feature correlation degree, the Pearson correlation coefficient is calculated for each pair of features in the matrix to construct a feature correlation degree matrix. For example, the correlation coefficient between smoothness and fluctuation frequency is -0.78, indicating a strong negative correlation. According to the feature correlation degree matrix, the importance of each feature is determined through a ranking algorithm. The ranking algorithm considers the variance contribution rate of the feature and its correlation with other features, and assigns a weight score to each feature. For example, after ranking, the feature importance ranking is obtained: fluctuation amplitude (0.42), number of vehicles (0.35), smoothness (0.15), fluctuation frequency (0.05), and uniformity index (0.03). Select the features with cumulative importance exceeding 80% as the dominant feature parameters, which in this example are fluctuation amplitude, number of vehicles, and smoothness.

[0051] The time correlation and spatial correlation of the dominant feature parameters with historical traffic data are calculated to generate a spatio-temporal comprehensive correlation coefficient. Similar historical traffic data is extracted from the historical database, such as data on the same road, similar time period, and similar weather conditions. For each dominant feature parameter, the autocorrelation coefficient of the parameter with historical data in the time dimension is calculated to determine the time correlation. For example, the autocorrelation coefficient of the current fluctuation amplitude sequence with the historical fluctuation amplitude in the same period is 0.85. The correlation of the dominant feature parameters at different spatial locations is calculated to determine the spatial correlation. For example, the correlation coefficient of the number of vehicles between adjacent regions is 0.72. The spatio-temporal comprehensive correlation coefficient is generated by combining the time correlation and the spatial correlation. For example, the spatio-temporal comprehensive correlation coefficient of the fluctuation amplitude is 0.80, the number of vehicles is 0.75, and the smoothness is 0.68.

[0052] According to the spatio-temporal comprehensive correlation coefficient and the characteristic change rule, the dominant characteristic parameters are weighted and distributed, a traffic flow dynamic characteristic sequence is generated, and according to the spatio-temporal comprehensive correlation coefficient, different weights are given to the dominant characteristic parameters. The higher the correlation coefficient, the greater the weight. For example, the fluctuation amplitude weight is 0.42, the vehicle quantity weight is 0.35, and the smoothness weight is 0.23. The change rule of each dominant characteristic parameter with time is analyzed, and the periodic pattern and the trend change are identified. The weighted dominant characteristic parameters are combined to form a traffic flow dynamic characteristic sequence, which reflects the dynamic change of the traffic flow state with time and space. For example, the traffic flow dynamic characteristic sequence of a road section during the morning peak period can be expressed as a series of spatio-temporal state points, each point containing the weighted combined dominant characteristic value, which can accurately characterize the characteristics of the evolution of the traffic flow with time.

[0053] In an optional embodiment, a feature correlation degree is calculated based on the traffic feature combination matrix, a feature importance ranking function is determined according to the feature correlation degree, and a dominant characteristic parameter is generated based on the feature importance ranking function, including: The traffic feature combination matrix is divided into different time periods, the feature fluctuation value in different time periods is calculated, and the change rate of adjacent feature data in the different time periods is extracted to obtain a change rate sequence; The fluctuation amplitude of the change rate sequence is calculated, a feature correlation degree matrix is generated, the feature correlation degree of each feature with other features is calculated according to the feature correlation degree matrix, and the positive correlation strength and the negative correlation strength are obtained; A feature mapping relationship is determined based on the positive correlation strength, the negative correlation strength, and the feature fluctuation value, and the feature correlation weight in different time periods is calculated; The feature correlation weight is processed in time sequence, and a decay coefficient is set according to the time distance, the feature comprehensive score is calculated according to the decay coefficient and the feature correlation weight; The feature comprehensive score is weighted and calculated with the change rate sequence to obtain a feature comprehensive score, the feature vectors in the traffic feature combination matrix are ranked according to the importance according to the feature comprehensive score, and the dominant characteristic parameter is determined according to the importance ranking result.

[0054] Figure 2 A flowchart for determining the dominant characteristic parameter of the embodiment of the application is shown in FIG. 1. Figure 2As shown, first, a traffic feature combination matrix is obtained, which contains a plurality of traffic feature vectors, each of which corresponds to time series data of different traffic parameters. When calculating the feature correlation degree, the traffic feature combination matrix is divided into a plurality of different time periods. For example, 24 hours of a day can be divided into four time periods, i.e., morning peak (7:00-9:00), flat peak (9:00-17:00), evening peak (17:00-19:00), and night period (19:00-7:00 of the next day). For each time period, a feature fluctuation value is calculated. Taking the traffic volume feature as an example, the standard deviation of the traffic volume in the morning peak period can be calculated. If the traffic volume data in this period is [1200, 1500, 1800, 1650, 1400] vehicles / hour, the standard deviation is about 227.6 vehicles / hour, which is taken as the fluctuation value of the feature in this period.

[0055] Subsequently, the change rate of adjacent feature data in different time periods is extracted. Taking the vehicle speed feature as an example, if the vehicle speeds of two adjacent time points are 40 km / h and 45 km / h respectively, the change rate is (45-40) / 40=12.5%. By performing this calculation on all adjacent time points, a complete change rate sequence [12.5%, -5%, 8%, -3%,...] is obtained.

[0056] The fluctuation amplitude of the change rate sequence is further calculated, i.e., the difference between the maximum value and the minimum value in the change rate sequence. For example, the maximum value of the vehicle speed change rate sequence in a certain period is 15%, and the minimum value is -10%, so the fluctuation amplitude is 25%. Based on these fluctuation amplitudes, a feature correlation degree matrix is generated. Each element of the matrix represents the correlation degree between two features, with a value range of [-1, 1], where 1 represents complete positive correlation, -1 represents complete negative correlation, and 0 represents no correlation.

[0057] According to the feature correlation degree matrix, the feature correlation degree of each feature with other features is calculated, and positive and negative correlation strengths are obtained. For example, if the correlation degree of the traffic volume feature with the vehicle speed feature is -0.8, and the correlation degree with the intersection waiting time feature is 0.7, the negative correlation strength of the traffic volume feature is 0.8, and the positive correlation strength is 0.7.

[0058] Based on the positive correlation strength, the negative correlation strength, and the feature fluctuation value, a feature mapping relationship is determined, which represents the influence mode and degree between features. For example, when the traffic volume increases by 10%, the vehicle speed decreases by an average of 8%, and the intersection waiting time increases by 12%. According to this, the feature correlation weight in different time periods is calculated. In the morning peak period, the correlation weight of the traffic volume feature is 0.85, indicating that this feature has a greater impact on the overall traffic condition in this period.

[0059] When performing time-series processing on the feature correlation weight, the influence of time continuity on the importance of the feature is considered, and a decay coefficient is set according to the time distance, that is, the data at a closer time point has a greater influence on the current decision. For example, an exponential decay function is set, the decay coefficient of the data 5 minutes ago is 0.95, the decay coefficient of the data 10 minutes ago is 0.90, and the decay coefficient of the data 15 minutes ago is 0.86.

[0060] According to the decay coefficient and the feature correlation weight, the feature comprehensive score is calculated. Taking the traffic volume feature as an example, if the correlation weights of the feature at three consecutive time points are 0.85, 0.82, and 0.79 respectively, and the corresponding decay coefficients are 0.95, 0.90, and 0.86 respectively, then the comprehensive score is 0.85*0.95+0.82*0.90+0.79*0.86=2.20.

[0061] The feature comprehensive score and the change rate sequence are weighted and calculated to further optimize the feature comprehensive score. If the original comprehensive score of the traffic volume feature is 2.20, the average value of the change rate sequence is 8%, and the weighting coefficient is 0.3, then the optimized comprehensive score is 2.20*(1+0.3*8%) = 2.35.

[0062] According to the feature comprehensive score, the importance of the feature vectors in the traffic feature combination matrix is sorted, for example, the traffic volume feature score is 2.35, the vehicle speed feature score is 2.10, and the intersection waiting time feature score is 1.85. The importance ranking is: traffic volume > vehicle speed > intersection waiting time. According to the ranking result, the dominant feature parameter is determined, that is, the features ranked at the top will be the main basis for traffic condition analysis and prediction.

[0063] In practical application, a city traffic management system uses the above method to analyze the traffic data during the evening peak period. Ten features including traffic volume, vehicle speed, intersection waiting time, and traffic signal timing are identified from the traffic feature combination matrix. It is found through calculation that the feature comprehensive scores of traffic volume and intersection waiting time are the highest, which are 2.35 and 2.28 respectively, and they are determined as the dominant feature parameters. According to this, the traffic management department adjusts the signal timing strategy of the key intersection, prolongs the green light time of the main road by 15 seconds, increases the traffic flow by 12%, and shortens the average travel time by 8%, effectively alleviating the evening peak congestion.

[0064] In an optional implementation, according to the traffic flow dynamic feature sequence and the dominant feature parameter, the traffic flow state is classified and calculated to obtain the category information of the traffic flow state, including: The traffic flow dynamic feature sequence is divided into a high-frequency fluctuation sequence and a low-frequency fluctuation sequence according to the fluctuation frequency, and the dominant feature parameter is divided into a strong correlation feature group and a weak correlation feature group according to the spatial correlation; The fluctuation period feature is calculated based on the high-frequency fluctuation sequence and the low-frequency fluctuation sequence, the spatial distribution feature is calculated based on the distribution density of the strong correlation feature group and the weak correlation feature group, and the fluctuation period feature and the spatial distribution feature are combined to generate a feature distribution vector; The classification optimization function is determined based on the feature distribution vector, the fluctuation coupling degree is calculated according to the fluctuation amplitude ratio of the high-frequency fluctuation sequence to the low-frequency fluctuation sequence, and the spatial complementarity degree is calculated according to the distribution density difference between the strong correlation feature group and the weak correlation feature group; The adaptive classification interval is determined based on the weighted combination of the fluctuation coupling degree and the spatial complementarity degree, the traffic flow state is divided into different states according to the adaptive classification interval, and the category information of the traffic flow state is obtained.

[0065] In one embodiment, traffic flow dynamic feature sequences and dominant feature parameters are obtained, classification calculation is performed on the traffic flow state, and the category information of the traffic flow state is obtained, wherein the traffic flow dynamic feature sequences are divided into high-frequency fluctuation sequences and low-frequency fluctuation sequences according to fluctuation frequencies. For example, frequency spectrum analysis is performed on collected traffic volume data, and a part with a fluctuation frequency higher than 0.05 Hz is divided into a high-frequency fluctuation sequence, such as a rapid change in traffic volume in a short time; and a part with a fluctuation frequency lower than 0.05 Hz is divided into a low-frequency fluctuation sequence, such as a slow change trend of traffic volume in a long time range. Meanwhile, the dominant feature parameters are divided into a strong correlation feature group and a weak correlation feature group according to spatial correlation. For example, spatial autocorrelation coefficients of parameters such as traffic volume and average speed of each road section are calculated, and parameters with autocorrelation coefficients greater than 0.7 are classified into the strong correlation feature group, such as average speeds of adjacent monitoring points on a main road; and parameters with autocorrelation coefficients less than 0.7 are classified into the weak correlation feature group, such as traffic volume changes between different functional areas.

[0066] The fluctuation period feature is calculated based on the high-frequency fluctuation sequence and the low-frequency fluctuation sequence, the spatial distribution feature is calculated based on the distribution density of the strong correlation feature group and the weak correlation feature group, and the fluctuation period feature and the spatial distribution feature are combined to generate a feature distribution vector;

[0067] The classification optimization function is determined based on the feature distribution vector, which obtains the fluctuation coupling degree by calculating the fluctuation amplitude ratio of the high-frequency fluctuation sequence and the low-frequency fluctuation sequence, and obtains the spatial complementarity degree by calculating the distribution density difference of the strongly correlated feature group and the weakly correlated feature group. For example, in a certain urban business district, the average amplitude of the high-frequency fluctuation sequence is 300 vehicles per hour, the average amplitude of the low-frequency fluctuation sequence is 1200 vehicles per hour, the fluctuation amplitude ratio is 0.25, indicating that the fluctuation coupling degree is 0.25; the distribution density of the strongly correlated feature group is 10 monitoring points per square kilometer, and the distribution density of the weakly correlated feature group is 2 monitoring points per square kilometer, and the distribution density difference is 8, indicating that the spatial complementarity degree is 8.

[0068] The adaptive classification interval is determined based on the weighted combination of the fluctuation coupling degree and the spatial complementarity degree. The fluctuation coupling degree is multiplied by the weight 0.6, the spatial complementarity degree is standardized and multiplied by the weight 0.4, and the sum of the two is the weighted combination value. According to the distribution range of the weighted combination value, the classification threshold is adaptively determined, such as setting 0-0.3 as the free interval, 0.3-0.6 as the light congestion interval, 0.6-0.8 as the moderate congestion interval, and 0.8-1.0 as the heavy congestion interval. According to the adaptive classification interval, the traffic flow state is divided into different categories, such as free, light congestion, moderate congestion and heavy congestion, so as to obtain the category information of the traffic flow state.

[0069] In practical application, a certain urban road network is analyzed, and traffic flow data of 20 monitoring points on weekdays is obtained. The average amplitude of the high-frequency fluctuation sequence is calculated as 250 vehicles per hour, the average amplitude of the low-frequency fluctuation sequence is calculated as 1000 vehicles per hour, the fluctuation amplitude ratio is 0.25; the distribution density of the strongly correlated feature group is 8 monitoring points per square kilometer, and the distribution density of the weakly correlated feature group is 3 monitoring points per square kilometer, and the distribution density difference is 5. The weighted combination value is calculated as 0.25x0.6+0.5x0.4=0.35, and according to the adaptive classification interval, the traffic state of the road network is determined as light congestion.

[0070] The analysis is also made for special periods, such as during holidays, the average amplitude of high-frequency fluctuation sequence increases to 400 vehicles per hour, the average amplitude of low-frequency fluctuation sequence is still 1000 vehicles per hour, and the fluctuation amplitude ratio rises to 0.4; the distribution density of the strong correlation feature group becomes 12 monitoring points per square kilometer, and the distribution density of the weak correlation feature group becomes 2 monitoring points per square kilometer, and the distribution density difference is 10. The weighted combination value is calculated as 0.4*0.6+1.0*0.4=0.64, according to the adaptive classification interval, the traffic state of the road network is determined to be moderate congestion, indicating that the traffic condition has deteriorated during the holidays. In this way, the traffic state can be judged in real time according to the dynamic characteristics and dominant feature parameters of the traffic flow, providing decision support for traffic management.

[0071] In an optional implementation, a traffic anomaly degree is determined based on the category information of the traffic flow state, and a corresponding traffic control strategy is generated according to the traffic anomaly degree, including: A spatiotemporal distribution feature of the traffic flow state is calculated according to the category information, a traffic anomaly diffusion rate and a traffic anomaly propagation direction are calculated based on the spatiotemporal distribution feature, and a traffic anomaly propagation feature is generated by combining the traffic anomaly diffusion rate and the traffic anomaly propagation direction; A traffic anomaly level coefficient is calculated according to the traffic anomaly propagation feature, different anomaly degrees are divided based on the traffic anomaly level coefficient, and a traffic anomaly development trend feature is obtained by calculating the conversion relationship between different anomaly degrees; An evolution speed of a traffic anomaly diffusion boundary and a spatial migration distance of a traffic anomaly core area are calculated according to the traffic anomaly development trend feature, a control area range is determined based on the evolution speed and the spatial migration distance, and a control intensity of each control area is determined based on the traffic anomaly level coefficient; A traffic flow transfer amount between adjacent control areas is calculated according to the control area range and the control intensity, control measures are hierarchically configured based on the traffic flow transfer amount, and a traffic control strategy including a control area, a control period, and a control measure is generated.

[0072] In the determination of the traffic anomaly degree stage, the spatiotemporal distribution feature is first calculated according to the category information of the traffic flow state, including the traffic flow density change rate and the speed change rate. For example, for a specific road section, when the normal flow is measured to be 500 vehicles / hour and the current flow is 300 vehicles / hour, the flow change rate is -40%; when the normal average speed is 60 kilometers / hour and the current average speed is 40 kilometers / hour, the speed change rate is -33%.

[0073] Based on the above spatio-temporal distribution characteristics, the traffic anomaly diffusion rate and the traffic anomaly propagation direction are calculated. The traffic anomaly diffusion rate represents the propagation speed of the abnormal state in the road network, for example, the abnormal traffic state observed on the city trunk road spreads to the adjacent section at a speed of 500 meters per minute. The traffic anomaly propagation direction represents the spatial direction of the abnormal state propagation, for example, from the city center to the outer ring direction. The traffic anomaly diffusion rate and the propagation direction are combined to generate the traffic anomaly propagation feature, which is used to describe the dynamic evolution process of the abnormal state.

[0074] According to the traffic anomaly propagation feature, the traffic anomaly level coefficient is calculated. When the traffic anomaly diffusion rate exceeds 300 meters per minute and propagates towards the city center area, the traffic anomaly level coefficient is 0.8, indicating a higher abnormal level. Based on the abnormal level coefficient, the traffic anomaly degree is divided into four levels: mild anomaly (coefficient 0-0.3), moderate anomaly (coefficient 0.3-0.6), severe anomaly (coefficient 0.6-0.9) and extreme anomaly (coefficient 0.9-1.0).

[0075] The traffic anomaly development trend feature is obtained by calculating the conversion relationship between different anomaly degrees, for example, a road section develops from mild anomaly (coefficient 0.2) to moderate anomaly (coefficient 0.5) within 30 minutes, indicating that the abnormal state is deteriorating, and the conversion rate is 0.01 coefficient per minute. This trend feature helps to predict the future development of the abnormal state.

[0076] In the determination of the control area and intensity stage, the evolution speed of the traffic anomaly diffusion boundary and the spatial migration distance of the traffic anomaly core area are calculated according to the traffic anomaly development trend feature. If the evolution speed of the anomaly diffusion boundary is 2 kilometers per hour and the anomaly core area has moved 1.5 kilometers east in the past 1 hour, this information will be used to determine the control area range.

[0077] Based on the evolution speed and spatial migration distance, the control area range is determined, for example, for an anomaly state with an evolution speed of 2 kilometers per hour, the control area needs to cover a range of 4 kilometers around the anomaly core area to prevent the spread of the abnormal state in the next 2 hours. At the same time, based on the traffic anomaly level coefficient, the control intensity of each control area is determined, for example, when the anomaly level coefficient is 0.7, the core control area adopts vehicle restriction measures, while the peripheral control area only needs to implement traffic diversion measures.

[0078] In the generation of control strategy stage, the traffic flow transfer amount between adjacent control areas is calculated according to the control area range and control intensity, for example, after the core control area implements vehicle restriction, it causes 200 vehicles per hour to transfer to adjacent control areas, which can cause new traffic pressure. Based on the traffic flow transfer amount, the control measures are classified and configured, when the transfer amount is large, the adjacent areas also need to take corresponding measures to absorb the additional traffic flow.

[0079] The finally generated traffic control strategy includes specific control areas, control time periods, and control measures. For example, for a traffic condition with an abnormality level coefficient of 0.8, the control strategy can include: implementing vehicle odd-even license plate restrictions in a core area with a radius of 3 kilometers for 4 hours; increasing the number of traffic police in the peripheral 1-2 kilometer area and setting temporary detour prompts; adjusting the signal timing in the peripheral 2-5 kilometer area and extending the green light time of the main road by 20%. This refined control strategy can provide corresponding measures to deal with traffic abnormal conditions of different severity, effectively alleviating traffic congestion.

[0080] Through the above, traffic control strategies can be adaptively generated according to real-time traffic conditions, achieving precision and intelligent traffic management. In an actual application, a large-scale sports event caused the traffic abnormality coefficient in a local area to reach 0.75, the congestion diffusion path was predicted according to the abnormality propagation characteristics, and a three-ring control scheme was generated, successfully shortening the traffic recovery time from the estimated 3 hours to 1.5 hours, significantly improving the efficiency of traffic management.

[0081] In an optional implementation, the evolution speed of the traffic abnormality diffusion boundary and the spatial migration distance of the traffic abnormality core area are calculated according to the traffic abnormality development trend characteristics, the control area range is determined based on the evolution speed and the spatial migration distance, and the control intensity of each control area is determined based on the traffic abnormality level coefficient, including: The occurrence position of the traffic abnormality event is determined according to the traffic abnormality development trend characteristics, and the occurrence position is determined as the traffic abnormality core area; The traffic flow density change rate and the traffic flow speed change rate of the traffic abnormality core area are calculated, and the evolution speed of the traffic abnormality diffusion boundary is determined according to the traffic flow density change rate and the traffic flow speed change rate; The traffic abnormality influence range is calculated based on the position coordinates of the traffic abnormality core area, the road segments within the traffic abnormality influence range are divided into multiple sub-areas, and the traffic flow parameter deviation degree of each sub-area is calculated; The spatial correlation intensity matrix is determined according to the traffic flow parameter deviation degree, and the spatial migration distance of each sub-area is calculated based on the spatial correlation intensity matrix, and the spatial migration distance of each sub-area that meets the preset merging condition is merged to generate the control area range; The control intensity of each control area is calculated according to the traffic abnormality level coefficient.

[0082] In practical applications, first, the occurrence position of the traffic anomaly event needs to be determined according to the traffic anomaly development trend characteristics, and the position is determined as the traffic anomaly core area. For example, real-time traffic flow data in a road network is obtained through a traffic monitoring system, including vehicle flow, vehicle speed, vehicle density and other parameters. When the traffic parameters of a road section are obviously abnormal, such as the vehicle speed suddenly decreases to less than 30% of the normal value, or the vehicle density suddenly increases to more than 200% of the normal value, it can be determined that the road section is a traffic anomaly core area. Assuming that the average vehicle speed at a crossroads is detected to decrease from 40 km / h to 10 km / h, and the vehicle density increases from 25 vehicles / km to 65 vehicles / km, the crossroads can be determined as the traffic anomaly core area, and the position coordinates are (x0, y0).

[0083] After the traffic anomaly core area is determined, the traffic flow density change rate and the traffic flow speed change rate of the area are calculated to determine the evolution speed of the traffic anomaly diffusion boundary. The traffic flow density change rate is calculated by the difference between the current time traffic flow density and the last time traffic flow density divided by the time interval. The traffic flow speed change rate is calculated by the difference between the current time traffic flow speed and the last time traffic flow speed divided by the time interval. For example, if the vehicle density of the core area increases from 65 vehicles / km to 85 vehicles / km within 5 minutes, the density change rate is 4 vehicles / km / min; if the vehicle speed decreases from 10 km / h to 7 km / h, the speed change rate is -0.6 km / h / min. According to these change rates, the evolution speed of the traffic anomaly diffusion boundary can be calculated. Generally, the greater the density change rate and the greater the absolute value of the speed change rate, the faster the evolution speed. In this example, the evolution speed can be determined as 15 meters outward diffusion per minute.

[0084] Next, the traffic anomaly influence range is calculated based on the position coordinates of the traffic anomaly core area. The traffic anomaly influence range can be determined according to the position coordinates of the traffic anomaly core area and a preset influence radius. Assuming that the preset influence radius is 500 meters, a circular area with the core area position coordinates (x0, y0) as the center and 500 meters as the radius is the traffic anomaly influence range. The road sections in the influence range are divided into multiple sub-areas, for example, the entire influence range is divided into 25 sub-areas, and each sub-area is 100 meters x 100 meters.

[0085] The traffic flow parameter deviation degree is calculated for each sub-region. The traffic flow parameters include traffic volume, vehicle speed, vehicle density, etc., and the deviation degree represents the difference between the actual traffic flow parameter and the historical normal traffic flow parameter. For example, the actual average vehicle speed of sub-region A is 15 km / h, and the historical normal average vehicle speed is 35 km / h, so the vehicle speed deviation degree is (35-15) / 35=57.14%; the actual vehicle density is 45 vehicles / km, and the historical normal vehicle density is 20 vehicles / km, so the density deviation degree is (45-20) / 20=125%. The overall deviation degree can be determined according to the weighted average of the deviation degrees of each parameter. Assuming that the weight of vehicle speed is 0.6 and the weight of density is 0.4, the overall deviation degree of sub-region A is 0.6x57.14%+0.4x125%=84.28%.

[0086] The spatial correlation strength matrix is determined according to the traffic flow parameter deviation degree. The spatial correlation strength represents the correlation of traffic states between sub-regions, which can be calculated by the similarity of traffic flow parameter deviation degrees between sub-regions. Assuming that the overall deviation degrees of sub-regions A and B are 84.28% and 79.55% respectively, the spatial correlation strength between them can be represented as (1-|84.28%-79.55%| / 100)=0.9527. By calculating the spatial correlation strength between all pairs of sub-regions, a spatial correlation strength matrix is formed.

[0087] The spatial migration distance of each sub-region is calculated based on the spatial correlation strength matrix. The spatial migration distance represents the time or spatial distance required for the traffic anomaly to spread from the core area to each sub-region. It can be determined according to the spatial correlation strength and geographical distance between the sub-region and the core area. For example, if the geographical distance between sub-region C and the core area is 300 meters and the spatial correlation strength is 0.85, the spatial migration distance can be calculated as 300 / (0.85x evolution speed)=300 / (0.85x15)=23.53 minutes, indicating that it takes about 23.53 minutes for the traffic anomaly to spread from the core area to the sub-region.

[0088] The sub-regions with spatial migration distances meeting the preset merging condition are merged to generate the control area range. The preset merging condition can be that the difference in spatial migration distance is less than a threshold value, for example, less than 5 minutes. If the spatial migration distances of sub-regions C and D are 23.53 minutes and 25.72 minutes respectively, the difference is 2.19 minutes, which is less than the threshold value of 5 minutes, so these two sub-regions can be merged into one control area. By similar methods, all sub-regions are merged, and finally 3-5 different control areas are formed.

[0089] Finally, the control strength of each control area is calculated according to the traffic anomaly level coefficient, the traffic anomaly level coefficient reflects the severity of the traffic anomaly, and can be determined according to the deviation degree of the traffic flow parameter, the abnormal duration, the influence range and the like. For example, if the traffic anomaly level coefficient of a control area is 0.85, then a higher intensity traffic control measure, such as limiting vehicle entry, diverting part of the traffic flow, etc., needs to be implemented in the area; if the level coefficient is 0.6, then a medium intensity control measure, such as reminding the driver to slow down, choosing to detour, etc., needs to be implemented; and if the level coefficient is 0.3, then a low intensity control, such as publishing traffic warning information, etc., needs to be implemented.

[0090] The traffic flow anomaly intelligent identification and early warning system based on deep learning comprises: A first unit is configured to acquire traffic monitoring video data, process the traffic monitoring video data according to the light intensity and weather conditions of the traffic scene, and generate a target video frame sequence; A second unit is configured to extract vehicle trajectory, vehicle speed and traffic flow density information from the target video frame sequence, and generate traffic state feature data based on the vehicle trajectory, vehicle speed and traffic flow density information; A third unit is configured to determine a traffic feature combination matrix according to the traffic state feature data, determine a dominant feature parameter based on the traffic feature combination matrix, and perform time sequence matching between the dominant feature parameter and historical traffic data to generate a traffic flow dynamic feature sequence; A fourth unit is configured to classify and calculate the traffic flow state according to the traffic flow dynamic feature sequence and the dominant feature parameter, and obtain category information of the traffic flow state; A fifth unit is configured to determine a traffic anomaly degree based on the category information of the traffic flow state, and generate a corresponding traffic control strategy according to the traffic anomaly degree; A sixth unit is configured to send the traffic control strategy to a traffic management system to realize intelligent early warning of traffic flow anomaly.

[0091] In a third aspect, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; The processor is configured to invoke the instructions stored in the memory to execute the method described above.

[0092] In a fourth aspect, a computer-readable storage medium is provided, which stores computer program instructions, and the computer program instructions are executed by a processor to implement the method described above.

[0093] The present application can be a method, an apparatus, a system, and / or a computer program product. The computer program product can include a computer readable storage medium (or media) having computer readable program instructions thereon for performing various aspects of the present application.

[0094] Finally, it should be noted that the above-described embodiments are merely intended to illustrate the technical solutions of the present application, and are not intended to limit the present application; even though the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or equivalently replace some or all of the technical features thereof; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A deep learning-based traffic flow anomaly intelligent identification and early warning method, characterized in that, The method comprises the following steps: acquiring traffic monitoring video data, processing the traffic monitoring video data according to the light intensity and weather conditions of the traffic scene, and generating a target video frame sequence; extracting vehicle trajectory, vehicle speed and traffic density information from the target video frame sequence, and generating traffic state feature data based on the vehicle trajectory, vehicle speed and traffic density information; determining a traffic feature combination matrix according to the traffic state feature data, determining a dominant feature parameter based on the traffic feature combination matrix, time sequence matching the dominant feature parameter with historical traffic data, and generating a traffic flow dynamic feature sequence; classifying and calculating the traffic flow state according to the traffic flow dynamic feature sequence and the dominant feature parameter to obtain category information of the traffic flow state; determining the degree of traffic abnormality based on the category information of the traffic flow state, and generating a corresponding traffic control strategy according to the degree of traffic abnormality; sending the traffic control strategy to a traffic management system to realize intelligent early warning of traffic flow abnormalities.

2. The method of claim 1, wherein, The method comprises the following steps: acquiring traffic monitoring video data, determining a multi-dimensional state evaluation matrix according to the light intensity and weather conditions of the traffic scene, and calculating a scene quality score according to the multi-dimensional state evaluation matrix; determining a light compensation factor and a weather influence factor based on the scene quality score, calculating an image brightness reference value according to the light compensation factor, and calculating an image contrast reference value according to the weather influence factor; determining a video enhancement mapping function based on the image brightness reference value and the image contrast reference value, dynamically compensating the brightness of the traffic monitoring video data according to the brightness compensation parameter in the video enhancement mapping function, and adaptively adjusting the contrast of the traffic monitoring video data according to the contrast adjustment parameter in the video enhancement mapping function; extracting video frame images from the traffic monitoring video data after brightness compensation and contrast adjustment to obtain a target video frame sequence.

3. The method of claim 1, wherein, The method comprises the following steps: segmenting the smoothness of vehicle trajectory data in the traffic state feature data to obtain a trajectory feature vector, dividing the time window of the fluctuation frequency and fluctuation amplitude of vehicle speed data in the traffic state feature data to obtain a speed feature vector, and dividing the spatial region of the vehicle spatial distribution density indicated by the traffic density data in the traffic state feature data to obtain a density feature vector; combining the trajectory feature vector, the speed feature vector and the density feature vector to obtain a traffic feature combination matrix; and determining a traffic feature combination matrix according to the traffic state feature data, determining a dominant feature parameter based on the traffic feature combination matrix, time sequence matching the dominant feature parameter with historical traffic data, and generating a traffic flow dynamic feature sequence. Calculate feature correlation degree based on the traffic feature combination matrix, determine feature importance ranking function according to the feature correlation degree, generate dominant feature parameters based on the feature importance ranking function, including: Divide the traffic feature combination matrix into different time periods, calculate the feature fluctuation value in different time periods, and extract the change rate of adjacent feature data in different time periods to obtain a change rate sequence; Calculate the fluctuation amplitude of the change rate sequence to generate a feature correlation matrix, calculate the feature correlation degree of each feature with other features according to the feature correlation matrix, and obtain positive and negative correlation strengths; 4. The method of claim 3, wherein, Determine the feature mapping relationship based on the positive correlation strength, the negative correlation strength and the feature fluctuation value, and calculate the feature correlation weight in different time periods; Perform time series processing on the feature correlation weight, set a decay coefficient according to the time distance, and calculate the feature comprehensive score according to the decay coefficient and the feature correlation weight; Calculate the feature comprehensive score and the change rate sequence to obtain the feature comprehensive score, and perform importance ranking on the feature vectors in the traffic feature combination matrix according to the feature comprehensive score, and determine the dominant feature parameters according to the importance ranking result. According to the traffic flow dynamic feature sequence and the dominant feature parameters, the traffic flow state is classified and calculated to obtain the category information of the traffic flow state, including: Divide the traffic flow dynamic feature sequence into high-frequency fluctuation sequence and low-frequency fluctuation sequence according to the fluctuation frequency, and divide the dominant feature parameters into strong correlation feature group and weak correlation feature group according to the spatial correlation; Calculate the fluctuation period feature based on the high-frequency fluctuation sequence and the low-frequency fluctuation sequence, calculate the spatial distribution feature based on the distribution density of the strong correlation feature group and the weak correlation feature group, and combine the fluctuation period feature and the spatial distribution feature to generate a feature distribution vector; 5. The method of claim 1, wherein, Determine a classification optimization function based on the feature distribution vector, the classification optimization function calculates the fluctuation coupling degree according to the fluctuation amplitude ratio of the high-frequency fluctuation sequence and the low-frequency fluctuation sequence, and calculates the spatial complementarity degree according to the distribution density difference between the strong correlation feature group and the weak correlation feature group; Determine an adaptive classification interval based on the weighted combination of the fluctuation coupling degree and the spatial complementarity degree, divide the traffic flow state into different states according to the adaptive classification interval to obtain the category information of the traffic flow state. Determine the traffic abnormality degree based on the category information of the traffic flow state, and generate the corresponding traffic control strategy according to the traffic abnormality degree, including: ​ ​ 6. The method of claim 1, wherein, ​ According to the category information, a space-time distribution feature of the traffic flow state is calculated, a traffic anomaly diffusion rate and a traffic anomaly propagation direction are calculated based on the space-time distribution feature, and the traffic anomaly diffusion rate and the traffic anomaly propagation direction are combined to generate a traffic anomaly propagation feature; According to the traffic anomaly propagation feature, a traffic anomaly level coefficient is calculated, different anomaly degrees are divided based on the traffic anomaly level coefficient, and a traffic anomaly development trend feature is obtained by calculating the conversion relationship between different anomaly degrees; According to the traffic anomaly development trend feature, an evolution speed of a traffic anomaly diffusion boundary and a spatial migration distance of a traffic anomaly core area are calculated, a control area range is determined based on the evolution speed and the spatial migration distance, and a control intensity of each control area is determined based on the traffic anomaly level coefficient; According to the control area range and the control intensity, a traffic flow transfer amount between adjacent control areas is calculated, control measures are hierarchically configured based on the traffic flow transfer amount, and a traffic control strategy including a control area, a control time period and a control measure is generated.

7. The method of claim 6, wherein, According to the traffic anomaly development trend feature, an evolution speed of a traffic anomaly diffusion boundary and a spatial migration distance of a traffic anomaly core area are calculated, a control area range is determined based on the evolution speed and the spatial migration distance, and a control intensity of each control area is determined based on the traffic anomaly level coefficient, including: According to the traffic anomaly development trend feature, the occurrence position of the traffic anomaly event is determined, and the occurrence position is determined as the traffic anomaly core area; The traffic flow density change rate and the traffic flow speed change rate of the traffic anomaly core area are calculated, and the evolution speed of the traffic anomaly diffusion boundary is determined according to the traffic flow density change rate and the traffic flow speed change rate; The position coordinates of the traffic anomaly core area are calculated to obtain a traffic anomaly influence range, the road segments within the traffic anomaly influence range are divided into a plurality of sub-areas, and the traffic flow parameter deviation degree of each sub-area is calculated; According to the traffic flow parameter deviation degree, a spatial correlation intensity matrix is determined, and the spatial migration distance of each sub-area is calculated based on the spatial correlation intensity matrix, each sub-area whose spatial migration distance meets a preset merging condition is merged, and a control area range is generated; According to the traffic anomaly level coefficient, the control intensity of each control area is calculated.

8. The deep learning based traffic flow anomaly intelligent identification and warning system, used to realize the method of any one of claims 1-7, characterized in that, Including: A first unit configured to acquire traffic monitoring video data, process the traffic monitoring video data according to the light intensity and weather conditions of a traffic scene, and generate a target video frame sequence; A second unit configured to extract vehicle trajectory, vehicle speed and traffic flow density information from the target video frame sequence, and generate traffic state feature data based on the vehicle trajectory, vehicle speed and traffic flow density information; A third unit configured to determine a traffic feature combination matrix according to the traffic state feature data, determine a dominant feature parameter based on the traffic feature combination matrix, perform time sequence matching between the dominant feature parameter and historical traffic data, and generate a traffic flow dynamic feature sequence; a fourth unit configured to calculate the traffic flow state classification based on the traffic flow dynamic characteristic sequence and the dominant characteristic parameter, and obtain traffic flow state classification information; a fifth unit configured to determine the traffic abnormality degree based on the traffic flow state classification information, and generate a corresponding traffic control strategy based on the traffic abnormality degree; a sixth unit configured to send the traffic control strategy to a traffic management system to implement intelligent early warning of traffic flow abnormality.

9. An electronic device, comprising: comprise: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to execute the method of any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon computer program instructions, wherein, The computer program instructions, when executed by the processor, implement the method of any one of claims 1 to 7.