Method for realizing management and query of same index of multiple fact tables based on index center

By sorting and matching data quantity in the logarithmic warehouse in the index center, the problem of low query efficiency of fact table indicators in the data warehouse is solved, intelligent table acceleration and query path optimization are realized, and table lookup efficiency is improved. Simple management.

CN119201946AActive Publication Date: 2024-12-27HANGZHOU GUANSHU INFORMATION TECH CO LTD (CHINA)
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411718956.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2024-12-27
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

During the construction of the data warehouse, multiple fact tables generated based on detailed table processing have cumbersome index data, low table search efficiency, and lack of unified correlation, resulting in slow table search process, especially when the data volume is large, it is difficult to accurately find the most Good query path problem.

Method used

By defining the indicators of each source table in the indicator center, and arranging them from small to large according to the data size, obtaining the indicator query conditions entered by the user, traversing and finding the matching source table as the target table, and conducting indicator query to return the calculation results. Dynamically match analysis dimensions to speed up queries.

Benefits of technology

It improves the efficiency of indicator query, simplifies indicator management, and realizes intelligent table acceleration sequential positioning, avoids the chaos caused by disorderly table lookup between multiple fact tables, and finds the best source table that meets business requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201946A_ABST
    Figure CN119201946A_ABST
Patent Text Reader

Abstract

The invention relates to a method for managing and querying the same index of multiple fact tables based on an index center, which comprises the following steps: carrying out aperture definition on the same index of each source table, and arranging each source table from small to large according to the data size scale; according to an index query condition input by a user, obtaining a query dimension, finding a source table matched with the query dimension, and taking the source table as a target source table; and performing index query based on the target source table, and returning a corresponding index calculation result. According to the screening dimension range of the index query conditions, available analysis dimensions on all the source tables are dynamically matched at a time, if matching succeeds, the current source table is selected for data query, the optimal source table meeting the service requirements is found, and the index query efficiency is improved. The index platform does not need to create a plurality of indexes to respectively map different fact tables, one index is used for mapping, and the query table is positioned according to the query condition and the preset table acceleration sequence, so that the index management is simpler, and the index analysis is more intelligent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of table lookup technology, and in particular to a method for managing and querying the same indicator of multiple fact tables based on an indicator center, a device for managing and querying the same indicator of multiple fact tables based on an indicator center, and an electronic device. Background Art

[0002] As attached Figure 1 As shown in the figure, generally speaking, during the data warehouse construction process, there will be multiple fact tables based on the DWD or DWS processed by the detail table. The multiple fact tables only differ in the dimension range, but the indicator list is the same.

[0003] Although data lookup management can be performed on each fact table based on different indicators during subsequent table lookup management, there are still the following technical defects in actual applications: First, in the process of generating multiple fact tables based on the detail table, the indicator platform needs to create multiple indicators and map different fact tables respectively, which will make the indicator data too complicated, resulting in slow subsequent table lookup process and low table lookup efficiency; Secondly, the indicator designs of multiple fact tables do not have a unified correlation, so they can only be queried according to the specified table, and therefore orderly accelerated query services cannot be implemented; if a fact table with a large amount of data does not contain the required indicator data, the subsequent table query progress will be delayed; or, the best path is to prioritize querying fact tables with a small amount of data with the same indicator, but in reality users cannot accurately find the best path. Summary of the invention

[0004] In order to solve the above problems, the present application proposes a method for managing and querying the same indicator of multiple fact tables based on an indicator center, a device for managing and querying the same indicator of multiple fact tables based on an indicator center, and an electronic device.

[0005] On the one hand, the present application proposes a method for managing and querying the same indicator in multiple fact tables based on an indicator center, comprising the following steps: S1. Define the caliber of the same indicators of each source table, and arrange the source tables in ascending order according to the data volume; S2, obtaining the query dimension of the indicator query condition input by the user, traversing and finding the source table matching the query dimension, and using it as the target source table; S3. Perform an indicator query based on the target source table and return the corresponding indicator calculation result.

[0006] As an optional implementation scheme of the present application, optionally, S1, defining the same indicators of each source table, and arranging each source table from small to large according to the data volume, including: Set indicator names and business scope; Searching and obtaining each of the source tables corresponding to the indicator name and the business scope from the data warehouse; According to the analysis dimension, each of the source tables is grouped; The grouped source tables are arranged from small to large according to the data volume.

[0007] As an optional implementation scheme of the present application, optionally, S1, defining the caliber of the same indicators of each source table, and arranging each source table from small to large according to the data volume, further comprising: After arranging the grouped source tables from small to large according to the data volume, each source table arranged from small to large is marked with a serial number.

[0008] As an optional implementation scheme of the present application, optionally, S1, defining the caliber of the same indicators of each source table, and arranging each source table from small to large according to the data volume, further comprising: Binding the marked serial number with the corresponding source table; According to the source tables marked by serial numbers from small to large, a corresponding source table form is generated and saved.

[0009] As an optional implementation scheme of the present application, optionally, S2, obtaining the query dimension of the indicator query condition input by the user, traversing and finding the source table matching the query dimension, and using it as the target source table, includes: Get the indicator query conditions entered by the user; Perform query dimension analysis to obtain the query dimension in the indicator query condition; Traverse the source table form, identify the analysis dimensions of each source table in the source table form in order, and determine whether the analysis dimension contains the query dimension: If so, the traversal ends, and the source table that includes the query dimension in the analysis dimension is marked as the target source table; Otherwise, continue traversing.

[0010] As an optional implementation scheme of the present application, optionally, when setting the indicator name and business scope, it also includes: According to the query dimension, construct the indicator name and the business scope corresponding to the query dimension.

[0011] As an optional implementation scheme of the present application, optionally, S3, performing an index query based on the target source table and returning a corresponding index calculation result, includes: Constructing a query request according to the query dimension; Sending the query request to a data warehouse; The data warehouse responds to the query request, performs indicator query and indicator calculation based on the target source table, and returns the corresponding indicator calculation results to the user.

[0012] On the other hand, the present application proposes a device for managing and querying the same indicator of multiple fact tables based on an indicator center, which is used to implement the above-mentioned method for managing and querying the same indicator of multiple fact tables based on an indicator center, including: An indicator definition module is used to define the same indicators of various source tables and arrange the source tables in ascending order according to the data volume; An execution plan matching module is used to obtain the query dimension of the indicator query condition input by the user, traverse and find the source table matching the query dimension, and use it as the target source table; The indicator query module is used to perform indicator query based on the target source table and return the corresponding indicator calculation results.

[0013] In another aspect, the present application further provides an electronic device, comprising: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the management and query method of the same indicator of multiple fact tables based on the indicator center when executing the executable instructions.

[0014] Technical effects of the present invention: The present invention first defines the caliber of the same indicators of each source table, and arranges each source table from small to large according to the data volume; secondly, according to the indicator query condition input by the user, the query dimension is obtained, and the source tables arranged in order of data volume from small to large are traversed to find the source table that matches the query dimension and use it as the target source table; finally, the indicator query is performed based on the target source table, and the corresponding indicator calculation result is returned. Therefore, according to the screening dimension range of the indicator query condition, the available analysis dimensions on each source table can be dynamically matched at one time. If the match is successful, the current source table is selected for data query, and the best source table that meets the business requirements is found, thereby improving the efficiency of indicator query. The indicator platform does not need to create multiple indicators to map different fact tables respectively. One indicator is used for mapping, and the query table is located according to the query condition and the preset table acceleration sequence. The indicator management is simpler and the indicator analysis is more intelligent.

[0015] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.

[0017] Figure 1 It is shown as a mapping relationship diagram between the existing detail table and the fact table; Figure 2 It is shown as a schematic diagram of the implementation process of the present invention; Figure 3 It is a schematic diagram showing the arrangement of source tables according to the data volume from small to large in the present invention; Figure 4 A schematic diagram showing a flow chart of index querying according to the present invention is shown; Figure 5 It is a schematic diagram showing the structure of the device of the present invention; Figure 6 It is a schematic diagram showing the application of the electronic device of the present invention. DETAILED DESCRIPTION

[0018] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0019] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0020] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present disclosure.

[0021] Related terms and principle description: 1. In the data warehouse (Data Warehouse, referred to as data warehouse) or big data processing process, DWD (Data Warehouse Detail) and DWS (Data Warehouse Summary) are important links in data processing. The DWD layer usually refers to the detailed data layer, which stores the most original and detailed data; while the DWS layer summarizes and slightly aggregates the data in the DWD layer for more efficient analysis and query.

[0022] The process of obtaining multiple fact tables from the DWD or DWS layer usually involves the following steps: ‌Data Preparation‌: Load data from data sources (such as databases, files, APIs, etc.) into the DWD layer.

[0023] To ensure the integrity, accuracy, and consistency of the data, operations such as data cleaning, deduplication, and format conversion may be required.

[0024] ‌Build DWD layer‌: In the DWD layer, data is usually organized according to business processes, and each business process corresponds to one or more detail tables.

[0025] These detailed tables contain all the detailed data generated in the business process and are the basis for subsequent analysis.

[0026] ‌Build the DWS layer‌: In the DWS layer, the data in the DWD layer is summarized and aggregated according to business needs.

[0027] The granularity of aggregation may vary according to business needs, such as by day, by month, by department, etc.

[0028] The data in the DWS layer is usually used to generate reports, perform data analysis, or serve as input for other data processing processes.

[0029] Generate fact table: Based on the data in the DWD or DWS layer, multiple fact tables are generated according to analysis requirements.

[0030] A fact table typically contains measures (such as sales, quantity, cost, etc.) and keys associated with dimension tables (such as time dimension, product dimension, customer dimension, etc.).

[0031] The design of the fact table should meet the classic dimensional modeling principles such as the star model or snowflake model to enable efficient analysis and query.

[0032] ‌Optimization and Storage‌: Optimize the generated fact table, such as creating indexes and partitions, to improve query performance.

[0033] The optimized fact table is stored in a data warehouse or big data platform for subsequent analysis and query.

[0034] ‌Data Management and Maintenance‌: Update the data of DWD and DWS layers regularly to ensure the timeliness and accuracy of the data.

[0035] 2. The steps for querying indicators from the data warehouse can be divided into: ‌Select query method‌: Choose to use SQL language, BI tools or pre-defined data modeling for querying according to your needs.

[0036] ‌Write SQL query (if using SQL): Use the SELECT statement to specify the table name, field name, and conditions to be queried.

[0037] Use JOIN operations to connect multiple tables and get a comprehensive view of the data.

[0038] The data is grouped using the GROUP BY clause and aggregate functions are applied.

[0039] ‌Execute query‌: Run written SQL queries in the data warehouse system or trigger queries through BI tools.

[0040] ‌Optimize query performance‌: Use variable binding technology whenever possible to reduce physical I / O and repeated SQL parsing.

[0041] Reduce the number of logical reads or executions of a single statement to improve query efficiency.

[0042] ‌Getting and processing results‌: Review the query results and perform further data processing or analysis as needed.

[0043] In this embodiment, the multiple fact tables stored in the DWD or DWS after the data warehouse processes the detail table, and the steps of performing an index query based on the input query conditions in the data warehouse are not described in detail. Example 1

[0044] like Figure 2 As shown, on one hand, the present application proposes a method for managing and querying the same indicator of multiple fact tables based on an indicator center, including the following steps: S1. Define the caliber of the same indicators of each source table, and arrange the source tables in ascending order according to the data volume; S2, obtaining the query dimension of the indicator query condition input by the user, traversing and finding the source table matching the query dimension, and using it as the target source table; S3. Perform an indicator query based on the target source table and return the corresponding indicator calculation result.

[0045] The present invention first performs multi-table mapping management of indicator definitions. When defining the indicator calculation scope, it can be grouped and defined according to multiple source tables, and the respective analysis dimensions are selected and arranged from small to large according to the size of the table data.

[0046] When performing subsequent queries on multiple fact tables under the same indicator, the table acceleration order based on each table can be implemented to achieve management and query of the same indicator of multiple fact tables, thereby improving the efficiency of table query and avoiding the drawback of table query confusion caused by disorder between tables. The present invention can query the table according to the size of the data set, query each fact table in order from small to large, until a fact table matching the query dimension is found, thereby improving the efficiency of table query and strengthening the table query logic.

[0047] Embodiments of the present invention will be further described below.

[0048] like Figure 3 As shown, as an optional implementation scheme of the present application, optionally, S1, defining the same indicators of each source table, and arranging each source table from small to large according to the data volume, including: Set indicator names and business scope; Searching and obtaining each of the source tables corresponding to the indicator name and the business scope from the data warehouse; According to the analysis dimension, each of the source tables is grouped; The grouped source tables are arranged from small to large according to the data volume.

[0049] In the indicator center, you first need to define the indicator name and business scope of the source table to facilitate group definition.

[0050] It is necessary to combine the indicator name and business scope to find the source table from the data warehouse that meets the indicator dimension and satisfies the indicator data query and calculation under this dimension.

[0051] The indicator name and business scope can be defined according to the indicator query dimension required by the user. Here, the indicator name and business scope corresponding to the query dimension can be constructed according to the query dimension. For example: Indicator name: transaction amount; Business scope: calculated based on the transaction amounts in transaction records.

[0052] In this embodiment, the query dimension is set according to the design requirements of the indicator system.

[0053] There are many source tables to search from the data warehouse, and they need to be selected. Here, the source tables are grouped according to the required analysis dimensions. The source tables are divided into tables of different analysis dimensions. Different analysis dimensions correspond to different data volumes and subsequent indicator calculation volumes. Therefore, after grouping, the tables are grouped and sorted according to the data volume scale of each table (which is also the indicator calculation scale or the size of the indicator data involved in the analysis dimension), and arranged from bottom to top according to the data volume scale. The indicator data volume in each table can also be queried by reading the table (the data volume of the indicator data recorded in the table can be queried by reading the table).

[0054] Here, we can also use the LLM large language model to find the source tables corresponding to the indicator name and business caliber from the data warehouse based on the defined indicator name and business caliber, so as to realize intelligent data warehouse data table retrieval, realize automatic table acceleration source table construction, and improve efficiency. Specifically: The large language model prompt words are set based on the indicator name and business caliber; the large language model prompt words corresponding to different indicator names and business calibers can be set respectively according to different indicator query dimensions, and the preset LLM large language model can be input; the LLM large language model can be called through an API call (such as Baidu Wenxin Yiyan), or deployed and referenced based on the LLM large language model for custom construction.

[0055] The data volume reading information can be added to the prompt word, so that the LLM large language model can read the data volume of each source table retrieved, which is convenient for the subsequent table to accelerate the construction of sequence numbers.

[0056] The LLM large language model searches the data warehouse for the source tables corresponding to the indicator name and the business scope based on the prompt word, and groups the source tables according to the analysis dimension. After the LLM large language model automatically retrieves the corresponding source tables from the data warehouse and reads the corresponding data volume, the source tables can be automatically sorted according to the data volume and output the sorting results.

[0057] Subsequently, the indicator query will be performed from the source table with the smallest data volume. If the source table with the smallest data volume contains the dimension for this indicator calculation, the current source table will be directly selected for data query, and there is no need to query other source tables later. Therefore, the query volume is greatly reduced and the query efficiency is improved.

[0058] As an optional implementation scheme of the present application, optionally, S1, defining the caliber of the same indicators of each source table, and arranging each source table from small to large according to the data volume, further comprising: After arranging the grouped source tables from small to large according to the data volume, each source table arranged from small to large is marked with a serial number.

[0059] Sort each source table according to the data volume and give it a corresponding serial number. For example, "Serial number: 1" represents the re-grouped source table 1.

[0060] Add serial numbers to facilitate subsequent table lookup management and table data binding management according to the serial numbers.

[0061] As an optional implementation scheme of the present application, optionally, S1, defining the caliber of the same indicators of each source table, and arranging each source table from small to large according to the data volume, further comprising: Binding the marked serial number with the corresponding source table; According to the source tables marked by serial numbers from small to large, a corresponding source table form is generated and saved.

[0062] Here, each sorted source table is saved in a preset blank form according to the sequence number, and a source table form is generated, which can integrate each source table in sequence for user convenience. You can also write the indicator data in each source table into each table in the form in sequence, and then read the contents in the form in sequence, saving time.

[0063] like Figure 4 As shown, as an optional implementation scheme of the present application, optionally, S2, obtaining the query dimension of the indicator query condition input by the user, traversing and finding the source table matching the query dimension, and using it as the target source table, includes: Get the indicator query conditions entered by the user; Perform query dimension analysis to obtain the query dimension in the indicator query condition; Traverse the source table form, identify the analysis dimensions of each source table in the source table form in order (the analysis dimensions of these source tables will be saved in the database and can be read), and determine whether the analysis dimension contains the query dimension: If so, the traversal ends, and the source table that includes the query dimension in the analysis dimension is marked as the target source table; Otherwise, continue traversing.

[0064] The source table form is similar to the Excel form structure, where the horizontal table can be used to store the indicator data of each source table written, and the vertical table can represent each indicator (and analysis dimension) respectively. The source table form will fill the indicator data of the source table from small to large in the horizontal table of each row according to the direction of table acceleration.

[0065] Later, when traversing the source table form and orderly identifying the analysis dimensions of each source table in the source table form, the LLM large language model can also be used to read the data of each table indicator from small to large in the form to obtain the information in each table item on the horizontal axis. Therefore, the LLM large language model can be used to quickly traverse and find the source table with the minimum data size that matches the analysis dimension according to the table acceleration direction.

[0066] Here we take the query indicator: transaction outlet = "Ningbo Financial District Branch" & transaction channel = "Self-service machine" as an example to describe the indicator query process.

[0067] First, the above-mentioned indicator query conditions are clarified; Secondly, the query dimension is parsed, and the query dimension required for the indicator query is obtained from the condition. For example, the query dimension is transaction outlets and transaction channels; After finding the query dimension, you need to perform a matching search from the sorted source tables to find the source table that matches the query dimension as the target form for this data query, so as to query and calculate the final indicator data.

[0068] Traverse the query dimension information of each table arranged in order in the form, identify and determine whether the query dimension is included in the analysis dimension. If the source table containing the query dimension is traversed, it is determined that the source table matches the current query dimension and can be used as the indicator database pointed to by the query dimension, and the final indicator data is retrieved.

[0069] If not found, the next source table is identified.

[0070] For example, if the source table marked with "serial number 1" fails to match, the source table marked with "serial number 2" will be matched. After matching, it is found that the analysis dimension of the source table marked with "serial number 2" contains the query dimension of this indicator query, and the source table marked with "serial number 2" is determined to be the target source table specified by this query dimension, which contains the indicator data required for this query dimension. At this point, the match is successful, the query request is constructed, and the target indicator data is queried and calculated based on the target source table.

[0071] The conditions for specific indicator calculation, etc., can be pre-configured in the indicator calculation rules in the target source table and are not limited here.

[0072] As an optional implementation scheme of the present application, optionally, S3, performing an index query based on the target source table and returning a corresponding index calculation result, includes: Constructing a query request according to the query dimension; Sending the query request to a data warehouse; The data warehouse responds to the query request, performs indicator query and indicator calculation based on the target source table, and returns the corresponding indicator calculation results to the user.

[0073] When querying indicators, you can generate SQL query requests and send them to the data warehouse, requesting the data warehouse to execute the request and feedback the corresponding indicator calculation results. Users can view the indicator calculation results under the query indicator.

[0074] Specifically: Here, the LLM (Large Language Model) can be called to automatically construct a query request according to the query dimension and request the data warehouse (data warehouse) to perform data retrieval of the corresponding dimension, which may include the following steps: 1. Understanding query dimensions ‌Input parsing‌: LLM first receives the query dimensions entered by the user, which may be transaction outlets and transaction channels, etc.

[0075] ‌Dimension Identification‌: Through natural language processing technology, LLM identifies and extracts key dimension information in the query.

[0076] 2. Construct a query request Query template: Based on predefined query templates or rules, LLM embeds the extracted dimension information into the query statement. These templates may be based on SQL, NoSQL or other query languages. For example, using SQL query templates, SQL query requests can be generated. SQL query templates can be defined or called by components.

[0077] Dynamic assembly: Based on the different query dimensions, LLM can dynamically assemble query statements to ensure the accuracy and completeness of the query.

[0078] 3. Request data warehouse ‌Connect to data warehouse‌: LLM establishes a connection with the data warehouse through API, database connection pool or other methods.

[0079] ‌Execute query‌: Send the constructed query request to the data warehouse and wait for the response from the data warehouse.

[0080] 4. Processing data warehouse responses Result analysis: Receive the data results returned by the data warehouse and analyze them for subsequent processing or display.

[0081] Exception handling: If an exception occurs during the query process (such as connection failure, query timeout, etc.), LLM needs to be able to capture these exceptions and handle them accordingly, such as retrying, logging, or notifying the user.

[0082] 5. Display or process the results ‌Data display‌: Display the parsed data results in a user-friendly manner, such as tables, charts, etc.

[0083] ‌Subsequent processing‌: Further processing or analysis of data based on business needs, such as data aggregation, trend prediction, etc.

[0084] The LLM large prediction model simply feeds back the results of the corresponding request query to the user front end to achieve automated query.

[0085] 6. Optimization and iteration ‌Performance optimization‌: Based on the query execution and user feedback, optimize query statements, connection pool configuration, etc. to improve query accuracy.

[0086] Therefore, this application dynamically matches the available analysis dimensions on each source table at a time according to the screening dimension range of the indicator query condition. If the match is successful, the current source table is selected for data query, and the data table with the smallest data size can be selected for accelerated query.

[0087] This method can be compatible with different query scenarios and avoid the disadvantage that inconsistent query dimensions lead to incompatible queries on multiple fact tables.

[0088] Obviously, those skilled in the art should understand that the implementation of all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments. Those skilled in the art can understand that the implementation of all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (Hard Disk Drive, abbreviated as: HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory. Example 2

[0089] like Figure 5 As shown, based on the implementation principle of Example 1, the present application, on the other hand, proposes a device for managing and querying the same indicator of multiple fact tables based on an indicator center, which is used to implement the method for managing and querying the same indicator of multiple fact tables based on an indicator center described in Example 1, including: An indicator definition module is used to define the same indicators of various source tables and arrange the source tables in ascending order according to the data volume; An execution plan matching module is used to obtain the query dimension of the indicator query condition input by the user, traverse and find the source table matching the query dimension, and use it as the target source table; An indicator query module, used to query indicators based on the target source table and return corresponding indicator calculation results; The indicator definition module is communicatively connected to the execution plan matching module, and the execution plan matching module is communicatively connected to the indicator query module.

[0090] The module functions and interactive application principles of this device can be understood in conjunction with Example 1, and will not be described in detail in this example.

[0091] The modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software. Example 3

[0092] like Figure 6 As shown, further, in another aspect, the present application also proposes an electronic device, including: processor; a memory for storing processor-executable instructions; The processor is configured to implement, when executing the executable instructions, a method for managing and querying the same indicator of multiple fact tables based on an indicator center as described in Example 1.

[0093] The electronic device according to the embodiment of the present disclosure includes a processor and a memory for storing instructions executable by the processor, wherein the processor is configured to implement any of the above-mentioned methods for managing and querying the same indicator of multiple fact tables based on an indicator center when executing the executable instructions.

[0094] Here, it should be noted that the number of processors can be one or more. At the same time, the electronic device in the embodiment of the present disclosure may also include an input device and an output device. Among them, the processor, memory, input device and output device may be connected through a bus or in other ways, which are not specifically limited here.

[0095] The memory, as a computer-readable storage medium, can be used to store software programs, computer executable programs and various modules, such as: the program or module corresponding to the method for managing and querying the same indicator of multiple fact tables based on the indicator center in the embodiment of the present disclosure. The processor executes various functional applications and data processing of the electronic device by running the software programs or modules stored in the memory.

[0096] The input device can be used to receive input numbers or signals. The signal can be a key signal related to user settings and function control of the device / terminal / server. The output device can include a display device such as a display screen.

[0097] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A method for managing and querying the same indicator of multiple fact tables based on an indicator center, characterized in that: The steps include: S1. Define the caliber of the same indicators of each source table, and arrange the source tables in ascending order according to the data volume; S2, obtaining the query dimension of the indicator query condition input by the user, traversing and finding the source table matching the query dimension, and using it as the target source table; S3. Perform an indicator query based on the target source table and return the corresponding indicator calculation result.

2. According to claim 1, the method for managing and querying the same indicator of multiple fact tables based on the indicator center is characterized in that: S1. Define the same indicators of each source table, and arrange the source tables from small to large according to the data volume, including: Set indicator names and business scope; Searching and obtaining each of the source tables corresponding to the indicator name and the business scope from the data warehouse; According to the analysis dimension, each of the source tables is grouped; The grouped source tables are arranged from small to large according to the data volume.

3. The method for managing and querying the same indicator of multiple fact tables based on the indicator center according to claim 2 is characterized in that: S1. Define the same indicators of each source table, and arrange the source tables from small to large according to the data volume, and also include: After arranging the grouped source tables from small to large according to the data volume, each source table arranged from small to large is marked with a serial number.

4. The method for managing and querying the same indicator of multiple fact tables based on the indicator center according to claim 3 is characterized in that: S1. Define the same indicators of each source table, and arrange the source tables from small to large according to the data volume, and also include: Binding the marked serial number with the corresponding source table; According to the source tables marked by serial numbers from small to large, a corresponding source table form is generated and saved.

5. The method for managing and querying the same indicator of multiple fact tables based on the indicator center according to claim 2 is characterized in that: S2, obtaining the query dimension of the indicator query condition input by the user, traversing and finding the source table matching the query dimension, and using it as the target source table, including: Get the indicator query conditions entered by the user; Perform query dimension analysis to obtain the query dimension in the indicator query condition; Traverse the source table form, identify the analysis dimensions of each source table in the source table form in order, and determine whether the analysis dimension contains the query dimension: If so, the traversal ends, and the source table that includes the query dimension in the analysis dimension is marked as the target source table; Otherwise, continue traversing.

6. The method for managing and querying the same indicator of multiple fact tables based on the indicator center according to claim 5 is characterized in that: When setting the indicator name and business scope, it also includes: According to the query dimension, construct the indicator name and the business scope corresponding to the query dimension.

7. The method for managing and querying the same indicator of multiple fact tables based on the indicator center according to claim 5 is characterized in that: S3. Perform an index query based on the target source table and return the corresponding index calculation results, including: Constructing a query request according to the query dimension; Sending the query request to a data warehouse; The data warehouse responds to the query request, performs indicator query and indicator calculation based on the target source table, and returns the corresponding indicator calculation results to the user.

8. A device for managing and querying the same indicator in multiple fact tables based on an indicator center, used to implement the method for managing and querying the same indicator in multiple fact tables based on an indicator center as described in any one of claims 1 to 7, characterized in that: include: An indicator definition module is used to define the same indicators of various source tables and arrange the source tables in ascending order according to the data volume; An execution plan matching module is used to obtain the query dimension of the indicator query condition input by the user, traverse and find the source table matching the query dimension, and use it as the target source table; The indicator query module is used to perform indicator query based on the target source table and return the corresponding indicator calculation results.

9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement a method for managing and querying the same indicator of multiple fact tables based on an indicator center as described in any one of claims 1 to 7 when executing the executable instructions.

Citation Information

Patent Citations

  • Data analysis self-help data fetching method and system based on indexes

    CN106776834A

  • Data warehouse model construction method and apparatus, and data query method, apparatus and device

    CN110674228A

  • Data multi-dimensional analysis method and device for insurance industry

    CN117217933A

  • Data processing method and device, storage medium and equipment

    CN117312354A

  • Index management system and index query method

    CN117827876A