## 3 Methodology
### Algorithm Description  
In the proposed IDS, the deep learning-based algorithm purely focuses on the intrusion detection activity and effectively interrogates anomalous events in RPL-based resource-constrained smart industries. The proposed Cu-DNNGRU is an amalgamation of two prestigious classifiers, Deep Neural Networks (DNN) and Gated Recurring Unit (GRU). A deep Neural Network (DNN) is an enhanced version of an Artificial Neural Network (ANN) with extra layers. The layers of neurons are organized in a sequence of multiple layers, where neurons receive the neuron activations from the previous layer as input and perform a simple computation. Each neuron receives a set of \(x\)-values numbers from 1 to \(n\) as an input and computes the predicted \(y\)-hat value. Vector \(x\) contains the values of the features in one of the \(m\) examples from the training set. In each iteration, the neuron \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Algorithm** & **Layers** & **AF** & **Neurons** & **Optimizer** & **LF** & **Epochs** & **Batch-Size** \\ \hline \multirow{5}{*}{Cu-DNNGRU} & DNN Layer (4) & RELU & (400, 300, 200, 50) & & CC-E & & \\  & GRU LAYER (2) & RELU & (200, 100) & & CC-E & & \\  & Dropout & - & (0.7) & Adam & & 15 & 32 \\  & Output Layer (1) & Softmax & (08) & & & & \\  & Dense (2) & - & (200, 50) & & & & \\ \hline \multirow{5}{*}{Cu-LSTMDNN} & LSTM Layer (2) & RELU & (200, 100) & & CC-E & & \\  & DNN Layer (4) & RELU & (400, 300, 200, 50) & & CC-E & & \\  & Dropout & - & (0.7) & Adam & & 15 & 32 \\  & Dense (2) & - & (200, 50) & & & & \\  & Output Layer (1) & Softmax & (08) & & & & \\ \hline \multirow{5}{*}{Cu-BLSTM} & BLSTM Layer (4) & RELU & (400, 300, 200, 100) & & CC-E & & \\  & Output Layer (1) & Softmax & (08) & & & & \\ \cline{1-1}  & Dropout & - & (0.7) & Adam & & 15 & 32 \\ \cline{1-1}  & Dense (2) & - & (200, 50) & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Proposed hybrid model details. Figure 1: Work flow of proposed detection scheme. calculates a weighted average of the values of the vector \(x\) based on its current weight vector \(w\) and adds bias. Finally, the result of this calculation is passed through a non-linear activation function. \[Z=Bias+W_{1}X_{1}+W_{2}X_{2}+W_{3}X_{3}+\dots+W_{n}X_{n} \tag{1}\]  
The Gated Recurrent Unit (GRU) is an advanced version of the Recurrent Neural Network (RNN) and is quite similar to the LSTM. GRU also utilizes gates to regulate the information flow. They choose which information should be sent to the output and are referred to as the two vectors. Its specialty is storing old data rather than getting rid of it since it is not essential to the forecast. GRU consists of an update gate (\(U_{t}\)), current memory state (\(h_{t}\)), and reset gate (\(r_{t}\)). \[U_{t}=(W^{z}+X_{t}+U^{z}h_{t-1}+B_{z}) \tag{2}\]  
where \(X_{t}\) is the input multiplied by the weight \(W_{z}\). Further, \(h_{t-1}\) holds the information of the previous state multiplied by its weight \(U_{z}\). For computing \(r_{t}\), Equation (3) is used. \[r_{t}=\sigma(W^{(r)}+X_{t}+U^{(r)}h_{t-1}) \tag{3}\]  
where \(\sigma\) represents the sigmoid function, \(r_{t}\) is the reset gate, \(W^{r}\) is the weight, \(x_{t}\) is input, and so on. It then uses Equation (4) to store all the relevant information from the past, where \(\odot\) is class-wise multiplication, \(h^{\prime}_{t}\) is the information from the previous stages and \(h_{t-1}\) is the current memory content. \[h^{\prime}_{t}=\tanh(WX_{t}+r_{t}\odot(U)h_{t-1}) \tag{4}\]  
Finally, Equation (5) is used where the network calculates the \(h_{t}\). \[h_{t}=Z_{t}\odot h_{t-1}+(1-Z_{t})\odot h^{\prime}_{t} \tag{5}\]  
The complete workflow of the proposed detection scheme is depicted in Algorithm 1. ```
1:Input: Dataset = \(DTS\)
2:Output:\(Benign\to 0\), \(Attack1\to 1\) and so on.