Due to various uncontrollable factors (such as random faulty acquisition equipment and data distortion), urban traffic flow data inevitably suffers from some form of data loss. Finding an effective filling method to estimate the missing data is of great help to the study of transportation networks. Traffic flow during a day are likely to have its regular peak period and off-peak period. For most regions of the urban road network, normally there is a certain trend in the traffic flow data. In this paper, we propose a data imputation method that employs a tensor decomposition approach, which fully considers the characteristics of the traffic flow in both time and space. The proposed method is based on high order singular value decomposition with soft thresholding core. In this method, traffic data are divided into its main trend part and the residual part, which is called detrending. And tensor decomposition is performed on these two parts separately. For each part, dynamic rank method is used to adjust the rank of tensor decomposition. With the actual 214 anonymous road segments with 10 minutes interval data in Guangdong, China, the highway data with 15 minutes interval in Madrid, Spain, and the traffic flow data from PeMS with 5 minutes interval in California, USA. The results of the different models are discussed in the case of continuous data missing and random data missing by different time intervals. In addition, by comparing with other data imputation methods, our method can fill the missing data with better performance. INDEX TERMS Detrending, incomplete data filling, singular value decomposition, tensor decomposition. CHUANFEI GONG received the B.S. degree in computer science from Tongji University, Shanghai, China, in 2017, where he is currently pursuing the master' degree with the Key Laboratory of Embedded System and Service Computing, and the Department of Computer Science. His research interests include intelligent transportation systems and data mining.