Index query method and device, equipment and storage medium
By splitting composite indicators into atomic indicators and generating structured query statements, the complexity and limitations of data table queries in the existing technology are solved, efficient queries among multiple data tables are realized, the query scope is expanded and the query efficiency is improved. efficiency.
Patent Information
- Application Number
- CN202410861278.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-18
AI Technical Summary
In the existing technology, when querying indicators in multiple data tables, it is complex and limited to the same data view. It is impossible to query indicators other than the data view, resulting in a small query range and complex operations.
Split the composite indicator into multiple atomic indicators, and generate structured query statements. Use these statements to query the atomic indicator values in different data tables, and support the query of any data table in the same batch.
It reduces the complexity of query operations, improves query efficiency and scope, avoids the need for users to perform secondary calculations, and improves the convenience and ability of indicator queries.
Smart Images

Figure CN118796865A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data analysis technology, and in particular to an indicator query method, device, equipment and storage medium. Background Art
[0002] Data analysis is a process of processing a large amount of collected data through appropriate statistical and analytical methods to extract useful information, form conclusions and assist in decision-making. Data analysis is widely used in various fields, such as games, marketing, finance, medical care and retail. In data analysis work, the sources of data are varied. In database management, different types of data are generally recorded in different data tables, so that data indicators can be queried in each data table.
[0003] In the prior art, when querying indicators in various data tables, the associated data tables are determined according to the indicators to be queried, and data views are created according to the associated data tables, and the indicators are queried through the data views. Since this query method is for a single data view, the indicators in the same batch of queries must be in the same data view, otherwise the data view must be regenerated, and the query operation is relatively complicated. Since this query method does not support querying indicators outside the data view, the query scope is small. Summary of the invention
[0004] The present application provides an indicator query method, device, equipment and storage medium to split a composite indicator into multiple atomic indicators, generate a corresponding structured query statement according to each atomic indicator, perform indicator query in different data tables through the structured query statement, support query of any data table in the same batch, solve the problem in the prior art that the indicators queried in the same batch need to be in the same data view and the indicators outside the data view cannot be queried, reduce the complexity of the query operation, improve the query efficiency and expand the query scope.
[0005] In a first aspect, the present application provides an indicator query method, comprising:
[0006] Parsing the indicator query request to obtain the composite indicator and the atomic indicator in the indicator query request;
[0007] Splitting the composite indicator into multiple atomic indicators and operation formulas, and decomposing each of the atomic indicators to obtain a data table name, aggregation operation, and data field corresponding to each of the atomic indicators;
[0008] Grouping the atomic indicators according to the data table names, aggregation operations and data fields corresponding to the atomic indicators to obtain a plurality of indicator groups, wherein the atomic indicators included in the indicator groups have the same data table names, aggregation operations and data fields;
[0009] Generate a corresponding structured query statement according to the data table name, aggregation operation and data field corresponding to each of the indicator groups, and query the indicator value of the corresponding atomic indicator in the data table corresponding to the data table name of each of the indicator groups through the structured query statement;
[0010] The index value of the atomic index obtained by decomposing the composite index is calculated according to the calculation formula to obtain the index value of the composite index.
[0011] In a second aspect, the present application provides an indicator query device, comprising:
[0012] An indicator parsing module is configured to parse the indicator query request to obtain the composite indicator and the atomic indicator in the indicator query request;
[0013] An indicator decomposition module is configured to decompose the composite indicator into multiple atomic indicators and operation formulas, and decompose each of the atomic indicators to obtain a data table name, aggregation operation and data field corresponding to each of the atomic indicators;
[0014] An indicator grouping module is configured to group each of the atomic indicators according to the data table name, aggregation operation and data field corresponding to each of the atomic indicators to obtain a plurality of indicator groups, wherein the data table name, aggregation operation and data field of the atomic indicators included in the indicator group are the same;
[0015] An indicator query module is configured to generate a corresponding structured query statement according to the data table name, aggregation operation and data field corresponding to each of the indicator groups, and query the indicator value of the corresponding atomic indicator in the data table corresponding to the data table name of each of the indicator groups through the structured query statement;
[0016] The index compound module is configured to calculate the index value of the atomic index obtained by decomposing the composite index according to the calculation formula to obtain the index value of the composite index.
[0017] In a third aspect, the present application provides an indicator query device, including:
[0018] one or more processors;
[0019] A memory stores one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the indicator query method as described in the first aspect.
[0020] In a fourth aspect, the present application provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the indicator query method as described in the first aspect.
[0021] In this application, the composite index and atomic index in the index query request are obtained by parsing the index query request; the composite index is split into multiple atomic indexes and operation formulas, and each atomic index is disassembled to obtain the data table name, aggregation operation and data field corresponding to each atomic index; each atomic index is grouped according to the data table name, aggregation operation and data field corresponding to each atomic index to obtain multiple index groups, wherein the data table name, aggregation operation and data field of the atomic index contained in the index group are the same; the corresponding structured query statement is generated according to the data table name, aggregation operation and data field corresponding to each index group, and the index value of the corresponding atomic index is queried in the data table corresponding to the data table name of each index group through the structured query statement; the index value of the atomic index obtained by disassembling the composite index is calculated according to the operation formula to obtain the index value of the composite index. Through the above technical means, the composite index can be split into multiple atomic indexes and operation methods, and the atomic index obtained by the corresponding splitting of the composite index is calculated based on the operation method to obtain the index value of the composite index, without the user having to perform secondary calculations on the obtained index value, which effectively improves the convenience and ability of index query. Multiple atomic indicators are divided into indicator groups, and the indicator values of each atomic indicator in the indicator group can be queried through the structured query statements generated by the indicator groups, which effectively improves the efficiency of indicator query. Indicator queries are performed in different data tables through structured query statements of each indicator group, supporting queries on any data table in the same batch, solving the problem in the prior art that indicators in the same batch of queries must be in the same data view and indicators outside the data view cannot be queried, reducing the complexity of query operations, improving query efficiency, and expanding the query scope. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flow chart of an indicator query method provided by an embodiment of the present application;
[0023] Figure 2 is a flow chart for determining the dimension of an atomic indicator provided in an embodiment of the present application;
[0024] Figure 3 is a flow chart of determining screening conditions for atomic indicators provided in an embodiment of the present application;
[0025] Figure 4 It is a flowchart of performing a joint table according to the data table name and screening conditions corresponding to the indicator group provided in the embodiment of the present application;
[0026] Figure 5 It is a flow chart for parsing special screening conditions provided in an embodiment of the present application;
[0027] Figure 6 It is a structural diagram of an indicator query device provided in an embodiment of the present application;
[0028] Figure 7 It is a structural diagram of an indicator query device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0030] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0031] In the more common existing implementation methods, when querying indicators in various data tables, the associated data tables are determined according to the indicators to be queried, and data views are created based on the associated data tables, and indicators are queried through the data views. Since this query method targets a single data view, the indicators in the same batch of queries must be in the same data view. Otherwise, the data view must be regenerated, and the query operation is more complicated. Since this query method does not support querying indicators outside the data view, the query scope is small.
[0032] To solve the above problems, this embodiment provides an indicator query method to split a composite indicator into multiple atomic indicators, generate a corresponding structured query statement according to each atomic indicator, and perform indicator query in different data tables through structured query statements. It supports querying any data table in the same batch, reduces the complexity of query operations, improves query efficiency and expands the query scope.
[0033] The indicator query method provided in this embodiment can be executed by an indicator query device, which can be implemented by software and / or hardware. The indicator query device can be composed of two or more physical entities, or it can be composed of one physical entity. For example, the indicator query device can be a server that manages various data. Indicator query can be applied in various fields, such as games, e-commerce and other fields. This embodiment describes the indicator query of game data as an example. Game data includes data generated by users performing various actions in game applications, such as recharge and login, and data generated by users performing various actions on game advertisements or links in third-party applications that promote game applications, such as likes or clicks.
[0034] The indicator query device is installed with at least one type of operating system, wherein the operating system includes but is not limited to Android system, Linux system and Windows system. The indicator query device can install at least one application based on the operating system, and the application can be an application that comes with the operating system or an application downloaded from a third-party device or server. In this embodiment, the indicator query device has at least an application that can execute the indicator query method.
[0035] For ease of understanding, this embodiment is described by taking a server as the main body of the execution indicator query method as an example.
[0036] Figure 1 A flowchart of an indicator query method provided by an embodiment of the present application is given. Figure 1 , the indicator query method specifically includes:
[0037] S110. Parse the indicator query request to obtain the composite indicator and atomic indicator in the indicator query request.
[0038] Among them, the indicator query request is an instruction to request the server to query the indicator. For example, the developer can write the indicator query request according to the table name, aggregation operation and data field of the data table where the indicator to be queried is located, and send the indicator query request to the server so that the server can perform the indicator query based on the received indicator query request. Alternatively, the server provides a front-end platform, and the business personnel can configure the table name, aggregation operation and data field of the data table where the indicator to be queried is located on the front-end platform. The front-end platform generates the indicator query request according to the configured table name, aggregation operation and data field.
[0039] The indicators to be queried include atomic indicators and composite indicators. Atomic indicators are indicators of single data, such as recharge amount and number of user logins. Composite indicators are indicators obtained by performing four arithmetic operations on atomic indicators, such as net recharge amount and average recharge amount. Net recharge amount is equal to the difference between recharge amount and refund amount, and average recharge amount is equal to the ratio of recharge amount to the number of recharge users. Atomic indicators include the table name, aggregation operation and data field of the data table where they are located. Composite indicators include multiple atomic indicators and operation symbols. When receiving an indicator query request, the server can determine the indicator containing the operation symbol as a composite indicator, and determine the indicator without the operation symbol as a composite indicator.
[0040] In this embodiment, the core json part of the indicator query request is:
[0041] {
[0042] "dims":"{\"tj_day\":\"tj_day\"}",
[0043] "metas":"
[0044] \"ps-pay_money\":\"ps-pay_money\",
[0045] \"l-cd-account\":\"l-cd-account\"
[0046] \"ps-pay_money^pdi-s-pay_money\":\"ps-pay_money^pdi-s-pay_money\"
[0047] }",
[0048] "filters":"{\"end_date\":\"2023-02-24\",\"start_date\":\"2023-02-24\"}"
[0049] }
[0050] Among them, dims defines the global dimension of the indicator to be queried in the indicator query request, metas defines the indicator to be queried in the indicator query request, and filters defines the global filtering conditions of the indicator to be queried in the indicator query request. When the server parses the code of the metas part in the above indicator query request, it can be determined that ps-pay_money and l-cd-account are atomic indicators, and ps-pay_money^pdi-s-pay_money is a composite indicator. The first character in the atomic indicator indicates the data table name of the data table where it is located, the second character indicates the corresponding aggregation operation, that is, the atomic indicator is mapped by which aggregation calculation method, and the third character indicates the data field corresponding to the atomic indicator, that is, the data value queried by the atomic indicator. The characters in the atomic indicator are separated by "-". For example, the first letter p in the atomic indicator "ps-pay_money" is the first character, which indicates that the atomic indicator is stored in the data table with the table name p. Generally, when p is the first character, it corresponds to the recharge table. The second letter s in the atomic indicator "ps-pay_money" is the second character, which is the abbreviation of sum, indicating that the atomic indicator is obtained by accumulation. The pay_money in the atomic indicator "ps-pay_money" is the third character, which corresponds to the data field where the recharge amount is located. The indicator value corresponding to the query of the atomic indicator "ps-pay_money" is the total recharge amount in the recharge table. It should be noted that the core part json of the above indicator query request is an exemplary description, and not every core part of the indicator query request includes the three parts of global dimensions, indicators to be queried and global filtering conditions. For example, when the user does not configure the global dimensions and global filtering conditions of the indicators to be queried, the indicator query request does not include the global dimensions and global filtering conditions, but only includes the indicators to be queried. Correspondingly, only the indicators to be queried will be parsed during parsing. In addition, the form of these three parts is not limited to the above form. The data table name, aggregation operation and data field corresponding to the atomic indicator are set by business needs and are not specifically limited here.
[0051] From the above content, it can be seen that when the developer writes the global dimension of the indicator to be queried in the indicator query request, or the business personnel add the global dimension of the indicator to be queried when configuring the indicator query request on the front-end platform, the server will parse the indicator query request to obtain the global dimension in the indicator query request when parsing the indicator query request to obtain the composite indicator and atomic indicator in the indicator query request. Among them, the global dimension limits the dimension of each indicator to be queried in the corresponding indicator query request, and the global dimension includes the time dimension, game dimension, region dimension, role dimension, etc. The dims in the core part json defines the global dimension of the indicator to be queried in the indicator query request. When the dims part code is parsed, the global dimension in the indicator query request can be obtained. For example, when parsing "dims":"{\"tj_day\":\"tj_day\"}", it can be determined that the global dimension is one day, and combined with the atomic indicator "ps-pay_money", the recharge amount for one day is obtained. Since the global dimension limits the dimension of each indicator to be queried in the corresponding indicator query request, that is, for the two atomic indicators and compound indicators parsed from the meta part of the above core JSON, the indicator values for one day are obtained.
[0052] Similarly, when developers write global filtering conditions for the indicators to be queried in the indicator query request, or business personnel add global filtering conditions for the indicators to be queried when configuring the indicator query request on the front-end platform, the server will parse the indicator query request to obtain the global filtering conditions in the indicator query request when parsing the indicator query request to obtain the composite indicators and atomic indicators in the indicator query request. Among them, the global filtering conditions limit the filtering conditions for each indicator to be queried in the corresponding indicator query request, and the filtering conditions are the conditions for filtering the data used to count the indicators. The filters in the core part json define the global filtering conditions for the indicators to be queried in the indicator query request. When the code in the filters part is parsed, the global filtering conditions in the indicator query request can be obtained. For example, when parsing "filters":"{\"end_date\":\"2023-02-24\",\"start_date\":\"2023-02-24\"}", it can be determined that the global filter condition is the data date used for statistical indicators on February 24, 2023. Combining the global dimension "tj_day" and the atomic indicator "ps-pay_money" is to obtain the recharge amount on February 24, 2023. Since the global filter condition limits the filter condition of each indicator to be queried in the corresponding indicator query request, that is, for the two atomic indicators and compound indicators parsed from the meta part of the above core json, the indicator values on February 24, 2023 are obtained.
[0053] S120, split the composite indicator into multiple atomic indicators and operation formulas, and decompose each atomic indicator to obtain the data table name, aggregation operation and data field corresponding to each atomic indicator.
[0054] Exemplarily, since the composite index is an index obtained by performing four arithmetic operations on the basis of the atomic index, the composite index can be split into multiple atomic indexes and operation symbols, and an operation formula for calculating the composite index based on the atomic index is generated according to the multiple atomic indexes corresponding to the operation symbols, so that when the index value of the atomic index corresponding to the composite index is subsequently queried, the index value of the composite index can be obtained by substituting the index value into the operation formula. For example, the composite index "ps-pay_money^pdi-s-pay_money" can be split into the atomic indexes "ps-pay_money" and "pdi-s-pay_money" and the operation formula X^Y, where X in the operation formula is the index value of "ps-pay_money", and Y is the index value of "ps-pay_money".
[0055] After splitting the composite indicator into multiple atomic indicators, the multiple atomic indicators corresponding to the composite indicator and the atomic indicators parsed from the indicator query request are disassembled to obtain the data table name, aggregation operation and data field corresponding to each atomic indicator. When disassembling the atomic indicator, the data table name, aggregation operation and data field of the atomic indicator can be disassembled according to the separator in the atomic indicator. For example, by disassembling the atomic indicator "ps-pay_money", it can be obtained that the data table name of the atomic indicator is p, the aggregation operation is s, and the data field is pay_money.
[0056] It should be noted that the global dimension in the indicator query request is the dimension that limits each indicator to be queried in the corresponding indicator query request. If only the dimension of a certain indicator to be queried is configured, the specified dimension of the indicator to be queried can be configured in the indicator query request to limit the corresponding indicator to be queried through the specified dimension. The specified dimension provided in this embodiment is used to limit the time dimension of the indicator to be queried, that is, the specified dimension corresponding to the configuration of the indicator to be queried can correct the global time dimension in the global dimension to obtain the accurate time dimension of the indicator to be queried, thereby ensuring the accuracy of the indicator query. The other dimensions in the global dimension except the global time dimension are directly used as the dimensions of the indicator to be queried.
[0057] In this embodiment, the specified dimension, data table name, aggregation operation and data field together constitute the corresponding atomic indicator, so when the atomic indicator is disassembled, the specified dimension corresponding to the atomic indicator can be obtained, and the dimension of the atomic indicator can be determined based on the specified dimension and the global dimension. Figure 2 : is a flow chart of determining the dimension of an atomic indicator provided by an embodiment of the present application. Figure 2 As shown, the step of determining the dimension of the atomic index specifically includes S1201-S1203:
[0058] S1201. Decompose the atomic indicator to obtain the specified dimension corresponding to the atomic indicator.
[0059] Exemplarily, the last character "p" in the atomic indicator "ps-pay_money-p" represents the specified dimension of the atomic indicator. When developers write indicator query requests, they can add characters corresponding to the specified dimension to the atomic indicator, or business personnel can add the specified dimension of the atomic indicator when configuring the atomic indicator on the front-end platform so that the corresponding atomic indicator in the generated indicator query request includes the characters of the specified dimension. Accordingly, the atomic indicator parsed in the indicator query request contains the characters of the specified dimension, and the specified dimension corresponding to the atomic indicator can be determined when the atomic indicator is disassembled. Generally speaking, the character p of the specified dimension represents the order payment time. In addition to p, the characters of the specified dimension can also be r and l. The character r of the specified dimension represents the user registration time, and the character l of the specified dimension represents the login time. When the atomic indicator is "ps-pay_money-p", combined with the global time dimension tj_day and the global filtering condition {\"end_date\":\"2023-02-24\",\"start_date\":\"2023-02-24\"}, it can be determined that the indicator value of this atomic indicator is the total recharge amount of each recharge order whose order payment time is within February 24, 2023.
[0060] S1202. Determine the time dimension of the atomic indicator according to the specified dimension and the global time dimension.
[0061] Exemplarily, the global dimension includes a global time dimension and a global non-time dimension, and the global non-time dimension is a dimension other than the global time dimension, such as game, server, and character. Since the specified dimension is also used to limit the time dimension of the atomic indicator, the global time dimension can be modified by the specified dimension to obtain the time dimension of the atomic indicator. For example, when the specified dimension is the order payment time and the global time dimension is one day, the time dimension of the atomic indicator can be determined to be the order payment time within one day.
[0062] S1203. Determine the global non-time dimension as the non-time dimension of the atomic indicator.
[0063] Exemplarily, global non-time dimensions such as game, server, and role are directly used as non-time dimensions of atomic indicators to define atomic indicators from the time dimension and non-time dimension. It should be noted that if the global dimension does not include the global non-time dimension, the atomic indicator does not include the non-time dimension.
[0064] This embodiment corrects the global time dimension of the atomic indicator by configuring the specified dimension of the atomic indicator, so as to ensure the accuracy of the indicator query and configure the time dimension of each atomic indicator in a targeted manner, thereby improving the server's query capability for the indicator.
[0065] Similarly, the global filter condition in the indicator query request is the filter condition that limits each indicator to be queried in the corresponding indicator query request. If only the filter condition of a certain indicator to be queried is configured, the additional filter condition of the indicator to be queried can be configured in the indicator query request to limit the corresponding indicator to be queried through the additional filter condition. Adding the additional filter condition to the global filter condition can obtain the filter condition of the corresponding indicator to be queried.
[0066] In this embodiment, the additional filtering conditions, data table name, aggregation operation and data field together constitute the corresponding atomic index, so when the atomic index is disassembled, the additional filtering conditions corresponding to the atomic index can be obtained, and the filtering conditions of the atomic index can be determined based on the additional filtering conditions and the global filtering conditions. Figure 3 : is a flow chart of determining the screening conditions of atomic indicators provided in the embodiment of the present application. Figure 3 As shown, the step of determining the screening conditions of the atomic index specifically includes S1204-S1205:
[0067] S1204. Decompose the atomic indicator to obtain additional screening conditions corresponding to the atomic indicator.
[0068] For example, the characters "dp-eq" after the data field in the atomic indicator "ps-pay_money-dp-eq" represent the additional screening conditions of the atomic indicator. The additional screening conditions are composed of two segments of characters. The first segment of characters defines the fields corresponding to the screening conditions, and the second segment of characters defines the screening logic. For example, the characters dp of the additional screening conditions represent the fields of the screening date and the payment date, and the characters eq define that the information of the corresponding fields is the same, that is, the additional screening condition is that the screening date and the payment date of the data used for the statistical indicator are the same.
[0069] When developers write indicator query requests, they can add characters corresponding to additional filter conditions in atomic indicators, or business personnel can add additional filter conditions for atomic indicators when configuring atomic indicators on the front-end platform so that the corresponding atomic indicators in the generated indicator query request include characters of additional filter conditions. Accordingly, the atomic indicators parsed in the indicator query request contain characters of additional filter conditions, and the additional filter conditions corresponding to the atomic indicators can be determined when the atomic indicators are disassembled.
[0070] It should be noted that when an atomic indicator includes additional filtering conditions and specified dimensions, the characters of the specified dimensions are the last characters of the atomic indicator, and the characters of the additional filtering conditions are located between the characters of the data field and the characters of the specified dimensions. For example, the atomic indicator is "ps-pay_money-dp-eq-p".
[0071] S1205. Determine the screening conditions of the atomic indicators according to the additional screening conditions and the global screening conditions.
[0072] Exemplarily, adding additional filtering conditions on the basis of global filtering conditions is the filtering condition of the atomic indicator. For example, the global filtering condition is that the date of the data used for the statistical indicator is February 24, 2023, and the additional filtering condition is that the filtering date of the data used for the statistical indicator is the same as the payment date. The global filtering condition and the additional filtering condition are combined to obtain the filtering condition of the atomic indicator, which is that the date of the data used for the statistical indicator is February 24, 2023 and the filtering date of the data is the same as the payment date. When the atomic indicator is "ps-pay_money-dp-eq-p", the atomic indicator is combined with the global time dimension tj_day and the global filtering condition {\"end_date\":\"2023-02-24\",\"start_date\":\"2023-02-24\"}, and the indicator value of the atomic indicator can be determined as the total recharge amount of the recharge order whose order payment time is within February 24, 2023 and the filtering date is the same as the payment date.
[0073] Understandably, when the developer or business personnel does not configure additional filtering conditions or specified dimensions of the atomic indicator in the indicator query request, the server will not obtain the additional filtering conditions or specified dimensions of the atomic indicator when disassembling the atomic indicator.
[0074] S130. Grouping the atomic indicators according to the data table names, aggregation operations, and data fields corresponding to the atomic indicators to obtain multiple indicator groups, wherein the atomic indicators included in the indicator groups have the same data table names, aggregation operations, and data fields.
[0075] Among them, each atomic indicator includes an atomic indicator split from a composite indicator and an atomic indicator directly parsed from an indicator query request. The atomic indicator split from a composite indicator may be the same as the atomic indicator directly parsed from an indicator query request. For example, the atomic indicator "ps-pay_money" split from the composite indicator in the above json is the same as the atomic indicator "ps-pay_money" parsed from the indicator query request. The same structured query statement can be used to query the same atomic indicator. In this regard, this embodiment divides the same atomic indicators into the same indicator group, and splices the structured query statements of the indicator group to obtain the indicator values of all atomic indicators in the indicator group, thereby reducing the number of queries and improving the efficiency of indicator queries. In the case where the atomic indicator consists of a data table name, an aggregation operation, and a data field, the data table name, aggregation operation, and data field of the atomic indicator can be spliced into a structured query statement for querying the indicator value of the atomic indicator. Therefore, when the data table name, aggregation operation, and data field of multiple atomic indicators are the same, the multiple atomic indicators can be determined to be the same atomic indicators and then divided into the same indicator group.
[0076] Further, in the case where the atomic indicators also include filtering conditions and dimensions, the atomic indicators can be grouped according to the data table name, aggregation operation, data field, filtering condition and dimension corresponding to each atomic indicator to obtain multiple indicator groups, wherein the data table name, aggregation operation, data field, filtering condition and dimension of the atomic indicators contained in the indicator group are the same. It can be seen from the above content that the filtering condition of the atomic indicator is determined based on the global filtering condition and the additional filtering condition, and the dimension of the atomic indicator is determined based on the global dimension and the specified dimension. In the case where the atomic indicator is composed of the data table name, aggregation operation, data field, filtering condition and dimension, the data table name, aggregation operation, data field, filtering condition and dimension of the atomic indicator can be spliced into a structured query statement for querying the indicator value of the atomic indicator. Therefore, when the data table name, aggregation operation, data field, filtering condition and dimension of multiple atomic indicators are the same, multiple atomic indicators can be determined as the same atomic indicators and then divided into the same indicator group.
[0077] In one embodiment, the data fields corresponding to the screening conditions of the atomic indicators may not be stored in the data table where the corresponding atomic indicators are located. In this case, the data table where the atomic indicators are located can be associated with the data table where the data fields corresponding to the screening conditions are located, so that the indicator values of the atomic indicators can be queried in the associated multiple data tables later, ensuring the accuracy of the indicator query and improving the query capability and query scope. In this embodiment, in order to simplify the association operation of the data tables, after dividing each atomic indicator into the corresponding indicator group, a joint table can be made according to the data table name and the screening conditions corresponding to the indicator group. Exemplary, Figure 4This is a flowchart of performing a joint table based on the data table name and screening conditions corresponding to the indicator group provided by the embodiment of the present application. Figure 4 As shown, the step of performing a joint table according to the data table name corresponding to the indicator group and the screening condition specifically includes S1601-S1603:
[0078] S1601. Determine the target data table for the corresponding query according to the data table name corresponding to the indicator group.
[0079] The data table name, filter condition, data field, dimension and aggregation operation corresponding to the indicator group are the data table name, filter condition, data field, dimension and aggregation operation of the atomic indicator included in it. The target data table is the data table where the atomic indicator in the indicator group is located, and the target data table can be determined according to the data table name corresponding to the indicator group.
[0080] S1602. Determine the filter data field according to the filter condition corresponding to the indicator group.
[0081] Exemplarily, the screening condition is composed of a global screening condition and an additional screening condition, and the data field corresponding to the screening of the global screening condition and the data field corresponding to the screening of the additional screening condition can be determined as the screening data field of the screening condition. For example, when the additional screening condition is that the screening date and the payment date of the data used for the statistical indicator are the same, and the global screening condition is that the date of the data used for the statistical indicator is February 24, 2023, it can be determined that the screening data field includes the screening date field and the payment date field.
[0082] S1603: When the target data table does not store the screening data field, use the data table storing the screening data field as an associated data table of the target data table.
[0083] Exemplarily, if the target data table does not store the filtering data field, it means that when the indicator value of the atomic indicator corresponding to the indicator group in the target data table is obtained, the field information corresponding to the filtering data field cannot be obtained, and thus the data that meets the filtering conditions cannot be filtered out to count the indicator values of the atomic indicators, resulting in inaccurate indicator query. Therefore, when the target data table does not store the filtering data field, the data table storing the filtering data field is used as the associated data table of the target data table, so that the field information of the filtering data field can be obtained in the associated data table later, and the data that meets the filtering conditions can be filtered out according to the obtained field information to ensure the accuracy of the indicator query. For example, if the filtering condition of the indicator group is to filter out recharge users whose registration time is more than one year, it can be determined that the filtering data field is the user's registration time field. The target data table corresponding to the indicator group is the recharge table. The recharge table generally only records the recharge users, recharge amounts, recharge games, recharge areas and recharge times, but does not record the registration time of the recharge users. Therefore, it can be determined that the recharge table does not include the filtering data fields of the filtering conditions, and then the user registration table that records the user's registration time field is used as the associated data table of the recharge table, so that the registration time of each recharge user can be queried in the associated data table later, and the recharge users whose registration time is more than one year can be filtered out.
[0084] If the target data table stores a filtering data field, indicating the indicator value of the atomic indicator corresponding to the indicator group in the target data table, the field information corresponding to the filtering data field can be obtained, and then the data that meets the filtering conditions can be filtered out to count the indicator values of the atomic indicator. Therefore, there is no need to determine the associated data table of the target data table.
[0085] This embodiment uses the screening conditions and data table names of the indicator group to determine whether the target data table corresponding to the data table name can query the screening data fields of the screening conditions. When it is determined that the target data table cannot query the screening data fields, the data table that can query the screening data fields is used as the associated data table of the target data table, so that when the indicator values of the atomic indicators in the indicator group are subsequently queried, the data that meets the screening conditions can be accurately filtered out according to the field information of the screening data fields in the associated data table, thereby ensuring the statistical accuracy of the indicator values of the atomic indicators. Even if the developer modifies the query screening conditions and causes the screening data fields to change, the server will re-determine the associated data table, and the developer does not need to re-create the data view based on the data table where the screening data fields of the newly configured screening conditions are located, which greatly improves the convenience of indicator query.
[0086] In one embodiment, the screening conditions can be divided into basic screening conditions and special screening conditions. The basic screening conditions can be directly used to splice the structured query statements of atomic indicators, while the special screening conditions cannot be directly parsed by the database, so the special screening conditions need to be parsed before being used to splice the structured query statements of atomic indicators. Figure 5 This is a flowchart for parsing special screening conditions provided by the embodiment of the present application. Figure 5 As shown, the steps of parsing the special screening conditions specifically include S1701-S1702:
[0087] S1701. Determine whether the target data table has corresponding special business logic according to the screening conditions.
[0088] S1702: When there is special business logic in the target data table, the filter condition is parsed by a processing plug-in corresponding to the special business logic to obtain the parsed filter condition.
[0089] Exemplarily, each data table is pre-configured with corresponding special filtering conditions. When the filtering conditions are the same as the special filtering conditions pre-configured in the target data table, it is determined that the target data table has corresponding special business logic. At this time, the processing plug-in corresponding to the special business logic can be automatically called to parse the filtering conditions to obtain the parsed filtering conditions.
[0090] S140. Generate a corresponding structured query statement according to the data table name, aggregation operation and data field corresponding to each indicator group, and query the indicator value of the corresponding atomic indicator in the data table corresponding to the data table name of each indicator group through the structured query statement.
[0091] For example, when the atomic indicators in the indicator group are composed of a data table name, aggregation operation and data field, the data table name, aggregation operation and data field corresponding to the indicator group can be spliced into a structured query statement, and the structured query statement can be used to query the target data table corresponding to the indicator group, and the queried value can be used as the indicator value of each atomic indicator in the indicator group.
[0092] In the case where the atomic indicators in the indicator group are composed of data table names, aggregation operations, data fields, filtering conditions and dimensions, the data table names, aggregation operations, data fields, filtering conditions and dimensions corresponding to the indicator group can be spliced into a structured query statement, and the structured query statement is used to query in the target data table corresponding to the indicator group, and the queried value is used as the indicator value of each atomic indicator in the indicator group. Further, if the associated data table corresponding to the target data table of the indicator group is determined in advance, the indicator value of the corresponding atomic indicator is queried in the target data table and the corresponding associated data table through a structured query statement. Based on the filtering conditions in the structured query statement, the field information of the filtered data field can be obtained in the associated data table, and the data that meets the filtering conditions can be filtered out in the target data table according to the field information of the filtered data field, and then the filtered data is statistically analyzed according to the aggregation operations, data fields and dimensions in the structured query statement to obtain the indicator value of each atomic indicator in the indicator group.
[0093] S150, calculating the index value of the atomic index obtained by decomposing the composite index according to the calculation formula to obtain the index value of the composite index.
[0094] For example, after obtaining the indicator values of each atomic indicator, the indicator values of the atomic indicators directly parsed from the indicator query request can be returned to the business personnel or developers. For the indicator values of the atomic indicators obtained by splitting the composite indicator, the indicator values are substituted into the calculation formula of the composite indicator to calculate the indicator value of the composite indicator.
[0095] It should be noted that when the developer or business personnel only configures the atomic indicator or composite indicator in the indicator query request, the server will parse the atomic indicator or composite indicator in the indicator query request. If the server does not parse the composite indicator, it will group the resolved atomic indicators to obtain the indicator group, generate a structured query statement based on the data table name, aggregation operation and data field of the indicator group, and query the indicator value of each atomic indicator through the structured query statement. If the server does not parse the atomic indicator, the composite indicator obtained by the analysis will be split into multiple atomic indicators, and the multiple atomic indicators obtained by the split will be grouped to obtain the indicator group, and a structured query statement will be generated based on the data table name, aggregation operation and data field of the indicator group, and the indicator value of each atomic indicator will be queried through the structured query statement. Therefore, this embodiment supports a single query of atomic indicators or composite indicators.
[0096] In summary, the index query method provided by the embodiment of the present application obtains the composite index and atomic index in the index query request by parsing the index query request; splits the composite index into multiple atomic indexes and operation formulas, and disassembles each atomic index to obtain the data table name, aggregation operation and data field corresponding to each atomic index; groups each atomic index according to the data table name, aggregation operation and data field corresponding to each atomic index to obtain multiple index groups, wherein the data table name, aggregation operation and data field of the atomic index contained in the index group are the same; generates corresponding structured query statements according to the data table name, aggregation operation and data field corresponding to each index group, and queries the index value of the corresponding atomic index in the data table corresponding to the data table name of each index group through the structured query statement; calculates the index value of the atomic index obtained by disassembling the composite index according to the operation formula to obtain the index value of the composite index. Through the above technical means, the composite index can be split into multiple atomic indexes and operation methods, and the atomic index corresponding to the composite index is calculated based on the operation method to obtain the index value of the composite index, without the need for the user to perform secondary calculations on the obtained index value, which effectively improves the convenience and ability of index query. Multiple atomic indicators are divided into indicator groups, and the indicator values of each atomic indicator in the indicator group can be queried through the structured query statements generated by the indicator groups, which effectively improves the efficiency of indicator query. Indicator queries are performed in different data tables through structured query statements of each indicator group, supporting queries on any data table in the same batch, solving the problem in the prior art that indicators in the same batch of queries must be in the same data view and indicators outside the data view cannot be queried, reducing the complexity of query operations, improving query efficiency, and expanding the query scope.
[0097] Based on the above embodiments, Figure 6 This is a schematic diagram of the structure of an indicator query device provided in an embodiment of the present application. Figure 6 The indicator query device provided in this embodiment specifically includes: an indicator parsing module 21, an indicator disassembling module 22, an indicator grouping module 23, an indicator query module 24 and an indicator compound module 25.
[0098] The indicator parsing module 21 is configured to parse the indicator query request to obtain the composite indicator and the atomic indicator in the indicator query request;
[0099] The indicator decomposition module 22 is configured to decompose the composite indicator into multiple atomic indicators and operation formulas, and decompose each atomic indicator to obtain the data table name, aggregation operation and data field corresponding to each atomic indicator;
[0100] The indicator grouping module 23 is configured to group the atomic indicators according to the data table names, aggregation operations and data fields corresponding to the atomic indicators to obtain multiple indicator groups, wherein the atomic indicators included in the indicator groups have the same data table names, aggregation operations and data fields;
[0101] The indicator query module 24 is configured to generate a corresponding structured query statement according to the data table name, aggregation operation and data field corresponding to each indicator group, and query the indicator value of the corresponding atomic indicator in the data table corresponding to the data table name of each indicator group through the structured query statement;
[0102] The index compound module 25 is configured to calculate the index values of the atomic indexes obtained by decomposing the composite index according to the calculation formula to obtain the index value of the composite index.
[0103] On the basis of the above embodiments, the indicator parsing module 21 also includes: a global dimension parsing unit, configured to parse the indicator query request to obtain the global dimension in the indicator query request; the global dimension includes a global time dimension and a global non-time dimension; accordingly, the indicator disassembly module 22 also includes: a specified dimension disassembly unit, configured to disassemble the atomic indicator to obtain the specified dimension corresponding to the atomic indicator; a time dimension determination unit, configured to determine the time dimension of the atomic indicator according to the specified dimension and the global time dimension; a non-time dimension determination unit, configured to determine the global non-time dimension as the non-time dimension of the atomic indicator.
[0104] On the basis of the above embodiment, the indicator parsing module 21 also includes: a global filtering condition parsing unit, which is configured to parse the indicator query request to obtain the global filtering condition in the indicator query request; accordingly, the indicator disassembly module 22 also includes: an additional filtering condition disassembly unit, which is configured to disassemble the atomic indicator to obtain the additional filtering condition corresponding to the atomic indicator; a filtering condition determination unit, which is configured to determine the filtering condition of the atomic indicator according to the additional filtering condition and the global filtering condition.
[0105] On the basis of the above embodiment, the indicator grouping module 23 includes: an indicator grouping unit, which is configured to group each atomic indicator according to the data table name, aggregation operation, data field, filtering condition and dimension corresponding to each atomic indicator to obtain multiple indicator groups, wherein the data table name, aggregation operation, data field, filtering condition and dimension of the atomic indicators included in the indicator group are the same.
[0106] On the basis of the above embodiments, the indicator query device also includes a joint table module, which includes: a target data table determination unit, which is configured to determine the target data table corresponding to the query according to the data table name corresponding to the indicator group after grouping each atomic indicator according to the data table name, aggregation operation, data field, filtering condition and dimension corresponding to each atomic indicator to obtain multiple indicator groups; a filtering field determination unit, which is configured to determine the filtering data field according to the filtering condition corresponding to the indicator group; and a data table association unit, which is configured to use the data table storing the filtering data field as the associated data table of the target data table when the target data table does not store the filtering data field.
[0107] On the basis of the above embodiments, the indicator query device also includes a filtering condition parsing module, which includes: a business detection unit, which is configured to group each atomic indicator according to the data table name, aggregation operation, data field, filtering condition and dimension corresponding to each atomic indicator to obtain multiple indicator groups, and then determine whether there is corresponding special business logic in the target data table according to the filtering condition; a filtering condition parsing unit, which is configured to parse the filtering condition through a processing plug-in corresponding to the special business logic to obtain the parsed filtering condition when there is special business logic in the target data table.
[0108] Based on the above embodiment, the indicator query module 24 includes: a statement splicing unit, which is configured to splice the data table name, aggregation operation, data field, filtering condition and dimension corresponding to the indicator group into a structured query statement; an indicator query unit, which is configured to query the indicator value of the corresponding atomic indicator in the target data table and the corresponding associated data table through a structured query statement.
[0109] As mentioned above, the index query device provided by the embodiment of the present application obtains the composite index and atomic index in the index query request by parsing the index query request; splits the composite index into multiple atomic indexes and operation formulas, and disassembles each atomic index to obtain the data table name, aggregation operation and data field corresponding to each atomic index; groups each atomic index according to the data table name, aggregation operation and data field corresponding to each atomic index to obtain multiple index groups, wherein the data table name, aggregation operation and data field of the atomic index contained in the index group are the same; generates corresponding structured query statements according to the data table name, aggregation operation and data field corresponding to each index group, and queries the index value of the corresponding atomic index in the data table corresponding to the data table name of each index group through the structured query statement; calculates the index value of the atomic index obtained by disassembling the composite index according to the operation formula to obtain the index value of the composite index. Through the above technical means, the composite index can be split into multiple atomic indexes and operation methods, and the atomic index corresponding to the composite index is calculated based on the operation method to obtain the index value of the composite index, without the need for the user to perform secondary calculations on the obtained index value, which effectively improves the convenience and ability of index query. Multiple atomic indicators are divided into indicator groups, and the indicator values of each atomic indicator in the indicator group can be queried through the structured query statements generated by the indicator groups, which effectively improves the efficiency of indicator query. Indicator queries are performed in different data tables through structured query statements of each indicator group, supporting queries on any data table in the same batch, solving the problem in the prior art that indicators in the same batch of queries must be in the same data view and indicators outside the data view cannot be queried, reducing the complexity of query operations, improving query efficiency, and expanding the query scope.
[0110] The indicator query device provided in the embodiment of the present application can be used to execute the indicator query method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0111] Figure 7 This is a schematic diagram of the structure of an indicator query device provided in an embodiment of the present application, with reference to Figure 7 The indicator query device includes: a processor 31, a memory 32, a communication device 33, an input device 34 and an output device 35. The number of processors 31 in the indicator query device can be one or more, and the number of memories 32 in the indicator query device can be one or more. The processor 31, memory 32, communication device 33, input device 34 and output device 35 of the indicator query device can be connected through a bus or other methods.
[0112] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the index query method of any embodiment of the present application (for example, the index parsing module 21, the index disassembly module 22, the index grouping module 23, the index query module 24 and the index compound module 25 in the index query device). The memory 32 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to the use of the device, etc. In addition, the memory 32 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0113] The communication device 33 is used for data transmission.
[0114] The processor 31 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 32, that is, implements the above-mentioned indicator query method.
[0115] The input device 34 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 35 may include a display device such as a display screen.
[0116] The indicator query device provided above can be used to execute the indicator query method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0117] An embodiment of the present application also provides a storage medium containing computer executable instructions, which are used to execute an indicator query method when executed by a computer processor. The indicator query method includes: parsing an indicator query request to obtain a composite indicator and an atomic indicator in the indicator query request; splitting the composite indicator into multiple atomic indicators and operation formulas, and disassembling each atomic indicator to obtain a data table name, aggregation operation and data field corresponding to each atomic indicator; grouping each atomic indicator according to the data table name, aggregation operation and data field corresponding to each atomic indicator to obtain multiple indicator groups, wherein the data table name, aggregation operation and data field of the atomic indicators included in the indicator group are the same; generating a corresponding structured query statement according to the data table name, aggregation operation and data field corresponding to each indicator group, and querying the indicator value of the corresponding atomic indicator in the data table corresponding to the data table name of each indicator group through the structured query statement; calculating the indicator value of the atomic indicator obtained by disassembling the composite indicator according to the operation formula to obtain the indicator value of the composite indicator.
[0118] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, which is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (for example, in different computer systems connected by a network). The storage medium may store program instructions (for example, embodied as a computer program) that can be executed by one or more processors.
[0119] Of course, the storage medium containing computer executable instructions provided in the embodiment of the present application, whose computer executable instructions are not limited to the above indicator query method, can also execute related operations in the indicator query method provided in any embodiment of the present application.
[0120] The indicator query device, storage medium and indicator query equipment provided in the above embodiments can execute the indicator query method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the indicator query method provided in any embodiment of the present application.
[0121] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the protection scope of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A method for querying indicators. It is characterized in that include: Parsing the indicator query request to obtain the composite indicator and the atomic indicator in the indicator query request; Splitting the composite indicator into multiple atomic indicators and operation formulas, and decomposing each of the atomic indicators to obtain a data table name, aggregation operation, and data field corresponding to each of the atomic indicators; The atomic indicators are grouped according to the data table names, aggregation operations and data fields corresponding to the atomic indicators to obtain a plurality of indicator groups, wherein the atomic indicators included in the indicator groups have the same data table names, aggregation operations and data fields; Generate a corresponding structured query statement according to the data table name, aggregation operation and data field corresponding to each of the indicator groups, and query the indicator value of the corresponding atomic indicator in the data table corresponding to the data table name of each of the indicator groups through the structured query statement; The index value of the atomic index obtained by decomposing the composite index is calculated according to the calculation formula to obtain the index value of the composite index.
2. The index query method according to claim 1, It is characterized in that When the index query request is parsed to obtain the composite index and the atomic index in the index query request, it also includes: Parsing the indicator query request to obtain a global dimension in the indicator query request; the global dimension includes a global time dimension and a global non-time dimension; Correspondingly, when the atomic indicators are decomposed to obtain the data table name, aggregation operation and data field corresponding to each atomic indicator, it also includes: Decomposing the atomic index to obtain a specified dimension corresponding to the atomic index; Determining the time dimension of the atomic indicator according to the specified dimension and the global time dimension; The global non-time dimension is determined as the non-time dimension of the atomic indicator.
3. The index query method according to claim 1, It is characterized in that When the index query request is parsed to obtain the composite index and the atomic index in the index query request, it also includes: Parsing the indicator query request to obtain a global screening condition in the indicator query request; Correspondingly, when the atomic indicators are decomposed to obtain the data table name, aggregation operation and data field corresponding to each atomic indicator, it also includes: Decomposing the atomic indicator to obtain additional screening conditions corresponding to the atomic indicator; The screening condition of the atomic indicator is determined according to the additional screening condition and the global screening condition.
4. The index query method according to claim 1, It is characterized in that The atomic indicators also include screening conditions and dimensions; accordingly, the atomic indicators are grouped according to the data table names, aggregation operations and data fields corresponding to the atomic indicators to obtain multiple indicator groups, including: According to the data table name, aggregation operation, data field, filtering condition and dimension corresponding to each atomic indicator, each atomic indicator is grouped to obtain multiple indicator groups, wherein the data table name, aggregation operation, data field, filtering condition and dimension of the atomic indicators included in the indicator group are the same.
5. The index query method according to claim 4, It is characterized in that After grouping the atomic indicators to obtain a plurality of indicator groups according to the data table names, aggregation operations, data fields, screening conditions and dimensions corresponding to the atomic indicators, the method further includes: Determine the target data table corresponding to the query according to the data table name corresponding to the indicator group; Determine the filtering data field according to the filtering condition corresponding to the indicator group; When the target data table does not store the filter data field, a data table storing the filter data field is used as a related data table of the target data table.
6. The index query method according to claim 5, It is characterized in that After the data table storing the screening data field is used as an associated data table of the target data table, the method further includes: Determine whether the target data table has corresponding special business logic according to the screening condition; In the case where there is special business logic in the target data table, the screening condition is parsed by a processing plug-in corresponding to the special business logic to obtain the parsed screening condition.
7. The index query method according to claim 5, It is characterized in that Generating a corresponding structured query statement according to the data table name, aggregation operation and data field corresponding to each of the indicator groups, and querying the indicator value of the corresponding atomic indicator in the data table corresponding to the data table name of each of the indicator groups through the structured query statement, includes: The data table name, aggregation operation, data field, screening condition and dimension corresponding to the indicator group are spliced into a structured query statement; The structured query statement is used to query the indicator value of the corresponding atomic indicator in the target data table and the corresponding associated data table.
8. An indicator query device, It is characterized in that include: An indicator parsing module is configured to parse the indicator query request to obtain the composite indicator and the atomic indicator in the indicator query request; An indicator decomposition module is configured to decompose the composite indicator into multiple atomic indicators and operation formulas, and decompose each of the atomic indicators to obtain a data table name, aggregation operation and data field corresponding to each of the atomic indicators; An indicator grouping module is configured to group each of the atomic indicators according to the data table name, aggregation operation and data field corresponding to each of the atomic indicators to obtain a plurality of indicator groups, wherein the data table name, aggregation operation and data field of the atomic indicators included in the indicator group are the same; An indicator query module is configured to generate a corresponding structured query statement according to the data table name, aggregation operation and data field corresponding to each of the indicator groups, and query the indicator value of the corresponding atomic indicator in the data table corresponding to the data table name of each of the indicator groups through the structured query statement; The index compound module is configured to calculate the index value of the atomic index obtained by decomposing the composite index according to the calculation formula to obtain the index value of the composite index.
9. An indicator query device, It is characterized in that include: one or more processors; A memory stores one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the indicator query method as described in any one of claims 1-7.
10. A storage medium containing computer executable instructions, It is characterized in that The computer executable instructions are used to execute the indicator query method as described in any one of claims 1 to 7 when executed by a computer processor.
Citation Information
Patent Citations
Index query method and device, electronic equipment and computer readable medium
CN115878705A
Data query method based on index rapid development
CN116303615A
Data index generation method and device, equipment and storage medium
CN116628007A
Index data query method, index platform, electronic equipment and storage medium
CN117555914A
Cited By
Index disassembling method and device, electronic equipment and computer program product
CN119149576A
Statistical result streaming return method and device for data query and terminal equipment
CN120653691A
