The document discusses the resource optimization scheduling and allocation for a hierarchical distributed cloud service system in smart cities, focusing on the implementation of a 5G network. It introduces an algorithm based on particle swarm optimization (PSO) to enhance resource efficiency and task completion times in multi-node environments. The experimental results indicate that the PSO-based approach outperforms traditional methods in terms of energy consumption and task completion speed.