Index query system, method and equipment and storage medium

By centrally managing metric query statements and data in the metric query system, the problem of repeated implementation and data differences in multiple business departments is solved, reducing costs and improving data confidence.

CN119149598APending Publication Date: 2024-12-17BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1

Patent Information

Application Number
CN202310722884.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-16
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

In the prior art, the same indicator query statement is repeatedly implemented in the indicator query device of multiple business departments, resulting in high development and storage costs, and the cross-department indicator query statements are not synchronized in time, resulting in different indicator data and affecting the confidence of the data. .

Method used

An indicator query system was designed, including a business layer, a data warehouse layer and an indicator query device. The module is obtained through query statements, the execution module and the data sending module are received, the indicator query requests of the business object, the query statement is determined, and the data warehouse layer is used. Perform query operations and send indicator data to the corresponding business objects to avoid repeated implementation and synchronization problems.

Benefits of technology

It reduces the development and storage costs of indicator query statements, ensures the confidence of indicator data, and achieves cross-departmental indicator data consistency through centralized management of query statements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149598A_ABST
    Figure CN119149598A_ABST
Patent Text Reader

Abstract

The invention discloses an index query system, method and device and a storage medium. The system comprises a business layer, a data warehouse layer and an index query device, the business layer comprises at least two business objects, and the index query device comprises a query statement acquisition module, a query statement execution module and an index data sending module; wherein the business object is used for sending an index query request to the index query device, and the index query device is used for obtaining an index query statement corresponding to the index query request in response to the received index query request; adopting the index query statement to execute query operation on the data warehouse layer to obtain index data; and sending the index data to a business object corresponding to the object identity identifier in the index query request. According to the embodiment of the invention, the development cost and the storage cost of the index query statement are reduced, and the confidence coefficient of the index data is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an indicator query system, method, device and storage medium. Background Art

[0002] At this stage, big data is increasingly becoming the infrastructure for corporate production and development. With the development of technology and concepts, more and more companies are transforming in the direction of "data-driven".

[0003] In the process of transformation, it is usually necessary to output the business data in the data warehouse in the form of query indicators. In the enterprise architecture, different business departments have the need to query indicators. The current indicator query architecture is equipped with indicator query devices for different business departments. Each business department uses its own indicator query device to implement indicator query.

[0004] In the process of implementing the present invention, it is found that there are at least the following technical problems in the prior art:

[0005] On the one hand, the same indicator query statement is repeatedly implemented in the indicator query devices of multiple business departments, which consumes development costs and storage costs; on the other hand, the traditional indicator query architecture involves the synchronization problem of indicator query statements across departments. If the indicator query statements are not synchronized in time, there will be differences in the indicator data queried by different business departments, which will affect the confidence of the indicator data. Summary of the invention

[0006] Embodiments of the present invention provide an indicator query system, method, device and storage medium to solve the problem of the same indicator query statement being repeatedly implemented in multiple indicator query devices, reduce the development cost and storage cost of the indicator query statement, and ensure the confidence of the indicator data.

[0007] According to an embodiment of the present invention, an indicator query system is provided, the system comprising: a business layer, a data warehouse layer and an indicator query device, the business layer comprising at least two business objects, the indicator query device comprising: a query statement acquisition module, a query statement execution module and an indicator data sending module;

[0008] Wherein, the business object is used to send the indicator query request to the indicator query device;

[0009] The query statement acquisition module is used to determine the indicator query statement based on the query indicator identifier in the indicator query request in response to receiving the indicator query request;

[0010] The query statement execution module is used to use the indicator query statement to execute a query operation on the data warehouse layer to obtain indicator data;

[0011] The indicator data sending module is used to send the indicator data to the business object corresponding to the object identity in the indicator query request.

[0012] According to another embodiment of the present invention, a method for querying an indicator is provided, the method comprising:

[0013] In response to receiving an indicator query request sent by a business object, determining an indicator query statement based on a query indicator identifier in the indicator query request;

[0014] Using the index query statement, a query operation is performed on the data warehouse layer to obtain index data;

[0015] The indicator data is sent to the business object corresponding to the object identity in the indicator query request.

[0016] According to another embodiment of the present invention, an electronic device is provided, the electronic device comprising:

[0017] at least one processor; and

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the indicator query method described in any embodiment of the present invention.

[0020] According to another embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the indicator query method described in any embodiment of the present invention when executed.

[0021] The technical solution of the embodiment of the present invention is to set up an indicator query device in the indicator query system, through which indicator query requests respectively sent by at least two business objects are received, for each indicator query request, based on the query indicator identifier in the indicator query request, an indicator query statement is determined, and the indicator query statement is used to perform a query operation on the data warehouse layer to obtain indicator data, and the indicator data is sent to the business object corresponding to the object identity identifier in the indicator query request, thereby solving the problem of the same indicator query statement being repeatedly implemented in multiple indicator query devices, which not only reduces the development cost and storage cost of the indicator query statement, but also ensures the confidence of the indicator data.

[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0024] Figure 1 A schematic diagram of the structure of an indicator query system provided by an embodiment of the present invention;

[0025] Figure 2 A schematic diagram of the structure of another indicator query system provided by an embodiment of the present invention;

[0026] Figure 3 A schematic diagram of the structure of another indicator query system provided by an embodiment of the present invention;

[0027] Figure 4 A schematic diagram of a structure of a specific example of an indicator query system provided by an embodiment of the present invention;

[0028] Figure 5 A flowchart of an indicator query method provided by an embodiment of the present invention;

[0029] Figure 6 The present invention is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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 should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "query", "preset", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] Figure 1 This is a schematic diagram of the structure of an indicator query system provided by an embodiment of the present invention. This embodiment can provide services for the indicator query method described in the following embodiments.

[0033] like Figure 1 As shown, the index query system 100 includes: a business layer 110, a data warehouse layer 130 and an index query device 120, the business layer 110 includes at least two business objects 111, and the index query device 120 includes: a query statement acquisition module 121, a query statement execution module 122 and an index data sending module 123;

[0034] Among them, the business object 111 is used to send the indicator query request to the indicator query device 120; the query statement acquisition module 121 is used to determine the indicator query statement in response to receiving the indicator query request based on the query indicator identifier in the indicator query request; the query statement execution module 122 is used to use the indicator query statement to perform a query operation on the data warehouse layer 130 to obtain the indicator data; the indicator data sending module 123 is used to send the indicator data to the business object 111 corresponding to the object identity identifier in the indicator query request.

[0035] Specifically, the business object 111 in the business layer 110 is used to represent a data consumption object with an index query requirement. Exemplarily, the business object 111 includes but is not limited to a business department, a BI (Business Intelligence) tool platform, a data analysis platform, an expert platform, etc. The business object 111 included in the business layer 110 is not limited here.

[0036] Specifically, the indicator query device 120 can be implemented in the form of hardware and / or software.

[0037] Specifically, a large amount of original business data and / or structured business data is stored in the data warehouse layer 130. Exemplarily, a structured processing tool may be used to convert the original business data in the data warehouse layer 130 into structured business data with certain business meanings, such as an ETL tool.

[0038] Exemplarily, the original business data and / or structured business data in the data warehouse layer 130 may be stored in the form of a wide table, which generally refers to a database table that associates indicator data, dimension data, attribute data, etc. related to a business subject. The storage form used by the data warehouse layer 130 is not limited here.

[0039] In this embodiment, the indicator query request is generated by the business object 111 based on the object identity and the query indicator identity. The object identity is used to uniquely identify the business object 111 in the indicator query system 100, and the query indicator identity is used to uniquely identify the queried indicator data. Exemplarily, the object identity and the query indicator identity can be composed of at least one character such as text, uppercase letters, lowercase letters, numbers and special characters, and the specific character composition of the object identity and the query indicator identity is not limited here.

[0040] In a specific embodiment, the indicator query system 100 also includes a query statement management module for storing indicator query statements corresponding to at least one preset indicator identifier, and correspondingly, a query statement acquisition module 121 for acquiring an indicator query statement corresponding to the query indicator identifier from the query statement management module.

[0041] Among them, exemplarily, the language type adopted by the indicator query statement includes but is not limited to SQL language (Structured Query Language), HQL language (Hibernate Query Language, object-oriented query language), JPA language (Java Persistence Query Language, Java persistence query language) or CQL language (Common Query Language, common query language), etc., and the language type adopted by the indicator query statement is not limited here.

[0042] The technical solution of this embodiment is to set up an indicator query device in the indicator query system, through which indicator query requests respectively sent by at least two business objects are received, for each indicator query request, based on the query indicator identifier in the indicator query request, an indicator query statement is determined, and the indicator query statement is used to perform a query operation on the data warehouse layer to obtain indicator data, and the indicator data is sent to the business object corresponding to the object identity identifier in the indicator query request, thereby solving the problem of the same indicator query statement being repeatedly implemented in multiple indicator query devices, which not only reduces the development cost and storage cost of the indicator query statement, but also ensures the confidence of the indicator data.

[0043] Figure 2 This is a schematic diagram of the structure of another indicator query system provided by an embodiment of the present invention. This embodiment further refines the indicator query device 120 in the above embodiment.

[0044] like Figure 2 As shown, the indicator query device 120 also includes: a meta-information management module 221, which is used to store indicator attribute data corresponding to at least one preset indicator identifier; a query statement acquisition module 121, which is specifically used to: obtain the indicator attribute data corresponding to the query indicator identifier from the meta-information management module 221, and generate an indicator query statement based on the indicator attribute data.

[0045] Specifically, the indicator attribute data is used to characterize the attribute information related to the indicator data. In a specific embodiment, the indicator attribute data includes indicator material data, indicator operation data, attribute restriction data, and query storage path, wherein the indicator material data characterizes the indicator object field corresponding to the query indicator identifier, the indicator operation data characterizes the operator for executing the query operation, the attribute restriction data characterizes the attribute filtering range corresponding to the query indicator identifier, and the query storage path characterizes the storage path of the data list corresponding to the query indicator identifier in the data warehouse layer 130.

[0046] For example, assuming that the query indicator is identified as "the number of valid parent orders under the self-operated model that exclude health business and perform double recording", the indicator material data is "parent order number pOrderid", the indicator operation data is "count distinct", and the attribute restriction data includes "business model-self-operated model, whether to exclude health business-yes, whether to perform double recording-yes, whether it is a valid order-yes", and exemplarily, the attribute restriction data can also be expressed in logical language as [model='owner', filterHealth=1, doubleType=1, isValid=1], and the query storage path can be expressed as "maket1->app->hive->retail_standard_data_table".

[0047] Specifically, a query statement generation tool is used to generate an indicator query statement based on the indicator attribute data. Exemplarily, when the language type used by the indicator query statement is SQL language, the query statement generation tool includes but is not limited to SQL generator, ORM framework tool or SQL Studio database management tool, etc., and the query statement generation tool used is not limited here.

[0048] like Figure 2 As shown, the indicator query device 120 also includes: an indicator management module 222, which is used to: in response to detecting an indicator creation request sent by the business object 111, display a preset indicator creation interface to the business object 111; receive the preset indicator identifier and indicator attribute data corresponding to the preset indicator identifier sent by the user based on the indicator creation interface sent by the business object 111; and store the preset indicator identifier and the indicator attribute data correspondingly in the meta-information management module 221.

[0049] Specifically, the indicator creation interface includes an indicator identification control and an indicator attribute control, and exemplary control types include but are not limited to text, drop-down boxes, check boxes, radio buttons, and entry controls, etc. The indicator creation interface can be used to prompt the user to enter indicator information.

[0050] In a specific implementation embodiment, the indicator management module 222 is also used to: in response to detecting an indicator modification request sent by the business object 111, based on the modified indicator identifier in the indicator modification request, obtain the indicator attribute data corresponding to the modified indicator identifier from the meta-information management module 221; fill the indicator attribute data into a pre-set indicator creation interface, and display the filled indicator creation interface to the business object 111; obtain the modified parameter data sent by the business object 111 and input by the user based on the filled indicator creation interface, and synchronize the modified parameter data to the meta-information management module 221; wherein the modified parameter data includes the modified indicator identifier and / or modified indicator attribute data.

[0051] The advantage of this setting is that each business object 111 can create and modify the preset indicator identifiers and indicator attribute data maintained in the indicator query device 120 without the need for cross-object communication and synchronization, further reducing the maintenance cost of the indicator query system 100 and further ensuring the confidence of the indicator data.

[0052] In a specific embodiment, the query statement acquisition module 121 is also used to: after generating an indicator query statement based on the indicator attribute data, use a statement optimizer to perform a statement optimization operation on the indicator query statement to obtain an optimized indicator query statement; wherein, when there are multiple query indicator identifiers in the indicator query request, the statement optimization operation includes a query merge operation and / or a paging sort optimization operation, and when the indicator attribute data also includes query dimension data and associated dimension data, the statement optimization operation also includes a predicate push-down operation, the query dimension data represents the data filtering dimension corresponding to the query indicator identifier, and the associated dimension data represents the dimension data in the query dimension data used to associate with another data list.

[0053] Specifically, the query merge operation is used to represent the merge operation performed on the indicator query statements corresponding to multiple query indicator identifiers to obtain the merged indicator query statement. For example, assuming that the query storage paths corresponding to the query indicator identifier m1 and the query indicator identifier m2 are the same, the indicator query statement corresponding to the query indicator identifier m1 is selectm1 from tb1, and the indicator query statement corresponding to the query indicator identifier m2 is select m2 from tb1. The indicator query statement after the query merge operation is select m1, m2 from tb1.

[0054] Specifically, the paging sorting optimization operation is used to characterize the use of the indicator data corresponding to the main indicator query statement in multiple indicator query statements as the attribute restriction data for executing query operations with other indicator query statements. For example, the query indicators in the indicator query request include 20 indicators such as the total tax amount, population, number of households, number of properties, and number of cars owned by the top ten provinces in terms of total tax amount. The indicator query statement corresponding to the total tax amount is used as the main indicator query statement, and the query operation corresponding to the indicator query request will be optimized into two steps: the first step is to execute the main indicator query statement separately to obtain the total tax amount of the top ten provinces, and the second step is to use the top ten provinces obtained in the first step as the attribute restriction data in the indicator query statement for each of the remaining indicator query statements to obtain the optimized indicator query statement.

[0055] Specifically, the associated dimension data is used to represent that a dimension in the data list where the query index is located is associated with another data list. For example, data list A contains the order time, mobile phone number and order number, and data list B contains the mobile phone number, owner's name, owner's gender and owner's age, then "mobile phone number" is the associated dimension data of the associated data list.

[0056] Specifically, the predicate push-down operation represents limiting the query dimension values ​​of other dimension fields in the query dimension data except the associated dimension field to another data list associated with the associated dimension field. For example, assuming that query indicator A needs to use the associated dimension field 1 in the data list to associate with another data list, and there are other dimension fields in the other data list, this query operation will further push down the restriction conditions of other dimension fields to the other data list to narrow the query scope.

[0057] It should be noted that the embodiments of the present invention only provide an exemplary description of statement optimization operations and do not limit the statement optimization operations that can be taken by the statement optimizer. It is easy to understand that other achievable statement optimization operations are within the protection scope of this solution.

[0058] like Figure 2 As shown, in a specific embodiment, the data warehouse layer 130 includes at least two storage media 231, and the indicator attribute data also includes the storage medium type.

[0059] Specifically, the data warehouse layer 130 uses different storage media 231 to store raw business data and / or structured business data. Exemplarily, the storage medium types include but are not limited to hive type, Hbase type, Excel type, clickhouse type, etc. The storage medium type of each storage medium 231 in the data warehouse layer 130 is not limited here.

[0060] In a specific embodiment, the query statement acquisition module 121 is specifically used to: generate a reference query statement based on the indicator material data, indicator operation data, attribute restriction data and query storage path in the indicator attribute data; and use a conversion tool corresponding to the storage medium type in the indicator attribute data to convert the reference query statement into an indicator query statement.

[0061] Exemplarily, the conversion tool may be an adapter pattern, which represents a technical means of adapting an interface of a class to an expected interface. The conversion tool used is not limited here.

[0062] The advantage of such a setting is that when the query statement execution module 122 executes a query operation based on an indicator query statement, the storage medium 231 corresponding to the query indicator identifier in the data warehouse layer 130 supports the execution of the indicator query statement, thereby ensuring the compatibility of the indicator query statement with the data warehouse layer 130.

[0063] In another specific embodiment, the query statement execution module 122 is specifically used for: a query statement executor corresponding to the storage medium type in the indicator attribute data, using the query statement executor, based on the indicator query statement, to execute a query operation on the data warehouse layer 130 to obtain the indicator data.

[0064] Specifically, a query statement executor corresponding to the storage medium type is obtained from the query manager, and the query statement executor calls the corresponding storage medium 231 to execute the index query statement. The storage medium 231 provides an access method for query index data, and the query statement executor uses the query data returned by the storage medium 231 as the index data. The query manager includes a query statement executor corresponding to at least one storage medium type.

[0065] The advantage of such a setting is that the compatibility of the index query statement with the data warehouse layer 130 is ensured.

[0066] On the basis of the above embodiment, specifically, when the number of query indicator identifiers in the indicator query request is multiple, and the storage medium types corresponding to the query indicator identifiers are different, the query statement execution module 122 is also used to: send each indicator query statement to the corresponding query statement executor based on the media type priority. Among them, the media type priority represents the priority order corresponding to each storage medium type.

[0067] The advantage of this setting is that it optimizes the query order of indicator data from the perspective of media type priority and improves the query efficiency of indicator data.

[0068] The technical solution of this embodiment is to set a meta-information management module in the indicator query device to store indicator attribute data corresponding to at least one preset indicator identifier, and a query statement acquisition module, which is specifically used to: obtain the indicator attribute data corresponding to the query indicator identifier from the meta-information management module, and generate an indicator query statement based on the indicator attribute data, thereby solving the problem that the indicator query language needs to be manually developed by developers with language development background, and reducing the development cost and maintenance complexity of the indicator query statement.

[0069] Figure 3 This is a schematic diagram of the structure of another indicator query system provided by an embodiment of the present invention. This embodiment further refines the indicator query device 120 in the above embodiment.

[0070] like Figure 3As shown, the indicator query device 120 also includes: an indicator query input module 321, which is used to display a pre-set query parameter interface to the business object 111 in response to detecting a query trigger request sent by the business object 111; the business object 111 is also used to: obtain query parameter data input by the user based on the query parameter interface, and generate an indicator query request based on the query parameter data and the object identity identifier; wherein the query parameter data includes a query indicator identifier.

[0071] In this embodiment, the query parameter interface includes an indicator identification control. Exemplarily, the types of the indicator identification control include but are not limited to text, drop-down boxes, check boxes, radio buttons, etc. The control type is not limited here.

[0072] In a specific embodiment, the query parameter data also includes query dimension data, and the query statement acquisition module 121 is specifically used to: generate an indicator query statement based on the indicator attribute data and the query dimension data in the query parameter data; wherein the query dimension data represents the data filtering dimension corresponding to the query indicator identifier.

[0073] Exemplarily, the query dimension data includes but is not limited to time, department, commodity category, brand, etc. The query dimension data is not limited here, and the business object 111 can be customized according to actual needs.

[0074] The advantage of such a setting is that it enriches the diversity of the screening conditions of the indicator data, thereby improving the accuracy of the index data obtained by screening.

[0075] In a specific embodiment, the query parameter data also includes data processing parameters corresponding to the query indicator identifier, and the indicator query device 120 also includes: an indicator data processing module, which is used to obtain the data processing parameters in the indicator query request before sending the indicator data to the business object 111 corresponding to the object identity identifier in the indicator query request; based on the data processing parameters, performing data processing operations on the indicator data to obtain the indicator data after data processing; wherein the data processing parameters include at least one of sorting parameters, indicator alias, maximum query quantity, data starting position and aggregation parameters.

[0076] In a specific embodiment, the query parameter interface includes an indicator identification control, a query dimension control, and a processing parameter control. Exemplarily, the control types include but are not limited to text, a drop-down box, a check box, and a radio button, etc., and the control types are not limited here.

[0077] In another specific embodiment, the query parameter interface provides a compilation control of a DSL language (Domain Specific Language). Accordingly, the query parameter data is a DSL statement input by the user, and the indicator query system 100 also includes a syntax parsing module for performing a parsing operation on the DSL statement in the indicator query request sent by the business object 111 to obtain a query indicator identifier, query dimension data, and data processing parameters.

[0078] Specifically, the language structure of the DSL language includes a header function and a body function. The header function includes an authorization key appkey and a call request identifier uuid, the parameter value of the authorization key appkey is the object identity identifier, and the parameter value of the call request identifier uuid is the unique identifier corresponding to the indicator query request.

[0079] The body function includes the query indicator list indicators, the query dimension list attributes and the query scenario criteria. The parameter of the query indicator list indicators is at least one query indicator identifier, the query dimension list attributes includes the query dimension identifiers in the query dimension data corresponding to each query indicator identifier, and the query scenario criteria includes the sub-parameter query dimension value criteria, sorting orders, indicator alias aliass, maximum query number maxResults, data starting position firstResult and aggregation parameter group.

[0080] The parameter value of sorting orders includes ascending and sorting property name propertyName. The indicator alias alias is used to represent the use of a simple identifier to replace the query indicator identifier to rename the query indicator identifier in the queried indicator data to improve the simplicity and readability of the indicator data. Specifically, the indicator alias alias includes the indicator alias aliasName and the query indicator identifier name.

[0081] Among them, the maximum query number maxResults is used to represent the data volume of the indicator data sent to the business object 111. When the data volume of the queried indicator data is greater than the maximum query number maxResult s, the first maxResults indicator data are taken as the indicator data after data processing. The data starting position firstResult is used to represent that the indicator data starting from the firstResult and later in the queried indicator data are used as the indicator data after data processing. The aggregation dimension representation is based on the query dimension data, and the aggregation operation is performed on the queried indicator data based on the aggregation dimension to obtain the indicator data after data processing. For example, the tax amount of each province is obtained according to the province, and the province here is the aggregation dimension; the number of students in the class is queried according to gender, and the gender here is the aggregation dimension.

[0082] The advantage of such a setting is that the business object 111 can further perform data processing operations on the queried indicator data based on the query results, so that the acquired indicator data is more in line with actual business needs, thereby improving the flexibility and configurability of indicator query.

[0083] The technical solution of this embodiment is to set an indicator query input module in the indicator query device, which is used to display a pre-set query parameter interface to the business object in response to detecting a query trigger request sent by the business object. The business object is also used to: obtain query parameter data input by the user based on the query parameter interface, and generate an indicator query request based on the query parameter data and the object identity identifier; wherein the query parameter data includes a query indicator identifier, which solves the problem of inflexible generation method of indicator query statements, so that the business object can customize the indicator query statement generated by the indicator query device and the indicator data sent by the indicator query device at the business end, further reducing the maintenance complexity of the indicator query statement and the threshold of indicator query, and further improving the flexibility of the query configuration of the indicator data.

[0084] Figure 4 This is a schematic diagram of a specific example of an indicator query system provided by an embodiment of the present invention. Specifically, Figure 4 The business layer 110 shown includes a BI tool platform, business departments, and a data analysis platform, and the data warehouse layer 130 includes hive media, Hbase media, Excel media, and clickhouse media.

[0085] Figure 4 The "DSL language" in the embodiment of the present invention corresponds to the indicator query input module 321, Figure 4 The syntax parsing module in is used to perform parsing operations on the obtained DSL statements to obtain query indicator identifiers, query dimension data and data processing parameters. Figure 4 The “query statement generation and execution engine” in the embodiment of the present invention corresponds to the query statement acquisition module 121, the query statement execution module 122 and the indicator data processing module. Specifically, Figure 4 The “SQL generation and optimization” in the embodiment of the present invention corresponds to the query statement acquisition module 121. Figure 4 The “SQL execution” corresponds to the query statement execution module 122 in the embodiment of the present invention, and the “data processing” corresponds to the indicator data processing module in the embodiment of the present invention.

[0086] Figure 5 A flowchart of an indicator query method provided for an embodiment of the present invention. This embodiment can be applied to the situation of querying indicator data in business data in the data warehouse layer. The method can be executed by an indicator query device. The indicator query device can be implemented in the form of hardware and / or software. The indicator query device can be configured in the indicator query system provided in the above embodiment.

[0087] like Figure 5 As shown, the method includes:

[0088] S410: In response to receiving an indicator query request sent by a business object, determine an indicator query statement based on a query indicator identifier in the indicator query request.

[0089] In this embodiment, the indicator query request is generated by the business object based on the object identity and the query indicator identifier. The query indicator identifier is used to uniquely identify the queried indicator data. Exemplarily, the query indicator identifier can be composed of at least one character such as text, uppercase letters, lowercase letters, numbers and special characters. The specific character composition of the query indicator identifier is not limited here.

[0090] In a specific embodiment, the method also includes: in response to detecting a query trigger request sent by a business object, presenting a pre-set query parameter interface to the business object, so that the business object generates an indicator query request based on the object identity and the query parameter data input by the user based on the query parameter interface; wherein the query parameter data includes a query indicator identifier.

[0091] In a specific embodiment, determining the indicator query statement based on the query indicator identifier in the indicator query request includes: obtaining the indicator query statement corresponding to the query indicator identifier from a query statement management module. The query statement management module stores at least one indicator query statement corresponding to each preset indicator identifier.

[0092] Among them, exemplarily, the language type adopted by the indicator query statement includes but is not limited to SQL language (Structured Query Language), HQL language (Hibernate Query Language, object-oriented query language), JPA language (Java Persistence Query Language, Java persistence query language) or CQL language (Common Query Language, common query language), etc., and the language type adopted by the indicator query statement is not limited here.

[0093] In another specific embodiment, determining the indicator query statement based on the query indicator identifier in the indicator query request includes: acquiring indicator attribute data corresponding to the query indicator identifier from a meta-information management module, and generating the indicator query statement based on the indicator attribute data. The meta-information management module stores indicator attribute data corresponding to at least one preset indicator identifier.

[0094] In a specific embodiment, the indicator attribute data includes indicator material data, indicator operation data, attribute restriction data and query storage path, wherein the indicator material data represents the indicator object field corresponding to the query indicator identifier, the indicator operation data represents the operator that executes the query operation, the attribute restriction data represents the attribute filtering range corresponding to the query indicator identifier, and the query storage path represents the storage path of the data list corresponding to the query indicator identifier in the data warehouse layer.

[0095] Specifically, a query statement generation tool is used to generate an indicator query statement based on the indicator attribute data. Exemplarily, when the language type used by the indicator query statement is SQL language, the query statement generation tool includes but is not limited to SQL generator, ORM framework tool or SQL Studio database management tool, etc., and the query statement generation tool used is not limited here.

[0096] In a specific embodiment, the query parameter data also includes query dimension data, and an indicator query statement is generated based on the indicator attribute data, including: generating an indicator query statement based on the indicator attribute data and the query dimension data in the query parameter data; wherein the query dimension data represents the data filtering dimension corresponding to the query indicator identifier.

[0097] On the basis of the above embodiments, specifically, the method also includes: after generating an indicator query statement based on the indicator attribute data, using a statement optimizer to perform a statement optimization operation on the indicator query statement to obtain an optimized indicator query statement; wherein, when there are multiple query indicator identifiers in the indicator query request, the statement optimization operation includes a query merge operation and / or a paging sort optimization operation, and when the indicator attribute data also includes query dimension data and associated dimension data, the statement optimization operation also includes a predicate push-down operation, the query dimension data represents the data filtering dimension corresponding to the query indicator identifier, and the associated dimension data represents the dimension data in the query dimension data used to associate with another data list.

[0098] The advantage of this setting is that it can solve the problem that the indicator query language needs to be manually developed by developers with language development background, thereby reducing the development cost and maintenance complexity of the indicator query statement.

[0099] Based on the above embodiment, the method also includes: in response to detecting an indicator creation request sent by a business object, displaying a preset indicator creation interface to the business object; receiving a preset indicator identifier input by a user based on the indicator creation interface and indicator attribute data corresponding to the preset indicator identifier sent by the business object; and storing the preset indicator identifier and the indicator attribute data correspondingly in the meta-information management module.

[0100] In a specific embodiment, the data warehouse layer includes at least two storage media, the indicator attribute data also includes the storage medium type, and an indicator query statement is generated based on the indicator attribute data, including: generating a reference query statement based on the indicator material data, indicator operation data, attribute restriction data and query storage path in the indicator attribute data; and using a conversion tool corresponding to the storage medium type in the indicator attribute data to convert the reference query statement into an indicator query statement.

[0101] S420. Use the index query statement to perform a query operation on the data warehouse layer to obtain the index data.

[0102] In a specific embodiment, the data warehouse layer includes at least two storage media, the indicator attribute data also includes the storage medium type, and the indicator query statement is used to execute a query operation on the data warehouse layer to obtain the indicator data, including: obtaining a query statement executor corresponding to the storage medium type in the indicator attribute data, and using the query statement executor to execute a query operation on the data warehouse layer based on the indicator query statement to obtain the indicator data.

[0103] S430: Send the indicator data to the business object corresponding to the object identity in the indicator query request.

[0104] Among them, the object identity identifier is used to uniquely identify the business object in the indicator query system. The object identity identifier can be composed of at least one character such as text, uppercase letters, lowercase letters, numbers and special characters. The specific character composition of the object identity identifier is not limited here.

[0105] In a specific embodiment, the query parameter data also includes data processing parameters corresponding to the query indicator identifier, and the method also includes: before sending the indicator data to the business object corresponding to the object identifier in the indicator query request, obtaining the data processing parameters in the indicator query request; based on the data processing parameters, performing data processing operations on the indicator data to obtain the indicator data after data processing; wherein the data processing parameters include at least one of sorting parameters, indicator aliases, maximum query quantities, data starting positions, and aggregation parameters.

[0106] The technical solution of this embodiment receives indicator query requests respectively sent by at least two business objects in the indicator query system, determines the indicator query statement for each indicator query request based on the query indicator identifier in the indicator query request, uses the indicator query statement to perform a query operation on the data warehouse layer to obtain indicator data, and sends the indicator data to the business object corresponding to the object identity identifier in the indicator query request, thereby solving the problem of the same indicator query statement being repeatedly implemented in multiple indicator query devices, which not only reduces the development cost and storage cost of the indicator query statement, but also ensures the confidence of the indicator data.

[0107] Figure 6 A schematic diagram of the structure of an electronic device provided for one embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0108] like Figure 6As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0109] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0110] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the index query method provided in the above embodiment.

[0111] In some embodiments, the indicator query method provided in the above embodiments may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps in the indicator query method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the indicator query method in any other appropriate manner (e.g., by means of firmware).

[0112] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0113] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0114] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0115] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0116] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0117] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0118] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0119] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. An indicator query system, characterized in that: include: A business layer, a data warehouse layer and an indicator query device, wherein the business layer includes at least two business objects, and the indicator query device includes: a query statement acquisition module, a query statement execution module and an indicator data sending module; Wherein, the business object is used to send the indicator query request to the indicator query device; The query statement acquisition module is used to determine the indicator query statement based on the query indicator identifier in the indicator query request in response to receiving the indicator query request; The query statement execution module is used to use the indicator query statement to execute a query operation on the data warehouse layer to obtain indicator data; The indicator data sending module is used to send the indicator data to the business object corresponding to the object identity in the indicator query request.

2. The system according to claim 1, characterized in that The indicator query device further includes: a meta-information management module for storing indicator attribute data corresponding to at least one preset indicator identifier; The query statement acquisition module is specifically used to: acquire the indicator attribute data corresponding to the query indicator identifier from the meta-information management module, and generate an indicator query statement based on the indicator attribute data.

3. The system according to claim 2, characterized in that The indicator attribute data includes indicator material data, indicator operation data, attribute restriction data and query storage path, wherein the indicator material data represents the indicator object field corresponding to the query indicator identifier, the indicator operation data represents the operator that executes the query operation, the attribute restriction data represents the attribute filtering range corresponding to the query indicator identifier, and the query storage path represents the storage path of the data list corresponding to the query indicator identifier in the data warehouse layer.

4. The system according to claim 3, characterized in that The query statement acquisition module is also used to: After generating an indicator query statement based on the indicator attribute data, using a statement optimizer to perform a statement optimization operation on the indicator query statement to obtain an optimized indicator query statement; Among them, when there are multiple query indicator identifiers in the indicator query request, the statement optimization operation includes a query merge operation and / or a paging sort optimization operation; when the indicator attribute data also includes query dimension data and associated dimension data, the statement optimization operation also includes a predicate push-down operation, the query dimension data represents the data filtering dimension corresponding to the query indicator identifier, and the associated dimension data represents the dimension data in the query dimension data used to associate with another data list.

5. The system according to claim 3, characterized in that The data warehouse layer includes at least two storage media, the indicator attribute data also includes the storage medium type, and the query statement acquisition module is specifically used to: Generate a reference query statement based on the indicator material data, indicator operation data, attribute restriction data and query storage path in the indicator attribute data; The reference query statement is converted into an indicator query statement using a conversion tool corresponding to the storage medium type in the indicator attribute data.

6. The system according to claim 3, characterized in that The data warehouse layer includes at least two storage media, the indicator attribute data also includes the storage medium type, and the query statement execution module is specifically used to: Obtaining a query statement executor corresponding to the storage medium type in the indicator attribute data, The query statement executor is used to execute a query operation on the data warehouse layer based on the indicator query statement to obtain indicator data.

7. The system according to claim 2, characterized in that The indicator query device further includes an indicator management module, which is used to: In response to detecting the indicator creation request sent by the business object, presenting a preset indicator creation interface to the business object; Receiving a preset indicator identifier input by a user based on the indicator creation interface and indicator attribute data corresponding to the preset indicator identifier, which is sent by the business object; The preset indicator identifier and the indicator attribute data are stored in the meta-information management module correspondingly.

8. The system according to claim 2, characterized in that The indicator query device further comprises: an indicator query input module, which is used to display a preset query parameter interface to the business object in response to detecting a query trigger request sent by the business object; The business object is also used to: obtain query parameter data input by the user based on the query parameter interface, and generate an indicator query request based on the query parameter data and the object identity identifier; wherein the query parameter data includes a query indicator identifier.

9. The system according to claim 8, characterized in that The query parameter data also includes data processing parameters corresponding to the query indicator identifier, and the indicator query device also includes: An indicator data processing module, used for obtaining data processing parameters in the indicator query request before sending the indicator data to the business object corresponding to the object identity identifier in the indicator query request; Based on the data processing parameters, performing a data processing operation on the indicator data to obtain the indicator data after data processing; The data processing parameters include at least one of a sorting parameter, an indicator alias, a maximum query quantity, a data starting position and an aggregation parameter.

10. The system according to claim 8, characterized in that The query parameter data also includes query dimension data, and the query statement acquisition module is specifically used to: An indicator query statement is generated based on the indicator attribute data and the query dimension data in the query parameter data; wherein the query dimension data represents the data filtering dimension corresponding to the query indicator identifier.

11. An indicator query method, characterized in that: The indicator query system applied to any one of claims 1 to 9 comprises: In response to receiving an indicator query request sent by a business object, determining an indicator query statement based on a query indicator identifier in the indicator query request; Using the index query statement, a query operation is performed on the data warehouse layer to obtain index data; The indicator data is sent to the business object corresponding to the object identity in the indicator query request.

12. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the indicator query method described in claim 11.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the indicator query method described in claim 11 when executed.

Citation Information

Patent Citations

  • Business data processing method, device, equipment and system

    CN113535804A

  • Method and device for generating data report

    CN114090608A

  • Generating an index for a table in a database background

    US20160147751A1

  • Data query method and apparatus, and electronic device

    WO2020029154A1

  • Data processing method and apparatus

    WO2023029592A1

Cited By

  • Data query method for large language model, computing device and storage medium

    CN122614884A