Research Article

A Lightweight Intrusion Detection Method Based on Fuzzy Clustering Algorithm for Wireless Sensor Networks

Algorithm 2

Sliding window procedure.
Input: Feature B of suspect sample , size of sliding window p
Output: Category of the suspect sample
(1)  extract first p record data of the suspect sample
(2)  use first dimension value of the record data and
(3)  select feature B of predicted normal data from the record data (named normalB, the size is k)
(4)   for  i = 1 to k  do
(5)find minB/  the smallest value of feature B of predicted normal data
(6)  end  for
(7)
(8)  if    then
(9)the is normal
(10)  else then
(11)the is a network intrusion sample
(12)  end if
(13)  return category of the suspect sample