Traffic event detection index evaluation method, system, equipment and medium

By constructing a multi-source traffic data sample library and utilizing attention mechanisms and reinforcement learning agents, a dynamic evaluation index weight allocation scheme is generated. This solves the problems of low efficiency, poor security, and rigid evaluation in existing traffic incident detection technologies, achieving efficient, safe, comprehensive, and dynamic evaluation results.

CN121808310APending Publication Date: 2026-04-07BEIJING SINOITS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing traffic incident detection technologies suffer from low efficiency, poor security, insufficient scenario coverage, and rigid evaluation standards, making them unable to meet the new requirements of intelligent transportation for efficient, safe, comprehensive, dynamic, and intelligent evaluation of detection equipment.

Method used

An initial sample library is constructed by acquiring multi-source traffic data. The sample library is updated using an incremental learning algorithm based on an attention mechanism. Evaluation scenario features are extracted and input into a reinforcement learning agent. An evaluation index weight allocation scheme is dynamically generated, and finally, the evaluation score of the device is obtained through weighted calculation.

Benefits of technology

It enables laboratory-based evaluation, significantly improves evaluation efficiency, eliminates safety risks for testers, and allows evaluation standards to be adaptively adjusted according to scenario characteristics, enhancing the relevance of evaluation results to practical application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121808310A_ABST
    Figure CN121808310A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic incident detection index evaluation method, system and device and a medium, and relates to the technical field of intelligent traffic, and the method comprises the steps: obtaining multi-source traffic data, and constructing an initial sample library based on the multi-source traffic data; updating the initial sample library by adopting an incremental learning algorithm based on an attention mechanism to obtain an updated sample library; extracting evaluation scene features based on the updated sample library, and inputting the evaluation scene features into a reinforcement learning agent to obtain an evaluation index of the to-be-tested device and an evaluation index weight distribution scheme; and performing weighted calculation on the evaluation indexes based on the evaluation index weight distribution scheme to obtain an evaluation score of the to-be-tested equipment. According to the invention, through intelligent updating of the sample library and reinforcement learning of dynamic weight distribution, intelligence and scene self-adaption of evaluation of the traffic incident detection equipment are realized, and the evaluation efficiency and the accuracy of an evaluation result are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent transportation, in particular to a traffic event detection index evaluation method, system, device and medium. BACKGROUND

[0002] With the deepening of the construction of intelligent transportation system, traffic event automatic detection technology based on multi-source sensor fusion such as video image recognition and radar perception has become the key support to ensure road traffic safety and improve road network operation efficiency. However, there are three major problems in the evaluation of traffic event automatic detection technology: first, the evaluation efficiency is low and the safety risk of test personnel is prominent. Traditional manual field testing consumes resources and takes a long time, and test personnel are exposed to real traffic environment, which threatens their personal safety. Second, the scene coverage is insufficient and the results are not horizontally comparable. It is difficult to reproduce extreme scenes such as night, rain, snow, fog and severe backlight, and the test samples are single. Different manufacturers have different self-evaluation standards, and the horizontal comparison reliability is low. Third, the evaluation mechanism is rigid and lacks forward-looking prediction ability. The fixed evaluation index weight cannot be dynamically adjusted according to the specific application scene, and the device performance degradation trend cannot be predicted, so the evaluation results are not consistent with the actual application value.

[0003] To solve the above technical problems, several representative technical implementation schemes have been gradually formed in the current industry. The first scheme is manual field testing, which artificially creates traffic events on real roads or test fields and records the detection results of the device. The second scheme is laboratory video playback testing, which plays pre-recorded video streams to the device for evaluation in the laboratory. The third scheme is an automatic index evaluation system based on fixed rules, which presets fixed weight indicators such as detection rate and false alarm rate, and automatically generates evaluation reports.

[0004] The above existing technical solutions have exposed many inherent defects in actual application. Manual field testing consumes a lot of resources and takes a long time, and cannot be tested frequently. It is also difficult to simulate high-risk extreme scenes, and the coverage is severely insufficient. Laboratory video playback testing and automatic index evaluation system based on fixed rules rely on manual frame-by-frame sample labeling, which is inefficient and prone to subjective bias. The evaluation weight is fixed and cannot meet the differentiated needs of reducing the false alarm rate in rainy weather and controlling the false alarm rate in peak hours. The evaluation results have weak correlation with road management efficiency, lack of tracking analysis ability for historical performance data of the device, and cannot construct a device performance degradation prediction model, making it difficult to achieve preventive maintenance.

[0005] In summary, the existing technology generally has problems such as low efficiency, poor safety, insufficient coverage, rigid evaluation, and lack of prediction ability, which cannot meet the new requirements of intelligent transportation for efficient, safe, comprehensive, dynamic and intelligent detection device evaluation. SUMMARY

[0006] The technical problems to be solved by the present application are as follows: the existing traffic event detection has low efficiency, poor safety, insufficient scene coverage, and rigid and fixed evaluation criteria, and the present application provides a traffic event detection index evaluation method, system, device and medium, as follows: 1) In a first aspect, the present application provides a traffic event detection index evaluation method, and the specific technical solutions are as follows: S1, obtaining multi-source traffic data, constructing an initial sample library based on the multi-source traffic data, and updating the initial sample library using an incremental learning algorithm based on an attention mechanism to obtain an updated sample library; S2, extracting evaluation scene features based on the updated sample library, inputting the evaluation scene features into a reinforcement learning agent to obtain an evaluation index weight distribution scheme of the to-be-tested device; S3, controlling the to-be-tested device to detect a test video to obtain an evaluation index of the to-be-tested device, and performing weighted calculation on the evaluation index based on the evaluation index weight distribution scheme to obtain an evaluation score of the to-be-tested device.

[0007] The traffic event detection index evaluation method provided by the present application has the following beneficial effects: By constructing a sample library based on multi-source traffic data, laboratory evaluation is realized, the evaluation efficiency is significantly improved, and the safety risk of test personnel is completely eliminated; based on the reinforcement learning agent, an evaluation index weight distribution scheme is dynamically generated, the evaluation criteria can be self-adaptively adjusted according to the scene features, and the correlation between the evaluation result and the actual application value is enhanced.

[0008] Based on the above-mentioned scheme, the present application can also be improved as follows.

[0009] Further, the initial sample library is constructed based on the multi-source traffic data, including: event recognition and scene feature extraction are performed on the multi-source traffic data using a pre-trained deep neural network to generate pre-calibration samples; The pre-calibration samples are reviewed and corrected to obtain the initial sample library.

[0010] Further, the initial sample library is updated using an incremental learning algorithm based on an attention mechanism, including: The historical sample feature map in the initial sample library is input into a channel attention module and a spatial attention module, the importance scores of each channel and spatial position are calculated respectively, and an attention weight mask is generated; When training new samples, the scene features with high attention weight in the historical task are subjected to elastic constraints based on the attention weight mask, and the elastic constraints are realized by adding a historical task constraint loss term in the total loss function.

[0011] Furthermore, it also includes: The reinforcement learning agent is optimized based on the correlation between the evaluation score and the comprehensive evaluation of real road tests. The correlation is obtained by collecting evaluation score sequences and real road test comprehensive evaluation sequences within a preset time window, and then calculating the evaluation score sequences and the real road test comprehensive evaluation sequences. The real-world road test comprehensive evaluation is obtained by calculating the actual data collected by the device under test.

[0012] 2) In a second aspect, the present invention also provides a traffic incident detection index evaluation system, the specific technical solution of which is as follows: a sample construction module, a weight generation module, and a score calculation module; The sample construction module is used to acquire multi-source traffic data, construct an initial sample library based on the multi-source traffic data, and update the initial sample library using an attention-based incremental learning algorithm to obtain an updated sample library. The weight generation module is used to extract evaluation scene features based on the updated sample library, input the evaluation scene features into the reinforcement learning agent, and obtain the evaluation index weight allocation scheme of the device under test. The scoring calculation module is used to control the device under test to detect the test video and obtain the evaluation index of the device under test; and to perform weighted calculation on the evaluation index based on the evaluation index weight allocation scheme to obtain the evaluation score of the device under test.

[0013] Based on the above solution, the present invention can be further improved as follows.

[0014] Furthermore, the construction of the initial sample library based on the multi-source traffic data includes: Pre-trained deep neural networks are used to perform event recognition and scene feature extraction on the multi-source traffic data to generate pre-calibrated samples. The pre-calibrated samples are reviewed and corrected to obtain the initial sample library.

[0015] Furthermore, updating the initial sample database using an attention-based incremental learning algorithm includes: Input the historical sample feature map from the initial sample library into the channel attention module and the spatial attention module, calculate the importance score of each channel and spatial location respectively, and generate an attention weight mask; When training new samples, elastic constraints are applied to scene features with high attention weights in historical tasks based on the attention weight mask. The elastic constraints are implemented by adding a historical task constraint loss term to the total loss function.

[0016] Furthermore, it also includes: The reinforcement learning agent is optimized based on the correlation between the evaluation score and the comprehensive evaluation of real road tests. The correlation is obtained by collecting evaluation score sequences and real road test comprehensive evaluation sequences within a preset time window, and then calculating the evaluation score sequences and the real road test comprehensive evaluation sequences. The real-world road test comprehensive evaluation is obtained by calculating the actual data collected by the device under test.

[0017] 3) In a third aspect, the present invention also provides a computer device, the computer device including a processor coupled to a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to enable the computer device to implement any of the above methods.

[0018] 4) In a fourth aspect, the present invention also provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to enable a computer to implement any of the above methods.

[0019] It should be noted that the beneficial effects of the technical solutions of the second to fourth aspects of the present invention and their corresponding possible implementations can be found in the above description of the technical effects of the first aspect and its corresponding possible implementations, and will not be repeated here. Attached Figure Description

[0020] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a flowchart illustrating the steps of a traffic incident detection index evaluation method according to an embodiment of the present invention. Figure 2 This is a structural block diagram of a computer device according to an embodiment of the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0022] like Figure 1 As shown, an embodiment of the present invention provides a method for evaluating traffic incident detection indicators, which includes the following steps: S1. Acquire multi-source traffic data and construct an initial sample library based on the multi-source traffic data; use an attention-based incremental learning algorithm to update the initial sample library to obtain an updated sample library; S2, extract evaluation scenario features based on the updated sample library, input the evaluation scenario features into the reinforcement learning agent, and obtain the evaluation index weight allocation scheme of the device under test; S3 controls the device under test to detect the test video and obtain the evaluation index of the device under test; the evaluation index is weighted and calculated based on the evaluation index weight allocation scheme to obtain the evaluation score of the device under test.

[0023] The beneficial effects of the traffic incident detection index evaluation method provided by this invention are as follows: By constructing a sample library using multi-source traffic data, laboratory-scale evaluation is achieved, significantly improving evaluation efficiency and completely eliminating safety risks for test personnel. Based on a reinforcement learning agent, a dynamic generation of evaluation index weight allocation schemes is implemented, enabling evaluation standards to adaptively adjust according to scenario characteristics and enhancing the relevance of evaluation results to practical application value.

[0024] It should be noted that, for ease of understanding, the technical terms used in this solution will be explained one by one, and will not be repeated hereafter: Multi-source traffic data refers to traffic-related information collected from multiple different sources. In this solution, multi-source traffic data specifically includes roadside video data, radar point cloud data, device metadata, and environmental tagging data. Roadside video data is collected by cameras deployed on both sides of the road and contains video images of traffic flow. Radar point cloud data is collected by millimeter-wave radar or lidar, providing information on the distance, speed, and angle of target objects. Device metadata records the model, deployment location, and configuration parameters of the detection equipment. Environmental tagging data describes weather conditions, lighting conditions, and time period information.

[0025] Initial sample library: refers to the original dataset constructed through automated annotation and manual review. In this solution, the initial sample library is a pre-calibrated sample generated by a pre-trained deep neural network for event recognition and scene feature extraction from multi-source traffic data. After review and correction by professionals, it contains ground truth annotation information for various traffic events.

[0026] Incremental learning algorithms based on attention mechanisms refer to artificial intelligence training methods that can retain knowledge of historical scenes while learning new scene samples. In this scheme, the algorithm calculates the importance scores of historical sample features through channel attention modules and spatial attention modules, generates attention weight masks, and applies elastic constraints to historical features with high attention weights when training new samples, so that the model's accuracy in recognizing historical scenes is controlled to within three percent.

[0027] Updated sample library: refers to the sample dataset that has been expanded and optimized after processing by the incremental learning algorithm. In this scheme, the updated sample library is formed by adding new scene samples and retaining historical scene knowledge on the basis of the initial sample library through an incremental learning algorithm based on the attention mechanism, and is used to continuously provide high-quality evaluation benchmark data.

[0028] Evaluation scenario features: These refer to the set of feature parameters that describe the test environment and the attributes of the events being detected. In this solution, the evaluation scenario features are extracted based on an updated sample library, specifically including weather type, light intensity, and event type, used to characterize the specific environmental conditions in which the evaluation is currently taking place.

[0029] Reinforcement learning agent: refers to an artificial intelligence entity that can autonomously make decisions on actions based on the state of the evaluation scenario and continuously optimize its strategy. In this scheme, the reinforcement learning agent receives the characteristics of the evaluation scenario as state input, outputs evaluation indicators and evaluation indicator weight allocation scheme, and uses the correlation between the evaluation score and the comprehensive evaluation of the actual road test of the device under test as a reward signal to continuously optimize its weight decision-making strategy.

[0030] Evaluation metrics: These are specific quantitative indicators used to measure the detection performance of the device under test. Evaluation metrics may include detection rate, false alarm rate, false negative rate, and response time, etc., to comprehensively reflect the detection capabilities of the device under test in different scenarios, and can be adjusted according to actual needs.

[0031] Evaluation index weight allocation scheme: refers to the set of relative importance values ​​assigned to different evaluation indicators for a specific evaluation scenario. In this scheme, the evaluation index weight allocation scheme is dynamically generated by the reinforcement learning agent based on the characteristics of the evaluation scenario, and the sum of each weight value is 1, so that the evaluation focus is adaptively adjusted as the scenario changes.

[0032] Test Video: This refers to the video stream data input to the device under test (DUT) used for performance evaluation. In this solution, the test videos are sourced from video sample data in the updated sample library. The video sample data includes various traffic event scenarios and corresponding ground truth annotations. The test videos cover a variety of complex traffic environments, including sunny days, rainy days, nighttime scenes, severe backlighting, and foggy conditions, and include multiple traffic event types such as illegal parking, littering, pedestrian intrusion, traffic accidents, and traffic congestion.

[0033] Evaluation score: This refers to the final numerical value reflecting the overall performance of the device under test, obtained through weighted calculation. In this scheme, the evaluation score is obtained by weighting each evaluation indicator according to the evaluation indicator weight allocation scheme, and is used to compare the detection performance of different devices horizontally.

[0034] Pre-trained deep neural networks refer to neural network models that have been pre-trained and possess basic recognition capabilities. In this scheme, the pre-trained deep neural network adopts a hybrid structure of convolutional neural networks and long short-term memory networks to perform event recognition and scene feature extraction on multi-source traffic data.

[0035] Event recognition refers to the process of automatically detecting and classifying traffic events from traffic data streams. In this solution, event recognition is achieved through a pre-trained deep neural network, used to identify various traffic events such as illegal parking, littering, pedestrian trespassing, and traffic accidents.

[0036] Scene feature extraction refers to the process of extracting characteristic information representing environmental conditions and traffic status from multi-source traffic data. In this solution, scene feature extraction is achieved through a pre-trained deep neural network, used to extract weather, lighting, road type, and traffic flow information.

[0037] Pre-labeled samples: These are event-labeled samples obtained through event identification and scene feature extraction, but which have not yet been manually verified. In this scheme, pre-labeled samples are generated by a pre-trained deep neural network after performing event identification and scene feature extraction on multi-source traffic data, serving as preliminary results for manual review and correction.

[0038] Historical sample feature maps refer to the deep feature representations of learned scene samples stored in the initial sample library. In this scheme, historical sample feature maps are extracted by a pre-trained deep neural network and serve as the basis for applying constraints to the attention-based incremental learning algorithm.

[0039] Channel attention module: This refers to a neural network component that calculates the importance weights of different channels in a feature map. In this scheme, the channel attention module is used to calculate the importance score of each channel in the feature map of historical samples, generating channel-dimensional attention weights.

[0040] Spatial attention module: refers to a neural network component that calculates the importance weights of different spatial locations in a feature map. In this scheme, the spatial attention module is used to calculate the importance score of each spatial location in the feature map of historical samples, generating spatial dimension attention weights.

[0041] Attention weight mask: This refers to the weight matrix generated by the attention module to identify the importance of features. In this scheme, the attention weight mask is jointly generated by the channel attention module and the spatial attention module, and is used to guide the incremental learning algorithm to apply protective constraints to important historical features.

[0042] New samples: These refer to newly collected traffic data samples containing unlearned scenarios after the initial sample library has been built. In this solution, new samples are used to expand and update the sample library, enabling the evaluation benchmark to cover more extreme scenarios.

[0043] Historical tasks refer to scene recognition tasks that the model has already learned during previous training phases. In this approach, historical tasks correspond to various traffic event recognition tasks included in the initial sample library, and their knowledge needs to be retained when learning new samples.

[0044] Scene features: These refer to the feature representations that describe the attributes of a specific traffic scene. In this scheme, scene features are extracted from multi-source traffic data by a pre-trained deep neural network and used for the constraint calculation of the incremental learning algorithm.

[0045] Flexible constraints refer to soft restrictions imposed on important historical features during model parameter updates. In this scheme, flexible constraints are implemented by applying a secondary penalty to historical feature parameters with high attention weights, minimizing the degree of forgetting of historical knowledge when the model learns new scenarios.

[0046] The total loss function refers to the comprehensive objective function optimized during model training, consisting of the loss from the new task and the loss from historical task constraints. In this scheme, the total loss function is formally represented as a weighted sum of the loss from the new task and the loss from historical task constraints, used to simultaneously ensure the learning effect of the new scene and the retention effect of the historical scene.

[0047] Historical task constraint loss term: This refers to the penalty term in the total loss function used to prevent the forgetting of historical knowledge. In this scheme, the historical task constraint loss term applies a secondary penalty to historical feature parameters with high attention weights, and the constraint strength is balanced with the loss of the new task through hyperparameters.

[0048] Real-world road test comprehensive evaluation: refers to the quantitative evaluation result of equipment performance obtained through actual deployment and verification. In this solution, the real-world road test comprehensive evaluation is calculated based on the on-site operation data of the equipment under test for 30 consecutive days after deployment. It includes detection efficiency indicators, response timeliness indicators, stability indicators, and business value indicators, which are used to calculate the correlation with the evaluation score to optimize the reinforcement learning agent.

[0049] Preset time window: This refers to the time interval set for collecting evaluation scores and comprehensive assessment data from actual road tests. In this scheme, the preset time window is thirty consecutive days to ensure sufficient data volume and statistical significance.

[0050] Evaluation score sequence: refers to the set of evaluation score values ​​collected in chronological order within a preset time window. In this scheme, the evaluation score sequence is used to calculate the correlation with the real road test comprehensive evaluation sequence, serving as a reward signal for the reinforcement learning agent.

[0051] Real-world road test comprehensive evaluation sequence: refers to the set of real-world road test comprehensive evaluation values ​​collected in chronological order within a preset time window. In this scheme, the real-world road test comprehensive evaluation sequence is used to calculate the correlation with the evaluation score sequence, serving as a reward signal for the reinforcement learning agent.

[0052] Real-world data collection refers to the raw data records generated by the device under test during operation in actual road environments. In this solution, real-world data collection includes event detection logs, manual review records, system operation and maintenance logs, and feedback from on-site personnel, used to calculate the true application value of the equipment.

[0053] In another embodiment of this solution, S1 is specifically implemented as follows: Acquire multi-source traffic data, including roadside video data, radar point cloud data, device metadata, and environmental tagging data. Roadside video data is collected in real-time by cameras deployed on both sides of the road, containing sequences of traffic flow video images. Radar point cloud data is collected by millimeter-wave radar or lidar sensors, providing distance, speed, and angle information for target objects. Device metadata records the model information, deployment location information, and configuration parameter information of the device under test. Environmental tagging data describes weather conditions, lighting conditions, and time period information.

[0054] Multi-source traffic data undergoes preprocessing, which includes data cleaning, time synchronization, and format standardization. Data cleaning removes noise, outliers, and redundant information. Time synchronization aligns timestamps from different sources to a unified time base. Format standardization converts data in different formats into a unified data structure. After preprocessing, the preprocessed multi-source traffic data is output.

[0055] An initial sample library was constructed based on multi-source traffic data. A pre-trained deep neural network was then used to perform preliminary event recognition and scene feature extraction on video samples from the pre-processed multi-source traffic data. The pre-trained deep neural network employed a tightly coupled spatiotemporal feature fusion network (CNN-LSTM hybrid model) based on multi-scale feature cross-attention. The CNN-LSTM hybrid model refers to a hybrid structure of convolutional neural networks (CNN) and long short-term memory networks (LSTM). The CNN uses a residual network as the backbone to extract multi-level spatial features from video frames. The LSTM network encodes the temporal context information of several past frames and outputs the temporal context feature vector for the current moment. The tightly coupled spatiotemporal feature fusion network includes a multi-scale spatial feature extraction part, a temporal context encoding part, and a spatiotemporal cross-attention (ST-CAM) part.

[0056] The multi-scale spatial feature extraction part employs an improved Feature Pyramid Network (FPN) structure as the CNN backbone, simultaneously outputting low-level high-resolution feature maps and high-level semantic feature maps. The low-level high-resolution feature maps contain rich detail information for locating small targets, while the high-level semantic feature maps contain category information for identifying event types.

[0057] The temporal context encoding part uses LSTM to encode the temporal information of the past N frames and outputs the temporal context feature vector at the current moment.

[0058] The spatiotemporal cross-attention component introduces a spatiotemporal cross-attention module (ST-CAM), enabling bidirectional adaptive information interaction between the spatial features encoded by CNN and the temporal features encoded by LSTM, achieving deep interaction between spatial appearance features and temporal motion features. The spatiotemporal cross-attention component includes space-to-temporal attention computation and temporal-to-spatial attention computation. Space-to-temporal attention computation uses the hidden state of the LSTM as the query vector and the multi-scale feature map of the CNN as the key and value vectors to calculate attention weights. This allows the pre-trained deep neural network to actively search for the regions most relevant to the temporal context in the spatial feature map, strengthening the features of relevant regions and suppressing irrelevant background interference. Temporal-to-spatial attention computation uses each spatial location in the CNN feature map as the query vector and the temporal features of the LSTM as the key and value vectors to calculate attention weights. This dynamically injects global temporal information (such as "the vehicle has been stationary for 5 minutes") into each spatial location, enhancing the feature representation capability of the spatial location.

[0059] This solution proposes an end-to-end multi-target tracking framework based on Transformer. It utilizes learnable object queries to directly and in parallel output target trajectories and IDs, avoiding the complex data association steps of traditional methods. It exhibits superior ID preservation capabilities in scenarios with dense traffic and severe occlusion. By stably maintaining vehicle motion trajectories across consecutive frames, it provides a reliable data foundation for trajectory-based traffic event recognition. The choice between using trajectory tracking to improve the reliability of event recognition can be made based on actual needs. This solution presents one implementation method: specifically, for multi-vehicle tracking, an end-to-end multi-target tracking framework based on Transformer is adopted. This framework utilizes learnable object queries to directly and in parallel output target trajectories and IDs, avoiding the complex data association steps of traditional methods. It exhibits superior ID preservation capabilities in scenarios with dense traffic and severe occlusion, providing a reliable foundation for trajectory-based event determination. This framework interacts with the decoder using learnable object queries and image features enhanced by the Transformer encoder, directly and in parallel outputting all predicted bounding boxes and ID probabilities for the current frame. Subsequently, the prediction result of the current frame is optimally matched one-to-one with the trajectory of the previous frame using the Hungarian algorithm, thereby stably maintaining the identity of the existing target and automatically assigning a new identity to successful queries that do not match.

[0060] The encoder uses a convolutional neural network backbone to extract multi-scale features from video frames, then enhances these features using a Transformer encoder, incorporating global contextual information. The decoder introduces object queries, which are a fixed set of learnable parameters. Each query predicts a possible target trajectory. The matching strategy uses the Hungarian algorithm, performing a one-to-one match between the predicted trajectory bounding box and the trajectory bounding box from the previous frame. This similarity includes both content and positional similarity, and the matching process stably maintains the target's identity. For newly appearing vehicles, an empty object query automatically captures and assigns a new identity.

[0061] After processing by a tightly coupled spatiotemporal feature fusion network, the pre-trained deep neural network outputs pre-calibrated samples.

[0062] Simultaneously, a human-computer interaction interface is provided for professionals to review and correct pre-calibrated samples. Professionals can view the event recognition results and scene feature extraction results in the pre-calibrated samples through the interface, correct incorrectly identified events, supplement missing events with additional annotations, and modify inaccurate scene features. After correction, the corrected samples are stored in the sample library to construct the initial sample library.

[0063] An incremental learning algorithm based on an attention mechanism is used to update the initial sample library, resulting in an updated sample library. The feature maps of historical samples from the initial sample library are input into the channel attention module and the spatial attention module. The channel attention module employs a compressed activation module structure, performing global average pooling on the features of each channel and calculating channel importance weights through fully connected layers to generate channel-dimensional attention weights. The spatial attention module employs a convolutional block attention module structure, performing max pooling and average pooling on the feature maps along the channel dimensions. The pooling results are concatenated and then used to calculate spatial importance weights through convolutional layers to generate spatial-dimensional attention weights. The channel attention module and the spatial attention module jointly generate an attention weight mask. When a new scene sample is received, during the training of the new scene sample, elastic constraints are applied to scene features with high attention weights in the historical task based on the attention weight mask. Elastic constraints are implemented by adding a historical task constraint loss term to the total loss function. The total loss function consists of the new task loss and the historical task constraint loss, and the formula for the total loss function is as follows: ; in, Losses due to new missions, The constraint strength coefficient, For the first Attention weights for each parameter, As the normalization factor, For the current model, the first Parameter values, The historical best model Each parameter value. After training with an attention-based incremental learning algorithm, the model's accuracy in recognizing historical scenes is kept to within 3%, and the output is used to update the sample library.

[0064] In another embodiment of this solution, S2 is specifically implemented as follows: Evaluation scene features are extracted from the updated sample library, including weather type, light intensity, and event type. Weather type is obtained through image analysis and text parsing of video samples and environmental label data, specifically categorized into sunny, rainy, and nighttime. Light intensity is calculated by analyzing the average brightness and contrast values ​​of video frames, and normalized to ensure the light intensity value falls within the range of 0 to 1. Event type is obtained by analyzing ground truth event labels in the updated sample library, specifically categorized into illegal parking, littering, pedestrian intrusion, traffic accidents, and traffic congestion. Weather type, light intensity, and event type are then vector-encoded to generate evaluation scene feature vectors. Weather type is mapped to a three-dimensional vector using one-hot encoding, light intensity is directly used as a scalar value, and event type is mapped to a five-dimensional vector using one-hot encoding. The encoded results are concatenated to form a nine-dimensional evaluation scene feature vector.

[0065] The evaluation scene feature vector is input into the reinforcement learning agent, which contains a policy network structure. This policy network structure employs a combination of fully connected layers and an attention mechanism layer. The fully connected layer consists of an input layer, hidden layers, and an output layer. The input layer receives a nine-dimensional evaluation scene feature vector, the hidden layer contains 256 neurons using the ReLU activation function, and the output layer contains three neurons corresponding to the weights of three evaluation metrics. An attention mechanism layer is added after the fully connected layer. This attention mechanism layer uses a multi-head self-attention structure with four heads and is used to calculate the importance weights of different dimensions of features in the evaluation scene feature vector and dynamically adjust the feature representation. The policy network structure outputs an evaluation metric weight allocation scheme, which includes weights for detection rate, false positive rate, false negative rate, and response time. These weights are normalized using a softmax function to ensure that the sum of the weights equals 1 and each weight is greater than 0.

[0066] The reinforcement learning agent employs an Actor-Critic architecture during the training phase. The policy network, acting as the Actor, is responsible for generating the weight allocation scheme for the evaluation metrics, while the value network, acting as the Critic, is responsible for evaluating the value of the current state. The value network structure is similar to the policy network structure, receiving the same feature vectors from the evaluation scenario as input and outputting an estimated state value.

[0067] The training process of a reinforcement learning agent includes sampling a batch of state transition samples from the experience replay buffer. Each state transition sample contains the current evaluation scene feature vector, the current evaluation metric weight allocation scheme, the immediate reward value, the next evaluation scene feature vector, and a termination flag. The temporal difference error is calculated, which equals the immediate reward value plus a discount factor multiplied by the estimated state value of the next time step, minus the estimated state value of the current time step. The value network parameters are updated along the gradient direction of the temporal difference error, and the policy network parameters are updated along the gradient direction of the policy. The policy gradient is calculated by weighting the temporal difference error, and the update magnitude of the policy network parameters is limited by a proximal policy optimization algorithm to ensure training stability.

[0068] The immediate reward value of the reinforcement learning agent is calculated by the correlation between the evaluation score and the comprehensive evaluation of real road tests (the real application value of the equipment).

[0069] The correlation calculation method involves collecting the evaluation score sequence and the actual road test comprehensive evaluation sequence within a preset time window, performing a moving average and normalization on the evaluation score sequence and the actual road test comprehensive evaluation sequence, calculating the Pearson correlation coefficient, and using the Pearson correlation coefficient as the instant reward value.

[0070] The comprehensive evaluation of real-world road tests is calculated using real-world data collected from the device under test. Specifically, it is calculated based on 30 consecutive days of on-site operational data after the device's deployment. This on-site operational data includes event detection logs, manual review records, system maintenance logs, and feedback from on-site personnel. Based on this data, detection efficiency indicators, response timeliness indicators, stability indicators, and business value indicators are calculated. Detection efficiency indicators include detection rate, false alarm rate, and false negative rate; response timeliness indicators include average detection response time and timely event reporting; stability indicators include online rate and fault recovery time; and business value indicators include estimated actual losses recovered and user satisfaction scores. These indicators are normalized, and the weights of each indicator are determined using the analytic hierarchy process (AHP). A weighted sum is then used to obtain the device's real-world application value assessment. The weight allocation is dynamically adjusted based on the scenario type (sunny day, rainy day, nighttime). The indicator classifications in the comprehensive evaluation of real-world road tests can be adjusted according to actual needs.

[0071] The reinforcement learning agent continuously optimizes the weight allocation scheme of evaluation indicators through the above methods, ensuring that the weight allocation schemes generated in different scenarios accurately reflect actual control needs. Below are some examples of the reinforcement learning agent's output results: In a sunny day scenario, the weights for detection rate, false positive rate, and false negative rate are 0.5, 0.2, and 0.2 respectively, and response time is 0.1; in a rainy day scenario, the weights for detection rate, false positive rate, and false negative rate are 0.2, 0.5, and response time is 0.1; and in a nighttime scenario, the weights for detection rate, false positive rate, and false negative rate are 0.4, 0.3, 0.2, and response time is 0.1, achieving a precise match between the evaluation standards and the actual needs of the scenario.

[0072] In another embodiment of this solution, S3 is specifically implemented as follows: The test video is input to the device under test (DUT). The test video is derived from video sample data in an updated sample library, containing various traffic event scenarios and corresponding ground truth annotations. After receiving the test video, the DUT runs its internal detection algorithm to analyze each frame of the video stream, identify the traffic events occurring within, and generate detection results. The detection results are output in structured data format, including event type, event location coordinates, event confidence level, and detection timestamp.

[0073] The detection results are compared with ground truth data in an updated sample library. The ground truth data, reviewed and corrected by professionals, is stored in the updated sample library and contains detailed information about the actual traffic events occurring in each frame of the image. The comparison process includes spatiotemporal alignment and event-level matching calculation: Spatiotemporal alignment aligns the timestamps of the detection results with those of the ground truth data to a unified time reference, and transforms and unifies the coordinate systems of the detection results and the ground truth data. Event-level matching calculation uses the intersection-union ratio (IUGR) method to calculate the degree of overlap between the detected event region and the ground truth event region. The IUGR is defined as the area of ​​intersection of the detected event region and the area of ​​union of the ground truth event region.

[0074] Set a matching threshold of 0.5. A correct detection is defined as an event detected when the intersection-union ratio (IU) is greater than the threshold and the detected event type matches the ground truth event type. A false alarm is defined as an event detected when the IU is greater than the threshold but the detected event type does not match the ground truth event type, or when no corresponding ground truth event exists in the detected event region. A missed detection is defined as a missed event in the ground truth event region. Count the number of correct detections, false alarms, missed detections, and the total number of ground truth events throughout the entire test video.

[0075] The evaluation metrics are calculated, including detection rate, false alarm rate, false negative rate, and response time. The detection rate is obtained by dividing the number of correctly detected events by the total number of true events; the false alarm rate is obtained by dividing the number of false alarms by the total number of true events; the false negative rate is obtained by dividing the number of false negatives by the total number of true events; the response time is calculated as follows: for each correctly detected event, the time difference between the detection timestamp and the actual occurrence timestamp of the event is calculated, and the average of the time differences for all correctly detected events is obtained.

[0076] The evaluation index weight allocation scheme for the output of the reinforcement learning agent is obtained. The evaluation index weight allocation scheme includes the detection rate weight value, false alarm rate weight value, false negative rate weight value, and response time weight value. The sum of the four weight values ​​is equal to 1.

[0077] The evaluation score is obtained by weighting the detection rate (weighted value) by the detection rate, subtracting the false positive rate (weighted value) by the false positive rate, subtracting the false negative rate (weighted value) by the false negative rate, and subtracting the response time (weighted value) by the response time. The response time value is normalized to a range between 0 and 1.

[0078] After weighted calculation, the evaluation score of the device under test is output. The evaluation score ranges from 0 to 1, with a higher value indicating better overall performance. The evaluation score is used to compare the performance of different devices, providing a quantitative basis for equipment selection.

[0079] Furthermore, an initial sample library was constructed based on multi-source traffic data, including: Pre-trained deep neural networks are used to perform event recognition and scene feature extraction on multi-source traffic data to generate pre-calibrated samples. The pre-calibrated samples were reviewed and corrected to obtain the initial sample library.

[0080] Furthermore, an attention-based incremental learning algorithm is used to update the initial sample database, including: Input the historical sample feature maps from the initial sample library into the channel attention module and the spatial attention module, calculate the importance scores of each channel and spatial location respectively, and generate attention weight masks; When training new samples, elastic constraints are applied to scene features with high attention weights in historical tasks based on attention weight masks. The elastic constraints are achieved by adding a historical task constraint loss term to the total loss function.

[0081] Furthermore, it also includes: The reinforcement learning agent is optimized based on the correlation between the evaluation score and the comprehensive evaluation of real road tests. The correlation is obtained by collecting evaluation score sequences and real road test comprehensive evaluation sequences within a preset time window, and then calculating the evaluation score sequences and real road test comprehensive evaluation sequences. The comprehensive evaluation based on real-world road tests is calculated using real-world data collected from the device under test. Specifically, correlation is used as the immediate reward value, calculated by the correlation between the evaluation score and the comprehensive evaluation based on real-world road tests (i.e., the actual application value of the device). This involves collecting the evaluation score sequence and the comprehensive evaluation sequence within a preset time window, calculating the Pearson correlation coefficient between the two sequences, and directly using this coefficient as the immediate reward value. The immediate reward value is used to update parameters through a near-end policy optimization algorithm. A higher immediate reward value indicates a better match between the current evaluation indicator weight allocation scheme and the actual application value of the device. The policy network adjusts parameters along the gradient direction to increase the probability of high-reward states, gradually converging the weight allocation scheme from an initial random state to the optimal configuration, thus achieving a precise match between the evaluation criteria and the actual management needs of the scenario.

[0082] Furthermore, this solution analyzes the historical performance data of the device under test (DUT) to issue early warnings before significant performance degradation or failure occurs, achieving a shift from "reactive maintenance" to "proactive prevention" and providing crucial decision support for equipment lifecycle management. Specifically, it continuously tracks the historical performance data of the DUT, including evaluation scores (obtained via S3 output), environmental parameters, and timestamps. The historical performance data is then smoothed using a sliding window to eliminate short-term fluctuation noise, outputting smoothed historical performance time-series data.

[0083] A trend prediction model is constructed. The trend prediction model adopts a long short-term memory network architecture. It takes smoothed historical performance time series data as input and outputs the performance prediction sequence for the next 30 days to form a performance decay curve.

[0084] A performance warning threshold is set, and the predicted evaluation score in the performance degradation curve is compared with the performance warning threshold daily. If the predicted evaluation score is lower than the performance warning threshold for several consecutive days, a warning signal is triggered. The warning signal includes the device identification, the warning level, and the specific time when the expected performance will drop below the warning threshold.

[0085] The warning signals are displayed through a visual interface and sent to the email addresses of maintenance personnel. Before equipment performance deteriorates significantly or failures occur, maintenance personnel can arrange preventive maintenance operations, realizing the shift from post-repair to pre-repair and providing decision support for equipment lifecycle management.

[0086] The beneficial effects are as follows: An initial sample library is constructed using multi-source traffic data. An attention-based incremental learning algorithm is used to continuously update the sample library, enabling laboratory-scale evaluation. This significantly improves evaluation efficiency and completely eliminates safety risks for test personnel. Evaluation scenario features are extracted from the updated sample library and input into a reinforcement learning agent to obtain evaluation indicators for the equipment under test and an indicator weighting scheme. This allows the evaluation criteria to be dynamically adjusted according to specific scenarios, enhancing the relevance of evaluation results to practical application value. Simultaneously, a trend prediction model continuously tracks historical performance data and predicts performance degradation trends, issuing early warnings before significant performance decline or failures occur. This shifts the focus from post-event maintenance to pre-event prevention, providing decision support for equipment lifecycle management.

[0087] In the above embodiments, although the steps are numbered S1, S2, etc., they are only specific embodiments given by the present invention. Those skilled in the art can adjust the execution order of S1, S2, etc. according to the actual situation, and these situations are also within the protection scope of the present invention. It can be understood that in some embodiments, some or all of the above embodiments may be included.

[0088] The present invention also provides a traffic incident detection index evaluation system, the specific technical solution of which is as follows: a sample construction module, a weight generation module, and a score calculation module; The sample construction module is used to acquire multi-source traffic data and build an initial sample library based on the multi-source traffic data; an attention-based incremental learning algorithm is used to update the initial sample library to obtain an updated sample library. The weight generation module is used to extract evaluation scene features based on the updated sample library, input the evaluation scene features into the reinforcement learning agent, and obtain the evaluation index weight allocation scheme of the device under test. The scoring calculation module is used to control the device under test to detect the test video and obtain the evaluation index of the device under test; the evaluation index is weighted and calculated based on the evaluation index weight allocation scheme to obtain the evaluation score of the device under test.

[0089] It should be noted that the beneficial effects of the traffic incident detection index evaluation system provided in the above embodiments are the same as those of the traffic incident detection index evaluation method described above, and will not be repeated here. Furthermore, the system provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to the actual situation to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, and will not be repeated here.

[0090] like Figure 2 As shown, an embodiment of the present invention provides a computer device 300, which includes a processor 320 coupled to a memory 310. The memory 310 stores at least one computer program 330, which is loaded and executed by the processor 320 to enable the computer device 300 to implement any of the above-described methods. Specifically: The computer device 300 can vary considerably due to differences in configuration or performance. It may include one or more processors 320 (Central Processing Units, CPUs) and one or more memories 310. The one or more memories 310 store at least one computer program 330, which is loaded and executed by the one or more processors 320 to enable the computer device 300 to implement the traffic incident detection index evaluation method provided in the above embodiment. Of course, the computer device 300 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The computer device 300 may also include other components for implementing device functions, which will not be elaborated here.

[0091] An embodiment of the present invention provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to enable a computer to implement any of the above-described methods.

[0092] Alternatively, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc.

[0093] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the traffic incident detection index evaluation methods described above.

[0094] It should be noted that the terms "first," "second," etc., used in the specification of this application are used to distinguish similar objects and represent a limitation on a specific order or sequence. Where appropriate, the order of use for similar objects can be interchanged so that the embodiments of this application described herein can be implemented in an order other than that shown in the figures or description.

[0095] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this disclosure can be specifically implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, the invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.

[0096] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0097] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for evaluating traffic incident detection indicators, characterized in that, include: S1, acquire multi-source traffic data, and construct an initial sample library based on the multi-source traffic data; An attention-based incremental learning algorithm is used to update the initial sample library to obtain an updated sample library. S2, extract evaluation scene features based on the updated sample library, input the evaluation scene features into the reinforcement learning agent, and obtain the evaluation index weight allocation scheme of the device under test; S3, control the device under test to detect the test video and obtain the evaluation index of the device under test; calculate the evaluation index by weighting it according to the evaluation index weight allocation scheme to obtain the evaluation score of the device under test.

2. The method for evaluating traffic incident detection indicators according to claim 1, characterized in that, The construction of the initial sample library based on the multi-source traffic data includes: Pre-trained deep neural networks are used to perform event recognition and scene feature extraction on the multi-source traffic data to generate pre-calibrated samples. The pre-calibrated samples are reviewed and corrected to obtain the initial sample library.

3. The method for evaluating traffic incident detection indicators according to claim 1, characterized in that, The step of updating the initial sample database using an attention-based incremental learning algorithm includes: Input the historical sample feature map from the initial sample library into the channel attention module and the spatial attention module, calculate the importance score of each channel and spatial location respectively, and generate an attention weight mask; When training new samples, elastic constraints are applied to scene features with high attention weights in historical tasks based on the attention weight mask. The elastic constraints are implemented by adding a historical task constraint loss term to the total loss function.

4. The method for evaluating traffic incident detection indicators according to claim 1, characterized in that, Also includes: The reinforcement learning agent is optimized based on the correlation between the evaluation score and the comprehensive evaluation of real road tests. The correlation is obtained by collecting evaluation score sequences and real road test comprehensive evaluation sequences within a preset time window, and then calculating the evaluation score sequences and the real road test comprehensive evaluation sequences. The real-world road test comprehensive evaluation is obtained by calculating the actual data collected by the device under test.

5. A traffic incident detection index evaluation system, characterized in that, include: Sample construction module, weight generation module, and score calculation module; The sample construction module is used to acquire multi-source traffic data and construct an initial sample library based on the multi-source traffic data; An attention-based incremental learning algorithm is used to update the initial sample library to obtain an updated sample library. The weight generation module is used to extract evaluation scene features based on the updated sample library, input the evaluation scene features into the reinforcement learning agent, and obtain the evaluation index weight allocation scheme of the device under test. The scoring calculation module is used to control the device under test to detect the test video and obtain the evaluation index of the device under test; The evaluation indicators are weighted and calculated based on the weighting scheme of the evaluation indicators to obtain the evaluation score of the device under test.

6. The traffic incident detection index evaluation system according to claim 5, characterized in that, The construction of the initial sample library based on the multi-source traffic data includes: Pre-trained deep neural networks are used to perform event recognition and scene feature extraction on the multi-source traffic data to generate pre-calibrated samples. The pre-calibrated samples are reviewed and corrected to obtain the initial sample library.

7. The traffic incident detection index evaluation system according to claim 5, characterized in that, The step of updating the initial sample database using an attention-based incremental learning algorithm includes: Input the historical sample feature map from the initial sample library into the channel attention module and the spatial attention module, calculate the importance score of each channel and spatial location respectively, and generate an attention weight mask; When training new samples, elastic constraints are applied to scene features with high attention weights in historical tasks based on the attention weight mask. The elastic constraints are implemented by adding a historical task constraint loss term to the total loss function.

8. The traffic incident detection index evaluation system according to claim 5, characterized in that, Also includes: The reinforcement learning agent is optimized based on the correlation between the evaluation score and the comprehensive evaluation of real road tests. The correlation is obtained by collecting evaluation score sequences and real road test comprehensive evaluation sequences within a preset time window, and then calculating the evaluation score sequences and the real road test comprehensive evaluation sequences. The real-world road test comprehensive evaluation is obtained by calculating the actual data collected by the device under test.

9. A computer device, characterized in that, The computer device includes a processor coupled to a memory, the memory storing at least one computer program, which is loaded and executed by the processor to enable the computer device to implement a traffic incident detection index evaluation method as described in any one of claims 1 to 4.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to enable the computer to implement a traffic incident detection index evaluation method as described in any one of claims 1 to 4.