A fuzzy cloud resource scheduling model with time-cost constraints is built using fuzzy triangular numbers to represent uncertain task execution time. Task scheduling reduces total time and cost spent on a project. It connects virtual machines and functions. Particle swarm optimization (HPO) is used to plan cloud resources (HSOA). The approach uses orthogonal particle swarm initialization to increase the quality of the initial particle exploration, rerandomization to regulate the particle search range, and real-time updating of inertia weights to control particle speed. The suggested problem model and optimization approach are evaluated using random simulation data provided by the CloudSim simulation platform. Less overall execution time and a lower cost are shown to have fast convergence and solution capabilities in experiments.