This paper proposes a method for designing a network information security threat prediction and defense mechanism based on deep learning. In terms of threat prediction, through data preprocessing, a deep learning feature extraction model, and the network threat intelligence identification model TriDeepE, efficient classification of network traffic and identification of threat entities are achieved. In terms of defense mechanisms, a multi-layered, adaptive protection system is designed. By leveraging input preprocessing, model enhancement, and continuous security monitoring strategies, the success rate of adversarial sample attacks is effectively reduced. In simulation experiments, the threat prediction model achieved a data anomaly prediction accuracy rate of 95.08%, with MAE and RMSE metrics of 0.0042 and 0.0198, respectively, significantly outperforming other comparison models. Three types of attacks were conducted using H4. After attack cleaning and filtering operations, the Packet-In rate successfully returned to normal levels, validating the effectiveness of the threat defense system.