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.