一句话:提出首个语义驱动的日志解析器 SemParser,挖掘日志中的显式与隐式语义并联合推断结构化输出,显著提升下游任务表现。
日志是软件运行时自动生成的记录,日志解析是从半结构化日志消息中抽取结构化模板与参数的基础步骤。现有日志解析器均基于语法,把消息视为字符串,忽略参数与模板中的语义信息。本文提出首个基于语义的解析器 SemParser,包含两个阶段:端到端语义挖掘器用于识别单条日志中的显式语义;联合解析器则依据日志的上下文知识库联合推断隐式语义并计算结构化输出。作者在六个广泛使用的系统上验证其语义抽取效果,平均 F1 达 0.985;并开展两个下游任务,在异常检测与故障识别数据集上分别取得 1.2%–11.7% 与 8.65% 的性能提升。
Logs, being run-time information automatically generated by software, record system events and activities with their timestamps. Before obtaining more insights into the run-time status of the software, a fundamental step of log analysis, called log parsing, is employed to extract structured templates and parameters from the semi-structured raw log messages. However, current log parsers are all syntax-based and regard each message as a character string, ignoring the semantic information included in parameters and templates. Thus, we propose the first semantic-based parser SemParser to unlock the critical bottleneck of mining semantics from log messages. It contains two steps, an end-to-end semantics miner and a joint parser. Specifically, the first step aims to identify explicit semantics inside a single log, and the second step is responsible for jointly inferring implicit semantics and computing structural outputs according to the contextual knowledge base of the logs. To analyze the effectiveness of our semantic parser, we first demonstrate that it can derive rich semantics from log messages collected from six widely-applied systems with an average F1 score of 0.985. Then, we conduct two representative downstream tasks, showing that current downstream models improve their performance with appropriately extracted semantics by 1.2%-11.7% and 8.65% on two anomaly detection datasets and a failure identification dataset, respectively. We believe these findings provide insights into semantically understanding log messages for the log analysis community.