Data Pivot Table Aggregation for Instant Query Switching
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing data pivot tables require re-performing query operations when summary manners are adjusted, leading to poor query efficiency and excessive performance and memory losses.
Innovation Solution
A method for data querying that traverses data records, obtains aggregation basis paths, and updates summarized values in a data pivot table without waiting for a pivot aggregation engine to re-perform queries, enabling instant display during the data pivot process.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If a pivot aggregation engine re-performs query operations when summary manners are adjusted, then query accuracy is maintained, but query efficiency deteriorates and memory losses increase
Solution Approach 1:
The patent pre-calculates and stores summarized values for multiple summary types (sum, count, average, max, min) during the initial data pivot table construction. When users switch between different summary manners, the pre-computed values are directly retrieved without re-executing query operations, thereby maintaining accuracy while dramatically improving query efficiency
Solution Approach 2:
The patent pre-allocates memory space for storing summarized values of multiple summary types during the data pivot table construction phase. This preliminary memory preparation eliminates the need for dynamic memory allocation and repeated computations during subsequent query operations, reducing both time consumption and memory losses
2Measurement precision
If a pivot aggregation engine re-performs query operations when summary manners are adjusted, then data accuracy is maintained, but performance losses increase
Solution Approach 1:
The patent performs all necessary aggregation computations in advance during the data pivot table construction phase, storing results for multiple summary types. This preliminary computation eliminates the need for energy-consuming re-executions during user interactions, maintaining data accuracy while significantly reducing performance losses
Solution Approach 2:
The patent creates copies of summarized data for different summary types (sum, count, average, max, min) within the same data pivot table structure. These copied data structures can be rapidly switched between without requiring original computation, preserving data accuracy while minimizing energy consumption
Data Source
AI summary
Embodiments of the disclosure disclose a method, apparatus and electronic device for data querying. The method includes: traversing data records of a target data source; for each target data record, obtaining, based on an aggregation basis dimension of the target data source, a target aggregation basis path corresponding to the target data record, and updating, based on dimension types and dimension values of the target data record in aggregate computation dimensions, summarized values, corresponding to a plurality of summary types, of the target aggregation basis path in the aggregate computation dimensions in a data pivot table of the target data source; and after the data records of the target data source are traversed, performing a data pivot service of the target data source based on the data pivot table.


