Under the “double carbon” policy, it is time to build a new green and safe power system. Special attention should be paid to the low accuracy in short-term power load prediction. Therefore, this paper presents a technique for anticipating short-term power demand based on a bidirectional long short-term memory network with a whale-optimized attention mechanism (WOA-BiLSTM-Attention), which is used to forecast and analyze the measured power values in a certain area. The experimental findings reveal that the suggested technique has much greater prediction accuracy and convergence speed, as well as superior stability, when compared to LSTM, BiLSTM, and BiLSTM based on attention mechanism, making it a good reference for power system planning and stability.