Congestion in the world's traffic systems is a major issue that has far-reaching repercussions, including wasted time and money due to longer commutes and more frequent stops for gas. Modern scholarly challenges arise alongside chances to greatly enhance traffic prediction made possible by the integration of modern technologies into transportation systems. Various techniques have been utilized for the purpose of traffic flow prediction, including statistical, machine learning, and deep neural networks. In this paper, deep neural network architecture based on long short term memory (LSTM), bi-directional version, and gated recurrent units (GRUs) layers have been structured to build the deep neural network, in order to predict the performance of the traffic flow in four distinct junctions which has a great impact on the Internet of vehicles' applications. The structure comprised of sixteen-layers, five of them are GRU-layers and one bi-directional LSTM-layer. The dataset employed in this work involved four congested junctions. The dataset extended from the first of November 2016 to 30th of June 2017. Cleaning and preprocessing operations were achieved on the dataset before feeding it to the designed deep neural network of this paper. Results show that the suggested method produced a comparable performance with respect to state-of-the art approaches.