The application effect of traditional machine learning algorithms in intrusion detection of wireless sensor networks is not ideal,with low Recall(recall)and F1 score(harmonic average of recall and accuracy).In response to the shortcomings and shortcomings of current methods,a feature learning based intrusion detection method for wireless sensor networks is proposed.Using timestamp Markov model of wireless sensor network,realize the local characteristics of network intrusion data coding,using deep learning network,learning network intrusion behavior characteristics,numerical and normalized processing,according to the intrusion characteristics of network behavior,identification and detection behavior,to realize the wireless sensor network intrusion behavior detection based on feature learning.The experiment proved that the design method Recall is above 95%and F1-score is above 90%,with high detection accuracy and has good application prospect in detecting intrusion behavior of wireless sensor network.