Multi-dimensional index data query method and device, equipment and storage medium

By associating business data with dimensional configuration data, calculating and storing it in HBase, and using a unified query interface and metadata system, the problem of low query performance for multi-dimensional indicator data is solved, enabling fast calculation and efficient data analysis.

CN115934723BActive Publication Date: 2026-05-12BEIJING PALMGO INFOTECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING PALMGO INFOTECH CO LTD
Filing Date
2022-12-15
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In existing technologies, querying multi-dimensional indicator data in HBase suffers from poor query performance and inconsistent interfaces, which increases the difficulty of development and reading, and fails to meet business needs.

Method used

By associating business data with dimension configuration data, the metric values ​​for each dimension are calculated and stored in HBase. A unified query interface and metadata system are used for data transformation to achieve standardized data storage and querying.

Benefits of technology

It enables rapid calculation of newly added dimension metrics, reduces development and testing workload, improves data analysis efficiency, and simplifies the data deployment process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115934723B_ABST
    Figure CN115934723B_ABST
Patent Text Reader

Abstract

The application discloses a multi-dimension index data query method and device, equipment and a storage medium. The method comprises the following steps: associating business data with dimension configuration data to obtain dimension-based business data; calculating the index value of each dimension according to the dimension-based business data to obtain index result data; storing the index result data in an HBase, wherein the HBase comprises the corresponding relationship between the dimensions and the indexes; receiving a query request from a client, and querying the corresponding index data in the HBase according to the dimension information and the index information in the query request. The index data query method can read different indexes by using the same index query service interface. When a new space-time dimension index needs to be calculated, the configuration file of the associated dimension and the business data only need to be modified, so that the rapid calculation of the existing indexes can be realized. The development and test workload is reduced, the data can be quickly put online, and the analysis efficiency of the data analysts is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, device, and storage medium for querying multi-dimensional indicator data. Background Technology

[0002] Metric data is a tool used to quantify things, reflecting the scale, extent, and proportion of a certain business within a unit of time. It is an important support for business personnel to understand the operating rules of an industry. Multi-dimensional metrics refer to the same metric calculated from multiple different perspectives, which can more accurately reflect the patterns of things.

[0003] Due to the continuous increase in data volume across industries and the increasingly detailed and diverse demands for multi-dimensional metrics, the sheer size of multi-dimensional metric data has also grown significantly. Conventional relational databases are struggling to meet the storage and query needs, leading many enterprises to opt for non-relational distributed databases, such as HBase, to store metric data. However, due to HBase's inherent design limitations, its query performance heavily relies on the primary key design. An inadequate primary key design can result in poor query performance, failing to meet business requirements. Similarly, HBase's flexibility and ease of use—allowing columns to be dynamically added and deleted, and enabling different data types for the same column in different rows—while increasing development and retrieval complexity, also present challenges. Current technologies often focus on primary key design, lacking a universal method for calculating and querying metrics themselves. For example, adding dimensions requires rewriting the calculation code. Furthermore, different interfaces are needed for querying different metrics across different dimensions. This lack of standardized data interfaces necessitates the implementation of multiple corresponding methods at the business level. Summary of the Invention

[0004] This application provides a method, apparatus, device, and storage medium for querying multi-dimensional indicator data. To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general description, nor is it intended to identify key / important components or describe the scope of protection of these embodiments. Its sole purpose is to present some concepts in a simple form as a prelude to the detailed description that follows.

[0005] Firstly, embodiments of this application provide a method for querying multi-dimensional indicator data, including:

[0006] By associating business data with dimension configuration data, we obtain dimension-based business data.

[0007] Based on dimension-based business data, calculate the indicator values ​​for each dimension to obtain the indicator result data;

[0008] The metric results data are stored in HBase, which contains the correspondence between dimensions and metrics;

[0009] Receive query requests from clients and retrieve corresponding metric data from HBase based on the dimension and metric information in the query request.

[0010] In an optional embodiment, business data is associated with dimension configuration data to obtain dimension-based business data, including:

[0011] Retrieve business data, which includes entity ID, time, and business attribute data;

[0012] Retrieve dimension configuration data, which includes entity ID and multiple spatial dimension data;

[0013] By associating business data with dimension configuration data, we obtain dimension-based business data, which includes entity ID, time, business attribute data, and multiple spatial dimension data.

[0014] In an optional embodiment, based on dimension-based business data, indicator values ​​for each dimension are calculated to obtain indicator result data, including:

[0015] Dimension-based business data is grouped according to spatial dimension to obtain multiple sets of single-dimensional data. The single-dimensional data includes spatial dimension, time, and business attribute data.

[0016] Based on the business attribute data, calculate the corresponding indicator data for each spatial dimension to obtain multiple sets of indicator result data. The indicator result data includes spatial dimension, time, and indicator value.

[0017] In an optional embodiment, the metric results data are stored in HBase, which contains the correspondence between dimensions and metrics, including:

[0018] Use the time dimension, spatial dimension, timestamp, and spatial dimension ID as the primary key in HBase;

[0019] Use different metrics corresponding to the primary key as columns in HBase.

[0020] In an optional embodiment, receiving a query request from a client and querying corresponding metric data in HBase based on the dimension information and metric information in the query request includes:

[0021] Receive query requests from clients, which include time dimension, spatial dimension, and indicator information;

[0022] Call the preset metadata system to verify whether the time dimension, spatial dimension, and indicator information in the query request are valid;

[0023] If the time dimension, spatial dimension, and indicator information in the query request are valid, then construct the HBase query parameters based on the time dimension, spatial dimension, and indicator information.

[0024] The metric data is retrieved from HBase based on the HBase query parameters to obtain the metric data in standard numerical format.

[0025] In an optional embodiment, after obtaining the indicator data in standard digital format, the method further includes:

[0026] Call the preset metadata system to obtain the correspondence between preset descriptive text format indicator data and standard numerical format indicator data. This correspondence is denoted as the first mapping relationship.

[0027] Based on the first mapping relationship, the standard numerical format indicator data is converted into the corresponding descriptive text format indicator data, and the descriptive text format indicator data is returned to the client.

[0028] In an optional embodiment, before receiving a client's query request, the method further includes:

[0029] Build a metadata system;

[0030] The metadata system includes the correspondence between dimensional data in descriptive text format and dimensional data in standard numerical format, the correspondence between indicator data in descriptive text format and indicator data in standard numerical format, and the validity information of dimensional data and indicator data.

[0031] Secondly, embodiments of this application provide a multi-dimensional indicator data query device, including:

[0032] The association module is used to associate business data with dimension configuration data to obtain dimension-based business data.

[0033] The calculation module is used to calculate the indicator values ​​of each dimension based on the dimension-based business data and obtain the indicator result data.

[0034] The storage module is used to store the indicator results data into HBase, which contains the correspondence between dimensions and indicators.

[0035] The query module receives query requests from clients and retrieves the corresponding metric data from HBase based on the dimension and metric information in the query request.

[0036] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory storing program instructions. The processor is configured to execute the multi-dimensional indicator data query method provided in the above embodiments when executing the program instructions.

[0037] Fourthly, embodiments of this application provide a computer-readable medium storing computer-readable instructions, which are executed by a processor to implement a method for querying multi-dimensional indicator data provided in the above embodiments.

[0038] The technical solutions provided in this application embodiment may include the following beneficial effects:

[0039] The multi-dimensional indicator data query method provided in this application associates business data with dimensional data, stores and queries the associated data, and when a new spatiotemporal dimension indicator needs to be calculated, only the configuration file of the business data and the associated dimension needs to be modified to achieve rapid calculation of existing indicators, thereby achieving rapid calculation of new dimension indicators by modifying the configuration. For reading different indicators, a single indicator query service interface can be used, reducing development and testing workload, facilitating rapid data deployment, and improving the analysis efficiency of data analysts.

[0040] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0041] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0042] Figure 1 This is a flowchart illustrating a method for querying multi-dimensional indicator data according to an exemplary embodiment;

[0043] Figure 2 This is a schematic diagram illustrating an indicator data calculation method according to an exemplary embodiment;

[0044] Figure 3 This is a schematic diagram illustrating a method for querying indicator data according to an exemplary embodiment;

[0045] Figure 4 This is a schematic diagram illustrating a storage structure for indicator data according to an exemplary embodiment;

[0046] Figure 5 This is a schematic diagram illustrating a multi-dimensional indicator data storage and query system according to an exemplary embodiment;

[0047] Figure 6This is a schematic diagram of the structure of a multi-dimensional indicator data query device according to an exemplary embodiment;

[0048] Figure 7 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment;

[0049] Figure 8 This is a schematic diagram illustrating a computer storage medium according to an exemplary embodiment. Detailed Implementation

[0050] The following description and accompanying drawings fully illustrate specific embodiments of the invention to enable those skilled in the art to practice them.

[0051] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0052] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of systems and methods consistent with some aspects of the invention as detailed in the appended claims.

[0053] Existing technologies primarily focus on designing RowKeys, finding them based on dimensional information, and then retrieving data. However, there's no universal method for calculating and querying the metrics themselves. For example, adding dimensions requires rewriting the calculation code. Different metrics across different dimensions also require multiple different interfaces for querying. This lack of standardized data interfaces forces upper-level business logic to implement multiple corresponding methods. Therefore, designing a standardized metric data storage method to achieve universal data retrieval, further reducing the development workload for adding new dimensions and metrics, and improving the efficiency of metric data deployment is the technical challenge this application aims to solve.

[0054] This application provides a method for calculating, storing, and querying multi-dimensional indicator data based on spatiotemporal data. By standardizing calculation, storage, and querying, a universal method for calculating, storing, and querying multi-dimensional indicator data based on spatiotemporal data is formed. This enables the rapid calculation of newly added dimension indicators by modifying configuration methods and reusing existing data interfaces, achieving rapid uploading and deloading of dimensions and indicators with only simple configuration.

[0055] The following will describe in detail the method for querying multi-dimensional indicator data provided in the embodiments of this application, with reference to the accompanying drawings. See also... Figure 1 The method specifically includes the following steps.

[0056] S101 associates business data with dimension configuration data to obtain dimension-based business data.

[0057] In one possible implementation, the time and space dimensions are combined to form all the dimensions that need to be calculated. Then, the business entity ID and related dimensions are integrated to form a configuration file of entity ID and associated dimensions. The configuration file is then entered into the cluster. Understandably, the dimensions in this application refer to statistical dimensions.

[0058] Specifically, this involves retrieving business data, which includes entity ID, time, and business attribute data. For example, business data is represented by a DataItem. i ={entityid,time,d1,d2…d m}, where entityid is the entity ID, time is the time, and d m This refers to specific business attribute data.

[0059] Furthermore, obtain the dimension configuration data, which includes the entity ID and multiple spatial dimension data, such as the dimension configuration data ConfigItem. i ={entityid, dim1, dim2… dim n}, where entityid is the entity ID, dim n Data can be distributed across multiple spatial dimensions, such as provinces, cities, and counties.

[0060] Furthermore, business data is associated with dimension configuration data to obtain dimension-based business data, which includes entity ID, time, business attribute data, and multiple spatial dimension data. For example, the associated dimension-based business data is obtained.

[0061] WideItem i ={entityid,time,d1,d2…d m dim1, dim2…dim n}

[0062] According to this step, big data computing components, such as Spark or Flink, are used to read business data in real time or in batches. The entity IDs in the business data are then associated with the configuration data of the related dimensions to obtain dimension-based business data.

[0063] S102 calculates the indicator values ​​for each dimension based on the dimension-based business data, and obtains the indicator result data.

[0064] Furthermore, based on requirements, business metrics are calculated for data from different dimensions. Specifically, dimension-based business data is grouped according to spatial dimensions to obtain multiple sets of single-dimensional data. Each single-dimensional data set includes spatial dimensions, time, and business attribute data. For example, grouping related dimension-based business data according to spatial dimensions yields single-dimensional data `DimItem`. i ={dim j ,time,{p1,p2…p x}}, where p x For business data, i.e. {d1,d2…d m}, d m This is the m-th field of the business data. In this application embodiment, business attribute data in different spatial dimensions are grouped to obtain business attribute data under different spatial dimensions. For example, in the field of traffic flow analysis technology, traffic flow business data under different spatial dimensions such as streets, districts, cities, and provinces are analyzed to obtain traffic flow data corresponding to different spatial dimensions.

[0065] Furthermore, based on the business attribute data, the corresponding indicator data for each spatial dimension is calculated, resulting in multiple sets of indicator result data. The indicator result data includes the spatial dimension, time, and indicator value. For example, according to the requirements, based on {p1, p2…p… x} Calculate specific indicators and obtain indicator result data {dim j ,time,Index1,Index2…Index y}, where Index y Indicator value.

[0066] Figure 2 This is a schematic diagram illustrating an indicator data calculation method according to an exemplary embodiment, such as... Figure 2 As shown, it includes the following steps:

[0067] S201 constructs the business data entity ID and dimension configuration file;

[0068] S202 reads business data and associates it with dimension configuration data;

[0069] S203 groups by dimension and calculates indicators;

[0070] S204 saves data to HBase according to a specific structure.

[0071] The method for calculating metrics in this application is based on the association between business data and dimension configuration data to obtain dimension-based business data, and then calculating the metrics for each dimension according to requirements.

[0072] S103 stores the indicator results data into HBase, which contains the correspondence between dimensions and indicators.

[0073] Figure 4 This is a schematic diagram illustrating a storage structure for indicator data according to an exemplary embodiment, such as... Figure 4 As shown, in combination with the storage characteristics of HBase and the query requirements of indicator data, this embodiment uses the time dimension, spatial dimension, timestamp, and spatial dimension id as the primary key (RowKey) of HBase, and stores different indicators as column values ​​in HBase.

[0074] In one possible implementation, the time dimension refers to a year, month, day, or even a specific period within a day; the timestamp refers to specific point-in-time information, such as time information accurate to the minute; the spatial dimension refers to the county, city, province, highway section, etc.; the spatial dimension ID refers to which county it refers to in the county dimension, represented by the ID; and in the city dimension it refers to which city it refers to.

[0075] Furthermore, when storing the metric results data into HBase, the data needs to be transformed according to a specific structure, and the transformed data is then stored in HBase. For example, the time dimension, spatial dimension, and metric value information are all represented in a standard numerical format, converted into numeric IDs, and then stored in HBase.

[0076] By using the non-relational database HBase to store and retrieve data, the needs for storing and retrieving large volumes of data can be met.

[0077] S104 receives query requests from clients and retrieves the corresponding metric data from HBase based on the dimension and metric information in the query request.

[0078] In one possible implementation, metric querying consists of a metadata system and a metric query service. First, a metadata system is established to define the relationship between time and spatial dimensions and the metrics, as well as information such as the data format of the metrics. For example, the metadata system includes the correspondence between descriptive text format dimensional data and standard numerical format dimensional data, the correspondence between descriptive text format metric data and standard numerical format metric data, as well as validity information for dimensional and metric data, and the correspondence information between dimensional and metric data.

[0079] The indicator query service, as a client-facing service interface, provides an interface for querying indicator data. The specific query process includes: First, receiving the client's query request.

[0080] Users input query requests from the client. The query request may contain only time and space dimension information. Based on the time and space dimension information input by the user, all indicators under that time and space dimension are queried. Alternatively, the query request may contain both time and space dimension information and specific indicator information, in which case a specific indicator under that time and space dimension is queried.

[0081] In one implementation, the user's query request is descriptive text data. For example, entering "query the average traffic flow in Haidian District, Beijing in June 2019" would retrieve the average traffic flow index by including time, spatial, and index information. Alternatively, entering "Haidian District, Beijing in June 2019" would retrieve all traffic flow indices for Haidian District, Beijing in June 2019 by including only spatiotemporal information.

[0082] In another implementation, users can input their needs through preset input boxes in the system input terminal or select from preset fields in the drop-down list. This ensures the uniformity and standardization of input fields for query requests, reduces the workload of text language processing for query requests in descriptive text format, and improves the efficiency of request processing.

[0083] Furthermore, the system invokes a pre-defined metadata system to convert the descriptive text format of time dimension, spatial dimension, and indicator information in the query request into standard numerical format time dimension, spatial dimension, and indicator information, and verifies whether the time dimension, spatial dimension, and indicator information in the query request are valid.

[0084] Furthermore, the system invokes a pre-defined metadata system to convert the time dimension, spatial dimension, and indicator information contained in the query requirement fields input in the initial query request into standard numerical formats, and verifies whether the time dimension, spatial dimension, and indicator information in the query request are valid.

[0085] The metadata system can convert descriptive text query requests into standard digital IDs and verify the validity of time, space, and metric information in the query request. For existing dimensions and metrics, users can set them to be unavailable in the metadata system to restrict the query of related dimensions and metrics.

[0086] Furthermore, if the time dimension, spatial dimension, and indicator information in the query request are valid, then the HBase query parameters are constructed based on the time dimension, spatial dimension, and indicator information; the indicator data is then queried from HBase based on the HBase query parameters to obtain the indicator data in standard numerical format.

[0087] If invalid, the system will receive the invalidity information from the metadata system and output a message indicating that the query information is invalid.

[0088] Furthermore, after obtaining the retrieved standard numerical format indicator data, the process also includes: calling a preset metadata system to obtain the correspondence between the preset descriptive text format indicator data and the standard numerical format indicator data, which is denoted as the first mapping relationship; converting the standard numerical format indicator data into the corresponding descriptive text format indicator data according to the first mapping relationship, and returning the descriptive text format indicator data to the client.

[0089] Because the HBase system stores data in the form of numeric IDs, after obtaining the retrieved data, the metadata system is called again to perform data format conversion, converting it into descriptive text format or other preset standard formats, and then returning the data to the client.

[0090] By introducing a metadata system for data transformation, errors during parsing can be avoided due to issues such as non-standard writing.

[0091] Figure 3 This is a schematic diagram illustrating a method for querying indicator data according to an exemplary embodiment, such as... Figure 3 As shown, it includes the following steps:

[0092] S301 verifies whether the queried indicator supports querying based on the metadata service system;

[0093] S302 Determine whether querying is supported. If supported, proceed to step S304. If supported, query the metric data from HBase. If not supported, proceed to step S303 and return an error message.

[0094] S303 returned an error message;

[0095] S304 queries metric data from HBase;

[0096] S305 performs data format conversion on the queried indicator data based on the metadata system;

[0097] S306 returns the converted indicator data to the client.

[0098] This application provides support for reading indicator data by constructing a metadata system and combining it with an indicator data query service. A unified query service interface is used, allowing different indicators to be read using the same interface, requiring only the input of spatiotemporal dimension data.

[0099] When new spatiotemporal dimension metrics need to be calculated, simply modify the configuration file for the business entity ID and associated dimension to achieve rapid calculation of existing metrics.

[0100] Once a new dimension or metric has been calculated and stored, it can be quickly uploaded to the metadata system by entering the new dimension or metric into the system.

[0101] For existing dimensions and metrics, query restrictions can also be implemented by setting them to be unavailable in the metadata system.

[0102] Figure 5 This is a schematic diagram illustrating a multi-dimensional indicator data storage and query system according to an exemplary embodiment, such as... Figure 5 As shown, this application discloses a system for calculating, storing, and querying multi-dimensional indicator data based on spatiotemporal data, comprising three modules: indicator calculation, indicator storage, and indicator retrieval. The indicator calculation module is mainly used to calculate indicators by associating business data with dimension configuration data through entity IDs to calculate multi-dimensional indicators. The indicator storage module is mainly used to store indicator data according to specifications, converting indicators into data with a specific structure and storing them in HBase. The indicator retrieval module is mainly used to provide a unified interface for querying indicator data, providing support for reading indicator data by constructing a metadata system and indicator data query service.

[0103] This application provides a method for calculating, storing, and querying multi-dimensional indicator data based on spatiotemporal data. By standardizing calculation, storage, and querying, a universal method for calculating, storing, and querying multi-dimensional indicator data based on spatiotemporal data is formed. This enables the rapid calculation of new dimension indicators by modifying configuration methods and reusing existing data interfaces. Dimensions and indicators can be quickly uploaded and de-listed with simple configuration. This reduces development and testing workload, facilitates rapid data deployment, and improves the analytical efficiency of data analysts.

[0104] This application also provides a multi-dimensional indicator data query device, which is used to execute the multi-dimensional indicator data query method of the above embodiments, such as... Figure 6 As shown, the device includes:

[0105] The association module 601 is used to associate business data with dimension configuration data to obtain dimension-based business data.

[0106] The calculation module 602 is used to calculate the indicator values ​​of each dimension based on the dimension-based business data and obtain the indicator result data.

[0107] Storage module 603 is used to store indicator result data into HBase, which contains the correspondence between dimensions and indicators;

[0108] The query module 604 is used to receive query requests from clients and query the corresponding indicator data in HBase based on the dimension information and indicator information in the query request.

[0109] It should be noted that the multi-dimensional indicator data query device provided in the above embodiments is only illustrated by the division of the above functional modules when executing the multi-dimensional indicator data query method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the multi-dimensional indicator data query device and the multi-dimensional indicator data query method embodiments provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.

[0110] This application also provides an electronic device corresponding to the multi-dimensional indicator data query method provided in the foregoing embodiments, so as to execute the above-mentioned multi-dimensional indicator data query method.

[0111] Please refer to Figure 7 This illustrates a schematic diagram of an electronic device provided by some embodiments of this application. For example... Figure 7 As shown, the electronic device includes: a processor 700, a memory 701, a bus 702, and a communication interface 703. The processor 700, the communication interface 703, and the memory 701 are connected via the bus 702. The memory 701 stores a computer program that can run on the processor 700. When the processor 700 runs the computer program, it executes the multi-dimensional indicator data query method provided in any of the foregoing embodiments of this application.

[0112] The memory 701 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 703 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network.

[0113] Bus 702 can be an ISA bus, PCI bus, or EISA bus, etc. Buses can be divided into address buses, data buses, control buses, etc. Memory 701 is used to store programs. After receiving an execution instruction, processor 700 executes the program. The multi-dimensional indicator data query method disclosed in any of the aforementioned embodiments of this application can be applied to processor 700, or implemented by processor 700.

[0114] The processor 700 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 700 or by instructions in software form. The processor 700 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 701. Processor 700 reads the information in memory 701 and, in conjunction with its hardware, completes the steps of the above method.

[0115] The electronic device provided in this application embodiment and the multi-dimensional indicator data query method provided in this application embodiment are based on the same inventive concept and have the same beneficial effects as the methods they adopt, operate or implement.

[0116] This application also provides a computer-readable storage medium corresponding to the multi-dimensional indicator data query method provided in the foregoing embodiments. Please refer to... Figure 8 The computer-readable storage medium shown is an optical disc 800, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it executes the multi-dimensional indicator data query method provided in any of the foregoing embodiments.

[0117] It should be noted that examples of computer-readable storage media may also include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be elaborated here.

[0118] The computer-readable storage medium provided in the above embodiments of this application and the query method for multi-dimensional indicator data provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0119] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0120] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.

Claims

1. A method for querying multi-dimensional indicator data, characterized in that, include: By associating business data with dimension configuration data, we obtain dimension-based business data. Based on the dimension-based business data, calculate the indicator values ​​for each dimension to obtain indicator result data; this includes grouping the dimension-based business data according to spatial dimensions to obtain multiple sets of single-dimensional data, wherein the single-dimensional data includes spatial dimension, time, and business attribute data; and calculating the indicator data corresponding to each spatial dimension based on the business attribute data to obtain multiple sets of indicator result data, wherein the indicator result data includes spatial dimension, time, and indicator value. The metric results data are stored in HBase, which contains the correspondence between dimensions and metrics; including using time dimension, spatial dimension, timestamp, and spatial dimension ID as the primary key of HBase; and using different metrics corresponding to the primary key as columns of HBase. Receive a query request from the client, and query the corresponding indicator data in the HBase based on the dimension information and indicator information in the query request.

2. The method according to claim 1, characterized in that, By associating business data with dimension configuration data, we obtain dimension-based business data, including: Obtain the business data, which includes entity ID, time, and business attribute data; Obtain the dimension configuration data, which includes entity ID and multiple spatial dimension data; The business data is associated with the dimension configuration data to obtain dimension-based business data, which includes entity ID, time, business attribute data, and multiple spatial dimension data.

3. The method according to claim 1, characterized in that, Receive a query request from the client, and query the corresponding indicator data in the HBase based on the dimension information and indicator information in the query request, including: Receive a query request from the client, the query request including time dimension, spatial dimension, and indicator information; Call the preset metadata system to verify whether the time dimension, spatial dimension, and indicator information in the query request are valid; If the time dimension, spatial dimension, and indicator information in the query request are valid, then construct the HBase query parameters based on the time dimension, spatial dimension, and indicator information. The metric data is retrieved from HBase based on the HBase query parameters to obtain metric data in standard numerical format.

4. The method according to claim 3, characterized in that, After obtaining the indicator data in standard numerical format, it also includes: Call the preset metadata system to obtain the correspondence between preset descriptive text format indicator data and standard numerical format indicator data. This correspondence is denoted as the first mapping relationship. Based on the first mapping relationship, the standard numerical format indicator data is converted into corresponding descriptive text format indicator data, and the descriptive text format indicator data is returned to the client.

5. The method according to claim 3, characterized in that, Before receiving a query request from a client, the following steps are also included: Build a metadata system; The metadata system includes the correspondence between dimensional data in descriptive text format and dimensional data in standard numerical format, the correspondence between indicator data in descriptive text format and indicator data in standard numerical format, and the validity information of the dimensional data and indicator data.

6. A device for querying multi-dimensional indicator data, characterized in that, include: The association module is used to associate business data with dimension configuration data to obtain dimension-based business data. The calculation module is used to calculate the indicator values ​​of each dimension based on the dimension-based business data to obtain indicator result data; including grouping the dimension-based business data according to spatial dimensions to obtain multiple sets of single-dimensional data, wherein the single-dimensional data includes spatial dimension, time, and business attribute data; and calculating the indicator data corresponding to each spatial dimension based on the business attribute data to obtain multiple sets of indicator result data, wherein the indicator result data includes spatial dimension, time, and indicator value. The storage module is used to store the indicator result data into HBase, which contains the correspondence between dimensions and indicators; including using time dimension, spatial dimension, timestamp, and spatial dimension ID as the primary key of HBase; and using different indicators corresponding to the primary key as columns of HBase. The query module is used to receive query requests from clients and query the corresponding indicator data in HBase based on the dimension information and indicator information in the query request.

7. An electronic device, characterized in that, It includes a processor and a memory storing program instructions, the processor being configured to, when executing the program instructions, perform the method for querying multi-dimensional indicator data as described in any one of claims 1 to 5.

8. A computer-readable medium, characterized in that, It stores computer-readable instructions, which are executed by a processor to implement a method for querying multi-dimensional indicator data as described in any one of claims 1 to 5.