Research Article

A Smart Trust Management Method to Detect On-Off Attacks in the Internet of Things

Algorithm 1

The smart trust management method algorithm.
input: A metadata ()
output: A predicted type: (, , )
(1) ;
(2) ;
(3) ;
(4) ;
(5)    if in then
(6)    
   ;
(7)    ;
(8)    ifthen
(9)    if   and and
   then
(10)    ;
(11)  end
(12)  if != and
 then
(13)  ;
(14)  end
(15)  if != and
 then
(16) ;
(17) end
(18) end
(19) end
(20) ;