The study introduces a two-flow network model combining convolutional neural network(CNN)and recurrent neural network(RNN)to improve the efficiency and accuracy of computer network security defense.Training and testing on an improved NSL-KDD dataset is conducted.The model shows high efficiency in handling network traffic and identifying network attacks.The study analyzes the defense module based on Actor-Critic algorithm.Its application in the simulation environment shows good defense success rate and acceptable false positive rate.The results show that the application of artificial intelligence technology can effectively promote the responsiveness and accuracy of network security defense system.