Time-Series Query Thread Pools for Stable Heavy-Load Response
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing time series data engines face issues of slow response speed and poor operation stability due to high computing resource overhead in large-scale applications, particularly when handling complex filtering conditions and large volumes of data.
Innovation Solution
A time series data query method that involves generating query tasks based on computing resource consumption levels and distributing them to thread pools with matching resources, ensuring independent thread resources for each pool to manage different query loads, thereby optimizing resource allocation and improving stability and response speed.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If a single thread pool is used to process all query tasks, then the system structure is simple, but the response speed decreases and operation stability deteriorates when handling complex filtering conditions and large volumes of data
Solution Approach 1:
The patent divides the single thread pool into multiple thread pools (first thread pool and second thread pool) based on query task complexity. Simple query tasks are processed by the first thread pool while complex query tasks are processed by the second thread pool, which has higher configuration resources. This segmentation resolves the contradiction by maintaining structural simplicity for common cases while providing enhanced processing capability for complex cases, thereby improving overall response speed without excessive complexity.
Solution Approach 2:
The patent applies local quality by configuring different resource levels for different thread pools according to the specific needs of query tasks. The first thread pool uses standard resources for simple queries, while the second thread pool uses high-configuration resources for complex queries. This localized resource allocation optimizes response speed for each task type without requiring the entire system to maintain high resources, thus balancing simplicity and performance.
2Device complexity
If a single thread pool processes all query tasks, then resource allocation is uniform, but operation stability deteriorates due to resource exhaustion from overweight query tasks
Solution Approach 1:
The patent segments query tasks into simple and complex categories, assigning them to different thread pools with appropriate resource configurations. This segmentation prevents overweight query tasks from exhausting the resources of a single thread pool, thereby maintaining operation stability. The classification and distribution mechanism is implemented through query level assessment and corresponding thread pool selection.
Solution Approach 2:
The patent changes the resource allocation parameter dynamically based on query task characteristics. By assessing the query level (simple or complex) and adjusting the thread pool selection accordingly, the system optimizes resource usage. This parameter change approach ensures that complex queries receive adequate resources while simple queries use standard resources, preventing resource exhaustion and maintaining stability.
3Use of energy by moving object
If query tasks with high computing resource consumption are processed using standard resources, then resource utilization is efficient, but query execution time increases and response speed decreases
Solution Approach 1:
The patent applies local quality by providing different resource configurations to different thread pools. The second thread pool is configured with higher resources (more CPU cores, more memory) specifically for complex query tasks that require intensive computing power. This localized enhancement ensures that heavy queries can execute efficiently with adequate resources, maintaining high response speed for resource-intensive operations without wasting resources on simple queries.
Solution Approach 2:
The patent changes the resource allocation parameter based on query task characteristics. By assessing whether a query is simple or complex and adjusting the thread pool selection accordingly, the system optimizes the balance between resource utilization efficiency and response speed. Complex queries are routed to the high-configuration second thread pool, while simple queries use the standard first thread pool, achieving optimal performance for each query type.
Data Source
AI summary
Embodiments of the present disclosure provide a time series data query method and apparatus, an electronic device and a storage medium, generating, by a time series data engine in response to a query instruction, a query task, wherein the query task is used for querying time series data stored in a storage engine; obtaining a query level of the query task based on the query task, which corresponding to a computing resource consumed by executing the query task; and distributing the query task to a target thread pool corresponding to the time series data engine based on the query level and obtaining a corresponding query result with the target thread pool, wherein the target thread pool has an independent thread resource matching the query level.


