Cloud enterprises are currently facing difficulties managing the enormous amount of data and varied resources in the cloud because of the explosive expansion of the cloud computing system with numerous clients, ranging from small business owners to large corporations. Cloud computing’s performance may need more effective resource planning. Resources must be distributed equally among all relevant stakeholders to maintain the group’s profit and the satisfaction of its consumers. Since these essential resources are unavailable on the board, a client request cannot be put on hold forever. To address these issues, a hybrid machine learning technique for resource allocation security with effective task scheduling in cloud computing is proposed in this study. Initially, a short scheduler for tasks built around the enhanced Particle Swarm Optimization algorithm (IPSO-TS) reduces make-span time and increases throughput. Next, bandwidth and resource load are included in a Graph Attention Neural Network (GANN) for effective resource allocation under various design limitations. Finally, NSUPREME, a simple identification technique, is suggested for the encryption process to secure data storage. The proposed method is finally simulated using various simulation settings to demonstrate its effectiveness, and the outcomes are contrasted with those of cutting-edge approaches. The findings indicate that the suggested plan is more efficient than the current one regarding resource use, power usage, responsiveness, etc.