In response to the issues faced by the traditional Firefly Algorithm (FA), par-ticularly its tendency to become trapped in local optima and slow conver-gence during the global optimization process, especially for high-dimensional optimization problems, an improved version of the algorithm is proposed-Diverse Swarm Firefly Algorithm (DSFA). Enhancements to the algorithm are twofold: firstly, a new adaptive randomization parameter strat-egy is designed to meet the search requirements at different stages; secondly, a novel random search mechanism is introduced to enhance the diversity and quality of solutions during the iterative process. To validate the effectiveness of DSFA, simulation experiments were conducted on eight widely recog-nized benchmark test functions. The experimental results demonstrate that, compared to traditional intelligent optimization algorithms and another ver-sion of the improved Firefly Algorithm, DSFA exhibits significant ad-vantages in both convergence speed and solution precision.