Traffic Video Event Analysis Method and System Based on AutoQuan Quantization and LDA Classification

By combining the RT-DETR algorithm and LDA model with adaptive non-uniform quantization and multi-dimensional weighted mapping, this method addresses multiple shortcomings of existing traffic video event detection technologies, achieving high-precision and robust traffic event analysis, and is suitable for edge device deployment in complex road scenarios.

CN123071889APending Publication Date: 2026-11-10WUCHANG SHOUYI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611198178.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-07
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing traffic video event detection technologies suffer from multiple shortcomings in complex road scenarios, including weak anti-interference capabilities, low accuracy in distinguishing target categories, poor algorithm interpretability, difficulty in deploying edge devices, rigid quantization mechanisms, and lack of temporal feature modeling capabilities. These shortcomings prevent them from meeting the requirements for high precision, high stability, and practical deployment.

Method used

The RT-DETR target detection algorithm is used to obtain moving target features. Structured text words are generated through adaptive non-uniform quantization and multi-dimensional weighted mapping. Event analysis is performed by combining the LDA unsupervised clustering model. Multi-frame features are fused using a temporal sliding window strategy to achieve high-precision and robust traffic event detection.

Benefits of technology

It significantly improves the accuracy and robustness of traffic incident detection, reduces the false negative and false positive rates, has high algorithm interpretability, can be directly deployed on roadside edge monitoring devices, and is suitable for complex road scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123071889A_ABST
    Figure CN123071889A_ABST
Patent Text Reader

Abstract

This invention discloses a traffic video event analysis method and system based on AutoQuan quantization and LDA classification. The method includes: obtaining the category, location, and number of moving targets in the video through RT-DETR detection and tracking; constructing adaptive non-uniform quantization mapping functions on the axis, axis, and motion direction angle based on the distribution density of the target center point, respectively, to transform the motion features into structured text words concatenated by category, location, and angle quantization values; configuring weight mapping functions from three dimensions—category, region, and direction—based on prior scene knowledge, calculating the comprehensive weight coefficient of each text word, and repeatedly expanding it proportionally; concatenating the expanded text words of each frame into the original text, and accumulating the text of previous frames through a time-series sliding window to generate enhanced text and construct a text set; inputting the text set into an LDA unsupervised clustering model to assign an event topic category to each frame, realizing automatic classification and detection of traffic anomalies in complex road scenarios; without the need for large-scale labeled samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent traffic video analysis technology, and more specifically, relates to a traffic video event analysis method and system based on AutoQuan quantization and LDA classification. Background Technology

[0002] As the intelligent traffic management system for cities continues to be implemented, roadside cameras, highway monitoring and other equipment can collect video data of the entire road area. Relying on machine vision to automatically identify abnormal traffic events such as illegal parking, road traffic accidents, pedestrians illegally entering, and road congestion, it can significantly reduce the manpower input for manual inspection and shorten the emergency response time for emergencies. It is the core technical means for automated management and control of road traffic.

[0003] Current convolutional neural network-based object detection algorithms are relatively mature. Models such as Faster R-CNN, YOLO, and RT-DETR can accurately analyze basic perception information such as the target category, circumscribed coordinates, and cross-frame motion trajectories of pedestrians, non-motorized vehicles, and motor vehicles in surveillance footage. However, existing detection models can only complete basic target perception in a single frame, lacking adaptive optimization for traffic motion features, prior fusion of road scenes, and video temporal correlation reasoning capabilities. This makes it difficult to achieve high-precision and robust deep judgment of traffic events in complex road scenes, becoming a technical bottleneck that urgently needs to be overcome in this field.

[0004] Currently, there are three mainstream road traffic anomaly detection technologies publicly available in the industry, each with its own inherent technical defects: (1) Detection scheme based on autoencoder and unsupervised lifelong learning: This scheme extracts the original visual features of the video at the bottom layer through autoencoder, combines K-Means clustering to distinguish the regular traffic operation mode, and relies on incremental learning to iteratively update the model to adapt to dynamic traffic flow changes. However, this scheme has two core defects: First, the algorithm relies entirely on clear and interference-free video footage. When there are minor image disturbances such as camera shake, blurry images, or backlight occlusion, the detection accuracy is greatly reduced and the anti-interference ability is extremely poor. Second, the clustering process does not distinguish between different traffic targets such as pedestrians and vehicles. The overlapping calculation of motion features of different targets is very easy to cause deviation in event judgment results and insufficient detection accuracy.

[0005] (2) Traffic incident detection scheme based on visual large language model This solution directly inputs surveillance video frames into a large visual language model, which then outputs natural language descriptions and relies on built-in logic to distinguish various traffic events, eliminating the need for manual feature quantification and conversion processes. However, this solution has significant drawbacks: First, the large-scale model inference operates on a black-box computing model, lacking a structured, traceable, and controllable computational chain. The algorithm's decision logic has extremely low interpretability, making it unsuitable for post-event traceability and verification scenarios in traffic supervision. Second, the large visual model has a massive number of parameters and extremely high inference computational overhead, making it unsuitable for deployment on roadside edge monitoring hardware with limited computing resources, resulting in poor versatility.

[0006] (3) Unsupervised detection scheme based on YOLOv8, fixed uniform quantization and LDA text clustering: This scheme uses YOLOv8 combined with DeepSort to complete multi-target tracking. It discretizes the target motion parameters through fixed uniform quantization rules, converts the single-frame detection information into text corpus, and then relies on LDA unsupervised text classification to realize frame-by-frame traffic event determination. It does not require large-scale event sample annotation and has a low deployment threshold. However, this scheme has three technical shortcomings that cannot be ignored: ① The position and direction of the moving target are determined by a fixed uniform quantization rule, which does not have the ability to adapt and adjust. It cannot match the inherent statistical law of target distribution under different road scenarios, and the quantization of motion features is seriously distorted. ② The algorithm does not have a scenario prior knowledge fusion mechanism, and cannot perform differentiated feature enhancement processing for high-risk areas such as pedestrian crossings, intersections, and restricted areas, high-risk targets such as pedestrians, and high-risk movement angles such as crossing, resulting in low recognition of abnormal events; ③ The text mapping and classification are based solely on independent single-frame videos, without utilizing the temporal continuity of the video. When there are few effective moving targets in the scene and there are slight errors in quantization, the frame-level classification results are prone to jumps, which contradicts the objective law of the continuous evolution of real traffic events, resulting in poor algorithm stability.

[0007] In summary, current mainstream road traffic incident detection solutions suffer from multiple shortcomings, including weak image anti-interference capabilities, low accuracy in distinguishing target categories, poor algorithm interpretability, difficulty in deploying edge devices, rigid quantization mechanisms, and lack of temporal feature modeling capabilities. Existing technologies have yet to develop a lightweight, unsupervised traffic incident detection solution that simultaneously possesses adaptive motion feature quantization, multi-dimensional weighted fusion of scene priors, and temporal continuous feature modeling capabilities. This makes it impossible to meet the demands for high-precision, high-stability, and deployable intelligent analysis of traffic incidents in complex urban road and highway scenarios. Summary of the Invention

[0008] To address the aforementioned technical problems in existing technologies, this invention provides a traffic video event analysis method and system based on AutoQuan quantization and LDA classification. First, the RT-DETR target detection algorithm is used frame-by-frame to obtain the category, location, and tracking number of moving targets. Then, based on the actual distribution density of target center points in all frames, the system performs the following analysis: shaft and An adaptive non-uniform quantization mapping function is constructed for the axis, enabling fine-grained segmentation of dense regions and coarse-grained segmentation of sparse regions. Simultaneously, considering the ring-shaped features of the motion direction angle, a boundary-free angle quantization mapping function is constructed through double-copying expansion of the 360° statistical distribution and bidirectional recursive segmentation of the peak center, generating a quantization mapping function based on category, axis, The structured text words are formed by concatenating four-dimensional quantized values ​​of axes and angles. Then, based on prior scene knowledge, weight mapping functions are configured from three dimensions: target category, spatial region, and motion direction. The comprehensive weight coefficient of each text word is calculated and proportionally expanded by word frequency repetition, achieving differentiated enhancement of high-risk features. Subsequently, a temporal sliding window strategy is used to accumulate the original text of the current frame with the original text of multiple previous frames to generate enhanced text. This text set is then input into an LDA unsupervised clustering model, assigning an event topic category to each frame. This invention accurately preserves the spatiotemporal distribution features of the target through adaptive non-uniform quantization, amplifies the word frequency signal of abnormal events through multi-dimensional weighted mapping, and suppresses single-frame noise and avoids spurious convergence through temporal window fusion. Without requiring large-scale labeled samples or high-computing-power models, it significantly improves the accuracy, robustness, and interpretability of traffic event detection. It can be directly deployed on roadside edge monitoring equipment, meeting the high-precision and high-stability event analysis needs in complex road scenarios.

[0009] To achieve the above objectives, one aspect of the present invention provides a traffic video event analysis method based on AutoQuan quantization and LDA classification, comprising the following steps: S1. Acquire road traffic monitoring video, use target detection algorithm to detect and track moving targets frame by frame, filter out target categories related to road traffic, and obtain category information, location information and tracking number of each moving target in each frame; S2. Based on the distribution of the center point positions of moving targets in all frames, calculate the adaptive non-uniform quantization mapping functions for the x-axis and y-axis of the positions respectively; calculate the motion direction angle based on the displacement vectors of targets with the same tracking number between adjacent frames, and calculate the adaptive non-uniform quantization mapping function for the motion direction angle through a circular extended statistical distribution; quantize the motion features of each moving target using the quantization mapping function, generating a value composed of category quantization values, Axis position quantization value, Quantized text words are formed by concatenating quantized values ​​of axis position and quantized values ​​of direction angle; S3. Based on the preset scenario prior knowledge, construct the moving target category weight mapping function, the location region weight mapping function, and the movement direction angle weight mapping function respectively, calculate the comprehensive weight coefficient of each quantized text word, and repeatedly expand the quantized text word based on the comprehensive weight coefficient; S4. Concatenate all the quantized text words of each frame after repeated expansion to form the original text of that frame. Use a time-series sliding window strategy to accumulate the original text of the current frame and several preceding frames to generate the enhanced text of each frame. The text set consists of all the enhanced texts. S5. Input the text set into the LDA unsupervised clustering model, assign event topic categories to the enhanced text of each frame, and realize automatic classification and detection of traffic anomalies in complex road scenarios.

[0010] Furthermore, step S1 specifically includes: Acquire road traffic monitoring video stream and read the video's frame width FRAME_WIDTH, frame height FRAME_HEIGHT, and total number of frames FRAME_COUNT; The video is read frame by frame, and the RT-DETR target detection algorithm is used to detect and track targets in each frame. The target categories related to road traffic were selected, specifically including six categories: pedestrians, bicycles, motorcycles, cars, buses, and trucks. For each detected valid target, record its bounding box coordinates in the current frame; use a cross-frame tracking algorithm to assign and maintain a unique tracking number for the same physical target in different frames; Based on the bounding box coordinates, calculate the coordinates of the center point of the circumscribed rectangle of the moving target in the current frame; the calculation formula is: , ;in, The x-coordinate of the center point of the moving target; The ordinate of the center point of the moving target; The x and y coordinates of the top-left vertex of the bounding box; Let x and y be the x and y coordinates of the bottom right vertex of the bounding box, where , ; For each frame, output the category information, location information, and tracking number of all valid moving targets in that frame.

[0011] Further, the calculation of position described in step S2 The process of adaptive non-uniform quantization mapping function of the axis includes: Iterate through the x-coordinates of the center points of all valid moving targets in all frames. Count the frequency of its occurrence in the range of 1 to FRAME_WIDTH−1 to construct the position of the moving object. Discrete distribution function on the axis ; set up The axial quantization order is ,calculate Quantization threshold of axis : from Start by accumulating sequentially. The value is used to find the interval boundary; assuming the starting point of the current quantization interval is... The endpoint of the current quantization interval is then determined according to the following formula. : Calculate the start and end points of all intervals recursively until the number of intervals reaches a certain threshold. The total number of target samples in each interval is approximately equal to 1; ; Based on the calculated quantization intervals, construct Axis quantization mapping function ; Satisfy: When The value falls into the first When there are quantization intervals, ,in ; The calculation of position in step S2 The process of adaptive non-uniform quantization mapping function of the axis includes: Iterate through the center coordinates of all valid moving targets in all frames. Count the frequency of its occurrence in the range of 1 to FRAME_HEIGHT−1, and construct... Discrete distribution function of axis ; Set the moving object in The quantization order of the axis is ,calculate Quantization threshold of the axis: from Start by accumulating sequentially. The value is used to find the interval boundary; assuming the starting point of the current quantization interval is... The endpoint of the current quantization interval is then determined according to the following formula. : Calculate the start and end points of all intervals recursively until the number of intervals reaches a certain threshold. The total number of target samples in each interval is approximately equal to 1; ; Based on the calculated quantization intervals, construct Axis quantization mapping function ; Satisfy: When The value falls into the first When there are quantization intervals, ,in .

[0012] Furthermore, the process of calculating the adaptive non-uniform quantization mapping function of the motion direction angle in step S2 includes: For each moving target in each frame, based on its tracking ID, find the coordinates of the top-left corner of the target's position bounding box in the previous frame. , ) and the coordinates of the lower right corner ( , ), and the coordinates of the top-left corner of the position box rectangle in the current frame ( , ) and the coordinates of the lower right corner ( , ); Calculate the coordinates of the center point of the previous frame. and the center point coordinates of the current frame The expression is: Based on the displacement vector of the moving target from the previous frame to the current frame Calculate the angle of the direction of motion: Taking the angle modulo 360 and rounding it down, we get an integer angle value in the range of 1 to 360. ; Traverse all moving targets frame by frame, and obtain a motion angle value for each target. After summing and statistically analyzing, the statistical distribution function of the direction of motion is obtained. ; Define the angle of a moving object The quantization order is (Preset positive integer), calculate angle Quantization threshold : Find the statistical distribution function of the direction of motion. The maximum value in and their corresponding angles ,satisfy ; For the original statistical distribution function ( Perform horizontal replication expansion to construct the extended distribution function. Make it satisfy the following formula: by Simultaneously expand the step size from the center to both sides. Find an angle The first quantization interval is calculated using the following formula: When the above inequality is satisfied, the range of the first quantization interval is determined as follows: ; Assume the starting point of the current quantization interval is The endpoint can be calculated using the following formula. : Assume the starting point of the second pre-quantization interval is Then, according to the above inequality, the endpoint of the second prequantization interval is determined. ; Utilization and Following the same recursive rules for axes, the first step can be calculated sequentially. The starting point of each quantization interval and the end point ; The endpoint of the last interval obtained by recursion Perform 360° modulo calculation; when the condition is met When this occurs, it indicates that the range of values ​​in the quantization interval has formed a 360° circular closed loop; at this point, let the first... The endpoint of each quantization interval equal ; Perform a 360° modulo operation on the start and end coordinates of all quantization intervals: subtract 360 from the start or end coordinates of intervals greater than 360, so that the angle... During the calculation, the value range of 1 to 720 reverts to 1 to 360, completing the motion direction angle. All Calculation of each quantization interval; Construct a direction and angle quantization mapping function based on the calculated quantization intervals. The angle quantization mapping function Satisfy: When The value is the first When there are quantization intervals, ,in .

[0013] Furthermore, the specific process of quantizing text word generation in step S2 is as follows: The object category IDs from the COCO80 dataset are used as the category quantization values ​​for moving targets. ; Using the current position information of the moving target, calculate the x-coordinate of the target's center point. ;Will Substituting the above Axis quantization mapping function The target is obtained in Quantization values ​​on the axis: ; Using the current position information of the moving target, calculate the ordinate of the target's center point. ;Will Substituting the above Axis quantization mapping function The target is obtained in Quantization values ​​on the axis: ; Using the current moving target's position information and tracking ID, calculate the displacement vector of targets with the same ID in adjacent frames, obtain the motion direction angle, and then take the modulus and round down to get the angle value. ;Will Substitute the direction and angle quantization mapping function The quantized value of the target's motion direction is obtained: ; The effective motion information of each moving target in each frame is converted into discrete quantized values ​​in four dimensions. These four quantized values ​​are treated as a single string and concatenated using a period (.) as the separator to obtain the final quantized text of the moving target. .

[0014] Furthermore, the specific process of configuring weight mapping functions for the category, location region, and motion direction angle of the moving target based on preset scene prior knowledge in step S3 is as follows: Set category quantification values ​​for motion targets The value range is {0, 1, 2, 3, 5, 7}, corresponding to pedestrians, bicycles, cars, motorcycles, buses, and trucks in the COCO80 dataset, respectively. Based on scene characteristics and the tendency of event analysis, a weight mapping function for object categories is defined using prior scene knowledge. : in, Preset positive real number weights for pedestrians, bicycles, cars, motorcycles, buses, and trucks; Set the center point position of the moving target The range of values ​​is , Based on scene characteristics and event analysis tendencies, use prior scene knowledge to add [something] within the video frame plane. Each control zone is defined, and weights within each zone are set differently. Each regulatory region constitutes a regional set. For each region Set the coordinates of its top left vertex. and the coordinates of the bottom right vertex ( When a certain target center point satisfy and When the point is located in the region, it is determined that the point falls within the region. Within; each control region corresponds to a specific weight value, and the weight mapping function for object position is defined using prior knowledge of the scene. : in, Preset The positive real number weight values ​​of each control region This is the default weight value when the area does not fall into any control zone. Set the quantization value of the motion direction and angle of objects in the scene. The range of values ​​is Based on the characteristics of the scenario and the tendency of event analysis, add prior knowledge of the scenario. Each control interval has a differentiated angle weight setting within it; Define based on the characteristics of road direction or traffic flow and pedestrian movement direction. Each control angle range constitutes a set of intervals. For each interval Set the starting point of the angle and the end point When the direction and angle of a moving target satisfy When the target falls within this angle adjustment range, it is determined that the target falls within this range; each adjustment range corresponds to a specific weight value, and the weight mapping function of the object's orientation angle is defined using prior knowledge of the scene. : in, Preset The positive real number weights of each control angle interval. This is the default weight value when the angle does not fall within any control angle range.

[0015] Furthermore, the calculation of the comprehensive weight coefficient for each quantized text word in step S3 specifically includes: In step S2, the quantized value Cquan of the target moving object category and the coordinates of the center point of the moving position are calculated for each quantized text word. and the quantization value of the direction and angle of motion Substitute them into the weight mapping function of the object category respectively. The weighted mapping function for the object's position Weighted mapping function for object orientation and angle The comprehensive weight coefficient of the word is obtained. The expression is: in, For the target motion category weight mapping function; The target motion position weight mapping function; Target motion direction angle weighting mapping function; Step S3 involves repeating and expanding the quantified text words based on the comprehensive weighting coefficient, specifically including: For each frame of the video, after word quantization of all moving targets and calculation of their respective weight coefficients, all weight coefficients within the current frame are sorted, and the minimum value is found. : Iterate through all the quantized word text in the current video frame, and compare the weight coefficient of each word with the minimum value. Calculate the relative ratio and round it to the nearest integer to obtain the expanded copy number of the Word document's weight coefficient. where round is the floor function; This is the overall weighting coefficient for the word.

[0016] Furthermore, in step S4, a temporal sliding window strategy is used to accumulate the original text of the current frame and several preceding frames to generate enhanced text for each frame, specifically including: Define a sliding window length , It is a positive integer greater than 1; for the th The frame, the enhanced text N of the frame is generated according to the following rules. : when ≤ hour, That is, to sequentially concatenate the original text from frame 1 to the text of the current frame; when hour, The prelude is coming soon. The original text from frame to frame is concatenated onto the current text in chronological order.

[0017] Furthermore, step S5 specifically includes: For the LDA unsupervised text classification algorithm, set the number of iterations and the number of classifications; Use the text set generated in step S4 as the input corpus for the LDA algorithm; run the LDA unsupervised text classification algorithm, and the model training ends after the number of iterations reaches iteration_count; After the algorithm finishes, each text in the corpus Each event will be assigned an event category label, which is a positive integer between 1 and K; each frame in the video will be assigned an event category number, completing the end-to-end mapping from the original surveillance video to frame-by-frame event classification. The system identifies the most probable representative quantized text words for each topic; decodes these representative quantized text words into corresponding motion feature combinations; combines prior knowledge of the scene to summarize the event patterns represented by the corresponding topics and labels them with semantic tags; maps the event category number of each frame to a readable event name; and finally achieves the analysis and detection of abnormal road traffic events.

[0018] A second aspect of the present invention provides a traffic video event analysis system based on AutoQuan quantization and LDA classification, for implementing the aforementioned traffic video event analysis method based on AutoQuan quantization and LDA classification, comprising: The video acquisition and target detection and tracking module is used to acquire road traffic monitoring videos, perform moving target detection and tracking frame by frame using target detection algorithms, filter out target categories related to road traffic, and obtain the category information, location information and tracking number of each moving target in each frame; An adaptive non-uniform quantization module is used to calculate the position based on the distribution of the center point positions of the moving target in all frames. shaft and An adaptive non-uniform quantization mapping function for the axis; calculating the motion direction angle based on the displacement vectors of targets with the same tracking number between adjacent frames, and calculating the motion direction angle through a circular extended statistical distribution; using the quantization mapping function to quantize the motion characteristics of each moving target, generating a value composed of the moving target category quantization value, Axis position quantization value, Quantized text words are formed by concatenating quantized values ​​of axis position and quantized values ​​of direction angle; The scene prior multidimensional weighting module is used to construct a moving target category weight mapping function, a location region weight mapping function, and a movement direction angle weight mapping function based on preset scene prior knowledge, calculate the comprehensive weight coefficient of each quantized text word, and repeatedly expand the quantized text word based on the comprehensive weight coefficient; The temporal sliding window text construction module is used to concatenate all quantized text words of each frame after repeated expansion into the original text of the corresponding frame. The temporal sliding window strategy is used to accumulate the original text of the current frame and several previous frames to generate the enhanced text of each frame. The text set consists of all the enhanced texts. The LDA unsupervised clustering and event classification module is used to input the text set into the LDA unsupervised clustering model, assign event topic categories to the enhanced text of each frame, and complete the classification and detection of traffic video events.

[0019] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects: (1) This invention designs an AutoQuan adaptive non-uniform quantization mechanism to quantize the moving target in different ways. axis, Axis position and direction of motion angle Adaptive segmentation of quantization intervals is performed across three dimensions: First, based on the actual statistical distribution density of target center points in all frames, the interval width is automatically reduced in dense regions for fine segmentation, and the interval is automatically widened in sparse regions for coarse segmentation, ensuring that each quantization interval accommodates approximately the same number of samples, effectively reducing the loss of trajectory features for high-speed moving targets and the quantization redundancy for static targets; Second, for the circular features of motion direction angles, the statistical distribution from 1° to 360° is doubled and expanded to 1° to 720°. The function is used to divide the first quantization interval bidirectionally to both sides of the distribution peak, eliminating the natural dividing point between 0° and 360° and fully preserving the continuity of circular motion characteristics such as vehicle turning and pedestrian crossing. This design overcomes the shortcomings of existing technologies where fixed uniform quantization cannot adapt to the inherent statistical laws of target distribution under different road scenarios, and significantly improves the quantization accuracy of the spatiotemporal motion characteristics of traffic targets.

[0020] (2) This invention constructs a scenario prior weighted mapping system that integrates three dimensions: target category, road space region, and direction of movement angle. It defines category weight mapping function, location region weight mapping function, and direction angle weight mapping function respectively. The three are multiplied to obtain the comprehensive weight coefficient of each quantified text word. The text word is repeatedly expanded (word frequency enhancement) based on the ratio of the comprehensive weight coefficient to the minimum weight in the frame. This mechanism can assign higher word frequency weights to high-risk traffic features such as pedestrians, intersection center, reverse direction, and cross direction, so that abnormal / high-risk targets occupy a larger proportion in the subsequent LDA bag-of-words model. This effectively amplifies the identification of abnormal event features, reduces the false detection rate and false detection rate of traffic events, and overcomes the defects of existing technologies that lack scenario prior knowledge integration and abnormal events are submerged by normal traffic patterns.

[0021] (3) This invention employs a temporal sliding window strategy to concatenate the original text of the current frame and its preceding frames in chronological order to generate enhanced text. This enhanced text, rather than single-frame text, is used as the input document for the LDA model. This design fully utilizes the natural continuity of traffic events in the temporal dimension, allowing word frequencies to be further accumulated and amplified when abnormal patterns repeatedly appear in multiple frames. This effectively suppresses jumps in frame-level classification results caused by single-frame target detection errors, brief occlusions, or camera shake. Furthermore, by aggregating multi-frame data into a single document, the effective word count of each document is significantly increased, avoiding the pseudo-convergence phenomenon caused by insufficient single-frame data in the LDA model. This mechanism overcomes the shortcomings of existing technologies that analyze based solely on independent single frames, contradicting the objective laws of the continuous evolution of real traffic events. It significantly improves the stability and robustness of the algorithm under complex road conditions.

[0022] (4) This invention is based on the RT-DETR lightweight target detection algorithm, combined with purely numerical adaptive non-uniform quantization, multi-dimensional weighted expansion, and text concatenation operations. Finally, it relies on LDA unsupervised clustering to complete event classification. The entire process does not require a large number of manually labeled event training samples, nor does it rely on the massive parameter inference of visual large language models. The computational load of the entire solution is completely controllable, and it does not involve highly complex neural network backpropagation or large matrix operations. It can be directly deployed on roadside edge monitoring hardware devices with limited computing resources. This design overcomes the shortcomings of existing visual large model solutions, which have extremely high inference computing overhead and cannot be implemented at the edge. At the same time, it avoids the strong dependence of autoencoder solutions on clear images, and broadens the practical deployment applicability of this invention in various scenarios such as complex urban roads and highways.

[0023] (5) This invention transforms the target detection values ​​into structured text words with clear physical meanings, and then performs unsupervised LDA clustering, making the entire process from quantization interval division and weight coefficient calculation to temporal text construction traceable and reproducible. Each event topic output by LDA can be decoded in reverse from high-frequency quantized text words into specific motion feature combinations (such as "category = pedestrian, location = zebra crossing, direction = crossing"), with high transparency of the judgment logic, unlike the black-box calculation mode of visual large language models; this feature makes it easy for traffic regulators to directly understand the identification basis of abnormal events during post-event source tracing and verification, and is fully adapted to the needs of daily road patrols and traffic violation evidence collection and other business scenarios. Attached Figure Description

[0024] Figure 1 This is a flowchart illustrating a traffic video event analysis method based on AutoQuan quantization and LDA classification according to an embodiment of the present invention. Figure 2This invention provides a traffic video event analysis method based on AutoQuan quantization and LDA classification, which describes the position of moving objects in the traffic video event analysis. A schematic diagram of the statistical distribution on the axis; Figure 3 This invention provides a traffic video event analysis method based on AutoQuan quantization and LDA classification, which describes the position of moving objects in the traffic video event analysis. Schematic diagram of quantization mapping function on axis; Figure 4 This invention provides a traffic video event analysis method based on AutoQuan quantization and LDA classification, which describes the position of moving objects in the traffic video event analysis. A schematic diagram of the statistical distribution on the axis; Figure 5 This invention provides a traffic video event analysis method based on AutoQuan quantization and LDA classification, which describes the position of moving objects in the traffic video event analysis. A schematic diagram of the quantization mapping function on the axis; Figure 6 This invention relates to a traffic video event analysis method based on AutoQuan quantization and LDA classification, specifically focusing on the target motion direction angle. A schematic diagram of the statistical distribution; Figure 7 The motion direction angle in a traffic video event analysis method based on AutoQuan quantization and LDA classification, as described in an embodiment of the present invention. Schematic diagram of quantization mapping function; Figure 8 This is a schematic diagram of a multi-dimensional weighted mapping method based on scene priors in a traffic video event analysis method based on AutoQuan quantization and LDA classification according to an embodiment of the present invention. Figure 9 This is a schematic diagram of a text construction method based on a temporal sliding window strategy in a traffic video event analysis method based on AutoQuan quantization and LDA classification according to an embodiment of the present invention. Figure 10 This is a schematic diagram of the final road traffic video event classification result obtained in a traffic video event analysis method based on AutoQuan quantization and LDA classification according to an embodiment of the present invention. Figure 11 This is a schematic diagram of the structure of a traffic video event analysis system based on AutoQuan quantization and LDA classification according to an embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0026] like Figure 1 As shown, one aspect of the present invention provides a traffic video event analysis method based on AutoQuan quantization and LDA classification, comprising the following steps: S1. Acquire road traffic monitoring video, use target detection algorithm to detect and track moving targets frame by frame, filter out target categories related to road traffic, and obtain category information, location information and tracking number of each moving target in each frame; S2. Based on the distribution of the center point positions of moving targets in all frames, calculate the adaptive non-uniform quantization mapping functions for the x-axis and y-axis positions respectively; calculate the motion direction angle based on the displacement vectors of targets with the same tracking number between adjacent frames, and calculate the adaptive non-informative uniform quantization mapping function for the motion direction angle through a circular extended statistical distribution; quantize the motion features of each moving target using the quantization mapping function to generate quantized text words composed of category quantization values, x-axis position quantization values, y-axis position quantization values, and direction angle quantization values. S3. Based on the preset scenario prior knowledge, configure weight mapping functions for the category, location area and direction of motion of the moving target, calculate the comprehensive weight coefficient of each quantized text word, and repeatedly expand the quantized text word based on the comprehensive weight coefficient. S4. Concatenate all the quantized text words of each frame after repeated expansion to form the original text of that frame. Use a time-series sliding window strategy to accumulate the original text of the current frame and several preceding frames to generate the enhanced text of each frame. The text set consists of all the enhanced texts. S5. Input the text set into the LDA unsupervised clustering model, assign event topic categories to the enhanced text of each frame, and realize the classification and detection of traffic anomalies in complex road scenarios.

[0027] This invention precisely adapts to the actual distribution density of targets through adaptive non-uniform quantization, finely dividing dense areas and coarsely dividing sparse areas, and eliminates angular boundary fragmentation through ring expansion; it significantly amplifies the feature recognition of abnormal events by enhancing word frequency for high-risk targets, regions, and directions through scene prior multi-dimensional weighting; it effectively suppresses single-frame noise jumps and avoids LDA spurious convergence by fusing multiple frames of text through temporal sliding windows; the entire solution does not require the high computing power support of large-scale labeled samples and large visual models, the computational load is controllable, the algorithm process is traceable throughout, and it can be directly deployed on roadside edge monitoring equipment, achieving high-precision, high-robustness, and interpretable unsupervised recognition of traffic anomalies in complex road scenarios.

[0028] The steps of the method of the present invention will be described in detail below.

[0029] (1) Target detection and tracking Acquire road traffic monitoring video stream, and read the video's frame width FRAME_WIDTH (total number of pixels in the horizontal direction, a positive integer), frame height FRAME_HEIGHT (total number of pixels in the vertical direction, a positive integer), and total number of frames FRAME_COUNT (total number of video frames, a positive integer). The video is read frame by frame, and the RT-DETR (Real-Time Detection Transformer) target detection algorithm is used for target detection and tracking in each frame. RT-DETR is an end-to-end real-time target detector based on the Transformer architecture, which can meet the real-time requirements of edge devices while maintaining high detection accuracy. Target categories related to road traffic were selected (only target categories closely related to road traffic were retained during the detection process), specifically including pedestrians (corresponding to category ID=0 in the COCO dataset), bicycles (ID=1), motorcycles (ID=3), cars (ID=2), buses (ID=5), and trucks (ID=7), totaling six categories; non-road-related categories such as traffic lights, fire hydrants, and the sky were removed to reduce subsequent computational burden and noise interference; For each detected valid target, record its bounding box coordinates in the current frame: x and y coordinates of the top-left vertex. and the x and y coordinates of the bottom right vertex ,in , Use cross-frame tracking algorithms (such as ByteTrack or DeepSort) to assign and maintain a unique tracking ID (non-negative integer) for the same physical target in different frames, ensuring that the same vehicle has the same ID in multiple consecutive frames; calculate the coordinates of the center point of the bounding rectangle of the moving target in the current frame based on the bounding box coordinates. The calculation formula is: , ;in, The x-coordinate of the center point of the moving target; The ordinate of the center point of the moving target; At this point, for each frame, the system outputs the category information (Cquan) and location information of all valid moving targets in that frame. The tracking number ID provides the raw data support for constructing the adaptive non-uniform quantization mapping function in the subsequent step S2.

[0030] (2) AutoQuan adaptive non-uniform quantization Step S2 aims to overcome the limitation of existing fixed uniform quantization schemes that cannot adapt to the actual distribution density of the target. Fixed uniform quantization will... axis, Dividing the target into fixed-width intervals based on axes or angles can lead to a loss of spatial details in densely populated areas and a large number of empty buckets in sparse areas due to overly narrow intervals, resulting in decreased text feature discriminativeness during subsequent LDA clustering. The AutoQuan (Auto Adaptive Non-uniform Quantization) algorithm adaptively adjusts the width of each quantization interval by statistically analyzing the actual distribution density of target center points across all frames: finer intervals for dense areas and coarser intervals for sparse areas, ensuring that each quantization interval accommodates approximately the same number of samples, thereby guaranteeing that the quantized text words can uniformly reflect the motion features of the entire scene. Step S2 specifically includes: S21: Adaptive Non-Uniform Quantization of Moving Objects on the x-Axis First, iterate through the x-coordinates of the center points of all valid moving targets in all frames. Count the frequency of its occurrence in the range of 1 to FRAME_WIDTH−1 to construct the position of the moving object. Discrete distribution function on the axis ; The x-coordinate is The cumulative number of times the target center point appears is equal to the total number of valid targets in all frames. ; The position is an integer greater than or equal to 0; the position of the moving object. Discrete distribution function on the axis like Figure 2 As shown; set up The axial quantization order is (Preset positive integer, for example) ), indicating a desire to The axis is divided into One quantization interval; calculation Quantization threshold of axis : for The expected value of the total number of target samples that should be included in each quantization interval of the axis (i.e., the total number of samples divided by the number of intervals). from Start by accumulating sequentially. The value is used to find the interval boundary; specifically, assuming the starting point of the current quantization interval is... The endpoint of the current quantization interval is then determined according to the following formula. : Based on the above determination rules, the starting point of the first quantization interval is... Substituting into the above inequality, we can find the endpoint of the first quantization interval. ; Subsequently, the starting point of the second quantization interval is set as Continuing to solve using the above inequalities, we obtain the endpoint of the second quantization interval. ; And so on, recursively calculating the start and end points of all intervals until the number of intervals reached a certain threshold. indivual; If the calculated value at the end of the last quantization interval is greater than or equal to FRAME_WIDTH−1, then it is directly set to FRAME_WIDTH−1 to ensure complete coverage. Axis range; Through the above recursive process, we can obtain a total of There are several quantization intervals, and the total number of target samples in each interval is approximately equal to... ; Based on the calculated quantization intervals, construct Axis quantization mapping function The function satisfies: when The value falls into the first When there are quantization intervals, ,in ; for The interval number to which the coordinates belong; Please refer to Figure 3 ( (Diagram of mapping functions), which visually illustrates the different coordinate values ​​to interval numbers The mapping relationship; The Axis quantization mapping function exist In areas with densely distributed axial targets, the subdivisions are more refined (with smaller interval widths); In regions where the target distribution is sparse, the segmentation is made even sparser (with a large interval width). This adaptive non-uniform quantization segmentation method can better preserve the spatial distribution characteristics of moving targets in the original video, avoiding the defects of fixed uniform quantization in dense areas being under-segmented and in sparse areas being over-segmented, thereby improving the accuracy of the overall event analysis algorithm. S22: The position of the moving object On-axis adaptive non-uniform quantization The processing logic of the axis and The axis is perfectly symmetric. Iterate through the center coordinates of all valid moving targets in all frames. Count the frequency of its occurrence in the range of 1 to FRAME_HEIGHT−1, and construct... Discrete distribution function of axis ; The position is an integer greater than or equal to 0; the position of the moving object. Discrete distribution function on the axis like Figure 4 As shown; Set the moving object in The quantization order of the axis is (Preset positive integer), calculate Quantization threshold of the axis: for The expected value of the total number of target samples that should be included in each quantization interval of the axis (i.e., the total number of samples divided by the number of intervals). from Start by accumulating sequentially. The value is used to find the interval boundary; specifically, assuming the starting point of the current quantization interval is... The endpoint of the current quantization interval is then determined according to the following formula. : Based on the above determination rules, the starting point of the first quantization interval is... Substituting into the above inequality, we can find the endpoint of the first quantization interval. ; Subsequently, the starting point of the second quantization interval is set as Continuing to solve using the above inequalities, we obtain the endpoint of the second quantization interval. ; And so on, recursively calculating the start and end points of all intervals until the number of intervals reached a certain threshold. indivual; If the calculated value at the end of the last quantization interval is greater than or equal to FRAME_HEIGHT-1, then it is directly set to FRAME_HEIGHT-1 to ensure complete coverage. Axis range; Through the above recursive process, we can obtain a total of There are several quantization intervals, and the total number of target samples in each interval is approximately equal to... ; Based on the calculated quantization intervals, construct Axis quantization mapping function The function satisfies: when The value falls into the first When there are quantization intervals, ,in ; for The interval number to which the coordinates belong; Please refer to Figure 5 ( (Diagram of mapping functions), which visually illustrates the different coordinate values ​​to interval numbers The mapping relationship; This quantization function is in The densely distributed regions of the axes are further subdivided; in Non-dense regions with axial distribution are segmented more sparsely; this adaptive non-uniform quantization segmentation method can better preserve the motion features of the original video and improve the overall algorithm accuracy. S24: The direction of motion of a moving object Angle-adaptive non-uniform quantization The steps aim to determine the direction angle of the moving target. Perform adaptive non-uniform quantization; and axis / The linear distribution of axes differs, and the direction angles have a circular characteristic—1° and 360° are adjacent in physical space; if 1° to 360° are directly divided, a forced break will inevitably occur at the boundary; therefore, this invention uses a circular expansion + peak center bidirectional division method, which not only preserves the circular continuity of the angles, but also performs adaptive quantization starting from the region with the densest data distribution. Step S24 specifically includes: S241: Calculate the coordinates of the center points of adjacent frames For each moving target in each frame, based on its tracking ID, find the coordinates of the top-left corner of the target's position bounding box in the previous frame. , ) and the coordinates of the lower right corner ( , ), and the coordinates of the top-left corner of the position box rectangle in the current frame ( , ) and the coordinates of the lower right corner ( , ); Calculate the center point coordinates of the previous frame using the following formula. and the center point coordinates of the current frame : S242: Calculate the angle of motion direction Based on the displacement vector of the moving target from the previous frame to the current frame Calculate the angle of the direction of motion: S243: Angle Modulus and Statistical Distribution Taking the angle modulo 360 and rounding it down, we get an integer angle value in the range of 1 to 360. ; Traverse all moving targets frame by frame, and obtain a motion angle value for each target. After summing and statistically analyzing, the statistical distribution function of the direction of motion is obtained. ,like Figure 6 As shown (direction and angle of motion) (Statistical distribution chart) S244: Ring Extension Define the angle of a moving object The quantization order is (Preset positive integer), calculate angle Quantization threshold : Find the statistical distribution function of the direction of motion. The maximum value in and their corresponding angles ,satisfy ;like If the maximum value is not unique (there are multiple peaks), then the one with the smallest angle value is defined as... ; To eliminate the 0° / 360° boundary discontinuities, the original statistical distribution function... ( Perform horizontal replication expansion to construct the extended distribution function. Make it satisfy the following formula: angle The quantization interval division will be Onwards; due to It is the original distribution function The double replication method preserves the angle variable. The ring-shaped feature does not force a segmentation at 1° and 360°, thus maintaining the continuity of the interval; S245: at peak value Divide the first quantization interval around the center. by Simultaneously expand the step size from the center to both sides. ( Starting from 0 and increasing, finding an angle. The first quantization interval is calculated using the following formula: When the above inequality is satisfied, the range of the first quantization interval is determined as follows: This method of calculating the first quantization interval centered on the peak of the angle distribution can adaptively divide the quantization interval from the region with the densest angles, preserving the characteristics of the motion direction angles in the original video scene to the greatest extent and improving the accuracy of the overall algorithm. S246: Recursively calculate subsequent quantization intervals Assume the starting point of the current quantization interval is The endpoint can be calculated using the following formula. : In a specific embodiment of the present invention, it is assumed that the starting point of the second pre-quantization interval is Then, according to the above inequality, the endpoint of the second prequantization interval is determined. ; Utilization and Following the same recursive rules for axes, the first step can be calculated sequentially. The starting point of each quantization interval and the end point ; S247: Closed-loop correction and mapping back to 1~360° The endpoint of the last interval obtained by recursion Perform 360° modulo calculation; when the condition is met When this occurs, it indicates that the range of values ​​in the quantization interval has formed a 360° circular closed loop; at this point, let the first... The endpoint of each quantization interval equal Maintain that all quantization intervals are continuous and do not overlap at the beginning and end; Subsequently, a 360° modulo operation is performed on the start and end coordinates of all quantization intervals: 360 is subtracted from the start or end coordinates of intervals greater than 360, so that the angle... During the calculation, the value range of 1 to 720 reverts to 1 to 360, completing the motion direction angle. All Calculation of each quantization interval; S248: Constructing the Angle Quantization Mapping Function An angle quantization mapping function is constructed based on the calculated quantization intervals. The angle quantization mapping function Satisfy: When The value is the first When there are quantization intervals, ,in ; like Figure 7 As shown in the figure; the figure illustrates the range numbers for different angle values. The mapping relationship; This calculation method can adaptively divide the quantization interval starting from the region with the densest angles, thus preserving the motion direction angles to the greatest extent possible. The scene characteristics are beneficial to improving the overall algorithm performance; at the same time, because the statistical distribution function is doubled and extended, the natural dividing points of 1° and 360° in the original statistical distribution function are eliminated, and the angles are preserved. Circular characteristics; In addition, with location Axis and position Similarly, the quantization function is applied to the angle. Densely distributed regions are divided into more finely (smaller interval widths); at the angle Sparsely distributed regions are segmented even more sparsely (with larger interval widths); this adaptive non-uniform quantization segmentation method can better preserve the directional distribution characteristics of moving targets in the original video and improve the accuracy of the overall event analysis algorithm.

[0031] S25: Quantitative Text Word Generation This step aims to utilize the positions calculated in the aforementioned steps S22 to S24. Axis quantization mapping function Position y-axis quantization mapping function and direction angle Quantization mapping function The motion feature information of each moving target in each frame is transformed into a structured quantized text word, which serves as the basic bag-of-words unit for subsequent LDA unsupervised clustering.

[0032] Based on the processing results of step S1, the initial motion feature information of each moving target in each frame of video includes: object category, object position (bounding box coordinates), and tracking ID. For each moving target in each frame, the final quantized text words are obtained according to the following sub-steps: Category Quantification Value Acquisition: The object category ID value in the COCO80 dataset is used as the category quantization value for the moving target. The specific mapping relationship is as follows: the category quantization value of pedestrians is 0, the category quantization value of bicycles is 1, the category quantization value of motorcycles is 3, the category quantization value of cars is 2, the category quantization value of buses is 5, and the category quantization value of trucks is 7. Object categories other than the above six categories have been pre-removed in the target screening stage of step S1 because they are not closely related to road traffic event analysis, and will not enter the quantization process in this step. Axis position quantization value Acquisition: Using the current position information of the moving target, calculate the x-coordinate of the target's center point. ;Will Substituting the result obtained in step S22 Axis quantization mapping function To obtain the target in Quantization values ​​on the axis: ; Axis position quantization value Acquisition: Using the current position information of the moving target, calculate the ordinate of the target's center point. ;Will Substituting the result obtained in step S23 Axis quantization mapping function To obtain the target in Quantization values ​​on the axis: ; Direction angle quantization value Acquisition: Using the current moving target's position information and tracking ID, calculate the displacement vector of targets with the same ID in adjacent frames, obtain the motion direction angle, and take the modulus and round to get the angle value. ;Will Substitute the direction angle quantization mapping function obtained in step S24 The quantized value of the target's direction of motion is obtained: ; Quantized text word concatenation: After the above processing, the effective motion information of each moving target in each frame is converted into discrete quantized values ​​in four dimensions. These four quantization values ​​are treated as strings and concatenated using the period "." as a separator to obtain the final quantized text of the moving target. For example, a car is detected in a certain frame. ,That Axis quantization value , Axis quantization value Quantized value of motion direction angle The corresponding quantized text word is "2.5.3.12". This text word encodes the target's category identity, spatial location (horizontal / vertical axis interval), and direction of motion (angle interval) simultaneously in the form of pure discrete integers. It has high information density and regular format, making it very suitable as the input bag-of-words unit for the subsequent LDA text clustering algorithm.

[0033] (3) Multi-dimensional weighted mapping and word frequency expansion based on scenario prior In step S2, all moving targets, regardless of their category importance, the degree of danger of their spatial location, or the degree of anomalousness of their movement direction, are equally quantified into uniformly formatted text words. However, in real traffic scenarios, the contribution of different targets to event detection varies greatly—for example, a vehicle traveling against traffic in the middle of an intersection is more indicative of the event than a vehicle traveling normally on the side of the road; a pedestrian entering a restricted area is more noteworthy than a pedestrian on a regular crosswalk. If all text words are fed into LDA clustering with equal weight, the unique patterns of anomalous events will be overwhelmed by a massive amount of normal traffic patterns, leading to a decrease in the distinguishability of clustered topics.

[0034] To this end, step S3 of the present invention introduces a multi-dimensional weighted mapping algorithm based on scenario priors: according to prior knowledge in the field of transportation, a weight mapping function is constructed from three dimensions: target category, spatial location, and direction of movement. The comprehensive weight coefficient of each quantified text word is calculated, and the text words are repeatedly expanded (word frequency enhancement) according to the coefficient, so that the text representation of abnormal / high-risk / key targets occupies a higher word frequency proportion in subsequent LDA clustering, significantly improving the recognition of event topics.

[0035] Step S3 specifically includes: S31: Construct a moving target category weight mapping function Set category quantification values ​​for motion targets The range of values ​​is (Corresponding to pedestrians, bicycles, cars, motorcycles, buses, and trucks in the COCO80 dataset, respectively); Based on scene characteristics and event analysis tendencies, a weight mapping function for object categories is defined using prior scene knowledge. : in, These are preset positive real number weight values; the weight values ​​for object categories that require special attention (such as pedestrians, non-motorized vehicles, and other vulnerable road users) increase; the weight values ​​for object categories that do not require special attention (such as motor vehicles in normal traffic conditions) decrease; for example, it can be set to... (pedestrian), (bike), (motorcycle), (Car) (the bus), (Truck); The above values ​​are exemplary settings and can be flexibly adjusted according to specific scenario requirements during actual deployment.

[0036] S32: Constructing the location region weight mapping function Set the center point position of the moving target The range of values ​​is , Based on scene characteristics and event analysis tendencies, use prior scene knowledge to add [something] within the video frame plane. Each control zone has its own weighting system with differentiated settings. definition Each regulated area (including but not limited to intersections, pedestrian crossings, restricted areas, construction zones, and non-driving areas) constitutes a set of areas. For each region Set the coordinates of its top left vertex. and the coordinates of the bottom right vertex ( When a certain target center point satisfy and When the point is located in the region, it is determined that the point falls within the region. Inside; Each control region corresponds to a specific weight value, and the weight mapping function for object positions is defined using prior knowledge of the scene. : in, The preset positive real number weight values, The default weight value (usually set to 1.0) is used when the object does not fall into any control area; the weight value corresponding to the object location that needs to be focused on (such as the center of the intersection, pedestrian crossing, restricted area and other high-incidence areas) is increased; the weight value corresponding to the object location that does not need to be focused on (such as regular straight lanes and other normal traffic areas) is decreased or remains at the baseline value. The division of the control area can be pre-defined by manually annotating polygonal ROIs (Regions of Interest), or it can be automatically generated in combination with lane line detection results; the design concept of this weight function is: the higher the event risk at the location of the target, the greater the expansion factor of its text words; S33: Construct the motion direction and angle weight mapping function Set the quantization value of the motion direction and angle of objects in the scene. The range of values ​​is (corresponding to step S2) (output); based on scene characteristics and event analysis tendencies, add using scene prior knowledge. Each control interval has a differentiated angle weight setting within it; Define based on the characteristics of road direction or traffic flow and pedestrian movement direction. Each control angle range constitutes a set of intervals. For each interval Set the starting point of the angle and the end point When the direction and angle of a moving target satisfy At that time, it is determined that the target falls within this angle control range; Each control interval corresponds to a specific weight value, and the weight mapping function for the object's orientation and angle is defined using prior knowledge of the scenario. : in, The preset positive real number weight values, The default weight value (usually set to 1.0) is used when the vehicle does not fall within any control angle range; the weight value increases for directions requiring special attention (such as abnormal movement patterns like driving against traffic, crossing roads, and illegal U-turns); the weight value decreases or remains at the baseline value for directions that do not require special attention (such as normal driving conditions like driving in the same direction). S34: Calculation of Comprehensive Weighting Coefficient The idea of ​​a multi-dimensional weighted mapping algorithm based on scene priors is as follows: Figure 8 (A schematic diagram of a multi-dimensional weighted mapping method based on scene priors is shown); according to step S2, for each quantized text word, the corresponding target moving object category quantization value is Cquan, and the coordinates of the center point of the movement position are... The quantized value of the direction of motion angle is Substitute these values ​​sequentially into the weight mapping functions of steps S31, S32, and S33 to obtain the comprehensive weight coefficient of the word. : in, For the target motion category weight mapping function; The target motion position weight mapping function; Target motion direction angle weighting mapping function; this comprehensive weighting coefficient It also encodes the importance of the target category, the risk level of the spatial location, and the degree of abnormality of the movement direction, which is a holistic measure of the "information value" of the text words in traffic incident analysis.

[0037] S35: Weight Normalization and Frequency Expansion For each frame of the video, after word quantization of all moving targets and calculation of their respective weight coefficients, all weight coefficients within the current frame are sorted, and the minimum value is found. ; Iterate through all the quantized word text in the current video frame, and compare the weight coefficient of each word with the minimum value. Calculate the relative ratio and round it to the nearest integer to obtain the expanded copy number of the Word document's weight coefficient. where round is the floor function; This is the overall weighting coefficient for the word; if <1, then let =1, ensuring that the quantized text word of each valid target appears at least once in the text of the current frame; Each quantized text word in each frame corresponds to one value; The value directly reflects the importance of that word in the prior knowledge of the scene. The larger the value, the higher the overall anomaly / criticality of the target across the three dimensions of category, location, and orientation.

[0038] Since the LDA algorithm model ultimately used for event classification is the Bag-of-Words model, which does not consider the order of words in the text, but only the frequency of word occurrences, it categorizes each word according to its position in the text. value repeated concatenation In this way, the preset prior scene features can be seamlessly integrated into the text representation of the overall algorithm.

[0039] (4) Use a time-series sliding window strategy to construct the word into a document and concatenate all documents into a corpus text. In step S3, each quantized text word has completed intra-frame word frequency expansion based on prior knowledge of the scene. However, single-frame text still faces two problems: First, real traffic events (such as illegal parking, pedestrians running over, and road congestion) are continuous in the time dimension, and it is difficult to stably represent the complete pattern of the event based solely on the instantaneous features of a single frame. Second, when there are few effective moving targets in a frame or there are brief missed detections in target detection, the bag-of-words of a single-frame text is too sparse, and directly feeding it into the LDA model can easily lead to spurious convergence (i.e., the model incorrectly clusters noise into false topics due to insufficient data). To address this, step S4 of this invention introduces a temporal sliding window accumulation strategy at the frame text level: the original text of the current frame and several preceding frames are spliced ​​together in chronological order to generate "enhanced text" with denser information and more complete temporal context, and then the enhanced text is fed into LDA clustering in units; thereby effectively preserving the continuous characteristics of traffic events and improving the robustness of LDA clustering. Step S4 specifically includes: S41: Construction of raw text in a single frame Starting from the first frame of the video, traverse frame by frame; for the... frame( Based on step S2, the quantized text words of all moving targets in the frame have been calculated, and based on step S3, the number of extended copies corresponding to each word has been calculated. ; Iterate through all words in the frame, and sort each word according to its corresponding... Value duplicate copy Next, all the expanded words are concatenated together sequentially, using spaces as delimiters, to form the [number]. The original text of the frame ; By performing the above operation on each frame of the video, we can eventually obtain FRAME_COUNT raw text files. , The range of values ​​is ; S42: Timing Sliding Window Accumulation Define a sliding window length , It is a positive integer greater than 1; for the th The frame, the enhanced text N of the frame is generated according to the following rules. : when ≤ hour, That is, to sequentially concatenate the original text from frame 1 to the text of the current frame; when hour, The prelude is coming soon. The original text from frame to frame is sequentially appended to the current text in chronological order. Among them, the splicing operation refers to connecting the first and last quantized text word sequences from multiple original texts to form an enhanced text containing multi-frame motion information; The algorithmic approach of the time-series sliding window strategy is illustrated as follows: Figure 9 As shown in the figure; the figure visually illustrates that the window length is... How is enhanced text generated from the sum of text in the preceding frames in different frames? S43: Text Set Construction After the sliding window processing described above, the original FRAME_COUNT original text files... Converted into FRAME_COUNT enhanced text ; each As a single document, arranged sequentially according to frame order, they form a text set corpus used for LDA unsupervised clustering computation: Each element in this text set This is an input document for the LDA model, consisting of a sequence of quantized text words separated by spaces; In real-world traffic events, transitions often exhibit temporal continuity (e.g., vehicles gradually slowing down and stopping, pedestrians stepping from the roadside into the lane). By enhancing the original text with a temporal sliding window strategy, this continuity can be effectively preserved, reducing abrupt changes in event detection caused by single-frame target detection errors or the temporary disappearance of targets, thus improving the overall algorithm's effectiveness. Simultaneously, the temporal sliding window accumulates data from multiple frames into a single document, significantly increasing the amount of data per frame used for final analysis. This prevents the LDA algorithm from experiencing false convergence due to insufficient data per frame, enhancing the overall algorithm's robustness. (5) LDA Unsupervised Clustering and Event Topic Assignment Step S5 aims to utilize the LDA (Latent Dirichlet Allocation) unsupervised clustering model to automatically infer topics from the text set corpus generated in Step S4, assign event category labels to each frame of the video, and combine this with manual annotation to complete the final traffic event analysis and detection; Step S5 specifically includes: S51: LDA Model Parameter Settings For the LDA unsupervised text classification algorithm, the following core parameters are set: The iteration count (denoted as iter) is the number of iterations for Gibbs sampling. It is preset to a positive integer, typically between 500 and 2000. The more iterations, the more fully the model converges, but the longer the computation time. In actual deployment, it can be dynamically adjusted according to the size of the corpus. Number of categories num_topics (denoted as K): The total number of event topics expected to be discovered from the video, preset to a positive integer, with a typical value range of 3 to 8; the value of K should be determined according to the event complexity of the actual deployment scenario - K=3 can be taken for simple intersections, and K=6 to 8 can be taken for complex traffic hubs; In addition to the two parameters mentioned above, the LDA model also involves the document-topic prior distribution parameter α and the topic-word prior distribution parameter β, which can be set as typical values ​​of the symmetric Dirichlet prior α=1 / K and β=0.01, respectively.

[0040] S52: Model Input and Operation Use the text set corpus generated in step S4 as the input corpus for the LDA algorithm; run the LDA unsupervised text classification algorithm, and the model training ends after the number of iterations reaches iteration_count; Among them, corpus consists of FRAME_COUNT enhanced texts. Arranged in sequence, each It is a document consisting of a sequence of quantized text words separated by spaces; the LDA model first performs word frequency statistics on each document to construct a bag-of-words representation, and then infers the topic distribution of each document through Gibbs sampling iteration; S53: Frame-level event category assignment After the algorithm finishes, each text in the corpus Each will be assigned an event category label, topic, which is a positive integer between 1 and K; since the FRAME_COUNT texts in corpus are arranged sequentially according to the time order of the video frames, and each text The unique corresponding to the original video frame( Therefore, this category label topic corresponds to the first... Event categories of frame video : ; Thus, each frame in the video is assigned an event category number, completing the end-to-end mapping from the original surveillance video to frame-by-frame event classification; S54: Event Category Semantic Annotation and Final Detection Based on the actual content displayed in the video frames and the focus of the monitoring scene, each event category (topic=1~K) output by the LDA is manually labeled and described to clarify the meaning of the traffic event corresponding to each category; the specific procedure is as follows: For each topic, select the top 20 most representative quantified text words with the highest probability, decode these words into corresponding motion feature combinations (e.g., "category = pedestrian, location = zebra crossing area, direction = crossing"), combine them with prior knowledge of the scene to summarize the event pattern represented by the topic, and label them with semantic tags. Typical semantic tags include, but are not limited to: normal traffic, intersection congestion, wrong-way driving, pedestrian trespassing / illegal crossing, abnormal / pending, etc. After annotation, the event category number of each frame can be mapped to a readable event name, achieving the final analysis and detection of abnormal road traffic events. This step employs fully unsupervised LDA clustering, automatically discovering event patterns from video data without any manually labeled training samples, significantly reducing the dependence of traditional supervised methods on large-scale labeled data. Furthermore, thanks to the structured text representation and temporal enhancement in steps S2-S4, LDA can converge stably even on small corpora (single-channel videos), and each event theme can be traced back to... The term set is highly interpretable, allowing operations and maintenance personnel to directly understand the meaning of events by viewing high-frequency terms, without the need for guesswork.

[0041] Reference Figure 10 This diagram illustrates the event classification results from road traffic video. After algorithm processing, six typical event scenarios were analyzed from the original road traffic video data. The top-left sub-image corresponds to topic 1, representing an event where vehicles and pedestrians cross laterally; the top-middle sub-image corresponds to topic 2, representing an event where only pedestrians cross laterally without vehicles; the top-right sub-image corresponds to topic 3, representing an event where vehicles turn from right to bottom; the bottom-left sub-image corresponds to topic 4, representing an event where vehicles turn from left to bottom; the bottom-middle sub-image corresponds to topic 5, representing an event where there is no obvious movement of vehicles or pedestrians at the intersection; and the bottom-right sub-image corresponds to topic 6, representing an event where vehicles travel straight up or down. This diagram demonstrates that the present invention can effectively distinguish complex traffic events and has extremely high interpretability.

[0042] like Figure 11 As shown, a second aspect of the present invention provides a traffic video event analysis system based on AutoQuan quantization and LDA classification, used to implement the traffic video event analysis method based on AutoQuan quantization and LDA classification. The system includes: The video acquisition and target detection and tracking module is used to acquire road traffic monitoring videos, perform moving target detection and tracking frame by frame using target detection algorithms, filter out target categories related to road traffic, and obtain the category information, location information and tracking number of each moving target in each frame; An adaptive non-uniform quantization module is used to calculate the position based on the distribution of the center point positions of the moving target in all frames. shaft and An adaptive non-uniform quantization mapping function for the axis; calculating the motion direction angle based on the displacement vectors of targets with the same tracking number between adjacent frames, and calculating the motion direction angle through a circular extended statistical distribution; using the quantization mapping function to quantize the motion characteristics of each moving target, generating a value composed of the moving target category quantization value, Axis position quantization value, Quantized text words are formed by concatenating quantized values ​​of axis position and quantized values ​​of direction angle; The scene prior multidimensional weighting module is used to construct a moving target category weight mapping function, a location region weight mapping function, and a movement direction angle weight mapping function based on preset scene prior knowledge, calculate the comprehensive weight coefficient of each quantized text word, and repeatedly expand the quantized text word based on the comprehensive weight coefficient; The temporal sliding window text construction module is used to concatenate all quantized text words of each frame after repeated expansion into the original text of the corresponding frame. The temporal sliding window strategy is used to accumulate the original text of the current frame and several previous frames to generate the enhanced text of each frame. The text set consists of all the enhanced texts. The LDA unsupervised clustering and event classification module is used to input the text set into the LDA unsupervised clustering model, assign event topic categories to the enhanced text of each frame, and complete the classification and detection of traffic video events.

[0043] It should be noted that the traffic video event analysis system based on AutoQuan quantization and LDA classification provided in this embodiment can be a computer program (including program code) running on a computer device. For example, the traffic video event analysis system based on AutoQuan quantization and LDA classification is an application software; the traffic video event analysis system based on AutoQuan quantization and LDA classification can be used to execute the corresponding steps in the methods provided in the embodiments of this application.

[0044] This application also provides a computer-readable storage medium storing a computer program that is executed by a processor to implement... Figure 1 The methods provided in each step are detailed in the implementation methods provided in the above steps, and will not be repeated here.

[0045] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A traffic video event analysis method based on AutoQuan quantization and LDA classification, characterized in that, Includes the following steps: S1. Acquire road traffic monitoring video, use target detection algorithm to detect and track moving targets frame by frame, filter out target categories related to road traffic, and obtain category information, location information and tracking number of each moving target in each frame; S2. Based on the distribution of the center point positions of moving targets in all frames, calculate the adaptive non-uniform quantization mapping functions for the x-axis and y-axis of the positions respectively; calculate the motion direction angle based on the displacement vectors of targets with the same tracking number between adjacent frames, and calculate the adaptive non-uniform quantization mapping function for the motion direction angle through a circular extended statistical distribution; quantize the motion features of each moving target using the quantization mapping function, generating a value composed of category quantization values, Axis position quantization value, Quantized text words are formed by concatenating quantized values ​​of axis position and quantized values ​​of direction angle; S3. Based on the preset scenario prior knowledge, construct the moving target category weight mapping function, the location region weight mapping function, and the movement direction angle weight mapping function respectively, calculate the comprehensive weight coefficient of each quantized text word, and repeatedly expand the quantized text word based on the comprehensive weight coefficient; S4. Concatenate all the quantized text words of each frame after repeated expansion to form the original text of that frame. Use a time-series sliding window strategy to accumulate the original text of the current frame and several preceding frames to generate the enhanced text of each frame. The text set consists of all the enhanced texts. S5. Input the text set into the LDA unsupervised clustering model, assign event topic categories to the enhanced text of each frame, and realize automatic classification and detection of traffic anomalies in complex road scenarios.

2. The traffic video event analysis method based on AutoQuan quantization and LDA classification according to claim 1, characterized in that: Step S1 specifically includes: Acquire road traffic monitoring video stream and read the video's frame width FRAME_WIDTH, frame height FRAME_HEIGHT, and total number of frames FRAME_COUNT; The video is read frame by frame, and the RT-DETR target detection algorithm is used to detect and track targets in each frame. The target categories related to road traffic were selected, specifically including six categories: pedestrians, bicycles, motorcycles, cars, buses, and trucks. For each detected valid target, record its bounding box coordinates in the current frame; use a cross-frame tracking algorithm to assign and maintain a unique tracking number for the same physical target in different frames; Based on the bounding box coordinates, calculate the coordinates of the center point of the bounding rectangle of the moving target in the current frame; the calculation formula is: , ;in, The x-coordinate of the center point of the moving target; The ordinate of the center point of the moving target; The x and y coordinates of the top-left vertex of the bounding box; Let x and y be the x and y coordinates of the bottom right vertex of the bounding box, where , ; For each frame, output the category information, location information, and tracking number of all valid moving targets in that frame.

3. The traffic video event analysis method based on AutoQuan quantization and LDA classification according to claim 2, characterized in that: The calculation of position in step S2 The process of adaptive non-uniform quantization mapping function of the axis includes: Iterate through the x-coordinates of the center points of all valid moving targets in all frames. Count the frequency of its occurrence in the range of 1 to FRAME_WIDTH−1 to construct the position of the moving object. Discrete distribution function on the axis ; set up The axial quantization order is ,calculate Quantization threshold of axis : from Start by accumulating sequentially. The value is used to find the interval boundary; assuming the starting point of the current quantization interval is... The endpoint of the current quantization interval is then determined according to the following formula. : Calculate the start and end points of all intervals recursively until the number of intervals reaches a certain threshold. The total number of target samples in each interval is approximately equal to 1; ; Based on the calculated quantization intervals, construct Axis quantization mapping function ; Satisfy: When The value falls into the first When there are quantization intervals, ,in ; The calculation of position in step S2 The process of adaptive non-uniform quantization mapping function of the axis includes: Iterate through the center coordinates of all valid moving targets in all frames. Count the frequency of its occurrence in the range of 1 to FRAME_HEIGHT−1, and construct... Discrete distribution function of axis ; Set the moving object in The quantization order of the axis is ,calculate Quantization threshold of the axis: from Start by accumulating sequentially. The value is used to find the interval boundary; assuming the starting point of the current quantization interval is... The endpoint of the current quantization interval is then determined according to the following formula. : Calculate the start and end points of all intervals recursively until the number of intervals reaches a certain threshold. The total number of target samples in each interval is approximately equal to 1; ; Based on the calculated quantization intervals, construct Axis quantization mapping function ; Satisfy: When The value falls into the first When there are quantization intervals, ,in .

4. The traffic video event analysis method based on AutoQuan quantization and LDA classification according to claim 3, characterized in that: The process of calculating the adaptive non-uniform quantization mapping function of the motion direction angle in step S2 includes: For each moving target in each frame, based on its tracking ID, find the coordinates of the top-left corner of the target's position bounding box in the previous frame. , ) and the coordinates of the lower right corner ( , ), and the coordinates of the top-left corner of the position box rectangle in the current frame ( , ) and the coordinates of the lower right corner ( , ); Calculate the coordinates of the center point of the previous frame. and the center point coordinates of the current frame The expression is: Based on the displacement vector of the moving target from the previous frame to the current frame Calculate the angle of the direction of motion: Taking the angle modulo 360 and rounding it down, we get an integer angle value in the range of 1 to 360. ; Traverse all moving targets frame by frame, and obtain a motion angle value for each target. After summing and statistically analyzing, the statistical distribution function of the direction of motion is obtained. ; Define the angle of a moving object The quantization order is (Preset positive integer), calculate angle Quantization threshold : Find the statistical distribution function of the direction of motion The maximum value in and their corresponding angles ,satisfy ; For the original statistical distribution function ( Perform horizontal replication expansion to construct the extended distribution function. Make it satisfy the following formula: by Simultaneously expand the step size from the center to both sides. Find an angle The first quantization interval is calculated using the following formula: When the above inequality is satisfied, the range of the first quantization interval is determined as follows: ; Assume the starting point of the current quantization interval is The endpoint can be calculated using the following formula. : Assume the starting point of the second pre-quantization interval is Then, according to the above inequality, the endpoint of the second prequantization interval is determined. ; Utilization and Following the same recursive rules for axes, the first step can be calculated sequentially. The starting point of each quantization interval and the end point ; The endpoint of the last interval obtained by recursion Perform 360° modulo calculation; when the condition is met When this occurs, it indicates that the range of values ​​in the quantization interval has formed a 360° circular closed loop; at this point, let the first... The endpoint of each quantization interval equal ; Perform a 360° modulo operation on the start and end coordinates of all quantization intervals: subtract 360 from the start or end coordinates of intervals greater than 360, so that the angle... During the calculation, the value range of 1 to 720 reverts to 1 to 360, completing the motion direction angle. All Calculation of each quantization interval; Construct a direction and angle quantization mapping function based on the calculated quantization intervals. The angle quantization mapping function Satisfy: When The value is the first When there are quantization intervals, ,in .

5. A traffic video event analysis method based on AutoQuan quantization and LDA classification according to any one of claims 1-4, characterized in that: The specific process of generating quantized text words in step S2 is as follows: The object category IDs from the COCO80 dataset are used as the category quantization values ​​for moving targets. ; Using the current position information of the moving target, calculate the x-coordinate of the target's center point. ;Will Substituting the above Axis quantization mapping function The target is obtained in Quantization values ​​on the axis: ; Using the current position information of the moving target, calculate the ordinate of the target's center point. ;Will Substituting the above Axis quantization mapping function The target is obtained in Quantization values ​​on the axis: ; Using the current moving target's position information and tracking ID, calculate the displacement vector of targets with the same ID in adjacent frames, obtain the motion direction angle, and then take the modulus and round down to get the angle value. ;Will Substitute the direction and angle quantization mapping function The quantized value of the target's motion direction is obtained: ; The effective motion information of each moving target in each frame is converted into discrete quantized values ​​in four dimensions. ; These four quantized values ​​are treated as a single string and concatenated using a period (.) as the delimiter to obtain the final quantized text of the moving target: .

6. The traffic video event analysis method based on AutoQuan quantization and LDA classification according to claim 5, characterized in that: The specific process of configuring weight mapping functions for the category, location region, and motion direction and angle of the moving target based on preset scene prior knowledge in step S3 is as follows: Set category quantification values ​​for motion targets The value range is {0, 1, 2, 3, 5, 7}, corresponding to pedestrians, bicycles, cars, motorcycles, buses, and trucks in the COCO80 dataset, respectively. Based on scene characteristics and the tendency of event analysis, a weight mapping function for object categories is defined using prior scene knowledge. : in, Preset positive real number weights for pedestrians, bicycles, cars, motorcycles, buses, and trucks; Set the center point position of the moving target The range of values ​​is , Based on scene characteristics and event analysis tendencies, use prior scene knowledge to add [something] within the video frame plane. Each control zone is defined, and weights within each zone are set differently. Each regulatory region constitutes a regional set. For each region Set the coordinates of its top left vertex. and the coordinates of the bottom right vertex ( When a certain target center point satisfy and When the point is located in the region, it is determined that the point falls within the region. Within; each control region corresponds to a specific weight value, and the weight mapping function for object position is defined using prior knowledge of the scene. : in, Preset The positive real number weight values ​​of each control region This is the default weight value when the area does not fall into any control zone. Set the quantization value of the motion direction and angle of objects in the scene. The range of values ​​is Based on the characteristics of the scenario and the tendency of event analysis, add prior knowledge of the scenario. Each control interval has a differentiated angle weight setting within it; Define based on the characteristics of road direction or traffic flow and pedestrian movement direction. Each control angle range constitutes a set of intervals. For each interval Set the starting point of the angle and the end point ; When the direction and angle of a moving target satisfy When the target falls within this angle adjustment range, it is determined that the target falls within this range; each adjustment range corresponds to a specific weight value, and the weight mapping function of the object's orientation angle is defined using prior knowledge of the scene. : in, Preset The positive real number weights of each control angle interval. This is the default weight value when the angle does not fall within any control angle range.

7. The traffic video event analysis method based on AutoQuan quantization and LDA classification according to claim 6, characterized in that: Step S3, calculating the comprehensive weight coefficient for each quantized text word, specifically includes: In step S2, the quantized value Cquan of the target moving object category and the coordinates of the center point of the moving position are calculated for each quantized text word. and the quantized value of the direction and angle of motion Substitute them into the weight mapping function of the object category respectively. The weighted mapping function for the object's position Weighted mapping function for object orientation and angle The comprehensive weight coefficient of the word is obtained. The expression is: in, For the target motion category weight mapping function; The target motion position weight mapping function; Target motion direction angle weighting mapping function; Step S3 involves repeating and expanding the quantified text words based on the comprehensive weighting coefficient, specifically including: For each frame of the video, after word quantization of all moving targets and calculation of their respective weight coefficients, all weight coefficients within the current frame are sorted, and the minimum value is found. : Iterate through all the quantized word text in the current video frame, and compare the weight coefficient of each word with the minimum value. Calculate the relative ratio and round it to the nearest integer to obtain the expanded copy number of the Word document's weight coefficient. where round is the floor function; This is the overall weighting coefficient for the word.

8. A traffic video event analysis method based on AutoQuan quantization and LDA classification according to any one of claims 1-4, 6, and 7, characterized in that, Step S4 employs a temporal sliding window strategy to accumulate the original text of the current frame and several preceding frames, generating enhanced text for each frame. Specifically, this includes: Define a sliding window length , It is a positive integer greater than 1; for the th The frame, the enhanced text N of the frame is generated according to the following rules. : when ≤ hour, That is, to sequentially concatenate the original text from frame 1 to the text of the current frame; when hour, Prelude The original text from frame to frame is concatenated onto the current text in chronological order.

9. A traffic video event analysis method based on AutoQuan quantization and LDA classification according to any one of claims 1-4, 6, and 7, characterized in that, Step S5 specifically includes: For the LDA unsupervised text classification algorithm, set the number of iterations and the number of classifications; Use the text set generated in step S4 as the input corpus for the LDA algorithm; run the LDA unsupervised text classification algorithm, and the model training ends after the number of iterations reaches iteration_count; After the algorithm finishes, each text in the corpus Each event will be assigned an event category label, which is a positive integer between 1 and K; each frame in the video will be assigned an event category number, completing the end-to-end mapping from the original surveillance video to frame-by-frame event classification. The system identifies the most probable representative quantized text words for each topic; decodes these representative quantized text words into corresponding motion feature combinations; combines prior knowledge of the scene to summarize the event patterns represented by the corresponding topics and labels them with semantic tags; maps the event category number of each frame to a readable event name; and finally achieves the analysis and detection of abnormal road traffic events.

10. A traffic video event analysis system based on AutoQuan quantization and LDA classification, characterized in that, A traffic video event analysis method based on AutoQuan quantization and LDA classification as described in any one of claims 1-9, comprising: The video acquisition and target detection and tracking module is used to acquire road traffic monitoring videos, perform moving target detection and tracking frame by frame using target detection algorithms, filter out target categories related to road traffic, and obtain the category information, location information and tracking number of each moving target in each frame; An adaptive non-uniform quantization module is used to calculate the position based on the distribution of the center point positions of the moving target in all frames. shaft and An adaptive non-uniform quantization mapping function for the axis; calculating the motion direction angle based on the displacement vectors of targets with the same tracking number between adjacent frames, and calculating the motion direction angle through a circular extended statistical distribution; using the quantization mapping function to quantize the motion characteristics of each moving target, generating a value composed of the moving target category quantization value, Axis position quantization value, Quantized text words are formed by concatenating quantized values ​​of axis position and quantized values ​​of direction angle; The scene prior multidimensional weighting module is used to construct a moving target category weight mapping function, a location region weight mapping function, and a movement direction angle weight mapping function based on preset scene prior knowledge, calculate the comprehensive weight coefficient of each quantized text word, and repeatedly expand the quantized text word based on the comprehensive weight coefficient; The temporal sliding window text construction module is used to concatenate all quantized text words of each frame after repeated expansion into the original text of the corresponding frame. It uses a temporal sliding window strategy to accumulate the original text of the current frame and several preceding frames to generate the enhanced text of each frame. The text set consists of all the enhanced texts. The LDA unsupervised clustering and event classification module is used to input the text set into the LDA unsupervised clustering model, assign event topic categories to the enhanced text of each frame, and complete the classification and detection of traffic video events.