In order to estimate the traffic arrival rate and service rate parameters of primary users in cognitive radio networks,a hidden Markov model estimation algorithm( HMM-EA) is proposed,which can provide better estimation performance than the energy detection estimation algorithm( ED-EA). Firstly,spectrum usage behaviors of primary users are described by establishing a preemptive priority queue model,by which a real state transition probability matrix is derived. Secondly,cooperative detection is utilized to detect the real state of primary users and emission matrix is derived by considering both detection and false alarm probability. Then,a hidden Markov model is built based on the previous two steps,and evaluated through the forward-backward algorithm. Finally,the simulations results verify that the HMM-EA algorithm outperforms the ED-EA in terms of convergence performance,and therefore the secondary user is able to access the unused channel with the least busy probability in real time.