CN101320348A - Log function implementing method of embedded system - Google Patents
Log function implementing method of embedded system Download PDFInfo
- Publication number
- CN101320348A CN101320348A CNA2008101275129A CN200810127512A CN101320348A CN 101320348 A CN101320348 A CN 101320348A CN A2008101275129 A CNA2008101275129 A CN A2008101275129A CN 200810127512 A CN200810127512 A CN 200810127512A CN 101320348 A CN101320348 A CN 101320348A
- Authority
- CN
- China
- Prior art keywords
- log information
- embedded system
- information
- memory buffer
- log
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The present invention discloses an embedded system log function realizing method which comprises the steps as follows: the log information of an embedded system is filtered; a memory cache pool is arranged in the embedded system, and the filtered log information is memorized in the memory cache pool; after a write cache condition is triggered, the log information in the memory cache pool is compressed; the compressed log information is written into a log document. The method of the present invention filters and compresses the log, and the compression ratio of the log information can be more than 10 to 1, thereby greatly reducing the read-write accessing of a memory medium and improving the performance of the embedded system.
Description
Technical field
The present invention relates to the embedded system field, more particularly, relate to a kind of journal function implementation method that relates to embedded system.
Background technology
The problem that journal function is in operation and finds for system, there is important effect the location that especially can not reappear problem.In user's environment, after problem occurs, only rely on operation to describe and current phenomenon, be difficult to the concrete reason of the problem of analyzing; And the operating environment that expectation takies the user to carry out the reproduction of problem be unpractical, also may introduce new problem, cause more serious consequence and harmful effect.
In embedded system, the storage medium access speed of system is very slow, frequent read and write access is serious to system resources consumption, and under the more and more stronger situation of current hardware system CPU speed and memory size, the storage medium visit of embedded system becomes the bottleneck of system performance.
And the another one aspect is, limited, the huge system journal in storage medium space of embedded system can take a large amount of storage medium spaces, has wasted system resource.
From the angle that information security is maintained secrecy, log information is expressly also revealed the research and development information of product easily.
Summary of the invention
Technical matters solved by the invention is to provide a kind of journal function implementation method of embedded system, to solve to the read-write number of times of storage medium with to problems such as taking of storage medium space.
In order to address the above problem, the invention provides a kind of journal function implementation method of embedded system, may further comprise the steps:
Log information to described embedded system filters;
The memory buffer pond is set in described embedded system, the log information after filtering is kept in the described memory buffer pond;
After writing the triggering of buffer memory condition, the log information in the described memory buffer pond is compressed, the log information after the compression is write journal file.
Method of the present invention, wherein, log information to described embedded system filters, and comprising: to the log information of described embedded system by information filtering, by grade filtering, by module filter or the log information conversion wherein one or more combination filter.
Wherein, described by information filtering, for the details to log information recording are accepted or rejected, described details comprise filename, file line, time, task process number, information character string, key word content.
Wherein, described by grade filtering, for the serious grade according to log information recording is filtered, described embedded system abnormal log information of reservation record and/or the described embedded system error log of reservation record information.
Wherein, described by the module filtration, for the module according to log record is filtered.
Wherein, described log information conversion for the information in the log information, character string information are compressed, keeps the key value of format output, and information, character string information are cast out.
Wherein, the memory buffer pond is set in described embedded system, log information after filtering is kept in the described memory buffer pond, further comprise: two memory buffer ponds are set in described embedded system, log information after filtering is kept at one of them of described memory buffer pond, when full, start compression in this memory buffer pond, and in compression process with follow-up described log information recording in another memory buffer pond.
Wherein, the described buffer memory condition of writing comprises that current write memory Buffer Pool is full, system exception, command triggers; Described command triggers comprises webmaster command triggers, order line command triggers.
Wherein, further comprise:
Obtain journal file from described embedded system, carry out decompress(ion), read relevant log information.
Wherein, the LZ compression algorithm is adopted in described compression.
Compared with prior art, after method of the present invention adopted daily record filtration and compression, the ratio of compression of log information can reach more than 10: 1, has significantly reduced the read and write access to storage medium, has improved the performance of embedded system.
Description of drawings
Fig. 1 is the journal function implementation method process flow diagram of the described embedded system of embodiment among the present invention.
Embodiment
The present invention provides a kind of journal function implementation method of embedded system here, to solve to the read-write number of times of storage medium with to problems such as taking of storage medium space.Below embodiment is described in detail, but not as a limitation of the invention.
As shown in Figure 1, the journal function implementation method of a kind of embedded system of the present invention specifically comprises the steps:
Step 101, log information to embedded system filters, concrete log information filter operation comprises: by information filtering, by grade filtering, by module filtration, log information conversion (above four kinds of filter methods are equality, can be used in combination also and can use separately).
Particularly, log information is filtered, can be presented as by information filtering: to the details of log record such as filename, file line, time, task process number, information character string, etc. accept or reject, such as a log file name, file line, key word content or only log file name, file line; Can be presented as by grade filtering: the serious grade according to log record is filtered, such as a register system abnormal log or only misregistration daily record; Filter and can be presented as by module: the module according to log record is filtered; The log information conversion can be presented as compresses the information character string information in the log information, such as the key value that only keeps format output, prompt strings is cast out.
Here present embodiment adopts the log information conversion, and the character string description information of log record is filtered, and adopts only to keep format key value mode in the log information.Such as the daily record descriptor is " systeminitialize error ", transforms if be provided with log information, filters by daily record, can be with daily record descriptor boil down to sky " "; Such as the daily record descriptor is " system initialize error, error code%d, error ", transforms if be provided with log information, filters by daily record, can be with daily record descriptor boil down to " %d, error ".
Particularly, can be the memory buffer pond of in embedded system, opening up (setting) 2 (such as 64K), with the main current use memory buffer of the representative pond of using.When the log information after filtration writes Buffer Pool, judge whether the main memory buffer pond of using is full, when the master is full with the memory buffer pond, the starting log compression, and in compression process, indicate that the spare memory pond is current memory buffer pond, with follow-up log information recording in current memory buffer pond.
Particularly, when system exception, can interrupt, start the log information in the internal memory Buffer Pool is compressed, the log information after the compression is write journal file at system exception.
Perhaps, provide external command to drive (triggering), when receiving external command, start the log information in the internal memory Buffer Pool is compressed, the log information after the compression is write journal file such as webmaster order, order line order etc.
For the log information that is kept in the memory buffer pond, when compressing, need to consider the influence of compression algorithm to system, here can adopt the fast LZ of compression speed (Lempel-Ziv) compression algorithm, internal memory uses fixing, compression speed is fast, can reach 10: 1 ratio of compression to the compression of log information.
After the compression that log information is carried out, also can carry out buffer memory again, when the log information after the compression reaches the size of appointment, the file after the compression be write in the storage medium, thereby reduce the file read-write number of times.
After adopting daily record filtration of the present invention and compression, the ratio of compression of log information can reach more than 10: 1, has significantly reduced the read and write access to storage medium, has improved the performance of system.In a word, the present invention is to by daily record filtration and daily record compression, thereby significantly reduces the fileinfo that writes storage medium, thereby reduces the read-write number of times of storage medium and take up room.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.
Claims (10)
1, a kind of journal function implementation method of embedded system is characterized in that, may further comprise the steps:
Log information to described embedded system filters;
The memory buffer pond is set in described embedded system, the log information after filtering is kept in the described memory buffer pond;
After writing the triggering of buffer memory condition, the log information in the described memory buffer pond is compressed, the log information after the compression is write journal file.
2, the method for claim 1, it is characterized in that, log information to described embedded system filters, and comprising: to the log information of described embedded system by information filtering, by grade filtering, by module filter or the log information conversion wherein one or more combination filter.
3, method as claimed in claim 2, it is characterized in that, described by information filtering, for the details to log information recording are accepted or rejected, described details comprise filename, file line, time, task process number, information character string, key word content.
4, method as claimed in claim 2, it is characterized in that, described by grade filtering, for the serious grade according to log information recording is filtered, described embedded system abnormal log information of reservation record and/or the described embedded system error log of reservation record information.
5, method as claimed in claim 2 is characterized in that, and is described by the module filtration, for the module according to log record is filtered.
6, method as claimed in claim 2 is characterized in that, described log information conversion for the information in the log information, character string information are compressed, keeps the key value of format output, and information, character string information are cast out.
7, the method for claim 1, it is characterized in that, the memory buffer pond is set in described embedded system, log information after filtering is kept in the described memory buffer pond, further comprise: two memory buffer ponds are set in described embedded system, the log information after filtering is kept at one of them of described memory buffer pond, in this memory buffer pond when full, start compression, and in compression process with follow-up described log information recording in another memory buffer pond.
8, method as claimed in claim 3 is characterized in that, the described buffer memory condition of writing comprises that current write memory Buffer Pool is full, system exception, command triggers; Described command triggers comprises webmaster command triggers, order line command triggers.
9, the method for claim 1 is characterized in that, further comprises:
Obtain journal file from described embedded system, carry out decompress(ion), read relevant log information.
As claim 1 or 7 described methods, it is characterized in that 10, the LZ compression algorithm is adopted in described compression.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2008101275129A CN101320348A (en) | 2008-06-25 | 2008-06-25 | Log function implementing method of embedded system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2008101275129A CN101320348A (en) | 2008-06-25 | 2008-06-25 | Log function implementing method of embedded system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101320348A true CN101320348A (en) | 2008-12-10 |
Family
ID=40180408
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2008101275129A Pending CN101320348A (en) | 2008-06-25 | 2008-06-25 | Log function implementing method of embedded system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101320348A (en) |
Cited By (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102495788A (en) * | 2011-11-04 | 2012-06-13 | 北京星网锐捷网络技术有限公司 | Internal storage counting method and device of embedded system |
CN102521112A (en) * | 2011-11-18 | 2012-06-27 | 深圳中兴网信科技有限公司 | Memory-based reading and writing method of log information |
CN102609484A (en) * | 2012-01-19 | 2012-07-25 | 北京神州数码思特奇信息技术股份有限公司 | General method for managing log of system |
CN102820983A (en) * | 2011-11-18 | 2012-12-12 | 金蝶软件(中国)有限公司 | Method for collecting system abnormality information, and manager |
CN103164511A (en) * | 2013-02-21 | 2013-06-19 | 烽火通信科技股份有限公司 | Method for storage event log to automatically filter repeated jitter data |
CN103297640A (en) * | 2012-02-23 | 2013-09-11 | 佳能株式会社 | Image forming apparatus and control method thereof |
CN103368756A (en) * | 2012-03-29 | 2013-10-23 | 福建星网视易信息系统有限公司 | A management system for monitoring the operation log of an embedded system |
CN104144081A (en) * | 2014-08-26 | 2014-11-12 | 福建天晴数码有限公司 | General application log management method, device and system |
CN105516307A (en) * | 2015-12-09 | 2016-04-20 | 浪潮电子信息产业股份有限公司 | Method for compression-based optimization of log storage of cloud storage system |
CN105554181A (en) * | 2016-01-27 | 2016-05-04 | 久远谦长(北京)技术服务有限公司 | DNS log compression method and device |
CN105573900A (en) * | 2015-12-17 | 2016-05-11 | 南京亚派科技股份有限公司 | System log configuring and recording method |
CN105700992A (en) * | 2016-02-26 | 2016-06-22 | 湖南国科微电子股份有限公司 | Embedded system log recording method and log recording system |
CN105760283A (en) * | 2014-12-18 | 2016-07-13 | 阿里巴巴集团控股有限公司 | Log output method and device |
CN105868391A (en) * | 2012-09-25 | 2016-08-17 | 北京奇虎科技有限公司 | Method and device for recording log |
CN106055452A (en) * | 2016-05-25 | 2016-10-26 | 北京百度网讯科技有限公司 | Method and apparatus for creating switch log template |
CN106294723A (en) * | 2016-08-10 | 2017-01-04 | 成都广达新网科技股份有限公司 | A kind of apply in the quick inspection method of system journal of embedded device and system |
CN103685589B (en) * | 2012-09-07 | 2017-01-25 | 中国科学院计算机网络信息中心 | Binary coding-based domain name system (DNS) data compression and decompression methods and systems |
CN106682162A (en) * | 2016-12-26 | 2017-05-17 | 浙江宇视科技有限公司 | Log management method and device |
CN107391762A (en) * | 2017-08-28 | 2017-11-24 | 京信通信系统(中国)有限公司 | The processing method and processing device of daily record data |
CN108123840A (en) * | 2017-12-22 | 2018-06-05 | 中国联合网络通信集团有限公司 | Log processing method and system |
CN108874639A (en) * | 2018-03-27 | 2018-11-23 | 平安科技(深圳)有限公司 | Log archiving method, electronic device and readable storage medium storing program for executing |
CN111090627A (en) * | 2019-12-12 | 2020-05-01 | 深圳前海环融联易信息科技服务有限公司 | Log storage method and device based on pooling, computer equipment and storage medium |
CN111984618A (en) * | 2020-08-20 | 2020-11-24 | 北京人大金仓信息技术股份有限公司 | Log compression method and device |
CN115001148A (en) * | 2022-08-03 | 2022-09-02 | 杭州轻舟科技有限公司 | Energy storage power station data full-scale high-frequency real-time acquisition method and system |
-
2008
- 2008-06-25 CN CNA2008101275129A patent/CN101320348A/en active Pending
Cited By (36)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102495788A (en) * | 2011-11-04 | 2012-06-13 | 北京星网锐捷网络技术有限公司 | Internal storage counting method and device of embedded system |
CN102521112A (en) * | 2011-11-18 | 2012-06-27 | 深圳中兴网信科技有限公司 | Memory-based reading and writing method of log information |
CN102820983A (en) * | 2011-11-18 | 2012-12-12 | 金蝶软件(中国)有限公司 | Method for collecting system abnormality information, and manager |
CN102820983B (en) * | 2011-11-18 | 2016-04-13 | 金蝶软件(中国)有限公司 | System exception information collecting method and manager |
CN102609484A (en) * | 2012-01-19 | 2012-07-25 | 北京神州数码思特奇信息技术股份有限公司 | General method for managing log of system |
CN103297640A (en) * | 2012-02-23 | 2013-09-11 | 佳能株式会社 | Image forming apparatus and control method thereof |
US9268628B2 (en) | 2012-02-23 | 2016-02-23 | Canon Kabushiki Kaisha | Image forming apparatus, control method for image forming apparatus, and storage medium |
CN103368756B (en) * | 2012-03-29 | 2016-08-03 | 福建星网视易信息系统有限公司 | For monitoring the management system of the daily record of operation for embedded system |
CN103368756A (en) * | 2012-03-29 | 2013-10-23 | 福建星网视易信息系统有限公司 | A management system for monitoring the operation log of an embedded system |
CN103685589B (en) * | 2012-09-07 | 2017-01-25 | 中国科学院计算机网络信息中心 | Binary coding-based domain name system (DNS) data compression and decompression methods and systems |
CN105868391B (en) * | 2012-09-25 | 2019-06-04 | 北京奇虎科技有限公司 | A kind of method and apparatus of log recording |
CN105868391A (en) * | 2012-09-25 | 2016-08-17 | 北京奇虎科技有限公司 | Method and device for recording log |
CN103164511A (en) * | 2013-02-21 | 2013-06-19 | 烽火通信科技股份有限公司 | Method for storage event log to automatically filter repeated jitter data |
CN104144081A (en) * | 2014-08-26 | 2014-11-12 | 福建天晴数码有限公司 | General application log management method, device and system |
CN105760283B (en) * | 2014-12-18 | 2018-11-09 | 阿里巴巴集团控股有限公司 | A kind of log-output method and device |
CN105760283A (en) * | 2014-12-18 | 2016-07-13 | 阿里巴巴集团控股有限公司 | Log output method and device |
CN105516307A (en) * | 2015-12-09 | 2016-04-20 | 浪潮电子信息产业股份有限公司 | Method for compression-based optimization of log storage of cloud storage system |
CN105573900A (en) * | 2015-12-17 | 2016-05-11 | 南京亚派科技股份有限公司 | System log configuring and recording method |
CN105554181A (en) * | 2016-01-27 | 2016-05-04 | 久远谦长(北京)技术服务有限公司 | DNS log compression method and device |
CN105554181B (en) * | 2016-01-27 | 2019-03-26 | 久远谦长(北京)技术服务有限公司 | A kind of DNS log compression method and apparatus |
CN105700992B (en) * | 2016-02-26 | 2017-11-21 | 湖南国科微电子股份有限公司 | A kind of embedded system log recording method and diary record system |
CN105700992A (en) * | 2016-02-26 | 2016-06-22 | 湖南国科微电子股份有限公司 | Embedded system log recording method and log recording system |
CN106055452A (en) * | 2016-05-25 | 2016-10-26 | 北京百度网讯科技有限公司 | Method and apparatus for creating switch log template |
CN106055452B (en) * | 2016-05-25 | 2019-06-14 | 北京百度网讯科技有限公司 | The method and apparatus for creating interchanger log template |
CN106294723A (en) * | 2016-08-10 | 2017-01-04 | 成都广达新网科技股份有限公司 | A kind of apply in the quick inspection method of system journal of embedded device and system |
CN106682162A (en) * | 2016-12-26 | 2017-05-17 | 浙江宇视科技有限公司 | Log management method and device |
CN106682162B (en) * | 2016-12-26 | 2021-03-09 | 浙江宇视科技有限公司 | Log management method and device |
CN107391762B (en) * | 2017-08-28 | 2021-02-05 | 京信通信系统(中国)有限公司 | Log data processing method and device |
CN107391762A (en) * | 2017-08-28 | 2017-11-24 | 京信通信系统(中国)有限公司 | The processing method and processing device of daily record data |
CN108123840A (en) * | 2017-12-22 | 2018-06-05 | 中国联合网络通信集团有限公司 | Log processing method and system |
WO2019184218A1 (en) * | 2018-03-27 | 2019-10-03 | 平安科技(深圳)有限公司 | Log archiving method, electronic device, and readable storage medium |
CN108874639A (en) * | 2018-03-27 | 2018-11-23 | 平安科技(深圳)有限公司 | Log archiving method, electronic device and readable storage medium storing program for executing |
CN111090627A (en) * | 2019-12-12 | 2020-05-01 | 深圳前海环融联易信息科技服务有限公司 | Log storage method and device based on pooling, computer equipment and storage medium |
CN111090627B (en) * | 2019-12-12 | 2024-01-30 | 深圳前海环融联易信息科技服务有限公司 | Log storage method and device based on pooling, computer equipment and storage medium |
CN111984618A (en) * | 2020-08-20 | 2020-11-24 | 北京人大金仓信息技术股份有限公司 | Log compression method and device |
CN115001148A (en) * | 2022-08-03 | 2022-09-02 | 杭州轻舟科技有限公司 | Energy storage power station data full-scale high-frequency real-time acquisition method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101320348A (en) | Log function implementing method of embedded system | |
US11113245B2 (en) | Policy-based, multi-scheme data reduction for computer memory | |
US20130124796A1 (en) | Storage method and apparatus which are based on data content identification | |
CN1174352A (en) | Non-volatile memory with embedded programmable controller | |
JP2010501090A (en) | Speech decoding | |
US20090327295A1 (en) | Maintenance of exo-file system metadata on removable storage device | |
EP2972749A1 (en) | Data storage volume having tiers of different storage traits | |
CN105094709A (en) | Dynamic data compression method for solid-state disc storage system | |
JP2009003934A (en) | Data management system, data management method, and computer-readable recording medium in which program for performing data management method is recorded | |
CN102243615B (en) | Memory buffer management method supporting audio/video frame storage | |
WO2023151373A1 (en) | Method and system for realizing option setup of bios, and device and storage medium | |
TW201039349A (en) | Data accessing method for flash memory and storage system and controller using the same | |
CN106681659A (en) | Data compression method and device | |
CN102567472B (en) | Built-in database based high-efficient data deleting and restoring method | |
US20140258247A1 (en) | Electronic apparatus for data access and data access method therefor | |
CN100580669C (en) | Method for realizing cache memory relates to file allocation table on Flash storage medium | |
US20090282064A1 (en) | On the fly compression and storage device, system and method | |
US8498622B2 (en) | Data processing system with synchronization policy | |
CN109960608A (en) | The processing method and processing system of office document | |
CN112181275A (en) | Data processor and data processing method | |
CN105589912A (en) | Method and storage structure for processing frequently written document with MRAM (Magnetic Random Access Memory) | |
CN112527195B (en) | Method for extracting physical data of solid state disk | |
CN101789016A (en) | Method and device thereof for improving valid storage capacity of file system | |
JPH05189157A (en) | Disk type storage device | |
CN101515274A (en) | Method for reading and playing mobile phone audio-frequency data |
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: 20081210 |