Skip to main content
. 2022 Dec 2;22(23):9416. doi: 10.3390/s22239416
Algorithm 1 Proposed hybrid detection framework.
  • 1:

    Input: Dataset = DTS

  • 2:

    Output: Benign→0, Attack1→1 and so on.

  • 3:

    Split the DTS in to DTSTrainingData and DTSTestingData

  • 4:

    foreach layer of DNNGRUdo

  • 5:

       DTSTrain′ = Pre-proceessing of DTSTrainingData

  • 6:

       DNNGRUTraining = Train the model using DTSTrain′

  • 7:

       Z=Bias+W1X1+W2X2+W3X3+........+WnXn

  • 8:

       Ut=(Wz+Xt+Uzht−1+Bz)

  • 9:

       rt=σ(W(r)+Xt+U(r)ht−1)

  • 10:

     ht′=tanh(WXt+rt⊙(U)ht−1)

  • 11:

     ht=Zt⊙ht−1+(1−Zt)⊙ht′

  • 12:

    end for

  • 13:

    DTSTest′ = Pre-processing of DTSTestingData

  • 14:

    DNNGRUTesting = Test the model using DTSTest′

  • 15:

    while True do

  • 16:

     Predict Attack→DNNGRUTModel(DTSTest′)

  • 17:

     if the value predicted = 0 then

  • 18:

      Return Benign

  • 19:

     else

  • 20:

      Return attack type

  • 21:

     end if

  • 22:

    end while