Log data storage method and log data storage system

A data storage system and data storage technology, applied in the field of communication, can solve the problems of lower server performance, consumption of log data file open operations, etc., to reduce disk activity, avoid write operations, and improve server performance.

Active Publication Date: 2018-03-06
CHINA UNITED NETWORK COMM GRP CO LTD
View PDF6 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] The servers of some large companies such as the Internet need to store a large amount of log data information every day, and the log data files need to be frequently opened to write log information, so a lot of time is spent on the opening operation of the log data files
[0003] As the log data files are frequently opened, the disk activity of the server is also frequent, resulting in a serious decrease in the performance of the server

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 data storage method and log data storage system
  • Log data storage method and log data storage system
  • Log data storage method and log data storage system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0041] This embodiment provides a log data storage method, such as figure 1 shown, including:

[0042] Step S10: Obtain the collected log data.

[0043] Step S11: Write the log data into the memory according to the rules of the binary sorting tree, and the log data written into the memory forms a first balanced binary tree.

[0044] Step S12: Determine whether the first balanced binary tree is full or has reached the set time to output log data; if yes, execute step S13: exchange the first balanced binary tree with the second balanced binary tree, and then follow the inorder traversal rule Output the log data in the second balanced binary tree to a log data file. If not, proceed to step S11.

[0045] Wherein, the set output log data time is set according to empirical values, usually, the time length of the first balanced binary tree to the set output log data time is set to 24 hours, that is, usually at the end of the day, the stored Log data to memory is output to the log...

Embodiment 2

[0049] This embodiment provides a log data storage method, including:

[0050] Step S10: Obtain the collected log data.

[0051] Step S11: Write the log data into the memory according to the rules of the binary sorting tree, and the log data written into the memory forms a first balanced binary tree.

[0052] This step specifically includes: figure 2 As shown, step S110: determine whether the first balanced binary tree has a root node. If not, execute step S111: create a root node.

[0053] If yes, execute step S112: judge whether the key value with time as the key is equal to the key value of the root node. If yes, execute step S113: change the key value of the node to be inserted, and then execute step S114.

[0054] If not, execute step S114: judge whether the key value with time as the key is smaller than the key value of the root node.

[0055] If the judgment result of step S114 is yes, execute step S115: judge whether the left node of the root node is empty. If n...

Embodiment 3

[0065] This embodiment provides a method for storing log data, which is different from Embodiment 2 in that step S12: judging whether the first balanced binary tree has reached the set time to output log data.

[0066] In this step, the time length for the first balanced binary tree to output log data set is 24 hours. That is, the log data stored into memory is output to the log data file once, usually at the end of the day.

[0067] It should be noted that the length of time for the first balanced binary tree to output the set log data can also be set to several hours or several days.

[0068] Other steps of the method for storing log data in this embodiment are the same as those in Embodiment 1 or 2, and will not be repeated here.

[0069] In the log data storage method in this embodiment, by judging whether the first balanced binary tree has reached the set output log data moment, it can be realized that the first balanced binary tree can also be stored in the first balanc...

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 provides a log data storage method and a log data storage system. The log data storage method comprises the steps that S10, collected log data is acquired; S11, the log data is written into a memory according to binary sorting tree rules, and the log data written into the memory forms a first balanced binary tree; S12, whether the first balanced binary tree is filled with the log data or reaches a set moment for log data output is judged, and if yes, the step S13 is executed; and S13, the first balanced binary tree is exchanged with a second balanced binary tree, and then the logdata in the second balanced binary tree is output to a log data file according to inorder traversal rules. Through the log data storage method, the situation that the log data file is opened frequently for writing operation can be avoided, storage time of the log data is greatly shortened, disk activities are greatly reduced, and therefore server performance is greatly improved.

Description

technical field [0001] The present invention relates to the technical field of communications, in particular to a log data storage method and a log data storage system. Background technique [0002] The servers of some large companies such as the Internet need to store a large amount of log data information every day, and the log data files need to be frequently opened to write log information, so a lot of time is consumed in the opening operation of the log data files. [0003] As the log data files are frequently opened, the disk activity of the server is also frequent, resulting in a serious decrease in server performance. Contents of the invention [0004] The present invention aims at the above-mentioned technical problems existing in the prior art, and provides a log data storage method and a log data storage system. The log data storage method can avoid frequently opening log data files for writing operations, which not only greatly saves the storage time of log da...

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/13G06F16/172G06F16/1815G06F16/9027
Inventor 陈明王志军王蓉
Owner CHINA UNITED NETWORK COMM GRP CO 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