For effectively solving human behavior recognition in video surveillance, a novel behavior recognition model is presented. New behaviors may be produced in the process of human motion, hierarchical Dirichlet process is used to cluster monitored feature data of human body to decide whether unknown behaviors occur or not. The infinite hidden Markov model is used to learn unknown behavior patterns with supervised method, and then update the knowledge base. When knowledge base reaches a certain scale, the system can analyze human behaviors with unsupervised method. The Viterbi decoding algorithm of HMM is adopted to analyze current behavior of the human motion. The simulation experiments show that this method has unique advantage over others.