Abstract:With the continuous expansion of power quality monitoring points, a large number of multi-dimensional power quality data with time series characteristics have been generated. The existing data query methods can not meet the need of interactive multi-dimensional aggregation query of power quality monitoring data. This paper presents a method to implement multi-dimensional aggregation service for sequential data. It establishes a hash storage structure for pre-aggregated task results in memory, a bitmap index storage structure for real-time data, and stores pre-aggregated historical data in memory as much as possible thereby improving the performance of random reading and writing, and the efficiency of query, solving the problem of interactive query. At the same time, the optimal aggregation task selection algorithm is used to select as many pre-aggregation tasks as possible to improve the hit rate of interactive queries. Experiments verify the feasibility of the proposed algorithm. Compared with the grouped two-dimensional knapsack algorithm, it has certain advantages in the number of pre-aggregated tasks.