In the era of the Internet of Everything, various wireless devices and sensors use spectrum, which is a precious and non-renewable resource, to communication. Due to the characteristics of massive, heterogeneous, and multi-source, the generated multi-source data stream brings diffiffifficulties to spectrum cognition. As a result, unreasonable spectrum allocation strategy leads to low utilization of spectrum resources. Optimizing spectrum allocation strategy can effffectively improve spectrum utilization. Aiming at the problem of trapped local optimum solution in the genetic algorithm(GA) and particle swarm optimization algorithm(PSO), an improved monarch butterflfly algorithm is proposed. Firstly,this paper employs the simulated annealing algorithm to select the migration rate, which increases the diversity of monarch butterflfly population. Secondly, chaos mapping algorithm is utilized to improve the optimization ability and convergence speed. Finally, for the non-renewal mechanism of monarch butterflfly algorithrm, the wandering behavior of wolf pack algorithm is introduced to update the population and improve the population diversity. The experimental results show that the improved monarch butterflfly algorithm outperforms the other two algorithms in terms of convergence speed and system revenue.