| Input: Packet set P, K, f1, f2, m, c, n, epoches | | Output: detection result R | (1) | pool = multiprocessing.Pool(processes = m) | (2) | NCSS, R = [] | (3) | While i in range(0, n) do //The network of first n period is normal. | (4) | SS, NCSSi = [] | (5) | Bucket_List = pool.map_async(ipsketch, Pi).get() | (6) | obtain NCSSi with lines 05–09 of algorithm 1 | (7) | NCSS.add(NCSSi) | (8) | End while | (9) | Traindataset = NCSS.reshape(–1, K/c, K/c,1) | (10) | AOCC.train(Traindataset, epoches) | (11) | obtain the optimal parameters P_best | (12) | While t is continue do | (13) | SS, NCSSt = [] | (14) | Bucket_List = pool.map_async(ipsketch, Pi).get() | (15) | obtain NCSSt with lines (4)–(8) of algorithm 1 | (16) | Testt = CSSt.reshape(–1, K/c, K/c,1) | (17) | Rt = AOCC.test(Testt, P_best) | (18) | R.add(Rt) | (19) | End While |
|