This paper proposes an innovative method based on machine learning to improve the detection effect of communication network intrusion detection system.Firstly,the basic architecture of communication network intrusion detection is deeply studied to fully understand the diversity and complexity of intrusion behavior.Secondly,regularization constraints are introduced into Recurrent Neural Networks(RNN)model to improve the detection accuracy and the generalization ability of the model.Finally,experiments are carried out on UNSW-NB15 data set to prove the effectiveness of the proposed method.In the experiment,the confusion matrix is used to analyze the results,and the performance of the model is comprehensively evaluated by indicators such as accuracy,recall and F1 score.The results show that the method proposed in this paper performs well in communication network intrusion detection tasks,and has high accuracy and generalization ability.