Intelligent analysis method for massive logs
Through a massive log intelligent analysis method, including data collection, preprocessing, feature extraction and analysis, the problems of inefficiency and low accuracy of traditional log analysis methods are solved, and the rapid and accurate analysis of massive log data is achieved, and the rapid and accurate analysis of massive log data is improved. The processing efficiency and reduce operation and maintenance costs.
Patent Information
- Application Number
- CN202411142306.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2025-02-11
AI Technical Summary
Traditional log analysis methods are inefficient and have low accuracy, and cannot detect problems in a timely manner, making it difficult to meet the needs of enterprises for log analysis.
Provide a massive log intelligent analysis method, including data collection, data preprocessing, feature extraction, data analysis and result display. Log data is collected in real time through log collection tools, clean, format and standardize, extract key features, and use natural language processing and machine learning technology for in-depth analysis.
It realizes rapid and accurate analysis of massive log data, timely discovers potential security threats and business trends, improves processing efficiency, real-timeness and accuracy, and reduces operation and maintenance costs and security risks.
Smart Images

Figure CN119415483A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing and analysis, and in particular to a method for intelligent analysis of massive logs. Background Art
[0002] As the degree of enterprise informatization continues to increase, massive log data has become an indispensable part of daily enterprise operations. However, traditional log analysis methods have shortcomings such as low efficiency, low accuracy, and inability to detect problems in a timely manner, making it difficult to meet the needs of enterprises for log analysis.
[0003] Therefore, those skilled in the art provide a method for intelligent analysis of massive logs to solve the problems raised in the above background technology. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a method for intelligent analysis of massive logs.
[0005] The following steps are involved:
[0006] S1. Data collection: Log data is collected from various systems and devices in real time through log collection tools, and stored in the storage system;
[0007] S2. Data preprocessing: Clean, format, and standardize the collected log data to improve data quality and analyzability;
[0008] S3, feature extraction: extract key features from the preprocessed log data;
[0009] S4. Data analysis: Based on the extracted features, conduct in-depth analysis and mining of log data to discover potential problems and patterns;
[0010] S5. Result display: The analysis results are displayed to users in a visual form, which makes it easier for users to quickly understand and analyze the results. At the same time, alarm and early warning functions are provided to timely discover and deal with problems.
[0011] Preferably, in S1, the log collection tool adopts Flume, and Flume realizes the collection, transmission and storage of logs by defining three components: Source, Channel and S i nk.
[0012] Preferably, the Source is responsible for collecting log data from various systems and devices in real time, Channel is used as a buffer to temporarily store log data, and S i nk sends the log data to the storage system for storage. In this case, the storage system uses HDFS.
[0013] Preferably, in S1, the log collection tool adopts ELK Stack, and ELK Stack realizes log collection and processing by defining three stages: input, filter and output.
[0014] Preferably, the input stage is responsible for receiving log data from various data sources, the filter stage cleans and converts the log data, and the output stage sends the processed log data to a storage system for storage. In this case, the storage system uses Elasticsearch.
[0015] Preferably, in S2, the log data cleaning process includes removing duplicate data, processing missing values, identifying and processing outliers, and removing noise data;
[0016] Deduplication: Use unique identifiers to identify and remove duplicates;
[0017] Handling missing values: Determine which fields are required and decide how to handle missing values;
[0018] Identify and handle outliers: Identify and handle outliers based on business logic and domain knowledge;
[0019] Remove noise data: Delete data and fields that are irrelevant to the analysis target.
[0020] Preferably, the unique identifier may be a timestamp or an event ID, the method for processing missing values may be one or more of filling in default values, deleting related records, and interpolating values, and the abnormal value is a value that exceeds a reasonable range.
[0021] Preferably, in S2, log data formatting includes timestamp formatting, text field cleaning, field name unification and data type conversion;
[0022] Timestamp formatting: Ensure that timestamps are in a consistent format and convert them into time units that are convenient for analysis;
[0023] Text field cleaning: remove irrelevant characters, spaces, and line breaks in text fields to ensure the cleanliness of text fields;
[0024] Unify field names: unify all field names into naming rules with clear meanings to facilitate subsequent analysis and query;
[0025] Data type conversion: Convert data to the appropriate data type based on the actual meaning of the field.
[0026] Preferably, in S2, log data standardization includes minimum-maximum standardization, Z-score standardization and decimal calibration standardization;
[0027] Minimum-maximum normalization: linearly transform the data to the interval [0,1];
[0028] Z-score standardization: convert the data into a distribution with a mean of 0 and a standard deviation of 1;
[0029] Decimal scaling standardization: Standardization is performed by moving the decimal point position of the data.
[0030] Preferably, in S3, the technology for proposing key features is natural language processing and machine learning, and the key features are timestamp, event type, and abnormal information.
[0031] Preferably, in S4, association analysis, cluster analysis, and anomaly detection methods are used to analyze the data.
[0032] Technical effects and advantages of the present invention:
[0033] Through the massive log intelligent analysis method of the present invention, enterprises can realize rapid and accurate analysis of massive log data, timely discover potential security threats and business trends, and provide strong support for the business operations and IT operations of the enterprise. Compared with traditional methods, the present invention improves processing efficiency, real-time and accuracy, and reduces operation and maintenance costs and security risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is a structural block diagram of a method for intelligent analysis of massive logs provided in an embodiment of the present application;
[0035] Figure 2 It is a structural block diagram of data collection in a method for intelligent analysis of massive logs provided in an embodiment of the present application;
[0036] Figure 3 This is a structural block diagram of data preprocessing in a method for intelligent analysis of massive logs provided in an embodiment of the present application; DETAILED DESCRIPTION
[0037] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The embodiments of the present invention are provided for the purpose of illustration and description, and are not intended to be exhaustive or to limit the present invention to the disclosed forms. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present invention, and to enable those of ordinary skill in the art to understand the present invention and thereby design various embodiments with various modifications suitable for specific uses.
[0038] Example 1
[0039] See also Figures 1 to 3 In this embodiment, a method for intelligent analysis of massive logs is provided.
[0040] The following steps are involved:
[0041] S1. Data collection: Log data is collected from various systems and devices in real time through log collection tools, and stored in the storage system;
[0042] The log collection tool uses Flume, which implements log collection, transmission and storage by defining three components: Source, Channel and Single.
[0043] The Source is responsible for collecting log data from various systems and devices in real time. Channel is used as a buffer to temporarily store log data. S i nk sends log data to the storage system for storage. At this time, the storage system uses HDFS.
[0044] S2. Data preprocessing: Clean, format, and standardize the collected log data to improve data quality and analyzability;
[0045] The log data cleaning process includes removing duplicate data, handling missing values, identifying and handling outliers, and removing noise data;
[0046] Remove duplicate data: use unique identifiers to identify and delete duplicates; handle missing values: determine which fields are required and decide how to handle missing values; identify and handle outliers: identify and handle outliers based on business logic and domain knowledge; remove noise data: delete data and fields that are not related to the analysis target; the unique identifier can be a timestamp or event ID, and the method for handling missing values is one or more of filling default values, deleting related records, and interpolation. The outliers are values that are beyond a reasonable range;
[0047] Log data formatting includes timestamp formatting, text field cleaning, field name unification, and data type conversion;
[0048] Timestamp formatting: ensure that the timestamp format is unified and converted into a time unit that is easy to analyze; text field cleaning: remove irrelevant characters, spaces, and line breaks in the text field to ensure the cleanliness of the text field; field name unification: unify all field names into naming rules with clear meanings for subsequent analysis and query; data type conversion: convert data into the appropriate data type based on the actual meaning of the field;
[0049] Log data normalization includes minimum-maximum normalization, Z-score normalization, and decimal scaling normalization;
[0050] Minimum-maximum standardization: linearly transform the data to the interval [0,1]; Z-score standardization: convert the data into a distribution with a mean of 0 and a standard deviation of 1; decimal calibration standardization: standardize by moving the decimal point position of the data;
[0051] S3, feature extraction: extract key features from the preprocessed log data;
[0052] The technologies for proposing key features are natural language processing and machine learning, and the key features are timestamp, event type, and abnormal information.
[0053] S4. Data analysis: Based on the extracted features, conduct in-depth analysis and mining of log data to discover potential problems and patterns;
[0054] Use association analysis, cluster analysis, and anomaly detection methods to analyze the data;
[0055] S5. Result display: The analysis results are displayed to users in a visual form, which makes it easier for users to quickly understand and analyze the results. At the same time, alarm and early warning functions are provided to timely discover and deal with problems.
[0056] Example 2
[0057] See also Figures 1 to 3 In this embodiment, a method for intelligent analysis of massive logs is provided.
[0058] The following steps are involved:
[0059] S1. Data collection: Log data is collected from various systems and devices in real time through log collection tools, and stored in the storage system;
[0060] The log collection tool uses ELK Stack, which implements log collection and processing by defining three stages: input, filter, and output;
[0061] The input stage is responsible for receiving log data from various data sources, the filter stage cleans and converts the log data, and the output stage sends the processed log data to the storage system for storage. At this time, the storage system uses Elasticsearch;
[0062] S2. Data preprocessing: Clean, format, and standardize the collected log data to improve data quality and analyzability;
[0063] The log data cleaning process includes removing duplicate data, handling missing values, identifying and handling outliers, and removing noise data;
[0064] Remove duplicate data: use unique identifiers to identify and delete duplicates; handle missing values: determine which fields are required and decide how to handle missing values; identify and handle outliers: identify and handle outliers based on business logic and domain knowledge; remove noise data: delete data and fields that are not related to the analysis target; the unique identifier can be a timestamp or event ID, and the method for handling missing values is one or more of filling default values, deleting related records, and interpolation. The outliers are values that are beyond a reasonable range;
[0065] Log data formatting includes timestamp formatting, text field cleaning, field name unification, and data type conversion;
[0066] Timestamp formatting: ensure that the timestamp format is unified and converted into a time unit that is easy to analyze; text field cleaning: remove irrelevant characters, spaces, and line breaks in the text field to ensure the cleanliness of the text field; field name unification: unify all field names into naming rules with clear meanings for subsequent analysis and query; data type conversion: convert data into the appropriate data type based on the actual meaning of the field;
[0067] Log data normalization includes minimum-maximum normalization, Z-score normalization, and decimal scaling normalization;
[0068] Minimum-maximum standardization: linearly transform the data to the interval [0,1]; Z-score standardization: convert the data into a distribution with a mean of 0 and a standard deviation of 1; decimal calibration standardization: standardize by moving the decimal point position of the data;
[0069] S3, feature extraction: extract key features from the preprocessed log data;
[0070] The technologies for proposing key features are natural language processing and machine learning, and the key features are timestamp, event type, and abnormal information.
[0071] S4. Data analysis: Based on the extracted features, conduct in-depth analysis and mining of log data to discover potential problems and patterns;
[0072] Use association analysis, cluster analysis, and anomaly detection methods to analyze the data;
[0073] S5. Result display: The analysis results are displayed to users in a visual form, which makes it easier for users to quickly understand and analyze the results. At the same time, alarm and early warning functions are provided to timely discover and deal with problems.
[0074] Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field and related fields without creative work should fall within the scope of protection of the present invention. The structures, devices and operating methods not specifically described and explained in the present invention are implemented according to the conventional means in the field unless otherwise specified and limited.
Claims
1. A method for intelligent analysis of massive logs, characterized in that: The following steps are involved: S1. Data collection: Log data is collected from various systems and devices in real time through log collection tools, and stored in the storage system; S2. Data preprocessing: cleaning, formatting, and standardizing the collected log data; S3, feature extraction: extract key features from the preprocessed log data; S4. Data analysis: Based on the extracted features, conduct in-depth analysis and mining of log data to discover potential problems and patterns; S5. Result display: The analysis results are displayed to the user in a visual form, and alarm and early warning functions are provided.
2. According to claim 1, a method for intelligent analysis of massive logs is characterized in that: In S1, the log collection tool uses Flume, which implements log collection, transmission and storage by defining three components: Source, Channel and Sink; The Source is responsible for collecting log data from various systems and devices in real time. The Channel is used as a buffer to temporarily store the log data. The Sink sends the log data to the storage system for storage. In this case, the storage system uses HDFS.
3. According to claim 1, a method for intelligent analysis of massive logs is characterized in that: In S1, the log collection tool uses ELK Stack, which implements log collection and processing by defining three stages: input, filter, and output; The input stage is responsible for receiving log data from various data sources, the filter stage cleans and converts the log data, and the output stage sends the processed log data to the storage system for storage. In this case, the storage system uses Elasticsearch.
4. According to claim 1, a method for intelligent analysis of massive logs is characterized in that: In S2, the log data cleaning process includes removing duplicate data, processing missing values, identifying and processing outliers, and removing noise data; Deduplication: Use unique identifiers to identify and remove duplicates; Handling missing values: Determine which fields are required and decide how to handle missing values; Identify and handle outliers: Identify and handle outliers based on business logic and domain knowledge; Remove noise data: Delete data and fields that are irrelevant to the analysis target.
5. A method for intelligent analysis of massive logs according to claim 4, characterized in that: The unique identifier may be a timestamp or an event ID. The method for processing missing values may be one or more of filling in default values, deleting related records, and interpolating values. The abnormal value is a value that exceeds a reasonable range.
6. The method for intelligent analysis of massive logs according to claim 1, characterized in that: In S2, log data formatting includes timestamp formatting, text field cleaning, field name unification, and data type conversion; Timestamp formatting: Ensure that timestamps are in a consistent format and convert them into time units that are convenient for analysis; Text field cleaning: remove irrelevant characters, spaces, and line breaks in text fields to ensure the cleanliness of text fields; Unify field names: unify all field names into naming rules with clear meanings to facilitate subsequent analysis and query; Data type conversion: Convert data to the appropriate data type based on the actual meaning of the field.
7. A method for intelligent analysis of massive logs according to claim 6, characterized in that: In S2, log data normalization includes minimum-maximum normalization, Z-score normalization, and decimal calibration normalization; Minimum-maximum normalization: linearly transform the data to the interval [0,1]; Z-score standardization: convert the data into a distribution with a mean of 0 and a standard deviation of 1; Decimal scaling standardization: Standardization is performed by moving the decimal point position of the data.
8. The method for intelligent analysis of massive logs according to claim 1, characterized in that: In S3, the technologies for proposing key features are natural language processing and machine learning, and the key features are timestamp, event type, and abnormal information.
9. The method for intelligent analysis of massive logs according to claim 1, characterized in that: In S4, association analysis, cluster analysis, and anomaly detection methods are used to analyze the data.
Citation Information
Cited By
Log analysis method and system based on openGauss database
CN120407535A