This article discusses the use of particle swarm optimization (PSO) to optimize the initial weights and thresholds of a BP neural network for underground engineering safety monitoring. The integration of cloud computing, web technology, and numerical simulation allows for convenient and accurate analysis of surrounding rock parameters. The program was successfully applied to the Shuangjiangkou Hydropower Station and showed high accuracy in back-analyzing parameters.