Log compression method and device, log decompression method and device and storage medium
A compression method and decompression technology, applied in special data processing applications, instruments, file systems, etc., can solve the problems of manpower and material resources, and achieve the effect of saving the use of storage space, increasing the compression ratio, and saving storage costs.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0052] figure 1 It is a flowchart of a log compression method provided by Embodiment 1 of the present invention. This embodiment is applicable to the case where a clustered enterprise compresses a large number of daily log files. The method can be executed by a log compression device. It can be realized by means of software and / or hardware, and the device can be integrated in a processor of a computer or a server, such as figure 1 As shown, the method specifically includes:
[0053] Step 110, analyzing the original log file to obtain multiple column data of the log file;
[0054]Among them, the original log file records logs in a specific format by default. The data in the original log file may be in various forms or types of data. The original log file can complete the split analysis of the original log file according to the "log parsing rules" in the configuration file, for example, the data of the original log file is separated by the end of each column of data such as a...
Embodiment 2
[0069] image 3 It is a flow chart of a log compression method provided in Embodiment 2 of the present invention. This embodiment further refines the above technical solution. This embodiment can be combined with each optional solution in one or more of the above embodiments. .
[0070] Such as image 3 As shown, the method specifically includes:
[0071] Step 200, use the log file storing the cold data as the original log file, so as to compress the original log file.
[0072] Step 210, analyzing the original log file to obtain multiple column data of the log file.
[0073] Step 220, determine the information entropy of each column data.
[0074] Step 230, if the information entropy of the column data is less than or equal to the set threshold, replace all the data corresponding to the column name of the column data with character codes.
[0075] Optionally, replacing all data corresponding to the column name of the column data with a character encoding for compression i...
Embodiment 3
[0089] Figure 4 It is a flow chart of a log compression method provided by Embodiment 3 of the present invention. This embodiment further refines the above technical solution, and this embodiment can be combined with each optional solution in one or more of the above embodiments.
[0090] Such as Figure 4 As shown, the method specifically includes:
[0091] Step 300, use the log file storing the cold data as the original log file, so as to compress the original log file.
[0092] Step 310, analyzing the original log file to obtain multiple column data of the log file.
[0093] Step 320, determine the information entropy of each column data.
[0094] Step 330: If the information entropy of the column data is less than or equal to the set threshold, at least two rows of data in the column data are replaced in parallel with corresponding Huffman codes.
[0095] Step 340, if the information entropy of the column data is greater than the set threshold, keep the column data un...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com