The progress of science and technology and the expansion of the Internet of Things make the information transmission between communication infrastructure and wireless sensors become more and more convenient. For the power-limited wireless sensors, the life time can be extended through the energy-harvesting technique. Additionally, wireless sensors can use the unauthored spectrum resource to complete certain information transmission tasks based on cognitive radio. Harvesting enough energy from the environments, the wireless sensors, works as the second users (SUs) can lease spectrum resource from the primary user (PU) to finish their task and bring additional transmission cost to themselves. To minimize the overall cost of SUs and to maximize the spectrum profit of the PU during the information transmission period, we formulated a differential game model to solve the resource allocation problem in the cognitive radio wireless sensor networks with energy harvesting, considering the SUs as the game players. By solving the proposed resource allocation game model, we found the open loop Nash equilibrium solutions and feedback Nash equilibrium solutions for all SUs as the optimal control strategies. Ultimately, series numerical simulation experiments have been made to demonstrate the rationality and effectiveness of the game model. [ABSTRACT FROM AUTHOR]