Most accidents in a chemical process are caused by abnormal or deviations of the process parameters, and the existing research is focused on short-term prediction. When the early warning time is advanced, many false and missing alarms will occur in the system, which will cause certain problems for on-site personnel; how to ensure the accuracy of early warning as much as possible while the early warning time is a technical problem requiring an urgent solution. In the present work, a bidirectional long short-term memory network (BiLSTM) model was established according to the temporal variation characteristics of process parameters, and the Whale optimization algorithm (WOA) was used to optimize the model's hyperparameters automatically. The predicted value was further constructed as a Modified Inverted Normal Loss Function (MINLF), and the probability of abnormal fluctuations of process parameters was calculated using the residual time theory. Finally, the WOA-BiLSTM-MINLF process parameter prediction model with inherent risk and trend risk was established, and the fluctuation process of the process parameters was transformed into dynamic risk values. The results show that the prediction model alarms 16 min ahead of distributed control systems (DCS), which can reserve enough time for operators to take safety protection measures in advance and prevent accidents.