A novel algorithm for the similarity search in time series database is proposed. Considering the neural network's poor capability when handling with time change process sequence, the original data is mapped into the feature pattern space by means of discrete cosine transform (DCT) for dimensionality reduction. By analyzing the advantages when the artificial neural network is used as similarity measurement model, the all-pairs query algorithm is presented based on SOFM neural network. For this experiment we examined the real flight data, the simulation result shows the proposed method is correct, and it has multi-scale feature and can reflect different similar patterns of time series under the various resolution.