A cube storage optimization method based on Kylin layer-by-layer algorithm
By employing Kylin's layer-by-layer algorithm for Cube storage optimization, and utilizing the principles of hierarchical pruning and nearest-level dependency, the cube construction and querying process of Kylin is optimized. This addresses the issue of large storage space consumption in high-dimensional Kylin, achieving both storage space optimization and improved query performance.
Patent Information
- Application Number
- CN202311751432.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-19
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-12-19
AI Technical Summary
During the Cube construction process in Kylin, the number of cuboids increases exponentially with the increase in the number of dimensions, resulting in long pre-computation time and large storage space consumption. Existing optimization measures are limited and cannot effectively solve the problem of storage space consumption.
A Cube storage optimization method based on the Kylin layer-by-layer algorithm is adopted. By using the principle of hierarchical pruning and nearest-level dependency, the Cube configuration and construction process is optimized, the number of pre-computed cuboids is reduced, and secondary calculations are performed during multidimensional analysis queries to improve performance.
It significantly reduces the storage space requirements for pre-calculated results, improves the speed of Cube construction and the performance of multidimensional analysis queries, and meets business needs.
Smart Images

Figure CN117873382B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of cloud computing and big data technology, and in particular to a Cube storage optimization method based on the Kylin layer-by-layer algorithm. Background Technology
[0002] Kylin is an open-source OLAP engine that works by pre-computing a cube on the data model and storing the results. These pre-computed results are then used to accelerate multidimensional queries. A cube is a data cube, a multidimensional space constructed from data of multiple dimensions, containing all the basic data to be analyzed. All aggregation operations are performed on the cube. A cube contains multiple cuboids, which are subsets formed by random combinations of some to all dimensions of the cube; each combination is called a cuboid. An N-dimensional cube consists of 1 N-dimensional sub-cuboid, N (N-1)-dimensional sub-cuboids, N*(N-1) / 2 (N-2)-dimensional sub-cuboids, ..., N 1-dimensional sub-cuboids and 1 0-dimensional sub-cuboid, for a total of 2... N Composed of 2 sub-cuboids, Kylin will process 2 during the Cube construction process. N -1 sub-cuboids (excluding the 0-dimensional cuboid) are pre-computed and the results are stored. During multidimensional data analysis, the Kylin query engine parses the tables, dimensions, and metrics in the query SQL statement to determine if a corresponding Cube model is configured. If so, it quickly reads the data from the pre-computed results and returns the results to the application; otherwise, it uses the Spark engine to query the data from the original database and returns it to the application.
[0003] Kylin's core idea is to trade space for time; as the number of dimensions increases, the number of cuboids increases exponentially. N -1 growth means that pre-computation takes a long time, and storing the pre-computed data consumes a lot of storage space. Although Kylin has adopted optimization measures such as aggregation groups, forced dimensions, hierarchical dimensions, and joint dimensions to speed up pre-computation and reduce storage, the applicable scenarios are limited. Most applications still need to perform pre-computation of all cuboids by combining all dimensions to speed up queries, which consumes a lot of storage space and does not fundamentally solve the problem of large storage consumption of pre-computation results. Summary of the Invention
[0004] The purpose of this invention is to provide a cube storage optimization method based on the Kylin layer-by-layer algorithm. This method optimizes storage through layer-by-layer pruning based on pre-computation using the Kylin layer-by-layer algorithm, and ensures query performance meets application requirements by incorporating the nearest-level dependency principle. The problem this invention aims to solve is to reduce the storage space occupied by pre-computed cuboids by reasonably reducing their pre-computation size, without affecting the original functionality.
[0005] The technical solution adopted in this invention is:
[0006] A cube storage optimization method based on Kylin's layer-by-layer algorithm includes the following steps:
[0007] Step 1, Cube Configuration: Obtain Hive fact table and dimension table information to configure the Cube. Based on the basic model for creating the Cube, create a new Cube configuration with basic information and specify the number of skip levels in the advanced configuration. Automatically calculate all cubes of the cube, higher-dimensional cubes that it directly depends on, and whether pre-computation is required.
[0008] Step 2, Cube Construction: Scan the data source to obtain the Cube's metadata to create a flattened intermediate table and calculate the cuboids for all dimensions; then read and filter the cuboid dependencies that need to be pre-calculated from the metadata database, complete the calculation step by step from high dimension to low dimension, and save the results to HDFS;
[0009] Step 3, Multi-dimensional Query: Obtain a multi-dimensional analysis query SQL. The Kylin query engine determines the cuboid involved in the query through the dimension and indicator information in the query statement; finds the higher-dimensional parent cuboid that the cuboid depends on and has completed pre-calculation according to the nearest hierarchy dependency principle, performs secondary calculation and returns the query result.
[0010] Furthermore, step 1 specifically includes the following steps:
[0011] Step 1-1: Create a fact table and dimension table for multi-dimensional analysis on Hive and configure an ETL scheduling task to periodically synchronize historical and incremental data to HDFS.
[0012] Steps 1-2: Log in to the Kylin web interface and switch to the data source loading module to load the Hive fact table and dimension table information into the selected project;
[0013] Steps 1-3: Create the basic model of the Cube and input the basic information of the model; select the fact table and dimension table and configure the table relationships; at the same time, select the dimension columns and indicator columns and configure the data filtering conditions.
[0014] Steps 1-4, Create a new Cube: Select the Cube base model and enter the basic Cube information, select the dimension columns and configure the indicator columns; at the same time, configure the partition merging rules and set the number of skip levels in the advanced configuration;
[0015] Steps 1-5 generate all dimension combination IDs and dependencies of the Cube, identify whether pre-computation is required, and save them to the metadata.
[0016] Furthermore, when partitioning tables are involved in steps 1-3, a date partitioning field is set to enable incremental Cube building.
[0017] Furthermore, step 2 specifically includes the following steps:
[0018] Step 2-1: Set the build partition time period and generate the Cube build task;
[0019] Step 2-2: Based on the Cube construction task, perform resource detection, connect to the data sources of the fact table and dimension table, scan the data sources and collect metadata information, statistical information and dictionary information;
[0020] Steps 2-3: Create a flattened intermediate table based on the data associated with the fact table and the dimensions and the dimension columns and measure columns of the dimension table, and calculate the cuboid for all dimensions;
[0021] Steps 2-4: Based on the cuboid dependencies that need to be pre-computed, read and filtered from the metadata database, perform calculations step by step from high dimension to low dimension and save the results to HDFS.
[0022] Furthermore, in steps 2-4, a layer-by-layer algorithm is used to process the cuboid layer by layer.
[0023] Furthermore, step 3 specifically includes the following steps:
[0024] Step 3-1: Submit the SQL statement for multidimensional analysis query;
[0025] Step 3-2: Determine the cuboid involved in the query by parsing the dimension and indicator information of the SQL statement;
[0026] Step 3-3: Determine whether the cuboid involved in the query has been pre-computed. If the cuboid involved in the query has been pre-computed, directly query the data of the cuboid and return the result to the application to end the query. If the cuboid involved in the query has not been pre-computed, according to the nearest hierarchy dependency principle, filter out the higher-dimensional cuboid that the cuboid depends on and has been pre-computed from the cuboid dependency relationship stored in the metadata and execute step 3-4.
[0027] Steps 3-4: Read the pre-computed data of the matched cuboid, then perform secondary calculations based on the dimension and metric information in this query, and return the query results to the application.
[0028] The present invention adopts the above technical solutions and has the following technical features: (1) When designing the Cube model, the number of jump layers is specified, and the layer pruning is performed accordingly during pre-computation. When the number of jump layers is N, the number of pre-computed cuboids is reduced to about 1 / (N+1) of the original, which greatly reduces the amount of data in the pre-computation results and achieves storage space optimization. (2) When building the Cube, the layer pruning strategy is used to filter cuboids that do not need to be pre-computed, reducing the number of pre-computed cuboids, and the characteristic that low dimensions can be obtained from high dimensions by the layer-by-layer algorithm is used to improve the pre-computation speed. (3) When performing multi-dimensional analysis queries, the nearest layer dependency principle is adopted to select the cuboid that is closest to the corresponding cuboid in the model involved in the current query statement and has a higher dimension for secondary calculation, thereby improving query performance and meeting the requirements of multi-dimensional business analysis. Attached Figure Description
[0029] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments;
[0030] Figure 1 This is a schematic diagram of the Cube configuration process for a Cube storage optimization method based on the Kylin layer-by-layer algorithm according to the present invention.
[0031] Figure 2 This is a schematic diagram of the Cube construction process of a Cube storage optimization method based on the Kylin layer-by-layer algorithm according to the present invention.
[0032] Figure 3 This is a schematic diagram of the multidimensional analysis and query process of a Cube storage optimization method based on the Kylin layer-by-layer algorithm according to the present invention. Implementation
[0033] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0034] like Figures 1 to 3 As shown in the figure, this invention discloses a Cube storage optimization method based on the Kylin layer-by-layer algorithm, including three major functional modules: Cube configuration, Cube construction, and multidimensional analysis and query. Specifically, it includes the following steps:
[0035] Step 1: Obtain Hive fact table and dimension table information to configure the Cube. Create a new Cube configuration based on the basic model of the Cube.
[0036] Step 2, Cube creation: Scan the data source to obtain the Cube's metadata to create a flattened intermediate table and calculate the cuboids for all dimensions; then read and filter the cuboid dependencies that need to be pre-calculated from the metadata database, complete the calculation step by step from high dimension to low dimension and save the results to HDFS;
[0037] Step 3, Multi-dimensional Query: Obtain a multi-dimensional analysis query SQL. The Kylin query engine determines the cuboid involved in the query through the dimension and indicator information in the query statement; finds the higher-dimensional parent cuboid that the cuboid depends on and has completed pre-calculation according to the nearest hierarchy dependency principle, performs secondary calculation and returns the query result.
[0038] Furthermore, step 1 specifically includes the following steps:
[0039] Step 1-1: Create a fact table and dimension table for multi-dimensional analysis on Hive and configure an ETL scheduling task to periodically synchronize historical and incremental data to HDFS.
[0040] Steps 1-2: Log in to the Kylin web interface and switch to the data source loading module to load the Hive fact table and dimension table information into the selected project.
[0041] Steps 1-3: Create the basic model of the Cube and input the basic information of the model; select the fact table and dimension table and configure the table relationships; at the same time, select the dimension columns and indicator columns and configure the data filtering conditions.
[0042] Steps 1-4, Create a new Cube: Select the Cube base model and enter the basic Cube information, select the dimension columns and configure the indicator columns; at the same time, configure the partition merging rules and set the number of skip levels in the advanced configuration;
[0043] Steps 1-5 generate all IDs and dependencies of the Cube and mark whether pre-computation is required, then save them to the remote data.
[0044] Furthermore, when partitioning tables are involved in steps 1-3, a date partitioning field is set to enable incremental Cube building.
[0045] Furthermore, step 2 specifically includes the following steps:
[0046] Step 2-1: Set the build partition time period and generate the Cube build task;
[0047] Step 2-2: Based on the Cube construction task, perform resource detection, connect to the data sources of the fact table and dimension table, scan the data sources and collect metadata information, statistical information and dictionary information;
[0048] Steps 2-3: Create a flattened intermediate table based on the data associated with the fact table and the dimensions and the dimension columns and measure columns of the dimension table, and calculate the cuboid for all dimensions;
[0049] Steps 2-4: Based on the cuboid dependencies that need to be pre-computed, read and filtered from the metadata database, perform calculations step by step from high dimension to low dimension and save the results to HDFS.
[0050] Furthermore, in steps 2-4, a layer-by-layer algorithm is used to process the cuboid layer by layer.
[0051] Furthermore, step 3 specifically includes the following steps:
[0052] Step 3-1: Submit the SQL statement for multidimensional analysis query.
[0053] Step 3-2: Determine the cuboid involved in the query by parsing the dimension and indicator information of the SQL statement;
[0054] Step 3-3: Determine whether the cuboid involved in the query has been pre-computed. If the cuboid involved in the query has been pre-computed, directly query the data of the cuboid and return the result to the application to end the query. If the cuboid involved in the query has not been pre-computed, according to the nearest hierarchy dependency principle, filter out the higher-dimensional cuboid that the cuboid depends on and has been pre-computed from the cuboid dependency relationship stored in the metadata and execute step 3-4.
[0055] Steps 3-4: Read the pre-computed data of the matched cuboid, then perform secondary calculations based on the dimension and metric information in this query, and return the query results to the application.
[0056] The specific principles of this invention will be explained in detail below:
[0057] like Figure 1 As shown, the specific steps for configuring the Cube in this embodiment of the invention are as follows:
[0058] 1. Data Preparation: Synchronize the original tables required for multidimensional analysis of the dataset to the big data cluster. First, create fact tables and dimension tables on the Hive cluster. Then, through data extraction, transformation, and loading processes, synchronize the data in the fact tables and dimension tables to the Hadoop cluster, and dynamically update and maintain the data according to business requirements.
[0059] 2. Load the Hive data source tables: Log in to Kylin's web visualization interface through a browser, select the project, switch to the Data Source in the Model module, and load the Hive fact tables and dimension tables required for configuring the model into the current Kylin project.
[0060] 3. Create a Cube model: In the Model module, click New Model, enter the basic model information, select the fact table and dimension table and configure the table relationships, select the dimension column and indicator column, configure the data filtering conditions, and if it is a partitioned table, you can set a date partition field to facilitate incremental Cube building.
[0061] 4. Cube Design: In the Model module, click New Cube, select the model created in point 3, enter the basic Cube information, select the dimension column, configure the indicator column, configure the partition merging rules, and enter the advanced configuration. Next to AggregationGroups, there is a control to configure the Jump Layer Number. This is a newly added optimization configuration item in this invention. The default value is 0, which means that Kylin calculates all cuboids layer by layer. It is recommended to adjust the configuration when storage space is tight. Then, if you need to override the default parameter values of Kylin Properties, adjust the configuration. Finally, click Save to complete the Cube design.
[0062] When storage space is tight, it is recommended to configure the number of skip levels to a value between 1 and MIN (dimension number / 2 rounded down to 10). The number of skip levels is inversely proportional to the storage space occupied, that is, as the number of skip levels increases, the storage space occupied will decrease.
[0063] In Kylin's layer-by-layer algorithm, a model with four dimensions will have nearly 2... 4 -1 = 15 cuboids need to be pre-calculated and stored. According to this optimization scheme, if the jump level is set to 1, only 7 cuboids need to be pre-calculated and stored; if the jump level is set to 2, only 5 cuboids need to be pre-calculated and stored. If there are 5 dimensions, the default layer-by-layer algorithm will result in nearly 2... 5 -1 = 31 cuboids need to be pre-calculated and stored. If the skip level is set to 1, only 16 cuboids need to be pre-calculated and stored; if the skip level is set to 2, only 11 cuboids need to be pre-calculated and stored. If there are 6 dimensions, the default layer-by-layer algorithm will result in nearly 2... 6-1 = 63 cuboids need to be pre-computed and stored. If the skip level is set to 1, only 31 cuboids need to be pre-computed and stored; if the skip level is set to 2, only 21 cuboids need to be pre-computed and stored; and if the skip level is set to 3, only 16 cuboids need to be pre-computed and stored. The relationship between the number of dimensions, the number of cuboids in the layer-by-layer algorithm, and the number of skip levels and cuboids after configuring the skip level is shown in the table below:
[0064]
[0065]
[0066] As can be seen from the table above, in Kylin's layer-by-layer algorithm, if there is a model with N dimensions, it will have nearly 2 N -1 cuboid needs to be pre-calculated and stored. After optimization according to this invention, if the jump level is set to 1, then only 2 cuboids are needed. N-1 (When N is odd) or 2 N-1 -1 (when N is even) cuboids need to be pre-computed and stored, which is nearly half the number of cuboids required by Kylin. If the hop level is set to 2, the number of cuboids to be pre-computed and stored is about 1 / 3 of the original. If the hop level is set to 3, the number of cuboids to be pre-computed and stored is about 1 / 4 of the original. In other words, when the hop level is M, the number of pre-computed cuboids is about 1 / (M+1) of the original, which is a significant reduction. This hop level pruning strategy greatly reduces the cluster storage space occupied and saves storage costs.
[0067] After the Cube is configured, when you click save, the program will calculate the IDs of all cuboids, record the cuboid ID dependencies, and identify which IDs need to be pre-calculated and which do not, based on the configuration of the skip level. This information, along with the previously configured tables, dimensions, metrics, etc., will be saved to the MySQL meta-database for use in subsequent Cube construction and multidimensional analysis queries.
[0068] Cube building: Cube building is the process of pre-computing data by executing Cube building tasks, such as... Figure 2 As shown, the specific construction process of the Cube in this embodiment of the invention is as follows:
[0069] 1. Submit the Cube build task:
[0070] Locate the Cube to be built, then click Build. If date partitioning was configured during Cube setup, select the desired time period to generate an incremental Cube build task. If no partitioning was configured, a full build task will be generated. At this point, a temporary directory will be created on HDFS, and a unique job ID will be generated within this directory. Metadata information, statistics, and intermediate calculation results required for the build task will be stored in the `meta` subdirectory of this directory.
[0071] 2. Resource Detection:
[0072] When executing the Cube build task, resource detection is performed first, connecting to the data sources of the fact table and dimension table, scanning the data sources and collecting metadata information, statistical information and dictionary information, etc.
[0073] 3. Execute Spark tasks to build the Cube:
[0074] During Cube construction, the Spark task creates a flattened intermediate table based on the data associated with the fact table and dimensions, as well as the dimension and measure columns of the dimension table. Then, a layer-by-layer algorithm is used to process the cuboids layer by layer. The goal of this layer-by-layer algorithm is to reduce the computational load and response time during queries by pre-computing and pre-aggregating the cuboids at each level.
[0075] When a Jump Layer Number is configured, the Cube configuration saves the cuboid dependencies in advance, forming a cuboid dependency hierarchy. Each cuboid has its own ID, generated based on a bitmap index and combined according to dimensions, with each dimension occupying one bit in the cuboid ID. During construction, the cuboids that need to be pre-computed and their dependencies are read and filtered out. Then, the cuboid of the highest dimension (containing all dimensions) is calculated first. Next, cuboids of the next level dimension that directly depends on this cuboid are constructed according to the dependencies, until all cuboid data that needs to be pre-computed is generated.
[0076] The pre-calculated results are stored in parquet format in a subdirectory of HDFS corresponding to the cuboid ID, facilitating subsequent multidimensional analysis and querying.
[0077] Multidimensional analysis query: When a multidimensional analysis query SQL is submitted, the Kylin query engine will determine the cuboid involved in the query through the dimension and indicator information in the query statement, and find the higher-dimensional cuboid that the cuboid depends on and has been pre-computed according to the nearest hierarchy dependency principle, perform secondary calculation, and return the query result.
[0078] like Figure 3 As shown, the multidimensional analysis query parsing process of this embodiment of the invention is as follows:
[0079] 1. Submit a multidimensional analysis query SQL statement:
[0080] Write multidimensional analysis SQL scripts based on business needs and submit queries.
[0081] 2. Parse the query statement:
[0082] Parse the SQL query to extract its dimension and metric information. Dimensions are attributes used in the query to group, filter, and slice data, while metrics are aggregate indicators that need to be calculated, such as summation or count.
[0083] 3. Determine the cuboid involved in the query:
[0084] Based on the dimension information in the query statement, and combined with the metadata of the Cube configuration, it includes a predefined list of cuboids and the hierarchical structure information of the dimensions.
[0085] 4. Determine if the cuboid involved in the query has been pre-calculated:
[0086] 1) If it is determined that the cuboid involved in the query has been pre-calculated, then directly query the data of that cuboid and return the result to the application.
[0087] 2) If the cuboid involved in the query is not pre-computed, then based on the nearest-level dependency principle, filter out the higher-dimensional cuboids that the cuboid depends on and which have already been pre-computed from the cuboid dependencies stored in the metadata. If multiple cuboids are filtered out, then select the most suitable parent cuboid according to the query optimization strategy defined in the Cube metadata or configuration file. Read the pre-computed data of the parent cuboid, and then perform a secondary calculation based on the dimensions, metrics, and filtering conditions in this query statement, and return the query results to the application.
[0088] The present invention adopts the above technical solutions and has the following technical features: (1) When designing the Cube model, the number of jump layers is specified, and the layer pruning is performed accordingly during pre-computation. When the number of jump layers is N, the number of pre-computed cuboids is reduced to about 1 / (N+1) of the original, which greatly reduces the amount of data in the pre-computation results and achieves storage space optimization. (2) When building the Cube, the layer pruning strategy is used to filter cuboids that do not need to be pre-computed, reducing the number of pre-computed cuboids, and the characteristic that low dimensions can be obtained from high dimensions by the layer-by-layer algorithm is used to improve the pre-computation speed. (3) When performing multi-dimensional analysis queries, the nearest layer dependency principle is adopted to select the cuboid that is closest to the corresponding cuboid in the model involved in the current query statement and has a higher dimension for secondary calculation, thereby improving query performance and meeting the requirements of multi-dimensional business analysis.
[0089] Obviously, the described embodiments are only a part of the embodiments of this application, not all of them. Without conflict, the embodiments and features in the embodiments of this application can be combined with each other. The components of the embodiments of this application described and illustrated herein can generally be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of this application is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
Claims
1. A Cube storage optimization method based on Kylin's layer-by-layer algorithm, characterized in that: It includes the following steps: Step 1, Cube Configuration: Obtain Hive fact table and dimension table information to configure the Cube. Based on the basic model for creating the Cube, create a new Cube configuration with basic information and specify the number of skip levels in the advanced configuration. Automatically calculate all cubes of the cube, the higher-dimensional cubes that it directly depends on, and indicate whether pre-computation is required. Step 2, Cube Construction: Scan the data source to obtain the Cube's metadata to create a flattened intermediate table and calculate the cuboids for all dimensions; then read and filter the cuboid dependencies that need to be pre-calculated from the metadata database, complete the calculation step by step from high dimension to low dimension, and save the results to HDFS; Step 3, Multi-dimensional Query: Obtain a multi-dimensional analysis query SQL. The Kylin query engine determines the cuboid involved in the query through the dimension and indicator information in the query statement; finds the higher-dimensional parent cuboid that the cuboid depends on and has completed pre-calculation according to the nearest hierarchy dependency principle, performs secondary calculation and returns the query result.
2. The Cube storage optimization method based on Kylin's layer-by-layer algorithm according to claim 1, characterized in that: Step 1 specifically includes the following steps: Step 1-1: Create a fact table and dimension table for multi-dimensional analysis on Hive and configure an ETL scheduling task to periodically synchronize historical and incremental data to HDFS. Steps 1-2: Log in to the Kylin web interface and switch to the data source loading module to load the Hive fact table and dimension table information into the selected project; Steps 1-3: Create the basic model of the Cube and input the basic information of the model; select the fact table and dimension table and configure the table relationships; at the same time, select the dimension columns and indicator columns and configure the data filtering conditions. Steps 1-4, Create a new Cube: Select the Cube base model and enter the basic Cube information, select the dimension columns and configure the indicator columns; at the same time, configure the partition merging rules and set the number of skip levels in the advanced configuration; Steps 1-5 generate all dimension combination IDs and dependencies of the Cube, identify whether pre-computation is required, and save them to the metadata.
3. The Cube storage optimization method based on Kylin's layer-by-layer algorithm according to claim 2, characterized in that: When partitioning tables are involved in steps 1-3, set a date partitioning field to enable incremental Cube building.
4. The Cube storage optimization method based on Kylin's layer-by-layer algorithm according to claim 1, characterized in that: Step 2 specifically includes the following steps: Step 2-1: Set the build partition time period and generate the Cube build task; Step 2-2: Based on the Cube construction task, perform resource detection, connect to the data sources of the fact table and dimension table, scan the data sources and collect metadata information, statistical information and dictionary information; Steps 2-3: Create a flattened intermediate table based on the data associated with the fact table and the dimensions and the dimension columns and measure columns of the dimension table, and calculate the cuboid for all dimensions; Steps 2-4: Based on the cuboid dependencies that need to be pre-computed, read and filtered from the metadata database, perform calculations step by step from high dimension to low dimension and save the results to HDFS.
5. The Cube storage optimization method based on Kylin's layer-by-layer algorithm according to claim 4, characterized in that: Steps 2-4 use a layer-by-layer algorithm to process the cuboid layer by layer.
6. The Cube storage optimization method based on Kylin's layer-by-layer algorithm according to claim 1, characterized in that: Step 3 specifically includes the following steps: Step 3-1: Submit the SQL statement for multidimensional analysis query; Step 3-2: Determine the cuboid involved in the query by parsing the dimension and indicator information of the SQL statement; Step 3-3: Determine whether the cuboid involved in the query has been pre-computed. If the cuboid involved in the query has been pre-computed, directly query the data of the cuboid and return the result to the application before ending the query. If the cuboid involved in the query has not been pre-computed, filter out the higher-dimensional cuboids that the cuboid depends on and have been pre-computed from the cuboid dependency relationships stored in the metadata according to the nearest hierarchy dependency principle, and then execute step 3-4. Steps 3-4: Read the pre-computed data of the matched cuboid, then perform secondary calculations based on the dimension and metric information in this query, and return the query results to the application.
Citation Information
Patent Citations
Multidimensional online analytical processing (MOLAP)-based data processing method and apparatus
CN106484875A
Data query method and device, equipment and storage medium
CN114780570A
