计算机科学 ›› 2026, Vol. 53 ›› Issue (9): 405-413.doi: 10.11896/jsjkx.250900033
夏彬1, 苏巾雅1, 曹军民2, 肖竣文1, 孙国梓1
XIA Bin1, SU Jinya1, CAO Junmin2, XIAO Junwen1, SUN Guozi1
摘要: 在大规模软件系统运行中,硬件故障、恶意攻击、模块兼容冲突等异常易导致服务中断、系统崩溃。日志虽为异常分析提供关键依据,但面临多重挑战:1)传统机器学习方法仅依赖事件计数向量,忽略了日志序列的时序依赖与拓扑结构;2)深度学习方法受限于训练集既有模式,泛化能力弱,且无法建模复杂依赖关系;3)现有强化学习方法存在Q值高估、单一奖励机制等问题,无法对异常序列进行前瞻性预测与分级。针对上述挑战,提出了一种基于强化学习的解决方案:一是构建基于双重深度Q网络的日志序列图模型,在仅使用正常日志样本的条件下,通过经验回放机制与先验知识引导,以序列图结构化建模日志长期依赖,突破现有强化学习方法对单一状态向量的依赖,解决Q值高估与泛化性不足的问题;二是设计基于竞争深度Q网络的异常预测模型,通过对抗学习机制与多元奖励函数,结合异常分级机制,实现对未来异常序列的精准预测与分级,解决传统方法“只检测不预测”的局限,为运维提供充足的应对时间。
中图分类号:
| [1] ZHU J,HE S,LIU J,et al.Tools and bencharks for automated log parsing[C] //2019 IEEE/ACM 41st International Confe-rence on Software Engineering:Software Engineering in Practice(ICSE-SEIP).IEEE,2019:121-130. [2] YUAN Y,ADHATARAO S S,LIN M,et al.Ada:Adaptive deep log anomaly detector[C] //IEEE INFOCOM 2020-IEEE Conference on Computer Communications.IEEE,2020:2449-2458. [3] YAN L,XIA W.Survey on Log AnomalyDetection Based on Machine Learning[J].Computer Systems & Applications,2022,31(9):57-69. [4] ZHANG X,XU Y,LIN Q,et al.Robust log-based anomaly detection on unstable log data[C] //Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Confe-rence and Symposium on the Foundations of Software Enginee-ring.2019:807-817. [5] HUANG Z,XU W,YU K.Bidirectional lstm-crf models for se-quence tagging[J].arXiv:1508.01991,2015. [6] XIA B,BAI Y,YIN J,et al.Loggan:a log-level generative adversarial network for anomaly detection using permutation event modeling[J].Information Systems Frontiers,2021,23:285-298. [7] GOODFELLOW I,POUGET-ABADIE J,MIRZA M,et al.Ge-nerative adversarial nets[C] //Advances in Neural Information Processing Systems.2014. [8] MENG W,LIU Y,ZHANG S,et al.Logclass:Anomalous logidentification and classification with partial labels[J].IEEE Transactions on Network and Service Management,2021,18(2):1870-1884. [9] VAARANDI R,PIHELGAS M.Logcluster-a data clusteringand pattern mining algorithm for event logs[C] //2015 11th International Conference on Network and Service Management(CNSM).IEEE,2015:1-7. [10] WITTKOPP T,ACKER A,NEDELKOSKI S,et al.A2log:attentive augmented log anomaly detection[J].arXiv:2109.09537,2021. [11] DU M,LI F,ZHENG G,et al.Deeplog:Anomaly detection and diagnosis from system logs through deep learning[C] //Procee-dings of the 2017 ACM SIGSAC Conference on Computer and Communications Security.2017:1285-1298. [12] MENG W,LIU Y,ZHU Y,et al.Loganomaly:Unsupervised detection of sequential and quantitative anomalies in unstructured logs[C] //IJCAI.2019:4739-4745. [13] MNIH V,KAVUKCUOGLU K,SILVER D,et al.Human-level control through deep reinforcement learning[J].Nature,2015,518(7540):529-533. [14] JOHN D C,MIAO Y J,PENG D Y,et al.Evolving Reinforcement Learning Algorithms[C] //ICLR 2021.2021. [15] GUO H X,YUAN S H,WU X T.LogBERT:Log Anomaly Detection Via BERT[C] //IEEE International Joint Conference on Neural Network.2021. [16] XIONG Y Y,CAI S F.Improving Log-Based Anomaly Detection Through Learned Adaptive Filter[J].arXiv:2504.02994,2025. [17] HAN X,YUAN S H,MOHAMED T.LogGPT:Log Anomaly Detection Via GPT[C] //2023 IEEE International Conference on Big Data.2023:1117-1122. [18] ZHOU J W,GAO Y Y,ZHU Y et al.DRLLog:Deep Reinforcement Learning for Online Log Anomaly Detection[J].IEEE Transactions on Network and Service Management,2025,22(3):2382-2395. [19] HE P,ZHU J,ZHENG Z,et al.Drain:An online log parsing approach with fixed depth tree[C] //2017 IEEE International Conference on Web Services(ICWS).IEEE,2017:33-40. [20] ZHU J,HE S,HE P,et al.Loghub:A large collection of system log datasets for ai-driven log analytics[C] //2023 IEEE 34th International Symposium on Software Reliability Engineering(ISSRE).IEEE,2023:355-366. [21] ZHU J M,HE S L,HE P J,et al.Loghub:A Large Collection of System Log Datasets for AI-drivenLog Analytics[C] //IEEE International Symposium on Software Reliability Engineering(ISSRE).2023:355-366. [22] LOU J G,FU Q,YANG S Q,et al.Mining Invariants from Console Logs for System Problem Detection[C] //USENIX Annual Technical Conference.2010:24. [23] GUO H C,YANG J,LIU J H,et al.LogFormer:A Pre-train and Tuning Pipeline for Log Anomaly Detection[C] //AAAI Confe-rence on Artificial Intelligence.2024:135-143. |
|
||