Traffic congestion remains a significant challenge in urban management, with traditional fixed-cycle traffic signal systems struggling to adapt to dynamic traffic conditions. This paper proposes an adaptive traffic signal control method based on a Graph Neural Network (GNN) and a dynamic entropy-constrained Soft Actor–Critic (DESAC) algorithm. The approach first extracts both global and local features of the traffic network using GNN and then utilizes the DESAC algorithm to optimize traffic signal control at both single and multi-intersection levels. Finally, a simulation environment is established on the CityFlow platform to evaluate the proposed method’s performance through experiments involving single and twelve intersection scenarios. Simulation results on the CityFlow platform demonstrate that G-DESAC significantly improves traffic flow, reduces delays and queue lengths, and enhances intersection capacity compared to other algorithms. In single intersection scenarios, G-DESAC achieves a higher reward, reduced total delay time, minimized queue lengths, and improved throughput. In multi-intersection scenarios, G-DESAC maintains high rewards with stable and efficient optimization, outperforming DQN, SAC, Max-Pressure, and DDPG. This research highlights the potential of deep reinforcement learning (DRL) in urban traffic management and positions G-DESAC as a robust solution for practical traffic signal control applications, offering substantial improvements in traffic efficiency and congestion mitigation.
The core idea of prediction-based anomaly detection is to identify anomalies by constructing a prediction model and comparing predicted and observed values. However, most existing traffic flow prediction models primarily focus on spatio-temporal features, neglecting comprehensive frequency-domain feature learning. Additionally, anomaly detection accuracy is often limited by insufficient prediction error analysis. To address this limitation, this paper proposes a prediction-based anomaly detection method for traffic flow data with multi-domain feature extraction. The prediction model is built as follows: first, Bidirectional Long Short-Term Memory network (Bi-LSTM) and a Graph Attention Network (GAT) extract temporal and spatial features, respectively. Then, Fast Fourier Transform (FFT) converts time-domain signals into the frequency domain, where Transformer learns magnitude and phase features. Finally, a prediction model is constructed using the extracted time-domain and frequency-domain features. For error analysis, this paper innovatively applies Chebyshev’s inequality to determine the error threshold, identifying anomalies based on whether errors exceed this threshold. Experimental results show that integrating multi-domain features can more comprehensively capture data characteristics and improve model prediction accuracy. In the anomaly detection experiment, it was verified that constructing a high-accuracy prediction model and conducting reasonable error analysis can effectively enable anomaly detection in the data.