On the basis of the shortcoming of the existed algorithm, this paper probes into sliding windows pattern and introduces an efficient algorithm for data mining frequent pattern over sliding windows. A PSW-tree pattern is set in the algorithm to store frequent and critical pattern in data mining. On this basis, the paper presents a rapid mining algorithmPSW algorithm. In the experiment IBM data generator is used to produce generated data, which proves the validity and better space efficiency of the algorithm.