Traffic accident monitoring system and method based on image recognition
By acquiring video streams, constructing semantic interaction graphs, and integrating risk indicators in the intersection traffic monitoring system, the problems of disconnect between perception and understanding and insufficient adaptability in intersection traffic conflict monitoring are solved, achieving adaptive risk warning and accurate conflict prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING COMM INST OF TECH
- Filing Date
- 2025-12-30
- Publication Date
- 2026-05-05
AI Technical Summary
Existing technologies for monitoring traffic conflict risks at intersections suffer from problems such as a disconnect between perception and understanding, a single dimension of risk assessment, and insufficient adaptability, leading to high rates of misjudgment and false alarms.
By acquiring overhead video streams of monitored intersections, static attributes and dynamic behavioral features of monitored targets are extracted, a semantic interaction graph is constructed, and a pre-trained trajectory prediction model is used to generate the probability distribution of future trajectories. Conflict probability and motion risk indicators are fused, and risk thresholds are dynamically adjusted to trigger early warnings.
It enables adaptive monitoring of traffic conflicts at intersections, improves the rationality and contextual relevance of prediction results, reduces false alarms and false negatives, and provides timely risk information and risk avoidance guidance.
Smart Images

Figure CN121982929A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image recognition technology, and in particular to a traffic accident monitoring system and method based on image recognition. Background Technology
[0002] With the rapid development of intelligent transportation, real-time monitoring of intersections using computer vision technology has become an important means to improve road traffic safety. Traditional intersection safety monitoring methods mainly rely on video-based vehicle detection and tracking technology, and determine the risk of conflict by calculating simple kinematic indicators such as the spatiotemporal distance between trajectories (e.g., time of collision (TTC)).
[0003] Existing technical solutions mainly suffer from the following limitations: First, there is a disconnect between perception and understanding. Most methods only focus on the physical trajectory of the target, lacking a deep understanding of the behavioral intentions of traffic participants (such as going straight, turning, or yielding) and traffic rules (such as right-of-way and traffic light constraints). A decelerating vehicle may be intending to yield or may be forced to stop due to congestion. Trajectory alone cannot distinguish the differences in potential risks, leading to misjudgment of risks. Second, the risk assessment dimension is singular. Existing methods either only extrapolate from historical trajectories to predict collision probability, ignoring the urgency of the current instantaneous motion state, or rely solely on the current... While kinematic indicators can be used for immediate risk assessment, they lack the ability to predict future risk evolution. This single-dimensional assessment is insufficient to comprehensively depict the continuous risk spectrum from "potential conflict" to "imminent danger." Third, there is a lack of adaptability. The warning thresholds of many systems are usually statically preset and cannot be dynamically adjusted according to the specific geometry of the intersection, real-time weather (such as rain and fog), and lighting conditions (such as night and backlight). This results in a high rate of false alarms or missed alarms in different environments. Therefore, how to conduct adaptive conflict risk monitoring of intersections based on deep integration of traffic scene semantics has become a challenge for the industry. Summary of the Invention
[0004] Based on this, this application provides an image recognition-based traffic accident monitoring system and method for adaptive conflict risk monitoring of intersections based on deep fusion of traffic scene semantics.
[0005] Firstly, this application provides a method for early warning of traffic conflict risks at intersections, applied to a traffic accident monitoring system based on image recognition. The method includes the following steps: The system acquires an overhead video stream of the monitored intersection and determines the continuous trajectory information of each monitored target, including vehicles, pedestrians and non-motorized vehicles. Extract the static attributes and dynamic behavioral characteristics of each monitoring target; For a pair of monitored targets entering a pre-defined conflict zone, a semantic interaction graph is constructed based on the corresponding static attributes, dynamic behavioral characteristics, and semantic information of the right-of-way rules in the conflict zone. The probability distribution of the predicted trajectory of the monitored target pair in the future short time domain is generated through the semantic interaction graph and a pre-trained trajectory prediction model. Based on the probability distribution of the predicted trajectory, the probability of physical conflict between the monitored target and the target in the short time domain is determined. Based on the instantaneous velocity and acceleration in the dynamic behavior characteristics of the monitored target, the motion risk index is determined. The conflict probability and the motion risk index are fused to obtain a comprehensive risk index. When the comprehensive risk index exceeds the preset risk threshold, a high probability of collision risk is determined and an early warning is triggered.
[0006] In some embodiments, extracting the static attributes and dynamic behavioral features of each monitoring target specifically includes: The static attributes of each monitored target are identified and extracted from the overhead video stream; The dynamic behavioral characteristics of the corresponding monitoring targets are determined based on the information of each continuous trajectory.
[0007] In some embodiments, for monitored target pairs entering a preset conflict area, constructing a semantic interaction graph based on corresponding static attributes, dynamic behavioral characteristics, and semantic information of right-of-way rules in the conflict area specifically includes: A corresponding graph node is created for each monitoring target that enters the preset conflict area, and the static attributes and dynamic behavior characteristics of each monitoring target are used as the feature vector of the graph node corresponding to each monitoring target. Based on the spatiotemporal distance between the monitored target pairs, edges between nodes are established, and combined with the semantic information of the right-of-way rules in the conflict area, traffic rule constraints are injected into the entire graph structure. Output a semantic interaction graph that integrates the feature vectors, interaction relationships, and rule semantics of each monitoring target.
[0008] In some embodiments, generating the probability distribution of predicted trajectories for monitoring target pairs in the future short time domain through the semantic interaction graph and the pre-trained trajectory prediction model specifically includes: The node feature matrix, adjacency matrix, and graph global attribute dictionary contained in the semantic interaction graph are encoded into the input tensor of the pre-trained trajectory prediction model. The encoded tensor is input into the pre-trained trajectory prediction model, which is based on a graph neural network architecture and aggregates node features, edge weights and global semantic information through a multi-layer message passing mechanism to output the predicted position offset of each monitored target at future discrete time points. The predicted position offset is superimposed with the current coordinates of the monitored target to determine multiple possible trajectories in the short time domain in the future. At the same time, a corresponding probability value is output for each possible trajectory. All possible trajectories and their probability values are organized to form an independent probability distribution of the predicted trajectory for each monitored target.
[0009] In some embodiments, determining the probability of a physical conflict between a monitored target and the predicted trajectory within a short time domain, based on the probability distribution of the predicted trajectory, specifically includes: For the probability distribution of the predicted trajectory of each monitoring target in the monitoring target pair, each possible trajectory is expanded into a geometric region that changes with time in the short time domain in the future, thereby transforming the discrete trajectory line into a continuous spatiotemporal probability volume. Calculate the intersection of the spatiotemporal probability volumes of the monitored target pair in the future. If the intersection is not empty, it indicates that the monitored target pair has a predicted trajectory conflict at the corresponding future time and spatial location. The system iterates through all intersecting geometric regions, calculates the overall probability of the monitored target experiencing at least one physical conflict within the entire future short time domain based on the probability values of the corresponding trajectory modes that trigger the conflict, and outputs the overall probability as the conflict probability.
[0010] In some embodiments, determining motion risk indicators based on instantaneous velocity and acceleration in the dynamic behavioral characteristics of the monitoring target specifically includes: The relative velocity and relative acceleration of the monitored target pair at the current moment are determined based on the instantaneous velocity and acceleration of the monitored target pair in the dynamic behavior characteristics at the current moment; The current position coordinates of the monitored target pair based on continuous trajectory information are obtained, and then the relative position of the monitored target pair is determined; The conflict time index used to quantify the urgency of risk is determined based on the relative position, relative velocity, and relative acceleration of the monitoring target pair. The conflict time index is standardized and mapped to a risk-related scalar value, which is then used as a motion risk index representing the current kinematic state.
[0011] In some embodiments, fusing the conflict probability and the motion risk index to obtain a comprehensive risk index specifically includes: The conflict probability and the motion risk index are fused and calculated according to a predefined fusion function; The original values obtained from the fusion calculation are subjected to range constraints, and a comprehensive risk index representing the overall collision risk of the monitored target is output.
[0012] Secondly, this application provides a traffic accident monitoring system based on image recognition, which includes an intersection traffic conflict risk early warning unit, the intersection traffic conflict risk early warning unit comprising: The acquisition module is used to acquire an overhead video stream of the monitored intersection and determine the continuous trajectory information of each monitored target, including tracked vehicles, pedestrians and non-motorized vehicles; The processing module is used to extract the static attributes and dynamic behavioral characteristics of each monitoring target; The processing module is also used to construct a semantic interaction graph for monitoring target pairs entering the preset conflict area based on the corresponding static attributes, dynamic behavior features and right-of-way rule semantic information of the conflict area, and generate the probability distribution of the predicted trajectory of the monitoring target pair in the future short time domain through the semantic interaction graph and the pre-trained trajectory prediction model. The processing module is further configured to determine the probability of a physical conflict between the monitored target and the target in the future short time domain based on the probability distribution of the predicted trajectory, determine the motion risk index based on the instantaneous velocity and acceleration in the dynamic behavior characteristics of the monitored target, and fuse the conflict probability and the motion risk index to obtain a comprehensive risk index. The execution module is used to determine that there is a high probability of collision risk and trigger an early warning when the comprehensive risk index exceeds a preset risk threshold.
[0013] Thirdly, this application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method for early warning of traffic conflict risks at intersections.
[0014] Fourthly, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for early warning of traffic conflict risks at intersections.
[0015] The technical solutions provided by the embodiments disclosed in this application have the following beneficial effects: The image recognition-based traffic accident monitoring system and method provided in this application first acquires an overhead video stream of the monitored intersection and determines the continuous trajectory information of each monitored target. The monitored targets include tracking vehicles, pedestrians, and non-motorized vehicles. Static attributes and dynamic behavioral features of each monitored target are extracted. This step can simultaneously acquire the continuous trajectories of multiple types of targets such as vehicles, pedestrians, and non-motorized vehicles from a single video stream, and extract in parallel static attributes representing their identity and intent, as well as dynamic behavioral features representing their real-time motion state. This provides a complete and aligned multi-dimensional feature foundation for subsequent risk analysis, combining semantic description and physical quantification, thus solving the problem of traditional methods' limitations in determining target intent and... The problem of insufficient rule information perception exists. Secondly, for monitoring target pairs entering a pre-defined conflict zone, a semantic interaction graph is constructed based on their corresponding static attributes, dynamic behavioral characteristics, and the semantic information of right-of-way rules in the conflict zone. This semantic interaction graph, along with a pre-trained trajectory prediction model, generates a probability distribution of the predicted trajectories of the monitoring target pairs in the short-term future. This step integrates the individual characteristics of the targets, their spatiotemporal relationships, and the right-of-way rules of the conflict zone into a unified semantic interaction graph. Based on this, a graph neural network model is used for collaborative trajectory prediction, ensuring that the generated future trajectory probability distribution not only conforms to kinematic laws but also deeply aligns with traffic rules and interactive game logic. This significantly improves the rationality and contextual relevance of the prediction results. Then, based on the probability distribution of the predicted trajectory, the probability of a physical conflict between the monitored target and the target in the short-term future is determined. Based on the instantaneous velocity and acceleration of the monitored target's dynamic behavior characteristics, a motion risk index is determined. The conflict probability and the motion risk index are then fused to obtain a comprehensive risk index. This step nonlinearly fuses the conflict probability, which characterizes the long-term collision possibility, with the motion risk index, which characterizes the immediate urgency of the collision. This accurately captures the synergistic amplification effect of high predicted risk and high immediate danger, enabling the final comprehensive risk index to fully and quantitatively reflect the transition from potential conflict to imminent danger. The continuous risk spectrum overcomes the limitations of single-dimensional assessment. Finally, when the comprehensive risk index exceeds the preset risk threshold, a high probability of collision risk is determined and an early warning is triggered. This step can dynamically adjust the risk judgment threshold according to the type of conflict area, weather, and lighting conditions, and generate structured early warning instructions for comprehensive risk indicators that continuously exceed the threshold and release them through multiple channels such as roadside and vehicle-road cooperation. This enables the early warning system to have environmental adaptability, effectively reduce false alarms and missed alarms, and provide timely and clear risk information and risk avoidance guidance for traffic participants and management. In summary, the solution of this application can perform adaptive conflict risk monitoring at intersections based on deep integration of traffic scene semantics. Attached Figure Description
[0016] Figure 1 This is an exemplary flowchart of a method for early warning of traffic conflict risks at intersections, as shown in some embodiments of this application. Figure 2 This is a schematic diagram illustrating an application scenario of an image processing system for early warning of traffic conflicts at intersections, based on some embodiments of this application. Figure 3 This is a flowchart illustrating the process of determining sports risk indicators according to some embodiments of this application; Figure 4 This is a schematic diagram of the structure of an intersection traffic conflict risk warning unit according to some embodiments of this application; Figure 5 This is a schematic diagram of the structure of a computer device for implementing a method for early warning of traffic conflict risks at intersections, according to some embodiments of this application. Detailed Implementation
[0017] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0018] refer to Figure 1 The figure is an exemplary flowchart of an intersection traffic conflict risk warning method according to some embodiments of this application. The intersection traffic conflict risk warning method mainly includes the following steps: In step 101, an overhead video stream of the monitored intersection is acquired, and continuous trajectory information of each monitored target is determined. The monitored targets include tracked vehicles, pedestrians and non-motorized vehicles.
[0019] In specific implementation, acquiring an overhead video stream of the monitored intersection and determining the continuous trajectory information of each monitored target can be achieved in the following way: First, a high-definition network camera with a wide-angle lens can be deployed on traffic light poles, street light poles, or dedicated poles in the intersection area. The installation height and angle should ensure a complete and clear overhead view of the entire intersection area. A digital video stream should be continuously acquired and output at a fixed frame rate, such as 25 frames per second. The high-definition network camera preferably has a wide dynamic range and strong light suppression function to adapt to monitoring needs during the day, night, and weather changes. Then, after acquiring the overhead video stream, it is processed by a video analysis module deployed on an edge computing device or cloud server. This processing first uses a pre-trained deep learning target detection model, such as YOLOv5 or Faster R-CNN architecture, to perform pixel-level analysis on each frame of the overhead video stream, identifying and selecting all monitored targets belonging to a preset category. The preset categories include at least small cars, large buses, trucks, pedestrians, bicycles, and electric bicycles. Each detected target generates a preliminary detection result containing its category confidence and pixel coordinate bounding box. Subsequently, a multi-target tracking algorithm is invoked to associate the preliminary detection results between consecutive frames. The multi-target tracking algorithm, such as the DeepSORT algorithm, associates multiple detection boxes belonging to the same physical target by calculating the similarity of appearance features (using a deep feature extraction network) and motion state similarity (based on the position predicted by the Kalman filter) of target bounding boxes between adjacent frames. This assigns a globally unique and continuously unchanged tracking identifier to each successfully associated target, and records the center point pixel coordinates of each frame according to its appearance sequence, forming the preliminary motion trajectory of the target in the image coordinate system. Finally, using the homography transformation matrix obtained in advance through ground control point calibration, the preliminary motion trajectory in the image coordinate system is uniformly mapped to the world coordinate system, generating continuous trajectory information with actual physical length units (meters) and strictly ordered by timestamps. Other methods can also be used in other embodiments, and this application does not limit them.
[0020] In some embodiments, reference Figure 2 As shown in the figure, this figure is a schematic diagram of the application scenario of the intersection traffic conflict risk early warning image processing system shown in some embodiments of this application. The figure includes three main components: acquisition device, server and data storage device. The acquisition device is responsible for collecting the overhead video stream of the monitored intersection and sending the collected overhead video stream of the monitored intersection to the server through the communication network. The intersection traffic conflict risk early warning image processing system runs in the server. The server stores the processing results in the data storage device and visualizes them.
[0021] In step 102, the static attributes and dynamic behavioral characteristics of each monitoring target are extracted.
[0022] In some embodiments, the extraction of static attributes and dynamic behavioral characteristics of each monitoring target can be achieved through the following steps: The static attributes of each monitored target are identified and extracted from the overhead video stream; The dynamic behavioral characteristics of the corresponding monitoring targets are determined based on the information of each continuous trajectory.
[0023] It should be noted that the static attributes in this application are used to describe the inherent or relatively stable state labels of the monitored target itself, and are the basic semantic information for distinguishing target categories, judging their legal right of passage and behavioral intentions; the dynamic behavioral features are physical quantities used to quantify the real-time motion state of the monitored target, and are the core input for calculating the target's current motion trend, urgency level and predicting its short-term future displacement.
[0024] In specific implementation, identifying and extracting the static attributes of each monitored target from the overhead video stream can be achieved in the following way: First, the overhead video stream is input into a parallel processing pipeline, which contains multiple dedicated analysis modules. For vehicle-type monitored targets, their static attributes are obtained through the following process: A fine-grained vehicle classification model based on a convolutional neural network analyzes the image region within the target detection box. The fine-grained vehicle classification model, for example, uses a ResNet network structure and is fine-tuned on a vehicle dataset to output specific types, such as small passenger cars, large passenger cars, and trucks. At the same time, a lightweight image classification sub-network focuses on pixels in specific areas at the rear or side of the vehicle, and determines the turn signal status (on or off) by analyzing its periodic light intensity change pattern. For all monitored targets, the turn signal status is determined by aligning the target in world coordinates. The system associates the real-time location with lane lines and stop lines in a pre-stored high-precision electronic map to determine the traffic light group it is currently under. An independent traffic light color recognition module confirms the current color of the traffic light group, analyzing the HSV color space of a fixed area in the video stream to identify the red, green, and yellow hues. For pedestrians and non-motorized vehicle riders, a lightweight human pose estimation model is used to analyze the detection boxes. For example, using the OpenPose model with MobileNet as the backbone network, key point coordinates of the shoulders, hips, or head are extracted to calculate the body's orientation angle. All extracted static attributes (i.e., type, turn signal status, traffic light status, orientation angle) are bound to the target's unique tracking identifier and current timestamp for subsequent steps. Other methods can be used in other embodiments, but this application does not limit this.
[0025] In specific implementation, the dynamic behavior characteristics of the corresponding monitoring target can be determined based on each continuous trajectory information in the following way: For each monitoring target's continuous trajectory information, which consists of a world coordinate system plane coordinate sequence strictly ordered by timestamp, the determination of dynamic behavior characteristics can be completed through real-time numerical differential calculation. That is, in each new processing cycle, the latest two or more continuous trajectory points of the monitoring target are obtained. These trajectory points contain timestamps and position coordinates. Instantaneous velocity can be obtained by calculating the displacement difference between adjacent trajectory points and dividing by the time difference, i.e., using the first-order difference method. Instantaneous acceleration is obtained by applying the first-order difference to the velocity sequence of three consecutive trajectory points again. This calculation process is performed in real time on the trajectory sequence in a sliding window manner to ensure that the output dynamic behavior characteristics, i.e., instantaneous velocity and instantaneous acceleration, strictly correspond to the current time. All calculated dynamic behavior characteristics are also bound to the target's unique tracking identifier and the current timestamp to ensure that they can be accurately aligned and integrated with the static attributes under the same timestamp to form the complete node feature vector required to construct the semantic interaction graph. Other methods can also be used in other embodiments, and this application does not limit them.
[0026] It should be noted that the above steps can simultaneously acquire the continuous trajectories of multiple targets such as vehicles, pedestrians, and non-motorized vehicles from a single video stream, and extract in parallel the static attributes representing their identity and intentions as well as the dynamic behavioral features representing their real-time motion state. This provides a complete and aligned multi-dimensional feature foundation for subsequent risk analysis, which combines semantic description and physical quantification, and solves the problem of insufficient perception of target intentions and rule information in traditional methods.
[0027] In step 103, for the monitoring target pair that enters the preset conflict area, a semantic interaction graph is constructed based on the corresponding static attributes, dynamic behavioral characteristics and right-of-way rule semantic information of the conflict area. The probability distribution of the predicted trajectory of the monitoring target pair in the future short time domain is generated through the semantic interaction graph and the pre-trained trajectory prediction model.
[0028] In some embodiments, for a pair of monitored targets entering a preset conflict area, a semantic interaction graph can be constructed based on the corresponding static attributes, dynamic behavioral characteristics, and semantic information of the right-of-way rules in the conflict area, using the following steps: A corresponding graph node is created for each monitoring target that enters the preset conflict area, and the static attributes and dynamic behavior characteristics of each monitoring target are used as the feature vector of the graph node corresponding to each monitoring target. Based on the spatiotemporal distance between the monitored target pairs, edges between nodes are established, and combined with the semantic information of the right-of-way rules in the conflict area, traffic rule constraints are injected into the entire graph structure. Output a semantic interaction graph that integrates the feature vectors, interaction relationships, and rule semantics of each monitoring target.
[0029] It should be noted that the semantic information of right-of-way rules in this application is used to transform the priority of passage and behavioral constraints in traffic regulations into structured data that can be understood by machines; the semantic interaction graph is a graph structure data representation used to integrate the state of target individuals, the spatiotemporal relationship between targets and traffic rules, and is a carrier that encapsulates and inputs all contextual information for collaborative behavior prediction.
[0030] In specific implementation, a corresponding graph node is created for each monitored target entering the preset conflict zone. The static attributes and dynamic behavior characteristics of each monitored target are used as the feature vector of the graph node corresponding to each monitored target. This can be achieved in the following way: Maintain a global graph structure manager. The manager initializes a graph node for a monitored target only when the continuous trajectory information of the monitored target indicates that its center coordinates have entered the conflict zone predefined by the geofence. The feature vector of the graph node is constructed using a deterministic splicing rule, that is: First, extract the target type (encoded as a one-hot vector), the current compliance, etc., from the static attributes in sequence. The system retrieves the status of traffic lights, and if the target is a vehicle, extracts its turn signal status; if it is not a vehicle, it sets the turn signal status to zero; if it is a pedestrian or non-motorized vehicle, it extracts the target's body orientation angle. Then, it extracts the instantaneous velocity and instantaneous acceleration of the target at the current moment from the dynamic behavior features in sequence. Finally, it connects all the above features in a predetermined order of "static attributes first, dynamic behavior features second" to form a fixed-dimensional, numerical feature vector. This vector is then uniquely bound to a graph node created for the corresponding target, completing the initialization of the node features. Other methods can be used in other embodiments, and this application does not limit this.
[0031] In specific implementation, edges between nodes are established based on the spatiotemporal distance between monitored target pairs. Combined with the semantic information of the right-of-way rules in the conflict area, traffic rule constraints are injected into the entire graph structure. This can be achieved in the following way: For any two monitored targets (i.e., monitored target pairs) of an already created node, the weight of the edge formed by the two monitored targets is calculated. This weight calculation consists of two parts: a basic weight and a rule modulation factor. The basic weight is determined by calculating the Euclidean spatial distance between the two targets at the current moment and by referencing their instantaneous velocity vectors to estimate the minimum possible distance in the near future, thus reflecting the urgency of spatiotemporal interaction. The determination of the rule modulation factor is based on a rule-based lookup process: according to the type of the conflict area (e.g., intersection, roundabout)... The system queries a pre-defined matrix-style right-of-way priority lookup table, which defines the right-of-way relationships under different attribute combinations (e.g., "green light straight-through motor vehicles" have absolute right-of-way over "red light pedestrians"), based on the static attributes of the two target nodes (especially their type, lane, and traffic light status). The system outputs a modulation coefficient between 0 and 1 (e.g., a coefficient of 1 for high right-of-way and 0.5 for low right-of-way). Finally, the weight of this directed edge is calculated by multiplying the base weight by the rule modulation coefficient. By performing this process for each pair of potentially interacting nodes in the graph, traffic rule semantics are structurally injected into the graph model in a way that adjusts the interaction intensity. Other methods can be used in other embodiments, and this application does not limit this approach.
[0032] In specific implementation, the semantic interaction graph that integrates the feature vectors, interaction relationships, and rule semantics of each monitoring target can be achieved in the following way: After completing the node creation and edge weight calculation of monitoring targets in all conflict areas, the entire data structure is serialized into a standard graph object that can be directly read by deep learning frameworks for output. This semantic interaction graph object explicitly contains three core components: the first part is the node feature matrix, where each row corresponds to a monitoring target, and the row vector is the concatenated feature vector generated in the previous steps; the second part is the adjacency matrix (or edge index and edge weight list), which is in matrix or column format. The table records the edge weights between all node pairs after rule modulation, describing the strength of the interaction relationship between the targets; the third part is the graph global attributes, which is an optional dictionary structure used to record the conflict region ID, timestamp, and rule summary text or encoding retrieved from the rule base that is applicable to this scenario based on this construction; this semantic interaction graph object fully encapsulates the fusion information from the original data to high-order semantics, and serves as the only and necessary input tensor for the pre-trained trajectory prediction model described in the next step. Other methods can be used in other embodiments, and this application does not limit them.
[0033] In some embodiments, the probability distribution of the predicted trajectory of the monitoring target pair in the future short time domain, generated by the semantic interaction graph and the pre-trained trajectory prediction model, can be obtained by the following steps: The node feature matrix, adjacency matrix, and graph global attribute dictionary contained in the semantic interaction graph are encoded into the input tensor of the pre-trained trajectory prediction model. The encoded tensor is input into the pre-trained trajectory prediction model, which is based on a graph neural network architecture and aggregates node features, edge weights and global semantic information through a multi-layer message passing mechanism to output the predicted position offset of each monitored target at future discrete time points. The predicted position offset is superimposed with the current coordinates of the monitored target to determine multiple possible trajectories in the short time domain in the future. At the same time, a corresponding probability value is output for each possible trajectory. All possible trajectories and their probability values are organized to form an independent probability distribution of the predicted trajectory for each monitored target.
[0034] It should be noted that the probability distribution in this application is used to quantify the uncertainty of the future motion state of the monitored target, and describes the target's multiple possible behavior patterns and their likelihood in the form of "trajectory-probability" pairs; the predicted position offset value represents the predicted change in the future position of the monitored target relative to its current position, and is an intermediate quantity for generating specific future trajectory coordinates.
[0035] It should be noted that the pre-trained trajectory prediction model in this application is obtained through end-to-end training on large public trajectory datasets or self-collected intersection trajectory datasets, with the loss function being the minimization of the error between the predicted trajectory and the real trajectory.
[0036] In specific implementation, encoding the node feature matrix, adjacency matrix, and graph global attribute dictionary contained in the semantic interaction graph into the input tensor of the pre-trained trajectory prediction model can be achieved in the following way: Call the data conversion module, which receives the semantic interaction graph object as input. First, directly convert the node feature matrix into a 32-bit floating-point two-dimensional tensor with the shape [number of nodes, feature dimension], where the feature dimension is equal to the total length of the concatenated static attributes and dynamic behavior features. Next, convert the adjacency matrix into two tensors: one is an integer edge index tensor with the shape [2, number of edges], where each column stores the indices of the two nodes connected by an edge; the other... The edge weight tensor is a floating-point type with shape [number of edges, 1], storing the weight value corresponding to each edge. Finally, the graph global attribute dictionary is processed, and key fields (such as conflict area type encoding and dominant right-of-way rule encoding) in the dictionary are extracted and concatenated into a one-dimensional feature vector. Then, it is copied and expanded into a two-dimensional tensor with shape [number of nodes, global feature dimension], so that each node is associated with the same global context information. Thus, the node feature tensor, edge index tensor, edge weight tensor, and global feature tensor together constitute the standardized input tensor set required by the pre-trained trajectory prediction model, i.e., the input tensor. Other methods can be used in other embodiments, and this application does not limit them.
[0037] In specific implementation, the encoded tensor is input into the pre-trained trajectory prediction model. This trajectory prediction model, based on a graph neural network architecture, aggregates node features, edge weights, and global semantic information through a multi-layer message passing mechanism, outputting the predicted position offset of each monitored target at future discrete time points. This can be achieved by inputting the input tensor, i.e., the standardized set of input tensors, into the trajectory prediction model that has been trained and deployed offline. The core of this trajectory prediction model is a multi-layer graph neural network, such as a graph convolutional network or a graph attention network. During forward propagation, each layer of the graph neural network performs one message passing operation: for each node, the trajectory prediction model collects the features of all its neighboring nodes after the transformation of the previous layer. These neighboring features are multiplied by the weight values in the corresponding edge weight tensor before aggregation to reflect the differences in interaction strength. The aggregated neighbor features are fused with the node's own features and the corresponding row vectors in the global feature tensor. Then, the node's features are updated through a learnable nonlinear transformation function (such as the ReLU activation function). After multiple rounds of such iterations, the feature vector of each node fully integrates its own state, local interactions, and global rule information. The output layer of the trajectory prediction model consists of a time series prediction module, which maps the final features of these semantically rich nodes to two-dimensional position offset prediction values at a series of discrete time points in the future (such as one point every 0.1 seconds in the next 3 seconds). The output is a three-dimensional tensor with the shape of [number of nodes, total number of future time steps, 2], where the last dimension 2 represents the horizontal and vertical displacement, respectively. Other methods can be used in other embodiments, and this application does not limit them.
[0038] It should be noted that the message passing mechanism can be implemented using graph convolution operations, that is, by performing matrix multiplication using a normalized adjacency matrix and a node feature matrix, and then applying a weight matrix and a nonlinear activation function, or by using a graph attention mechanism to dynamically weight and aggregate neighbor features by calculating the attention weights between nodes; the time series prediction module can be composed of several fully connected layers, or it can be composed of stacked temporal convolutional networks or recurrent neural network units (such as GRU, LSTM), used to capture the temporal dependencies of displacement changes.
[0039] In specific implementation, the predicted position offset value is superimposed with the current coordinates of the monitored target to determine multiple possible trajectories in the short time domain in the future. Simultaneously, a corresponding probability value is output for each possible trajectory. Organizing all possible trajectories and their probability values to form a probability distribution for an independent predicted trajectory for each monitored target can be achieved in the following way: The trajectory prediction model adopts a multimodal prediction mechanism. For each monitored target, corresponding to a graph node, it outputs K different sets of position offset sequences and a corresponding K-dimensional probability vector. During decoding, the latest current coordinates of the target are first obtained from the continuous trajectory information. For the k-th set of outputs (k from 1 to K), the predicted position offset values belonging to that set are accumulated sequentially according to the time step to obtain the cumulative displacement. This cumulative displacement is then superimposed item by item onto the current coordinates, thereby generating... A complete sequence of future trajectory coordinates is generated. Simultaneously, the trajectory prediction model outputs K raw scores representing the confidence levels of each modality through an independent probability head, and these scores are normalized using the Softmax function to obtain K probability values that sum to 1. Finally, a data structure is constructed for each monitored target. This data structure contains K possible future trajectories and K corresponding probability values. Each future trajectory is a coordinate sequence. This data structure is the probability distribution of the target's independent predicted trajectory, which fully characterizes the uncertainty of the target's future motion. It should be noted that the multimodal prediction mechanism in this application can generate different trajectory modalities by randomly sampling in the model latent space or by setting multiple parallel prediction heads (Multi-Head). Other methods can also be used in other embodiments, and this application does not limit them.
[0040] In addition, it should be noted that the above steps can integrate the individual characteristics of the target, the spatiotemporal relationship between them, and the right-of-way rules of the conflict area to construct a unified semantic interaction graph. Based on this, a graph neural network model is used to predict the collaborative trajectory. This makes the probability distribution of the generated future trajectory not only conform to the laws of kinematics, but also deeply fit the traffic rules and interactive game logic, significantly improving the rationality and contextual relevance of the prediction results.
[0041] In step 104, the probability of physical conflict between the monitored target and the target in the future short time domain is determined based on the probability distribution of the predicted trajectory. The motion risk index is determined based on the instantaneous velocity and acceleration in the dynamic behavior characteristics of the monitored target. The conflict probability and the motion risk index are fused to obtain a comprehensive risk index.
[0042] In some embodiments, determining the probability of a physical conflict between a monitored target and another target in the future short time domain based on the probability distribution of the predicted trajectory can be achieved through the following steps: For the probability distribution of the predicted trajectory of each monitoring target in the monitoring target pair, each possible trajectory is expanded into a geometric region that changes with time in the short time domain in the future, thereby transforming the discrete trajectory line into a continuous spatiotemporal probability volume. Calculate the intersection of the spatiotemporal probability volumes of the monitored target pair in the future. If the intersection is not empty, it indicates that the monitored target pair has a predicted trajectory conflict at the corresponding future time and spatial location. The system iterates through all intersecting geometric regions, calculates the overall probability of the monitored target experiencing at least one physical conflict within the entire future short time domain based on the probability values of the corresponding trajectory modes that trigger the conflict, and outputs the overall probability as the conflict probability.
[0043] It should be noted that the spatiotemporal probability volume in this application is a geometric model that expands a possible trajectory and represents the future occupied area of the target in a three-dimensional continuous domain of time and space. It is a physical object for physical conflict detection. The conflict probability is a scalar value that quantifies the likelihood of a physical collision between the monitored targets in the future. Its calculation is based on the conflict analysis of all possible future trajectories of both parties.
[0044] In specific implementation, for the probability distribution of the predicted trajectory of each monitoring target in the monitoring target pair, each possible trajectory is expanded into a geometric region that changes with time in the future short time domain, thereby transforming discrete trajectory lines into continuous spatiotemporal probability volumes. This can be achieved in the following way: Maintain a probability distribution data structure for the predicted trajectory of each monitoring target. For each possible trajectory in this probability distribution data structure, i.e., a sequence of two-dimensional coordinates at consecutive future time points, it is no longer treated as a line without width, but rather assigned a suitable, conservative external geometric model, such as a rectangle or a circle, according to the type of monitoring target. Subsequently, along this possible trajectory... For each future time point of the trajectory, the outer geometric model is placed on the corresponding coordinates. By connecting these geometric regions at each moment in chronological order, a continuous, pipe-like spatiotemporal occupied region in three-dimensional spacetime is generated. This spatiotemporal occupied region represents the spatial range occupied by the target at each future moment if it moves along this possible trajectory. Finally, the probability value of this possible trajectory itself is used as the confidence level of the existence of the spatiotemporal pipeline and assigned to the entire spatiotemporal occupied region generated based on it. Thus, all K possible trajectories of a target are converted into a set of K weighted spatiotemporal probability volumes. Other methods can be used in other embodiments, and this application does not limit them.
[0045] In specific implementation, the intersection of the spatiotemporal probability volumes of the monitored target pair in the future is calculated. If the intersection is not empty, it indicates that the monitored target pair has a predicted trajectory conflict at the corresponding future time and spatial location. This can be achieved in the following way: For the monitored target pair to be evaluated, denoted as target A and target B, the K spatiotemporal probability volumes of target A and the M spatiotemporal probability volumes of target B are traversed in parallel, where K and M are their predicted mode numbers, respectively. For any combination, such as the i-th trajectory volume of target A and the j-th trajectory volume of target B, a spatiotemporal collision detection algorithm is executed. This spatiotemporal collision detection algorithm checks the outer geometric models of the two targets at the current time at discrete time steps, such as the same 0.1-second interval as the trajectory prediction. Whether an overlap occurs on the dimensional plane, if geometric overlap is detected at any future time step, it is determined that the trajectory combination of mode i and mode j has a predicted trajectory conflict in the future, and the start time, duration and overlapping area of the conflict are recorded. This process exhaustively enumerates all K×M trajectory combinations to find all potential conflict points. It should be noted that the size parameters of the outer contour geometric model can be determined based on prior knowledge such as the statistical average size of the target detection box, the vehicle outer contour size specified in the national standard, or the typical pedestrian shoulder width obtained through calibration measurement, and a safety margin (such as 0.2 meters) is added on this basis for conservative estimation. Other methods can also be used in other embodiments, and this application does not limit them.
[0046] In practical implementation, all intersecting geometric regions are traversed. Based on the probability values of the corresponding trajectory modes that trigger the conflict, the overall probability of the monitored target experiencing at least one physical conflict within the entire future short-term domain is calculated using a weighted average. This overall probability is then output as the conflict probability. This can be achieved as follows: After detecting all potential trajectory conflicts, a conflict set is obtained, where each conflict event is associated with a specific pair of trajectory modes (Ai, Bj) and their respective probability values (P_Ai, P_Bj). Since the occurrence of each trajectory is considered an independent event, the joint probability of this conflict event is P_Ai × P_Bj. The conflict probability, i.e., the probability of target A and target B experiencing at least one physical conflict in the future, is calculated. The overall probability of a conflict is obtained by summing the joint probabilities of all trajectory mode combinations that lead to a conflict. The specific calculation formula is as follows: traverse all trajectory mode combinations that detect a conflict, and accumulate the joint probability P_Ai×P_Bj of each combination. This sum is the final conflict probability, which ranges from 0 to 1. This conflict probability quantifies the overall risk of a collision between two targets based on all their possible future movements. It should be noted that, in scenarios where computational resources allow or higher accuracy is required, the correlation between trajectory modes can also be considered. For example, the calculation of the joint probability can be corrected by using conditional probability or introducing a social attention mechanism for collision avoidance. Other methods can also be used in other embodiments, and this application does not limit them.
[0047] In some embodiments, reference Figure 3 As shown in the figure, this is a flowchart illustrating the process of determining motion risk indicators in some embodiments of this application. In this embodiment, the determination of motion risk indicators based on the instantaneous velocity and acceleration in the dynamic behavioral characteristics of the monitoring target can be achieved through the following steps: In step 1031, the relative velocity and relative acceleration of the monitored target pair at the current moment are determined based on the instantaneous velocity and acceleration of the monitored target pair in the dynamic behavior characteristics at the current moment; In step 1032, the current position coordinates of the monitoring target pair based on continuous trajectory information are obtained, and then the relative position of the monitoring target pair is determined; In step 1033, conflict time indicators for quantifying risk urgency are determined based on the relative position, relative velocity, and relative acceleration of the monitored target pair. In step 1034, the conflict time index is standardized and mapped to a risk-related scalar value, which is then used as a motion risk index representing the current kinematic state.
[0048] It should be noted that the conflict time index in this application is the theoretically estimated time value required for a collision to occur based on the target's current relative kinematic state, and is the original index for measuring the urgency of the collision at the current moment; the motion risk index is a scalar characterizing the level of immediate collision risk faced by the monitored target based on its current motion state.
[0049] In specific implementation, determining the relative velocity and relative acceleration of the monitoring target pair at the current moment based on the instantaneous velocity and acceleration in the dynamic behavior characteristics of the monitoring target pair can be achieved in the following way: First, from the real-time updated dynamic behavior characteristics, read the motion vectors of the first and second monitoring targets in the monitoring target pair at the current processing timestamp; wherein, the instantaneous velocity and instantaneous acceleration are stored in the form of two-dimensional vectors in the world coordinate system, that is, the instantaneous velocity vector (V1_x, V1_y) and instantaneous acceleration vector (A1_x, A1_y) of the first monitoring target, and the instantaneous velocity vector (V2_x, V2_y) and instantaneous acceleration vector (A2_x, A2_y) of the second monitoring target; then, the relative motion parameters of the monitoring target pair at the current moment are directly calculated by vector subtraction: relative velocity vector (V_rel_x = V2_x - V1_x, V_rel_y = V2_y - V1_y) and relative acceleration vector (A_rel_x). =A2_x - A1_x, A_rel_y = A2_y - A1_y); It should be noted that this calculation is performed in real time in each processing cycle to ensure that the obtained relative velocity and relative acceleration reflect the latest relative motion trend of both parties. Other methods can be used in other embodiments, and this application does not limit them.
[0050] In specific implementation, obtaining the current position coordinates of the monitoring target pair based on continuous trajectory information, and then determining the relative position of the monitoring target pair, can be achieved in the following way: Simultaneously access the database storing continuous trajectory information of each monitoring target, and obtain the absolute position coordinates of the first and second monitoring targets in the world coordinate system at the same current processing timestamp, which are (X1, Y1) and (X2, Y2), respectively; the position coordinates are the latest and most accurate data points in the continuous trajectory information sequence; then, calculate the relative position vector (P_rel_x = X2 - X1, P_rel_y = Y2 - X1) from the first monitoring target to the second monitoring target through coordinate subtraction. Y1); It should be noted that, in order to assess the approach trend along the line connecting the two, the scalar projection of the relative velocity vector in the direction of the relative position vector can be further calculated, that is, the dot product of the two is calculated and divided by the magnitude of the relative position vector, so as to obtain a scalar form of relative approach velocity. A positive value indicates that the two are approaching, and a negative value indicates that they are moving away. This scalar is a key parameter for the subsequent calculation of the conflict time index. Other methods can be used in other embodiments, and this application does not limit them.
[0051] In specific implementation, the conflict time index used to quantify the urgency of risk can be determined based on the relative position, relative velocity, and relative acceleration of the monitored target pair. This can be achieved as follows: using the calculated relative position vector, relative approach velocity, and assumed constant relative acceleration as input, a quadratic equation is constructed with relative position, relative approach velocity, and relative acceleration as parameters. Solving this equation yields the time required for the relative distance to decrease to zero, or the time required for the relative distance to decrease to a preset safe distance threshold, such as the time required for the sum of the outer radii of the two vehicles. This time solution is the theoretical conflict time index for a time collision. If the equation has no positive real solution, or the solution is negative, or the relative approach velocity indicates that the two parties are moving away, then it is determined that there is no immediate collision risk under the current kinematic state, and the conflict time index is assigned a special constant representing infinity, such as 1000 seconds. This calculation process is repeated every time a frame of data is updated, ensuring that the time collision time index can reflect the dynamic changes in the kinematic risk between the monitored target pairs in real time. Other methods can also be used in other embodiments, and this application does not limit them.
[0052] In specific implementation, the conflict time index is standardized and mapped to a risk-related scalar value, which serves as a motion risk index representing the current kinematic state. This can be achieved in the following way: the calculated conflict time index is standardized and mapped to generate a scalar with a fixed range and positively correlated with the collision risk. Specifically, this is achieved through a predefined, monotonically decreasing nonlinear function, such as an inverse proportional function or an exponential decay function, mapping the time-collision time to between 0 and 1. As an achievable embodiment, the nonlinear function can be defined as follows: when the time-collision time is less than or equal to a preset emergency threshold (e.g., 2 seconds), the motion risk index is directly set to the maximum value of 1; when the time-collision time is greater than a safety threshold (e.g., 10 seconds), the motion risk index is set to the minimum value of 0; between the emergency threshold and the safety threshold, the motion risk index decays from 1 to 0 through linear or nonlinear interpolation; finally, the mapped scalar value is output as the motion risk index. The larger the index value, the higher the collision urgency inferred based on the current instantaneous velocity and acceleration. Other methods can also be used in other embodiments, which are not limited in this application.
[0053] In some embodiments, the fusion of the conflict probability and the motion risk index to obtain a comprehensive risk index can be achieved through the following steps: The conflict probability and the motion risk index are fused and calculated according to a predefined fusion function; The original values obtained from the fusion calculation are subjected to range constraints, and a comprehensive risk index representing the overall collision risk of the monitored target is output.
[0054] It should be noted that the comprehensive risk index in this application is a single scalar value that integrates the forward-looking conflict probability and the immediate motion risk, and is used to make a final and unified assessment of the overall collision risk of the monitored target pair.
[0055] In specific implementation, the fusion calculation of the conflict probability and the motion risk index according to the predefined fusion function can be achieved in the following way: A risk fusion engine is invoked, which has a built-in, configurable mathematical fusion rule as the predefined fusion function. This fusion function takes the scalar form of the conflict probability (denoted as P_c, range [0,1]) and the motion risk index (denoted as R_m, range [0,1]) as two inputs. In one embodiment, the fusion function is designed as a weighted geometric average, the core of which is that the comprehensive risk is only significantly amplified when both risk sources indicate high risk. Specifically, the calculation involves first configuring an amplification index of not less than 1 for each of the two inputs, for example, configuring an index α for P_c and an index β for R_m, and then calculating (P_c^α * ... The 1 / (α+β) root of R_m^β is used as the initial fusion value. It should be noted that this form can effectively capture the risk synergy effect. That is, when P_c and R_m are both high, their product will produce a stronger risk enhancement signal than the arithmetic mean. This is more in line with the understanding that the risk increases dramatically when there is both collision intent (high P_c) and an emergency state (high R_m) in traffic accidents. Other methods can be used in other embodiments, and this application does not limit them.
[0056] In specific implementation, the original value obtained from the fusion calculation is subjected to range constraint processing. The output of the comprehensive risk index representing the overall collision risk of the monitored target can be achieved in the following way: because the preliminary fusion value obtained in the previous step may exceed the standard range, the original value obtained from the fusion calculation can be subjected to range constraint processing. This range constraint processing is completed through a preset saturation mapping function. The saturation mapping function maps and limits the preliminary fusion value to a fixed output range, such as [0, 1]. Specifically, a fusion threshold can be set: when the preliminary fusion value is lower than the lower bound of the fusion threshold, the output is directly set to 0, indicating that the risk is negligible; when it is higher than the upper bound of the fusion threshold, the output is directly set to 1, indicating that the risk is extremely high; between the upper and lower bounds, linear or nonlinear interpolation scaling is performed; finally, the scalar value with range standardization output after this step is defined as the comprehensive risk index of the monitored target at the current moment; this index simultaneously contains the prospective collision probability and the immediate urgency of movement, providing a unified and comparable risk measure. Other methods can also be used in other embodiments, and this application does not limit them.
[0057] It should be noted that the above steps can nonlinearly fuse the conflict probability, which represents the possibility of long-term collisions, with the motion risk index, which represents the urgency of immediate collisions. This allows for the precise capture of the synergistic amplification effect of high predictable risk and high immediate danger, enabling the final comprehensive risk index to fully and quantitatively reflect the continuous risk spectrum from potential conflict to emergency danger, thus overcoming the limitations of single-dimensional assessment.
[0058] In step 105, when the comprehensive risk index exceeds the preset risk threshold, a high probability collision risk is determined and an early warning is triggered.
[0059] It should be noted that the risk threshold in this application is a boundary value used to determine whether the comprehensive risk index has reached the critical level that requires triggering an early warning. Specifically, the risk threshold can be preset in the following way: During the initial deployment or offline learning phase, the preset is completed through a threshold calibration and management system. This process first performs statistical analysis based on historical traffic accident data and high-precision trajectory playback data of the intersection to calculate the basic risk threshold for different conflict area types (such as motor vehicle-motor vehicle conflict areas and motor vehicle-pedestrian conflict areas) under standard clear daytime conditions. Then, a multi-dimensional threshold parameter table is constructed. This table uses conflict area type, weather conditions (such as sunny, rainy, foggy, snowy), and lighting conditions (such as daytime, dusk, nighttime) as joint query keys. The specific threshold value for each "area-weather-lighting" combination is determined through a combination of simulation testing and historical data inversion. The method is determined as follows: In a simulation environment, typical dangerous scenarios under various combinations are simulated, and the values of risk indicators when they reach the critical value are recorded. At the same time, cases of minor conflicts that did not lead to accidents in historical data are analyzed, and their comprehensive risk indicator values at that time are deduced as a reference. Finally, the thresholds obtained from statistics, simulation, and inversion are fused and smoothed to form a complete dynamic risk threshold mapping table that can be queried in real time by the early warning decision module. In addition, the threshold calibration and management system can support online learning and fine-tuning. That is, during the operation of the threshold calibration and management system, it can collect the early warning triggering results (whether they are false alarms or effective early warnings) and the actual conflict outcomes. Using these feedback data, the specific values in the threshold mapping table are progressively optimized, so that the risk threshold preset has adaptive evolution capabilities and continuously improves the early warning accuracy. Other methods can also be used in other embodiments, and this application does not limit them.
[0060] In specific implementation, when the comprehensive risk index exceeds a preset risk threshold, determining a high probability of collision risk and triggering an early warning can be achieved in the following way: The comprehensive risk index is compared in real time with a dynamically determined risk threshold. If the comprehensive risk index continuously exceeds the risk threshold for a preset stable duration, such as three consecutive processing cycles, then a high probability of collision risk is determined between the monitored target pairs, and a structured early warning instruction is immediately generated. This early warning instruction must contain at least the following key information: the identity identifiers (i.e., their unique tracking identifiers) of the monitored target pairs involved, their respective types, real-time location coordinates, and predicted collision probability. The system identifies the location of the intrusion point, the risk level, and recommended avoidance measures (such as "yield to target A"). Finally, it triggers a warning simultaneously through multiple channels: on the one hand, the warning information is sent to variable message signs or audible and visual alarm devices on the roadside to alert nearby traffic participants; on the other hand, the warning information is broadcast to the on-board terminals of relevant vehicles via vehicle-to-everything (V2X) communication units (such as RSUs) using low-latency communication protocols (such as C-V2X or DSRC). Simultaneously, the warning information is also uploaded to the traffic management center platform for recording and global situation display. Other methods can be used in other embodiments, and this application does not limit this.
[0061] In addition, in some embodiments, when the comprehensive risk index does not have a preset risk threshold or the comprehensive risk index exceeds the preset risk threshold but does not reach the preset stable duration, it is determined that there is no risk.
[0062] It should be noted that the above steps can dynamically adjust the risk assessment threshold according to the type of conflict area, weather and lighting conditions, and generate structured early warning instructions for comprehensive risk indicators that continuously exceed the threshold and release them through multiple channels such as roadside and vehicle-road collaboration. This enables the early warning system to have environmental adaptability, effectively reduce false alarms and missed alarms, and provide timely and clear risk information and risk avoidance guidance for traffic participants and management.
[0063] Furthermore, in another aspect of this application, in some embodiments, this application provides a traffic accident monitoring system based on image recognition, which includes an intersection traffic conflict risk early warning unit, referencing... Figure 4 The figure is a schematic diagram of the structure of an intersection traffic conflict risk warning unit according to some embodiments of this application. The intersection traffic conflict risk warning unit includes: an acquisition module 401, a processing module 402, and an execution module 403, which are described below: The acquisition module 401 in this application is mainly used to acquire the overhead video stream of the monitored intersection and determine the continuous trajectory information of each monitored target, including tracking vehicles, pedestrians and non-motorized vehicles. Processing module 402, in this application, is mainly used to extract the static attributes and dynamic behavior features of each monitoring target; The processing module 402 described in this application is also used to construct a semantic interaction graph for monitoring target pairs entering the preset conflict area based on the corresponding static attributes, dynamic behavioral characteristics and the semantic information of the right-of-way rules of the conflict area, and generate the probability distribution of the predicted trajectory of the monitoring target pairs in the future short time domain through the semantic interaction graph and the pre-trained trajectory prediction model. The processing module 402 described in this application is further configured to determine the probability of a physical conflict between the monitored target and the target in the future short time domain based on the probability distribution of the predicted trajectory, determine the motion risk index based on the instantaneous velocity and acceleration in the dynamic behavior characteristics of the monitored target, and fuse the conflict probability and the motion risk index to obtain a comprehensive risk index. The execution module 403 in this application is mainly used to determine that there is a high probability of collision risk and trigger an early warning when the comprehensive risk index exceeds the preset risk threshold.
[0064] Each module in the aforementioned intersection traffic conflict risk early warning unit can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0065] In another embodiment, this application provides a computer device, which may be a server, and its internal structure diagram may be as follows. Figure 5 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores intersection traffic conflict risk warning data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements an intersection traffic conflict risk warning method.
[0066] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0067] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above embodiment of the intersection traffic conflict risk warning method.
[0068] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described embodiment of the intersection traffic conflict risk warning method.
[0069] In one embodiment, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps described in the embodiment of the intersection traffic conflict risk warning method.
[0070] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0071] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0072] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for early warning of traffic conflict risks at intersections, applied to an image recognition-based traffic accident monitoring system, characterized in that, The method includes the following steps: The system acquires an overhead video stream of the monitored intersection and determines the continuous trajectory information of each monitored target, including vehicles, pedestrians and non-motorized vehicles. Extract the static attributes and dynamic behavioral characteristics of each monitoring target; For a pair of monitored targets entering a pre-defined conflict zone, a semantic interaction graph is constructed based on the corresponding static attributes, dynamic behavioral characteristics, and semantic information of the right-of-way rules in the conflict zone. The probability distribution of the predicted trajectory of the monitored target pair in the future short time domain is generated through the semantic interaction graph and a pre-trained trajectory prediction model. Based on the probability distribution of the predicted trajectory, the probability of physical conflict between the monitored target and the target in the short time domain is determined. Based on the instantaneous velocity and acceleration in the dynamic behavior characteristics of the monitored target, the motion risk index is determined. The conflict probability and the motion risk index are fused to obtain a comprehensive risk index. When the comprehensive risk index exceeds the preset risk threshold, a high probability of collision risk is determined and an early warning is triggered.
2. The method as described in claim 1, characterized in that, Extracting the static attributes and dynamic behavioral characteristics of each monitoring target specifically includes: The static attributes of each monitored target are identified and extracted from the overhead video stream; The dynamic behavioral characteristics of the corresponding monitoring targets are determined based on the information of each continuous trajectory.
3. The method as described in claim 1, characterized in that, For monitored target pairs entering the preset conflict zone, a semantic interaction graph is constructed based on their corresponding static attributes, dynamic behavioral characteristics, and semantic information of the right-of-way rules in the conflict zone. Specifically, this includes: A corresponding graph node is created for each monitoring target that enters the preset conflict area, and the static attributes and dynamic behavior characteristics of each monitoring target are used as the feature vector of the graph node corresponding to each monitoring target. Based on the spatiotemporal distance between the monitored target pairs, edges between nodes are established, and combined with the semantic information of the right-of-way rules in the conflict area, traffic rule constraints are injected into the entire graph structure. Output a semantic interaction graph that integrates the feature vectors, interaction relationships, and rule semantics of each monitoring target.
4. The method as described in claim 1, characterized in that, The probability distribution of the predicted trajectory of the monitoring target pair in the future short time domain, generated by the semantic interaction graph and the pre-trained trajectory prediction model, specifically includes: The node feature matrix, adjacency matrix, and graph global attribute dictionary contained in the semantic interaction graph are encoded into the input tensor of the pre-trained trajectory prediction model. The encoded tensor is input into the pre-trained trajectory prediction model, which is based on a graph neural network architecture and aggregates node features, edge weights and global semantic information through a multi-layer message passing mechanism to output the predicted position offset of each monitored target at future discrete time points. The predicted position offset is superimposed with the current coordinates of the monitored target to determine multiple possible trajectories in the short time domain in the future. At the same time, a corresponding probability value is output for each possible trajectory. All possible trajectories and their probability values are organized to form an independent probability distribution of the predicted trajectory for each monitored target.
5. The method as described in claim 1, characterized in that, Determining the probability of a physical conflict between a monitored target and the predicted trajectory based on the probability distribution of the predicted trajectory specifically includes: For the probability distribution of the predicted trajectory of each monitoring target in the monitoring target pair, each possible trajectory is expanded into a geometric region that changes with time in the short time domain in the future, thereby transforming the discrete trajectory line into a continuous spatiotemporal probability volume. Calculate the intersection of the spatiotemporal probability volumes of the monitored target pair in the future. If the intersection is not empty, it indicates that the monitored target pair has a predicted trajectory conflict at the corresponding future time and spatial location. The system iterates through all intersecting geometric regions, calculates the overall probability of the monitored target experiencing at least one physical conflict within the entire future short time domain based on the probability values of the corresponding trajectory modes that trigger the conflict, and outputs the overall probability as the conflict probability.
6. The method as described in claim 1, characterized in that, Based on the monitoring targets, the motion risk indicators for determining instantaneous velocity and acceleration in dynamic behavioral characteristics specifically include: The relative velocity and relative acceleration of the monitored target pair at the current moment are determined based on the instantaneous velocity and acceleration of the monitored target pair in the dynamic behavior characteristics at the current moment; The current position coordinates of the monitored target pair based on continuous trajectory information are obtained, and then the relative position of the monitored target pair is determined; The conflict time index used to quantify the urgency of risk is determined based on the relative position, relative velocity, and relative acceleration of the monitoring target pair. The conflict time index is standardized and mapped to a risk-related scalar value, which is then used as a motion risk index representing the current kinematic state.
7. The method as described in claim 1, characterized in that, The comprehensive risk index obtained by fusing the conflict probability and the motion risk index specifically includes: The conflict probability and the motion risk index are fused and calculated according to a predefined fusion function; The original values obtained from the fusion calculation are subjected to range constraints, and a comprehensive risk index representing the overall collision risk of the monitored target is output.
8. A traffic accident monitoring system based on image recognition, the system comprising an intersection traffic conflict risk early warning unit, characterized in that, The intersection traffic conflict risk early warning unit includes: The acquisition module is used to acquire an overhead video stream of the monitored intersection and determine the continuous trajectory information of each monitored target, including tracked vehicles, pedestrians and non-motorized vehicles; The processing module is used to extract the static attributes and dynamic behavioral characteristics of each monitoring target; The processing module is also used to construct a semantic interaction graph for monitoring target pairs entering the preset conflict area based on the corresponding static attributes, dynamic behavior features and right-of-way rule semantic information of the conflict area, and generate the probability distribution of the predicted trajectory of the monitoring target pair in the future short time domain through the semantic interaction graph and the pre-trained trajectory prediction model. The processing module is further configured to determine the probability of a physical conflict between the monitored target and the target in the future short time domain based on the probability distribution of the predicted trajectory, determine the motion risk index based on the instantaneous velocity and acceleration in the dynamic behavior characteristics of the monitored target, and fuse the conflict probability and the motion risk index to obtain a comprehensive risk index. The execution module is used to determine that there is a high probability of collision risk and trigger an early warning when the comprehensive risk index exceeds a preset risk threshold.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the intersection traffic conflict risk early warning method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the intersection traffic conflict risk warning method as described in any one of claims 1 to 7.