Method and equipment for fast online log clustering

文档序号:7658 发布日期:2021-09-17 浏览:30次 中文

1. A method of fast online log clustering, wherein the method comprises:

acquiring current log data of equipment to be analyzed;

constructing a variable identification rule base and a separator identification rule base of log data;

performing variable word segmentation processing on the current log data by using the variable identification rule base to obtain a first word segmentation result, and performing word segmentation processing on the first word segmentation result again by using the separator identification rule base to obtain target segmentation log data, wherein each piece of target segmentation log data comprises a plurality of component words;

and rapidly clustering the target segmentation log data based on the maximum distance window of the component words.

2. The method of claim 1, wherein constructing a variable identification rule base and a delimiter identification rule base for log data comprises:

constructing a variable identification rule base according to the variable name, the regular expression and the corresponding pre-phrase of the log data;

and constructing a separator identification rule base according to the regular expression of the log data separator and the corresponding front phrase.

3. The method of claim 2, wherein performing variable word segmentation on the log data using the variable recognition rule base comprises:

identifying variables in the log data according to the variable names and the preposed phrases by using the variable identification rule base;

replacing the variable with a key value pair in a preset format based on the regular expression to obtain log data after variable identification;

and segmenting the log data after the variable identification by a segment cache-based progressive rapid word segmentation method.

4. The method of claim 3, wherein before segmenting the first segmentation result based on a segment cache progressive fast segmentation method, the method comprises:

constructing an empty hash table for segment word segmentation caching, wherein keys of the hash table comprise log segments and variable names, and values of the hash table comprise first word segmentation results;

and storing the first word segmentation result in the hash table according to a key value pair mode, and generating a component word list of the log segment.

5. The method of claim 4, wherein storing the first segmentation result in the hash table in a key-value pair manner comprises:

and searching for matching from the hash table according to the log fragments and the variable names, if the log fragments and the variable names are not matched, performing variable word segmentation on the log data by using the variable identification rule base, and storing a first word segmentation result obtained by word segmentation in the hash table according to a key value pair mode.

6. The method of claim 3, wherein identifying variables in the log data according to the variable name and the preamble phrase using the variable identification rule base comprises:

and scanning the log fragment contents of the current log data one by one, judging whether the log fragment contents contain the variable names by using the pre-phrases in the variable identification rule, and identifying the variables corresponding to the variable names if the log fragment contents contain the variable names.

7. The method of claim 4, wherein fast clustering the target segmented log data based on a maximum distance window of component words comprises:

calculating the distance between component word lists of log segments corresponding to the target segmentation log data;

constructing a maximum distance window according to the set maximum allowable distance of the log data;

and rapidly clustering the target segmentation log data based on the distance between the maximum distance window and the component word list.

8. The method of claim 7, wherein calculating the distance between the component word lists of the log segments corresponding to the target split log data comprises:

and determining the distance between the component word lists of the log segments corresponding to the target segmentation log data according to the proportion of the number of different component words between the component word lists of the log segments corresponding to the target segmentation log data.

9. The method of claim 7, wherein constructing the maximum distance window according to the set maximum allowable distance of the log data comprises:

and determining a maximum distance window according to the set maximum allowable distance of the log data and the length of the log data of the device to be analyzed.

10. The method of claim 9, wherein fast clustering the target split log based on the distance between the maximum distance window and the list of component words comprises:

finding the current distance of the target segmentation log data based on the maximum distance window;

when the distance of the current log is smaller than the distance between the component word lists, clustering the target segmentation log data to a clustering list;

and when the current log distance is greater than the distance between the component word lists, uniformly placing the target segmentation log data into the last element in the cluster list table.

11. An apparatus for fast clustering of online logs, wherein the apparatus comprises:

the device comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring current log data of a device to be analyzed;

the construction unit is used for constructing a variable identification rule base and a separator identification rule base of the log data;

and the standard word segmentation unit is used for performing variable word segmentation processing on the current log data by using the variable identification rule base. Obtaining a first segmentation result, and performing segmentation processing on the first segmentation result again by using the separator recognition rule base to obtain target segmentation log data, wherein each piece of target segmentation log data comprises a plurality of component words;

and the clustering unit is used for rapidly clustering the target segmentation log data based on the maximum distance window of the component words.

12. A computer readable medium having stored thereon computer readable instructions executable by a processor to implement the method of any one of claims 1 to 10.

13. An apparatus for fast online log clustering, wherein the apparatus comprises:

one or more processors; and

memory storing computer readable instructions that, when executed, cause the processor to perform the operations of the method of any of claims 1 to 10.

Background

With the rapid development of internet services, internet enterprises attach more and more importance to the operation and maintenance of service systems, and the operation and maintenance are related to the vital interests of the enterprises. Because each log records the description of the date, time, operation event, event initiator and other related information, the problem of troubleshooting in the intelligent operation and maintenance mainly refers to log data, and the problem finding and positioning through the logs is a common operation and maintenance method. However, with the improvement of the performance of the computer server and the huge application service engineering, the enterprise application service generates massive log files at all times, the data volume of the log is often huge, and the logs are combined according to the content similarity in a clustering mode, so that operation and maintenance personnel can be helped to effectively master the overall view of the log, and the problem is quickly positioned.

At present, when most application servers have problems, the logs of system operation are classified by adopting a mode of manually checking the logs. However, as the number of enterprise application logs increases, manual logging and sorting is inefficient. Meanwhile, clustering is taken as a key research direction in the field of machine learning, a large number of algorithms are already provided to support text clustering, but the existing method is more suitable for offline and clustering of a small amount of data and is difficult to be used for log clustering, because logs are massive data, the traditional clustering method can consume a huge amount of memory and computing power, and meanwhile, the logs can be generated rapidly and continuously, sub-second-level clustering needs to be performed on newly generated logs in real time, and the traditional clustering method cannot perform the clustering. At present, no effective solution is provided for the problem of low log classification efficiency in the related technology and the problem of low classification result availability caused by randomly selecting a cluster center.

Disclosure of Invention

An object of the present application is to provide a method and device for fast online log clustering, which solve the problem in the prior art that high-speed and real-time log clustering is difficult to achieve under conventional hardware resource conditions, so as to meet the log operation and maintenance requirements of mass data and improve the log data analysis efficiency.

According to one aspect of the present application, there is provided a method for fast online log clustering, the method comprising:

acquiring current log data of equipment to be analyzed;

constructing a variable identification rule base and a separator identification rule base of log data;

performing variable word segmentation processing on the current log data by using the variable identification rule base to obtain a first word segmentation result, and performing word segmentation processing on the first word segmentation result again by using the separator identification rule base to obtain target segmentation log data, wherein each piece of target segmentation log data comprises a plurality of component words;

and rapidly clustering the target segmentation log data based on the maximum distance window of the component words.

Further, the constructing a variable identification rule base and a separator identification rule base of the log data comprises:

constructing a variable identification rule base according to the variable name, the regular expression and the corresponding pre-phrase of the log data;

and constructing a separator identification rule base according to the regular expression of the log data separator and the corresponding front phrase.

Further, the performing variable word segmentation processing on the log data by using the variable identification rule base includes:

identifying variables in the log data according to the variable names and the preposed phrases by using the variable identification rule base;

replacing the variable with a key value pair in a preset format based on the regular expression to obtain log data after variable identification;

and segmenting the log data after the variable identification by a segment cache-based progressive rapid word segmentation method.

Further, before the segmentation is performed on the first segmentation result by the segment cache-based progressive fast segmentation method, the method includes:

constructing an empty hash table for segment word segmentation caching, wherein keys of the hash table comprise log segments and variable names, and values of the hash table comprise first word segmentation results;

and storing the first word segmentation result in the hash table according to a key value pair mode, and generating a component word list of the log segment.

Further, the storing the first segmentation result in the hash table according to a key-value pair manner includes:

and searching for matching from the hash table according to the log fragments and the variable names, if the log fragments and the variable names are not matched, performing variable word segmentation on the log data by using the variable identification rule base, and storing a first word segmentation result obtained by word segmentation in the hash table according to a key value pair mode.

Further, the identifying the variable in the log data according to the variable name and the pre-phrase by using the variable identification rule base comprises:

and scanning the log fragment contents of the current log data one by one, judging whether the log fragment contents contain the variable names by using the pre-phrases in the variable identification rule, and identifying the variables corresponding to the variable names if the log fragment contents contain the variable names.

Further, the fast clustering of the target segmentation log data based on the maximum distance window of the component words includes:

calculating the distance between component word lists of log segments corresponding to the target segmentation log data;

constructing a maximum distance window according to the set maximum allowable distance of the log data;

and rapidly clustering the target segmentation log data based on the distance between the maximum distance window and the component word list.

Further, the calculating a distance between component word lists of log segments corresponding to the target split log data includes:

and determining the distance between the component word lists of the log segments corresponding to the target segmentation log data according to the proportion of the number of different component words between the component word lists of the log segments corresponding to the target segmentation log data.

Further, the constructing a maximum distance window according to the set maximum allowable distance of the log data includes:

and determining a maximum distance window according to the set maximum allowable distance of the log data and the length of the log data of the device to be analyzed.

Further, the fast clustering the target segmentation log data based on the distance between the maximum distance window and the component word list includes:

finding the current log distance of the target segmentation log data based on the maximum distance window;

when the current log distance is smaller than the distance between the component word lists, clustering the target segmentation log data into a cluster list;

and when the current log distance is greater than the distance between the component word lists, uniformly placing the target segmentation log data into the last element in the cluster list table.

According to another aspect of the present application, there is also provided an apparatus for fast online log clustering, the apparatus including: an acquisition device, a construction device, a standard word segmentation device and a clustering device,

the acquisition device is used for acquiring the current log data of the equipment to be analyzed;

the construction device constructs a variable identification rule base and a separator identification rule base of the log data;

and the standard word segmentation device performs variable word segmentation on the current log data by using the variable identification rule base. Obtaining a first segmentation result, and performing segmentation processing on the first segmentation result again by using the separator recognition rule base to obtain target segmentation log data, wherein each piece of target segmentation log data comprises a plurality of component words;

and the clustering device is used for rapidly clustering the target segmentation log data based on the maximum distance window of the component words.

According to another aspect of the present application, there is also provided a computer readable medium having stored thereon computer readable instructions executable by a processor to implement the foregoing method for fast online log clustering.

According to still another aspect of the present application, there is also provided an apparatus for fast online log clustering, the apparatus including:

one or more processors; and

a memory storing computer readable instructions that, when executed, cause the processor to perform the operations of the aforementioned method.

Compared with the prior art, the method and the device have the advantages that the current log data of the device to be analyzed are obtained; constructing a variable identification rule base and a separator identification rule base of log data; performing variable word segmentation processing on the current log data by using the variable identification rule base to obtain a first word segmentation result, and performing word segmentation processing on the first word segmentation result again by using the separator identification rule base to obtain target segmentation log data, wherein each piece of target segmentation log data comprises a plurality of component words; and rapidly clustering the target segmentation log data based on the maximum distance window of the component words. The problem that high-speed and real-time log clustering is difficult to realize under the conventional hardware resource condition in the prior art is solved, so that the log operation and maintenance requirements of mass data are met.

Drawings

Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:

FIG. 1 illustrates a flow diagram of a method for fast online log clustering according to one aspect of the present application;

FIG. 2 is a flow diagram illustrating an overview of fast online clustering according to an embodiment of the present application;

FIG. 3 is a block diagram illustrating an apparatus for fast online log clustering according to an aspect of the present application.

The same or similar reference numbers in the drawings identify the same or similar elements.

Detailed Description

The present application is described in further detail below with reference to the attached figures.

In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party each include one or more processors (e.g., Central Processing Units (CPUs)), input/output interfaces, network interfaces, and memory.

The Memory may include volatile Memory in a computer readable medium, Random Access Memory (RAM), and/or nonvolatile Memory such as Read Only Memory (ROM) or flash Memory (flash RAM). Memory is an example of a computer-readable medium.

Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, Phase-Change RAM (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), flash Memory or other Memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, magnetic cassette tape, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.

The embodiment provides a method for fast clustering online logs, which may be used for fast clustering online logs, and fig. 1 shows a flowchart of a method for fast clustering online logs, which is provided according to an aspect of the present application, and the method includes: step S11 to step S14, wherein,

step S11, acquiring current log data of the device to be analyzed; the current log data of the device to be analyzed is obtained through File reading, Syslog receiving, SNMP Trap receiving, File Beat and other modes, the current log data includes an online current log or alarm data, the device to be analyzed includes a network device (such as a server) or a mobile terminal device and other devices which have a system and operate, and the online log data of the device is collected.

Step S12, constructing a variable identification rule base and a separator identification rule base of log data; here, the variable identification rule base of the log data is constructed according to the variable name, the regular expression and the corresponding pre-phrase of the log data, and the separator identification rule base is constructed according to the regular expression and the corresponding pre-phrase of the separator of the log data; the regular expression is used for identifying variables in the log and replacing variable parts with variable names: variable value } key value pair in format is used for extracting the part which changes continuously in the log, and meanwhile, the preposed phrase is used for quickly judging the variable in the log, so that the variable identification speed is improved. The rules for identifying time are for example as follows:

[ ('TIME', '\ d {1,2}: d {2} (\\ d {3,9} Z)?' { ':2}), {': 2} is a prepositioned shortword, which is expressed in the sense that the target string must contain at least 2: marks to possibly contain a TIME variable.

The same format as the variable identification rule base, and the delimiter identification rule base is used to identify delimiters, such as: { ' DELIM ','s + |. ' } indicating that more than one consecutive blank or | or period is a separator, is extracted as a separator when such text is identified in the log.

Step S13, performing variable word segmentation on the current log data by using the variable identification rule base to obtain a first word segmentation result, and performing word segmentation again on the first word segmentation result by using the delimiter identification rule base to obtain target segmentation log data, where each piece of target segmentation log data includes a plurality of component words; in the variable word segmentation, a sentence is segmented according to a specific rule, so that query and attribute assignment are facilitated. The variable identification rule base of the log data is constructed according to the variable name, the regular expression and the corresponding pre-phrase of the log data, so that the variable name and the pre-phrase of the regular expression in the log can be identified by using the variable identification rule base, the log is segmented according to the identified type, after each variable is identified, the current log segment is segmented according to the boundary of the variable, and a first segmentation result is obtained, for example, the starting time of the' host 192.168.1.1 is 192 seconds. ' after the identification is carried out according to the variable identification rule base, the segmentation obtains that the starting time of the host 192.168.1.1 is ' NUM:192 and ' second. '], the segmentation is continuously identified according to the variables, and the values of [' host ', { IP:192.168.1.1},' startup time is ', { NUM:192}, and' second are obtained. ']. And then the data is segmented again through a separator identification rule base, so that the following can be obtained: [ 'host', { DEMLIM: }, { IP:192.168.1.1}, { DEMLIM: }, 'Start time is', { DEMLIM: }, { NUM:192}, { DEMLIM: }, 'second', { DEMLIM:. And obtaining target segmentation log data, wherein the target segmentation log data is log data obtained by final segmentation, the log data obtained by final segmentation comprises a plurality of component words (tokens), and further, a complete log is segmented into tokens one by one and variables in the tokens are replaced.

Step S14, rapidly clustering the target segmentation log data based on the maximum distance window of the component words; here, the number (len) of component words passing through the current log based on the maximum distance window of the component words is calculated by the following formula, and the section of the maximum distance window is: [ left ═ 1-max _ dist × (len), right ═ 1+ max _ dist × (len + 1). The segmented data is used for calculating the distance between the component word lists of the log segments corresponding to the target segmented log data. In the method, variable word segmentation processing is carried out on the current log data of the equipment to be analyzed by constructing a variable identification rule base and a segmentation symbol identification rule base of the log data, so that the target segmented log data are rapidly clustered based on a maximum distance window of component words, and user requirements are met.

In an embodiment of the present application, in step S12, a variable identification rule base and a delimiter identification rule base of log data are constructed; here, the variable identification rule base is a list of a plurality of "variable names, regular expressions, and corresponding prepositions", such as: the method comprises the following steps of [ (' TIME ', ' \ d {1,2}: d {2} (\\ d {3,9} Z)? {'d + ', None) ], wherein two rules are arranged in a rule base, namely variable names TIME and NUM respectively, short word TIME is arranged in advance to match log data according to the sequence of the variable rule base, and a segmentation result is determined by NUM matching. The preposed short words are related to variables, different variables are different preposed short words, and the preposed short words can be extracted by selecting the most obvious characteristics of the variables, such as: the time variable in the form of 18:01:34 has the greatest characteristic of two colons, so that the preposed short word can be set as two colons, and 6 numbers can be used here, namely '\ d':6, but the 6 numbers are longer, and the acceleration effect of the time variable is probably not as good as two: the setting rule of the preposed short words is determined according to the recognition speed of the features. Meanwhile, a separator identification rule base is constructed according to separators between the variable names and the regular expressions and between the regular expressions and the corresponding pre-phrases.

In an embodiment of the present application, in step S13, the variable recognition rule base is used to perform variable word segmentation on the current log data to obtain a first word segmentation result, and the separator recognition rule base is used to perform word segmentation again on the first word segmentation result to obtain target segmentation log data, where each piece of target segmentation log data includes multiple component words. Firstly, identifying variables in the log data according to the variable names and the preceding phrases by using the variable identification rule base; replacing the variable with a key value pair in a preset format based on the regular expression to obtain log data after variable identification; finally, performing word segmentation on the log data after the variable identification based on a progressive fast word segmentation method of the segment cache to obtain a first word segmentation result; and re-segmenting the segmentation result after the segmentation of the progressive fast segmentation method through segment caching by combining with a separator identification rule base. And scanning the log fragment contents of the current log data one by one, judging whether the log fragment contents contain the variable names by using the pre-phrases in the variable identification rule, and identifying the variables corresponding to the variable names if the log fragment contents contain the variable names. Then segmenting the first segmentation result based on a progressive fast segmentation method of segment cache, and before the segmentation, constructing an empty hash table for segment segmentation cache, wherein keys of the hash table comprise log segments and variable names, and values of the hash table comprise the first segmentation result; and storing the first word segmentation result in the hash table in a key-value pair mode, wherein matching is searched from the hash table according to the log segment and the variable name, if the matching is not achieved, variable word segmentation processing is carried out on the log data by using the variable identification rule base, the first word segmentation result obtained by word segmentation is stored in the hash table in the key-value pair mode, and a component word list of the log segment is generated. For example: the [' host 192.168.1.1 startup time was 192 seconds. ' ], after one cut: [ ' host 192.168.1.1 startup time is ', { NUM:192}, ' seconds. ' ], after the secondary cutting, the following steps are carried out: [ ' host ', { IP:192.168.1.1}, ' boot time is ', { NUM:192}, ' second. ' ], obtaining a first result of the word segmentation; before each log segment is segmented, searching is firstly carried out from a segment word segmentation cache according to the name of the log segment and the name of the variable, if the word segmentation result of the existing cache is available, the existing word segmentation result can be directly taken out, if the word segmentation result of the existing cache is not available, segmentation is carried out according to the method, and then the word segmentation cache is stored, so that the existing word segmentation result can be effectively utilized, the same log segment and the same variable do not need to be segmented repeatedly any more, and the cache failure caused by the variable in the log can be avoided based on the log segment instead of the cache mode based on the whole log; the obtained first cut result is cut again through a separator identification rule base, so that the following results can be obtained: [ 'host', { DEMLIM: }, { IP:192.168.1.1}, { DEMLIM: }, 'Start time is', { DEMLIM: }, { NUM:192}, { DEMLIM: }, 'second', { DEMLIM:. }]. It should be noted that, the variable identification rule base and the delimiter identification rule base both include a pre-phrase, in the variable identification process in the embodiment of the present application, the rule is extracted from the variable identification rule base, the contents of the log segments are scanned one by one, during scanning, the pre-phrase is first used to check whether the log may include a variable, if possible, the pre-phrase is further used to match and replace the variable, if not, the pre-phrase is directly skipped, where the pre-phrase is simple regular or string matching.

In an embodiment of the present application, in step S14, the target segmentation log data is quickly clustered based on the maximum distance window of the component words. Firstly, calculating the distance between component word lists of log segments corresponding to the target segmentation log data, for example, two logs are provided, which are respectively:

log 1: the starting time of the host computer 192.168.1.1 is 12 seconds;

log 2: the starting time of the host computer 192.168.1.2 is 1 second;

after word segmentation, the method is changed into:

tokens 1: [ 'host', '192.168.1.1', 'start time is', '12', 'seconds' ]

tokens 2: [ 'host', '192.168.1.2', 'start time is', '1', 'seconds' ]

192.168.1.1 in tokens1 and 192.168.1.2 in tokens2 are different component words, as are numbers 12 and 1; here, the distance between the component word lists of the log segments corresponding to the target segmentation log data is determined according to the proportion of the number of different component words between the component word lists of the log segments corresponding to the target segmentation log data, and we can calculate that the distance between token 1 and token2 is 0.2; assuming a maximum allowable distance of 0.3, tokens1 and 2 can be grouped into corresponding clusters because the distance between tokens1 and token2 is 0.2 less than the maximum allowable distance. Further, a maximum distance window is constructed according to the set maximum allowable distance of the log data, and we can know based on a maximum distance window formula that:

[left=(1-max_dist)·len,right=(1+max_dist)·len+1)]

=[left=(1-0.3)·5,right=(1+0.3)·5+1)]

=[left=3.5,right=7.5]

further, the target segmentation log data is quickly clustered based on the distance between the maximum distance window and the component word list. According to the calculation, as the length of the log needs to be an integer, the number of the component words can be 4, 5, 6 and 7, the value ranges of the component words are limited only by comparing the value intervals during distance comparison, the component words are not searched in all logs, and meanwhile, the cluster outside the maximum distance window does not meet the maximum distance condition, so that the clustering speed is accelerated, further, the middle position of the interval, namely the index number closest to len, is most likely to be close to the current log distance, namely, the searching method adopts a mode of searching from the middle to two sides, which is equivalent to the number of the component words in the calculation being 5 and 6, so that the searching speed is further accelerated, and the requirement of real-time clustering is met.

In an embodiment of the present application, as shown in fig. 2, the method of the cluster summary flowchart includes: collecting logs; then extracting variables and segmenting words; further, traversing each class cluster in the maximum distance window, judging the distance between the class cluster and the representative log of the class cluster, and adding the class cluster to the existing class cluster when the distance between the class cluster and the representative log of the class cluster is smaller than or equal to the maximum allowable distance; and when the distance between the log and the representative log of the class cluster is greater than the maximum allowable distance, creating a new class cluster and finishing clustering. Here, the representative log is the first log in a cluster, that is, the first log put into the cluster when the cluster is newly created.

In an embodiment of the application, the current distance of the target segmentation log data is found based on the maximum distance window; it is possible to obtain: when the distance of the current log is smaller than the distance between the component word lists, clustering the target segmentation log data to a clustering list; and when the current log distance is greater than the distance between the component word lists, uniformly placing the target segmentation log data into the last element in the cluster list table. The cluster list is pre-allocated, the length of the cluster list is not required to be long, but the length of the component word list can be long and exceeds the maximum length of the cluster list, so that logs exceeding the maximum length of the cluster list are placed in the last element of the cluster list for storage, and query and clustering speed is accelerated.

In addition, a computer readable medium is provided in the embodiments of the present application, and computer readable instructions are stored thereon, and the computer readable instructions can be executed by a processor to implement the foregoing method for fast online log clustering.

Corresponding to the method described above, the present application also provides a terminal, which includes modules or units capable of executing the method steps described in fig. 1, fig. 2 or various embodiments, and these modules or units may be implemented by hardware, software or a combination of hardware and software, and the present application is not limited thereto.

According to still another aspect of the present application, there is also provided an apparatus for fast online log clustering, wherein the apparatus includes:

one or more processors; and

a memory storing computer readable instructions that, when executed, cause the processor to perform the operations of the foregoing one method of fast online log clustering.

For example, the computer readable instructions, when executed, cause the one or more processors to:

acquiring current log data of equipment to be analyzed;

constructing a variable identification rule base and a separator identification rule base of log data;

and performing variable word segmentation processing on the current log data by using the variable identification rule base. Obtaining a first segmentation result, and performing segmentation processing on the first segmentation result again by using the separator recognition rule base to obtain target segmentation log data, wherein each piece of target segmentation log data comprises a plurality of component words;

and rapidly clustering the target segmentation log data based on the maximum distance window of the component words.

Fig. 3 is a schematic structural diagram of an apparatus for fast online log clustering according to still another aspect of the present application, where the apparatus includes: the system comprises an acquisition device 11, a construction device 12, a standard word segmentation device 13 and a clustering device 14, wherein the acquisition device 11 is used for acquiring current log data of equipment to be analyzed; the constructing device 12 is used for constructing a variable identification rule base and a separator identification rule base of the log data; and the normative word segmentation device 13 is used for performing variable word segmentation processing on the current log data by using the variable identification rule base. Obtaining a first segmentation result, and performing segmentation processing on the first segmentation result again by using the separator recognition rule base to obtain target segmentation log data, wherein each piece of target segmentation log data comprises a plurality of component words; the clustering device 14 is used for fast clustering the target segmentation log data based on the maximum distance window of the component words.

It should be noted that the content executed by the obtaining device 11, the constructing device 12, the canonical division device 13, and the clustering device 14 is the same as or corresponding to the content in the above steps S11, S12, S13, and S14, and for brevity, the description is omitted here.

It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

It should be noted that the present application may be implemented in software and/or a combination of software and hardware, for example, implemented using Application Specific Integrated Circuits (ASICs), general purpose computers or any other similar hardware devices. In one embodiment, the software programs of the present application may be executed by a processor to implement the steps or functions described above. Likewise, the software programs (including associated data structures) of the present application may be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Additionally, some of the steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.

In addition, some of the present application may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or techniques in accordance with the present application through the operation of the computer. Program instructions which invoke the methods of the present application may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal-bearing medium and/or stored within a working memory of a computer device operating in accordance with the program instructions. An embodiment according to the present application comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform a method and/or a solution according to the aforementioned embodiments of the present application.

It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:基于单级数据库的数据查询方法、装置、设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!