AbstractReal‐time and accurate short‐term traffic flow prediction can provide a scientific basis for decision making by travellers and traffic management, and alleviate traffic congestion to a certain extent. The existing traffic flow prediction methods often encounter limitations in real‐time performance and accuracy due to the post‐processing required to rectify anomaly detection results during data pre‐processing. This paper presents a novel traffic flow prediction model, termed the With‐Anomaly Detection Probability (ADP) Attention‐Bidirectional Long‐Short Term Memory (BiLSTM) model. This model takes the probability of anomaly detection into consideration, integrating the anomaly detection outcomes as an inherent parameter into the traffic flow prediction framework. Additionally, the model incorporates an attention mechanism within the long‐short term memory network. Through a comprehensive simulation study utilizing actual measured traffic flow data from the Shanghai‐Chongqing Expressway, the effectiveness of the proposed model is rigorously evaluated. The prediction results show that the model proposed in this paper is a real‐time and accurate short‐time traffic flow prediction model compared with the basic models.