Traffic abnormal event processing method, system and device and storage medium
By splitting and processing video images, identifying traffic abnormal events, combining video streaming and heartbeat data, the problems of traffic violation image review and real-time traffic situation acquisition in the existing technology are solved, and the efficiency of rapid response and traffic order maintenance is achieved. promote.
Patent Information
- Application Number
- CN202411124758.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-07-18
- Filing Date
- 2024-08-15
- Publication Date
- 2024-12-06
AI Technical Summary
The existing technology cannot quickly and accurately handle traffic violation images and obtain traffic abnormalities in real time, making it difficult for law enforcement personnel to respond quickly and deal with traffic accidents, seriously affecting traffic order.
By acquiring video images and splitting them into image units, using optical flow algorithms and object detection models to extract traffic information, identify abnormal events, such as congestion and illegal stops, and integrate video streaming data with heartbeat data to quickly judge and feedback abnormalities event.
It realizes rapid judgment and response to traffic abnormal events, improves law enforcement efficiency, and ensures timely maintenance of traffic order.
Smart Images

Figure CN119091618A_ABST
Abstract
Description
[0001] Technology Neighborhood
[0002] The present invention relates to the field of image processing technology, and in particular to a method, system, device and storage medium for processing abnormal traffic events. Background Art
[0003] With the development of urbanization, urban traffic congestion and violations have become more prominent, seriously affecting the operation of cities and economic development.
[0004] Currently, the manual review method used to review traffic violation images captured by electronic police can no longer meet the review needs, and it is also impossible to quickly obtain on-site traffic conditions, which in turn results in law enforcement personnel being unable to accurately reach designated traffic sites to handle abnormal accidents, exacerbating the degree of traffic paralysis. Summary of the invention
[0005] The purpose of the present invention is to address the technical problems existing in the background technology and to propose a method, system, device and storage medium for handling abnormal traffic events.
[0006] In order to achieve the above technical objectives, the technical solution adopted by the present invention is as follows:
[0007] A first implementation of the first aspect of the present invention provides a method for handling abnormal traffic events, which is used to detect roads. The method for handling abnormal traffic events includes:
[0008] Acquire a video image of the road, and split the video image into single frames to obtain multiple image units;
[0009] Processing each of the image units to obtain traffic type information in each of the image units;
[0010] Based on a preset optical flow algorithm, the traffic type information is calculated and processed to obtain the operation information of each traffic type information in each direction;
[0011] Identify whether each of the operation information and / or each of the operation information meets a preset abnormal condition to detect an abnormal event;
[0012] Acquire the video stream data corresponding to the plurality of abnormal events, and integrate the plurality of video stream data with the heartbeat data of the corresponding time period to obtain a plurality of event integration information;
[0013] The integrated information of the plurality of events is transmitted to the terminal.
[0014] Optionally, in a second implementation manner of the first aspect of the present invention, the processing each of the image units to obtain the traffic type information in each of the image units includes:
[0015] According to a preset target detection model, capturing information of each category in each of the image units;
[0016] Based on the preset ByteTrack algorithm, the information of each category is processed to filter out the traffic type information.
[0017] Optionally, in a third implementation of the first aspect of the present invention, the road includes a trunk road and a non-trunk road, and after processing each of the image units to obtain the traffic type information in each of the image units, the method further includes:
[0018] Based on a preset road segmentation algorithm, the roads in the image units are segmented and screened to obtain trunk roads and traffic type information on the trunk roads.
[0019] Optionally, in a fourth implementation manner of the first aspect of the present invention, segmenting and screening the road in the image unit based on a preset road segmentation algorithm includes:
[0020] Based on a preset semantic segmentation model STDC-seg, segmenting the road in the image unit to obtain first image information;
[0021] removing noise points existing in the first image information to obtain second image information;
[0022] The preset filter is used to traverse the second image information, and information other than the main road in the second image information is filtered out to obtain the third image information.
[0023] Optionally, in a fifth implementation of the first aspect of the present invention, the abnormal condition includes a congestion threshold, the operation information includes movement rate information, and identifying that each of the operation information and / or each of the operation information meets a preset abnormal condition to detect an abnormal event includes:
[0024] Calculate the proportion of the operation information in each of the image units that is lower than a preset first rate threshold to obtain low rate quantity information;
[0025] Determining whether the low-rate quantity information is greater than the congestion threshold;
[0026] If it is greater than the congestion threshold, it is determined that the corresponding image unit is in a congested state;
[0027] Determining whether the duration of the image unit being in the congestion state is greater than a preset first time threshold;
[0028] If it is greater than the first time threshold, a congestion event is detected.
[0029] Optionally, in a sixth implementation of the first aspect of the present invention, the abnormal condition further includes a parking violation threshold, and the identifying that each of the operation information and / or each of the operation information meets a preset abnormal condition to detect an abnormal event includes:
[0030] Calculating the degree to which each of the movement speed information is lower than a preset second speed threshold to obtain a parking violation confidence;
[0031] Determining whether the illegal parking confidence is greater than the illegal parking threshold;
[0032] If it is greater than the illegal parking threshold, the traffic type information corresponding to the movement speed information is in an illegal parking state;
[0033] Determine whether the duration of the traffic type information being in the illegal parking state is greater than a preset second time threshold;
[0034] If it is greater than the second time threshold, an illegal parking event is detected.
[0035] Optionally, in a seventh implementation manner of the first aspect of the present invention, the identifying that each of the operation information and / or each of the operation information meets a preset abnormal condition to detect an abnormal event includes:
[0036] Acquire a plurality of neighboring traffic type information adjacent to the traffic type information and corresponding neighboring movement rate information;
[0037] Calculating the movement rate information of the traffic type information and a plurality of neighboring movement rate information respectively to obtain a neighborhood rate average difference;
[0038] Determine whether the neighborhood rate average difference is greater than a preset difference;
[0039] If it is greater than the difference, a parking violation event is detected.
[0040] A first implementation of the second aspect of the present invention provides a traffic abnormality event processing system, which includes:
[0041] An image single frame processing module, used for acquiring a video image of the road, splitting the video image into single frames to obtain a plurality of image units;
[0042] An identification module, used for processing each of the image units to obtain traffic type information in each of the image units;
[0043] An operation information module, used to calculate and process the traffic type information based on a preset optical flow algorithm to obtain operation information of each traffic type information in each direction;
[0044] A detection module, used to identify whether each of the operation information and / or each of the operation information meets a preset abnormal condition, so as to detect an abnormal event;
[0045] An integration module, used to obtain video stream data corresponding to a plurality of abnormal events, and integrate the plurality of video stream data with the heartbeat data of a corresponding time period to obtain a plurality of event integration information;
[0046] The delivery module is used to deliver the integrated information of the plurality of events to the terminal.
[0047] A first implementation of the third aspect of the present invention provides a traffic abnormality event processing device, the traffic abnormality event processing device comprising: a memory and at least one processor, the memory storing instructions, the memory and the at least one processor being interconnected via a line;
[0048] The at least one processor calls the instruction in the memory so that the traffic abnormality event processing device executes the traffic abnormality event processing method as described in any one of the first aspects of the present invention.
[0049] A first implementation method of the fourth aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for handling abnormal traffic events as described in any one of the above-mentioned first aspects of the present invention is implemented.
[0050] Compared with the prior art, the present invention has the following beneficial technical effects: splitting a video image into multiple image units in a single frame form, and extracting traffic type information in each of the image units, obtaining operation information of each traffic type information in each direction based on a preset optical flow algorithm, identifying each operation information and / or each operation information that meets preset abnormal conditions to detect abnormal events, integrating the video stream data corresponding to the multiple abnormal events with the heartbeat data of the corresponding time period to obtain multiple event integration information, and transmitting the multiple event integration information to the terminal, so as to realize rapid judgment and acquisition of abnormal events of on-site traffic, and integrate it with the corresponding video stream data and transmit it to the terminal, thereby improving the response to abnormal events and the feedback efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic diagram of a first embodiment of a method for handling abnormal traffic events in an embodiment of the present invention;
[0052] Figure 2 Schematic diagram of a second embodiment of the method for handling abnormal traffic events in an embodiment of the present invention;
[0053] Figure 3Schematic diagram of a third embodiment of the method for handling abnormal traffic events in an embodiment of the present invention;
[0054] Figure 4 Schematic diagram of a fourth embodiment of a method for handling abnormal traffic events according to an embodiment of the present invention;
[0055] Figure 5 Schematic diagram of a fifth embodiment of a method for handling abnormal traffic events according to an embodiment of the present invention;
[0056] Figure 6 A sixth embodiment schematic diagram of a method for handling abnormal traffic events according to an embodiment of the present invention;
[0057] Figure 7 A seventh embodiment of the method for handling abnormal traffic events according to an embodiment of the present invention is shown;
[0058] Figure 8 A schematic diagram of an embodiment of a system for handling abnormal traffic events in an embodiment of the present invention;
[0059] Fig. 9 A schematic diagram of an embodiment of a traffic abnormality event processing device in an embodiment of the present invention;
[0060] Fig.10 Schematic diagram of the YOLO model detection result in an embodiment of the present invention;
[0061] Fig.11 Schematic diagram of the detection result of ByteTrack algorithm in an embodiment of the present invention;
[0062] Fig.12 Schematic diagram of three processes of the road segmentation algorithm for image units in an embodiment of the present invention;
[0063] Fig.13 Two schematic diagrams of a process in which a filter performs filtering processing on the second image information to obtain the third image information in an embodiment of the present invention;
[0064] Fig.14 Schematic diagram of the integration process of heartbeat data and video stream data in an embodiment of the present invention;
[0065] Fig.15 The figure is a flow chart of integrating and deduplicating events using a sliding window method in an embodiment of the present invention. DETAILED DESCRIPTION
[0066] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0067] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or component referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", and the like may explicitly or implicitly include one or more features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0068] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or a specific connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances.
[0069] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1-Figure 15 In an embodiment of the present invention, a method for handling abnormal traffic events is used to detect roads. The method for handling abnormal traffic events includes:
[0070] 101. Acquire a video image of the road, and split the video image into single frames to obtain multiple image units;
[0071] In this embodiment, since the video image is composed of a plurality of image sequences that change over time, and each image is a frame, in order to facilitate more accurate processing of the picture in the video image, after acquiring the video image, the video image can be split frame by frame into a plurality of single-frame image units, and then each image unit can be processed separately.
[0072] 102. Process each of the image units to obtain traffic type information in each of the image units;
[0073] In this embodiment, each image unit displays a different picture, and each picture displays a vehicle, a vehicle position, etc. By analyzing a plurality of consecutive image units, the motion state of each vehicle therein can be obtained, as well as the state change of each vehicle in a unit time frame. Of course, it should be noted that the image unit contains not only vehicles, but also other non-motor vehicles, pedestrians, etc., which can easily interfere with the judgment of the vehicle motion state in the analysis of the image unit. Therefore, before analyzing the vehicle motion, other moving objects except the vehicle need to be excluded.
[0074] Furthermore, step 102 may further specifically execute:
[0075] 1021. Capturing information of each category in each of the image units according to a preset target detection model;
[0076] 1022. Based on the preset ByteTrack algorithm, the information of each category is processed to filter out the traffic type information.
[0077] In steps 1021-1022, the present solution is applied to drone equipment. The target detection model adopts the YOLOX model, and is pre-trained in the drone data set VisDrone. The YOLOX model is used to quickly capture various categories of information in each image unit, such as motor vehicles, non-motor vehicles, pedestrians, etc. As mentioned above, these categories of information cannot be used directly. Therefore, in order to filter out the vehicle information we need from these categories of information, the ByteTrack multi-target tracking algorithm is used to identify the various categories of information captured by the YOLOX model, and also assign corresponding identification IDs to quickly know the motion status of the corresponding targets. Among them, the judgment of the target category is added to the ByteTrack algorithm to exclude non-traffic category targets, so that we can obtain the desired traffic category data while reducing the corresponding analysis data volume.
[0078] Furthermore, after step 102, the following steps may be performed:
[0079] 103. Based on a preset road segmentation algorithm, the roads in the image units are segmented and screened to obtain trunk roads and traffic type information on the trunk roads.
[0080] Furthermore, in step 103, “segmenting and screening the roads in the image unit based on a preset road segmentation algorithm” may specifically be performed as follows:
[0081] 103a. Segment the road in the image unit based on a preset semantic segmentation model STDC-seg to obtain first image information;
[0082] 103b. Clear the noise points in the first image information to obtain second image information;
[0083] 103c. Use a preset filter to traverse the second image information and filter out information other than the main road in the second image information to obtain third image information.
[0084] In steps 103a-103c, the traffic anomalies of the main roads in the road are mainly analyzed. In addition to the influence of the above-mentioned non-traffic category targets, the non-main roads and other branches of the road will serve as interference items, so these interference items need to be eliminated. First, the semantic segmentation model STDC-seg is used to perform a morphological opening operation on the binary classification result of the semantic segmentation to obtain the first image information, the purpose of which is to disconnect the narrow neck between the segmented areas, and then remove small noise points and small objects in the first image information and fill the holes. This is to retain only the main road area in the image and exclude the influence of the surrounding non-main road areas; finally, the processing result is subjected to a morphological closing operation to obtain the corresponding Segmentation result of the smoothed second image information; It should be noted that, in this example, taking an image with a resolution of 1920×1080 as an example, the kernel sizes of the opening and closing operations are 38×38 and 64×64; Since the second image information may also contain information other than the main road, a filter is used to analyze the second image information to filter out the information other than the main road. Here, multiple detection frames are used, and the center coordinate position of each detection frame needs to be recorded, and the area of the main road of these detection frames is calculated. These detection frames are traversed to determine whether they are within the range of the main road. If so, they are retained; if not, they are removed, and finally a clean third image information is obtained.
[0085] 104. Based on a preset optical flow algorithm, the traffic type information is calculated and processed to obtain operation information of each traffic type information in each direction;
[0086] In this embodiment, under the motion perspective, the motion of the vehicle reflected at the image level will definitely be affected by the motion of the camera itself, and the camera motion will be reflected on the objects that should be stationary in the picture, that is, the influence of the background pixels needs to be subtracted. Therefore, the optical flow method is used to calculate and process the traffic type information, and the background pixel speed is fitted based on the following linear model formula: Subsequently, the background speed obtained by direct modeling eliminates the camera effect and is compared with the position-based threshold to determine whether each traffic type information is moving slowly. Specifically, a sliding window (10 frames, about 0.33s) is set, and for all traffic type information in the window, the average speed in all frames where it appears is taken as the speed of the current frame.
[0087] 105. Identify whether each of the operation information and / or each of the operation information meets a preset abnormal condition to detect an abnormal event;
[0088] Furthermore, the abnormal condition includes a congestion threshold, and the operation information includes movement rate information. Step 105 may further specifically perform:
[0089] 105a1, calculating the proportion of the operation information in each image unit that is lower than a preset first rate threshold, and obtaining low rate quantity information;
[0090] 105a2. Determine whether the low-rate quantity information is greater than the congestion threshold;
[0091] 105a3: If it is greater than the congestion threshold, it is determined that the corresponding image unit is in a congested state;
[0092] 105a4, determining whether the duration of the image unit being in the congestion state is greater than a preset first time threshold;
[0093] 105a5. If the time is greater than the first time threshold, a congestion event is detected.
[0094] In this embodiment, a congestion event is a collective event in which the speeds of multiple vehicles have problems. Therefore, in order to deal with a congestion event, it is necessary to analyze all traffic type information in each image unit to determine whether the operation information corresponding to these traffic type information is lower than the preset first speed threshold, and it is also necessary to calculate the proportion of the number of traffic type information lower than the preset first speed threshold to obtain low-speed quantity information. If this low-speed quantity information is greater than the congestion threshold, it can be temporarily determined that a congestion state occurs here. The reason why it cannot be directly determined as a congestion event here is that the vehicle group may only experience a low speed for a short period of time, so it is necessary to add more time judgment conditions. Once the duration of this congestion state exceeds the preset first time threshold, a congestion event is determined and detected.
[0095] Furthermore, the abnormal condition includes a parking violation threshold, and step 105 may further specifically perform:
[0096] 105b1. Calculate the degree to which each piece of movement speed information is lower than a preset second speed threshold to obtain a parking violation confidence level;
[0097] 105b2. Determine whether the illegal parking confidence is greater than the illegal parking threshold;
[0098] 105b3. If it is greater than the illegal parking threshold, the traffic type information corresponding to the movement speed information is in an illegal parking state;
[0099] 105b4. Determine whether the duration of the traffic type information being in the illegal parking state is greater than a preset second time threshold;
[0100] 105b5. If the time is greater than the second time threshold, a parking violation event is detected.
[0101] In this embodiment, illegal parking events are different from congestion events. They are single events. Therefore, the objects analyzed are concentrated on single traffic type information. It is only necessary to determine how much the movement rate information of the traffic type information is lower than the preset second rate threshold. This degree is used to calibrate the illegal parking confidence of the corresponding traffic type information. Similarly, illegal parking events also need to add a time judgment condition. Once the duration of the illegal parking state exceeds the preset second time threshold, the illegal parking event is determined and detected.
[0102] Furthermore, step 105 may further specifically execute:
[0103] 105c1. Acquire multiple neighboring traffic type information adjacent to the traffic type information and corresponding neighboring movement rate information;
[0104] 105c2, respectively calculating the movement rate information of the traffic type information and a plurality of neighboring movement rate information to obtain a neighborhood rate average difference;
[0105] 105c3. Determine whether the average difference in the neighborhood rates is greater than a preset difference;
[0106] 105c4. If it is greater than the difference, a parking violation event is detected.
[0107] In this embodiment, based only on the characteristic of slow individual movement, it is impossible to distinguish whether the slow movement is caused by congestion or illegal parking. Consider using the speed difference between the target vehicle and its neighboring vehicles in the two abnormal situations of congestion and illegal parking to distinguish. The neighbors of the illegally parked vehicle are usually normally traveling vehicles, so their speed will be significantly lower than the neighborhood speed, so there is a large difference; and the vehicles involved in the congestion event often form a cluster, and the neighboring vehicles of the congested vehicle are often also in a congested state, so their speed will not be significantly different from the neighborhood speed; for the scene without abnormal events, there should be a certain difference in speed between the normally traveling vehicle and the neighboring vehicle, but it will not be too large or too small, and it is between the speed difference of the congestion and illegal parking neighborhood.
[0108] The selection of neighboring vehicles is based on the Euclidean distance as a metric. Here, we take K unit distance as an example to find the K nearest neighbor vehicles. The speed difference v between vehicle 1 and vehicle 2 is 12 :
[0109] (1)v 12 =0,|v2|-|v1|≤0
[0110] (2)v 12 =|v2|-|v1|,|v2|-|v1|>0
[0111] Finally, we take the average of the speed differences of the K nearest neighboring vehicles as the neighborhood speed difference of vehicle 1.
[0112] 106. Obtain video stream data corresponding to a plurality of the abnormal events, and integrate the plurality of the video stream data with the heartbeat data of a corresponding time period to obtain a plurality of event integration information.
[0113] As attached Fig.14 As shown, since this method is applied to UAV equipment, the data transmission for abnormal events is combined with the heartbeat data of the UAV. Specifically, according to the time interval returned by the heartbeat data and the video frame rate and number of frames, the formatted data aligned with the simulation position information and the detection effect is exported.
[0114] As attached Fig.15 As shown, for the integration and deduplication of events, the present invention adopts a sliding window method. Specifically, for congestion events, when the event is triggered, the system continues to observe for a period of time. If the number of low-speed information in the middle is greater than the congestion threshold, the observation stops immediately and a congestion event is generated. If the congestion condition lasts longer than the first time threshold, a congestion event is also generated, and the observation is stopped after a period of time. For illegal parking events, when a vehicle triggers an illegal parking event, the system continues to observe for a period of time. If the vehicle leaves halfway and does not meet the second time threshold, it will not be detected. If other illegally parked vehicles are found in the middle, they will start recording at the same time and merge with the previous event. At the same time, the observation time is extended until the second time threshold is met to generate an illegal parking event.
[0115] 107. Transmit multiple event integration information to the terminal.
[0116] Specifically, the video image is split into multiple image units in the form of a single frame, and the traffic type information in each image unit is extracted. Based on the preset optical flow algorithm, the operation information of each traffic type information in each direction is obtained, and each operation information and / or each operation information meets the preset abnormal conditions to detect abnormal events, and the video stream data corresponding to the multiple abnormal events are respectively integrated with the heartbeat data of the corresponding time period to obtain multiple event integration information, and the multiple event integration information is transmitted to the terminal, so as to realize rapid judgment and acquisition of abnormal events of on-site traffic, and integrate it with the corresponding video stream data and transmit it to the terminal, so as to improve the response to abnormal events and feedback efficiency.
[0117] The above describes the method for handling abnormal traffic events in the embodiment of the present invention. The following describes the system for handling abnormal traffic events in the embodiment of the present invention. Figure 8, the traffic abnormality event processing system comprises:
[0118] An image single frame processing module 201 is used to obtain a video image of the road and split the video image into single frames to obtain multiple image units;
[0119] The recognition module 202 is used to process each of the image units to obtain traffic type information in each of the image units;
[0120] The operation information module 203 is used to calculate and process the traffic type information based on a preset optical flow algorithm to obtain the operation information of each traffic type information in each direction;
[0121] A detection module 204, used to identify whether each of the operation information and / or each of the operation information meets a preset abnormal condition, so as to detect an abnormal event;
[0122] The integration module 205 is used to obtain the video stream data corresponding to the multiple abnormal events, and integrate the multiple video stream data with the heartbeat data of the corresponding time period to obtain multiple event integration information.
[0123] The delivery module 206 is used to deliver the multiple event integration information to the terminal.
[0124] Specifically, the video image is split into multiple image units in the form of a single frame, and the traffic type information in each image unit is extracted. Based on the preset optical flow algorithm, the operation information of each traffic type information in each direction is obtained, and each operation information and / or each operation information meets the preset abnormal conditions to detect abnormal events, and the video stream data corresponding to the multiple abnormal events are respectively integrated with the heartbeat data of the corresponding time period to obtain multiple event integration information, and the multiple event integration information is transmitted to the terminal, so as to realize rapid judgment and acquisition of abnormal events of on-site traffic, and integrate it with the corresponding video stream data and transmit it to the terminal, so as to improve the response to abnormal events and feedback efficiency.
[0125] The identification module 202 may also be specifically used for:
[0126] According to a preset target detection model, capturing information of each category in each of the image units;
[0127] Based on the preset ByteTrack algorithm, the information of each category is processed to filter out the traffic type information.
[0128] The roads include trunk roads and non-truncal roads, and after the identification module 202, the following is also included:
[0129] Based on a preset road segmentation algorithm, the roads in the image units are segmented and screened to obtain trunk roads and traffic type information on the trunk roads.
[0130] Wherein, “segmenting and screening the roads in the image unit based on a preset road segmentation algorithm” can also be specifically used for:
[0131] Based on a preset semantic segmentation model STDC-seg, segmenting the road in the image unit to obtain first image information;
[0132] removing noise points existing in the first image information to obtain second image information;
[0133] The preset filter is used to traverse the second image information, and information other than the main road in the second image information is filtered out to obtain the third image information.
[0134] The abnormal condition includes a congestion threshold, the operation information includes movement rate information, and the detection module 204 can also be specifically used for:
[0135] Calculate the proportion of the operation information in each of the image units that is lower than a preset first rate threshold to obtain low rate quantity information;
[0136] Determining whether the low-rate quantity information is greater than the congestion threshold;
[0137] If it is greater than the congestion threshold, it is determined that the corresponding image unit is in a congested state;
[0138] Determining whether the duration of the image unit being in the congestion state is greater than a preset first time threshold;
[0139] If it is greater than the first time threshold, a congestion event is detected.
[0140] The abnormal condition also includes a parking violation threshold, and the detection module 204 can also be specifically used for:
[0141] Calculating the degree to which each of the movement speed information is lower than a preset second speed threshold to obtain a parking violation confidence;
[0142] Determining whether the illegal parking confidence is greater than the illegal parking threshold;
[0143] If it is greater than the illegal parking threshold, the traffic type information corresponding to the movement speed information is in an illegal parking state;
[0144] Determine whether the duration of the traffic type information being in the illegal parking state is greater than a preset second time threshold;
[0145] If it is greater than the second time threshold, an illegal parking event is detected.
[0146] The detection module 204 may also be specifically used for:
[0147] Acquire a plurality of neighboring traffic type information adjacent to the traffic type information and corresponding neighboring movement rate information;
[0148] Calculating the movement rate information of the traffic type information and a plurality of neighboring movement rate information respectively to obtain a neighborhood rate average difference;
[0149] Determine whether the neighborhood rate average difference is greater than a preset difference;
[0150] If it is greater than the difference, a parking violation event is detected.
[0151] above Figure 8 The traffic abnormality event processing system in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The traffic abnormality event processing device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0152] Fig. 9 1 is a schematic diagram of the structure of a traffic abnormality event processing device provided by an embodiment of the present invention. The traffic abnormality event processing device 300 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 310 (for example, one or more processors) and a memory 320, and one or more storage media 330 (for example, one or more mass storage devices) storing application programs 333 or data 332. Among them, the memory 320 and the storage medium 330 may be temporary storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the traffic abnormality event processing device 300. Furthermore, the processor 310 may be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the traffic abnormality event processing device 300.
[0153] The traffic abnormality event processing device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 331, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that Figure 3The structure of the traffic abnormal event processing device shown does not constitute a limitation on the communication protocol device based on LAN screen projection, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0154] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the method for handling abnormal traffic events.
[0155] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or 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, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0156] The above is a method or multiple implementation methods for handling abnormal traffic events provided in combination with specific content, and it is not intended that the specific implementation of the present invention is limited to these descriptions. Any method, structure, etc. similar to or identical to the present invention, or any technical deduction or replacement based on the concept of the present invention, shall be deemed to be within the protection scope of the present invention.
Claims
1. A method for handling abnormal traffic events, which is used to detect roads, characterized in that: include: Acquire a video image of the road, and split the video image into single frames to obtain multiple image units; Processing each of the image units to obtain traffic type information in each of the image units; Based on a preset optical flow algorithm, the traffic type information is calculated and processed to obtain the operation information of each traffic type information in each direction; Identify whether each of the operation information and / or each of the operation information meets a preset abnormal condition to detect an abnormal event; Acquire the video stream data corresponding to the plurality of abnormal events, and integrate the plurality of video stream data with the heartbeat data of the corresponding time period to obtain a plurality of event integration information; The integrated information of the plurality of events is transmitted to the terminal.
2. A method for handling abnormal traffic events according to claim 1, characterized in that: The processing of each of the image units to obtain the traffic type information in each of the image units includes: According to a preset target detection model, capturing information of each category in each of the image units; Based on the preset ByteTrack algorithm, the information of each category is processed to filter out the traffic type information.
3. A method for handling abnormal traffic events according to claim 2, characterized in that: The roads include trunk roads and non-truncal roads. After processing each of the image units to obtain the traffic type information in each of the image units, the method further includes: Based on a preset road segmentation algorithm, the roads in the image units are segmented and screened to obtain trunk roads and traffic type information on the trunk roads.
4. A method for handling abnormal traffic events according to claim 1, characterized in that: The segmenting and screening of the road in the image unit based on a preset road segmentation algorithm includes: Based on a preset semantic segmentation model STDC-seg, segmenting the road in the image unit to obtain first image information; removing noise points existing in the first image information to obtain second image information; The preset filter is used to traverse the second image information, and information other than the main road in the second image information is filtered out to obtain the third image information.
5. A method for handling abnormal traffic events according to claim 1, characterized in that: The abnormal condition includes a congestion threshold, the operation information includes movement rate information, and the identifying that each of the operation information and / or each of the operation information meets the preset abnormal condition to detect the abnormal event includes: Calculate the proportion of the operation information in each of the image units that is lower than a preset first rate threshold to obtain low rate quantity information; Determining whether the low-rate quantity information is greater than the congestion threshold; If it is greater than the congestion threshold, it is determined that the corresponding image unit is in a congested state; Determining whether the duration of the image unit being in the congestion state is greater than a preset first time threshold; If it is greater than the first time threshold, a congestion event is detected.
6. A method for handling abnormal traffic events according to claim 5, characterized in that: The abnormal condition also includes a parking violation threshold, and the identifying that each of the operation information and / or each of the operation information meets the preset abnormal condition to detect the abnormal event includes: Calculating the degree to which each of the movement speed information is lower than a preset second speed threshold to obtain a parking violation confidence; Determining whether the illegal parking confidence is greater than the illegal parking threshold; If it is greater than the illegal parking threshold, the traffic type information corresponding to the movement speed information is in an illegal parking state; Determine whether the duration of the traffic type information being in the illegal parking state is greater than a preset second time threshold; If it is greater than the second time threshold, an illegal parking event is detected.
7. A method for handling abnormal traffic events according to claim 6, characterized in that: The step of identifying that each of the operation information and / or each of the operation information meets a preset abnormal condition to detect an abnormal event includes: Acquire a plurality of neighboring traffic type information adjacent to the traffic type information and corresponding neighboring movement rate information; Calculating the movement rate information of the traffic type information and a plurality of neighboring movement rate information respectively to obtain a neighborhood rate average difference; Determine whether the neighborhood rate average difference is greater than a preset difference; If it is greater than the difference, a parking violation event is detected.
8. A traffic abnormality event processing system, characterized in that: include: An image single frame processing module, used for acquiring a video image of the road, splitting the video image into single frames to obtain a plurality of image units; An identification module, used for processing each of the image units to obtain traffic type information in each of the image units; An operation information module, used to calculate and process the traffic type information based on a preset optical flow algorithm to obtain operation information of each traffic type information in each direction; A detection module, used to identify each of the operation information and / or each of the operation information meets a preset abnormal condition, so as to detect an abnormal event; An integration module, used to obtain video stream data corresponding to a plurality of abnormal events, and integrate the plurality of video stream data with the heartbeat data of a corresponding time period to obtain a plurality of event integration information; The delivery module is used to deliver the integrated information of the plurality of events to the terminal.
9. A traffic abnormality event processing device, characterized in that: The traffic abnormality event processing device comprises: a memory and at least one processor, the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor calls the instruction in the memory so that the traffic abnormality event processing device executes the traffic abnormality event processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for handling abnormal traffic events according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Highway event data false alarm processing system
CN121861891A
A highway incident data false positive processing system
CN121861891B
