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.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com