Traffic anomaly detection method based on graph convolutional neural network autoencoder

By using the mirrored temporal graph autoencoder MTGAE, combined with the mirrored temporal convolution module MTCM and the graph convolution gated recurrent module GCGRU CELL, the problems of computational resource limitations and incomplete datasets in existing technologies are solved, achieving efficient and accurate traffic anomaly detection, adapting to different complexities, and suitable for short- to medium-term emergency forecasting in daily life.

CN116776269BActive Publication Date: 2025-12-30CHENGDU UNIV OF INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310746435.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2023-04-23
Filing Date
2023-06-25
Publication Date
2025-12-30
Estimated Expiration
2043-06-25

AI Technical Summary

Technical Problem

Existing technologies have shortcomings in terms of computing resource limitations, instability, incomplete traffic anomaly datasets, and issues with data accuracy and dimensionality, resulting in low efficiency and poor accuracy in traffic anomaly detection, making it difficult to achieve efficient anomaly detection within seconds.

Method used

A traffic anomaly detection method based on graph convolutional neural network autoencoder is adopted. By combining the mirror temporal graph autoencoder MTGAE with the mirror temporal convolutional module MTCM and the graph convolutional gated recurrent module GCGRU CELL, traffic features are extracted and anomalies are predicted. An adaptive method is used to adapt to the features of different road segments for efficient training and detection.

Benefits of technology

It achieves efficient and accurate traffic anomaly detection within a reasonable timeframe, improves computational efficiency, reduces computational resource requirements, adapts to different temporal and spatial complexities, and enhances the reliability and real-time performance of anomaly detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116776269B_ABST
    Figure CN116776269B_ABST
Patent Text Reader

Abstract

The application relates to a traffic anomaly detection method based on a graph convolutional neural network self-encoder, and a one-dimensional convolution and context coding network combining traffic anomaly and deep learning is designed, the network mainly comprises a mirror time domain convolution module and two graph convolution gate cycle modules which are sequentially cascaded, traffic features such as speed and flow are extracted to predict traffic conditions and possible sent anomalies, an adaptive method is used before the mirror time domain convolution module to adapt to different road sections, more features are transmitted into the time convolution module through mirroring, more information is obtained through the time convolution module, the network continuously learns the traffic network, a Gaussian kernel function module is used in the graph convolution gate cycle module, distribution is more concentrated in a high-dimensional space, hidden spatial correlation is captured by using the characteristics of the graph convolution network architecture, possible abnormal point occurrence is captured by combining the graph convolutional neural network, the method is more accurate, and the reliability of the predicted anomaly is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent transportation, and in particular to a traffic anomaly detection method based on a graph neural network autoencoder. Background Technology

[0002] With rapid urbanization and population growth, transportation networks are becoming increasingly complex, leading to a greater need for anomaly detection. Early detection of anomalies, and even prediction of their occurrence, is crucial for preventing serious accidents. Therefore, anomaly detection systems in intelligent transportation are of significant research value, as they can help continuously monitor specific indicators and effectively prevent potential anomalies. Using deep learning to detect anomalies in transportation networks is currently a relatively advanced method. By leveraging unsupervised detection techniques, anomaly detection can be applied to complex transportation networks. Thanks to deep learning-based anomaly detection, even everyday mobile phones can be used to observe whether there are any anomalies ahead.

[0003] Graph convolutional networks primarily address the relationships between data points within each sensor. Through graph convolution, each sensor constantly changes its state due to the influence of its neighbors and more distant sensor points until a final equilibrium is reached; the closer the relationship, the greater the influence of the neighbors. It transforms the graph topology into a Laplacian matrix and then into a spectral graph through spectral decomposition of the Laplacian matrix. Therefore, graph convolution is remarkably effective in predicting the type of a specific node, whether two nodes are related, and the similarity between two (sub)networks. Experiments have demonstrated groundbreaking performance in many deep learning tasks. Furthermore, it is modular, scalable, and possesses stronger generalization capabilities, exploring insights to guide further research.

[0004] Currently, deep learning, effectively combined with traffic network data, has become an effective tool for complex traffic networks. For example, adversarial training can be used to capture different features: recent and long-term trends, and external factors, for use in other traffic dynamics and anomalies. Some scholars have employed spatiotemporal decomposition to address issues caused by location and time changes in urban traffic, as well as anomalies that may occur when dealing with different datasets. Based on the above research, many researchers have also used adversarial networks, long short-term memory, and graph convolutional networks to design for predicting anomalies in traffic networks, which lays the foundation for the research in this invention.

[0005] The shortcomings of existing technical solutions:

[0006] 1. Computing resource limitations

[0007] For current global and regional smart transportation applications, due to limitations in computing resources, it is still difficult to implement high-performance anomaly detection methods in operational settings in the short term. Many methods are limited to time series prediction, and video prediction requires substantial computing resources, which are difficult to calculate within seconds using current computing resources. Therefore, simulations require a significant amount of time, which may cause the invention to miss changes in important transportation networks.

[0008] 2. Instability

[0009] Since anomaly detection has different sensitivities to different datasets, there is no unified parameterization scheme. Therefore, different parameters need to be selected according to the real-time situation, which is undoubtedly unreasonable.

[0010] 3. Traffic Abnormal Restrictions

[0011] Most traffic anomaly datasets are currently incomplete or not publicly available, requiring enterprise-level collaboration. Even publicly available datasets may be obtained through anomaly injection techniques. In actual anomaly detection experiments, anomalies and intersections that may send anomalies can only be identified by hypothetical points. Most anomaly datasets are only accessible to companies like map providers.

[0012] 4. Data accuracy and dimensionality issues

[0013] While deep learning methods have emerged as alternatives to traditional anomaly traffic network prediction, existing datasets lack comprehensive consideration of intersections and various possible traffic routes, resulting in insufficient accuracy. Furthermore, anomaly detection is extremely challenging due to its high dimensionality and sparse data. Even more challenging is how to capture the complex relationships between sensors and detect and interpret anomalies that deviate from these relationships. Summary of the Invention

[0014] To address the shortcomings of existing technologies, this invention proposes a traffic anomaly detection method based on a graph convolutional neural network autoencoder, the method specifically comprising:

[0015] Step 1: Obtain the NYC Taxi dataset and write an anomaly injection script on the server to construct abnormal data. By injecting different anomaly ratios into the dataset, obtain abnormal location datasets for different locations. The data content of the abnormal location dataset is structured text that records the travel information of taxis.

[0016] Step 2: Divide the abnormal location dataset into a training set X and a test set according to a predetermined ratio;

[0017] Step 3: Preprocess the abnormal location dataset to obtain a suitable parameter network structure;

[0018] Step 4: Construct the mirrored temporal graph autoencoder (MTGAE). The preprocessed training set X from Step 3 is fed into the autoencoder network for pre-training to adjust the network parameters. The mirrored temporal graph autoencoder (MTGAE) includes an encoder and a decoder.

[0019] The encoder section includes an adaptive process, a mirrored temporal convolution module, a graph convolution gated loop module, a graph embedding module, and a fully connected module connected in sequence. The mirrored temporal convolution module is used to predict the time in the traffic space-time network, and the graph convolution gated loop module is used to predict the space of the traffic space-time network and to predict outliers.

[0020] The decoder includes bilinear interpolation and a fully connected network for parsing the output of the encoder;

[0021] Step 5: Based on the optimized parameters obtained in Step 4, train the mirror-time graph autoencoder and obtain the optimal weights of the network, specifically including:

[0022] Step 51: Before inputting the original data x in the training set X into the mirror temporal convolution module, obtain road segments of dynamic length through an adaptive operation, and perform adaptation processing on road segments of different lengths;

[0023] Step 52: In the mirrored temporal convolution module, the adapted data is mirrored to obtain x. m After splicing the original data x to obtain twice the features, the hidden features are obtained by convolution through a temporal convolutional network. At the same time, the mirrored and inverted twice the features are converted into the original feature length, thereby obtaining hidden information H with the same dimension as the original data.

[0024] Step 53: Input the hidden information H and the original data x into the first graph convolution gated loop module, and pass them sequentially through the Gaussian kernel module and the graph convolution module to obtain the first spatiotemporal feature. Specifically:

[0025] Step 531: The Gaussian kernel module obtains the hidden anomaly feature g(H) through the input hidden information H. apt The Gaussian module can, to some extent, help to further determine whether the current data is abnormal.

[0026] Step 532: Transfer the hidden anomaly feature g(H) apt Input the graph convolution 1 module and the graph convolution 2 module respectively, and construct the spatial feature variable r through the graph convolution 1 module and the graph convolution 2 module. (t) Output update gate s respectively (t) and reset door z (t)The hidden anomaly feature g(H) apt ) and update gates (t) Connections yield high-level semantic anomaly features The abnormal features With Reset Gate z (t) The input graph convolutional module 3 completes the first spatiotemporal feature extraction, obtaining the first spatiotemporal features.

[0027] Step 54: Transfer the first spatiotemporal features The hidden information H is used as the input to the second graph convolutional gated recurrent module. This module has the same structure as the first graph convolutional gated recurrent module, extracting high-level spatiotemporal semantic features, completing the second higher-level spatiotemporal feature extraction, and finally obtaining the second spatiotemporal features.

[0028] Step 55: Transfer the second spatiotemporal feature The input to the encoder's graph embedding module, which comprises two layers that map integer sequences to low-dimensional vectors and a fully connected layer, takes temporal and spatial information as input. Then, a matrix factorization-based embedding method is used to convert the input into a vector representation, which is then concatenated to obtain the final spatiotemporal embedding vector.

[0029] Step 56: Insert the spatiotemporal embedding vector The decoder is input to a bilinear interpolation module and a fully connected module. The bilinear interpolation module estimates the missing traffic information based on existing data points, and then applies this information to the spatiotemporal embedding vector. Smoothing is performed to analyze the changing trends and anomaly predictions of time-series data. Finally, a fully connected module is used to combine the estimated missing traffic information with the spatiotemporal embedding vector. By combining these methods, we can obtain more accurate prediction results.

[0030] Step 57: Train the network in one iteration using a batch of 256 data points. Continuously update the training network, determine the number of iterations, and if the condition is met, verify and save the model.

[0031] Step 58: Determine if the total number of training iterations has been reached. If the condition is met, end the training; otherwise, return to step 57.

[0032] Step 59: Identify outliers using the loss function. Take the prediction results and test results as input, calculate the difference between them using the loss function, and consider points with large differences as outliers.

[0033] Step 6: Save the parameters of the trained network, input them into the test set for testing, and obtain the test results.

[0034] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0035] 1. While traditional historical prediction models simplify the prediction and detection process, the computation still requires significant computing resources and time. The deep learning model of this invention has more powerful data processing capabilities, producing relatively accurate results within a reasonable timeframe, thus greatly improving computational efficiency while saving substantial resources.

[0036] 2. Traditional traffic anomaly detection networks may exhibit significant sensitivity to varying temporal and spatial complexities. The graph convolutional neural network-based autoencoder of this invention maintains excellent AUC detection capabilities even under disturbances of varying temporal and spatial complexity.

[0037] 3. Traditional traffic anomaly detection requires selecting different parameter schemes based on the dataset (e.g., location). The model of this invention can fit prediction results based on a large dataset, eliminating the need for multiple parameterization schemes. The mirror temporal convolution module (MTCM) can adapt to the current location based on the data distribution.

[0038] 4. Compared to other deep learning methods for detecting traffic anomalies, the method of this invention designs a mirrored temporal convolutional module (MTCM) and a graph convolutional gated recurrent module (GCGRU CELL). By extracting traffic features such as speed and flow, it predicts traffic conditions and potential anomalies. The MTCM previously used an adaptive method to adapt to different road segments by mirroring and feeding more features into the temporal convolutional module. The temporal convolutional module then obtains more information, allowing the network to continuously learn about the traffic network. The GCGRU CELL uses a Gaussian kernel function module to concentrate the distribution in a high-dimensional space. It then utilizes the characteristics of the GRU architecture to capture hidden spatial correlations and combines them with the graph convolutional neural network to capture possible anomaly points, making the prediction more accurate and greatly improving the reliability of anomaly prediction.

[0039] 5. The parameterized model of this invention has been trained, while traditional traffic prediction and detection requires online calculation. Therefore, the parameterized model of this invention provides almost real-time prediction results, making it particularly suitable for short- to medium-term, sudden traffic forecasting in daily life using time series processing. It has the advantages of low cost and rapid response. Attached Figure Description

[0040] Figure 1 This is a schematic diagram of the structure of the mirror time-domain graph autoencoder (MTGAE) of the present invention;

[0041] Figure 2This is a schematic diagram of the structure of the Mirror Temporal Convolutional Module (MTCM) and the Graph Convolution Gated Recurrent Module (GCGRU CELL);

[0042] Figure 3 This is a heatmap of anomalies detected in the NYC Taxi dataset from January 1st to 7th, 2019.

[0043] Figure 4 This is a graph showing the AUC sensitivity of the proposed network mirror time-domain graph autoencoder (MTGAE) to changes in spatial and temporal dimensions.

[0044] Figure 5 This is a schematic diagram of the internal structure of graph convolution proposed in this invention;

[0045] Figure 6 This is a visualization of a portion of the data in the NYC Taxi dataset. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.

[0047] The MTGAE of this invention refers to: Mirror Time Graph Autoencoder.

[0048] The MTCM of this invention refers to the Mirror Time Convolution Module, which is a component of the mirror time-domain graph autoencoder.

[0049] The GCGRU CELL of this invention refers to the Graph Convolution Gate Recurrent UnitCELL, which is a component of the mirrored temporal graph autoencoder.

[0050] To address the shortcomings of existing technologies, this invention proposes a traffic anomaly detection method based on a graph convolutional neural network autoencoder. First, data is fed into a graph convolutional gated recurrent module (GCGRUCELL) and a mirror temporal convolutional module (MTCM). The GCGRUCELL includes a Gaussian kernel module and a spatial feature extraction module (graph convolution). The MTCM includes temporal convolution for mirror processing and event feature extraction. Important features are extracted and specific traffic flow processes are simulated through one-dimensional convolution of the temporal convolution and the graph convolution module. The MTCM allows the network to better learn the traffic network. The GCGRUCELL is used to detect anomalies in the traffic flow process. The Gaussian kernel module in the GCGRUCELL maps the data to a high-dimensional space before passing through the gated recurrent unit architecture. This invention's network model can effectively replace traditional traffic anomaly detection methods. The multiple modules work together to detect anomalies and traffic conditions in the traffic network, better handling the monitoring of speed, flow, and anomalies, while using lower computational costs and shorter processing time.

[0051] The following is a detailed explanation with reference to the accompanying drawings.

[0052] Figure 1 This is a schematic diagram of the structure of the mirrored time-domain graph autoencoder (MTGAE) of the present invention. Figure 1 As shown, the traffic anomaly detection method of the present invention mainly includes:

[0053] Step 1: Obtain the NYC Taxi dataset and write an anomaly injection script on the server. By injecting different anomalies into the dataset, obtain anomaly location datasets for different locations. The data content of the anomaly location dataset is structured text that records the travel information of taxis.

[0054] The NYC Taxi dataset records New York taxi travel information, including the latitude and longitude of the origin and destination, time, number of passengers, fare, etc. Anomaly injection scripts were written on the server to inject different proportions of anomalies into the dataset, thus enriching the anomalous data by varying degrees of contamination of time segments within the dataset. Since actual anomalous data is limited, anomalous data was constructed based on the NYC Taxi data and classic anomaly script methods.

[0055] Step 2: Divide the abnormal location dataset into training and test sets according to a predetermined ratio, such as an 8:2 ratio.

[0056] Step 3: Preprocess the dataset of abnormal locations to obtain the structure of a suitable parameter network.

[0057] Step 4: Construct the mirror temporal graph autoencoder (MTGAE). The training dataset preprocessed in Step 3 is fed into the temporal-space network for pre-training to adjust the network parameters and obtain appropriate network parameters, such as batch size. The mirror temporal graph autoencoder (MTGAE) includes an encoder and a decoder.

[0058] Figure 2 This is a schematic diagram of the structure of the Mirror Temporal Convolution Module (MTCM) and the Graph Convolution Gated Recurrent Module (GCGRU CELL).

[0059] The encoder section includes, in sequence, a connected adaptive process, a mirror temporal convolution module (MTCM), a cascaded graph convolution gated recurrent module (GCGRU CELL), a graph embedding module, and a fully connected module. The mirror temporal convolution module (MTCM) is used to predict the time in the traffic space-time network, while the graph convolution gated recurrent module (GCGRU CELL) is used to predict the space of the traffic space-time network and to predict outliers.

[0060] The decoder includes bilinear interpolation and a fully connected network (Full Connection) for parsing the encoder's output.

[0061] Step 5: Based on the optimized parameters obtained in Step 4, train the traffic spatial-temporal network, and obtain the optimal weights of the network, specifically including:

[0062] Step 51: Before inputting the original data x in the training set x into the mirror temporal convolution module MTCM, obtain the road segments of dynamic length through an adaptive operation and perform adaptation processing on road segments of different lengths.

[0063] Because the lengths of all road segments are inconsistent, in order to adapt to the Mirror Temporal Convolutional Module (MTCM), especially its internal smaller modules, this invention processes the data for different road segments. This allows the temporal convolutional module within the MTCM to receive road segments of dynamically varying lengths. An adaptive operation is performed before data x passes through the MTCM to obtain road segments of dynamically varying lengths. The MTCM includes activation functions and temporal convolutional modules.

[0064] Step 52: In the mirrored temporal convolution module, the adapted original data x is mirrored to obtain x. m After splicing the original features to obtain twice the features, the hidden features are obtained by convolution through a temporal convolutional network. At the same time, the mirrored and inverted twice the features are converted back to the original feature length, thereby obtaining the hidden information H with the original data dimension.

[0065] For example, after mirroring, the feature length becomes 8, while the original feature length is 4.

[0066] Step 53: Input the hidden information H and the original data x into the first graph convolution gated recurrent module GCGRU CELL, and pass them sequentially through the Gaussian kernel module and the graph convolution module in the graph convolution gated recurrent module to obtain the first spatiotemporal feature. Specifically:

[0067] Step 531: The Gaussian kernel module obtains the hidden anomaly feature g(H) through the input hidden information H. apt The Gaussian module can, to some extent, help to further determine whether the current data is abnormal.

[0068] Step 532: Hide the anomaly feature g(H) apt Input the graph convolution 1 module and the graph convolution 2 module respectively, and construct the spatial feature variable r through the graph convolution 1 module and the graph convolution 2 module. (t) Output update gate s respectively (t) and reset door z (t) ; Hide the abnormal features g(H) apt ) and update gates (t) Connections yield high-level semantic anomaly features abnormal features With Reset Gate z (t) The input graph convolutional module 3 completes the first spatiotemporal feature extraction, obtaining the first spatiotemporal features.

[0069] abnormal features and reset door z (t) The input graph convolution 3 module can effectively extract spatiotemporal features and detect anomalies, enabling the graph convolution gated loop module to extract temporal and spatial features.

[0070] The first graph convolution gated recurrent module, GCGRU CELL, takes the hidden information H obtained in step 42 as input, which helps to identify anomalies with large discrepancies between the reconstructed prediction and the test data.

[0071] Step 54: The first spatiotemporal features The hidden information H is used as the input to the second graph convolutional gated recurrent module. This module has the same structure as the first graph convolutional gated recurrent module, extracting high-level spatiotemporal semantic features, completing the second, higher-level spatiotemporal feature extraction, and finally obtaining the features.

[0072] Step 55: Feature The input graph embedding module contains two layers that map integer sequences to low-dimensional vectors and a fully connected layer. It takes temporal and spatial information as input, then uses a matrix factorization-based embedding method to convert them into vector representations, and concatenates them to obtain the final spatiotemporal embedding vector.

[0073] The graph embedding module can effectively capture spatiotemporal information, thereby enabling more accurate and efficient spatiotemporal prediction.

[0074] In this invention, time information refers to the partial time data in the NYC Taxi dataset that includes the 7 days of the week and the 24 hours of the day. This is why the graph embedding in this invention uses two layers that map integer sequences to low-dimensional vectors.

[0075] In this invention, spatial information refers to the location information of roads, intersections, etc., in the NYC Taxi dataset. Finally, the node feature vectors obtained after graph embedding are mapped to a higher-dimensional space through a fully connected layer for more complex calculations and anomaly prediction. The fully connected layer in this invention processes both temporal and spatial information simultaneously, resulting in more accurate traffic prediction results. Figure 1 In This concludes the section on the encoder.

[0076] Step 56: Spatiotemporal embedding vector The data is fed into a decoder, which contains a bilinear interpolation module and a fully connected module. The bilinear interpolation module estimates potentially missing traffic information, such as roads and intersections, based on existing data points, and then processes the spatiotemporal embedding vector. Smoothing is performed to analyze the changing trends and anomaly predictions of time-series data. Finally, the estimated missing traffic information is combined with the spatiotemporal embedding vector through a fully connected layer. By combining these methods, we can obtain more accurate prediction results.

[0077] The features obtained from the encoder are fed into a module of the decoder: bilinear interpolation. Based on the current road segment, the present invention performs road segment adaptation on the bilinear interpolation, so that the module of the present invention can be effective for different road segments. In bilinear interpolation, unknown features can be predicted through the current features, which on the one hand expands the possible anomalies, and on the other hand makes up for the necessary information lost in the lost traffic network.

[0078] The features obtained by bilinear interpolation are passed into the final fully connected module. Here, the invention also decodes the time steps performed by the fully connected layer in the encoder, so that the input to the fully connected module and subsequent input to this module can identify and ensure that there are no abnormal points.

[0079] Step 57: Train the network in one iteration using a batch of 256 data points. Continuously update the training network, determine the number of iterations, and if the condition is met, verify and save the model.

[0080] Step 58: Determine if the total number of training iterations has been reached. If the condition is met, end the training; otherwise, return to step 57.

[0081] Step 59: Identify outliers using a loss function. Using the prediction and test results as input, calculate the difference between them using a specific loss function, and identify points with significant differences as outliers.

[0082] Step 6: Save the parameters of the trained network, input them into the test set for testing, and obtain the test results.

[0083] To more fully demonstrate the effectiveness of the method of this invention, it is compared with existing technical methods. The quantitative evaluation indicators used include: Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and Area Under the ROC Curve (AUC). AUC refers to the correlation between the true and predicted values; its value ranges from 0 to 1, with a higher score indicating more accurate predictions. MAE represents the average distance between the predicted and true values, with the same units as the original data; a smaller MAE indicates better predictive ability of the model. RMSE places greater emphasis on the existence of large errors than MAE; a smaller RMSE indicates better predictive ability of the model.

[0084] Figure 5 This is a schematic diagram of the internal structure of the graph convolution proposed in this invention. Unlike traditional graph convolutional neural networks, which only use... Figure 5 The upper part has a head neighbor structure, and this invention not only uses the upper part of the head neighbor structure, but also spreads to the surrounding neighbor nodes of the child nodes through its child nodes, and the lower part has a child neighbor structure, thus extending the graph convolutional neural network to a higher order. Figure 6 This demonstrates the difficulty of processing the data in the NYC Taxi dataset. The data is scattered across different driving routes, some of which may lack continuity. The values ​​for distances between two points are lower, while the values ​​for distances between two points are higher, resulting in an overall sparse matrix. In this matrix pattern, using a Laplace matrix is ​​a reasonable approach. This invention also extends the experiment based on this, and the modules based on this experiment constitute this invention.

[0085] To verify the effectiveness of the mirrored temporal graph autoencoder MTGAE, Table 1 compares it with several newer existing methods, specifically Hierarchical Adaptive Method (HA), Recursive Classification Tree (RTC), Autoencoder Method (AE), Encoder-Decoder Autoencoder Anomaly Detection Method (EncDec-AD), Restricted Boltzmann Machine Method (REBM), Deep Autoencoder Gaussian Mixture Model Method (DAGMM), Graph Neighbor Aggregation Method (GraphSAGE), Graph Convolutional Network Method (GCN), and Conditional Graph Autoencoder Method (Con-GAE). Quantitative comparisons were performed on the same test dataset. The mirrored temporal graph autoencoder MTGAE is the result of this invention.

[0086] Tables 1 and 2 show the experimental results of the MTGAE proposed in this invention and existing state-of-the-art methods. It is evident that the method of this invention achieves the highest AUC at different anomaly injection values ​​α and β. This implies that the model of this invention has higher accuracy and is closer to the observed values.

[0087] Table 1. Quantitative comparison of different methods in terms of the anomaly ratio γ

[0088]

[0089] Table 2 Quantitative comparison of different methods at different abnormal injection values ​​α and β

[0090]

[0091] Specifically, compared to the existing relatively good conditional graph autoencoder method Con-GAE, under fixed α and β conditions, different outlier ratios γ are generally improved by 10%. MTGAE, with different outlier injection ratios α and β, shows improvements of 52.8%, 24.5%, 1.5%, 39%, 9.2%, and 0 respectively in AUC, indicating virtually no room for further improvement. The largest improvement is seen at low outlier injection ratios, such as β at 5%, with a 52.8% improvement. This demonstrates that the autoencoder graph convolutional network of this invention can effectively identify outliers in complex traffic conditions. Furthermore, it is noteworthy that the improvement in AUC of this invention is more significant than that of the conditional graph autoencoder (Con-GAE). All of these indicate that this invention has a more significant advantage in outlier identification in traffic networks, better reflecting real-world traffic speed and flow changes and outlier locations.

[0092] Tables 1 and 2 show the average results of different model experiments. The last row shows that MTGAE achieved the best performance among all evaluation metrics under different quantitative indicators (α, β, γ). All these statements indicate that the MTGAE of this invention has better binary classification ability.

[0093] Table 3 presents the ablation experiments of this invention, specifically the ablation experiments on Mean Absolute Error (MAE) and Root Mean Square Error (RMSE) to verify the effectiveness of the modules in this invention: the Mirror Temporal Convolutional Module (MTCM) and the Graph Convolution Gated Recurrent Module (GCGRU CELL). It can be seen that the following ablation experiments were conducted: replacing the Generative Adversarial Neural Network (MTGAE-gan), using only temporal convolution without mirroring (MTGAE-ot), adding mirroring to temporal convolution (MTGAE-mt), changing the gated recurrent unit architecture to Long Short-Term Memory (MTGAE-1stm), adding a gated recurrent unit to temporal convolution with mirroring, changing the TransFormer architecture (MTGAE-TransFormer), and replacing the Gaussian kernel module after graph embedding in the GCGRU CELL (MTGAE-gb). It can be observed that MTGAE-TransFormer performs somewhat worse, while the model of this invention achieves better results. This further demonstrates that the Mirror Temporal Convolutional Module (MTCM) and the Graph Convolution Gated Recurrent Module (GCGRU CELL) designed in this invention make a significant contribution to the anomaly detection process. Specifically, when the mirrored temporal convolutional module MTCM and the graph convolutional gated recurrent module GCGRU CELL are removed, it means that there is a certain loss in the spatial simulation and prediction of speed and flow. The pre-Gaussian kernel processing of the graph convolutional gated recurrent module GCGRU CELL can effectively provide anomaly detection capabilities. In addition, the feature extraction in the latent space by the gated recurrent unit architecture is also excellent. If this is lost or replaced by other frameworks, it will not be acceptable. Furthermore, it can be seen that the ability of using the gated recurrent unit (MTGAE-grumt) on the basis of adding mirroring to the temporal convolution is significantly greater than that of replacing the gated recurrent unit architecture with Long Short-Term Memory (MTGAE-1stm). The lower the evaluation index, the better, indicating the effectiveness of the gated recurrent unit architecture used in this invention. It can be concluded that the short-term interactions in the traffic network are more critical than the long-term effects. Experimental results verify that the MTCM and GCGRU CELL modules of this invention can enhance the model's ability to analyze traffic prediction and anomaly detection.

[0094] Table 3 Ablation experiments of the present invention in terms of MAE and RMSE

[0095]

[0096] Figure 3This is the result of real-world predictions based on the NYC Taxi dataset. The horizontal axis represents time from 0:00 to 23:00, and the vertical axis represents the date. The intensity of the scale on the right indicates the probability of traffic flow anomalies; darker colors indicate a higher probability of anomalies, and vice versa. It can be seen that on New Year's Day, January 1st, and January 4th, 2019, the probability of anomalies was higher between 5 PM and 12 PM on January 1st and between 10 AM and 5 PM on January 4th, demonstrating that this invention has a strong anomaly detection capability in the real world. Figure 4 This is a graph showing the AUC sensitivity changes of the proposed network mirrored temporal graph autoencoder (MTGAE) to altered spatial and temporal dimensions. Figure 4 As can be seen, the sensitivity of the model in this invention is affected by changes in AUC when different node embeddings and temporal embeddings are applied. In node embedding, this invention uses a fixed temporal embedding. Then, the node embedding parameters are changed from 25 to 200, with the granularity set to 25. The temporal embedding is also kept at a granularity of 25. It can be seen that the AUC capability of this invention remains between 0.92 and 1. Even when the temporal embedding is changed from 25 to 200 with a fixed node embedding, the model still maintains a granularity between 0.9 and 1, indicating that large-scale changes do not alter the processing capability of the model, demonstrating good robustness to sensitivity within a certain range.

[0097] It should be noted that the specific embodiments described above are exemplary, and those skilled in the art can devise various solutions inspired by the disclosure of this invention. These solutions all fall within the scope of this invention and its protection. Those skilled in the art should understand that this specification and its accompanying drawings are illustrative and not intended to limit the scope of the claims. The scope of protection of this invention is defined by the claims and their equivalents.

Claims

1.A traffic anomaly detection method based on a graph convolutional neural network autoencoder, characterized in that, The method specifically comprises: Step 1: Obtain the NYC Taxi dataset, and write an exception injection script on a server to construct exception data, obtain different position exception position datasets by injecting different exception proportions into the dataset, and the data content of the exception position dataset is structured text, recording the passing information of a taxi; Step 2: Divide the exception position dataset into a training set X and a test set according to an agreed proportion; Step 3: Preprocess the exception position dataset to obtain a structure suitable for a parameter network; Step 4: Construct a mirror time domain graph autoencoder, and input the training set X preprocessed in step 3 into the autoencoder network for pretraining to adjust network parameters, the mirror time domain graph autoencoder comprising an encoder and a decoder: The encoder part comprises an adaptive process, a mirror time domain convolution module, a graph convolution gate recurrent module, a graph embedding module and a full connection module connected in sequence, wherein the mirror time domain convolution module is used to predict time in a traffic space-time network, and the graph convolution gate recurrent module is used to predict space of the traffic space-time network and predict an abnormal point; The decoder comprises a bilinear interpolation and a full connection network, and is used to analyze an output result of the encoder; Step 5: Obtain optimal weights of the network based on the mirror time domain graph autoencoder trained by the optimized parameters obtained in step 4, specifically comprising: Step 51: Before inputting original data x in the training set X into the mirror time domain convolution module MTCM, a dynamic length road section is obtained through an adaptive operation, and different length road sections are adaptively processed; Step 52: in the mirror time domain convolution module, the adapted data is mirror flipped to obtain x m and splicing the original data x to obtain 2 times the feature, and then performing convolution through the time convolution network to obtain hidden features, and converting the 2 times features after mirror inversion to the original feature length, so as to obtain hidden information H with the same dimension as the original data. Step 53: input the hidden information H and the original data x into the first graph convolution gate loop module, sequentially pass through the Gaussian kernel module and the graph convolution module in the graph convolution gate loop module, and obtain the first spatiotemporal feature Specifically: Step 531: the Gaussian kernel module obtains hidden abnormal features g(H apt ) by inputting hidden information H; the Gaussian module can help to further determine whether the current is abnormal data to some extent; Step 532: input the hidden abnormal feature g(H apt ) into a graph convolution 1 module and a graph convolution 2 module respectively, construct a spatial feature variable r (t) through the graph convolution 1 module and the graph convolution 2 module, and output an update gate s (t) and a reset gate z (t) respectively; connect the hidden abnormal feature g(H apt ) and the update gate s (t) to obtain a high-level semantic abnormal feature ; input the abnormal feature and the reset gate z (t) into a graph convolution 3 module to complete the first spatiotemporal feature extraction and obtain a first spatiotemporal feature Step 54: taking the first spatio-temporal feature and the hidden information H as the input of the second graph convolutional gated recurrent module, the module has the same structure as the first graph convolutional gated recurrent module, extracts high-level spatio-temporal feature semantics, completes the second higher-level spatio-temporal feature extraction, and finally obtains the second spatio-temporal feature Step 55: the second spatio-temporal features The graph embedding module of the input encoder includes two layers that map integer sequences to low-dimensional vectors and a fully connected layer, taking temporal information and spatial information as input, then using a matrix decomposition-based embedding method to convert the input into a vector representation, and splicing together to obtain the final spatio-temporal embedding vector Step 56: inputting the spatio-temporal embedding vector into a decoder, the decoder comprising a bilinear interpolation module and a fully connected module The bilinear interpolation module estimates the missing traffic information according to the existing data points, and then smoothes the spatio-temporal embedding vector to analyze the change trend and abnormal prediction of the time series data, and finally combines the estimated missing traffic information with the spatio-temporal embedding vector through the fully connected module, so as to obtain more accurate prediction results; Step 57: A batch size equal to 256 is used as an iteration training network, the training network is updated constantly, the number of iterations is judged, the model is verified and the model is saved when the condition is met; Step 58: Determine whether the total number of training iterations is reached, if the condition is met, end the training, otherwise return to step 57; Step 59: Determine the abnormal point by a loss function, take the prediction result and the test result as input, calculate the difference between them by the loss function, and regard the point with larger difference as an abnormal point; Step 6: Save the parameters of the trained network, input the test set for testing, and obtain a test result.