Road traffic congestion prediction method, device, electronic device and storage medium

By combining traffic big data and computer vision algorithms, road checkpoint videos are used to analyze vehicle information and background changes, the problem of large deviation in traffic congestion prediction in emergencies is solved, and more accurate congestion judgments and reliable early warnings are achieved.

CN116189422BActive Publication Date: 2025-08-22ISA TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211647882.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-21
Publication Date
2025-08-22
Estimated Expiration
2042-12-21

AI Technical Summary

Technical Problem

The existing traffic congestion prediction methods have too many prediction deviations in emergencies (such as traffic accidents, road construction) and cannot effectively respond to changes.

Method used

Combining traffic big data and computer vision algorithms, by obtaining road junction videos, image preprocessing, target separation, target tracking and background change analysis are carried out, vehicle congestion index and abnormal congestion index are calculated, and road congestion situation is comprehensively judged.

Benefits of technology

It improves the accuracy of traffic congestion judgment and the reliability of road traffic congestion warning, can timely identify emergencies and predict congestion trends, and reduces the consumption of human and material resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116189422B_ABST
    Figure CN116189422B_ABST
Patent Text Reader

Abstract

This application provides a method, device, electronic device, and storage medium for predicting road traffic congestion, relating to the field of road traffic technology. The method comprises: acquiring a road checkpoint video, performing image preprocessing on the road checkpoint video to obtain a first background image of the road checkpoint; performing target separation processing on the first background image to obtain a foreground target and a second background image; tracking the foreground target to determine vehicle information at the road checkpoint, and calculating a vehicle congestion index for the road checkpoint based on the vehicle information; performing image matching processing on the second background image and the first background image to determine a background change area; determining an abnormal congestion index based on the change type of the background change area; and determining a target congestion index based on the vehicle congestion index and the abnormal congestion index, thereby predicting road congestion using the target congestion index. This application can improve the accuracy of traffic congestion judgment and the reliability of road traffic congestion warning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of road traffic technology, and in particular to a method, device, electronic device and storage medium for predicting road traffic congestion. Background Art

[0002] Currently, traffic congestion predictions can provide advance forecasts of road conditions, allowing users to anticipate congestion and adjust their routes. Related technologies utilize traffic big data to predict traffic flow and road congestion based on historical patterns. However, unexpected situations, such as traffic accidents or road construction, can lead to significant prediction errors. Historical patterns in traffic data can only predict road flow and congestion in most situations and are unable to effectively address changes brought about by unexpected circumstances. Summary of the Invention

[0003] The purpose of this application is to provide a method, device, electronic device and storage medium for predicting road traffic congestion, which can improve the accuracy of traffic congestion judgment and the reliability of road traffic congestion warning.

[0004] In a first aspect, the present invention provides a method for predicting road traffic congestion, the method comprising: acquiring a road checkpoint video, performing image preprocessing on the road checkpoint video, and obtaining a first background image of the road checkpoint; performing target separation processing on the first background image to obtain a foreground target and a second background image; performing target tracking on the foreground target to determine vehicle information of the road checkpoint, and calculating a vehicle congestion index of the road checkpoint based on the vehicle information; performing image matching processing on the second background image and the first background image to determine a background change area; determining an abnormal congestion index based on the change type of the background change area; wherein the abnormal congestion index is used to characterize the congestion index under abnormal conditions of the road; and determining a target congestion index based on the vehicle congestion index and the abnormal congestion index, so as to predict road congestion through the target congestion index.

[0005] In an optional embodiment, image preprocessing is performed on the road checkpoint video to obtain a first background image of the road checkpoint, including: performing a frame-decoding operation on the road checkpoint video to obtain a picture set; performing interference object removal processing on the picture set frame by frame to determine the first background image of the road checkpoint corresponding to each frame of the picture.

[0006] In an optional embodiment, foreground targets are tracked, vehicle information at the road checkpoint is determined, and a vehicle congestion index at the road checkpoint is calculated based on the vehicle information, including: tracking foreground targets, calculating real-time speed information of individual vehicles at the road checkpoint; determining the average speed of vehicles at the road checkpoint based on the number of vehicles queued at the road checkpoint and the real-time speed information, and obtaining the normal driving speed of the road checkpoint during normal driving per unit time and the total number of vehicles at the checkpoint; and calculating the vehicle congestion index based on the average vehicle speed, the normal driving speed, the number of vehicles queued, and the total number of vehicles at the checkpoint.

[0007] In an optional embodiment, the vehicle congestion index is calculated based on the average vehicle speed, the normal driving speed, the number of vehicles in the queue, and the total number of vehicles at the checkpoint, including:

[0008]

[0009] Among them, w1 is the vehicle congestion index; α is the real-time control coefficient; v s is the average speed of the vehicle; is the normal driving speed; n is the number of vehicles in the queue; is the total number of vehicles at the checkpoint.

[0010] In an optional embodiment, the abnormal congestion index includes an accident abnormality index and a construction abnormality index; the abnormal congestion index is determined based on the change type of the background change area, including: performing connectivity calculation on the background change area, excluding the influence of weather and light, and then determining the abnormal type of the background change area based on a preset threshold; the abnormality type includes background mutation caused by abnormal parking or background gradient caused by road construction; when the abnormality type is background mutation caused by abnormal parking, the number of accident vehicles is detected by the target detection model, the time of the accident is calculated, and the accident abnormality index is set to a preset value; when the abnormality type is background gradient caused by road construction, the first background image is replaced by the second background image, and the construction abnormality index is determined.

[0011] In an optional embodiment, determining the construction anomaly index includes determining the construction anomaly index based on a ratio of the construction area to the area of ​​the main traffic road in the background change area.

[0012] In an optional embodiment, the method further includes: analyzing the current road network traffic based on big data to determine long-term congestion forecast information for forecasting.

[0013] In a second aspect, the present invention provides a device for predicting road traffic congestion, which includes: an image acquisition and processing module for acquiring road checkpoint videos, performing image preprocessing on the road checkpoint videos, and obtaining a first background image of the road checkpoint; a target separation module for performing target separation processing on the first background image to obtain a foreground target and a second background image; a calculation module for tracking the foreground target, determining vehicle information of the road checkpoint, and calculating the vehicle congestion index of the road checkpoint based on the vehicle information; a matching module for performing image matching processing on the second background image and the first background image to determine a background change area; a determination module for determining an abnormal congestion index based on the change type of the background change area; wherein the abnormal congestion index is used to characterize the congestion index under abnormal conditions of the road; and a prediction module for determining a target congestion index based on the vehicle congestion index and the abnormal congestion index, so as to predict road congestion through the target congestion index.

[0014] In a third aspect, the present invention provides an electronic device comprising a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the method for predicting road traffic congestion according to any one of the aforementioned embodiments.

[0015] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the road traffic congestion prediction method of any one of the aforementioned implementation methods.

[0016] The present application provides a method, device, electronic device, and storage medium for predicting road traffic congestion. The method first acquires a road checkpoint video, performs image preprocessing on the road checkpoint video, obtains a first background image of the road checkpoint, then performs target separation processing on the first background image to obtain a foreground target and a second background image. The foreground target is then tracked, and vehicle information at the road checkpoint is determined. Based on the vehicle information, a vehicle congestion index for the road checkpoint is calculated. The second background image is matched with the first background image to determine a background change region. Based on the type of change in the background change region, an abnormal congestion index is determined to characterize abnormal road conditions. Finally, a target congestion index is determined based on the vehicle congestion index and the abnormal congestion index, so that road congestion prediction can be performed using the target congestion index. This method can improve the accuracy of traffic congestion judgment and the reliability of road traffic congestion warnings. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the specific implementation methods or the description of the prior art. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0018] Figure 1 A flowchart of a method for predicting road traffic congestion provided in an embodiment of the present application;

[0019] Figure 2 A schematic diagram of a background gradient provided in an embodiment of the present application;

[0020] Figure 3 A specific processing flow chart provided for an embodiment of the present application;

[0021] Figure 4 A structural diagram of a device for predicting road traffic congestion provided in an embodiment of the present application;

[0022] Figure 5 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Generally, the components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.

[0024] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in the present application without creative work are within the scope of protection of the present application.

[0025] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0026] Current traffic congestion prediction methods are generally categorized into two main categories: those based on traffic big data and those based on computer vision algorithms. Traffic big data-based methods predict traffic flow and road congestion based on historical patterns. This lacks the ability to respond to unexpected congestion situations, such as road construction and accidents, leading to significant prediction errors. Computer vision-based methods for handling traffic congestion require refinement to specific application scenarios. This typically involves establishing a congestion profile data model, which is then used to predict traffic data and generate predictions. However, real-world scenarios often present unique or unexpected circumstances that can affect the accuracy of model predictions.

[0027] Road traffic flow and congestion monitoring using big data is based on historical patterns. This can lead to significant prediction errors in the event of unexpected situations, such as traffic accidents and other unexpected events. Historical patterns in traffic data can only predict road flow and congestion in most situations and cannot effectively address the changes brought about by unexpected events. Introducing computer vision algorithms to provide timely assessments of congestion can identify scenarios such as accidents and construction to determine the cause of congestion. This can address the shortcomings of big data algorithms, improve robustness in unexpected situations, and enhance the accuracy of traffic congestion assessments. This can assist transportation departments in improving coordination and management, thereby promoting the development of traffic safety.

[0028] See also Figure 1 As shown, the embodiment of the present application provides a method for predicting road traffic congestion, which mainly includes the following steps:

[0029] Step S102 : Acquire a road checkpoint video, perform image preprocessing on the road checkpoint video, and obtain a first background image of the road checkpoint.

[0030] Step S104: performing object separation processing on the first background image to obtain a foreground object and a second background image.

[0031] Step S106 , tracking the foreground target, determining vehicle information at the road checkpoint, and calculating a vehicle congestion index at the road checkpoint based on the vehicle information.

[0032] Step S108 : performing image matching processing on the second background image and the first background image to determine the background change area.

[0033] Step S110 , determining an abnormal congestion index based on the change type of the background change area; wherein the abnormal congestion index is used to represent the congestion index when an abnormality occurs on the road.

[0034] Step S112: determining a target congestion index based on the vehicle congestion index and the abnormal congestion index, so as to predict road congestion by using the target congestion index.

[0035] The road traffic congestion prediction method provided in an embodiment of the present application first obtains a road checkpoint video, performs image preprocessing on the road checkpoint video to obtain a first background image of the road checkpoint, then performs target separation processing on the first background image to obtain a foreground target and a second background image, then performs target tracking on the foreground target, determines vehicle information at the road checkpoint, and calculates the vehicle congestion index of the road checkpoint based on the vehicle information. The second background image is matched with the first background image to determine the background change area, and based on the change type of the background change area, determines an abnormal congestion index used to characterize abnormal road conditions. Finally, a target congestion index is determined based on the vehicle congestion index and the abnormal congestion index, and road congestion prediction is performed using the target congestion index. This method can improve the accuracy of traffic congestion judgment and the reliability of road traffic congestion warning.

[0036] For ease of understanding, the method for predicting road traffic congestion provided in the embodiments of the present application is described in detail below.

[0037] In one embodiment, after obtaining the road checkpoint video, image preprocessing is performed on the road checkpoint video to obtain a first background image of the road checkpoint. In a specific implementation, the following steps 1.1) and 1.2) may be included:

[0038] Step 1.1), deframe the road checkpoint video to obtain a picture set;

[0039] Step 1.2) Perform interference object removal on the image set frame by frame to determine the first background image of the road checkpoint corresponding to each frame of the image.

[0040] In one example, offline video footage of a road checkpoint can be captured, deframed, and manually annotated to identify the main road area, eliminating interference from roadside parking areas and other objects to obtain a conventional background image a1 of the checkpoint. During the deframing process, OpenCV or ffmpeg can be used to deframe the video and create a collection of images.

[0041] Optionally, the acquisition of the regular background image may also use a semantic segmentation method to identify the road area. When subsequently comparing the regular background image with the real-time background image, only this area needs to be compared.

[0042] In one embodiment, the first background image is subjected to target separation processing to obtain a foreground target and a second background image. After reading the video frame, the foreground target can be separated using the ViBe background extraction method, that is, the conventional background image (i.e., the first background image) a1 vehicle moving target x i and pedestrians, and simultaneously obtain a real-time background image (ie, a second background image) a2.

[0043] Furthermore, the above-mentioned target tracking of the foreground target, determining the vehicle information of the road checkpoint, and calculating the vehicle congestion index of the road checkpoint based on the vehicle information may include the following steps 2.1) to 2.3):

[0044] Step 2.1) Track the foreground target and calculate the real-time speed information of each vehicle at the road checkpoint;

[0045] Step 2.2) Determine the average speed of vehicles at the road checkpoint based on the number of vehicles queued at the road checkpoint and the real-time vehicle speed information, and obtain the normal driving speed of the road checkpoint during normal driving per unit time and the total number of vehicles at the checkpoint;

[0046] Step 2.3) Calculate the vehicle congestion index based on the average vehicle speed, normal driving speed, number of vehicles in queue, and total number of vehicles at the checkpoint.

[0047] For the above step 2.1), the deep sort method can be used to sort the vehicle moving target x i In practical applications, other target tracking methods may be used, such as neural networks, target recognition, etc. These are only examples and are not specifically limited.

[0048] For the above step 2.2), when calculating the average speed of vehicles, the real-time speed v of a single vehicle can be calculated. i , and count the number of vehicles queued at the checkpoint n, and calculate the average speed v of all vehicles within the current checkpoint range s :

[0049]

[0050] Then, obtain the speed of the vehicle traveling normally per unit time at the checkpoint and the total number of vehicles in the checkpoint under normal circumstances

[0051] Regarding step 2.3), when calculating the vehicle congestion index based on the average vehicle speed, normal driving speed, number of vehicles in queue, and total number of vehicles at the checkpoint, the following method can be used:

[0052]

[0053] Among them, w1 is the vehicle congestion index; α is the real-time control coefficient; v s is the average speed of the vehicle; is the normal driving speed; n is the number of vehicles in the queue; is the total number of vehicles at the checkpoint.

[0054] In one example, the value of α may be initially set to 0.5 and subsequently dynamically adjusted according to the actual conditions of the mount.

[0055] Furthermore, the real-time background image a2 is matched with the conventional background image a1 to analyze the background change area.

[0056] The abnormal congestion index includes an accident abnormality index and a construction abnormality index. After obtaining the background change area, in an optional embodiment, the abnormal congestion index is determined based on the change type of the background change area. In specific implementation, the following steps 3.1) to 3.3) may be included:

[0057] In step 3.1), connectivity calculation is performed on the background change area. After eliminating the influence of weather and light, the abnormal type of the background change area is determined based on a preset threshold. The abnormal type includes sudden background changes caused by abnormal parking or gradual background changes caused by road construction.

[0058] Step 3.2), when the anomaly type is a background mutation caused by abnormal parking, the number of accident vehicles is detected through the target detection model, the time of the accident is calculated, and the accident anomaly index is set to a preset value;

[0059] In step 3.3), when the abnormality type is background gradient caused by road construction, the first background image is replaced by the second background image, and a construction abnormality index is determined.

[0060] Regarding step 3.1 above, connectivity calculation is primarily used to eliminate regional holes caused by errors. Pixel neighborhood information is used to determine connectivity, placing pixels that may belong to the same connected domain in the same area to improve the contrast and clarity of the differential image. For the real-time background image a2, image matching is performed with the conventional background image a1. The background change areas are analyzed and connectivity calculation is performed on these changed areas. After excluding reasonable weather and lighting changes, if the image change area exceeds the specified threshold p1 or p2, it is determined to be a sudden background change, such as caused by abnormal parking, or a gradual background change caused by road construction.

[0061] Regarding step 3.2), when it is judged that the background changes suddenly, the target detection model is used to detect the number of accident vehicles y, and the time of the accident t is calculated. The value of the congestion index w2 is set to 1 to weight the trend of traffic congestion changes.

[0062] With respect to the above step 3.3), when it is determined that the background is gradually changing, the background image is updated, that is, the real-time background image a2 is used to replace the conventional background image a1, and the congestion index w3 is calculated. At the same time, the current road network flow obtained by the big data method is analyzed to make a long-term congestion forecast. In determining the construction anomaly index, the construction anomaly index can be determined based on the ratio of the construction area area to the traffic artery area in the background change area. That is, in an optional embodiment, the current road network flow is analyzed based on big data to determine long-term congestion forecast information for forecasting. The congestion index w3 is determined based on the ratio of the construction area area to the traffic artery area. For example, if the construction area accounts for 1 / 2 of the road area, the congestion index w3 is 0.5; if all traffic arteries are under construction, the congestion index is 1.

[0063] The background gradient described above refers to road construction, which is considered because it reduces the drivable area and can cause traffic congestion. Road construction typically involves placing warning signs and then gradually carrying out construction, which often takes longer than the time a traffic accident occupies the road. Figure 2 Figure 1 is a schematic diagram of background gradient, where (a) represents the checkpoint image under normal circumstances, and (b) represents the checkpoint image under construction. (b) is subjected to background difference operation to separate the real-time background image, which is then differentiated from the regular background image to obtain its changed area. After connectivity processing, it is shown in Figure (c).

[0064] In addition, if the image change area does not exceed the specified threshold value p1 or p2, the values ​​of the congestion indexes w2 and w3 are set to 0, indicating that the current objective road conditions are normal.

[0065] Congestion indices w1, w2, and w3 are compared with the congestion index w4, calculated using big data methods based on current road network traffic flow, to calculate the overall congestion index w. The formula for w is as follows: w = w1 + w2 + w3 + w4. The weights of w1, w2, w3, and w4 are initialized to 1 and can be adaptively adjusted based on the influencing factors of actual road checkpoints. When w exceeds a threshold, a traffic congestion report is issued, displaying the cause of the congestion.

[0066] This method is used for vehicle moving target x i The deep sort method is used for tracking. A unique ID number is generated for each vehicle detection target. Recursive Kalman filtering and frame-by-frame Hungarian data association are used to extract the target's appearance features for nearest neighbor matching. Even after the vehicle is obscured and reappears, it is still marked as the initial ID, which improves the accuracy of moving target tracking and accurately calculates the real-time speed v of a single vehicle. i The real-time speed of a single vehicle v iThe slower the speed, the more vehicles are queued at the checkpoint, and the larger the congestion index w1 is. In order to solve the problem of difficult tracking of targets after being obscured for a long time, the appearance features of the target are extracted to assist the Hungarian algorithm in nearest neighbor matching to improve the accuracy of target tracking.

[0067] This method matches a regular background image a1 with a real-time background image a2 and analyzes areas of background change to accurately determine the cause of traffic congestion. Because the camera monitoring range at a road traffic checkpoint is fixed, and the area of ​​the main traffic artery is fixed, the checkpoint background image only changes slightly with environmental factors such as weather and daylight. Therefore, when calculating the connectivity of the changing area, after excluding reasonable weather and light changes, if the image change area exceeds a specified threshold p1 or p2, it is determined to be a sudden background change, such as caused by abnormal parking, or a gradual background change caused by road construction.

[0068] To enhance the reliability of congestion warnings, this method assigns weights to influencing factors in different situations, assessing traffic congestion from multiple perspectives. While incorporating traffic big data to calculate real-time traffic flow, it also uses computer vision methods such as vehicle speed recognition and vehicle scratch detection as input for comprehensive analysis, more accurately pinpointing the causes of congestion and predicting changes in congestion trends based on the causes.

[0069] The embodiment of the present application calculates the congestion index with the help of traffic big data road flow, and uses visual algorithms to detect congestion, thereby improving the accuracy of traffic congestion judgment; uses computer vision algorithms to track vehicles appearing in road checkpoint videos, calculates vehicle speeds and the number of vehicles in queues, which can intuitively reflect traffic congestion conditions and improve the reliability of road traffic congestion warnings; by comparing historical data to detect traffic accidents, road traffic and other scenario-based situations, the causes of congestion are clarified, and the human and material resources required for traffic congestion judgment are reduced; combining the two methods can perform real-time traffic flow statistics and congestion status statistics on the current road network, and can also predict traffic flow, congestion status and changing trends in the future based on the causes of congestion.

[0070] A specific processing flow provided in the embodiment of this application is shown in Figure 3 As shown, the following steps S1 to S6 are included:

[0071] S1, obtain historical offline videos of road checkpoints.

[0072] S2, manually mark the main roads and obtain the normal background a1 of the checkpoint.

[0073] S3, using ViBe background extraction algorithm to separate moving targets x i and live background a2.

[0074] S4, for moving target xi Perform target tracking and compare the real-time background a2 with the regular background a1.

[0075] S5, judging the background change type based on the threshold, and assigning a value to determine its impact on traffic flow.

[0076] S6, compares the current road network traffic flow obtained by big data method and calculates the congestion index.

[0077] Through the above method, combined with traffic big data methods, computer vision algorithms are used to jointly judge traffic congestion; for background gradients, it can generate long-term congestion warnings for the traffic congestion index and synchronously update the conventional background. Since the construction and updating of the background model are key steps in the background difference method, real-time updating of the background image can avoid interference from factors such as weather and light on the background difference method; for background mutations, the target detection method is used to further detect accident vehicles and output detailed information about the accident vehicles.

[0078] By using this method to collect traffic congestion data at a certain checkpoint, explore the spatiotemporal characteristics of regular and occasional congestion data, learn to weight the traffic congestion index under different circumstances, gradually determine a reasonable weight index, and improve the accuracy of traffic congestion detection; design a scenario-based system that deeply integrates artificial intelligence with multi-dimensional and multi-factor congestion prediction and active control.

[0079] Based on the above method embodiment, the present application embodiment also provides a road traffic congestion prediction device, see Figure 4 As shown, the device mainly includes the following parts:

[0080] The image acquisition and processing module 402 is used to acquire a road checkpoint video, perform image preprocessing on the road checkpoint video, and obtain a first background image of the road checkpoint;

[0081] The object separation module 404 is used to perform object separation processing on the first background image to obtain a foreground object and a second background image;

[0082] A calculation module 406 is used to track the foreground target, determine the vehicle information at the road checkpoint, and calculate the vehicle congestion index of the road checkpoint based on the vehicle information;

[0083] Matching module 408, configured to perform image matching processing on the second background image and the first background image to determine a background change area;

[0084] The determination module 410 is configured to determine an abnormal congestion index based on the change type of the background change area; wherein the abnormal congestion index is used to represent the congestion index when an abnormality occurs on the road;

[0085] The prediction module 412 is configured to determine a target congestion index based on the vehicle congestion index and the abnormal congestion index, so as to predict road congestion using the target congestion index.

[0086] The road traffic congestion prediction device provided in an embodiment of the present application first acquires a road checkpoint video, performs image preprocessing on the road checkpoint video to obtain a first background image of the road checkpoint, then performs target separation processing on the first background image to obtain a foreground target and a second background image, then tracks the foreground target, determines vehicle information at the road checkpoint, and calculates the vehicle congestion index of the road checkpoint based on the vehicle information. The second background image is matched with the first background image to determine the background change area, and based on the change type of the background change area, determines an abnormal congestion index used to characterize abnormal road conditions. Finally, a target congestion index is determined based on the vehicle congestion index and the abnormal congestion index, so as to predict road congestion using the target congestion index. This method can improve the accuracy of traffic congestion judgment and the reliability of road traffic congestion warning.

[0087] In a feasible implementation manner, the image acquisition and processing module 402 is further configured to:

[0088] The road checkpoint video is deframed to obtain a picture set; interference objects are removed from the picture set frame by frame to determine the first background image of the road checkpoint corresponding to each frame.

[0089] In a feasible implementation manner, the calculation module 406 is further configured to:

[0090] Track foreground targets and calculate the real-time speed information of individual vehicles at the road checkpoint; determine the average speed of vehicles at the road checkpoint based on the number of vehicles queuing at the road checkpoint and the real-time speed information, and obtain the normal driving speed of the road checkpoint during normal driving per unit time and the total number of vehicles at the checkpoint; calculate the vehicle congestion index based on the average vehicle speed, normal driving speed, number of vehicles queuing, and total number of vehicles at the checkpoint.

[0091] In a feasible implementation manner, the calculation module 406 is further configured to:

[0092]

[0093] Among them, w1 is the vehicle congestion index; α is the real-time control coefficient; v s is the average vehicle speed; is the normal driving speed; n is the number of vehicles in the queue; is the total number of vehicles at the checkpoint.

[0094] In a feasible implementation manner, the abnormal congestion index includes an accident abnormality index and a construction abnormality index; the above-mentioned determination module 410 is further used to:

[0095] Connectivity calculation is performed on the background change area. After excluding the influence of weather and light, the abnormality type of the background change area is determined based on the preset threshold; the abnormality type includes background mutation caused by abnormal parking or background gradient caused by road construction; when the abnormality type is background mutation caused by abnormal parking, the number of accident vehicles is detected through the target detection model, the time of accident occurrence is calculated, and the accident abnormality index is set to the preset value; when the abnormality type is background gradient caused by road construction, the first background image is replaced by the second background image, and the construction abnormality index is determined.

[0096] In a feasible implementation manner, the determination module 410 is further configured to:

[0097] The construction anomaly index is determined based on the ratio of the construction area to the traffic artery area in the background change area.

[0098] In a feasible implementation manner, the above-mentioned device further includes a big data analysis module for:

[0099] Analyze the current road network traffic based on big data and determine long-term congestion forecast information for forecasting.

[0100] The road traffic congestion prediction device provided in the embodiment of the present application has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the embodiment of the road traffic congestion prediction device, reference may be made to the corresponding content in the aforementioned road traffic congestion prediction method embodiment.

[0101] The present application also provides an electronic device, such as Figure 5 As shown, it is a structural diagram of the electronic device, wherein the electronic device 100 includes a processor 51 and a memory 50, the memory 50 stores computer executable instructions that can be executed by the processor 51, and the processor 51 executes the computer executable instructions to implement any of the above-mentioned road traffic congestion prediction methods.

[0102] exist Figure 5 In the illustrated embodiment, the electronic device further includes a bus 52 and a communication interface 53 , wherein the processor 51 , the communication interface 53 and the memory 50 are connected via the bus 52 .

[0103] Among them, the memory 50 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 53 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 52 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 52 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0104] The processor 51 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor 51 or by software instructions. The above processor 51 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly implemented as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor 51 reads the information in the memory and completes the steps of the method for predicting road traffic congestion in the aforementioned embodiment in combination with its hardware.

[0105] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned road traffic congestion prediction method. The specific implementation can be found in the aforementioned method embodiment, which will not be repeated here.

[0106] The computer program product of the road traffic congestion prediction method, device, electronic device and storage medium provided in the embodiments of the present application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments and will not be repeated here.

[0107] Unless otherwise specifically stated, the relative steps, numerical expressions and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present application.

[0108] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0109] In the description of this application, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, or are the orientations or positional relationships in which the inventive product is typically placed when in use. These terms are intended only to facilitate the description of this application and simplify the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, they should not be construed as limiting this application. Furthermore, the terms "first," "second," etc., etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0110] Furthermore, terms such as "horizontal," "vertical," and "overhanging" do not necessarily imply that a component must be absolutely horizontal or overhanging, but rather that it can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal than "vertical," and does not mean that the structure must be completely horizontal, but rather that it can be slightly tilted.

[0111] It should also be noted that, in the description of this application, unless otherwise expressly specified or limited, the terms "disposed," "installed," "connected," and "connected" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to internal connections between two components. Those skilled in the art will understand the specific meanings of the above terms in this application based on the specific circumstances.

[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for predicting road traffic congestion, characterized in that: The method comprises: Acquire a road checkpoint video, perform image preprocessing on the road checkpoint video, and obtain a first background image of the road checkpoint; Performing object separation processing on the first background image to obtain a foreground object and a second background image; Tracking the foreground target, calculating the real-time speed information of a single vehicle at the road checkpoint; determining the average speed of vehicles at the road checkpoint based on the number of vehicles queued at the road checkpoint and the real-time speed information, and obtaining the normal driving speed of vehicles during normal driving at the road checkpoint per unit time and the total number of vehicles at the checkpoint; calculating the vehicle congestion index based on the average vehicle speed, the normal driving speed, the number of vehicles queued, and the total number of vehicles at the checkpoint, including: ; Among them, w1 is the vehicle congestion index; is the real-time control coefficient; is the average speed of the vehicle; Normal driving speed; The number of vehicles queued; is the total number of vehicles at the checkpoint; Performing image matching processing on the second background image and the first background image to determine a background change area; Determining an abnormal congestion index based on the change type of the background change area; wherein the abnormal congestion index is used to characterize the congestion index when an abnormality occurs on the road; the abnormal congestion index includes an accident abnormality index and a construction abnormality index; Determining an abnormal congestion index based on the change type of the background change area includes: performing connectivity calculation on the background change area, excluding the influence of weather and light, and then determining the abnormal type of the background change area based on a preset threshold; the abnormal type includes a sudden background change caused by abnormal parking or a gradual background change caused by road construction; when the abnormal type is a sudden background change caused by abnormal parking, detecting the number of accident vehicles through a target detection model, calculating the time of the accident, and setting the accident abnormality index to a preset value; when the abnormal type is a gradual background change caused by road construction, replacing the first background image with the second background image, and determining the construction abnormality index; A target congestion index is determined based on the vehicle congestion index and the abnormal congestion index, so as to perform road congestion prediction using the target congestion index.

2. The method for predicting road traffic congestion according to claim 1, characterized in that: Performing image preprocessing on the road checkpoint video to obtain a first background image of the road checkpoint includes: Deframe the road checkpoint video to obtain a picture set; Interference object removal processing is performed on the picture set frame by frame to determine the first background image of the road checkpoint corresponding to each frame of the picture.

3. The method for predicting road traffic congestion according to claim 1, characterized in that: Determine construction anomaly index, including: The construction anomaly index is determined based on the ratio of the construction area to the area of ​​the main traffic road in the background change area.

4. The method for predicting road traffic congestion according to claim 3, characterized in that: The method further comprises: Analyze the current road network traffic based on big data and determine long-term congestion forecast information for forecasting.

5. A device for predicting road traffic congestion, characterized in that: The device comprises: An image acquisition and processing module is used to acquire a road checkpoint video, perform image preprocessing on the road checkpoint video, and obtain a first background image of the road checkpoint; An object separation module is used to perform object separation processing on the first background image to obtain a foreground object and a second background image; A calculation module is configured to track the foreground target and calculate real-time speed information of a single vehicle at a road checkpoint; determine an average speed of vehicles at the road checkpoint based on the number of vehicles queued at the road checkpoint and the real-time speed information, and obtain a normal driving speed of vehicles during normal driving at the road checkpoint per unit time and a total number of vehicles at the checkpoint; and calculate a vehicle congestion index based on the average vehicle speed, the normal driving speed, the number of vehicles queued, and the total number of vehicles at the checkpoint, including: ; Among them, w1 is the vehicle congestion index; is the real-time control coefficient; is the average speed of the vehicle; Normal driving speed; The number of vehicles queued; is the total number of vehicles at the checkpoint; a matching module, configured to perform image matching processing on the second background image and the first background image to determine a background change area; A determination module, configured to determine an abnormal congestion index based on the change type of the background change area; wherein the abnormal congestion index is used to characterize the congestion index under abnormal conditions of the road; the abnormal congestion index includes an accident abnormality index and a construction abnormality index; The determination module is further configured to: perform connectivity calculation on the background change area, and after excluding the influence of weather and light, determine the abnormality type of the background change area based on a preset threshold; the abnormality type includes a sudden background change caused by abnormal parking or a gradual background change caused by road construction; when the abnormality type is a sudden background change caused by abnormal parking, detect the number of accident vehicles using a target detection model, calculate the time of the accident, and set the accident abnormality index to a preset value; when the abnormality type is a gradual background change caused by road construction, replace the first background image with the second background image, and determine the construction abnormality index; A prediction module is used to determine a target congestion index based on the vehicle congestion index and the abnormal congestion index, so as to perform road congestion prediction using the target congestion index.

6. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the method for predicting road traffic congestion according to any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the road traffic congestion prediction method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Video detection technology-based road jam judgement method

    CN102867415A

  • Background model extraction device, and method and device for detecting traffic congestion

    CN109479120A

  • Abnormal parking detection method and device, storage medium and electronic equipment

    CN113361299A