Real-time traffic flow prediction can not only provide travelers with reliable traffic information so that it can save people's time, but also assist the traffic management agency to manage traffic system. It can greatly improve the efficiency of the transportation system. Traditional traffic flow prediction approaches usually need a large amount of data but still give poor performances. With the development of deep learning, researchers begin to pay attention to artificial neural networks (ANNs) such as RNN and LSTM. However, these ANNs are very time-consuming. In our research, we improve the Deep Residual Network and build a dynamic model which previous researchers hardly use. We firstly integrate the input and output of the $i^{th}$ layer to the input of the $i+1^{th}$ layer and prove that each layer will fit a simpler function so that the error rate will be much smaller. Then, we use the concept of online learning in our model to update pre-trained model during prediction. Our result shows that our model has higher accuracy than some state-of-the-art models. In addition, our dynamic model can perform better in practical applications.