Research Article

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

Table 2

The detection procedure.

Input: detector set , antigen set to be detected
Output: TP, FN, FP, TN
 Step 1. , , , .
 Step 2. An antigen is sequentially extracted from the antigen set to be detected .
 Step 3. Calculate the Euclidean distance between and all detectors in detector set . When exists, if the antigen is non-self, TP++; if is self, FP++. When does not exist, if the antigen ag is self, TN++; if the antigen is non-self, FN++.
 Step 4. If all the antigens in have been detected, the program ends, output TP, FN, FP, TN. Otherwise, go to step 2.