An AI technology-based traffic electronic evidence chain management method and system
By using dynamic confidence matrix and multi-layer neural network to process traffic incident videos in complex environments such as rain and snow, the reliability problem of evidence caused by image blurring was solved. This achieved adaptive optimization of video quality and accurate extraction of key information, thereby improving the reliability and consistency of the evidence chain.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEBEI XUN SOFT TECH CO LTD
- Filing Date
- 2026-03-12
- Publication Date
- 2026-06-23
AI Technical Summary
In complex environments such as rain and snow, blurry images of traffic violation certificates lead to a decrease in recognition accuracy, affecting the reliability of the certificates.
By acquiring event data of traffic incidents, statistically analyzing the pixel value distribution of the target area, calculating dynamic confidence to generate a dynamic binarization threshold matrix, performing image enhancement, and using a multi-layer neural network to extract keyframes, a chain of evidence is constructed by combining the event text.
It adaptively optimizes video quality in complex environments, accurately extracts key information, and significantly improves the reliability and consistency of the evidence chain.
Smart Images

Figure CN122265952A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence technology, specifically relating to a traffic electronic evidence chain management method and system based on AI technology. Background Technology
[0002] With the deep application of AI technology in the field of traffic law enforcement, the existing management of electronic evidence chains in traffic usually relies on computer vision and pattern recognition algorithms to automatically analyze electronic data such as videos and images collected by monitoring equipment, realize the preliminary judgment, location and key frame extraction of traffic violations, and through data classification, structured storage and association binding, unify the collection and management of multi-source evidence such as text information, images and videos to form an electronic evidence chain that can be used for traffic violation identification, providing data support and evidence collection basis for intelligent traffic law enforcement.
[0003] Patent application CN112016520A discloses an AI-based method, device, terminal, and storage medium for generating traffic violation certificates. The method includes: parsing traffic violation information from traffic violation data, the traffic violation information including violation video, violation location, and violation time; calling a traffic violation type recognition model to identify the traffic violation type of the violation video and determining the violation code number corresponding to the traffic violation type; when the violation location and violation time are deemed valid, extracting multiple standard traffic violation images from the violation video; and using a character overlay device to overlay the traffic violation information and violation code number onto the multiple standard traffic violation images to obtain multiple traffic violation certificate images.
[0004] However, although the solution has achieved automated generation of traffic violation certificates, in practical applications, the collected video data is prone to image blurring due to complex environmental factors such as rain and snow. This leads to a decrease in the recognition accuracy of the traffic violation type identification model, which in turn affects the accuracy of the violation code number. Furthermore, standard traffic violation images extracted from blurry videos are difficult to clearly present the violation process due to their blurriness, resulting in low reliability of traffic violation certificates. Summary of the Invention
[0005] The purpose of this invention is to solve the problem of low reliability of traffic violation certificates due to blurry images collected in complex environments such as rain and snow, and to propose a traffic electronic evidence chain management method and system based on AI technology.
[0006] In a first aspect of this invention, a traffic electronic evidence chain management method based on AI technology is first proposed, the method comprising: Acquire event data for traffic incidents; the event data includes event text and event video; For each coordinate position of the target area in the event video, the pixel value distribution of the coordinate position is statistically analyzed in the time dimension at a preset first time scale, a preset second time scale, and a preset third time scale to obtain the first pixel feature, the second pixel feature, and the third pixel feature of each coordinate position; the preset first time scale is smaller than the preset second time scale; the preset second time scale is smaller than the preset third time scale; the pixel feature includes the expected value and the mean value; The dynamic confidence value set is obtained by calculating the dynamic confidence score of the target image's coordinate position based on the first pixel feature, the second pixel feature, and the third pixel feature of each coordinate position; the target image is any frame image in the event video; Generate a dynamic binarization threshold matrix for the target image based on the dynamic confidence value set; The expected value of the second pixel feature is updated based on the dynamic confidence value set, and the target image is dynamically judged and pixel value replaced by the dynamic binarization threshold matrix to obtain a clear image after image enhancement. All clear images are counted to obtain a standard event video. A keyframe image set is obtained by extracting and enhancing keyframes from the standard event video using a preset multi-layer neural network. A chain of evidence is constructed based on the set of keyframe images, the event text, and the standard event video.
[0007] Optionally, generating the dynamic binarization threshold matrix of the target image based on the motion confidence value set includes: The number of dynamic pixels is obtained by counting the total number of pixels in the dynamic confidence value set whose dynamic confidence value is greater than a preset dynamic threshold. pass The dynamic binarization threshold at each pixel position of the target image is calculated to obtain the dynamic binarization threshold matrix; where T is the dynamic binarization threshold. Based on the threshold, For the number of dynamic pixels, The total number of pixels in the target image. To adjust the coefficient, These are nonlinear coefficients.
[0008] This solution constructs a dynamic binary threshold matrix by statistically analyzing the proportion of high-confidence pixels in the dynamic confidence value set, and combining the base threshold, adjustment coefficient, and nonlinear coefficient. This enables adaptive and refined control of the target image threshold. It can flexibly adjust the threshold according to the actual distribution characteristics of dynamic pixels in the image, and enhance the sensitivity of the threshold to changes in pixel proportion through nonlinear coefficients, effectively improving the accuracy of threshold determination and scene adaptability.
[0009] Optionally, the keyframe image set obtained by extracting and enhancing keyframes from the standard event video using a preset multi-layer neural network includes: A key image set is obtained by selecting a preset first number of frames from the standard event video using a uniform random sampling algorithm; The remaining images in the key image set, excluding the target key image, are used as global support images to obtain a global support image set; the target key image is any key image in the key image set. A local support image set is obtained by selecting a predetermined second number of frames that are temporally adjacent to the target key image from the video sequence; Multi-layer convolution and downsampling operations are performed on the target key image, the global support image set, and the local support image set to obtain key feature maps, global feature map sets, and local feature sets, respectively. The key feature map and the local feature set are input into a preset local feature aggregation module to obtain a local enhanced feature map; The key feature map and the global feature map set are input into a preset global feature aggregation module to obtain a global enhanced feature map; The keyframe image is obtained by fusing the local enhanced feature map and the global enhanced feature map; The keyframe image set is obtained by counting all keyframe images.
[0010] This scheme constructs a key image set by selecting a predetermined number of frames from standard event videos using a uniform random sampling algorithm, ensuring the diversity and unbiasedness of frame selection during training and inference. Each frame in the key image set is sequentially used as the target key frame, and the remaining images are used as global support images for information compensation, enabling each frame to obtain rich spatiotemporal context information from the entire video segment and avoiding feature bias caused by unidirectional information flow. Simultaneously, a predetermined number of frames adjacent to the target key frame in time sequence are selected as local support images. Through deformation perception and difference perception operations in the preset local feature aggregation module, short-term appearance changes of moving objects can be effectively captured and local noise interference can be suppressed. The key feature map and the global feature map set are input into the preset global feature aggregation module, and the most relevant global support images are selected by similarity. Combined with a multi-directional scanning mechanism and state space modeling, spatial consistency and motion correlation can be modeled over long distances, further improving the robustness of feature representation. Finally, the local enhanced feature map and the global enhanced feature map are fused, which not only preserves fine-grained local details but also incorporates global spatiotemporal context, resulting in an enhanced key frame image set.
[0011] Optionally, inputting the key feature map and the global feature map set into a preset global feature aggregation module to obtain a global enhanced feature map includes: The similarity between the key feature map and each global feature map in the global feature map set is calculated, and a preset third number of global feature maps are selected from the global feature map set according to the similarity to obtain a candidate global feature map set. The key feature map and the global feature map of the candidate global feature map set are subjected to layer normalization and fully connected operations in sequence to obtain the key feature projection map and the global feature projection map set; Multi-directional state-space enhancement is performed on the key feature projection map and the target global feature projection map to obtain an enhanced key feature map and an enhanced global feature map; the target global feature projection map is any one of the global feature projection maps in the set of global feature projection maps. The enhanced key feature map and the enhanced global feature map are serialized, flattened, and fused along the directions from top left to bottom right, from bottom right to top left, from bottom left to top right, and from top right to bottom left, respectively, to obtain the key fusion sequence and the global fusion sequence; The key fusion sequence and the global fusion sequence are processed by fully connected layers to obtain enhanced key fusion feature maps and enhanced global fusion feature maps, respectively. The enhanced global fusion feature map set is obtained by statistically analyzing the enhanced global fusion feature maps corresponding to all global feature projection maps. Each enhanced global fusion feature map in the enhanced key fusion feature map set and the enhanced global fusion feature map set is added element-wise to obtain the aggregated enhanced feature map set; The aggregated enhanced feature maps in the aggregated enhanced feature map set are fused to obtain a global enhanced feature map.
[0012] This scheme calculates the similarity between the key feature map and the global feature map set using a relevance global support frame selector, filtering out the most relevant candidate global feature map set, effectively reducing interference from irrelevant information. Subsequently, layer normalization and fully connected operations are performed on the key feature map and candidate global feature maps respectively to stabilize feature distribution and improve feature discriminativeness. A multi-directional state space enhancement unit performs a four-directional sequential scan of the key feature projection map and the target global feature projection map, extracting rich directional features using an independent state space model, enhancing the modeling capability of spatial context information. The enhanced feature maps are further sequentially flattened and fused along the four directions to obtain the key fused sequence and the global fused sequence, which are then processed through a fully connected layer to obtain the enhanced key fused feature map and the enhanced global fused feature map set. Finally, through element-wise addition and fusion operations, the features of the key frame and multiple global support frames are dynamically aggregated to obtain the global enhanced feature map. This process fully leverages the advantages of joint modeling of multiple pairs of spatial consistency and motion correlation, and adaptively integrates feature branches in different directions using a dynamic gating fusion mechanism. This not only improves the robustness and discriminativeness of feature representation, but also effectively suppresses background noise, significantly improving image quality in complex scenarios such as object deformation, occlusion, and motion blur.
[0013] Optionally, constructing a chain of evidence based on the keyframe image set, the event text, and the standard event video includes: The video key node is obtained by locating the video node with the corresponding timestamp in the standard event video for the target keyframe image; the target keyframe image is any one of the keyframe images in the keyframe image set. Text nodes are obtained by performing spatiotemporal and semantic matching between the event information, location information, and the parties' narrative information in the event text and the target keyframe image; Using the target keyframe image and the video key nodes as dual verification benchmarks, the consistency of event information, location information, and party narration information in the text nodes is verified. If the verification results are inconsistent, the video key nodes are marked and a supplementary evidence prompt is generated. The labeled key nodes in the video are associated with the supplementary certification prompts to obtain the association information to be corrected. Based on the association information to be corrected, the consistency information in the text node is corrected to obtain the corrected text node; The target keyframe image and the video key nodes are associated with the corrected text nodes to obtain a unit evidence chain; The complete chain of evidence is obtained by analyzing the evidence chains of all units.
[0014] This solution performs spatiotemporal semantic matching and dual verification of target keyframe images, video time nodes, and event text information. It can accurately identify and correct inconsistencies between text and video evidence, while generating supplementary evidence prompts and binding the related information to be corrected. Ultimately, it forms a structured unit evidence chain and a complete evidence chain, which can significantly improve the consistency, accuracy, and traceability of event evidence.
[0015] In a second aspect of this invention, a traffic electronic evidence chain management system based on AI technology is proposed, comprising: The data acquisition module is used to acquire event data of traffic incidents; the event data includes event text, event images, and event videos; The feature extraction module is used to statistically analyze the pixel value distribution of each coordinate position in the target area of the event video at a preset first time scale, a preset second time scale, and a preset third time scale to obtain the first pixel feature, the second pixel feature, and the third pixel feature of each coordinate position; the preset first time scale is smaller than the preset second time scale; the preset second time scale is smaller than the preset third time scale; the pixel feature includes an expected value and a mean value; The confidence calculation module is used to calculate the dynamic confidence of each pixel position in the target image based on the first pixel feature, the second pixel feature, and the third pixel feature of each pixel position to obtain a dynamic confidence value set; the target image is any frame image in the event video; A matrix generation module is used to generate a dynamic binarization threshold matrix of the target image based on the dynamic confidence value set. The update module is used to update the expected value of the second pixel feature according to the dynamic confidence value set to obtain the updated expected value of the second pixel; The standard event video generation module is used to update the expected value of the second pixel feature based on the dynamic confidence value set, and combine the dynamic binarization threshold matrix to dynamically determine and replace the pixel value of the target image to obtain a clear image after image enhancement, and count all clear images to obtain a standard event video. The keyframe image generation module is used to extract and enhance keyframes from the standard event video using a preset multi-layer neural network to obtain a set of keyframe images. The evidence chain generation module is used to construct an evidence chain based on the keyframe image set, the event text, and the standard event video.
[0016] Optionally, the matrix generation module includes: The first statistics module is used to count the total number of pixels in the dynamic confidence value set whose dynamic confidence value is greater than a preset dynamic threshold to obtain the number of dynamic pixels. Threshold calculation module, used to calculate thresholds by... The dynamic binarization threshold at each pixel position of the target image is calculated to obtain the dynamic binarization threshold matrix; where T is the dynamic binarization threshold. Based on the threshold, For the number of dynamic pixels, The total number of pixels in the target image. To adjust the coefficient, These are nonlinear coefficients.
[0017] Optionally, the keyframe image generation module includes: The first selection module is used to select a preset first number of frames from the standard event video to obtain a key image set using a uniform random sampling algorithm; The global support image generation module is used to obtain a global support image set by taking the remaining images in the key image set except for the target key image as global support images; the target key image is any key image in the key image set. The second selection module is used to select a preset second number of frames that are temporally adjacent to the target key image from the video sequence to obtain a local support image set. The convolutional downsampling module is used to perform multi-layer convolution and downsampling operations on the target key image, the global support image set, and the local support image set to obtain key feature maps, global feature map sets, and local feature sets, respectively. A local enhancement module is used to input the key feature map and the local feature set into a preset local feature aggregation module to obtain a local enhanced feature map; The full enhancement module is used to input the key feature map and the global feature map set into a preset global feature aggregation module to obtain a global enhanced feature map; The first fusion module is used to fuse the local enhanced feature map and the global enhanced feature map to obtain a keyframe image; The second statistics module is used to statistically analyze all keyframe images to obtain a keyframe image set.
[0018] Optionally, all the enhancement modules include: The similarity calculation module is used to calculate the similarity between the key feature map and each global feature map in the global feature map set, and select a preset third number of global feature maps from the global feature map set according to the similarity to obtain a candidate global feature map set; The projection map module is used to perform layer normalization and fully connected operations on the key feature map and the global feature map of the candidate global feature map set respectively to obtain the key feature projection map and the global feature projection map set; The spatial enhancement module is used to perform multi-directional state space enhancement on the key feature projection map and the target global feature projection map to obtain an enhanced key feature map and an enhanced global feature map; the target global feature projection map is any one of the global feature projection maps in the set of global feature projection maps; The fusion sequence generation module is used to serialize and flatten the enhanced key feature map and the enhanced global feature map along the upper left to lower right direction, the lower right to upper left direction, the lower left to upper right direction, and the upper right to lower left direction, respectively, and then fuse them to obtain a key fusion sequence and a global fusion sequence. The fusion feature map generation module is used to process the key fusion sequence and the global fusion sequence with fully connected layers to obtain enhanced key fusion feature maps and enhanced global fusion feature maps, respectively. The fourth statistics module is used to statistically analyze the enhanced global fusion feature maps corresponding to all global feature projection maps to obtain the enhanced global fusion feature map set; The addition module is used to perform element-wise addition of each enhanced global fusion feature map in the enhanced key fusion feature map and the enhanced global fusion feature map set to obtain an aggregated enhanced feature map set; The second fusion module is used to fuse the aggregated enhanced feature maps in the aggregated enhanced feature map set to obtain a global enhanced feature map.
[0019] Optionally, the evidence chain generation module includes: The positioning module is used to locate the video node with the corresponding timestamp in the standard event video from the target keyframe image to obtain the video key node; the target keyframe image is any one of the keyframe images in the keyframe image set; The matching module is used to perform spatiotemporal and semantic matching of event information, location information, and party narrative information in the event text with the target keyframe image to obtain text nodes; The condition module is used to perform consistency verification on the event information, location information, and party narration information in the text node using the target keyframe image and the video key node as dual verification benchmarks. If the verification results are inconsistent, the video key node is marked and a supplementary evidence prompt is generated. The first association module is used to associate and bind the labeled key nodes of the video with the supplementary certification prompt to obtain the association information to be corrected. The correction module is used to correct the consistency information in the text node according to the association information to be corrected, so as to obtain the corrected text node; The second association module is used to associate the target keyframe image and the video key nodes of the corrected text node to obtain a unit evidence chain; The third statistical module is used to statistically analyze the evidence chains of all units to obtain a complete evidence chain.
[0020] The beneficial effects of this invention are as follows: This invention proposes a traffic electronic evidence chain management method based on AI technology. First, it acquires traffic event data containing event text and video. Then, it statistically analyzes the pixel value distribution at each coordinate position of the target area in the event video using three progressively increasing preset time scales, obtaining corresponding multi-scale pixel features. Based on this, it calculates the dynamic confidence level of each coordinate position of the target image and forms a dynamic confidence value set, which in turn generates a dynamic binarized threshold matrix. Simultaneously, it updates the expected values of the corresponding pixel features based on the dynamic confidence value set, and combines this with the threshold matrix to perform dynamic judgment and pixel value replacement on the target image, obtaining a clear image and forming a standard event video. Subsequently, it performs keyframe extraction and enhancement processing on the standard event video, and finally constructs a complete evidence chain based on the keyframe image set, event text, and standard event video. This method achieves adaptive optimization of video quality in complex environments, accurate extraction of key information, and efficient fusion of multimodal evidence, significantly improving the reliability of the traffic event evidence chain. Attached Figure Description
[0021] The present invention will now be further described with reference to the accompanying drawings.
[0022] Figure 1 A flowchart of a traffic electronic evidence chain management method based on AI technology provided in an embodiment of the present invention. Detailed Implementation
[0023] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0024] Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] This invention provides a method for managing electronic evidence chains in traffic based on AI technology. See also... Figure 1 , Figure 1 A flowchart illustrating a traffic electronic evidence chain management method based on AI technology, provided as an embodiment of the present invention. The method includes the following steps: S101, Obtain event data for traffic incidents; S102, For each coordinate position of the target area in the event video, the pixel value distribution of the coordinate position is statistically analyzed in the time dimension using a preset first time scale, a preset second time scale, and a preset third time scale to obtain the first pixel feature, the second pixel feature, and the third pixel feature of each coordinate position. S103, calculate the dynamic confidence score of the target image's coordinate position based on the first pixel feature, second pixel feature, and third pixel feature of each coordinate position to obtain a dynamic confidence value set; S104, Generate a dynamic binarization threshold matrix for the target image based on the dynamic confidence value set; S105, based on the dynamic confidence value set, update the expected value of the second pixel feature, and combine the dynamic binarization threshold matrix to dynamically determine and replace the pixel value of the target image to obtain the clear image after image enhancement, and count all clear images to obtain the standard event video. S106, Keyframe image set is obtained by extracting and enhancing keyframes from standard event video through a preset multi-layer neural network; S107, construct a chain of evidence based on keyframe image sets, event texts, and standard event videos; The event data includes event text and event video; The first preset time scale is smaller than the second preset time scale; the second preset time scale is smaller than the third preset time scale. Pixel features include expected value and mean value; The target image is any frame from the event video.
[0026] This invention provides an AI-based traffic electronic evidence chain management method. Taking traffic event data including event text and video as input, it performs three-scale time-dimensional pixel statistics on each coordinate location of the target area to obtain multi-scale pixel features and calculate dynamic confidence levels, thereby generating a dynamic binarized threshold matrix. Simultaneously, it updates the expected values of pixel features based on the confidence values, completing dynamic image judgment and pixel replacement, outputting a clear image and forming a standard event video. After keyframe extraction and enhancement, the keyframe image set, event text, and standard video are fused to construct a complete evidence chain. This method can adaptively optimize video quality in complex scenarios, accurately extract key information, and efficiently fuse multimodal evidence, significantly enhancing the reliability of the traffic event evidence chain.
[0027] In one implementation, the first time scale is preset to 0.2 seconds because this scale matches the duration of instantaneous events such as car collisions (approximately 0.1 to 0.2 seconds), enabling the short-term model to be highly sensitive to instantaneous changes and quickly detect whether the current frame is occluded by moving objects. The second time scale is preset to 2 seconds because the mid-term model needs to balance adapting to weather changes and resisting instantaneous interference. The 2-second window can cover the transition period of weather changes, while controlling the interference of a single instantaneous event to within one-tenth of the window, avoiding contamination of the background model. The third time scale is preset to 30 seconds because this scale can cover the complete cycle of most weather changes, making the long-term model sufficient to resist short-term weather changes and instantaneous events, reflecting only permanent scene changes, thereby ensuring the stability of the real environmental background.
[0028] In one implementation, for each pixel, all pixel values of that pixel in the corresponding time scale before the current frame are obtained, and the mean and standard deviation of these pixel values are calculated, which are respectively used as the expected value and standard deviation of the pixel feature in that time scale.
[0029] In one implementation, the formula for calculating dynamic confidence is: ;in, Confidence level for moving objects. Let be the expected value of the first pixel feature. Let be the expected value of the second pixel feature. The expected value of the third pixel feature. The standard deviation of the second pixel feature. The standard deviation of the third pixel feature. The dynamic weights quantify the probability that each pixel location belongs to a moving object by fusing features from three time scales: short-term, medium-term, and long-term. The core principle is to utilize the sensitivity of short-term features to instantaneous changes, comparing their differences with the expected values of medium-term and long-term features, while introducing standard deviation for normalization to eliminate the influence of brightness fluctuations at different pixel locations. The dynamic weights in the formula can be automatically adjusted according to recent weather conditions, thus adaptively balancing sensitivity and stability under different weather conditions. Confidence increases when the short-term value differs significantly from the medium-term background, and further strengthens the judgment when the short-term value differs significantly from the long-term true background, effectively distinguishing between transient motion interference and real background changes.
[0030] In one implementation, the formula for updating the second pixel feature is as follows: ;in, Let be the expected value of the second pixel feature of the pixel at the current time. To update the expected value of the second pixel, The current pixel value. C represents the base learning rate and C represents the dynamic confidence level. The first pixel feature is responsible for quickly capturing instantaneous changes, such as raindrops or object movement. Therefore, it must be updated unconditionally and rapidly. Its learning rate is usually set very high. Controlling its confidence level would make it sluggish and unable to accurately reflect what just happened. The third pixel feature is responsible for remembering the real background of the scene, such as a sunny road or a rainless sky. Therefore, it adopts an extremely slow update strategy. The impact of transient disturbances such as raindrops is negligible and no additional control is needed. The second time-scale feature extraction is in between the two. Its task is to represent the background state under the current weather conditions. It must adapt to environmental changes, such as rain causing the road to become wet and dark, and resist transient disturbances, such as not being contaminated by raindrops. This dual requirement of adapting to the environment and resisting disturbances requires precise update control. When the dynamic confidence level is high, its update rate is reduced to protect the background model from being contaminated by raindrops. When the confidence level is low, it is updated normally to follow real weather changes.
[0031] In one implementation, for each pixel location, the moving object confidence score of the pixel location in the current frame is first compared with the dynamic binarization determination threshold corresponding to the pixel location. If the moving object confidence score is greater than or equal to the dynamic binarization determination threshold, the pixel location is determined to be a moving object. If the moving object confidence score is less than the dynamic binarization determination threshold, the pixel location is determined to be the background.
[0032] In one embodiment, generating a dynamic binarization threshold matrix for the target image based on a motion confidence set includes: The number of dynamic pixels is obtained by counting the total number of pixels whose dynamic confidence values are greater than a preset dynamic threshold in the dynamic confidence value set. pass The dynamic binarization threshold at each pixel location in the target image is calculated to obtain the dynamic binarization threshold matrix; where T is the dynamic binarization threshold. Based on the threshold, For the number of dynamic pixels, The total number of pixels in the target image. To adjust the coefficient, These are nonlinear coefficients.
[0033] In one implementation, the preset dynamic threshold is set by a technician.
[0034] In one implementation, , , The value is set by the technical staff. The value can be in the range of 0.3-0.7, which can maintain sensitivity to real moving objects while avoiding misjudgment of background noise; The value can range from 0.5 to 2.0, and is used to control the overall increase in the threshold as the raindrop density increases; The value can be in the range of 2-5, which can gradually slow down the increase of the threshold when the raindrops are extremely dense, avoiding a large number of raindrops being missed due to the threshold being too high, thus maintaining the naturalness and stability of the image while ensuring the deblurring effect.
[0035] In one implementation, this formula is used to dynamically adjust the strictness of motion object detection. Its core principle is based on the percentage of pixels in the current image that are identified as moving objects. The binarization threshold is adaptively adjusted; when there are fewer raindrops or other moving objects... The threshold is relatively small, close to the baseline value, maintaining normal sensitivity; as the proportion of moving objects increases, the threshold will increase accordingly, but this is mitigated by the nonlinear term in the denominator. By controlling its growth rate, when the proportion of moving objects is very high, the denominator approaches 1, and the threshold growth tends to saturate, avoiding the large number of moving objects being missed due to excessively high thresholds. This design enables automatic balance between sensitivity and stability under different weather conditions: in sunny weather, the basic sensitivity is maintained to capture real moving objects, while in heavy rain, the judgment standard is moderately increased but not increased indefinitely, thereby removing motion interference such as raindrops while avoiding image distortion caused by over-processing.
[0036] In one embodiment, keyframe extraction and enhancement of a standard event video to obtain a keyframe image set includes: A key image set is obtained by selecting a preset first number of frames from a standard event video using a uniform random sampling algorithm; The global support image set is obtained by taking the remaining images in the key image set except for the target key image as global support images; the target key image is any key image in the key image set. A local support image set is obtained by selecting a predetermined second number of frames that are temporally adjacent to the target key image from the video sequence; Multi-layer convolution and downsampling operations are performed on the target key image, the global support image set, and the local support image set to obtain the key feature map, the global feature map set, and the local feature set, respectively. The key feature map and local feature set are input into the preset local feature aggregation module to obtain the local enhanced feature map; The key feature map and the global feature map set are input into the preset global feature aggregation module to obtain the global enhanced feature map; The keyframe image is obtained by fusing the local and global enhanced feature maps. The keyframe image set is obtained by counting all keyframe images.
[0037] In one implementation, the values of the preset first quantity and the preset second quantity are set by a technician.
[0038] In one implementation, the local feature aggregation module works by first embedding the key image and local support image using 3×3 convolutions, then segmenting them into multiple sub-features along the channel dimension, and applying adaptive pooling with different downsampling rates to expand the receptive field. Subsequently, the pooled sub-features are further segmented, capturing long-distance horizontal deformations using 1×11 convolution kernels, long-distance vertical deformations using 11×1 convolution kernels, and local detail information using 3×3 convolution kernels. After depthwise separable convolution processing, these sub-features are concatenated along the channels and upsampled to restore the original size. Dynamic weights are generated using 1×1 convolutions and GELU activation, and then multiplied element-wise with the original feature map to obtain residual values. The difference connection is used to obtain the feature representation after deformation perception enhancement, thereby selectively enhancing the features most relevant to the object and suppressing background noise. Then, the enhanced feature map of the local support image is broadcast to align the batch dimension. The element-wise addition and subtraction between the local support frame enhanced feature map and the keyframe enhanced feature map are calculated to obtain the difference features. After concatenation, the local aggregation weights are generated by cascaded convolution and Softmax. The weights are multiplied element-wise with the local support frame enhanced feature map and added to the keyframe enhanced feature map. Then, the local enhanced keyframe feature map is obtained through residual connection, thereby effectively suppressing noise interference caused by spatiotemporal misalignment and accurately compensating the valuable information in the local support frame into the keyframe.
[0039] In one embodiment, inputting the key feature map and the global feature map set into a preset global feature aggregation module to obtain a global enhanced feature map includes: Calculate the similarity between the key feature map and each global feature map in the global feature map set, and select a preset third number of global feature maps from the global feature map set based on the similarity to obtain a candidate global feature map set; The key feature map and the global feature map set are subjected to layer normalization and fully connected operations respectively to obtain the key feature projection map and the global feature projection map set. Multi-directional state space augmentation is performed on the key feature projection map and the target global feature projection map to obtain the enhanced key feature map and the enhanced global feature map; the target global feature projection map is any one of the global feature projection maps in the global feature projection map set. The enhanced key feature map and the enhanced global feature map are sequentially flattened and fused along the directions from top left to bottom right, from bottom right to top left, from bottom left to top right, and from top right to bottom left, respectively, to obtain the key fusion sequence and the global fusion sequence; The key fusion sequence and the global fusion sequence are processed by fully connected layers to obtain enhanced key fusion feature maps and enhanced global fusion feature maps, respectively. The enhanced global fusion feature map set is obtained by statistically analyzing the enhanced global fusion feature maps corresponding to all global feature projection maps. The aggregated enhanced feature map set is obtained by adding each enhanced global fusion feature map in the enhanced key fusion feature map set and the enhanced global fusion feature map set element by element; The global enhanced feature map is obtained by fusing the aggregated enhanced feature maps in the aggregated enhanced feature map set.
[0040] In one implementation, the value of the preset third quantity is determined by a technician.
[0041] In one implementation, the multi-directional state space enhancement process involves first sequentially flattening the key feature projection map and any target global feature projection map along four diagonal directions: top-left to bottom-right, bottom-right to top-left, bottom-left to top-right, and top-right to bottom-left, to obtain corresponding key feature sequence sets and global feature sequence sets. Then, state space transformations are performed on these two sequence sets to generate enhanced key feature sequence sets and enhanced global feature sequence sets. Next, each enhanced key feature sequence in the enhanced key feature sequence set undergoes a preset first weighted fusion and a preset first linear layer processing to obtain an enhanced key feature map. Finally, each enhanced global feature sequence in the enhanced global feature sequence set undergoes weighted fusion and linear layer processing to obtain an enhanced global feature map.
[0042] In one embodiment, constructing a chain of evidence based on a set of keyframe images, event text, and standard event video includes: The video key node is obtained by locating the video node with the corresponding timestamp in the standard event video for the target keyframe image; the target keyframe image is any one of the keyframe images in the keyframe image set. Text nodes are obtained by performing spatiotemporal and semantic matching between event information, location information, and the parties' narratives in the event text and the target keyframe image; Using the target keyframe image and video key nodes as dual verification benchmarks, the consistency of event information, location information and party narrative information in text nodes is verified. If the verification results are inconsistent, the video key nodes are marked and a supplementary evidence prompt is generated. By associating and binding the marked key nodes of the video with the supplementary certification prompts, the relevant information to be corrected can be obtained. Based on the correlation information to be corrected, the consistent information in the text node is corrected to obtain the corrected text node; The unit evidence chain is obtained by associating the target keyframe image of the corrected text node with the video key node; The complete chain of evidence is obtained by analyzing the evidence chains of all units.
[0043] In one implementation, in cases of enforcement against overloaded passenger vehicles, the generation of a complete chain of evidence begins with the roadside enforcement surveillance video. First, key frame images are extracted and located. The video's key node, with a timestamp of 09:17:42, clearly shows 18 people actually inside the vehicle, far exceeding the permitted capacity of 12. The enforcement record text, containing the information that the vehicle's permitted capacity is 12 people while the party claimed only 10, along with the location information of the G30 expressway's XX exit, is spatiotemporally and semantically matched with this key frame to obtain a text node. Then, using this key frame and the video key node as a dual verification benchmark, it is found that the text stating only 10 people is not consistent with the video's claim of 18 people. Therefore, the video key node is then... The system marks discrepancies between the actual passenger count and the stated number, generating a supplementary evidence prompt to retrieve the complete in-vehicle surveillance footage to confirm the actual passenger count and passenger identity information. Key video nodes are then linked to the supplementary evidence prompt to obtain the information to be corrected. Based on this, the text node is corrected to state that the passenger vehicle in question was apprehended at the G30 expressway exit XX at 09:17:42, with a capacity of 12 passengers but actually carrying 18, indicating overloading. The corrected text node, target keyframe image, and video key nodes are then linked to form a unit evidence chain. Finally, all similar unit evidence chains are statistically analyzed to obtain a complete evidence chain covering the fact, time, and location of the vehicle's overloading, achieving precise alignment and contradiction correction between the text statement and video evidence.
[0044] The foregoing has described one embodiment of the present invention in detail, but this content is merely a preferred embodiment and should not be considered as limiting the scope of the present invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the scope of the claims of this invention.
Claims
1. A traffic electronic evidence chain management method based on AI technology, characterized in that, The method includes: Acquire event data for traffic incidents; the event data includes event text and event video; For each coordinate position of the target area in the event video, the pixel value distribution of the coordinate position is statistically analyzed in the time dimension at a preset first time scale, a preset second time scale, and a preset third time scale to obtain the first pixel feature, the second pixel feature, and the third pixel feature of each coordinate position; the preset first time scale is smaller than the preset second time scale; the preset second time scale is smaller than the preset third time scale; the pixel feature includes the expected value and the mean value; The dynamic confidence value set is obtained by calculating the dynamic confidence score of the target image's coordinate position based on the first pixel feature, the second pixel feature, and the third pixel feature of each coordinate position; the target image is any frame image in the event video; Generate a dynamic binarization threshold matrix for the target image based on the dynamic confidence value set; The expected value of the second pixel feature is updated based on the dynamic confidence value set, and the target image is dynamically judged and pixel value replaced by the dynamic binarization threshold matrix to obtain a clear image after image enhancement. All clear images are counted to obtain a standard event video. A keyframe image set is obtained by extracting and enhancing keyframes from the standard event video using a preset multi-layer neural network. A chain of evidence is constructed based on the set of keyframe images, the event text, and the standard event video.
2. The traffic electronic evidence chain management method based on AI technology according to claim 1, characterized in that, Generating the dynamic binarization threshold matrix of the target image based on the motion confidence value set includes: The number of dynamic pixels is obtained by counting the total number of pixels in the dynamic confidence value set whose dynamic confidence value is greater than a preset dynamic threshold. pass The dynamic binarization threshold at each pixel position of the target image is calculated to obtain the dynamic binarization threshold matrix; where T is the dynamic binarization threshold. Based on the threshold, For the number of dynamic pixels, The total number of pixels in the target image. To adjust the coefficient, These are nonlinear coefficients.
3. The traffic electronic evidence chain management method based on AI technology according to claim 1, characterized in that, The keyframe image set obtained by extracting and enhancing keyframes from the standard event video using a preset multi-layer neural network includes: A key image set is obtained by selecting a preset first number of frames from the standard event video using a uniform random sampling algorithm; The remaining images in the key image set, excluding the target key image, are used as global support images to obtain a global support image set; the target key image is any key image in the key image set. A local support image set is obtained by selecting a predetermined second number of frames that are temporally adjacent to the target key image from the video sequence; Multi-layer convolution and downsampling operations are performed on the target key image, the global support image set, and the local support image set to obtain key feature maps, global feature map sets, and local feature sets, respectively. The key feature map and the local feature set are input into a preset local feature aggregation module to obtain a local enhanced feature map; The key feature map and the global feature map set are input into a preset global feature aggregation module to obtain a global enhanced feature map; The keyframe image is obtained by fusing the local enhanced feature map and the global enhanced feature map; The keyframe image set is obtained by counting all keyframe images.
4. The traffic electronic evidence chain management method based on AI technology according to claim 3, characterized in that, The process of inputting the key feature map and the global feature map set into a preset global feature aggregation module to obtain a global enhanced feature map includes: The similarity between the key feature map and each global feature map in the global feature map set is calculated, and a preset third number of global feature maps are selected from the global feature map set according to the similarity to obtain a candidate global feature map set. The key feature map and the global feature map of the candidate global feature map set are subjected to layer normalization and fully connected operations in sequence to obtain the key feature projection map and the global feature projection map set; Multi-directional state-space enhancement is performed on the key feature projection map and the target global feature projection map to obtain an enhanced key feature map and an enhanced global feature map; the target global feature projection map is any one of the global feature projection maps in the set of global feature projection maps. The enhanced key feature map and the enhanced global feature map are serialized, flattened, and fused along the directions from top left to bottom right, from bottom right to top left, from bottom left to top right, and from top right to bottom left, respectively, to obtain the key fusion sequence and the global fusion sequence; The key fusion sequence and the global fusion sequence are processed by fully connected layers to obtain enhanced key fusion feature maps and enhanced global fusion feature maps, respectively. The enhanced global fusion feature map set is obtained by statistically analyzing the enhanced global fusion feature maps corresponding to all global feature projection maps. Each enhanced global fusion feature map in the enhanced key fusion feature map set and the enhanced global fusion feature map set is added element-wise to obtain the aggregated enhanced feature map set; The aggregated enhanced feature maps in the aggregated enhanced feature map set are fused to obtain a global enhanced feature map.
5. The traffic electronic evidence chain management method based on AI technology according to claim 1, characterized in that, Constructing a chain of evidence based on the keyframe image set, the event text, and the standard event video includes: The video key node is obtained by locating the video node with the corresponding timestamp in the standard event video for the target keyframe image; the target keyframe image is any one of the keyframe images in the keyframe image set. Text nodes are obtained by performing spatiotemporal and semantic matching between the event information, location information, and the parties' narrative information in the event text and the target keyframe image; Using the target keyframe image and the video key nodes as dual verification benchmarks, the consistency of event information, location information, and party narration information in the text nodes is verified. If the verification results are inconsistent, the video key nodes are marked and a supplementary evidence prompt is generated. The labeled key nodes in the video are associated with the supplementary certification prompts to obtain the association information to be corrected. Based on the association information to be corrected, the consistency information in the text node is corrected to obtain the corrected text node; The target keyframe image and the video key nodes are associated with the corrected text nodes to obtain a unit evidence chain; The complete chain of evidence is obtained by analyzing the evidence chains of all units.
6. A traffic electronic evidence chain management system based on AI technology, characterized in that, The system includes: The data acquisition module is used to acquire event data of traffic incidents; the event data includes event text, event images, and event videos; The feature extraction module is used to statistically analyze the pixel value distribution of each coordinate position in the target area of the event video at a preset first time scale, a preset second time scale, and a preset third time scale to obtain the first pixel feature, the second pixel feature, and the third pixel feature of each coordinate position; the preset first time scale is smaller than the preset second time scale; the preset second time scale is smaller than the preset third time scale; the pixel feature includes an expected value and a mean value; The confidence calculation module is used to calculate the dynamic confidence of each pixel position in the target image based on the first pixel feature, the second pixel feature, and the third pixel feature of each pixel position to obtain a dynamic confidence value set; the target image is any frame image in the event video; A matrix generation module is used to generate a dynamic binarization threshold matrix of the target image based on the dynamic confidence value set. The update module is used to update the expected value of the second pixel feature according to the dynamic confidence value set to obtain the updated expected value of the second pixel; The standard event video generation module is used to update the expected value of the second pixel feature based on the dynamic confidence value set, and combine the dynamic binarization threshold matrix to dynamically determine and replace the pixel value of the target image to obtain a clear image after image enhancement, and count all clear images to obtain a standard event video. The keyframe image generation module is used to extract and enhance keyframes from the standard event video using a preset multi-layer neural network to obtain a set of keyframe images. The evidence chain generation module is used to construct an evidence chain based on the keyframe image set, the event text, and the standard event video.
7. A traffic electronic evidence chain management method based on AI technology according to claim 6, characterized in that, The matrix generation module includes: The first statistics module is used to count the total number of pixels in the dynamic confidence value set whose dynamic confidence value is greater than a preset dynamic threshold to obtain the number of dynamic pixels. Threshold calculation module, used to calculate thresholds by... The dynamic binarization threshold at each pixel position of the target image is calculated to obtain the dynamic binarization threshold matrix; where T is the dynamic binarization threshold. Based on the threshold, For the number of dynamic pixels, The total number of pixels in the target image. To adjust the coefficient, These are nonlinear coefficients.
8. The traffic electronic evidence chain management method based on AI technology according to claim 6, characterized in that, The keyframe image generation module includes: The first selection module is used to select a preset first number of frames from the standard event video to obtain a key image set using a uniform random sampling algorithm; The global support image generation module is used to obtain a global support image set by taking the remaining images in the key image set except for the target key image as global support images; the target key image is any key image in the key image set. The second selection module is used to select a preset second number of frames that are temporally adjacent to the target key image from the video sequence to obtain a local support image set. The convolutional downsampling module is used to perform multi-layer convolution and downsampling operations on the target key image, the global support image set, and the local support image set to obtain key feature maps, global feature map sets, and local feature sets, respectively. A local enhancement module is used to input the key feature map and the local feature set into a preset local feature aggregation module to obtain a local enhanced feature map; The full enhancement module is used to input the key feature map and the global feature map set into a preset global feature aggregation module to obtain a global enhanced feature map; The first fusion module is used to fuse the local enhanced feature map and the global enhanced feature map to obtain a keyframe image; The second statistics module is used to statistically analyze all keyframe images to obtain a keyframe image set.
9. A traffic electronic evidence chain management method based on AI technology according to claim 8, characterized in that, All the enhancement modules include: The similarity calculation module is used to calculate the similarity between the key feature map and each global feature map in the global feature map set, and select a preset third number of global feature maps from the global feature map set according to the similarity to obtain a candidate global feature map set; The projection map module is used to perform layer normalization and fully connected operations on the key feature map and the global feature map of the candidate global feature map set respectively to obtain the key feature projection map and the global feature projection map set; The spatial enhancement module is used to perform multi-directional state space enhancement on the key feature projection map and the target global feature projection map to obtain an enhanced key feature map and an enhanced global feature map; the target global feature projection map is any one of the global feature projection maps in the set of global feature projection maps; The fusion sequence generation module is used to serialize and flatten the enhanced key feature map and the enhanced global feature map along the upper left to lower right direction, the lower right to upper left direction, the lower left to upper right direction, and the upper right to lower left direction, respectively, and then fuse them to obtain a key fusion sequence and a global fusion sequence. The fusion feature map generation module is used to process the key fusion sequence and the global fusion sequence with fully connected layers to obtain enhanced key fusion feature maps and enhanced global fusion feature maps, respectively. The fourth statistics module is used to statistically analyze the enhanced global fusion feature maps corresponding to all global feature projection maps to obtain the enhanced global fusion feature map set; The addition module is used to perform element-wise addition of each enhanced global fusion feature map in the enhanced key fusion feature map and the enhanced global fusion feature map set to obtain an aggregated enhanced feature map set; The second fusion module is used to fuse the aggregated enhanced feature maps in the aggregated enhanced feature map set to obtain a global enhanced feature map.
10. A traffic electronic evidence chain management method based on AI technology according to claim 6, characterized in that, The evidence chain generation module includes: The positioning module is used to locate the video node with the corresponding timestamp in the standard event video from the target keyframe image to obtain the video key node; the target keyframe image is any one of the keyframe images in the keyframe image set; The matching module is used to perform spatiotemporal and semantic matching of event information, location information, and party narrative information in the event text with the target keyframe image to obtain text nodes; The condition module is used to perform consistency verification on the event information, location information, and party narration information in the text node using the target keyframe image and the video key node as dual verification benchmarks. If the verification results are inconsistent, the video key node is marked and a supplementary evidence prompt is generated. The first association module is used to associate and bind the labeled key nodes of the video with the supplementary certification prompt to obtain the association information to be corrected. The correction module is used to correct the consistency information in the text node according to the association information to be corrected, so as to obtain the corrected text node; The second association module is used to associate the target keyframe image and the video key nodes of the corrected text node to obtain a unit evidence chain; The third statistical module is used to statistically analyze the evidence chains of all units to obtain a complete evidence chain.