Truck red light running snapshot system based on time-space consistency detection

The capture system based on spatiotemporal consistency detection solves the problem of low efficiency in capturing large trucks running red lights, achieving efficient and economical capture results, reducing hardware costs and improving capture accuracy.

CN121963492APending Publication Date: 2026-05-01HUAIAN MUNICIPAL PUBLIC SECURITY BUREAU HUAIAN BRANCH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-18
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing technologies are insufficient to effectively capture large trucks running red lights, with an effectiveness rate of less than 2%. Furthermore, complex recognition algorithms increase hardware costs and maintenance burdens, have poor adaptability, and fail to create a deterrent effect.

Method used

By using spatiotemporal consistency detection and synchronizing the time synchronization module with the electronic police camera and the checkpoint camera, and combining the image acquisition, storage, spatiotemporal retrieval and license plate matching judgment modules, accurate matching of electronic police images and checkpoint images can be achieved, avoiding complex algorithm analysis.

Benefits of technology

The effectiveness of capturing large trucks running red lights has been increased to 81.5%, reducing hardware investment and maintenance costs, and creating an effective deterrent effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121963492A_ABST
    Figure CN121963492A_ABST
Patent Text Reader

Abstract

The invention discloses a truck red light running snapshot system based on space-time consistency detection, and relates to the technical field of space-time information processing, and the system comprises a time calibration module which carries out the time calibration, and enables the time of all devices to be synchronized; the image acquisition module is used for triggering and capturing a red light running electric alarm picture when the vehicle runs the red light, and synchronously triggering and capturing a vehicle foot clamping bayonet picture; the front-end storage module is used for receiving and storing the electric police picture and the bayonet picture; the space-time retrieval module retrieves the checkpoint picture in the forced synthesis time interval by taking the illegal time of the electronic police picture as a reference; the license plate matching judgment module is used for judging whether a picture consistent with an electronic police picture license plate exists in the checkpoint pictures retrieved by the space-time retrieval module or not; and the image synthesis output module is used for outputting illegal pictures according to the matching synthesis result of the license plate matching judgment module and the retrieval result of the space-time retrieval module. According to the invention, the problem of low snapshot efficiency in the existing red light running snapshot technology of the truck is solved; the effect of standardizing the road traffic order is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

A system for capturing trucks running red lights based on spatiotemporal consistency detection Technical Field

[0001] This invention relates to the field of spatiotemporal information processing technology, and more specifically, to a system for capturing large trucks running red lights based on spatiotemporal consistency detection. Background Technology

[0002] Due to their length, easily obscured or damaged license plates, and poor lighting conditions at night, conventional methods of capturing large trucks running red lights are ineffective, with an efficiency rate of less than 2%. The inability to penalize them after committing violations leads to the persistent and escalating problem of large trucks running red lights, seriously impacting road safety. In 2024, "large trucks running red lights" ranked fifth among traffic violations causing fatal accidents, highlighting its extremely high risk. Finding effective methods to address this issue, such as capturing and penalizing large trucks for running red lights, would have a powerful deterrent effect, preventing them from running red lights and ensuring road safety.

[0003] Shortcomings of existing technology:

[0004] Existing technology relies on matching images from electronic police (rear of the vehicle) and checkpoints (front of the vehicle) based on the consistency of the front and rear license plates. However, most large trucks are combinations of tractor-trailers and semi-trailers, and the two have different license plates. This causes the core logic of identifying illegal vehicles by matching license plates to frequently fail, making it impossible to accurately associate illegal vehicles.

[0005] When license plate consistency matching fails, complex recognition algorithms such as machine learning and artificial intelligence are needed to match images. However, in scenarios with dense traffic (small distance between vehicles), similar vehicle shapes, or poor ambient light at night, the algorithm is prone to mismatching images of different vehicles, which is difficult to detect by manual review, resulting in a high error rate in evidence collection (such as more than 10 mismatches within a week in the test).

[0006] Due to issues such as obscured / damaged license plates, poor nighttime lighting, and mismatched data, the current technology is less than 2% effective in capturing trucks running red lights. This makes it difficult to effectively punish offending vehicles and fails to create a deterrent effect, resulting in the persistent problem of trucks running red lights. This has become a major cause of fatal road accidents (ranking fifth among traffic violations causing fatal accidents in 2024, according to the Institute of Transportation Science).

[0007] Complex recognition algorithms require the deployment of GPU servers for secondary image analysis, which not only increases hardware investment and maintenance costs, but also prolongs the generation time of illegal images. Furthermore, both new intersection infrastructure and old intersection renovations require additional investment, resulting in poor adaptability.

[0008] To address the above problems, this invention proposes a solution. Summary of the Invention

[0009] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a system for capturing large trucks running red lights based on spatiotemporal consistency detection, thereby solving the problems mentioned in the background art by detecting large trucks running red lights through spatiotemporal consistency detection.

[0010] To achieve the above objectives, the present invention provides the following technical solution:

[0011] A system for capturing trucks running red lights based on spatiotemporal consistency detection includes a time synchronization module, an image acquisition module, a front-end storage module, a spatiotemporal retrieval module, a license plate matching and judgment module, and an image synthesis and output module. These modules are interconnected.

[0012] The time synchronization module is used to calibrate the time of the image acquisition module and the front-end storage module to synchronize the time of each device;

[0013] The image acquisition module includes an electronic police camera and a checkpoint camera. The electronic police camera is used to trigger and capture images of vehicles running red lights; the checkpoint camera is used to simultaneously trigger and capture images of vehicles trapped in a checkpoint.

[0014] The front-end storage module is used to receive and store the electronic alarm images and checkpoint images transmitted by the image acquisition triggering module;

[0015] The spatiotemporal retrieval module presets a mandatory synthesis time interval, and retrieves checkpoint images within the mandatory synthesis time interval based on the violation time of the electronic police images;

[0016] The license plate matching and judgment module is used to determine whether there is an image with the same license plate as the electronic police image in the checkpoint image retrieved by the spatiotemporal retrieval module. If there is, the precise matching logic is triggered; if there is not, the time nearest neighbor matching logic is triggered.

[0017] The image synthesis output module is used to output the final illegal image based on the matching and synthesis results of the license plate matching judgment module and the retrieval results of the spatiotemporal retrieval module.

[0018] In a preferred embodiment, the forced synthesis time interval is the maximum value of the time difference between the capture time of the electronic police image and the checkpoint image.

[0019] In a preferred embodiment, the electronic police camera is installed behind the stop line at the intersection, with the lens facing the direction of vehicle travel. When a vehicle triggers the red light violation detection, the camera immediately captures a red light violation image, which includes the complete trajectory of the vehicle running the red light and the features of the rear of the vehicle.

[0020] The checkpoint camera is installed on the traffic light pole at the intersection exit. By adjusting the position of its capture trigger line, the checkpoint camera and the electronic police camera are triggered synchronously to capture images when a vehicle passes the stop line at the intersection. The capture range of the checkpoint camera covers the same direction and lane, and the captured images include the front of the vehicle and clear license plate information.

[0021] In a preferred embodiment, the spatiotemporal retrieval module is implemented as follows:

[0022] The system receives electronic police images transmitted from the front-end storage module, extracts key retrieval parameters including the electronic police violation timestamp e, the target lane, and the direction of travel, and simultaneously reads the preset forced synthesis time interval t. Combined with the electronic police violation timestamp e, the retrieval time range is determined to be [et, e+t].

[0023] The query interface of the index database of the front-end storage module is called, and the filtering logic prioritizes matching checkpoint images that are "within the search range, have the same lane as the electronic police image, and have the same driving direction".

[0024] If no matching checkpoint image is found in the statistical search results, a "no matching checkpoint image" feedback message is generated and sent to the image synthesis output module.

[0025] If a checkpoint image that matches the criteria is found, a search results list of all checkpoint images is generated and synchronously transmitted to the license plate matching and judgment module.

[0026] In a preferred embodiment, the license plate matching and determination module is implemented as follows:

[0027] License plate information is extracted from electronic police images and checkpoint images to obtain license plate strings for both electronic police images and checkpoint images.

[0028] Based on the license plate strings of the electronic police images and the license plate strings of each checkpoint image, a license plate similarity comparison is performed, and the similarity coefficient between the electronic police images and the corresponding checkpoint images is calculated.

[0029] The similarity coefficient is used to determine whether there are any images among the retrieved checkpoint images that match the license plates of the vehicles in the electronic police images;

[0030] If the retrieved checkpoint images contain a license plate that matches the one in the electronic police image, the precise matching logic is triggered.

[0031] If the retrieved checkpoint images do not contain an image with the same license plate as the electronic police image, the time nearest neighbor matching logic is triggered.

[0032] In a preferred embodiment, the process of extracting license plate information from the electronic police images and checkpoint images is as follows:

[0033] For traffic camera images, a license plate localization and recognition algorithm based on convolutional neural networks is adopted. The algorithm extracts the vehicle's rear region through grayscale conversion and edge detection, then uses the YOLOv5 object detection model to locate the license plate position, and finally uses a CRNN to recognize the license plate characters, outputting the license plate string from the traffic camera image. and identification confidence level ;

[0034] For the list of checkpoint images output by the spatiotemporal retrieval module, perform the same license plate recognition process on each checkpoint image and output the license plate string for each checkpoint image. (Number of checkpoint images) and corresponding recognition confidence level , filter out Valid license plates at checkpoints were used to eliminate invalid data with low confidence levels.

[0035] In a preferred embodiment, license plate similarity is compared based on the license plate strings in the electronic police images and the license plate strings in each checkpoint image, as follows:

[0036] Calculating the license plate of electronic police vehicle using a character-level edit distance algorithm With each valid checkpoint license plate The similarity is calculated, and the core output metric of this algorithm is the edit distance D. The representative will Convert to The minimum number of character operations required is calculated using the following formula:

[0037] ;

[0038] in, It is the edit distance; Represents license plate string Length; It is the substring of the electronic police vehicle license plate string starting from the second character, used to recursively calculate the edit distance of the substring; It is the substring of the license plate string at the checkpoint, starting from the second character;

[0039] Edit distance Normalized to similarity coefficient To eliminate the impact of license plate length differences, the calculation formula is as follows:

[0040] ;

[0041] in, Values ​​range from 0 to 1. This indicates that the license plates are completely identical. The license plate was determined to be the same.

[0042] In a preferred embodiment, the process of triggering precise matching logic if it exists and triggering time nearest neighbor matching logic if it does not exist is as follows:

[0043] Iterate through all valid license plates at checkpoints; if a similarity coefficient exists... If the license plate of a vehicle at a checkpoint matches the license plate in the traffic camera image, then a checkpoint image matching the license plate of that vehicle is identified, triggering the exact matching logic process as follows:

[0044] Based on similarity coefficient From the checkpoint images, select the recognition confidence level. The image with the highest confidence level is used as the matching result. If there are multiple images with the same confidence level, the difference between the capture time of the checkpoint image and the violation time of the electronic police is further compared, and the checkpoint image with the smallest difference is selected as the matching result.

[0045] If the similarity coefficient of all license plates at checkpoints If no matching license plate is found, the time nearest neighbor matching logic is triggered as follows:

[0046] Calculate the capture time for each valid checkpoint image. Time of violation by electronic police absolute value of time difference Select The smallest checkpoint image is used as the matching result; if multiple images exist... For the same image, select the recognition confidence level. The highest-ranking image is used as the matching result.

[0047] In a preferred embodiment, the process of outputting the final violation image based on the matching and synthesis results of the license plate matching and judgment module, combined with the retrieval results of the spatiotemporal retrieval module, is as follows:

[0048] If the spatiotemporal retrieval module receives feedback information about no matching checkpoint image from the image synthesis output module, the electronic police image will be directly output as the violation image.

[0049] If no matching checkpoint image feedback information is received from the spatiotemporal retrieval module to the image synthesis output module, the optimal matching checkpoint image is obtained based on the matching result of the license plate matching judgment module. The electronic police image is then synthesized with the corresponding matching checkpoint image, and the final violation image is output.

[0050] In a preferred embodiment, the specific process of combining the electronic police image with the corresponding matching checkpoint image is as follows:

[0051] Retrieve images of electronic police cameras and corresponding matching checkpoint images, unify the resolution through bilinear interpolation, and perform preprocessing using gamma correction and adaptive histogram equalization based on the scene.

[0052] The system uses a fixed column structure. The left side of the screen contains a pre-processed image of an electronic police vehicle, which is labeled with the process of running a red light. The right side of the screen contains a pre-processed image of a checkpoint and is labeled with the license plate information. The two areas are separated by a gray solid line.

[0053] A semi-transparent information bar is generated at the bottom of the composite image, and the basic information of the violation, the matching identifier, and the device information are marked in the order of "left-middle-right". The font format and color of each area are fixed.

[0054] Compliance verification is performed using OCR, and qualified composite images are stored in the front-end storage module.

[0055] The technical effects and advantages of the present invention: a system for capturing large trucks running red lights based on spatiotemporal consistency detection.

[0056] 1. This invention achieves time synchronization (error ≤ 10 milliseconds) between the electronic police camera, the checkpoint camera, and the front-end storage module through a time synchronization module, and adjusts the installation position of the checkpoint camera and the capture trigger line to ensure that the capture of the same vehicle by the two types of cameras meets the spatiotemporal consistency, completely avoiding the license plate error problem caused by the existing technology relying on complex recognition algorithms to match images. In practical applications, the license plate error rate is 0.

[0057] 2. This invention adjusts the installation location of existing checkpoint cameras, eliminating the need for new infrastructure and GPU servers. It is adaptable to both new and old intersections with extremely low deployment costs. Furthermore, through a highly efficient synthesis process of "preprocessing-column splicing-information overlay-compliance verification," it eliminates the need for complex secondary algorithm analysis. The speed of generating violation images is consistent with conventional capture methods. After application, the capture effectiveness rate increases from less than 2% to 81.5%, and the number of violations at a single intersection decreases by two-thirds within six months, demonstrating both economic efficiency and effective control. Attached Figure Description

[0058] Figure 1 is a schematic diagram of the structure of a red-light violation detection system for large trucks based on spatiotemporal consistency detection according to the present invention.

[0059] Figure 2 is a schematic diagram of the process for capturing large trucks running red lights based on spatiotemporal consistency detection according to the present invention. Detailed Implementation

[0060] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0061] Example 1, Figure 1 shows a red-light violation capture system for large trucks based on spatiotemporal consistency detection according to the present invention.

[0062] The time synchronization module is used to calibrate the time of the image acquisition module and the front-end storage module to synchronize the time of each device;

[0063] Before image acquisition, a time synchronization server in the computer room is used to calibrate the time of the image acquisition module (including traffic enforcement cameras and checkpoint cameras) and the front-end storage module via Network Time Protocol (NTP). The specific process includes three stages: initialization calibration, periodic verification, and anomaly compensation. The process for each stage is as follows:

[0064] Phase 1: The time synchronization module connects to the Internet to obtain a standard time source (such as the National Time Service Center NTP server, IP address 210.72.145.44), completes its own clock calibration, and ensures that the reference time error is ≤1 millisecond; it establishes communication connections with the electronic police camera, checkpoint camera, and front-end storage module of the image acquisition module through the local area network, and sends time synchronization request commands; after receiving the request, each target device (electronic police camera, checkpoint camera, front-end storage module) feeds back its current clock information to the time synchronization module;

[0065] Calculate the deviation between each device's clock and the standard time. If the deviation is greater than 10 milliseconds, send a time correction command to the corresponding device to adjust its clock to match the standard time. If the deviation is less than or equal to 10 milliseconds, determine that the device clock meets the synchronization requirements and complete the initial calibration.

[0066] Phase Two: The time synchronization module has a preset verification cycle of 1 hour. The time synchronization verification process is automatically triggered every 1 hour. The current clock information of each device is re-acquired according to the logic in "Phase One", and the deviation is calculated by comparing it with the standard time. If the clock deviation of any device is >10 milliseconds, the time correction is performed immediately. If the deviation of all devices is ≤10 milliseconds, the current clock state is maintained and the next verification cycle is entered.

[0067] Phase 3: The time synchronization module monitors the communication link status and time synchronization stability of each device in real time. If a communication interruption (such as network fluctuations) or abnormal device clock drift rate (such as a deviation increase of >5 milliseconds within 10 minutes) is detected, the abnormal compensation process is immediately triggered. The communication link is repaired first (such as automatically switching to a backup LAN node). After the link is restored, the calibration operation in steps 2-4 of "Phase 1" is performed to quickly compensate for the time deviation. After the abnormal compensation is completed, the time synchronization module generates a calibration log, recording the time of the abnormality, the deviation value and the correction result, and stores it in the front-end storage module for easy subsequent operation and maintenance troubleshooting.

[0068] The image acquisition module includes an electronic police camera and a checkpoint camera. The electronic police camera is used to trigger and capture images of vehicles running red lights; the checkpoint camera is used to simultaneously trigger and capture images of vehicles trapped in a checkpoint.

[0069] The electronic police camera is installed behind the stop line at the intersection, with the lens facing the direction of vehicle travel. When a vehicle triggers the red light violation detection (such as crossing the stop line), it immediately captures a red light violation image. The image includes the complete trajectory of the vehicle running the red light and the characteristics of the rear of the vehicle.

[0070] The checkpoint camera is installed on the traffic light pole at the intersection exit. By adjusting the position of its capture trigger line, the checkpoint camera and the electronic police camera will be triggered synchronously to capture images when a vehicle passes the stop line at the intersection. The capture range of the checkpoint camera covers the same direction and lane, and the captured images include the front of the vehicle and clear license plate information.

[0071] Based on the time synchronization of the time synchronization module, the red light violation trigger signal of the electronic police camera and the clamp trigger signal of the checkpoint camera are completely aligned in the time dimension, ensuring that the capture time difference between the electronic police image and the checkpoint image of the same vehicle is within the forced synthesis time interval, thus meeting the requirements of spatiotemporal consistency.

[0072] The front-end storage module is used to receive and store the electronic alarm images and checkpoint images transmitted by the image acquisition triggering module;

[0073] The front-end storage module establishes a real-time data transmission link with the electronic police camera and checkpoint camera via Ethernet, and each camera is independently allocated a data receiving port. After the camera completes the capture, the image is automatically uploaded to the front-end storage module in JPEG format along with metadata. After receiving the data, the module immediately generates a unique file identifier (format: "device number-timestamp-lane number") to avoid data name conflicts.

[0074] The front-end storage module adopts a partitioned storage strategy, establishing a three-level directory structure based on "date-device type-lane" to classify and store electronic police images and checkpoint images into the corresponding directories; at the same time, a data backup mechanism is enabled, automatically synchronizing new images to the local redundant disk every hour, with a storage period preset to 90 days. Expired images are automatically deleted according to the "first-in, first-out" principle to free up storage space;

[0075] When receiving images, the front-end storage module synchronously extracts the "capture timestamp", "lane information" and "device number" from the metadata to build an index database. The index data is updated in real time and supports fast queries by time range, lane and device type. The response time for a single index query is ≤100 milliseconds, providing a data retrieval foundation for the subsequent spatiotemporal retrieval module.

[0076] The spatiotemporal retrieval module presets a mandatory synthesis time interval, and retrieves checkpoint images within the mandatory synthesis time interval based on the violation time of the electronic police images;

[0077] The forced synthesis time interval is the maximum value of the time difference between the capture time of the electronic police image and the checkpoint image.

[0078] The system receives the metadata of the electronic traffic enforcement camera images transmitted from the front-end storage module, extracts key retrieval parameters, including the timestamp of the violation e (e.g., "2025-11-15 14:30:25.123"), the target lane (e.g., "Lane 2"), and the direction of travel (e.g., "North to South"); simultaneously, it reads the preset forced synthesis time interval t, and combines it with the timestamp of the violation e to determine the retrieval time range as [et, e+t].

[0079] The system calls the index database query interface of the front-end storage module to filter checkpoint images based on the combination of "retrieval time range + target lane + driving direction". The filtering logic prioritizes matching checkpoint images that are "within the retrieval range, the lane matches the electronic police image, and the driving direction is the same", and excludes invalid data that crosses lanes, is in the opposite direction, or has a time that is outside the range. The retrieval process uses multi-threaded parallel query, and the retrieval time for a single electronic police image corresponding to a checkpoint image is ≤500 milliseconds.

[0080] If no matching checkpoint image is found, the system generates a "No matching checkpoint image" feedback message and sends it to the image synthesis output module. If one or more matching checkpoint images are found, the system sorts the metadata of all checkpoint images (including capture timestamp, license plate recognition result, and image storage path) in ascending order by the absolute value of the difference between the capture time and the electronic police violation time, generates a search result list, and synchronously transmits it to the license plate matching judgment module to provide data support for subsequent matching logic.

[0081] The license plate matching and judgment module is used to determine whether there is an image with the same license plate as the electronic police image in the checkpoint image retrieved by the spatiotemporal retrieval module. If there is, the precise matching logic is triggered; if there is not, the time nearest neighbor matching logic is triggered.

[0082] The process of determining whether there is an image matching the license plate of a vehicle in the traffic camera image among the checkpoint images retrieved by the spatiotemporal retrieval module is as follows:

[0083] First, license plate information is extracted from the traffic camera images and checkpoint images. The process is as follows:

[0084] For traffic camera images, a license plate localization and recognition algorithm based on convolutional neural networks (CNN) is adopted. First, the rear region of the vehicle is extracted through grayscale conversion and edge detection (Canny operator). Then, the YOLOv5 object detection model is used to locate the license plate position. Finally, CRNN (convolutional recurrent neural network) is used to recognize the license plate characters (including Chinese characters, letters, and numbers), and the license plate string of the traffic camera image is output. (e.g., "Su H12345") and identification confidence level (Values ​​range from 0 to 1, confidence level) (0.8 is considered a valid recognition); for the checkpoint image list output by the spatiotemporal retrieval module, the same license plate recognition process is performed on each checkpoint image, and the license plate string for each checkpoint image is output. (Number of checkpoint images) and corresponding recognition confidence level , filter out Valid license plates at checkpoints were identified, and invalid data with low confidence levels were removed.

[0085] The license plate similarity is compared based on the license plate strings in the traffic camera images and the license plate strings in each checkpoint image. The process is as follows:

[0086] Calculating the license plate of electronic police vehicle using a character-level edit distance algorithm With each valid checkpoint license plate The similarity is calculated, and the core output metric of this algorithm is the edit distance D. The representative will Convert to The minimum number of character operations required, including character insertion, deletion, or replacement, with each operation counting as one operation, is calculated using the following formula:

[0087] ;

[0088] in, It is the edit distance; Represents license plate string The length of a standard license plate is 7 characters, including 1 Chinese character and 6 letters / numbers. It is the substring of the electronic police vehicle license plate string starting from the second character (i.e., the remaining part after removing the first character), used to recursively calculate the edit distance of the substring; It is the substring of the license plate string at the checkpoint, starting from the second character;

[0089] Edit distance Normalized to similarity coefficient To eliminate the impact of license plate length differences, the calculation formula is as follows:

[0090] ;

[0091] in, Values ​​range from 0 to 1. This indicates that the license plates are completely identical. The license plate is determined to be consistent (one character is allowed for recognition deviation due to dirt).

[0092] Iterate through all valid license plates at checkpoints; if they exist... If the license plate of a vehicle at a checkpoint matches the license plate in the traffic camera image, then a checkpoint image matching the license plate in the traffic camera image is identified, triggering the exact match logic; the process is as follows: from the matching... From the checkpoint images, select the recognition confidence level. The image with the highest confidence level is used as the matching result. If there are multiple images with the same confidence level, the difference between the capture time of the checkpoint image and the violation time of the electronic police is further compared, and the checkpoint image with the smallest difference is selected as the matching result.

[0093] If all checkpoint license plates If no matching license plate is found, the nearest neighbor matching logic is triggered. The process is as follows: calculate the capture time of each valid checkpoint image. Time of violation by electronic police absolute value of time difference Select The smallest checkpoint image is used as the matching result; if multiple images exist... For the same image, select the recognition confidence level. The highest-ranking image is used as the matching result.

[0094] The image synthesis output module is used to output the final illegal image based on the matching and synthesis results of the license plate matching judgment module and the retrieval results of the spatiotemporal retrieval module.

[0095] If the spatiotemporal retrieval module receives feedback information about no matching checkpoint image from the image synthesis output module, the electronic police image will be directly output as the violation image.

[0096] If no matching checkpoint image feedback information is received from the spatiotemporal retrieval module to the image synthesis output module, the optimal matching checkpoint image is obtained based on the matching result of the license plate matching judgment module. The electronic police image is then synthesized with the corresponding matching checkpoint image, and the final violation image is output.

[0097] The specific process of combining the electronic police image with the corresponding matching checkpoint image is as follows:

[0098] The system retrieves electronic police images and corresponding checkpoint images from the front-end storage module. It then uses a bilinear interpolation algorithm to unify the resolution of the two images, ensuring that the vehicle outline is not stretched or deformed. For nighttime scenes, a gamma correction algorithm is used to enhance the brightness of the license plate area in the checkpoint image, eliminating character blurring caused by backlighting and reflections. For daytime strong light scenes, adaptive histogram equalization is used to optimize the contrast of the red light signal in the electronic police image, ensuring that the red light status is clearly identifiable.

[0099] The image is stitched together using a fixed 2×1 column structure with 60% on the left and 40% on the right. The left area embeds a pre-processed traffic enforcement camera image, fully preserving the dynamic trajectory of the vehicle running a red light, and the words "Red Light Running Process" are marked in red 24-point Song typeface in the upper right corner of the image. The right area embeds a pre-processed checkpoint image, with the license plate area around the license plate cropped in the center by 50 pixels to highlight the license plate details, and the words "Vehicle Characteristics (License Plate: Pci)" (Pci is the license plate recognized by the checkpoint image) are marked in blue 24-point Song typeface in the upper right corner of the image. The two areas are separated by a 2-pixel wide gray solid line, and the coordinates of the two images are calibrated based on the intersection stop line to ensure that the vehicle's travel direction is consistent (e.g., both are "North to South").

[0100] At the bottom of the synthesized image, a semi-transparent black information bar with a height of 80 pixels and an opacity of 60% is generated, overlaying information in a three-section layout: left-middle-right. The left section uses white 20-point Song typeface to indicate the time and location of the violation (e.g., "Northbound lane 2 at the intersection of National Highway 233 and Yonghuai Road") and the detection event type corresponding to the image (fixed as "Vehicle violation of traffic signal detection"). The middle section uses yellow 20-point Song typeface to indicate the matching identifier (for precise matching scenarios, "Similarity S=×, Confidence" is indicated). =×”, the time nearest neighbor matching scenario is marked with “ΔT=× seconds, confidence level Confci=×”); the right side is marked with equipment information in white Song typeface No. 20 (e.g., “Electronic alarm: TCE900-01 / Checkpoint: TCV900-03”).

[0101] The text information in the synthesized image is identified by the OCR algorithm, and the text is considered clear if the accuracy is ≥99%. The gradient value of the license plate area in the checkpoint image is calculated by the edge detection algorithm, and the license plate is considered clear if the gradient value is ≥150. The qualified synthesized image is compressed in JPEG format (compression ratio 1:8, file size ≤500KB) and a SHA-256 checksum is attached to prevent data tampering. The synthesized image is stored in the "Synthetic Detection Image Directory" of the front-end storage module with the file name "HF+YYYYMMDD+6-digit random number" (such as "HF20251115000001"). At the same time, the original electronic police image, the original checkpoint image and the matching result data packet are cached and retained for 180 days for subsequent traceability query.

[0102] Example 2, Figure 2 shows a schematic diagram of the process for capturing large trucks running red lights based on spatiotemporal consistency detection according to the present invention.

[0103] Step 1: The traffic camera captures images of the red light violation, while the checkpoint camera captures images of the toes being caught.

[0104] Step 2: The front-end storage module receives and stores the electronic alarm images and checkpoint images;

[0105] Step 3: The front-end storage module searches for checkpoint images within a time interval of t seconds before and after the time of the traffic violation, based on the time of the traffic violation by the electronic police. Here, t is the forced synthesis time interval, and the value range is 1-3 seconds.

[0106] Step 4: Determine if there is a checkpoint image. If not, do not synthesize the image, and use the traffic camera image as the final violation image. The process ends. If there is an image, proceed to Step 5.

[0107] Step 5: Determine if there is a checkpoint image with the same license plate as the traffic camera image. If so, select the checkpoint image with the same license plate and combine it with the traffic camera image; otherwise, select the checkpoint image with the most recent violation time and combine it with the traffic camera image.

[0108] Step 6: The process ends, and the illegal image is output.

[0109] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0110] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product.

[0111] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0112] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0113] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0114] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A system for capturing large trucks running red lights based on spatiotemporal consistency detection, characterized in that, The system includes a time synchronization module, an image acquisition module, a front-end storage module, a spatiotemporal retrieval module, a license plate matching and judgment module, and an image synthesis and output module. These modules are interconnected: the time synchronization module is used to calibrate the time of the image acquisition module and the front-end storage module, ensuring time synchronization across all devices; the image acquisition module includes an electronic police camera and a checkpoint camera, whereby the electronic police camera is used to trigger and capture images of vehicles running red lights; and the checkpoint camera is used to synchronously trigger and capture images of vehicles trapped in a checkpoint. The front-end storage module is used to receive and store the electronic alarm images and checkpoint images transmitted by the image acquisition triggering module; The spatiotemporal retrieval module presets a mandatory synthesis time interval, retrieving checkpoint images within this interval based on the violation time of the electronic police image. The license plate matching judgment module determines whether any checkpoint images retrieved by the spatiotemporal retrieval module contain license plates matching those of the electronic police images. If such a plate exists, a precise matching logic is triggered; otherwise, a time nearest neighbor matching logic is triggered. The image synthesis output module outputs the final violation image based on the matching and synthesis results from the license plate matching judgment module and the retrieval results from the spatiotemporal retrieval module.

2. The system for capturing red-light violations by large trucks based on spatiotemporal consistency detection according to claim 1, characterized in that, The forced synthesis time interval is the maximum value of the time difference between the capture time of the electronic police image and the checkpoint image.

3. The system for capturing red-light violations by large trucks based on spatiotemporal consistency detection according to claim 2, characterized in that, The electronic police camera is installed behind the stop line at the intersection, with its lens facing the direction of vehicle travel. When a vehicle triggers the red light detection, it immediately captures an image of the red light violation, including the complete trajectory of the vehicle and its rear-end features. The checkpoint camera is installed on the traffic light pole at the intersection exit. By adjusting the position of its capture trigger line, the checkpoint camera and the electronic police camera are triggered synchronously when a vehicle passes the stop line. The checkpoint camera's shooting range covers the same direction and lane, and the captured checkpoint image includes the front of the vehicle and clear license plate information.

4. The system for capturing red-light violations by large trucks based on spatiotemporal consistency detection according to claim 3, characterized in that, The spatiotemporal retrieval module is implemented as follows: It receives the electronic police images transmitted by the front-end storage module, extracts key retrieval parameters, including the electronic police violation timestamp e, the target lane, and the direction of travel. At the same time, it reads the preset forced synthesis time interval t and combines it with the electronic police violation timestamp e to determine the retrieval time range as [et, e+t]. It calls the index database query interface of the front-end storage module to filter and prioritize matching checkpoint images whose time is within the retrieval range, whose lane is consistent with the electronic police image, and whose direction of travel is the same. If no matching checkpoint image is found in the statistical search results, a "no matching checkpoint image" feedback message is generated and sent to the image synthesis output module. If a checkpoint image that matches the criteria is found, a search results list of all checkpoint images is generated and synchronously transmitted to the license plate matching and judgment module.

5. A system for capturing red-light violations by large trucks based on spatiotemporal consistency detection according to claim 4, characterized in that, The license plate matching and judgment module is implemented as follows: license plate information is extracted from the electronic police images and checkpoint images to obtain the license plate string of the electronic police image and the license plate string of each checkpoint image; the license plate similarity is compared based on the license plate string of the electronic police image and the license plate string of each checkpoint image, and the similarity coefficient between the electronic police image and the corresponding checkpoint image is calculated. The system determines whether there is an image with the same license plate as the electronic police image among the retrieved checkpoint images based on the similarity coefficient. If there is an image with the same license plate as the electronic police image, the system triggers the exact matching logic. If there is no image with the same license plate as the electronic police image, the system triggers the time nearest neighbor matching logic.

6. A system for capturing red-light violations by large trucks based on spatiotemporal consistency detection according to claim 5, characterized in that, The process of extracting license plate information from electronic police images and checkpoint images is as follows: For electronic police images, a license plate localization and recognition algorithm based on convolutional neural networks is used. The rear region of the vehicle is extracted through grayscale conversion and edge detection. Then, the YOLOv5 object detection model is used to locate the license plate position. Finally, CRNN is used to recognize the license plate characters, outputting the license plate string from the electronic police image. and identification confidence level For the list of checkpoint images output by the spatiotemporal retrieval module, perform the same license plate recognition process for each checkpoint image and output the license plate string for each image. (Number of checkpoint images) and corresponding recognition confidence level , filter out Valid license plates at checkpoints were used to eliminate invalid data with low confidence levels.

7. A system for capturing red-light violations by large trucks based on spatiotemporal consistency detection according to claim 6, characterized in that, The license plate similarity is compared based on the license plate strings of the electronic police images and the license plate strings of each checkpoint image. The process is as follows: The character-level edit distance algorithm is used to calculate the license plate similarity of the electronic police vehicles. With each valid checkpoint license plate The similarity is calculated, and the core output metric of this algorithm is the edit distance D. The representative will Convert to The minimum number of character operations required is calculated using the following formula: ;in, It is the edit distance; Represents license plate string Length; It is the substring of the electronic police vehicle license plate string starting from the second character, used to recursively calculate the edit distance of the substring; It is the substring of the license plate string at the checkpoint, starting from the second character; edit distance Normalized to similarity coefficient To eliminate the impact of license plate length differences, the calculation formula is as follows: ;in, Values ​​range from 0 to 1. This indicates that the license plates are completely identical. The license plate was determined to be the same.

8. A system for capturing red-light violations by large trucks based on spatiotemporal consistency detection according to claim 7, characterized in that, If a license plate exists, the exact matching logic is triggered; otherwise, the time nearest neighbor matching logic is triggered. The process is as follows: Iterate through all valid checkpoint license plates; if a similarity coefficient exists... If the license plate of a vehicle at a checkpoint matches the license plate in the traffic camera image, then a checkpoint image matching the license plate of that vehicle is identified, triggering the precise matching logic as follows: From vehicles matching the similarity coefficient... From the checkpoint images, select the recognition confidence level. The image with the highest confidence level is used as the matching result. If multiple images with the same confidence level exist, the difference between the capture time of the checkpoint image and the violation time of the electronic police is further compared, and the checkpoint image with the smallest difference is selected as the matching result. If the similarity coefficient of all license plates at all checkpoints is... If no matching license plate is found, the nearest neighbor matching logic is triggered as follows: Calculate the capture time of each valid checkpoint image. Time of violation by electronic police absolute value of time difference Select The smallest checkpoint image is used as the matching result; if multiple images exist... For the same image, select the recognition confidence level. The highest-ranking image is used as the matching result.

9. A system for capturing red-light violations by large trucks based on spatiotemporal consistency detection according to claim 8, characterized in that, The process of outputting the final violation image based on the matching and synthesis results of the license plate matching judgment module and the retrieval results of the spatiotemporal retrieval module is as follows: If feedback information of no matching checkpoint image is received from the spatiotemporal retrieval module to the image synthesis output module, the electronic police image is directly output as the violation image; if no feedback information of no matching checkpoint image is received from the spatiotemporal retrieval module to the image synthesis output module, the optimal matching checkpoint image is obtained according to the matching results of the license plate matching judgment module, the electronic police image is synthesized with the corresponding matching checkpoint image, and the final violation image is output.

10. A system for capturing red-light violations by large trucks based on spatiotemporal consistency detection according to claim 9, characterized in that, The specific process of merging the electronic police image and the corresponding matching checkpoint image is as follows: The electronic police image and the corresponding matching checkpoint image are retrieved, and the resolution is unified through bilinear interpolation. Preprocessing is then performed using gamma correction and adaptive histogram equalization, respectively, based on the scene. A fixed column structure is used for splicing; the preprocessed electronic police image is embedded in the left area, indicating the red-light violation process, and the preprocessed checkpoint image is embedded in the right area, indicating the license plate information. The two areas are separated by a gray solid line. A semi-transparent information bar is generated at the bottom of the composite image, indicating the basic violation information, matching identifier, and equipment information from left to right. The font format and color of each area are fixed. Compliance verification is performed using OCR, and qualified composite images are stored in the front-end storage module.