Research Article

OpenCBD: A Network-Encrypted Unknown Traffic Identification Scheme Based on Open-Set Recognition

Algorithm 2

Pretraining algorithm for network traffic model.
Input: unlabeled dataset , .
Output: pretrained model;
1: Fordo
2:  Extract the payload of , ;
3:  Fordo
4:   ;
5:   ;
6:   ;
7:  End for
8:  Ifthen
9:    (plaintext);
10:  Else
11:    (ciphertext);
12:  End if
13: End for
14: ;
15: ;
16: Randomly select consecutive 10-packet payload parts in to form , ;
17: Fordo
18:  ;
19:  ;
20:  Fordo
21:   Ifthen
22:    , where ;
23:   Else
24:    ;
25:   End if
26:   ;
27:   ;
28:  End for
29: End for
30: ;
31: ;
32: Return pretrained model.