Abstract: Along with the construction of intelligent city accelerates, the popularity of wireless intelligent device, the data we can collected increase exponentially. In terms of Intelligent tunnel, this study collects the noise pollution of real-time data, by comparing the advantages and disadvantages between the traditional clustering k-means algorithm and traditional Clara clustering algorithm and proposes a cleaning for improved data optimization algorithm based on randperm function, called RICA, in order to improve accuracy and reduce the running time as the first target. Random functions of the algorithm proposed is effective for tunnel internal moment change circulation of large amount of data to make corresponding changes. The experimental results show that among the same set of data, the algorithm has shortened the time ,increased the cyber average phase and accuracy effectively, so that it is a reliable and improved method for data processing.