IP Library Granted Patent US 12,450,244
Granted Patent B2
US 12,450,244 · App. 16/867,118 · Granted Oct 21, 2025

Automatic online log template mining

Inventors: Chen Wang (Chappaqua, NY); Lingfei Wu (Elmsford, NY)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F16/2465G06F16/24558
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,450,244
App. No.
16/867,118
Granted
Oct 21, 2025
Kind
B2
Abstract

Methods and systems for log message aggregation include determining a first similarity distance score for a first incoming message by comparing the first incoming message to one or more stored templates. It is determined that the first incoming message imperfectly matches a matched template of the one or more stored templates, based on the first similarity distance score. A token in the imperfectly matched template is replaced with a wildcard, to reduce the first similarity distance score.

Claims (42)

1. A computer-implemented method for log message aggregation, comprising:

tokenizing a first incoming message to generate tokens;

comparing the tokens of the first incoming message to a plurality of stored templates using a token-based edit distance to generate a plurality of respective first similarity distance scores;

normalizing the token-based edit distance by dividing by a number of tokens in a shorter of the first incoming message and the one or more stored templates;

locating an imperfectly matched template of the plurality of stored templates, based on a corresponding one of the first similarity distance scores being non-zero and less than a threshold distance from the imperfectly matched template and further being less than any other of the plurality of first similarity distance scores;

replacing a token in the imperfectly matched template with a wildcard, to reduce the corresponding first similarity distance score;

determining anomalous activity according to a pattern of messages matching the imperfectly matched template; and

automatically performing a corrective action responsive to the anomalous activity, selected from the group consisting of denying security accesses from an anomalous system, rebooting or restarting a system that has failed, and changing an alert sensitivity for future anomalous behavior.

2. The method of claim 1 , wherein the wildcard matches any token in a same position of the first incoming message.

3. The method of claim 1 , further comprising pre-processing the first incoming message to replace one or more tokens in the first incoming message with a pre-processing wildcard.

4. The method of claim 1 , further comprising:

determining a second similarity distance score for a second incoming message by comparing the second incoming message to the one or more stored templates;

determining that the second similarity distance score does not match any of the one or more stored templates; and

storing a new template that is based on the second incoming message.

5. The method of claim 4 , wherein determining that the second incoming message does not match any of the one or more stored templates includes determining that the second incoming message has a second similarity distance score for each of the one or more stored templates that is greater than the threshold distance.

6. The method of claim 4 , wherein determining the first similarity distance score and the second similarity distance score are processed in parallel.

7. The method of claim 6 , further comprising adding the second message to a shared queue after determining that the second similarity distance score does not match any of the one or more stored templates and before storing the new template.

8. A non-transitory computer readable storage medium comprising a computer readable program for log message aggregation, wherein the computer readable program when executed on a computer causes the computer to perform the steps:

tokenizing a first incoming message to generate tokens;

comparing the tokens of the first incoming message to a plurality of stored templates using a token-based edit distance to generate a plurality of respective first similarity distance score;

normalizing the token-based edit distance by dividing by a number of tokens in a shorter of the first incoming message and the one or more stored templates;

locating an imperfectly matched template of the plurality of stored templates, based on a corresponding one of the first similarity distance score being non-zero and less than a threshold distance from the imperfectly matched template and further being less than any other of the plurality of first similarity distance scores;

replacing a token in the imperfectly matched template with a wildcard, to reduce the first corresponding similarity distance score;

determining anomalous activity according to a pattern of messages matching the imperfectly matched template; and

automatically performing a corrective action responsive to the anomalous activity, selected from the group consisting of denying security accesses from an anomalous system, rebooting or restarting a system that has failed, and changing an alert sensitivity for future anomalous behavior.

9. A log aggregation system, comprising:

a hardware processor;

a memory, configured to store a plurality of templates and program code that, when executed by the hardware processor, is configured to:

tokenize a first incoming message to generate tokens;

compare the tokens of the first incoming message to the plurality of stored templates using a token-based edit distance to generate a plurality of respective first similarity distance scores;

normalizing the token-based edit distance by dividing by a number of tokens in a shorter of the first incoming message and the one or more stored templates;

locate an imperfectly matched template of the plurality of stored templates, based on a corresponding one of the first similarity distance score being non-zero and less than a threshold distance from the imperfectly matched template and further being less than any other of the plurality of first similarity distance scores;

replace a token in the imperfectly matched template with a wildcard, to reduce the corresponding first similarity distance score

determine anomalous activity according to a pattern of messages matching the imperfectly matched template; and

automatically perform a corrective action responsive to the anomalous activity, selected from the group consisting of denying security accesses from an anomalous system, rebooting or restarting a system that has failed, and changing an alert sensitivity for future anomalous behavior.

10. The log aggregation system of claim 9 , wherein the template updater is further configured to replace a token in the matched template with a new wildcard.

11. The log aggregation system of claim 9 , further comprising a message pre-processor, configured to replace one or more tokens in the first incoming message with a pre-processing wildcard.

12. The log aggregation system of claim 9 , wherein the template matcher is further configured to determine a second similarity distance score for a second incoming message by comparing the second incoming message to the one or more stored templates, and to determine that the second similarity distance score does not match any of the one or more stored templates, and further comprising a template creator, configured to store a new template that is based on the second incoming message.

13. The log aggregation system of claim 12 , wherein the template matcher is further configured to determine that the second incoming message has a second similarity distance score for each of the one or more stored templates that is greater than the threshold distance.

14. The log aggregation system of claim 12 , further comprising parallel instances, each having a separate template matcher configured to determine the first similarity distance score and the second similarity distance score in parallel.

15. The log aggregation system of claim 14 , wherein the template matcher that determines the second similarity distance score is further configured to add the second message to a shared queue after determining that the second similarity distance score does not match any of the one or more stored templates.

16. The method of claim 1 , wherein the token-based edit distance is a Levenshtein metric.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 5, 2020
From: WANG, CHEN; WU, LINGFEI
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 052574/0810 →
Continuity (1)
Related Publication 20210349895A1 · Nov 11, 2021
References Cited (37)
US 5077805A · Tan · 1991 [cited by examiner]
US 6658626B1 · Aiken · 2003 [cited by examiner]
US 7389306B2 · Schuetze · 2008 [cited by examiner]
US 7673174B2 · Swift · 2010 [cited by examiner]
US 8291319B2 · Li et al. · 2012 [cited by applicant]
US 8495429B2 · Fu · 2013 [cited by examiner]
US 10033766B2 · Gupta · 2018 [cited by examiner]
US 10200397B2 · Dhar · 2019 [cited by examiner]
US 10353756B2 · Yoon · 2019 [cited by examiner]
US 10430323B2 · Raman et al. · 2019 [cited by applicant]
US 20020099536A1 · Bordner · 2002 [cited by examiner]
US 20080126335A1 · Gandhi · 2008 [cited by examiner]
US 20090282033A1 · Alshawi · 2009 [cited by examiner]
US 20120124047A1 · Hubbard · 2012 [cited by examiner]
US 20140149107A1 · Schilder · 2014 [cited by examiner]
US 20150261745A1 · Song · 2015 [cited by examiner]
US 20150379887A1 · Becker · 2015 [cited by examiner]
US 20160239755A1 · Aggour · 2016 [cited by examiner]
US 20160350400A1 · Zhu · 2016 [cited by examiner]
US 20170132291A1 · Liu · 2017 [cited by examiner]
US 20170220545A1 · Gururajan · 2017 [cited by examiner]
US 20180060748A1 · Xu · 2018 [cited by examiner]
US 20190163674A1 · Chen · 2019 [cited by examiner]
CN 110175158A · 2019 [cited by examiner]
CN 111160021A · 2020 [cited by examiner]
CN 111240942A · 2020 [cited by examiner]
JP 2011186516A · 2011 [cited by examiner]
Julia Allen et al. , Securing Network Servers, Apr. 2000, Carnegie Mellon University, p. 4 and p. 27 (Year: 2000). [cited by examiner]
T. Kimura, A. Watanabe, T. Toyono and K. Ishibashi, “Proactive failure detection learning generation patterns of large-scale network logs,” 2015 11th International Conference on Network and Service Management (CNSM), Ba… [cited by applicant]
L. Tang and T. Li, “LogTree: A Framework for Generating System Events from Raw Textual Logs,” 2010 IEEE International Conference on Data Mining, Sydney, NSW, Dec. 2010, pp. 491-500. [cited by applicant]
M. Du and F. Li, “Spell: Streaming Parsing of System Event Logs,” 2016 IEEE 16th International Conference on Data Mining (ICDM), Barcelona, Dec. 2016, pp. 859-864. [cited by applicant]
Authors et al.: IBM, “Method and System for Mining Typed Social Network Information”, IP.com No. IPCOM000191371D, Dec. 2009, pp. 1-3. [cited by applicant]
Authors et al.: Disclosed Anonymously, “Intelligent log framework for distributed environment applications”, IP.com No. IPCOM000220081D, Jul. 2012, pp. 1-7. [cited by applicant]
Authors et al.: Disclosed Anonymously, “Method and cognitive system for creating and updating “User Email Writing Profile””, IP.com No. IPCOM000247047D, Jul. 2016, pp. 1-27. [cited by applicant]
Hamooni et al., “Logmine: Fast pattern recognition for log analytics”, DOI: 10.1145/2983323.2983358, Oct. 2016, 11 pages. [cited by applicant]
Mizutani Masayoshi, “Incremental Mining of System Log Format”, 2013 IEEE International Conference on Services Computing, Jun. 28, 2013-Jul. 3, 2013, pp. 595-602. [cited by applicant]
Shima Keiichi, “Length matters: Clustering system log messages using length of words”, arXiv: 1611.03213v1, Nov. 10, 2016, 10 pages. [cited by applicant]