With the development of wireless communication technology, the requirement for data rate is growing rapidly. Mobile communication system faces the problem of shortage of spectrum resources. Cognitive radio technology allows secondary users to use the frequencies authorized to the primary user with the permission of the primary user, which can effectively improve the utilization of spectrum resources. In this article, we establish a cognitive network model based on underlay model and propose a cognitive network resource allocation algorithm based on DDQN (Double Deep Q Network). The algorithm jointly optimizes the spectrum efficiency of the cognitive network and QoE (Quality of Experience) of cognitive users through channel selection and power control of the cognitive users. Simulation results show that proposed algorithm can effectively improve the spectral efficiency and QoE. Compared with Q-learning and DQN, this algorithm can converge faster and obtain higher spectral efficiency and QoE. The algorithm shows a more stable and efficient performance.