In this paper, we present a cognitive biology based mining algorithm, whose main idea is to stimulate the evolution and immunity phenomena in nature. Firstly, we reviewed existing algorithms for mining time-series data as well as introduced application of immunity in data mining. Secondly, after dividing time into different intervals by using the self-adaptation of evolution and immunity, we discussed the consistency and compatibility between mining time-series data and evolution as well as immunity, and presented some definitions of cognitive biology. Thirdly, aiming at real-time mining process, and based on immunity memory principle, we explained how to store discovered time-series pattern using proper code. And these kinds of discovered pattern are used as initial population. When new pattern discovered, we regard it as antigen, and look on users and domain knowledge as vaccine. Then based on double bases cooperating mechanism proposed by Bingru Yang, we designed a new algorithm for mining time-series pattern. Fourthly.. the results of the algorithm running in real-world database show that it performs good self-adaptation and the efficiency is improved. Fifthly, we hope the algorithm can also fit for large distributed data mining.