In the case of limited endurance of unmanned aerial vehicles (UAVs), in order to further improve UAV data collection efficiency, this paper puts forward EDC-UAVIIoT: an enhanced energy-efficient data collection optimization algorithm for UAV swarm in the intelligent Internet of Things. First of all, the algorithm optimizes the UAV cruise path through the intelligent Internet of Things routing mechanism, avoids the occurrence of data errors in the packet transmission process, and uses the end-to-end transmission error probability model. The error probability of data packets in the transmission process is calculated to improve the efficiency of data collection tasks and data throughput. Secondly, considering the relationship between energy harvesting and energy consumption balance, this paper uses semi-definite programming and a convex approximation algorithm to transform the non-convex optimization problem into a convex optimization problem and realize the mapping relationship between the UAV cluster node and the target node coordinates, which reduces the computational complexity. Finally, the simulation results show that the EDC-UAVIIoT algorithm is compared with other algorithms in network energy consumption, running time, network delay, and network throughput. The numerical values are increased by 7.03%, 10.16%, 12.39%, and 8.82%, respectively, thus verifying the effectiveness and stability of the proposed EDC-UAVIIoT algorithm.