Aiming at the lack of subjectivity of the network security situation assessment method and the complexity and non-linearity of data obtained through situational factors, a fuzzy neural network security situation which is optimised based on an improved gravitational search algorithm combined with fractional differential equation analysis, as an Evaluation model, is proposed. In order to quickly and accurately predict the situation value of the network security situation at that moment, a method for situation prediction of long-term and short-term memory networks based on an improved Nadam algorithm to optimise the online update mechanism is proposed. Note that the situation time series obtained from online assessment cannot be used in a better and efficient manner. The model can minimise the cost function and update the model more effectively by updating the model parameters online Prediction accuracy. In order to improve the problem of slow convergence speed during model network training, the Look-ahead method is used to improve Nesterov's adaptive gradient momentum estimation algorithm to accelerate the model's convergence. Finally, the simulation results analyse and compare the prediction model, which not only improves the convergence speed of the prediction model, but also greatly reduces the prediction error of the model.