Accurate traffic flow prediction can improve urban commuting efficiency, but how to effectively mine the spatio-temporal characteristics of traffic data is the biggest challenge. Therefore, this paper proposes a spatio-temporal convolution method, which can effectively extract the traffic dynamic correlation of different road nodes, and reconstruct the road network by cosine similarity principle. This principle can reflect the similar situation of traffic change trend of two road nodes in the past period of time. In order to sample the time-dependent features of road nodes, this study uses a time-dependent convolutional network, which has the ability to extract sequence time-dependent features from longer data.