《计算机应用》唯一官方网站 ›› 2026, Vol. 46 ›› Issue (3): 857-866.DOI: 10.11772/j.issn.1001-9081.2025030296

• 网络空间安全 • 上一篇    下一篇

基于混合序列模型与联邦类平衡算法的网络入侵检测

马凯光1,2,3, 陈学斌1,2,3(), 菅银龙1,2,3, 王柳1,2,3, 高远1,2,3   

  1. 1.华北理工大学 理学院,河北 唐山 063210
    2.河北省数据科学与应用重点实验室(华北理工大学),河北 唐山 063210
    3.唐山市数据科学重点实验室(华北理工大学),河北 唐山 063210
  • 收稿日期:2025-03-24 修回日期:2025-07-20 接受日期:2025-07-23 发布日期:2025-09-28 出版日期:2026-03-10
  • 通讯作者: 陈学斌
  • 作者简介:马凯光(1999—),男,河北张家口人,硕士研究生,CCF会员,主要研究方向:联邦学习、网络安全
    菅银龙(2001—),男,河南商丘人,硕士研究生,CCF会员,主要研究方向:数据安全、隐私保护
    王柳(1999—),女,河北保定人,硕士研究生,CCF会员,主要研究方向:数据分析
    高远(2000—),女,山东德州人,硕士研究生,CCF会员,主要研究方向:数据安全、隐私保护。
  • 基金资助:
    国家自然科学基金资助项目(U20A20179)

Network intrusion detection based on hybrid sequence model and federated class balance algorithm

Kaiguang MA1,2,3, Xuebin CHEN1,2,3(), Yinlong JIAN1,2,3, Liu WANG1,2,3, Yuan GAO1,2,3   

  1. 1.College of Sciences,North China University of Science and Technology,Tangshan Hebei 063210,China
    2.Hebei Provincial Key Laboratory of Data Science and Application (North China University of Science and Technology),Tangshan Hebei 063210,China
    3.Tangshan Key Laboratory of Data Science (North China University of Science and Technology),Tangshan Hebei 063210,China
  • Received:2025-03-24 Revised:2025-07-20 Accepted:2025-07-23 Online:2025-09-28 Published:2026-03-10
  • Contact: Xuebin CHEN
  • About author:MA Kaiguang, born in 1999, M. S. candidate. His research interests include federated learning, network security.
    JIAN Yinlong, born in 2001, M. S. candidate. His research interests include data security, privacy protection.
    WANG Liu, born in 1999, M. S. candidate. Her research interests include data analysis.
    GAO Yuan, born in 2000, M. S. candidate. Her research interests include data security, privacy protection.
  • Supported by:
    National Natural Science Foundation of China(U20A20179)

摘要:

网络入侵检测系统(NIDS)在网络安全防御中发挥着关键作用。传统基于规则匹配的方法难以有效检测未知攻击,深度学习虽提高了检测性能,但受限于集中式训练造成的数据隐私问题。在此背景下,联邦学习通过本地训练与参数共享,在保护数据隐私的同时实现协同学习,为网络入侵检测提供了一种可行的解决方案。然而,联邦学习在NIDS应用中仍面临挑战,包括网络流量的时序依赖性和数据分布的不均衡,这导致联邦模型对少数类攻击的检测能力不足。因此,提出一种结合双向循环神经网络(RNN)并行结构与联邦类别平衡(FedCB)算法的混合框架,以增强时序建模能力并优化联邦聚合策略。实验结果表明,该算法在NSL-KDD数据集上的五分类任务中取得了更优的检测性能,相较于结合联邦学习与卷积神经网络的入侵检测模型CNN-FL和FL-SEResNet(Federation Learning Squeeze-and-Excitation network ResNet),准确率分别提升了3.30和1.48个百分点,说明该方法在联邦学习入侵检测任务中的有效性。

关键词: 联邦学习, 入侵检测, 双向循环神经网络, 类别不平衡, 隐私保护

Abstract:

Network Intrusion Detection System (NIDS) plays a crucial role in network security defense. Traditional rule-based matching methods struggle to detect unknown attacks effectively, while deep learning enhances detection performance, but is constrained by the data privacy issue caused by centralized training. In this context, federated learning enables collaborative learning while preserving data privacy through local training and parameter sharing, offering a feasible solution for network intrusion detection. However, federated learning still faces challenges in NIDS applications, including the temporal dependency of network traffic and imbalanced data distribution, which limits the federated model’s ability to detect minority-class attacks. Therefore, a hybrid framework that integrates bidirectional Recurrent Neural Network (RNN) parallel architecture with Federated Class Balancing (FedCB) algorithm was proposed, so as to enhance the temporal modeling capabilities and optimize the federated aggregation strategy. Experimental results on the NSL-KDD dataset demonstrate that the proposed algorithm achieves superior performance in a five-class classification task. Compared with the intrusion detection model combining federated learning and convolutional neural networks — CNN-FL and FL-SEResNet (Federation Learning Squeeze-and-Excitation network ResNet), the proposed algorithm improves the accuracy by 3.30 and 1.48 percentage points, respectively, highlighting the effectiveness of the proposed method in federated learning-based intrusion detection.

Key words: federated learning, intrusion detection, bidirectional Recurrent Neural Network (RNN), class imbalance, privacy protection

中图分类号: