IP Library › Granted Patent US 12,493,618
Granted Patent B2
US 12,493,618 · App. 18/630,512 · Granted Dec 9, 2025

Method, apparatus and electronic device for data querying

Inventor: Yanchun Wu (Beijing, CN)
Assignee: Beijing Zitiao Network Technology Co., Ltd.
G06F16/24561
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,493,618
App. No.
18/630,512
Granted
Dec 9, 2025
Kind
B2
Abstract

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.

Claims (69)

1 . A method for improving query efficiency and reducing memory overheads by sharing a data pivot table, comprising:

traversing a pivot cache to process data records of a target data source, wherein the target data source comprises aggregation basis dimensions that serve as bases for grouping and summarizing the target data source;

generating a plurality of aggregation paths based on dimension values of the data records in the aggregation basis dimensions;

computing a plurality of summarized values corresponding to a plurality of summarization types associated with each of the plurality of aggregation paths based on values of the data records in at least one aggregate computation dimension, wherein the at least one aggregate computation dimension is a dimension of the target data source different from the aggregation basis dimensions;

generating the data pivot table based on the plurality of summarized values corresponding to the plurality of summarization types associated with each of the plurality of aggregation paths;

receiving different queries associated with different summarization types, wherein the different summarization types are among the plurality of summarization types; and

implementing the different queries by utilizing the data pivot table to improve the query efficiency.

2 . The method of claim 1 , further comprising:

receiving a first pivot query request of a user, wherein the first pivot query request carries a query condition, a query aggregate computation dimension, and a first query summarization type;

obtaining, from the data pivot table of the target data source, summarized data, corresponding to the plurality of summarization types in respective query aggregate computation dimensions, of an aggregation basis path matching the query condition, and loading the summarized data into a pivot aggregation engine; and

displaying, in a pivot query interface, summarized data that is in the pivot aggregation engine and that matches the query aggregate computation dimension and the first query summarization type.

3 . The method of claim 1 , further comprising:

receiving a second pivot query request of a user, wherein the second pivot query request carries a second query summarization type; and

displaying, in a new display page in a pivot query interface, data that is in the pivot aggregation engine and that matches the query aggregate computation dimension and the second query summarization type; or

clearing data of a current page in a pivot query interface, and displaying, in the current page in the pivot query interface, data that is in the pivot aggregation engine and that matches the query aggregate computation dimension and the second query speculation type.

4 . The method of claim 1 , wherein

each aggregation basis dimension of the target data source is pre-configured; or

each aggregation basis dimension of the target data source is determined based on a dimension selected by a user.

5 . The method of claim 1 , wherein the generating a plurality of aggregation paths based on dimension values of the data records in the aggregation basis dimensions comprises:

obtaining dimension values of a target data record in respective aggregation basis dimensions in the target data source; and

combining the dimension values of the target data record in the respective aggregation basis dimensions in the target data source according to a preset arrangement order of the respective aggregation basis dimensions of the target data source, to generate a target aggregation basis path corresponding to the target data record.

6 . The method of claim 5 , further comprising:

in response to determining that data corresponding to the target aggregation basis path does not exist in the data pivot table; and

writing, based on a corresponding dimension value of the target data record in a target aggregate computation dimension and a dimension type of the target aggregate computation dimension, into the data pivot table of the target data source, summarized values corresponding to the plurality of summarization types corresponding to the target aggregation basis path and the target aggregate computation dimension.

7 . The method of claim 5 , further comprising:

in response to determining that data corresponding to the target aggregation basis path exists in the data pivot table, obtaining current summarized values, corresponding to the plurality of summarization types, of the target aggregation basis path in the aggregate computation dimensions in the data pivot table of the target data source; and

updating in the data pivot table of the target data source, based on current summarized values corresponding to the plurality of summarization types corresponding to the target aggregation basis path and the target aggregate computation dimension in the data pivot table of the target data source, a corresponding dimension value of the target data record in a target aggregate computation dimension and a dimension type of the target aggregate computation dimension, summarized values corresponding to the plurality of summarization types corresponding to the target aggregation basis path and the target aggregate computation dimension.

8 . The method of claim 6 , further comprising:

querying an aggregation path cache pool for a corresponding aggregation unit identifier of the target aggregation basis path, wherein the aggregation path cache pool stores aggregation basis paths already summarized in the target data source and corresponding aggregation unit identifiers, and aggregation units indicated by the aggregation unit identifiers comprise current summarized values corresponding to the plurality of summarization types of the aggregate computation dimensions under a corresponding aggregation basis path.

9 . The method of claim 1 , wherein each aggregation basis dimension comprises a row dimension and a column dimension, the row dimension corresponds to a data row displayed in a pivot query interface, and the column dimension corresponds to a data column displayed in the pivot query interface.

10 . An electronic device, comprising:

a processor; and

a memory for storing computer-executable instructions which, when executed, cause the processor to perform acts comprising:

traversing a pivot cache to process data records of a target data source, wherein the target data source comprises aggregation basis dimensions that serve as bases for grouping and summarizing the target data source;

generating a plurality of aggregation paths based on dimension values of the data records in the aggregation basis dimensions;

computing a plurality of summarized values corresponding to a plurality of summarization types associated with each of the plurality of aggregation paths based on values of the data records in at least one aggregate computation dimension, wherein the at least one aggregate computation dimension is a dimension of the target data source different from the aggregation basis dimensions;

generating the data pivot table based on the plurality of summarized values corresponding to the plurality of summarization types associated with each of the plurality of aggregation paths;

receiving different queries associated with different summarization types, wherein the different summarization types are among the plurality of summarization types; and

implementing the different queries by utilizing the data pivot table to improve the query efficiency.

11 . The electronic device of claim 10 , further comprising:

receiving a first pivot query request of a user, wherein the first pivot query request carries a query condition, a query aggregate computation dimension, and a first query summarization type;

obtaining, from the data pivot table of the target data source, summarized data, corresponding to the plurality of summarization types in respective query aggregate computation dimensions, of an aggregation basis path matching the query condition, and loading the summarized data into a pivot aggregation engine; and

displaying, in a pivot query interface, summarized data that is in the pivot aggregation engine and that matches the query aggregate computation dimension and the first query summarization type.

12 . The electronic device of claim 10 , further comprising:

receiving a second pivot query request of a user, wherein the second pivot query request carries a second query summarization type; and

displaying, in a new display page in a pivot query interface, data that is in the pivot aggregation engine and that matches the query aggregate computation dimension and the second query summarization type; or

clearing data of a current page in a pivot query interface, and displaying, in the current page in the pivot query interface, data that is in the pivot aggregation engine and that matches the query aggregate computation dimension and the second query speculation type.

13 . The electronic device of claim 10 , wherein

each aggregation basis dimension of the target data source is pre-configured; or

each aggregation basis dimension of the target data source is determined based on a dimension selected by a user.

14 . The electronic device of claim 10 , wherein the generating a plurality of aggregation paths based on dimension values of the data records in the aggregation basis dimensions comprises:

obtaining dimension values of a target data record in respective aggregation basis dimensions in the target data source; and

combining the dimension values of the target data record in the respective aggregation basis dimensions in the target data source according to a preset arrangement order of the respective aggregation basis dimensions of the target data source, to generate a target aggregation basis path corresponding to the target data record.

15 . The electronic device of claim 14 , further comprising:

in response to determining that data corresponding to the target aggregation basis path does not exist in the data pivot table; and

writing, based on a corresponding dimension value of the target data record in a target aggregate computation dimension and a dimension type of the target aggregate computation dimension, into the data pivot table of the target data source, summarized values corresponding to the plurality of summarization types corresponding to the target aggregation basis path and the target aggregate computation dimension.

16 . The electronic device of claim 14 , further comprising:

in response to determining that data corresponding to the target aggregation basis path exists in the data pivot table, obtaining current summarized values, corresponding to the plurality of summarization types, of the target aggregation basis path in the aggregate computation dimensions in the data pivot table of the target data source; and

updating in the data pivot table of the target data source, based on current summarized values corresponding to the plurality of summarization types corresponding to the target aggregation basis path and the target aggregate computation dimension in the data pivot table of the target data source, a corresponding dimension value of the target data record in a target aggregate computation dimension and a dimension type of the target aggregate computation dimension, summarized values corresponding to the plurality of summarization types corresponding to the target aggregation basis path and the target aggregate computation dimension.

17 . The electronic device of claim 15 , further comprising:

querying an aggregation path cache pool for a corresponding aggregation unit identifier of the target aggregation basis path, wherein the aggregation path cache pool stores aggregation basis paths already summarized in the target data source and corresponding aggregation unit identifiers, and aggregation units indicated by the aggregation unit identifiers comprise current summarized values corresponding to the plurality of summarization types of the aggregate computation dimensions under a corresponding aggregation basis path.

18 . The electronic device of claim 10 , wherein each aggregation basis dimension comprises a row dimension and a column dimension, the row dimension corresponds to a data row displayed in a pivot query interface, and the column dimension corresponds to a data column displayed in the pivot query interface.

19 . A non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions which, when executed by a processor, cause the processor to implement acts comprising:

traversing a pivot cache to process data records of a target data source, wherein the target data source comprises aggregation basis dimensions that serve as bases for grouping and summarizing the target data source;

generating a plurality of aggregation paths based on dimension values of the data records in the aggregation basis dimensions;

computing a plurality of summarized values corresponding to a plurality of summarization types associated with each of the plurality of aggregation paths based on values of the data records in at least one aggregate computation dimension, wherein the at least one aggregate computation dimension is a dimension of the target data source different from the aggregation basis dimensions:

generating the data pivot table based on the plurality of summarized values corresponding to the plurality of summarization types associated with each of the plurality of aggregation paths;

receiving different queries associated with different summarization types, wherein the different summarization types are among the plurality of summarization types; and

implementing the different queries by utilizing the data pivot table to improve the query efficiency.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 11, 2025
From: WU, YANCHUN
To: LEMON TECHNOLOGY (SHENZHEN) CO., LTD.
Reel/Frame 072853/0620 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 11, 2025
From: LEMON TECHNOLOGY (SHENZHEN) CO., LTD.
To: BEIJING ZITIAO NETWORK TECHNOLOGY CO., LTD.
Reel/Frame 072853/0694 →
Priority Claims (1)
CN 202310395792.6 · Apr 13, 2023 · national
Continuity (1)
Related Publication 20240346025A1 · Oct 17, 2024
References Cited (10)
US 20050038630A1 · Verschell · 2005 [cited by examiner]
US 20090187815A1 · Becerra, Sr. · 2009 [cited by examiner]
US 20090210430A1 · Averbuch et al. · 2009 [cited by applicant]
US 20130097563A1 · Pacheco Rodrigues Velho · 2013 [cited by examiner]
US 20140019842A1 · Montagna · 2014 [cited by examiner]
US 20160132481A1 · Dickerman · 2016 [cited by examiner]
CN 111177206A · 2020 [cited by applicant]
CN 112883023A · 2021 [cited by applicant]
CN 113297300A · 2021 [cited by applicant]
Chinese Patent Application No. 202310395792.6; Office Action dated Jul. 4, 2025, 19 pages with machine translation. [cited by applicant]