In order to establish a linear traffic flow data mining algorithm, which is easy to be implemented, and build a more precise dynamical model of traffic flow on segment, a new traffic flow data mining algorithm was proposed by exploring the streaming features and the spatial-temporal features of the traffic flow data. Spatial-temporal sliding window was applied to reduce the complexity of the algorithm both on spatial and temporal factors. Clusters with similar characteristics were partitioned, in which the PCA method was used to exclude those uncritical variables. The final patterns of interesting was expressed by the multi-variable linear regression equation in different time periods. The experimental results showed that the new algorithm is extremely efficient, reliable and accurate. The established model is dynamic in essence. The experimental results showed that the fitting accuracy is higher and the mean absolute error between fitted and standard value is less than 9 seconds, the mean relative error is less than 5%, the model has a high degree of accuracy above 90%.