CN101178709A - Diary record system and method - Google Patents

Diary record system and method Download PDF

Info

Publication number
CN101178709A
CN101178709A CNA2006101386090A CN200610138609A CN101178709A CN 101178709 A CN101178709 A CN 101178709A CN A2006101386090 A CNA2006101386090 A CN A2006101386090A CN 200610138609 A CN200610138609 A CN 200610138609A CN 101178709 A CN101178709 A CN 101178709A
Authority
CN
China
Prior art keywords
record
static information
log
information
log record
Prior art date
Application number
CNA2006101386090A
Other languages
Chinese (zh)
Inventor
黄文政
阚璞
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to CNA2006101386090A priority Critical patent/CN101178709A/en
Publication of CN101178709A publication Critical patent/CN101178709A/en

Links

Abstract

The invention provides a journal recording system and a method thereof. The method comprises the steps that: a first step, the static information of the journal record is searched from an original code and only one identifier is distributed for each static information, so as to form a mapping related file and the identifier that expresses the static information is combined with the dynamic information after the original code is executed to form a journal record; and the second step, the static information corresponding to the identifier of the journal record is searched from the mapping related file, and the static information and the dynamic information are combined to form a complete journal record. The invention can be used in a product of communication system, and also can be used in a product related to a computer information processing. By adopting the method, the invention has the advantages of completing the compression of the journal record, and greatly decreasing the network bandwidth used for transmitting the journal record and the storage size used for storing the journal record without increasing the load of the processor of the system.

Description

Diary record system and method

Technical field

The present invention relates to the communications field, relate in particular to diary record system and method.

Background technology

In communication products, computer information processing Related product, for the running status of understanding system, the reason that can locate failure when business processing is failed fast, the cause information when system needs to note crucial procedure information, business processing failure in business processing etc.The information of daily record generally comprises: log record is put row number in residing source filename, the place source file, format character string, dynamic parameter etc.

If the log record data volume of system's generation is too big, need take more storage space, and also need in the daily record preservation process to take very big processor expense, can have influence on the operation of regular traffic.If system adopts distribution mode to keep a diary (daily record that a plurality of processing nodes produce connects by network, is saved in concentrated log server), log transmission can take the normal communication bandwidth of internal system so.

In order to reduce the size of log record, also can adopt the Dynamic Compression of daily record: after processing node produces log record, adopt the dynamic compression algorithm to compress, with the data transmission after the compression to log server or be saved in memory device.

But the dynamic compression algorithm generally all expends processor resource especially as LZ77, LZW etc.After the daily record dynamic compression,, also greatly increased simultaneously the processor load of system, the processing of the regular traffic of system has been brought very big influence though can reduce the size of log record.

Summary of the invention

At above one or more problems, the invention provides a kind of diary record system and method, greatly reduce the capacity of daily record, reduced the load of system.

Diary record system of the present invention comprises: log recording apparatus, be used for searching the static information of the log record of source code, for each static information distributes a unique identifier and forms the mapping relations file, the multidate information after the identifier of expression static information and source code carried out is in conjunction with forming log record; And the daily record resolver, be used for when the user checks log record, in the mapping relations file, search the static information of the identifier correspondence in the log record, and with static information and multidate information in conjunction with forming complete log record.

Log recording apparatus comprises: static information is searched module, is used for searching the also static information of log record; Mapping block is used to static information to distribute a unique identifier, and forms the mapping relations file of the mapping relations of record static information and identifier; And logger module, be used for the expression identifier of static information and multidate information in conjunction with forming log record.

The daily record resolver comprises: the static information search module is used for searching at the mapping relations file static information of the identifier correspondence in the log record that receives; And log analyzing module, the multidate information that is used for the static information that will find and log record is in conjunction with forming complete log record.

Log record is the daily record print statement.Static information comprises following at least a information: the source filename of daily record print statement, daily record print statement position and the format character string in source filename.

Log recording method of the present invention may further comprise the steps: step 1, search the static information of the log record in the source code, for each static information distributes a unique identifier and forms the mapping relations file, the multidate information after the identifier of expression static information and source code carried out is in conjunction with forming log record; And step 2, when the user checks log record, in the mapping relations file, search the static information of the identifier correspondence in the log record, and with static information and multidate information in conjunction with forming complete log record.

Step 1 comprises: step a, search the static information during also log writes down; Step b for static information distributes a unique identifier, and forms the mapping relations file of the mapping relations of record static information and identifier; And step c, with the expression identifier of static information and multidate information in conjunction with forming log record.

Step 2 comprises: step a, when the user checks log record, search the static information of the identifier correspondence in the log record that receives in the mapping relations file; And step b, with the static information that finds and the multidate information in the log record in conjunction with forming complete log record.

Log record of the present invention is the daily record print statement.Static information comprises following at least a information: the source filename of daily record print statement, daily record print statement position and the format character string in source filename.

Description of drawings

Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:

Fig. 1 is the block diagram according to diary record system of the present invention;

Fig. 2 is the process flow diagram according to log recording method of the present invention; And

Fig. 3 is the synoptic diagram that gets log recording method according to embodiments of the invention.

Embodiment

Below with reference to accompanying drawing, describe the specific embodiment of the present invention in detail.

The present invention relates to a kind of diary record system and method for handling based on source code.Can be used for the communication system product, also can be used for the relevant product of computer information processing.After adopting this method, in the processor load that does not increase system, finish the compression of log record, greatly reduce the network bandwidth, the required storage size of preservation log record that need the transmission log record.

Fig. 1 is the block diagram according to diary record system of the present invention.As shown in Figure 1, diary record system of the present invention comprises: log recording apparatus 102, be used for searching the static information of the log record of source code, for each static information distributes a unique identifier and forms the mapping relations file, the multidate information after the identifier of expression static information and source code carried out is in conjunction with forming log record; And daily record resolver 104, be used for when the user checks log record, in the mapping relations file, search the static information of the identifier correspondence in the log record, and with static information and multidate information in conjunction with forming complete log record.

Log recording apparatus 102 comprises: static information is searched module 102-2, is used for searching the also static information of log record; Mapping block 102-4 is used to static information to distribute a unique identifier, and forms the mapping relations file of the mapping relations of record static information and identifier; And logger module 102-6, be used for the expression identifier of static information and multidate information in conjunction with forming log record.

Daily record resolver 104 comprises: static information search module 104-2 is used for searching at the mapping relations file static information of the identifier correspondence in the log record that receives; And log analyzing module 104-4, the multidate information that is used for the static information that will find and log record is in conjunction with forming complete log record.

Log record is the daily record print statement.Static information comprises following at least a information: the source filename of daily record print statement, daily record print statement position and the format character string in source filename.

Fig. 2 is the process flow diagram according to log recording method of the present invention.As shown in Figure 2, log recording method of the present invention may further comprise the steps: step S202, search the static information of the log record in the source code, for each static information distributes a unique identifier and forms the mapping relations file, the multidate information after the identifier of expression static information and source code carried out is in conjunction with forming log record; And step S204, when the user checks log record, in the mapping relations file, search the static information of the identifier correspondence in the log record, and with static information and multidate information in conjunction with forming complete log record.

Step S202 comprises: step S202-2, search the static information during also log writes down; Step S202-4 for static information distributes a unique identifier, and forms the mapping relations file of the mapping relations of record static information and identifier; And step S202-6, with the expression identifier of static information and multidate information in conjunction with forming log record.

Step S204 comprises: step S204-2, when the user checks log record, search the static information of the identifier correspondence in the log record that receives in the mapping relations file; And step S204-4, with the static information that finds and the multidate information in the log record in conjunction with forming complete log record.

Log record of the present invention is the daily record print statement.Static information comprises following at least a information: the source filename of daily record print statement, daily record print statement position and the format character string in source filename.

Central idea of the present invention is: adopt the source code disposal route, the static information in the log record is separated with multidate information, when not increasing processor load, reduce the size of log record.

According to the characteristics of log record, log record is divided into two kinds of parts: static information and multidate information.The static information of daily record.The source filename, the position in the source file of place, the format character string that comprise daily record print statement place.Repeatedly carry out this daily record print statement, this part information can not change; The multidate information of daily record.The dynamic parameter that comprises the daily record print statement.Repeatedly carry out this daily record print statement, this part information might change.

Daily record print statement below for example the 100th row has in source file example.c:

...

Syslog(“This?is?an?example,version:% d\n”,3005);

...

So, the static information of daily record is: source filename example.c, the position in source file the 100th row, format character string " This is an example, version:%d n ".

The multidate information of daily record is: 3005 (version numbers).

The static information of daily record is static constant, shown in top example, repeatedly carry out this daily record print statement after, position in source file of the format character string in the daily record, the source filename at statement place, statement (row number) can not change.So in the transmission of daily record, when storing, this part information does not just need at every turn all records.Use one to identify the static part of a daily record ID number, for example can identify with the ID one daily record ID of one 4 byte.Usage log ID identifies the static information of log record when log transmission, storage, and the static information in the log record has been compressed into 4 bytes, and this greatly reduces preserves the required storage space of log record, the required transmission bandwidth of transmission log record.

The multidate information of daily record all may change along with the execution of daily record print statement each time.For the multidate information part, when every log record generates, all need complete preservation, information that like this can complete preservation daily record prevents losing of log information.

Consume very big processor load for fear of the daily record compression, the normal business processing of the system that influences, the method for using source code to handle is finished the static information of daily record, the separation of multidate information.The source code processing is carried out before system's operation, by scanning all source files, for each bar daily record print statement distributes a daily record ID, set up the mapping relations one by one of the static information and the daily record ID of daily record, and these mapping relations are kept in the log information file.By above-mentioned processing, under the prerequisite that does not increase system load, finished the compression of daily record.

When system moves, comprise two parts in the log record of generation: the multidate information of daily record ID, daily record.The daily record analytical tool is searched the log information file by daily record ID, obtains the static information of daily record.With static information, the multidate information combination of daily record, the information that recovers daily record that just can be complete.

As shown in Figure 3, use the source code handling implement, all source files of scan process, for each bar daily record print statement distribute one ID number, daily record ID total system is unique.

The source code handling implement is collected the static information of every daily record print statement, and sets up man-to-man mapping relations with daily record ID, saves as independent log information file.

Source file is through compiling, link, be loaded on the operation system operation after, no longer export static information during the execution journal print statement, only need to export daily record ID, the multidate information of this statement correspondence.

When the user checks daily record, need resolve daily record.For every log record,, retrieve the static information of daily record by daily record ID.Multidate information, static information are analyzed together, obtained complete log information.

The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a diary record system is characterized in that, described system comprises:
Log recording apparatus, be used for searching the static information of the log record of source code, for each static information distributes a unique identifier and forms the mapping relations file, the multidate information after the identifier of the described static information of expression and described source code carried out is in conjunction with forming log record; And
Described daily record resolver, be used for when the user checks log record, in described mapping relations file, search the static information of the described identifier correspondence in the described log record, and with described static information and described multidate information in conjunction with forming complete log record.
2. diary record system according to claim 1 is characterized in that, described log recording apparatus comprises:
Static information is searched module, is used for searching and writing down the static information of described log record;
Mapping block is used to described static information to distribute a unique identifier, and forms the mapping relations file of the mapping relations of described static information of record and described identifier; And
Logger module is used for the expression identifier of described static information and described multidate information in conjunction with forming log record.
3. diary record system according to claim 1 is characterized in that, described daily record resolver comprises:
The static information search module is used for searching at described mapping relations file the static information of the identifier correspondence in the log record that receives; And
Log analyzing module, the multidate information that is used for the static information that will find and described log record is in conjunction with forming complete log record.
4. according to each described diary record system in the claim 1 to 3, it is characterized in that described log record is the daily record print statement.
5. diary record system according to claim 4, it is characterized in that described static information comprises following at least a information: the source filename of described daily record print statement, described daily record print statement position and the format character string in described source filename.
6. a log recording method is characterized in that, said method comprising the steps of:
Step 1, search the static information of the log record in the source code, for each static information distributes a unique identifier and forms the mapping relations file, the multidate information after the identifier of the described static information of expression and described source code carried out is in conjunction with forming log record; And
Step 2 when the user checks described log record, is searched the static information of the described identifier correspondence in the described log record in described mapping relations file, and with described static information and described multidate information in conjunction with forming complete log record.
7. log recording method according to claim 6 is characterized in that, described step 1 comprises:
Step a searches and writes down the static information in the described log record;
Step b for described static information distributes a unique identifier, and forms the mapping relations file of the mapping relations of described static information of record and described identifier; And
Step c, with the expression identifier of described static information and described multidate information in conjunction with forming log record.
8. log recording method according to claim 6 is characterized in that, described step 2 comprises:
Step a when the user checks described log record, searches the static information of the identifier correspondence in the log record that receives in described mapping relations file; And
Step b, with the static information that finds and the multidate information in the described log record in conjunction with forming complete log record.
9. according to each described log recording method in the claim 6 to 8, it is characterized in that described log record is the daily record print statement.
10. log recording method according to claim 9, it is characterized in that described static information comprises following at least a information: the source filename of described daily record print statement, described daily record print statement position and the format character string in described source filename.
CNA2006101386090A 2006-11-08 2006-11-08 Diary record system and method CN101178709A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2006101386090A CN101178709A (en) 2006-11-08 2006-11-08 Diary record system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2006101386090A CN101178709A (en) 2006-11-08 2006-11-08 Diary record system and method

Publications (1)

Publication Number Publication Date
CN101178709A true CN101178709A (en) 2008-05-14

Family

ID=39404967

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2006101386090A CN101178709A (en) 2006-11-08 2006-11-08 Diary record system and method

Country Status (1)

Country Link
CN (1) CN101178709A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402624A (en) * 2011-12-28 2012-04-04 用友软件股份有限公司 Dynamic query system and method for version link data
CN101753971B (en) * 2008-12-22 2012-05-16 中兴通讯股份有限公司 Journal system and journal recording method in content management system in uniform video management platform
CN103412924A (en) * 2013-08-12 2013-11-27 东软集团股份有限公司 Log multi-language query method and system
CN104391865A (en) * 2014-10-24 2015-03-04 浪潮软件股份有限公司 Method for recording operation logs based on trigger principle
CN106648467A (en) * 2016-12-28 2017-05-10 税友软件集团股份有限公司 Log generation method and system
CN106776385A (en) * 2016-12-06 2017-05-31 广东欧珀移动通信有限公司 A kind of transmission method of daily record log information, device and terminal
CN107133151A (en) * 2017-05-24 2017-09-05 努比亚技术有限公司 A kind of daily record data processing method, equipment and computer-readable recording medium
CN107273460A (en) * 2017-06-01 2017-10-20 郑州云海信息技术有限公司 A kind of storage method for storing product systems daily record
CN107391762A (en) * 2017-08-28 2017-11-24 京信通信系统(中国)有限公司 The processing method and processing device of daily record data
CN107577542A (en) * 2017-09-13 2018-01-12 广东欧珀移动通信有限公司 Log information report method, device, storage medium and mobile terminal
CN107621999A (en) * 2017-09-13 2018-01-23 广东欧珀移动通信有限公司 Log information report method, device, storage medium and mobile terminal
CN108876963A (en) * 2018-07-11 2018-11-23 广东远峰汽车电子有限公司 A kind of storage method, device, microprocessor and the storage medium of automobile log

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753971B (en) * 2008-12-22 2012-05-16 中兴通讯股份有限公司 Journal system and journal recording method in content management system in uniform video management platform
CN102402624B (en) * 2011-12-28 2013-12-25 用友软件股份有限公司 Dynamic query system and method for version link data
CN102402624A (en) * 2011-12-28 2012-04-04 用友软件股份有限公司 Dynamic query system and method for version link data
CN103412924A (en) * 2013-08-12 2013-11-27 东软集团股份有限公司 Log multi-language query method and system
CN104391865A (en) * 2014-10-24 2015-03-04 浪潮软件股份有限公司 Method for recording operation logs based on trigger principle
CN106776385A (en) * 2016-12-06 2017-05-31 广东欧珀移动通信有限公司 A kind of transmission method of daily record log information, device and terminal
CN106776385B (en) * 2016-12-06 2019-09-24 Oppo广东移动通信有限公司 A kind of transmission method, device and the terminal of log log information
CN106648467A (en) * 2016-12-28 2017-05-10 税友软件集团股份有限公司 Log generation method and system
CN107133151A (en) * 2017-05-24 2017-09-05 努比亚技术有限公司 A kind of daily record data processing method, equipment and computer-readable recording medium
CN107273460A (en) * 2017-06-01 2017-10-20 郑州云海信息技术有限公司 A kind of storage method for storing product systems daily record
CN107391762A (en) * 2017-08-28 2017-11-24 京信通信系统(中国)有限公司 The processing method and processing device of daily record data
CN107577542A (en) * 2017-09-13 2018-01-12 广东欧珀移动通信有限公司 Log information report method, device, storage medium and mobile terminal
CN107621999A (en) * 2017-09-13 2018-01-23 广东欧珀移动通信有限公司 Log information report method, device, storage medium and mobile terminal
CN108876963A (en) * 2018-07-11 2018-11-23 广东远峰汽车电子有限公司 A kind of storage method, device, microprocessor and the storage medium of automobile log

Similar Documents

Publication Publication Date Title
US20190138506A1 (en) External system integration into automated attribute discovery
US9984128B2 (en) Managing site-based search configuration data
JP6416194B2 (en) Scalable analytic platform for semi-structured data
US20200301956A1 (en) System for organizing and fast searching of massive amounts of data
US8489656B2 (en) Systems and methods for performing data replication
US7283988B1 (en) Code generator for a distributed processing system
US7043686B1 (en) Data compression apparatus, database system, data communication system, data compression method, storage medium and program transmission apparatus
US8260773B2 (en) Method for extracting signature from problem records through unstructured and structured text mapping, classification and ranking
CN102591946B (en) It is divided using index and coordinates to carry out data deduplication
US6418446B1 (en) Method for grouping of dynamic schema data using XML
CN100447740C (en) System and method for intra-package delta compression of data
CA2280961C (en) System and method for analyzing remote traffic data in a distributed computing environment
US5946467A (en) Application-level, persistent packeting apparatus and method
Fisher et al. PADS: a domain-specific language for processing ad hoc data
Bowman et al. Harvest: A scalable, customizable discovery and access system
CN102460398B (en) Source classification for performing deduplication in a backup operation
EP2728508B1 (en) Dynamic data masking
US8344916B2 (en) System and method for simplifying transmission in parallel computing system
EP2011007B1 (en) Method and system for scaleable, distributed, differential electronic-data backup and archiving
Bassiouni Data compression in scientific and statistical databases
CN1526104B (en) Parsing structured data
US7644107B2 (en) System and method for batched indexing of network documents
US8937967B2 (en) System and method for storing/caching, searching for, and accessing data
US6278992B1 (en) Search engine using indexing method for storing and retrieving data
US7447865B2 (en) System and method for compression in a distributed column chunk data store

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Open date: 20080514