Research Article

Intrusion Detection in Wireless Sensor Networks with an Improved NSA Based on Space Division

Table 1

The process of the negative selection algorithm.

Input: training set Train, The default number of required detectors maxNum
Output: detector set
 Step 1. Initialize the self-training set Train
 Step 2. A candidate detector is generated at random, and the Euclidean distance between and all selves in the training set Train is calculated. If exists, execute step 2. Otherwise, perform step 3.
 Step 3. Add to the detector set.
 Step 4. If the detector set size , return and the procedure exit. Otherwise, skip to step 2.