Data query method, device and electronic equipment

By building a data query model and using dimension information and indicator information to match cubes, the problem that users need to switch between different query models or platforms in traditional multidimensional data query methods is solved, and data query efficiency and user operation experience are improved.

CN112052268BActive Publication Date: 2025-02-21ALIBABA GROUP HOLDING LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910493748.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-06
Publication Date
2025-02-21
Estimated Expiration
2039-06-06

AI Technical Summary

Technical Problem

Traditional multidimensional data query methods require users to switch to different query models or platforms to query data from different scenarios, resulting in low processing efficiency and cumbersome user operations.

Method used

By constructing a set of data query models, use the dimension information and indicator information of the data to be queryed to determine the cube that matches the query context from the cube group, and obtain the data required by the user from the matching cube set. .

Benefits of technology

It realizes the completion of querying different cubes in a set of data query models, which improves data query efficiency and reduces the complexity of user operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112052268B_ABST
    Figure CN112052268B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide a data query method, device and electronic device, wherein the method includes: determining the data to be queried by the user, and obtaining the query context of the data to be queried, wherein the query context includes the dimension information and index information of the data to be queried; determining a multidimensional data set matching the query context from a multidimensional data set group according to the dimension information and index information in the query context; and obtaining the data required by the user from the matching multidimensional data set. The scheme of the embodiments of the present invention can complete data query services for multiple multidimensional data sets with different timeliness through a set of data query models, thereby improving data query efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data, and in particular to a data query method, device and electronic device. Background Art

[0002] With the development of big data, there are more and more data analysis scenarios with various data timeliness, such as real-time data and offline data. Offline data may include offline aggregated data aggregated at time granularities such as days, weeks, months, and years. Traditional methods require different data modeling for various timeliness, as well as the construction of corresponding analysis reports and different multi-dimensional queries, which makes the processing efficiency low; moreover, when exposed to users, it is not user-friendly. Users need to switch between different online analytical processing (OLAP) query models and different reports to obtain the analytical data they want. Summary of the invention

[0003] The present invention provides a data query method, device and electronic device, which can complete data query services for multiple multidimensional data sets with different timeliness through a set of data query models, thereby improving data query efficiency.

[0004] To achieve the above object, the embodiments of the present invention adopt the following technical solutions:

[0005] In a first aspect, a data query method is provided, comprising:

[0006] Determine the data to be queried by the user, and obtain the query context of the data to be queried, wherein the query context includes dimension information and indicator information of the data to be queried;

[0007] Determining, from the multidimensional dataset group, a multidimensional dataset matching the query context according to the dimension information and the indicator information in the query context;

[0008] The data required by the user is obtained from the matching multidimensional data set.

[0009] In a second aspect, another data query method is provided, including:

[0010] Receive query information input by a user, determine the data to be queried by the user according to the query information, and obtain a query context of the data to be queried, wherein the query context includes dimension information and indicator information of the data to be queried, and the dimension information includes at least one main dimension information;

[0011] According to the main dimension information in the query context, determining a multidimensional data set matching the main dimension information from the multidimensional data set group;

[0012] Evaluate whether the determined multidimensional data set contains dimension information and indicator information in the query context;

[0013] If yes, the multidimensional dataset is determined as a multidimensional dataset matching the query context, and query process data is generated according to the dimension information and indicator information in the query context and the matching multidimensional dataset;

[0014] The query process data is executed through a query engine to obtain the data required by the user from the matching multidimensional data set.

[0015] In a third aspect, a data query device is provided, comprising:

[0016] A query information determination module is used to determine the data to be queried by the user and obtain the query context of the data to be queried, wherein the query context includes the dimension information and indicator information of the data to be queried;

[0017] A data information matching module, configured to determine a multidimensional data set matching the query context from a multidimensional data set group according to the dimension information and indicator information in the query context;

[0018] The data content acquisition module is used to acquire the data required by the user from the matching multi-dimensional data set.

[0019] In a fourth aspect, another data query device is provided, comprising:

[0020] A query information receiving module is used to receive query information input by a user, determine the user's to-be-queried data according to the query information, and obtain a query context of the to-be-queried data, wherein the query context includes dimension information and indicator information of the to-be-queried data, and the dimension information includes at least one main dimension information;

[0021] A main dimension matching module, used to determine, from the multidimensional data set group, a multidimensional data set that matches the main dimension information according to the main dimension information in the query context;

[0022] An information evaluation module, used to evaluate whether the determined multidimensional data set contains dimension information and indicator information in the query context;

[0023] A query process data generation module, configured to determine the multidimensional data set as a multidimensional data set matching the query context if the evaluation result is yes, and generate query process data according to the dimension information and indicator information in the query context and the matching multidimensional data set;

[0024] The query process data execution module is used to execute the query process data through a query engine to obtain the data required by the user from the matching multidimensional data set and provide it to the user.

[0025] In a fifth aspect, an electronic device is provided, including:

[0026] Memory, used to store programs;

[0027] The processor is coupled to the memory and is used to execute the program. When the program is running, the data query method provided by the present invention is executed.

[0028] The present invention provides a data query method, device and electronic device. A multidimensional data set group including multiple multidimensional data sets is pre-set. After determining the query context of the data to be queried, a multidimensional data set matching the query context is first determined from the multidimensional data set group based on the dimension information and indicator information of the data to be queried contained in the query context; then, the data required by the user is obtained from the matching multidimensional data set, thereby completing the query process for different multidimensional data sets in a set of data query models.

[0029] In this solution, the dimension information and indicator information of the data to be queried are used to first determine the multidimensional dataset that matches the context of this query from the multidimensional dataset group, so as to route the query requests of different query scenarios (such as timeliness scenarios) to the specified multidimensional dataset, and then obtain the target data to be queried from the specified multidimensional dataset, which effectively solves the defects of low processing efficiency and cumbersome user operations caused by the need to switch different query models or query platforms to query data in different scenarios in traditional multidimensional data query scenarios. This solution can improve data query efficiency by building a set of data query models to complete data query services for multiple multidimensional datasets with different timeliness.

[0030] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0032] Figure 1 A schematic diagram of a data query architecture hierarchy according to an embodiment of the present invention;

[0033] Figure 2 A logical diagram of data query according to an embodiment of the present invention;

[0034] Figure 3 The data query method flow of the embodiment of the present invention is as follows Figure 1 ;

[0035] Figure 4 This is a flow chart of the Cube matching method according to an embodiment of the present invention;

[0036] Figure 5 is a flow chart of a data acquisition method according to an embodiment of the present invention;

[0037] Figure 6 The data query method flow of the embodiment of the present invention is as follows Figure 2 ;

[0038] Figure 7 The data query device structure of the embodiment of the present invention is Figure 1 ;

[0039] Figure 8 The data query device structure of the embodiment of the present invention is Figure 2 ;

[0040] Fig. 9 The data query device structure of the embodiment of the present invention is Figure 3 ;

[0041] Fig.10 The data query device structure of the embodiment of the present invention is Figure 4 ;

[0042] Fig.11 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0044] The embodiment of the present invention improves the existing multidimensional data query scenario, in which different data models and corresponding query models need to be established for different scenarios (such as different timeliness scenarios); users need to switch between different query models or platforms to query the desired data, which brings the user the experience defect of cumbersome operation. The core idea is that only one query model is used. After the query context of the data to be queried is obtained by using the query model, the dimension information and indicator information of the data to be queried contained in the query context are used to first determine the multidimensional data set matching the current query context from the multidimensional data set group, so as to route the query requests of different query scenarios to the specified multidimensional data set, and release the fixed query relationship between the query model and the multidimensional data set; then the target data to be queried is obtained from the matching multidimensional data set, which effectively solves the defects of low processing efficiency and cumbersome user operation in the traditional multidimensional data query scenario, in which users need to switch between different query models or query platforms to query data of different scenarios (such as timeliness scenarios).

[0045] like Figure 1 FIG. 1 is a schematic diagram of a data query architecture hierarchy according to an embodiment of the present invention, which includes the following levels:

[0046] Query Modeling:

[0047] Define a standard model for query information, specifically the time dimension (primary dimension) of the query data, other (data) dimensions, indicators corresponding to the data, filter axes (including the setting of filter information in the query conditions), sorting of query results, and paging display. Through query modeling, the model definition of each query information can be standardized to prepare for the subsequent OLAP multidimensional query mapping and the formation of query context.

[0048] Query context:

[0049] The main function of OLAP multidimensional query mapping is to uniformly map the constructed query model with the OLAP multidimensional query standard. Through OLAP multidimensional query mapping, the query information input by the user can be mapped into the query context (also called OLAP context) that can be operated by the OLAP platform. In the process of forming the query context, the corresponding row-level permission determination can be performed on the user's permissions, and the query context obtained by the preliminary mapping can be filled in some special scenarios, such as adding a global filter to improve the query context.

[0050] Intelligent routing:

[0051] The purpose of intelligent routing is to route the query task to a multidimensional dataset (Cube) that matches the corresponding dimensions and indicators based on the query context obtained by the previous mapping, and to build a data query execution pipeline (Pipeline) corresponding to this query to obtain the target data from the matching multidimensional dataset through the Pipeline.

[0052] Among them, a multidimensional data set can be a data set composed of multi-dimensional data.

[0053] When selecting the target Cube during routing, the following processing steps can be performed:

[0054] Time dimension identification: By querying the time parameter in the context, preliminarily determine which timeliness Cube (this solution provides Cubes corresponding to multiple timeliness) this route is destined for, and whether such a cube exists.

[0055] Context evaluation: After initially determining that there is a cube corresponding to this query, evaluate whether the indicators and dimensions contained in the cube cover the query requirements based on the query context. If they are fully covered, a pipeline for executing the query is generated; otherwise, it is necessary to determine whether the cube can meet the query requirements by filling / removing certain dimensions and / or indicators. If it is not fully covered, the preset processing flow is automatically executed with fault tolerance.

[0056] Fill / remove query model information: add or reduce certain dimensions and / or indicators in the query information so that the currently determined cube meets the coverage capability of this query.

[0057] Automatic fault-tolerant switching: When no suitable cube is found in the route, the most suitable time-sensitive cube data can be selected as the query object to generate the query pipeline corresponding to the time-sensitive cube.

[0058] Intelligent routing (query pipeline orchestration): After determining the target Cube to be routed, the pipeline for this query is generated based on the query context. According to the needs of querying Cubes with different timeliness, offline daily pipelines, real-time pipelines, weekly / monthly / yearly pipelines, etc. can be formed to execute the corresponding query processes.

[0059] Data Cube Modeling:

[0060] This solution adopts unified data modeling, with offline day granularity as the main cube, and associated real-time, weekly / monthly / yearly time-sensitive cubes as sub-cube groups. Sub-cubes are cubes formed by cutting a series of dimensions and / or indicators from the main cube, and the entire data model only needs to expose one main cube. The basis of this modeling is that the indicators and dimensions of offline day granularity are the most comprehensive and can be used as the parent set, while real-time data and weekly / monthly / yearly time-sensitive data usually form subsets with smaller dimensions by cutting certain indicators and dimensions due to insufficient computing power or too large a data volume. At the same time, the data relationship between each cube is managed through the Cube Relationship Center. For example, the weekly / monthly / yearly time-sensitive cube can be built based on the offline day granularity cube, and the data in the real-time cube can also be converted into the data in the offline day granularity cube.

[0061] database:

[0062] In the data model, the specific methods of data storage may include Hybird MySQL, Kylin, ADS and other databases.

[0063] based on Figure 1 The data query architecture shown in the figure builds a query platform. The data query logic of the query platform is as follows: Figure 2 As shown, the processing includes the following:

[0064] 1. Get query information.

[0065] The query platform obtains the query information input by the user, which involves multiple dimensions and content information of indicators. The time dimension is defined as the main dimension (other dimensions can also be defined as the main dimension), which is also the main basis for determining the Cube where the target data to be queried is located.

[0066] 2. Build query context.

[0067] The query information input by the user is first defined by the standard model through the query model, and then uniformly mapped with the standard of OLAP multidimensional query through the query model, thereby forming a mapping between the query information input by the user and the data definition in the data model in the OLAP platform.

[0068] Through OLAP multidimensional query mapping, the query information input by the user can be mapped into the query context (also called OLAP context) that can be operated by the OLAP platform. In the process of forming the query context, the corresponding row-level permission determination can be performed on the query user's permission, and the query context obtained by the preliminary mapping can be filled in some special scenarios, such as adding a global filter, to improve the query context.

[0069] 3. Determine whether the data to be queried is a real-time query, and based on the judgment result, determine the Cube to be queried and build the query pipeline.

[0070] Determine whether the data to be queried is real-time data based on the multi-dimensional query context.

[0071] If it is real-time data, the corresponding real-time Cube is determined, and the real-time indicator dimension evaluation is performed on the real-time Cube to determine whether the evaluation result meets the coverage capability of this query, that is, whether the real-time Cube contains the indicators and dimensions to be queried. If it is included, the corresponding real-time query pipeline is constructed. Otherwise, according to the time dimension information in the query context, the offline day granularity is summarized to determine the time range of the data to be queried in the offline day Cube.

[0072] If it is not real-time data, the offline time dimension in the query context is evaluated to determine whether the data to be queried is data aggregated by week / month / year. If so, the corresponding weekly / month / year Cube is determined, and the corresponding weekly / month / year data indicator dimension evaluation is performed on the Cube to determine whether the evaluation result meets the coverage capability of this query, that is, whether the data Cube contains the indicators and dimensions to be queried. If it is included, the corresponding weekly / month / year query pipeline is constructed. Otherwise, according to the time dimension information in the query context, the offline day granularity is summarized to determine the time range of the data to be queried in the offline day Cube.

[0073] Based on the time results obtained by offline day-granularity aggregation, build the corresponding offline day-granularity query pipeline.

[0074] 4. Query execution engine.

[0075] According to the constructed query pipeline, the query execution engine is called to execute the query process.

[0076] The query execution engine first determines whether there is query data corresponding to the query pipeline cached locally. If so, the query is executed and the cached data is returned, and the query ends. If not, the query pipeline is executed and the query results are returned, and the query ends.

[0077] Compared with the existing technology, this method theoretically only needs to build the main cube corresponding to the offline day granularity, and then cut out sub-cubes with different timeliness subsets as needed. What is exposed to the user is a different timeliness parameter, so that n cubes can be combined into one cube and correspond to one report, which greatly improves efficiency.

[0078] The technical solution of the present application is further illustrated below through multiple embodiments.

[0079] Embodiment 1

[0080] Figure 3 The data query method provided by the embodiment of the present invention Figure 1 , can be applied according to Figure 1 The query platform is built by the architectural level shown in the figure. Figure 3 As shown, the data query method includes the following steps:

[0081] S310, determining the data to be queried by the user, and obtaining a query context of the data to be queried, where the query context includes dimension information and indicator information of the data to be queried.

[0082] The query platform receives the query information input by the user to obtain the data to be queried by the user, uses the pre-built query model to define the query information in a standardized model, and then obtains the query context that can be used in the query platform based on the mapping relationship between the query model and the operation standard of the multidimensional query platform (such as OLAP). The query context contains the dimension information (such as time, region, etc.) and indicator information (such as generation volume, sales volume, transaction volume, etc.) of the data to be queried.

[0083] After obtaining the query context, you can also fill in the context, such as adding global filters according to special scenarios, and determine the row-level permissions of the user for the corresponding data.

[0084] S320 , determining a multidimensional dataset matching the query context from the multidimensional dataset group according to the dimension information and the index information in the query context.

[0085] In this solution, the data object for users to query data can be a Cube group composed of multiple Cubes, each of which can have different dimensions and different indicators. When querying data, first determine the Cube that matches the query context from the Cube group based on the dimension information and indicator information in the query context to lock the Cube where the data to be queried is located. The specific criteria for judging the match are: the matching Cube must contain the dimension information and indicator information of the data to be queried in the query context.

[0086] In actual application scenarios, the cubes in the above cube group can adopt an interrelated data organization form built through a set of data models. When constructing a cube group, you can first build a main multidimensional dataset, trim the dimensions and / or indicators of the main multidimensional dataset, and obtain at least one sub-multidimensional dataset corresponding to the main multidimensional dataset; the above multidimensional dataset group contains the main multidimensional dataset and at least one sub-multidimensional dataset.

[0087] Among them, the trimming of the dimensions and / or indicators of the main Cube includes but is not limited to: reducing the number of dimensions and / or the number of indicators of the main Cube, and aggregating the granularity of the dimensions at a higher level, so that the data scale of the sub-Cube generated after trimming is smaller than that of the main Cube, and the data content can be obtained by summarizing the main Cube.

[0088] In this way, for a specified data source, the cubes required for different query scenarios can be built as needed, and users only need to expose the main cube and the corresponding query scenarios. The reason is that the dimension and indicator information in the main cube is the most comprehensive and can provide query services corresponding to other sub-cubes.

[0089] Furthermore, in order to quickly determine the Cube that matches the query context based on the dimension information and indicator information in the query context, when constructing the sub-multidimensional cubes in the multidimensional cube group, the sub-Cubes can all contain at least one same main dimension (such as the time dimension).

[0090] Correspondingly, when a multidimensional dataset group contains the above-mentioned main cube and sub-cubes, and the sub-cubes contain at least one identical main dimension, you can execute Figure 4 The method steps shown are used to obtain the Cube that matches the query context:

[0091] S410: According to the main dimension information in the query context, a sub-multidimensional data set matching the main dimension information is selected from the multidimensional data set group.

[0092] Specifically, the main dimension information in the query context (such as the main dimension information content and the granularity range corresponding to the information content) can be compared with the main dimension information of the sub-Cube in the multidimensional data set group to obtain the sub-Cube that matches the main dimension information.

[0093] For example, in the constructed multidimensional data set group, the granularity of each multidimensional data set in the above-mentioned main dimension can be set to be different, and the granularity of the main cube is the smallest.

[0094] Accordingly, when obtaining a sub-Cube that matches the main dimension information in the query context, the main dimension information in the query context can be compared with the granularity of the main dimension of each sub-multidimensional dataset, and the sub-multidimensional dataset whose granularity is consistent with the main dimension information in the query context is selected as the sub-multidimensional dataset that matches the main dimension information.

[0095] For example, taking the time dimension as the main dimension, when the time dimension information in the query context is the time range information of days, weeks, months, and years, the sub-Cube of the corresponding time granularity can be selected from each sub-Cube as the matching Cube.

[0096] S420, evaluating whether the sub-multidimensional data set contains dimension information and indicator information in the query context; if yes, proceeding to step S430, if no, proceeding to step S440.

[0097] Since the sub-Cube is obtained by trimming the dimensions and / or indicators contained in the main Cube, after selecting the sub-Cube that matches the main dimension information in the query context, it is necessary to further determine whether the dimension information and indicator information contained in the sub-Cube covers the corresponding information content of the dimension information and indicator information in the query context, so as to determine whether the sub-Cube meets the requirements of the query object.

[0098] S430: Determine that the sub-multidimensional data set is a multidimensional data set that matches the query context.

[0099] S440: Determine that the main multidimensional data set is a multidimensional data set that matches the query context.

[0100] In addition, if there is no sub-multidimensional dataset in the multidimensional dataset group that matches the main dimension information in the query context, the processing process also enters step S440.

[0101] The reason is that the dimensions and indicators of the main cube are the most comprehensive, and the data granularity is the smallest, so the target data to be queried can be obtained by summarizing the data in the main cube. However, in the summarization process, the amount of calculation is large due to the large amount of data in the main cube. Therefore, when obtaining the cube that matches the main dimension information in the query context, it is preferred to match from the sub-cube, so that it is more convenient and faster to obtain the data to be queried later.

[0102] S330, obtaining data required by the user from the matching multidimensional data set.

[0103] After determining the Cube that matches the query context, you can obtain the corresponding data from the corresponding Cube according to the normal data query process and provide it to the user.

[0104] For example, you can Figure 5 The method steps shown are used to execute the process of acquiring the target data:

[0105] S510, generating query process data according to dimension information and indicator information in the query context and a matching multidimensional data set.

[0106] For example, after the matching cube is determined, a corresponding query pipeline can be generated according to the dimension information and index information of the data to be queried. The pipeline can be operated and executed on an OLAP platform.

[0107] S520, executing query process data through the query engine to obtain data required by the user from the matching multidimensional data set.

[0108] For example, the pipeline generated in the previous step is executed through a query engine on an OLAP platform to obtain corresponding data from a matching multidimensional data set.

[0109] Furthermore, before executing the query process data through the query engine, the query engine may first query whether there is result cache data corresponding to the query process data (data that has been queried and cached in the past) locally. If so, the result cache data is determined to be the data required by the user. Otherwise, the operation of querying the process data is executed through the query engine to improve data query efficiency.

[0110] The data query method provided by the present invention pre-sets a multidimensional data set group containing multiple multidimensional data sets. After determining the query context of the data to be queried, the multidimensional data set that matches the query context is first determined from the multidimensional data set group based on the dimension information and indicator information of the data to be queried contained in the query context; then, the data required by the user is obtained from the matching multidimensional data set, thereby completing the query process for different multidimensional data sets in a set of data query models.

[0111] In this solution, the dimension information and indicator information of the data to be queried are used to first determine the multidimensional dataset that matches the context of this query from the multidimensional dataset group, so as to route the query requests of different query scenarios (such as timeliness scenarios) to the specified multidimensional dataset, and then obtain the target data to be queried from the specified multidimensional dataset, which effectively solves the defects of low processing efficiency and cumbersome user operations caused by the need to switch different query models or query platforms to query data in different scenarios in traditional multidimensional data query scenarios. This solution can improve data query efficiency by building a set of data query models to complete data query services for multiple multidimensional datasets with different timeliness.

[0112] Furthermore, by constructing a main multidimensional dataset, the dimensions and / or indicators of the main multidimensional dataset can be trimmed to obtain at least one sub-multidimensional dataset corresponding to the main multidimensional dataset; then a multidimensional dataset group can be built with the main multidimensional dataset and at least one sub-multidimensional dataset, so as to provide query services for different dimensions and indicators for the specified source data in different scenarios.

[0113] Furthermore, by setting the same primary dimension for each sub-multidimensional dataset, and preferentially selecting the sub-multidimensional dataset that matches the primary dimension information in the query context from the multidimensional dataset group as the multidimensional dataset where the data to be queried is located, the efficiency of subsequent processing of obtaining the data to be queried from the multidimensional dataset is improved.

[0114] Furthermore, by setting the granularity of each multidimensional dataset in the multidimensional dataset group on the main dimension to be different, and the granularity of the main multidimensional dataset is the smallest; and when selecting a sub-multidimensional dataset that matches the main dimension information in the query context, the main dimension information is compared with the granularity of the main dimension of each sub-multidimensional dataset, and the sub-multidimensional dataset whose granularity is consistent with the main dimension information in the query context is selected as the sub-multidimensional dataset that matches the main dimension information, thereby realizing the query requirements of different granularity scenarios under a certain dimension.

[0115] Embodiment 2

[0116] like Figure 6 The data query method of the embodiment of the present invention is shown as follows: Figure 2 , including the following steps:

[0117] S610, receiving query information input by a user, determining the data to be queried by the user according to the query information, and obtaining a query context of the data to be queried, wherein the query context includes dimension information and indicator information of the data to be queried, and the dimension information includes at least one main dimension information.

[0118] After the user inputs query information through a data query platform, the platform learns the user's query data based on the query information, and uses the standardized definition of query information in the pre-built query model, as well as the unified mapping relationship between the query model and the OLAP multidimensional query standard, to map the query information into a query context that can be operated by the OLAP platform. The query context contains the dimension information and indicator information of the data to be queried, and the dimension information contains at least one main dimension information. For example, the time dimension information in the dimension information can be set as the main dimension information.

[0119] S620: According to the main dimension information in the query context, determine a multidimensional data set that matches the main dimension information from the multidimensional data set group.

[0120] By matching the main dimension information in the query context with the dimension information of each multidimensional dataset in the multidimensional dataset group, the multidimensional dataset Cube where the data to be queried is located can be preliminarily determined from the multidimensional dataset group.

[0121] Among them, each cube in the above cube group can adopt an interrelated data organization form built through a set of data models. When constructing a cube group, you can first construct a main multidimensional dataset containing a time dimension, and then aggregate the main multidimensional dataset at different levels of the time dimension, or further trim other dimensions and / or indicators except the time dimension after aggregation to obtain at least one sub-multidimensional dataset corresponding to the main multidimensional dataset; the above multidimensional dataset group contains the main multidimensional dataset and at least one sub-multidimensional dataset.

[0122] Among them, the trimming of the dimensions and / or indicators of the main Cube includes but is not limited to: reducing the number of dimensions and / or the number of indicators of the main Cube, and aggregating the granularity of the dimensions at a higher level, so that the data scale of the sub-Cube generated after trimming is smaller than that of the main Cube, and the data content can be obtained by summarizing the main Cube.

[0123] In this way, for a specified data source, you can build the cubes required for different timeliness query scenarios, such as cubes with weekly, monthly, and yearly granularity. Users only need to expose the main cube (offline day granularity) and the corresponding query scenarios, because the dimensions and indicator information in the main cube are the most comprehensive, and can provide more comprehensive query services corresponding to other sub-cubes.

[0124] In this solution, in order to quickly determine the Cube that matches the query context based on the dimension information and indicator information in the query context, when constructing the sub-multidimensional cubes in the multidimensional cube group, the sub-Cubes can all contain at least one same main dimension, such as the time dimension.

[0125] In this way, when a multidimensional data set that matches the main dimension information in the query context is determined from the multidimensional data set group based on the main dimension information in the query context, a sub-multidimensional data set corresponding to the time dimension level that matches the time dimension information can be determined from the multidimensional data set group based on the time dimension information in the query context, thereby locking the sub-multidimensional data set that matches the timeliness of the main dimension information.

[0126] For example, if the time dimension information corresponding to the data to be queried is the indicator data of "year", then a Cube with a granularity of "year" can be selected from the corresponding time dimension as the Cube that matches the time dimension information.

[0127] S630: Evaluate whether the determined multidimensional data set contains dimension information and indicator information in the query context.

[0128] After initially selecting the Cube that meets the query requirements of the main dimension information in the query context, it is necessary to further determine whether the selected Cube meets the query requirements in other dimensions and indicators, that is, whether it contains the dimension information and indicator information in the query context.

[0129] For example, in the above-mentioned Cube group constructed with the main Cube and the sub-Cube, since the sub-Cube is obtained by trimming the dimensions and / or indicators contained in the main Cube, after selecting the sub-Cube that matches the main dimension information, it is necessary to further determine whether the dimension information and indicator information contained in the sub-Cube covers the corresponding information content of the dimension information and indicator information in the query context, so as to determine whether the sub-Cube meets the query requirements.

[0130] S640: If yes, the multidimensional dataset is determined as a multidimensional dataset that matches the query context, and query process data is generated according to the dimension information and indicator information in the query context and the matching multidimensional dataset.

[0131] For example, after determining the Cube where the data to be queried is located, a corresponding query pipeline can be generated based on the dimension information and index information of the data to be queried and the determined Cube that matches the query context. The pipeline can be operated and executed on an OLAP platform, for example.

[0132] S650, executing the query process data through the query engine to obtain the data required by the user from the matching multidimensional data set.

[0133] For example, the pipeline generated in the previous step is executed through a query engine on an OLAP platform to obtain corresponding data from a matching multidimensional data set.

[0134] Furthermore, before executing the query process data through the query engine, the query engine may first query whether there is result cache data corresponding to the query process data (data that has been queried and cached in the past) locally. If so, the result cache data is determined to be the data required by the user. Otherwise, the operation of querying the process data is executed through the query engine to improve data query efficiency.

[0135] Further, in an example of building a Cube group based on different levels such as the time dimension (primary dimension), in the process of determining the sub-multidimensional dataset corresponding to the time dimension level matching the time dimension information from the multidimensional dataset group based on the time dimension information in the query context, if the sub-multidimensional dataset corresponding to the time dimension level matching the time dimension information does not exist in the multidimensional dataset group; or, the existing sub-multidimensional dataset does not contain the dimension information or indicator information in the query context, then the main multidimensional dataset is determined to be the multidimensional dataset matching the query context.

[0136] The reason is that the dimensions and indicators of the main cube are the most comprehensive, and the data granularity is the smallest, so the target data to be queried can be obtained by summarizing the data in the main cube. However, in the summarization process, the amount of calculation is large due to the large amount of data in the main cube. Therefore, when obtaining the cube that matches the main dimension information in the query context, it is preferred to match from the sub-cube, so that it is more convenient and faster to obtain the data to be queried later.

[0137] The data query method provided in this embodiment receives query information input by the user, determines the data to be queried by the user according to the query information, and obtains the query context of the data to be queried; determines a multidimensional data set matching the main dimension information from the multidimensional data set group according to the main dimension information in the query context; then evaluates whether it contains the dimension information and indicator information in the query context; if so, determines the multidimensional data set as a multidimensional data set matching the query context, and generates query process data according to the dimension information and indicator information in the query context and the matching multidimensional data set; executes the query process data through the query engine to obtain the data required by the user from the matching multidimensional data set, thereby realizing the data query process from different cubes through a set of query models, meeting the query needs of users and improving data query efficiency.

[0138] Furthermore, by constructing Cubes with different timeliness, users can be provided with data query requirements for the same source data in different timeliness query scenarios.

[0139] Embodiment 3

[0140] like Figure 7 FIG. 1 is a diagram showing the structure of a data query device according to an embodiment of the present invention. Figure 1 The data query device can control the execution of Figure 3 The method steps shown in , which include:

[0141] The query information determination module 710 is used to determine the data to be queried by the user and obtain the query context of the data to be queried, where the query context includes dimension information and indicator information of the data to be queried.

[0142] The data information matching module 720 is used to determine a multidimensional data set matching the query context from the multidimensional data set group according to the dimension information and indicator information in the query context;

[0143] The data content acquisition module 730 is used to acquire the data required by the user from the matching multi-dimensional data set.

[0144] Furthermore, if Figure 8 As shown, in Figure 7 The above data query device may also include:

[0145] The data content construction module 810 is used to construct a main multidimensional dataset, trim the dimensions and / or indicators of the main multidimensional dataset, and obtain at least one sub-multidimensional dataset corresponding to the main multidimensional dataset; the multidimensional dataset group includes the main multidimensional dataset and at least one sub-multidimensional dataset.

[0146] Furthermore, the sub-multidimensional data sets in the above multidimensional data set group contain at least one identical main dimension; accordingly, Figure 8 In the data query device shown, the data information matching module 720 may include:

[0147] The data information selection unit 820 is used to select a sub-multidimensional data set that matches the main dimension information from the multidimensional data set group according to the main dimension information in the query context;

[0148] A data information evaluation unit 830, used to evaluate whether the sub-multidimensional data set contains dimension information and indicator information in the query context;

[0149] If so, the sub-cube is determined to be a cube that matches the query context.

[0150] Furthermore, the above-mentioned data information evaluation unit 830 can also be used to determine that the main multidimensional data set is a multidimensional data set that matches the query context if there is no sub-multidimensional data set in the multidimensional data set group that matches the main dimensional information; or if the existing sub-multidimensional data set does not contain the dimensional information or indicator information in the query context.

[0151] Furthermore, each multidimensional data set in the multidimensional data set group has different granularity in the main dimension, and the granularity of the main multidimensional data set is the smallest;

[0152] Correspondingly, the data information selection unit 820 can be used to compare the main dimension information in the query context with the granularity of the main dimension of each sub-multidimensional data set, and select the sub-multidimensional data set whose granularity is consistent with the main dimension information in the query context as the sub-multidimensional data set that matches the main dimension information.

[0153] Furthermore, if Fig. 9 As shown, in Figure 7 In the data query device shown, the data content acquisition module 730 may include:

[0154] A query process data generating unit 910 is used to generate query process data according to dimension information and indicator information in the query context and a matching multidimensional data set;

[0155] The query process data execution unit 920 is used to execute the query process data through the query engine to obtain the data required by the user from the matching multi-dimensional data set.

[0156] Furthermore, the query process data execution unit 920 can be used to query whether there is result cache data corresponding to the query process data locally; if so, the result cache data is determined as the data required by the user, otherwise, the query process data operation is executed through the query engine.

[0157] Figure 8 , Fig. 9 The data query device shown can be used to execute Figure 4 , Figure 5 The method steps are shown.

[0158] The data query device provided by the present invention pre-sets a multidimensional data set group containing multiple multidimensional data sets. After determining the query context of the data to be queried, it first determines the multidimensional data set that matches the query context from the multidimensional data set group based on the dimension information and indicator information of the data to be queried contained in the query context; then, the data required by the user is obtained from the matching multidimensional data set, thereby completing the query process for different multidimensional data sets in a set of data query models.

[0159] In this solution, the dimension information and indicator information of the data to be queried are used to first determine the multidimensional dataset that matches the context of this query from the multidimensional dataset group, so as to route the query requests of different query scenarios (such as timeliness scenarios) to the specified multidimensional dataset, and then obtain the target data to be queried from the specified multidimensional dataset, which effectively solves the defects of low processing efficiency and cumbersome user operations caused by the need to switch different query models or query platforms to query data in different scenarios in traditional multidimensional data query scenarios. This solution can improve data query efficiency by building a set of data query models to complete data query services for multiple multidimensional datasets with different timeliness.

[0160] Furthermore, by constructing a main multidimensional dataset, the dimensions and / or indicators of the main multidimensional dataset can be trimmed to obtain at least one sub-multidimensional dataset corresponding to the main multidimensional dataset; then a multidimensional dataset group can be built with the main multidimensional dataset and at least one sub-multidimensional dataset, so as to provide query services for different dimensions and indicators for the specified source data in different scenarios.

[0161] Furthermore, by setting the same primary dimension for each sub-multidimensional dataset, and preferentially selecting the sub-multidimensional dataset that matches the primary dimension information in the query context from the multidimensional dataset group as the multidimensional dataset where the data to be queried is located, the efficiency of subsequent processing of obtaining the data to be queried from the multidimensional dataset is improved.

[0162] Furthermore, by setting the granularity of each multidimensional dataset in the multidimensional dataset group on the main dimension to be different, and the granularity of the main multidimensional dataset is the smallest; and when selecting a sub-multidimensional dataset that matches the main dimension information in the query context, the main dimension information is compared with the granularity of the main dimension of each sub-multidimensional dataset, and the sub-multidimensional dataset whose granularity is consistent with the main dimension information in the query context is selected as the sub-multidimensional dataset that matches the main dimension information, thereby realizing the query requirements of different granularity scenarios under a certain dimension.

[0163] Embodiment 4

[0164] like Fig.10 FIG. 1 is a diagram showing the structure of a data query device according to an embodiment of the present invention. Figure 4 The data query device can control the execution of Figure 6 The method steps shown in , which include:

[0165] The query information receiving module 101 is used to receive the query information input by the user, determine the user's to-be-queried data according to the query information, and obtain the query context of the to-be-queried data, wherein the query context includes the dimension information and index information of the to-be-queried data, and the dimension information includes at least one main dimension information;

[0166] A main dimension matching module 102 is used to determine, according to the main dimension information in the query context, a multidimensional data set that matches the main dimension information from the multidimensional data set group;

[0167] An information evaluation module 103, used to evaluate whether the determined multidimensional data set contains dimension information and indicator information in the query context;

[0168] The query process data generating module 104 is used to determine the multidimensional data set as a multidimensional data set matching the query context if the evaluation result is yes, and generate query process data according to the dimension information and indicator information in the query context and the matching multidimensional data set;

[0169] The query process data execution module 105 is used to execute the query process data through the query engine to obtain the data required by the user from the matching multi-dimensional data set.

[0170] Further, Fig.10 The data query device may also include:

[0171] A data construction module is used to construct a main multidimensional data set including a time dimension, aggregate the main multidimensional data set according to different levels of the time dimension, or further trim other dimensions and / or indicators except the time dimension after aggregation to obtain at least one sub-multidimensional data set corresponding to the main multidimensional data set; the multidimensional data set group includes the main multidimensional data set and at least one sub-multidimensional data set.

[0172] Furthermore, the at least one main dimension information may include time dimension information;

[0173] Accordingly, the main dimension matching module 102 can be used to determine, according to the time dimension information in the query context, from the multidimensional data set group, a sub-multidimensional data set corresponding to the time dimension level matching the time dimension information.

[0174] Furthermore, the above-mentioned main dimension matching module 102 can be used to determine that the main multidimensional dataset is a multidimensional dataset that matches the query context if there is no sub-multidimensional dataset corresponding to the time dimension level that matches the time dimension information in the multidimensional dataset group; or if the existing sub-multidimensional dataset does not contain the dimension information or indicator information in the query context.

[0175] Furthermore, the query process data execution module 105 can be used to query whether there is result cache data corresponding to the query process data locally;

[0176] If yes, the result cache data is determined as the data required by the user, otherwise, an operation of querying the process data is executed through the query engine.

[0177] The data query device provided in this embodiment receives query information input by the user, determines the user's to-be-queried data according to the query information, and obtains the query context of the to-be-queried data; determines a multidimensional data set that matches the main dimension information from the multidimensional data set group according to the main dimension information in the query context; then evaluates whether it contains the dimension information in the query context and the indicator information; if so, determines the multidimensional data set as a multidimensional data set that matches the query context, and generates query process data according to the dimension information and indicator information in the query context and the matching multidimensional data set; executes the query process data through the query engine to obtain the data required by the user from the matching multidimensional data set, thereby realizing the data query process from different cubes through a set of query models, meeting the user's query needs, and improving data query efficiency.

[0178] Furthermore, by constructing Cubes with different timeliness, users can be provided with data query requirements for the same source data in different timeliness query scenarios.

[0179] Embodiment 5

[0180] The above embodiments describe the overall structure of the data query device. The functions of the device can be realized by means of an electronic device, such as Fig.11 As shown, it is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention, which specifically includes: a memory 111 and a processor 112.

[0181] The memory 111 is used to store programs.

[0182] In addition to the above-mentioned programs, the memory 111 may also be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.

[0183] The memory 111 may be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0184] The processor 112 is coupled to the memory 111 and is used to execute the program in the memory 111 . When the program is executed, the operation steps of the data query method described in the above embodiments are executed.

[0185] In addition, the processor 112 may also include various modules described in the above embodiments to perform data query operations, and the memory 111 may be used, for example, to store data required for these modules to perform operations and / or data outputted.

[0186] The above-mentioned specific processing operations have been described in detail in the previous embodiments and will not be repeated here.

[0187] Further, if Fig.11 As shown, the electronic device may also include: a communication component 113, a power component 114, an audio component 115, a display 116 and other components. Fig.11 Only some components are shown schematically, which does not mean that the electronic device only includes Fig.11 Components shown.

[0188] The communication component 113 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 113 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 113 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0189] The power supply component 114 provides power to various components of the electronic device. The power supply component 114 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device.

[0190] The audio component 115 is configured to output and / or input audio signals. For example, the audio component 115 includes a microphone (MIC), and when the electronic device is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 111 or sent via the communication component 113. In some embodiments, the audio component 115 also includes a speaker for outputting audio signals.

[0191] The display 116 includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0192] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0193] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A data query method, comprising: Determine the data to be queried by the user, and obtain the query context of the data to be queried, wherein the query context includes dimension information and indicator information of the data to be queried; Constructing a main multidimensional data set, and trimming the dimensions and / or indicators of the main multidimensional data set to obtain at least one sub-multidimensional data set corresponding to the main multidimensional data set; The multidimensional dataset group includes the main multidimensional dataset and at least one sub-multidimensional dataset; The sub-multidimensional cubes in the multidimensional cube group contain at least one same main dimension; Determining, from the multidimensional dataset group, a multidimensional dataset matching the query context according to the dimension information and the indicator information in the query context; The data required by the user is obtained from the matching multidimensional data set.

2. The method according to claim 1, wherein: Determining a multidimensional dataset matching the query context from a multidimensional dataset group according to the dimension information and the indicator information in the query context includes: According to the main dimension information in the query context, selecting a sub-multidimensional data set that matches the main dimension information from the multidimensional data set group; Evaluate whether the sub-multidimensional data set contains dimension information and indicator information in the query context; If so, the sub-multidimensional dataset is determined to be a multidimensional dataset that matches the query context.

3. The method according to claim 2, wherein: The method further comprises: If there is no sub-multidimensional dataset in the multidimensional dataset group that matches the main dimension information; or, the existing sub-multidimensional dataset does not contain the dimension information or indicator information in the query context, then the main multidimensional dataset is determined to be the multidimensional dataset that matches the query context.

4. The method according to claim 2, wherein: The multidimensional data sets in the multidimensional data set group have different granularities in the primary dimension, and the primary multidimensional data set has the smallest granularity; The selecting, according to the main dimension information in the query context, a sub-multidimensional data set matching the main dimension information from the multidimensional data set group comprises: The main dimension information in the query context is compared with the granularity of the main dimension of each sub-multidimensional data set, and the sub-multidimensional data set whose granularity is consistent with the main dimension information in the query context is selected as the sub-multidimensional data set matching the main dimension information.

5. The method according to claim 1, wherein: The acquiring the data required by the user from the matched multidimensional data set comprises: Generate query process data according to the dimension information and indicator information in the query context and the matched multidimensional data set; The query process data is executed through a query engine to obtain the data required by the user from the matching multidimensional data set.

6. The method according to claim 5, wherein: Before executing the query process data by the query engine, the following steps are included: Check whether there is result cache data corresponding to the query process data locally; If yes, the result cache data is determined as the data required by the user; otherwise, the operation of querying the process data through the query engine is performed.

7. A data query method, comprising: Receive query information input by a user, determine the user's to-be-queried data according to the query information, and obtain a query context for the to-be-queried data, wherein the query context includes dimension information and indicator information of the to-be-queried data, and the dimension information includes at least one main dimension information; construct a main multidimensional data set including a time dimension, aggregate the main multidimensional data set according to different levels of the time dimension, or further trim other dimensions and / or indicators except the time dimension after aggregation, to obtain at least one sub-multidimensional data set corresponding to the main multidimensional data set; The multidimensional dataset group includes the main multidimensional dataset and at least one sub-multidimensional dataset; The at least one main dimension information includes time dimension information; According to the main dimension information in the query context, determining a multidimensional data set matching the main dimension information from the multidimensional data set group; Evaluate whether the determined multidimensional data set contains dimension information and indicator information in the query context; If yes, the multidimensional dataset is determined as a multidimensional dataset matching the query context, and query process data is generated according to the dimension information and indicator information in the query context and the matching multidimensional dataset; The query process data is executed through a query engine to obtain the data required by the user from the matching multidimensional data set.

8. The method according to claim 7, wherein: The step of determining, based on the main dimension information in the query context, a multidimensional dataset matching the main dimension information from the multidimensional dataset group includes: According to the time dimension information in the query context, a sub-multidimensional data set corresponding to the time dimension level matching the time dimension information is determined from the multidimensional data set group.

9. The method according to claim 8, wherein: The method further comprises: If there is no sub-multidimensional dataset corresponding to the time dimension level matching the time dimension information in the multidimensional dataset group; or, the existing sub-multidimensional dataset does not contain the dimension information or indicator information in the query context, then the main multidimensional dataset is determined to be the multidimensional dataset matching the query context.

10. The method according to claim 7, wherein: Before executing the query process data by the query engine, the following steps are included: Check whether there is result cache data corresponding to the query process data locally; If yes, the result cache data is determined as the data required by the user; otherwise, the operation of querying the process data through the query engine is performed.

11. A data query device, comprising: A query information determination module is used to determine the data to be queried by the user and obtain the query context of the data to be queried, wherein the query context includes the dimension information and indicator information of the data to be queried; A data content construction module, used to construct a main multidimensional data set, and to trim the dimensions and / or indicators of the main multidimensional data set to obtain at least one sub-multidimensional data set corresponding to the main multidimensional data set; The multidimensional dataset group includes the main multidimensional dataset and at least one sub-multidimensional dataset; The sub-multidimensional cubes in the multidimensional cube group contain at least one same main dimension; A data information matching module, configured to determine a multidimensional data set matching the query context from a multidimensional data set group according to the dimension information and indicator information in the query context; The data content acquisition module is used to acquire the data required by the user from the matching multi-dimensional data set.

12. The device according to claim 11, wherein The data information matching module includes: A data information selection unit, configured to select, according to the main dimension information in the query context, a sub-multidimensional data set that matches the main dimension information from the multidimensional data set group; A data information evaluation unit, used to evaluate whether the sub-multidimensional data set contains dimension information and indicator information in the query context; If so, the sub-multidimensional dataset is determined to be a multidimensional dataset that matches the query context.

13. The device according to claim 12, wherein: The data information evaluation unit is further configured to: If there is no sub-multidimensional dataset in the multidimensional dataset group that matches the main dimension information; or, the existing sub-multidimensional dataset does not contain the dimension information or indicator information in the query context, then the main multidimensional dataset is determined to be the multidimensional dataset that matches the query context.

14. The device according to claim 12, wherein: The multidimensional data sets in the multidimensional data set group have different granularities in the primary dimension, and the primary multidimensional data set has the smallest granularity; The data information selection unit is used to compare the main dimension information in the query context with the granularity of the main dimension of each sub-multidimensional data set, and select the sub-multidimensional data set whose granularity is consistent with the main dimension information in the query context as the sub-multidimensional data set matching the main dimension information.

15. The device according to claim 11, wherein The data content acquisition module includes: A query process data generating unit, configured to generate query process data according to the dimension information and indicator information in the query context and the matched multidimensional data set; The query process data execution unit is used to execute the query process data through a query engine to obtain the data required by the user from the matching multidimensional data set.

16. The device according to claim 15, wherein: The query process data execution unit is used to query whether there is result cache data corresponding to the query process data locally; If yes, the result cache data is determined as the data required by the user; otherwise, the operation of querying the process data through the query engine is performed.

17. A data query device, comprising: A query information receiving module is used to receive query information input by a user, determine the user's to-be-queried data according to the query information, and obtain a query context of the to-be-queried data, wherein the query context includes dimension information and indicator information of the to-be-queried data, and the dimension information includes at least one main dimension information; A data construction module is used to construct a main multidimensional data set including a time dimension, aggregate the main multidimensional data set according to different levels of the time dimension, or further trim other dimensions and / or indicators except the time dimension after aggregation to obtain at least one sub-multidimensional data set corresponding to the main multidimensional data set; The multidimensional dataset group includes the main multidimensional dataset and at least one sub-multidimensional dataset; The at least one main dimension information includes time dimension information; A main dimension matching module, used to determine, from the multidimensional data set group, a multidimensional data set that matches the main dimension information according to the main dimension information in the query context; An information evaluation module, used to evaluate whether the determined multidimensional data set contains dimension information and indicator information in the query context; A query process data generation module, configured to determine the multidimensional data set as a multidimensional data set matching the query context if the evaluation result is yes, and generate query process data according to the dimension information and indicator information in the query context and the matching multidimensional data set; The query process data execution module is used to execute the query process data through a query engine to obtain the data required by the user from the matching multidimensional data set and provide it to the user.

18. The device according to claim 17, wherein: The main dimension matching module is used to determine, based on the time dimension information in the query context, from the multidimensional data set group, a sub-multidimensional data set corresponding to a time dimension level that matches the time dimension information.

19. The device according to claim 18, wherein: The main dimension matching module is used to determine that the main multidimensional dataset is a multidimensional dataset that matches the query context if there is no sub-multidimensional dataset corresponding to the time dimension level that matches the time dimension information in the multidimensional dataset group; or if the existing sub-multidimensional dataset does not contain the dimension information or indicator information in the query context.

20. The device according to claim 17, wherein: The query process data execution module is used to query whether there is result cache data corresponding to the query process data locally; If yes, the result cache data is determined as the data required by the user; otherwise, the operation of querying the process data through the query engine is performed.

21. An electronic device comprising: Memory, used to store programs; A processor, coupled to the memory, is used to execute the program, and when the program is running, the data query method according to any one of claims 1 to 10 is executed.

Citation Information

Patent Citations

  • Big data multi-dimensional analysis method and system

    CN106897386A

  • Data query method and device

    CN107229730A