| Wireless sensor networks are typically composed of sensor nodes with limited resources and operate in unmanned areas or harsh environments,making them more vulnerable to security threats than traditional networks.In recent years,various machine learning based intrusion detection technologies have good performance in wireless sensor networks.However,in the face of various new types of attacks,there is an urgent need to improve adaptability and scalability.In addition,the imbalance between normal samples and attack samples can also affect the performance of machine learning based intrusion detection algorithms.To solve these problems,this thesis studies the intrusion detection algorithm based on incremental learning in wireless sensor networks under imbalanced data.The main research work of this thesis is as follows:(1)Aiming at the problem of imbalance between normal samples and attack samples in intrusion detection of wireless sensor networks,a sample balance method based on generative adversarial network called SBMGAN is proposed.The proposed method can use the generative adversarial network to learn the distribution of attack samples,and expand attack sample set achieve a relative balance between normal samples and attack samples,which can improve the detection performance of the machine learning intrusion detection algorithm for the attack types.The experiment is carried out on the attack types of KDD CUP99,which is a classic intrusion detection dataset,and the effect of the sample balance method is verified by convolutional neural network.The experimental results show that the F-Measure of the algorithm increases by 0.11%~9.04% after the sample balance,which is 0.06%~4.56% higher than the k-means SMOTE balance method.(2)Aiming at the problem of insufficient adaptability and scalability of existing machine learning based intrusion detection algorithms in wireless sensor networks,an incremental learning algorithm is introduced.And this thesis proposes an intrusion detection algorithm based on incremental learning under imbalanced sample by combining the sample balance method based on generative adversarial network and incremental learning algorithm,which can be called IDILID.Hierarchical intrusion detection model is adopted,and the proposed algorithm is deployed at the sink node.At first,the new attack type is identified timely and effectively through online incremental learning.Then,if the detection performance of the new attack type is not satisfying,the SBMGAN method is used to expand data of the new attack type to achieve a relative balance with the existing type.Finally,the incremental training is carried out again to improve the performance of the intrusion detection algorithm.Only new data and a small amount of old data are used in the proposed algorithm,while the original knowledge is preserved by using knowledge distillation.Experiments on KDD CUP99 show that compared with the incremental learning algorithm using only new data,IDILID can greatly improve the detection performance while only adding a small amount of memory consumption,and compared with the algorithm before balance,IDILID can improve the detection performance at the cost of a small amount of time consumption,and compared with the retraining algorithm,IDILID can effectively reduce training time while maintaining high detection rate and low false alarm rate.Therefore,the proposed algorithm is suitable for online detection applications.In summary,this thesis proposes an intrusion detection algorithm based on incremental learning under imbalance sample,which solves the problem of insufficient adaptability and scalability of existing machine learning algorithms in wireless sensor networks,and the problem of insufficient detection ability for attack types. |