Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A processing method and device for reading and writing a log

A log and writing rate technology, applied in the field of log processing, can solve problems such as time-consuming, affecting log reading performance, and log reading performance problems, and achieve efficient reading and writing.

Active Publication Date: 2019-01-11
BEIJING QIANXIN TECH
View PDF13 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] At present, in order to ensure the security of the process, it is usually implemented by locking all the log processing processes or using a buffer exclusively for the process to write the log. Locking each process will cause write performance problems, and the process exclusively enjoys a buffer. That is, each process in all log processing processes occupies a separate data buffer (can be a ring buffer ringbuffer) channel, so that all processes occupy too many system resources (including memory), and too many ringbuffer channels will also cause Performance issues with log reading
In addition, because disk logs often need to support time query, log reading often needs to be read in time sequence and recorded to disk, which is convenient for indexing. The logs in each ringbuffer are stored in time sequence. To obtain logs in time sequence, The existing method needs to traverse all the ringbuffers every time and obtain the log at the earliest time, especially when the number of ringbuffers is large, which greatly affects the log reading performance, mainly reflected in: when the number of ringbuffers is large, each time the earliest time Logs need to traverse all ringbuffers, which is time-consuming

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
  • A processing method and device for reading and writing a log
  • A processing method and device for reading and writing a log
  • A processing method and device for reading and writing a log

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0038] figure 1 It is a schematic flowchart of a processing method for reading and writing logs according to an embodiment of the present invention, such as figure 1 As shown, a processing method for reading and writing logs provided in an embodiment of the present invention includes the following steps:

[0039] S101: Determine the process leve...

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 embodiment of the invention provides a processing method and device for reading and writing a log. The method comprises the following steps: determining a process level of the process according toa writing performance parameter of the process required by the log to be written; determining a sharing mode of the process sharing data buffer according to the process level; according to the sharing mode, allocating to a target data buffer corresponding to the process corresponding to the process level, so that the process performs a write operation to the log according to the target data buffer; after completing the write operation, reading the written logs based on an algorithm for sequentially reading logs based on a minimum heap. The device performs the method described above. The processing method and the device for reading and writing the log provided by the embodiment of the invention determine the target data buffer area based on the process level, after the log is written intothe target data buffer area, the log written is read based on the algorithm of reading the log by the minimum heap according to the sequence, and the log can be read and written efficiently.

Description

technical field [0001] The embodiments of the present invention relate to the technical field of log processing, and in particular to a processing method and device for reading and writing logs. Background technique [0002] With the development of information technology, the reading and writing of logs is particularly important. [0003] At present, in order to ensure the security of the process, it is usually implemented by locking all the log processing processes or using a buffer exclusively for the process to write the log. Locking each process will cause write performance problems, and the process exclusively enjoys a buffer. That is, each process in all log processing processes occupies a separate data buffer (can be a ring buffer ringbuffer) channel, so that all processes occupy too many system resources (including memory), and too many ringbuffer channels will also cause Performance issues with log reading. In addition, because disk logs often need to support time...

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): G06F16/13G06F16/18
Inventor 金恒展
Owner BEIJING QIANXIN TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products