Computer Science ›› 2026, Vol. 53 ›› Issue (8): 403-412.doi: 10.11896/jsjkx.251100114

• Computer Software • Previous Articles     Next Articles

Reversible Anomaly Traffic Detection for Programmable Data Plane

SHU Yapeng1, DU Yang1, HUANG He1, SUN Yu’e2   

  1. 1 School of Computer Science and Technology, Soochow University, Suzhou, Jiangsu 215008, China
    2 School of Rail Transportation, Soochow University, Suzhou, Jiangsu 215100, China
  • Received:2025-11-21 Revised:2026-03-25 Published:2026-08-17
  • About author:SHU Yapeng,born in 2002,postgra-duate.His main research interest is network traffic measurement.
    DU Yang,born in 1992,Ph.D,associate professor,is a member of CCF(No.81294M).His main research interests include large language model inference acceleration,network traffic measurement,and network security.
  • Supported by:
    National Natural Science Foundation of China(62572337,62332013,62202322).

Abstract: Meeting the demands of network management and security protection in high-speed network environments,real-time reversible traffic measurement has become a critical foundation for supporting tasks such as anomaly detection and attack tracing.Traditional reversible Sketch methods face dual challenges when deployed on P4-programmable data planes:the absence of multiplication,division,and modulo instructions in the P4 instruction set prevents the direct implementation of reversible Sketches based on the Chinese Remainder Theorem(CRT).Furthermore,the co-prime moduli required by CRT often conflict with hardware memory allocation granularity,leading to memory fragmentation,while the computational complexity of reverse recovery for multiple anomalous flows grows exponentially.To address these issues,an efficient abnormal traffic detection mechanism is designed.By constructing a special set of co-prime moduli,modulo operations are transformed into bit-shifts and additions/subtractions.A register pool with a complementary allocation strategy is established to eliminate memory fragmentation,supporting the runtime redeployment of measurement tasks.Additionally,a dual-Sketch coordination mechanism is introduced to reduce the computational complexity of reverse recovery from exponential to linear.Experimental results on a P4 switch demonstrate microsecond-level memory allocation(45~58 μs),millisecond-level task switching latency(approximately 80 ms for 8 tasks),and a processing delay of only 0.4 μs.It does not interfere with normal packet forwarding,which effectively validating its feasibility and efficiency in high-speed networks.

Key words: Network traffic measurement, Anomaly traffic detection, CRT reversible Sketch, Programmable switch, Runtime reconfiguration

CLC Number: 

  • TP391
[1] CHEN X,XIAO Q,LIU H,et al.Eagle:Toward scalable andnear-optimal network-wide sketch deployment in network mea-surement[C]//Proceedings of ACM SIGCOMM.2024:291-310.
[2] GAO G,ZHOU S,SUN Y,et al.Priority-aware Per-flow Size Measurement in High-speed Networks[J].Journal of Electro-nics & Information Technology,2025,47(6):1885-1895.
[3] SUN H,HUANG Q,SUN J,et al.AutoSketch:AutomaticSketch-Oriented compiler for query-driven network telemetry[C]//Proceedings USENIX NSDI.2024:1551-1572.
[4] LU J,ZHANG P,LI Z,et al.An Accurate Flow Size Measurement Framework Based on MachineLearning[C]//2025 International Conference on Sensor-Cloud and Edge Computing System(SCECS).IEEE,2025:297-305.
[5] GU L,TIAN Y,CHEN W,et al.Per-flow network measurement with distributed sketch[J].IEEE/ACM Transactions on Networking,2023,32(1):411-426.
[6] CORMODE G,MUTHUKRISHNAN S.An improved datastream summary:the count-min sketch and its applications[J].Journal of Algorithms,2005,55(1):58-75.
[7] CHEN M,CHEN S,CAI Z.Counter tree:A scalable counter architecture for per-flow traffic measurement[J].IEEE/ACM Transactions on Networking,2016,25(2):1249-1262.
[8] YANG T,ZHOU Y,JIN H,et al.Pyramid sketch:A sketch framework for frequency estimation of data streams[J].Proceedings VLDB Endowment,2017,10(11):1442-1453.
[9] YANG K,LONG S,SHI Q,et al.SketchINT:Empowering INT with TowerSketch for per-flow per-switch measurement[J].IEEE Transactions on Parallel and Distributed Systems,2023,34(11):2876-2894.
[10] GAO G,QIAN Z,HUANG H,et al.Tailoredsketch:A fast and adaptive sketch for efficient per-flow size measurement[J].IEEE Transactions on Network Science and Engineering,2024,12(1):505-517.
[11] HUANG H,LOU C,SUN Y E,et al.Adaptive denoising for network traffic measurement[J].IEEE Transactions on Network Science and Engineering,2025,12(4):2907-2920.
[12] SCHWELLER R,LI Z,CHEN Y,et al.Reversible sketches:enabling monitoring and analysis over high-speed data streams[J].IEEE/ACM Transactions on Networking,2007,15(5):1059-1072.
[13] SCHWELLER R,GUPTA A,PARSONS E,et al.Reversiblesketches for efficient and accurate change detection over network data streams[C]//Proceedings of ACM SIGCOMM.2004:207-212.
[14] JING X,ZHAO J,ZHENG Q,et al.A reversible sketch-based method for detecting and mitigating amplification attacks[J].Journal of Network and Computer Applications,2019,142:15-24.
[15] JING X,YAN Z,JIANG X,et al.Network traffic fusion andanalysis against DDoS flooding attacks with a novel reversible sketch[J].Information Fusion,2019,51:100-113.
[16] JING X,HAN H,YAN Z,et al.SuperSketch:A multi-dimen-sional reversible data structure for super host identification[J].IEEE Transactions on Dependable and Secure Computing,2021,19(4):2741-2754.
[17] JING X,CAO Q,YAN Z,et al.LocalSketch:An Accurate and Efficient Sketch for Range Spread Estimation[J].IEEE Transactions on Dependable and Secure Computing,2025,22(6):6361-6375.
[18] KAUR S,KUMAR K,AGGARWAL N.A review on P4-Programmable data planes:Architecture,research efforts,and future directions[J].Computer Communications,2021,170:109-129.
[19] HAN H,YAN Z,JING X,et al.Applications of sketches in network traffic measurement:A survey[J].Information Fusion,2022,82:58-85.
[20] ZHOU H,GU G.Securing Networks with Programmable Data Planes:Opportunities and Challenges[J].IEEE Security & Privacy,2025,23(6):42-50.
[21] DAS R,SNOEREN A C.Memory management inActiveRMT:Towards runtime-programmable switches[C]//Proceedings of ACM SIGCOMM.2023:1043-1059.
[22] YANG Y,HE L,ZHOU J,et al.P4runpro:Enabling runtimeprogrammability forrmt programmable switches[C]//Procee-dings of ACM SIGCOMM.2024:921-937.
[23] ZHENG H,TIAN C,YANG T,et al.Flymon:enabling on-the-fly task reconfiguration for network measurement[C]//Proceedings of ACM SIGCOMM.2022:486-502.
[24] XI Z,ZHOU Y,ZHANG D,et al.Newton:Intent-driven network traffic monitoring[J].IEEE/ACM Transactions on Networking,2021,30(2):939-952.
[25] GAO Y,WANG Z.A review of P4 programmable data planes for network security[J].Mobile Information Systems,2021,2021(1):1257046.
[26] WANG P,GUAN X,QIN T,et al.A data streaming method for monitoring host connection degrees of high-speed links[J].IEEE Transactions on Information Forensics and Security,2011,6(3):1086-1098.
[27] XU Z,TIAN Y,WU Y,et al.Hidden Sketch:A Space-Efficient Reversible Sketch for Tracking Frequent Items in Data Streams[J].arXiv:2505.12293,2025.
[28] WANG F,TANG Y,GAO L,et al.BC-Sketch:A simple reversi-ble sketch for detecting network anomalies[C]//2020 IEEE International Conference on Smart Data Services(SMDS).IEEE,2020:36-44.
[29] SUN H,WANG X,BUYYA R,et al.CloudEyes:Cloud-based malware detection with reversible sketch for resource-constrained internet of things(IoT) devices[J].Software:Practice and Experience,2017,47(3):421-441.
[30] ZHOU A,QIAN J.Identifying Abnormal Hosts in Data Streams Using Reversible Sketch[J].Engineering Reports,2025,7(5):e70193.
[31] LI Z,GENG Y.Score Sketch:An Efficient and ReversibleSketch for Advanced Persistent Threat Detection[C]//2024 5th International Conference on Computers and Artificial Intelligence Technology(CAIT).IEEE,2024:314-319.
[32] BASAT R B,EINZIGER G,FRIEDMAN R,et al.Optimal elephant flow detection[C]//IEEE Conference on Computer Communications(IEEE INFOCOM).2017:1-9.
[33] ZHENG H,YAN X,LI W,et al.When P4 meets run-to-completion architecture[C]//Proceedings USENIX NSDI.2025:1487-1505.
[34] CAIDA.Anonymized internet traces 2019[EB/OL].[2026-06-06].https://catalog.caida.org/details/dataset/passive_2019_pcap.
[35] MAWI.MAWI Working Group Traffic Archive[EB/OL].[2026-06-06].https://mawi.wide.ad.jp/mawi/samplepoint-F/2024/.
[1] FENG Haoyu, ZHANG Yuxuan, LIU Zixuan, MENG Hua. Network Anomaly Traffic Detection Based on Deep Multi-instance Learning [J]. Computer Science, 2026, 53(8): 426-436.
[2] WANG Jiayu, YU Junqing, LI Dong, ZHAO Junyang. Network Microburst Traffic Measurement Method Based on Sketch Data Structure [J]. Computer Science, 2025, 52(1): 374-382.
[3] ZHENG Haibin, LIU Xinran, CHEN Jinyin, WANG Pengcheng, WANG Xuanye. Integrity Interference Attack and Defense Methods for Network Traffic Measurement [J]. Computer Science, 2024, 51(8): 420-428.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!