Log Query Time Trees to Reduce Scattered Disk Access

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Log data query efficiency is low due to scattered access caused by binary search on large amounts of data stored in multiple disk sectors, leading to prolonged read and write operations.

Innovation Solution

A log data query method using a log query time tree to determine a target node, perform subtree search for boundary time values, and traverse leaf nodes to obtain log data efficiently.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If binary search is used to query log data in the disk, then the query method is simple to implement, but scattered access is caused leading to low query efficiency

Engineering Contradiction:
Improvequery method simplicityVSAvoidlog data query efficiency
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent segments the log data storage by introducing a log query time tree that divides the query space into multiple time range nodes. Each node represents a specific time range and can be independently searched, avoiding the need to scan through all disk sectors sequentially as in traditional binary search. This segmentation allows the system to focus only on relevant time ranges, significantly reducing scattered access and improving query efficiency.

Inventive Principle:
Principle #1Segmentation

2Quantity of substance

If log data is stored in multiple disk sectors, then the storage capacity is sufficient for large amounts of data, but read and write operations take a long time

Engineering Contradiction:
Improvestorage capacityVSAvoidread and write operation time
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The patent introduces a log query time tree as an intermediary data structure between the query request and the actual log data in disk sectors. This intermediary contains pre-organized time range information that guides the search process, allowing the system to quickly identify which disk sectors contain the required log data without reading through all sectors. This mediator significantly reduces the time spent on read operations while maintaining the ability to store large amounts of data across multiple sectors.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS12430348B2Log data query method, electronic device, and storage medium
Publication Date: 2025.09.30 TENCENT TECHNOLOGY (SHENZHEN) CO LTD
  • US12430348B2 patent drawing
  • US12430348B2 patent drawing
  • US12430348B2 patent drawing

AI summary

A log data query method includes determining a target node matching a query time range from a log query time tree, a node in the log query time tree being configured to record a time range for a log query; determining a target subtree from subtrees under the target node and configured to search for a boundary time value corresponding to the query time range; performing leaf node traversal from an edge leaf node of the target subtree, and stopping the leaf node traversal after a target leaf node is traversed, a time value, within a target time range recorded in the target leaf node, having corresponding log data in a disk; determining a time value recorded in the target leaf node having corresponding log data and in a critical state, for obtaining the boundary time value; and obtaining log data matching the query time range from the disk.