A vehicle abnormal behavior detection method in a multi-category mixed vehicle flow

By abstracting traffic flow information into a dynamic heterogeneous graph sequence and designing a heterogeneous graph attention long short-term memory network model, combined with an autoencoder to detect abnormal behavior, the problem of insufficient vehicle interaction behavior detection in existing technologies is solved. This enables rapid and accurate detection of mixed traffic flows of various types of vehicles, improving the safety and efficiency of road traffic systems.

CN118038672BActive Publication Date: 2026-11-27SHANGHAI JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410174974.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-07
Publication Date
2026-11-27
Estimated Expiration
2044-02-07

AI Technical Summary

Technical Problem

Existing technologies lack detection schemes for vehicle interactions in non-fixed formation random traffic flows, and cannot effectively detect multiple abnormal behaviors of multiple vehicles simultaneously, resulting in insufficient safety and efficiency of urban road traffic.

Method used

Road traffic flow information is abstracted into a discrete-time dynamic heterogeneous graph sequence. A long short-term memory network model of the heterogeneous graph attention module is designed. An abnormal behavior is detected by reconstructing errors through nodes using an autoencoder. The heterogeneous graph attention module is used to extract individual vehicle and interaction information. The long short-term memory network model is used for temporal feature extraction and anomaly detection.

Benefits of technology

It enables rapid and accurate detection of abnormal behavior in mixed traffic flows of various types of vehicles, supports large-scale highway scenarios, and ensures the safe and efficient operation of road traffic systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118038672B_ABST
    Figure CN118038672B_ABST
Patent Text Reader

Abstract

The application relates to a kind of vehicle abnormal behavior detection methods in multi-class mixed traffic flow, comprising the following steps: obtaining traffic information on road, according to its internal characteristics, it is abstracted as discrete time dynamic heterogeneous graph sequence;Design long short-term memory network model using heterogeneous graph attention module, realize the time sequence feature extraction of multi-class node problem;Based on long short-term memory network model, design auto-encoder, obtain outlier abnormal behavior that does not conform to normal vehicle decision mode through node reconstruction error detection.Compared with the prior art, the application uses heterogeneous graph network to learn vehicle individual information and vehicle interaction behavior simultaneously, can effectively detect vehicle abnormal behavior, and at the same time support to expand to large highway scene with thousands of vehicle level, so as to different kinds of vehicle abnormal behavior in multi-class vehicle mixed traffic flow, can quickly and accurately detect, reliably guarantee the safe and efficient operation of road traffic system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of traffic data processing technology, and in particular to a method for detecting abnormal vehicle behavior in mixed traffic flows of various types. Background Technology

[0002] With the rapid development of the automotive industry and the improvement of residents' economic conditions, the number of motor vehicles in cities has increased dramatically. However, compared with this, the expansion and development of urban road networks has lagged behind, leading to various traffic problems. In many traffic accident cases, the main cause of accidents is inappropriate driving behavior. Therefore, in order to ensure the smooth and orderly operation of the urban road traffic system, it is urgent to identify and respond to abnormal driving behaviors in traffic flow in a timely manner.

[0003] Existing vehicle anomaly detection technologies can be mainly divided into four categories: detection of specific anomaly types; detection of abnormal driving behavior of a single vehicle; anomaly detection of platoons and vehicle queues; and the recently rapidly developing multi-vehicle traffic flow anomaly detection based on graph networks. Among them, detection of specific anomaly types mainly focuses on a specific behavior of a vehicle, such as parking, following another vehicle, and turning, but its drawback is poor generalization and transferability.

[0004] The detection of abnormal driving behavior of a single vehicle mainly targets the abnormal driving behavior of a specific vehicle in a scene, and usually does not consider the influence of other vehicles in the surrounding area.

[0005] Anomaly detection for platoons and vehicle platoons focuses on whether there are anomalies in vehicle platoons with specific formations and cooperative interactions, and cannot be used for anomaly detection in random traffic flow.

[0006] Multi-vehicle traffic flow anomaly detection based on graph networks mainly focuses on statistical values ​​such as traffic volume, average vehicle speed, and demand between cities, while research on specific vehicles and specific faults in the traffic flow is scarce.

[0007] In summary, existing research lacks a solution for non-fixed formation random traffic flow that considers vehicle interaction behavior and can simultaneously detect multiple anomalies in multiple vehicles. Summary of the Invention

[0008] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a method for detecting abnormal vehicle behavior in mixed traffic flows of various types. This method can quickly and accurately detect abnormal behaviors of different types of vehicles in mixed traffic flows of various types, thereby ensuring the safe and efficient operation of the road traffic system.

[0009] The objective of this invention can be achieved through the following technical solution: a method for detecting abnormal vehicle behavior in mixed traffic flows, comprising the following steps:

[0010] S1. Obtain traffic flow information on the road and abstract it into a discrete-time dynamic heterogeneous graph sequence based on its internal characteristics for subsequent machine learning model learning and analysis.

[0011] S2. The design uses a long short-term memory network model with a heterogeneous graph attention module to extract temporal features for various types of node problems.

[0012] S3. Based on the long short-term memory network model in step S2, an autoencoder is designed to detect outlier abnormal behaviors that do not conform to normal vehicle decision-making methods by using node reconstruction errors.

[0013] Furthermore, step S1 specifically includes the following steps:

[0014] S11. Obtain continuous traffic flow data on the target road and obtain discrete data segments through sampling;

[0015] S12. For the data at each moment in the discrete segment, construct heterogeneous graph data based on the individual data of each vehicle and the relative and interactive information between vehicles;

[0016] S13. Sort the discrete heterogeneous graph data in step S12 in chronological order to obtain a discrete-time dynamic heterogeneous graph sequence.

[0017] Furthermore, step S12 specifically includes the following steps:

[0018] S121. For each vehicle at the current moment, record the corresponding vehicle speed, acceleration, coordinates, lane number, and vehicle type to serve as features of each node in the heterogeneous graph.

[0019] S122. Initialize the adjacency matrix of the graph as an N-order identity matrix, where N is the total number of vehicles at that moment. Define a fixed minimum longitudinal spacing λ. x Minimum lane difference λ l When the longitudinal distance between the two vehicles is less than λ x Or the lane difference is less than λ l If the condition is met, the corresponding position in the adjacency matrix will be modified to 1, indicating that there is an edge between the corresponding nodes of the two vehicles.

[0020] Furthermore, step S2 specifically involves using a heterogeneous graph attention module based on the type of target node to replace the linear structure of the gating unit in the traditional long short-term network structure, enabling it to take graph structure data as input and then extract the temporal features of the dynamic graph sequence.

[0021] Furthermore, the heterogeneous graph attention module based on target node type is used to extract features from each node itself and its surrounding information. Its heterogeneous graph attention calculation formula is as follows:

[0022]

[0023] Where i is the target node number, j is the source node number, and h i and h j Let tp represent the hidden feature information vectors of node i and node j, respectively. i tp j These represent the types of the two nodes, The type is tp i The learnable attention coefficient used when aggregating target nodes. It is of type TP i The linear transformation matrix corresponding to the node features, || represents the vector concatenation operation, and Neighbors(i) represents all neighboring nodes of node i;

[0024] The attention calculation coefficient is only related to the type of the target node, and is independent of the type of the source node.

[0025] Furthermore, the long short-term memory network model in step S2 is specifically as follows:

[0026]

[0027]

[0028]

[0029]

[0030]

[0031] h t =O t ⊙tanh(c t )

[0032] in, For graph attention operations, ⊙ represents the Hadamard product operation, which is the element-wise multiplication of two vectors with the same dimension. F t I t O t These are the forget gate, update gate, and output gate, respectively, improved using HAT. fh w fx To replace the original matrix multiplication in the LSTM forget gate, b f For manually set bias parameters, w ih wix b i w ch w cx b c w oh w ox b o These correspond to the relevant models and parameters in the update gate, cell state mapping, and output gate, respectively.

[0033] Furthermore, the autoencoder structure designed in step S3 includes an encoder and a decoder, wherein the encoder input is the graph data at each time step and the output is the compressed graph node hidden features; the decoder output is the processed node hidden features and the output is the reconstructed graph data.

[0034] Furthermore, the loss function of the autoencoder structure is specifically as follows:

[0035]

[0036] in, These represent the reconstruction errors of node coordinates, velocity, acceleration, and lane markings, respectively. Calculated using root mean square error. λ is calculated using cross-entropy error. x , λ v , λ v , λ l These are the pre-set error weighting coefficients.

[0037] Furthermore, step S3 specifically includes the following steps:

[0038] S31. The time window length of the heterogeneous dynamic graph sequence data generated in step S1 is T. The hidden states of the encoder and decoder are initialized.

[0039] S32. Input the original image data at T time points into the encoder in sequence, and retain the output at the last time point;

[0040] S33. Input the encoder output as the observation value into the decoder T times, and record the decoder output at each time step as the reconstructed graph data;

[0041] S34. Calculate the long-term reconstruction error and short-term reconstruction error for each node in the original graph data and the reconstructed graph data;

[0042] S35. Perform anomaly diagnosis by analyzing the long-term and short-term reconstruction errors of each node.

[0043] Furthermore, the long-term reconstruction error, i.e., the average reconstruction error of the vehicle over the entire time segment, is calculated using the following formula:

[0044]

[0045] Where i is the node number, and T is the time window length of the dynamic graph sequence. Let t be the reconstruction error of the node at time t. The reconstruction error is calculated in the same way as the loss function.

[0046] The short-term reconstruction error is the maximum value among the average reconstruction errors of the vehicle at three consecutive time points, and is calculated using the following formula:

[0047]

[0048] In step S35, a weighted average is used to quantify the long-term reconstruction error and the short-term reconstruction error to obtain the overall reconstruction error, namely:

[0049]

[0050] When the overall reconstruction error of a node exceeds a preset error threshold, it is determined that there is outlier behavior.

[0051] Compared with the prior art, the present invention has the following advantages:

[0052] This invention first acquires traffic flow information on roads and abstracts it into a discrete-time dynamic heterogeneous graph sequence for subsequent machine learning model learning and analysis. Then, it designs a long short-term memory network model using a heterogeneous graph attention module to extract temporal features for various types of node problems. Finally, an autoencoder is designed based on the long short-term memory network model to detect outlier behaviors that do not conform to normal vehicle decision-making methods. This invention uses a heterogeneous graph network to simultaneously learn individual vehicle information and inter-vehicle interaction behavior, enabling rapid and accurate detection of different types of abnormal vehicle behaviors in mixed traffic flows. It also supports expansion to large-scale highway scenarios with thousands of vehicles, thereby ensuring the safe and efficient operation of the road traffic system.

[0053] Second, this invention considers that road traffic flow systems are extremely complex systems, and the relationships between vehicles gradually change with the movement of traffic. To solve the research problem using mathematical methods, a formulaic method is needed to accurately describe vehicle states, trajectories, and interactions between vehicles. Therefore, based on graph theory, dynamic traffic flow information is abstracted into a discrete-time dynamic heterogeneous graph sequence through sampling and graph construction. Nodes represent individual vehicle information, critical matrices reflect the interactions between vehicles, and the dynamic graph sequence reflects the dynamic changes of the entire traffic flow. This provides a sufficiently accurate formulaic model for the proposed problem, enabling it to be used for machine learning model training and prediction.

[0054] Third, the present invention uses a long short-term memory network model with heterogeneous graph attention modules. The heterogeneous graph attention modules based on the target node type extract the features of each node itself and its surrounding environment. The linear structure in the gating unit of the long short-term network is replaced with a heterogeneous graph attention module, which enables it to process graph-type data and thus realize the extraction of complex mixed traffic flow time sequence information.

[0055] Fourth, this invention designs an autoencoder based on a long short-term memory network model to reconstruct traffic flow information, and defines an anomaly detection index based on reconstruction error that considers both short-term and long-term vehicle characteristics, thereby realizing the detection of abnormal vehicle behavior in mixed traffic flows of various types of vehicles. Attached Figure Description

[0056] Figure 1 This is a schematic diagram of the method flow of the present invention;

[0057] Figure 2 This is a schematic diagram of the problem formula modeling process in this invention;

[0058] Figure 3 This is a schematic diagram illustrating the calculation process of the heterogeneous graph attention module in this invention;

[0059] Figure 4 This is a schematic diagram of the self-encoder structure in this invention. Detailed Implementation

[0060] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0061] Example

[0062] like Figure 1 As shown, a method for detecting abnormal vehicle behavior in mixed traffic flow includes the following steps:

[0063] S1. Obtain traffic flow information on the road (such as roadside monitoring video data), and based on its internal characteristics, abstract it into a discrete-time dynamic heterogeneous graph sequence for subsequent machine learning model learning and analysis.

[0064] S2. The design uses a long short-term memory network model with a heterogeneous graph attention module to extract temporal features for various types of node problems.

[0065] S3. Based on the long short-term memory network model in step S2, design an autoencoder to detect outlier behaviors that do not conform to normal vehicle decision-making methods by reconstructing node errors.

[0066] This proposal takes into account that the road traffic flow system is an extremely complex system, and the relationship between vehicles will gradually change with the movement of traffic. In order to use mathematical methods to solve the problem targeted by the research, a formulaic method that can accurately describe the vehicle state, trajectory, and interaction behavior between vehicles is needed. Figure 2 This demonstrates the formalized process of the proposed solution. First, continuous traffic flow data (such as roadside surveillance video) containing N vehicles within a time window T is processed at fixed time intervals δ. t Sampling is performed to obtain continuous discrete traffic flow data (such as images); then, a map is constructed for the traffic flow data at each time t, treating each vehicle as an independent node, with the vehicle numbered i denoted as vel. i , will vel i The type of node i is tp i vel i The node characteristics at time t are denoted as These represent the vehicle's coordinates, speed, acceleration, and lane location, as well as vel. i The traffic density, average speed, and percentage of similar vehicles in the surrounding area are denoted as the feature matrix of all nodes at this moment. Simultaneously, the edge information of the graph data is represented according to the relative positional relationships between vehicles. First, the adjacency matrix E of the graph data at time t is initialized using an N-order diagonal matrix. t Set a fixed minimum longitudinal spacing δ x and minimum lane spacing δ l When the vehicle i and vel j The vertical coordinate distance between them is less than δ x Or lane spacing less than δ l At that time, E t Edge e at the corresponding position in the middle ij Set to 1; concatenate the graph data at all times to obtain the dynamic graph sequence data G(T)={(X1,E1),(X1,E1),…,(X t E t )},t∈T, to be used for training and testing machine learning models.

[0067] When extracting temporal information features of various types of nodes in a dynamic heterogeneous graph, this scheme uses a heterogeneous graph attention module based on the target node type to extract features of each node itself and its surrounding information. The structure of this heterogeneous graph attention module based on the target node type is as follows: Figure 3 As shown, the heterogeneous graph attention calculation method is as follows:

[0068]

[0069] Where i is the target node number, j is the source node number, and h is the destination node number. i and h j Let tp represent the hidden feature information vectors of node i and node j, respectively. i tp j These represent the types of the two nodes, The type is tp i The learnable attention coefficient used when aggregating target nodes. It is of type TP i The linear transformation matrix corresponding to the node features is given by equation , where || represents the vector concatenation operation, and Neighbors(i) represents all neighboring nodes of node i. As can be seen from the above equation, the attention calculation coefficients are only related to the type of the target node and are independent of the type of the source node.

[0070] To extract temporal information from graph sequences, this scheme uses a Long Short-Term Memory (LSTM) network structure. Considering that traditional LSM networks can only process multivariate time series data and cannot handle graph structures, this scheme replaces the linear structure of the gated units in the traditional LSM network structure with a heterogeneous graph attention module based on target node types. This allows it to take graph data as input and extract the temporal features of dynamic graph sequences. The computation steps become:

[0071]

[0072]

[0073]

[0074]

[0075]

[0076] h t =O t ⊙tanh(c t )

[0077] in For graph attention operations, ⊙ represents the Hadamard product operation, which is the bitwise multiplication of two vectors with the same dimension. F t I t O t These are the forget gate, update gate, and output gate, respectively, improved using HAT. f h, w fx To replace the original matrix multiplication in the LSTM forget gate, b f For manually set bias parameters, w i h, w ix b iw c h, w cx b c w o h, w ox b o These correspond to the relevant models and parameters in the update gate, cell state mapping, and output gate, respectively.

[0078] When performing anomaly detection based on the extracted node feature information, this scheme also designs an autoencoder structure based on dynamic heterogeneous graphs for node anomaly detection. Traditional autoencoders are widely used for classification and anomaly detection tasks of text and image data. The encoder compresses the samples to obtain hidden representation information, and then the decoder decompresses and reconstructs the hidden representation information. The reconstruction error of samples that follow the overall distribution is generally small, while the reconstruction error of outlier samples is generally large, thus enabling sample classification and anomaly detection. Autoencoders for graph networks are mainly used for graph classification problems. By defining the distance between graph data, the reconstruction error calculation method is changed, thereby enabling classification and anomaly analysis. This scheme needs to perform anomaly detection for each individual vehicle, so the heterogeneous graph attention long short-term network model designed in step S2 is used as the encoder and decoder of the autoencoder to extract hidden features and reconstruct samples. In order to compress the sample data sufficiently, this scheme first initializes the hidden state of the encoder and decoder by sequentially inputting the dynamic graph sequence data G(T) into the encoder and retaining the hidden state output at the last time step, denoted as h. T Then h T The data is repeatedly input into the decoder to obtain the reconstructed sample data for all time steps. The specific process is as follows: Figure 4 As shown.

[0079] The essence of an autoencoder is to reconstruct samples. The reconstruction error is typically used as the loss function for model training. The specific calculation steps are as follows:

[0080]

[0081]

[0082]

[0083]

[0084]

[0085] in, These are the root mean square errors of the reconstructed coordinates, velocity, and acceleration, respectively. Reconstruct the cross-entropy error for lane numbers, λ x , λ v , λa , λ l These are the weights corresponding to the four types of errors, and the analysis needs to be based on the importance of the features and the order of magnitude of the specific problem: for example, if the total length of the highway is 5000 meters, after normalization the order of magnitude becomes 10. -4 The vehicle speed ranges from 5 to 60 m / s, and the acceleration ranges from 0.5 to 3.5 m / s², both on the order of 10 after scaling. -2 Lane coding uses quaternary discrete data, so the order of magnitude doesn't need to be considered. Among the four data types, the vehicle's lane location and acceleration are instantaneous decisions, and the error should be minimized, so the loss weight should be appropriately increased. However, vehicle speed and coordinates are integral values ​​of acceleration and speed, containing accumulated errors from multiple time steps, so the loss weight should be appropriately decreased. Based on these considerations, this scheme allows for a 100-meter error in vehicle coordinates, which is 0.02 after normalization and 0.0004 after mean square calculation; a 4 m / s error in vehicle speed is allowed, which is 0.072 after normalization and 0.0053 after mean square calculation; and a 0.3 m / s² error in acceleration is allowed, which is 0.1 after normalization and 0.01 after mean square calculation. When the cross-entropy corresponds to a lane probability of 0.6, the loss value is 0.51; when the probability is 0.8, the loss is 0.22. Therefore, λ... x Set it to 500, and set λ v Set it to 50, and λ a Set it to 2, and set λ l Set to 1, that is

[0086] When performing vehicle fault detection, it is necessary to consider both the long-term performance of each vehicle over the entire time segment and the short-term labels of each segment. Therefore, this scheme uses a weighted average to quantify the long-term reconstruction error and the short-term reconstruction error. The long-term reconstruction error is the average reconstruction error of the vehicle over the entire time segment, and it is calculated as follows:

[0087]

[0088] Where i is the node number, and T is the time window length of the dynamic graph sequence. Let be the reconstruction error of the node at time t. The calculation method for the reconstruction error is the same as that for the loss function. The short-term reconstruction error is the average reconstruction error of the vehicle at three consecutive times. To facilitate anomaly detection, the maximum value is taken. The calculation method is as follows:

[0089]

[0090] The total reconstruction error is obtained by weighted summation of the two, namely:

[0091]

[0092] When the overall reconstruction error of a node exceeds a preset error threshold, it is considered to be abnormal.

[0093] This embodiment uses SUMO traffic simulation software to simulate a mixed traffic flow scenario involving various types of vehicles exhibiting abnormal behaviors on a five-kilometer-long four-lane one-way straight road, and detects vehicles exhibiting abnormal behaviors. This embodiment includes four types of vehicles, each with different speed parameters, as shown in Table 1. The base speed is the target speed of that type of vehicle under ideal conditions, unaffected by environmental factors. The collected data is analyzed into training and testing sets. The training set contains only vehicles exhibiting normal behavior, while the testing set includes both normal and abnormal vehicles.

[0094] Table 1 Vehicle parameter settings in simulation

[0095] Vehicle types Body size Base speed acceleration deceleration Response time car 5,1.8,1.5 50 3.5 6 2 small truck 4.3,1.7,1.8 40 2.5 5 2 large trucks 6.8,2.4,2.7 30 1.5 4 2 bike 1.5,0.6,1.7 15 0.5 8 1.5

[0096] First, the collected simulation sequences are used to construct a graph according to the formula designed in this scheme, resulting in 3500 heterogeneous dynamic graph sequences. Then, the partial feature information of all nodes is normalized to obtain the training set and test set of discrete-time heterogeneous dynamic graph sequences used as input to the autoencoder.

[0097] The autoencoder model was then trained using the training set data, while several traditional time series analysis models and dynamic graph models were used as comparisons. The final training loss values ​​(i.e., reconstruction errors on the training set) are shown in Table 2. The final loss of the proposed scheme, converted to the average loss of a single vehicle at a single time, is 0.7, and the corresponding error values ​​distributed across the four features x, v, a, and l are [missing values]. It has fully met all the indicators proposed when specifying the weights of each loss item.

[0098] Table 2 Final loss values ​​for different models

[0099]

[0100] Finally, the trained model was used to detect abnormal vehicle behavior on the test set data. The detection accuracy results are shown in Table 3.

[0101] Table 3. Vehicle anomaly detection accuracy in single-type anomaly scenarios.

[0102]

[0103] As shown in Table 3, for mixed test data containing multiple types of anomalies, the proposed solution of this invention achieves a much better result than the baseline model, and its accuracy is sufficient to complete the abnormal vehicle behavior detection task in most scenarios.

Claims

1. A method for detecting abnormal vehicle behavior in mixed traffic flows of various types, characterized in that, Includes the following steps: S1. Obtain traffic flow information on the road, and based on its internal characteristics, abstract it into a discrete-time dynamic heterogeneous graph sequence for subsequent machine learning model learning and analysis; S2. The design uses a long short-term memory network model with a heterogeneous graph attention module to extract temporal features for various types of node problems. S3. Based on the long short-term memory network model in step S2, design an autoencoder to detect outlier abnormal behaviors that do not conform to normal vehicle decision-making methods through node reconstruction errors. S1 specifically includes the following steps: S11. Obtain continuous traffic flow data on the target road and obtain discrete data segments through sampling; S12. For the data at each moment in the discrete segment, construct heterogeneous graph data based on the individual data of each vehicle and the relative and interactive information between vehicles; S13. Sort the discrete heterogeneous graph data in step S12 in chronological order to obtain a discrete-time dynamic heterogeneous graph sequence. S12 specifically includes the following steps: S121. For each vehicle at the current moment, record the corresponding vehicle speed, acceleration, coordinates, lane number, and vehicle type to serve as features of each node in the heterogeneous graph. S122. Initialize the adjacency matrix of the graph as an N-order identity matrix, where N is the total number of vehicles at that moment. Define a fixed minimum longitudinal spacing. Minimum lane difference When the longitudinal distance between two vehicles is less than Or the lane difference is less than If the two vehicles are in a certain state, the corresponding position in the adjacency matrix will be modified to 1, indicating that there is an edge between the corresponding nodes of the two vehicles. The autoencoder structure designed in S3 includes an encoder and a decoder. The encoder takes graph data at each time step as input and outputs compressed graph node hidden features as output. The decoder outputs processed node hidden features and reconstructed graph data as output. The loss function of the autoencoder structure is specifically as follows: in, , , , These represent the reconstruction errors of node coordinates, velocity, acceleration, and lane markings, respectively. , , Calculated using root mean square error. Calculated using cross-entropy error , , , These are the pre-set error weighting coefficients.

2. The method for detecting abnormal vehicle behavior in mixed traffic flow according to claim 1, characterized in that, Specifically, step S2 involves using a heterogeneous graph attention module based on the type of target node to replace the linear structure of the gating unit in the traditional long short-term network structure, enabling it to take graph structure data as input and extract the temporal features of the dynamic graph sequence.

3. The method for detecting abnormal vehicle behavior in mixed traffic flow according to claim 2, characterized in that, The heterogeneous graph attention module based on target node type is used to extract features from each node itself and its surrounding information. Its heterogeneous graph attention calculation formula is as follows: in, Number the target node. Number the source node. and Representing nodes respectively and nodes The hidden feature information vector, , These represent the types of the two nodes, Indicates the type as The learnable attention coefficient used when aggregating target nodes. It is a type of The linear transformation matrix corresponding to the node features, where || represents the vector concatenation operation. Represents a node All neighboring nodes; The attention calculation coefficient is only related to the type of the target node, and is independent of the type of the source node.

4. The method for detecting abnormal vehicle behavior in mixed traffic flow according to claim 3, characterized in that, The long short-term memory network model in step S2 is specifically as follows: in, For graph attention operations, The Hadamard product is an operation in which two vectors of the same dimension are multiplied element by element. , , These are the forget gate, update gate, and output gate, which are improved using HAT. , This is a graph attention operation used to replace the original matrix multiplication in the LSTM forget gate. The bias parameters are manually set. , , , , , , , , These correspond to the relevant models and parameters in the update gate, cell state mapping, and output gate, respectively.

5. The method for detecting abnormal vehicle behavior in mixed traffic flow according to claim 1, characterized in that, Step S3 specifically includes the following steps: S31. The time window length of the heterogeneous dynamic graph sequence data generated in step S1 is T. The hidden states of the encoder and decoder are initialized. S32. Input the original image data at T time points into the encoder in sequence, and retain the output at the last time point; S33. Input the encoder output as the observation value into the decoder T times, and record the decoder output at each time step as the reconstructed graph data; S34. Calculate the long-term reconstruction error and short-term reconstruction error for each node in the original graph data and the reconstructed graph data; S35. Perform anomaly diagnosis by analyzing the long-term and short-term reconstruction errors of each node.

6. The method for detecting abnormal vehicle behavior in mixed traffic flow according to claim 5, characterized in that, The long-term reconstruction error refers to the average reconstruction error of the vehicle over the entire time segment, specifically: in, Number the nodes. The time window length of the dynamic graph sequence. For this node in The reconstruction error at time step is calculated in the same way as the loss function. The short-term reconstruction error is the maximum value among the average reconstruction errors of the vehicle at three consecutive time points, specifically: In step S35, a weighted average is used to quantify the long-term reconstruction error and the short-term reconstruction error to obtain the overall reconstruction error, namely: When the overall reconstruction error of a node exceeds a preset error threshold, it is determined that there is outlier behavior.

Citation Information

Patent Citations

  • Vehicle track prediction method based on dynamic interaction graph convolution

    CN114802296A

  • Real-time abnormity sensing method for automatic protection system of high-speed train

    CN116127395A