With the diversification of the means of network attacks, network security has been increasingly emphasized. This paper carries out an in-depth study of power IoT network security situational awareness, anomalous data assessment and machine learning related technologies, proposes a GA-LightGBM network security situational awareness method based on PRF-RFECV feature optimization, constructs an anomalous data prediction model for power IoT network, IPSO-BiLSTM, and conducts experimental validation of the model effectiveness. The results show that the mean square error MSE is reduced from 0.0033 to 0.0024, the coefficient of determination R² is increased from 0.8943 to 0.9232, and the accuracy rate is increased by 3.8 percentage points compared with the unoptimized LightGBM posture assessment model, proving that the accuracy rate based on the PRF-RFECV-GA-LightGBM network security situational awareness methodology IPSO-BiLSTM. RFECV-GA-LightGBM network security posture assessment model has high accuracy and low error. Meanwhile, compared with other benchmark models, the results predicted using the IPSO-BiLSTM model have higher accuracy and lower error rate, which verifies that the model proposed in this paper is more applicable to the increasingly complex network environment.