Log compression method and device

A compression method and technology of a compression device, which are applied in the fields of instruments, computing, and electrical digital data processing, can solve the problems of low log compression ratio and unsatisfactory compression effect, and achieve the purpose of reducing the proportion, improving the log compression ratio and compression efficiency, and improving the The effect of compression ratio

Inactive Publication Date: 2016-10-12
COMBA TELECOM SYST CHINA LTD +3
View PDF2 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Based on this, it is necessary to provide a log compression method and device for the current problems of low log compression ratio and unsatisfactory compression effect. The log compression method and device proposed by the present invention improve the log content by intelligently compressing the log content. The compression efficiency improves the log compression ratio

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Log compression method and device
  • Log compression method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0017] The technical solutions of the present invention will be described in detail below in conjunction with the accompanying drawings and preferred embodiments.

[0018] In one example, see figure 1 As shown, a log compression method, the method includes the following steps:

[0019] S100 obtains a file containing log records.

[0020] S200 Traversing the file according to the output priority of the log record, replacing the character string of each log record in the file with a unique number, to obtain the replaced log record.

[0021] In the present invention, logging output refers to the developer inserting information in the source code that needs to output certain variables or process states in the system, such as

[0022] ...source code...

[0023] LOG_DEBUG(MOD_AA,macId,"ueNum[%d],throughOutput[%u]MB.state is ideal!\n",ueNUm,totalthp);

[0024] ...source code...

[0025] In step S200, traverse all files containing log records according to the log record output pr...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to a log compression method and device. The method comprises the following steps: obtaining a file which comprises log records; traversing the file according to a log record output priority, and replacing a character string of each log record in the file by a unique number so as to obtain replaced log records; and encoding the replaced log records at a same time frame through a same timestamp so as to obtain compressed logs. According to the log compression method and device, the file which comprises the log records is traversed by utilizing the log record output priority, and the character string of each log record in the file is replaced by the unique number, so that the number of bytes occupied by the character strings is decreased, and the log compression ratio is enhanced; and meanwhile, the log records after the character string replacement are encoded at the same time frame through the same timestamp, so that the proportion of the timestamp information of the log records in the log content is effectively reduced, and the log compression ratio and compression efficiency are furthermore improved.

Description

technical field [0001] The invention relates to the technical field of data compression, in particular to a log compression method and device. Background technique [0002] The log function is an important function of the wireless communication system. In the operator's equipment, since the system operation information cannot be observed in real time, when a user complaint occurs, the cause of the user complaint can only be analyzed through the stored system log. Therefore, the log plays a vital role in the analysis and location of system problems. [0003] At the same time, based on the consideration of product cost, the storage medium space of the wireless communication system is usually strictly limited, so a large amount of system logs cannot be stored, which brings a huge challenge to the analysis and location of system problems. Therefore, how to further improve the log The compression effect is of great significance for improving the stored system log content on a li...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
CPCG06F16/1744
Inventor 孙诗元李伟丹刘永钦罗远科
Owner COMBA TELECOM SYST CHINA LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products