## 3 SDVN Traffic Analysis and Prediction
In solving this problem, the binary cross entropy is used as the loss function. The following formula of binary cross entropy is given:  
\[\text{Loss}=-\frac{1}{N}\sum_{i=1}^{N}y_{i}\cdot\log(p(y_{i}))+(1-y_{i})\cdot \log(1-p(y_{i})) \tag{12}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Controller ID** & **Flow** & **Proportion** & **Data Flow Number** \\ \hline A & 0 & 50.00\% & 25 \\  & 1 & 50.00\% & 25 \\ \hline B & 0 & 68.00\% & 34 \\  & 1 & 32.00\% & 16 \\ \hline C & 0 & 62.00\% & 31 \\  & 1 & 38.00\% & 19 \\ \hline D & 0 & 56.00\% & 28 \\  & 1 & 44.00\% & 22 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The data flow ratio of different controller RSUs in the test set. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Controller ID** & **Flow** & **Proportion** & **Data Flow Number** \\ \hline A & 0 & 50.00\% & 120 \\  & 1 & 50.00\% & 120 \\ \hline B & 0 & 54.82\% & 91 \\  & 1 & 45.18\% & 75 \\ \hline C & 0 & 61.97\% & 132 \\  & 1 & 38.03\% & 81 \\ \hline D & 0 & 68.18\% & 150 \\  & 1 & 31.82\% & 70 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The data flow and its proportion of different controller RSUs. \(y\) is a binary label, with a value of 1 or 0, indicating the probability \(p(y)\) of belonging to the label. Next, a sequential model neural network is built using the deep learning Keras framework. The optimizer of the sequential model neural network is adaptive moment estimation (Adam), the loss function is binary cross entropy, and the evaluation index is accuracy. Its detailed neural network structure is shown in Figure 6:  
As shown in Figure 6, the sequential model neural network is a linear stack of multiple network layers. The first layer of the sequential model requires the dimension of the input data. For the first layer, that is, the dense_1 layer, Dense represents the full connection, and 'input' represents the input of a tuple type of two-dimensional data (None, 6); if none is filled in, it means that the position value is any positive integer. The output 'output' of the first layer is also a two-dimensional data of tuple type (None, 6). For the second layer dropout_1, Dropout represents random deactivation, and in the forward propagation process of the model training stage, the activation value of some neurons stops working with a certain probability, so that the generalization of the neural network is stronger. The back layers refer to the first two layers, and so on. The following network layers can automatically derive the dimension of the intermediate data, and the 'output' of the last layer has a two-dimensional data dimension (None, 1). The data of 639 training sets were further divided into 80%--that is, 511 were used as new training sets--and 20%--that is, 128 were used as validation sets. After iteration, the loss function value and accuracy of the sequential model change with the number of iterations as shown in Figure 7, where blue represents the training set and red represents the validation set:  
Figure 7a,b represent the loss function value and accuracy of the sequential model neural network with the change in the number of iterations on the training set and the verification set, respectively. In the training process, the loss function value and accuracy of the validation set fluctuate greatly before 600 iterations. After 800 epoch iterations, the loss value and accuracy of the model on the training set and the verification set gradually converge. Finally, at the 1000 th epoch iteration, the loss function value of the model on the training set is 0.4131, and the accuracy rate is 0.7769. At this time, the loss function value of the model on the verification set is 0.2803, and the accuracy rate is 0.8281. Figure 6: Sequential neural network model structure. In addition, after training the sequential model neural network in the training set and the verification set, the model is further applied on the test set with 200 network traffic. The loss function value is 0.3236 and the accuracy rate is 0.8550.