Metadata information-based index query method and device, equipment and medium

Through the index query method based on metadata information, the problem of low efficiency and accuracy in data query in the prior art is solved, and efficient query of different data sources and complex data models is realized.

CN119537462APending Publication Date: 2025-02-28PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411623174.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the prior art, data query efficiency and accuracy are low, especially under different data sources and complex data models.

Method used

By receiving the indicator query request, the metadata information is determined, the data table collection is determined based on the metadata information, the target data table is filtered, and the query SQL statement is generated based on the storage location and data information, the target data is obtained from the target data source and cached to the preset database.

Benefits of technology

It improves the efficiency and accuracy of data queries and can effectively handle query requirements under different data sources and complex data models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537462A_ABST
    Figure CN119537462A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and provides a metadata information-based index query method, which comprises the following steps of: receiving an index query request sent through a data unified query interface; metadata information is determined according to target information in the index query request, and a data table set is determined according to a data table association relationship in the metadata information; screening out a target data table according to index information in the metadata information, and generating a query SQL statement according to a storage position in the metadata information and data information in the target data table; and executing the query SQL statement to obtain target data from the target data source, and caching the target data to a preset database. The method is applied to the financial field. According to the invention, the data can be quickly queried from a plurality of data sources through the data unified query interface. By generating the query SQL statement, conversion of the request information is achieved, data query is facilitated, and then the accuracy and efficiency of data query are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to an indicator query method, device, equipment and medium based on metadata information. Background Art

[0002] In the field of data analysis, data models usually include star models and snowflake models. Since the main data of the star model is concentrated in the fact table, data query can be performed by simply scanning the fact table, which has high query efficiency but will cause a large amount of data redundancy. The snowflake model is relatively complex and difficult for users to understand. It is relatively difficult to browse the content, and additional connections will reduce query performance.

[0003] Moreover, for large or ultra-large-scale group enterprises, data may be stored in different ways in the data source based on different scenario requirements and implementation standards differences between different development teams. Therefore, the above situation leads to low query efficiency and query accuracy when querying data. Summary of the invention

[0004] The embodiments of the present invention provide an index query method, device, equipment and medium based on metadata information to solve the problems of low query efficiency and accuracy when querying data in the prior art.

[0005] A method for querying indicators based on metadata information, comprising: Receiving an indicator query request sent through a unified data query interface, wherein the indicator query request carries target information; Determine metadata information according to target information in the indicator query request, and determine a data table set according to a data table association relationship in the metadata information; Filtering a target data table from the data table set according to the indicator information in the metadata information, and generating a query SQL statement according to the storage location in the metadata information and the data information in the target data table; The query SQL statement is executed to obtain target data from a target data source, and the target data is cached in a preset database.

[0006] An indicator query device based on metadata information, comprising: A request receiving module, used to receive an indicator query request sent through a unified data query interface, wherein the indicator query request carries target information; A metadata information module, used to determine metadata information according to target information in the indicator query request, and determine a data table set according to a data table association relationship in the metadata information; A statement generation module, used to filter out a target data table from the data table set according to the indicator information in the metadata information, and generate a query SQL statement according to the storage location in the metadata information and the data information in the target data table; The statement execution module is used to execute the query SQL statement to obtain target data from the target data source and cache the target data in a preset database.

[0007] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned index query method based on metadata information is implemented.

[0008] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the index query method based on metadata information is implemented.

[0009] The present invention provides an indicator query method, device, equipment and medium based on metadata information. The method realizes the query of data in different data sources by receiving an indicator query request sent through a unified data query interface, thereby accelerating the efficiency of data query. Through the indicator query request, the metadata information is determined, thereby realizing the determination of the data table set, and then realizing the screening of the target data table. By generating a query SQL statement through the storage location and data information, the conversion of the indicator query request is realized, thereby realizing the generation of the query SQL statement. By executing the query SQL statement, the target data source is determined, thereby realizing the acquisition of the target data, and the caching of the target data is realized, thereby improving the accuracy and efficiency of the query data. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0011] Figure 1 Schematic diagram of an application environment of an indicator query method based on metadata information in one embodiment of the present invention; Figure 2 is a flow chart of an indicator query method based on metadata information in one embodiment of the present invention; Figure 3 is a flow chart of an indicator query method based on metadata information in another embodiment of the present invention; Figure 4 is a flowchart of step S40 of the index query method based on metadata information in one embodiment of the present invention; Figure 5 It is a principle block diagram of an indicator query device based on metadata information in one embodiment of the present invention; Figure 6 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0012] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0013] The index query method based on metadata information provided by the embodiment of the present invention can be applied as follows: Figure 1 Specifically, the index query method based on metadata information is applied in an index query device based on metadata information, and the index query device based on metadata information includes: Figure 1 The client and server shown in the figure communicate with each other through the network to solve the problem in the prior art that local stylization of images cannot achieve the expected effect. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The client, also known as the user end, refers to a program that corresponds to the server and provides classification services to customers. The client can be installed on, but not limited to, various computers, laptops, smart phones, tablets, and portable wearable devices.

[0014] In one embodiment, if Figure 2 As shown, a method for index query based on metadata information is provided, and this method is applied in Figure 1 The server in the example is used as an example to illustrate the process, including the following steps: S10: receiving an indicator query request sent through a unified data query interface, wherein the indicator query request carries target information.

[0015] Understandably, the indicator query request is a request for querying target data. The unified data query interface refers to a query interface used to connect different data sources. The indicator query request carries target information. The target information refers to the relevant information used to query the target data, which represents the data required by the user. The user enters the target information of the data to be queried through the unified data query interface of the client, so that the indicator query request sent through the unified data query interface is received on the server. For example, when it is necessary to query data, the data to be queried is entered in the unified data query interface, thereby initiating an indicator query request.

[0016] S20: Determine metadata information according to the target information in the indicator query request, and determine a data table set according to the data table association relationship in the metadata information.

[0017] Understandably, metadata information refers to basic information of data, such as indicator name, indicator code, data source corresponding to the indicator, indicator dimension, indicator dimension value, indicator storage mode, etc. A data table set refers to a set of all data tables, and a data table includes data corresponding to the metadata information.

[0018] Specifically, metadata information is determined according to the target information in the indicator query request, that is, the metadata corresponding to the target data is queried through the target information in the indicator query request, so as to obtain metadata information. Then, a data table set is determined according to the data table association relationship in the metadata information, that is, all data tables are queried through the data table association relationship in the metadata information, and after the data table is queried, the data table is obtained, and then a set is constructed according to all the obtained data tables, so as to obtain a data table set. Among them, the metadata information also records the information of the dimensions and / or indicators corresponding to each data table, and the data table containing the dimensions and indicators can be matched according to the metadata information, so as to obtain the target data table set.

[0019] S30, filtering out a target data table from the data table set according to the indicator information in the metadata information, and generating a query SQL statement according to the storage location in the metadata information and the data information in the target data table.

[0020] Understandably, the target data table refers to the data table corresponding to the metadata information, including relevant information for querying the target data. Indicator information refers to information such as the indicator name, indicator code, data source corresponding to the indicator, indicator dimension, indicator dimension value and indicator storage mode related to the target data. Data information refers to the data corresponding to each indicator information. Query SQL statement is an SQL statement used to query data. ‌SQL statement‌ refers to the language that uses SQL (Structured Query Language) to operate on the database. SQL is mainly used to access data, query, update and manage relational database systems. The storage location refers to the data source where the target data is located.

[0021] Specifically, the target data table is filtered out from the data table set according to the indicator information in the metadata information, that is, the data tables in the data table set are matched by the indicator information, that is, the indicator information and the data table names are matched one by one, so as to determine whether there is a target data table corresponding to the indicator information in the data table set, so that the target data table is filtered out from the data table set. Then, a query SQL statement is generated according to the storage location in the metadata information and the data information in the target data table, that is, the target data table is queried by the indicator information, so as to obtain the data information in the target data table corresponding to the indicator information, and the storage location in the metadata information is obtained, and then, the format of the SQL statement is filled with information by the storage location and the data information to generate a query SQL statement for querying the target data.

[0022] S40, executing the query SQL statement to obtain target data from the target data source, and caching the target data in a preset database.

[0023] Understandably, the target data source refers to a location where the target data is stored. The preset database refers to a database set in advance for storing the queried target data, for example, a Redis database.

[0024] Specifically, execute the query SQL statement to obtain the target data from the target data source, that is, parse the query SQL statement, so as to obtain the target data required by the user through the data information in the target data table, and obtain the data source where the target data is located through the storage location in the metadata information, and then, through the parsed data source and target data, access the data source to obtain the target data from the target data source, and feed back the target data to the user. Then, cache the target data in the preset database to facilitate the user's next access. Among them, after executing the query SQL statement, if the target data is not obtained, analyze the reason for the query failure, that is, first verify the input information in the indicator query request to determine whether the input information is wrong; then, query the data source update time to determine whether the target data is updated or deleted, and feed back the query failure result to the user.

[0025] In an embodiment of the present invention, an indicator query method based on metadata information is provided. The method realizes the query of data in different data sources by receiving an indicator query request sent through a unified data query interface, thereby accelerating the efficiency of data query. Through the indicator query request, the metadata information is determined, thereby realizing the determination of the data table set, and then realizing the screening of the target data table. By generating a query SQL statement through the storage location and data information, the conversion of the indicator query request is realized, thereby realizing the generation of the query SQL statement. By executing the query SQL statement, the target data source is determined, thereby realizing the acquisition of the target data, and the caching of the target data is realized, thereby improving the accuracy and efficiency of the query data.

[0026] In one embodiment, after step S10, that is, after receiving the indicator query request sent through the unified data query interface, the process further includes: S101, parsing the indicator query request to obtain user information.

[0027] S102, obtaining a preset authorization table, and matching the user information with the preset authorization information in the preset authorization table to obtain an information matching result.

[0028] S103: When the information matching result indicates that the user information matching fails, it is determined that the indicator query request does not have access rights.

[0029] S104: When the information matching result indicates that the user information is successfully matched, it is determined that the indicator query request has access rights.

[0030] Understandably, user information refers to information such as a user name or user ID, which is used to represent the identity of the user. The information matching result is used to represent whether the user information is successfully matched.

[0031] Specifically, after receiving the indicator query request sent through the unified data query interface, the indicator query request is parsed, that is, the user information in the indicator query request is identified, and then the preset authorization table is obtained, and the user information and the preset authorization information in the preset authorization table are matched, that is, the user information and the preset authorization information are matched one by one, so as to obtain the information matching result. When the information matching result indicates that the user information fails to match, that is, the user information and all the preset authorization information fail to match, that is, the user information does not exist in the preset authorization table, thereby confirming that the user information in the indicator query request does not have access rights. Similarly, when the information matching result indicates that the user information matches successfully, that is, the user information and the preset authorization information in the preset authorization table match successfully, that is, the user information exists in the preset authorization table, thereby confirming that the user information in the indicator query request has access rights. For example, the entire data information of the company is queried and accessed, and the user's access rights are verified so that only users with corresponding rights can access it to avoid leakage of data information.

[0032] In this embodiment, the request is parsed to confirm the accessed user information. The user information is matched through a preset authorization table to verify the authority of the user information, thereby avoiding the leakage of the target data and ensuring the security of the target data.

[0033] In one embodiment, before step S20, that is, before determining the data table set according to the association relationship of the data tables in the metadata information, the method further includes: S201, obtaining data tables from different data sources, and creating indicator data according to each of the data tables.

[0034] S202, determining different indicator groups according to each of the indicator data, wherein the content of each of the indicator groups includes the indicator name and dimension information in the indicator data.

[0035] Understandably, indicator data refers to information related to the data table, such as indicator name, storage location, indicator dimension, etc. An indicator group refers to a collection of multiple indicators, and each indicator group includes the indicator name and dimension information in the indicator data.

[0036] Specifically, before determining the data table set according to the association relationship of the data tables in the metadata information, obtain the data tables in all data sources, and create indicators for each data table, that is, obtain the preset indicator template, and establish indicators for the information in the data table through the indicator model, so as to obtain indicator data related to the data table. Then, determine different indicator groups according to each indicator data, that is, create indicator groups through the indicator data corresponding to each data table to associate the relationship between the indicator data, so as to obtain indicator groups including indicator names and dimension information in the indicator data. For example, when saving the data of the current quarter, obtain the corresponding data table, then create indicator data according to the content in the data table, and determine the indicator group including indicator names and dimension information according to the indicator data.

[0037] In this embodiment, by creating indicators for each data table, the creation of indicator data is achieved, and then the determination of indicator groups is achieved, which facilitates subsequent queries on the data table and improves data query efficiency.

[0038] In one embodiment, in step S30, that is, determining the target data table according to the indicator information in the metadata information, and generating a query SQL statement according to the storage location in the metadata information and the data information in the target data table, including: S301, determining a target data table according to the indicator name in the metadata information.

[0039] S302: Determine field information in the target data table according to the indicator dimension in the metadata information.

[0040] S303: Determine the field content corresponding to the field information in the target data table according to the indicator dimension value in the metadata information.

[0041] S304: Generate a query SQL statement according to the indicator storage mode, the field information and the field content in the metadata information.

[0042] Understandably, field information refers to the fields in the target data table that correspond to each indicator dimension, such as business type, salesperson, amount, etc. Field content refers to the specific content in the target data table that corresponds to the indicator position, such as business type is auto insurance, salesperson is XXX, amount is 5,000 yuan, etc.

[0043] Specifically, after obtaining the metadata information, the metadata information is parsed to obtain the content included in the metadata information. First, the target data table corresponding to the indicator is found through the indicator name in the metadata information. Then, the field query of the target data table is performed through the indicator dimension in the metadata information, that is, the position of the field corresponding to the indicator dimension is found in the target data table through the indicator dimension, so as to obtain the field information. Next, the field content corresponding to the field information in the target data table is determined through the indicator dimension value in the metadata information, that is, the field content corresponding to the field information is queried in the target data table through the indicator dimension value corresponding to the indicator dimension in the metadata information. Finally, the information is filled in according to the format of the preset query statement through the indicator storage mode in the metadata information and the field information and field content in the target data table, so as to generate a query SQL statement for querying data.

[0044] In this embodiment, the target data table is acquired through the indicator data in the metadata information. The field information is acquired through the indicator dimension in the metadata, and then the field content is acquired. The indicator query request is converted through the indicator storage mode, field information and field content, and then the query SQL statement is generated.

[0045] In one embodiment, in step S40, that is, executing the query SQL statement to obtain target data from the target data source, includes: S401, determining data source information according to the indicator data source in the metadata information, and determining a target data source according to the data source information.

[0046] S402: Execute the query SQL statement through the data query middleware that establishes a connection with each of the indicator data sources to query the target data from the target data source.

[0047] Understandably, data source information refers to information such as database type, database host, database port, database version, database user name, database password, etc. Data query middleware is used to execute SQL statements.

[0048] Specifically, after obtaining the query SQL statement, the data source information is determined according to the indicator data source in the metadata information, that is, the metadata information is parsed, and the indicator data source after parsing is obtained, and then, information query is performed through the indicator data source to obtain the data source information, and the target data source is determined by the content in the data source information. Then, the query SQL statement is executed through the data query middleware that establishes a connection with each indicator data source, that is, the data query middleware is obtained, and the query SQL statement is executed using the data query middleware, that is, the data query middleware identifies the data source in the query SQL statement, and queries the data in the data source according to the identified field information and field content, so as to obtain the target data. For example, after determining the metadata information, the metadata information is parsed and identified to obtain the indicator data source in the metadata information, and then the target data source information such as the database type storing the target data, the host of the database, and the port of the database is determined through the indicator data source. Then, the query SQL statement is executed through the data query middleware to obtain the target data.

[0049] In this embodiment, the indicator data source is used to determine the data source information, thereby determining the target data source. The query SQL statement is executed through the data query middleware, thereby executing the SQL statement, thereby acquiring the target data, and improving the accuracy and efficiency of data query.

[0050] In one embodiment, if Figure 4 As shown, after step S40, that is, after the target data is obtained from the target data source, the following further includes: S403, filtering the target data according to the filtering conditions to obtain filtered data.

[0051] S404: Aggregate all the screened data using a preset aggregation rule to obtain aggregated data.

[0052] S405, sorting all the aggregated data according to a preset dimension to obtain a data sorting result, and presenting the data sorting result to the user in a visual manner according to a preset format.

[0053] Understandably, filtered data refers to part of the data filtered out from the target data. Aggregated data refers to the data processed from the filtered data. Preset dimensions refer to the sorting dimensions set in advance, such as amount.

[0054] Specifically, after obtaining the target data from the target data source, the target data is filtered by the filtering condition, that is, the data content in the target data is filtered according to the specific condition, so as to filter out the data content that meets the condition, and the filtered data content is determined as the filtered data. For example, the data of business personnel in different regions are filtered to filter out the data of personnel in the target region. Then, the preset aggregation rule is obtained, and all the filtered data are aggregated by the preset aggregation rule, that is, the filtered data is aggregated according to the dimension and aggregation method in the preset aggregation rule, so as to obtain the calculated aggregated data. For example, all business amounts of the same are summarized, and the summarized amount is recorded to obtain the aggregated data. Further, the preset dimension is obtained, and all the aggregated data are sorted by the preset dimension, that is, the aggregated data is sorted according to the content corresponding to the preset dimension, so as to obtain the data sorting result including all the aggregated data. Finally, the data sorting result is presented to the user in a visual manner according to the preset format, that is, the aggregated data in the data sorting result is presented to the user in a visual manner in the form of several data per page. For example, all calculated aggregate data are sorted according to the amount or before and after the date, and the data sorting results are displayed to the user in a preset display method.

[0055] In this embodiment, the target data is filtered by the screening conditions, so as to filter the target data and obtain the filtered data. All the filtered data are aggregated by the preset aggregation rules, so as to calculate the filtered data and obtain the aggregated data. All the aggregated data are sorted by the preset dimensions, so as to sort the aggregated data and display the aggregated data in the preset format, so as to feedback the queried data.

[0056] In one embodiment, if Figure 3 As shown, after step S40, that is, after the target data is cached in the preset database, the following further includes: S50, receiving the current index query request sent through the unified data query interface, and determining the current metadata information according to the current index query request. S60, performing an index query on the preset database through the current metadata information to obtain target query data corresponding to the current index query request.

[0057] Understandably, the current indicator query request refers to a new indicator query request, and the current metadata information refers to metadata information corresponding to the new indicator query request.

[0058] Specifically, after the target data is cached in the preset database, when the current indicator query request sent through the unified data query interface is received again, the metadata is queried through the current information in the current indicator query request, so as to obtain the current metadata information corresponding to the current indicator query request. Then, the historical query data cached in the preset database is first queried through the current metadata information, that is, the indicator information in the current metadata information and the historical query data are matched one by one to determine whether there is query data corresponding to the current indicator query request in the preset database. When the historical query data corresponding to the current metadata information is matched in the preset database, the historical query data is extracted to obtain the target query data corresponding to the current indicator query request. When the historical query data corresponding to the current metadata information is not matched in the preset database, that is, the historical query data corresponding to the current metadata information does not exist in the preset database, the data table is searched according to the above method to obtain the target query data corresponding to the current indicator query request from the data source. The specific acquisition process is not described in detail here, and the above-mentioned target data acquisition process is referred to. For example, when another user performs a data query, the historical query data in the preset database can be searched and matched first. That is, when querying the business data of a certain area, after the supervisor queries, the manager can obtain it from the preset database when querying.

[0059] In this embodiment, when an indicator query request is received again, the historical query data in the preset database is first queried and matched, thereby achieving the acquisition of target query data, thereby reducing the response time of the query data and improving the efficiency of data query.

[0060] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0061] In one embodiment, a device for index query based on metadata information is provided, and the device for index query based on metadata information corresponds one-to-one to the method for index query based on metadata information in the above embodiment. Figure 5 As shown, the index query device based on metadata information includes a request receiving module 11, a metadata information module 12, a statement generating module 13 and a statement executing module 14. The detailed description of each functional module is as follows: The request receiving module 11 is used to receive an indicator query request sent through the unified data query interface, wherein the indicator query request carries target information; The metadata information module 12 is used to determine the metadata information according to the target information in the indicator query request, and determine the data table set according to the data table association relationship in the metadata information; A statement generation module 13, used to filter out a target data table from the data table set according to the indicator information in the metadata information, and generate a query SQL statement according to the storage location in the metadata information and the data information in the target data table; The statement execution module 14 is used to execute the query SQL statement to obtain target data from the target data source and cache the target data in a preset database.

[0062] In one embodiment, the device further comprises: The current metadata information module is used to receive the current indicator query request sent through the unified data query interface, and determine the current metadata information according to the current indicator query request; The indicator query module is used to perform an indicator query on the preset database through the current metadata information to obtain target query data corresponding to the current indicator query request.

[0063] In one embodiment, the request receiving module 11 includes: A request parsing unit, used to parse the indicator query request to obtain user information; An information matching unit, used to obtain a preset authorization table, and match the user information with the preset authorization information in the preset authorization table to obtain an information matching result; A non-access right unit, configured to determine that the indicator query request does not have access right when the information matching result indicates that the user information matching fails; The access permission unit is used to determine that the indicator query request has access permission when the information matching result indicates that the user information is successfully matched.

[0064] In one embodiment, the statement generation module 13 includes: A target data table unit, used to determine a target data table according to the indicator name in the metadata information; A field information unit, used to determine the field information in the target data table according to the indicator dimension in the metadata information; A field content unit, used to determine the field content corresponding to the field information in the target data table according to the indicator dimension value in the metadata information; A query statement generating unit is used to generate a query SQL statement according to the indicator storage mode in the metadata information, the field information and the field content.

[0065] In one embodiment, the device further comprises: An indicator data module, used to obtain data tables from different data sources and create indicator data according to each of the data tables; The indicator group module is used to determine different indicator groups according to each of the indicator data, and the content of each indicator group includes the indicator name and dimension information in the indicator data.

[0066] In one embodiment, the statement execution module 14 includes: A target data source unit, configured to determine data source information according to the indicator data source in the metadata information, and determine a target data source according to the data source information; The statement execution unit is used to execute the query SQL statement through the data query middleware that establishes a connection with each of the indicator data sources, so as to query the target data from the target data source.

[0067] In one embodiment, the statement execution module 14 further includes: A screening processing unit, used for screening the target data according to the screening conditions to obtain screening data; An aggregation processing unit, used to perform aggregation processing on all the screened data according to a preset aggregation rule to obtain aggregated data; The sorting processing unit is used to sort all the aggregated data according to a preset dimension to obtain a data sorting result, and present the data sorting result to the user in a visual manner according to a preset format.

[0068] For the specific limitations of the indicator query device based on metadata information, please refer to the limitations of the indicator query method based on metadata information above, which will not be repeated here. Each module in the above-mentioned indicator query device based on metadata information can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0069] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the data used in the indicator query method based on metadata information in the above-mentioned embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an indicator query method based on metadata information is implemented.

[0070] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned indicator query method based on metadata information when executing the computer program.

[0071] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned indicator query method based on metadata information is implemented.

[0072] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0073] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0074] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. A method for querying indicators based on metadata information, characterized in that: include: Receiving an indicator query request sent through a unified data query interface, wherein the indicator query request carries target information; Determine metadata information according to target information in the indicator query request, and determine a data table set according to a data table association relationship in the metadata information; Filtering a target data table from the data table set according to the indicator information in the metadata information, and generating a query SQL statement according to the storage location in the metadata information and the data information in the target data table; The query SQL statement is executed to obtain target data from a target data source, and the target data is cached in a preset database.

2. The index query method based on metadata information according to claim 1, characterized in that: After caching the target data in a preset database, the method further includes: Receive a current indicator query request sent through a unified data query interface, and determine current metadata information according to the current indicator query request; An index query is performed on the preset database through the current metadata information to obtain target query data corresponding to the current index query request.

3. The index query method based on metadata information according to claim 1, characterized in that: After receiving the indicator query request sent through the unified data query interface, the method further includes: Parsing the indicator query request to obtain user information; Obtain a preset authorization table, and match the user information with the preset authorization information in the preset authorization table to obtain an information matching result; When the information matching result indicates that the user information fails to match, determining that the indicator query request does not have access rights; When the information matching result indicates that the user information is successfully matched, it is determined that the indicator query request has access rights.

4. The index query method based on metadata information according to claim 1, characterized in that: The step of determining the target data table according to the indicator information in the metadata information, and generating a query SQL statement according to the storage location in the metadata information and the data information in the target data table, includes: Determine the target data table according to the indicator name in the metadata information; Determine the field information in the target data table according to the indicator dimension in the metadata information; Determine the field content corresponding to the field information in the target data table according to the indicator dimension value in the metadata information; Generate a query SQL statement according to the indicator storage mode in the metadata information, the field information and the field content.

5. The index query method based on metadata information according to claim 1, characterized in that: Before determining the data table set according to the association relationship of the data tables in the metadata information, the method further includes: Obtain data tables from different data sources, and create indicator data based on each of the data tables; Different indicator groups are determined according to each of the indicator data, and the content of each of the indicator groups includes the indicator name and dimension information in the indicator data.

6. The index query method based on metadata information according to claim 1, characterized in that: The executing the query SQL statement to obtain target data from the target data source includes: Determine data source information according to the indicator data source in the metadata information, and determine the target data source according to the data source information; The query SQL statement is executed through the data query middleware that establishes a connection with each of the indicator data sources to query the target data from the target data source.

7. The index query method based on metadata information according to claim 1, characterized in that: After the target data is obtained from the target data source, the method further includes: Performing screening processing on the target data according to the screening conditions to obtain screening data; Aggregate all the screened data using a preset aggregation rule to obtain aggregated data; All the aggregated data are sorted by a preset dimension to obtain a data sorting result, and the data sorting result is presented to the user in a visual manner according to a preset format.

8. An index query device based on metadata information, characterized in that: include: A request receiving module, used to receive an indicator query request sent through a unified data query interface, wherein the indicator query request carries target information; A metadata information module, used to determine metadata information according to target information in the indicator query request, and determine a data table set according to a data table association relationship in the metadata information; A statement generation module, used to filter out a target data table from the data table set according to the indicator information in the metadata information, and generate a query SQL statement according to the storage location in the metadata information and the data information in the target data table; The statement execution module is used to execute the query SQL statement to obtain target data from the target data source and cache the target data in a preset database.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the indicator query method based on metadata information as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the indicator query method based on metadata information as described in any one of claims 1 to 7 is implemented.