In the complex Internet of Things (IoT) environment, a plethora of IoT services with akin functions but varying qualities of service exist. To meet diverse customer needs and drive widespread application, service composition optimization becomes crucial. In the current era of rapid development in artificial intelligence, intelligent algorithms play a significant role in optimizing service composition. However, algorithms applied to IoT service composition optimization face common challenges of low search efficiency and insufficient optimization precision, including the Shuffled Frog Leaping Algorithm (SFLA) and Genetic Algorithm (GA). Therefore, this study seeks to enhance the perception of service quality in IoT service composition. It proposes an improved SFLA (ISFLA) based on the original SFLA. The algorithm integrates chaos theory and reverse learning theory for the acquisition of the initial population. It utilizes Euclidean distance to partition the population into groups and employs Gaussian mutation to optimize the optimal individual of each group. Finally, the entire population undergoes evolution through a local update method based on two strategies. Simulated experiments were conducted to search for optimal IoT service composition solutions of different scales. The results indicate that, compared to the SFLA, GA, ISFLA*, IGSFLA and SFLAGA, ISFLA achieves superior fitness values, better composition solutions, and exhibits faster convergence, higher stability, and greater overall operational efficiency.