首页|基于注意力机制多特征融合与文本情感分析的日志异常检测方法

基于注意力机制多特征融合与文本情感分析的日志异常检测方法

扫码查看
现有的基于深度学习和神经网络的日志异常检测方法通常存在语义信息提取不完整、依赖日志序列构建和依赖日志解析器等问题。基于注意力机制多特征融合和文本情感分析技术,提出了一种日志异常检测方法。该方法首先采用词嵌入方法将日志文本向量化以获取日志消息的词向量表示,接着将词向量输入到由双向门控循环单元网络和卷积神经网络组成的特征提取层中分别提取日志消息的上下文依赖特征和局部依赖特征,使用注意力机制分别加强两种特征中的关键信息,增强模型识别关键信息的能力。使用基于注意力机制的特征融合层为两种特征赋予不同权重并加权求和后输入由全连接层构成的输出层中,实现日志消息的情感极性分类,达到日志异常检测的目的。在BGL公开数据集上的实验结果表明,该模型的分类准确率和F1值分别达到了96。36%和98。06%,与同类日志异常检测模型相比有不同程度的提升,从而证明了日志中的语义情感信息有助于异常检测效果的提升,并且经过实验证明了使用注意力机制的模型可以进一步提高文本情感分类效果,进而提升日志异常检测的准确率。
Log anomaly detection method based on attention mechanism multi-feature fusion and text sentiment analysis
Existing log anomaly detection method based on deep learning and neural networks often have is-sues such as neglecting the semantic information in the log message.Additionally,they fail to consider key in-formation in the contextual relationships of the log message and rely heavily on the log parser.To address these challenges,a log anomaly detection method is proposed,which utilizes attention mechanisms,multi-feature fusion,and text sentiment analysis.The method begins by employing word embedding techniques to vectorize the log text and obtain word vector representations of log messages.These word vectors are then in-put into a feature extraction layer comprising Bidirectional Gated Recurrent Unit networks and Convolutional Neural Networks to extract feature representations of the log messages.The method begins by employing word embedding method to vectorize the log text to obtain the word vector representation of log messages.These word vectors are then input into to the feature extraction layer comprising Bidirectional Gated Recur-rent Unit network and Convolutional Neural Network to extract the feature representation of the log message.By leveraging attention mechanisms,the model strengthens the key information in each of the two types of features,thereby enhancing its ability to recognize crucial information.Next,an attention-based feature fusion layer is then used to assign different weights to the two features and performs a weighted sum,which is then fed into the output layer consisting of fully connected layers for sentiment polarity classification of log mes-sages,ultimately achieving the goal of log anomaly detection.Experimental results on the BGL public dataset show that the classification accuracy and F1 score of the model reach 96.36%and 98.06%,respectively.There are different degrees of improvement compared with similar log anomaly detection models,thus prov-ing that the semantic sentiment information in logs helps to improve the anomaly detection effect.It is experi-mentally demonstrated that the model using the attention mechanism can further improve the text sentiment classification effect,and finally improves the log anomaly detection accuracy.

Multi-feature fusionAttention mechanismText sentiment analysisLog analysisSystem anomaly detection

董昱灿、赵奎

展开 >

四川大学网络空间安全学院, 成都 610207

多特征融合 注意力机制 文本情感分析 日志分析 系统异常检测

国家自然科学基金国家自然科学基金

U19A206861872254

2024

四川大学学报(自然科学版)
四川大学

四川大学学报(自然科学版)

CSTPCD北大核心
影响因子:0.358
ISSN:0490-6756
年,卷(期):2024.61(2)
  • 34