Indicator data processing methods, devices, computer equipment and storage media
By grouping and prioritizing target metrics, the problem of low processing efficiency in multi-metric query scenarios is solved, achieving efficient metric data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-21
- Publication Date
- 2026-03-10
AI Technical Summary
In the process of data analysis, when there are a large number of indicators to be queried, using a uniform indicator processing method leads to low processing efficiency, and the number of dimensions in different query scenarios affects query performance, making it impossible to guarantee the processing efficiency of indicator data.
By parsing the indicator query requests, grouping and processing the target indicators, obtaining indicator characteristics, and processing the data according to priority information based on the query scenario and the number of dimensions, the timeliness and performance of indicator queries are ensured.
When there are a large number of metrics to be queried, the timeliness and performance of metric queries are ensured by grouping and querying metrics involving special configuration information separately, thereby improving the efficiency of metric data processing.
Smart Images

Figure CN115168406B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer equipment, and storage medium for processing indicator data. Background Technology
[0002] With the development of information technology, the Internet has been widely used in various fields. Enterprises can obtain various business data through Internet applications, and after analyzing the business data, make business decisions based on the obtained indicator values.
[0003] In the process of implementing this application, the applicant discovered the following technical problems in the prior art: During the data analysis process, different indicators have corresponding indicator configuration information. When there are many indicators to be queried, if a uniform indicator processing method is used for all indicators, the processing efficiency of indicator data is low. Moreover, for different query scenarios, the number of dimensions has a significant impact on query performance. If the number of dimensions is not processed, the processing efficiency of indicator data cannot be guaranteed.
[0004] Therefore, it is necessary to provide a method for processing indicator data that can improve the efficiency of indicator data processing. Summary of the Invention
[0005] In view of the above, it is necessary to propose an indicator data processing method, indicator data processing device, computer equipment and storage medium that can improve the processing efficiency of indicator data.
[0006] The first aspect of this application also provides an indicator data processing method, the indicator data processing method comprising:
[0007] When a metric query request is received, the metric query request is parsed to obtain a target metric information set, which includes the target metric, the target data table corresponding to the target metric, and the target dimension corresponding to the target data table.
[0008] Based on the target data table and the target dimension, the target indicators are grouped and processed to obtain the first target indicator group;
[0009] Obtain the indicator features corresponding to each target indicator in the first target indicator group to obtain the indicator feature set, and detect whether there are target indicator features in the indicator feature set;
[0010] When the detection result indicates that the target indicator feature exists in the indicator feature set, the first target indicator group is processed to obtain the second target indicator group.
[0011] Obtain the query scenario corresponding to each target indicator in the second target indicator group, and traverse the pre-set mapping relationship between query scenarios and the number of dimensions according to the query scenario to obtain the number of target dimensions corresponding to the query scenario;
[0012] Obtain the priority information of the second target indicator group, and perform data processing according to the target dimension number based on the priority information to obtain the indicator value corresponding to the target indicator.
[0013] Furthermore, in the above-described indicator data processing method provided in this application embodiment, the step of parsing the indicator query request to obtain a target indicator information set includes a target indicator, a target data table corresponding to the target indicator, and a target dimension corresponding to the target data table, including:
[0014] Parse the indicator query request and detect whether the indicator query request carries an indicator identifier;
[0015] When the detection result shows that the indicator identifier is carried in the indicator query request, the indicator identifier is extracted;
[0016] The target indicator is obtained by traversing the pre-set mapping relationship between the indicator identifier and the indicator.
[0017] Obtain the indicator definition corresponding to the target indicator, and select the target data table and the target dimension corresponding to the target data table according to the indicator definition.
[0018] Furthermore, in the above-described indicator data processing method provided in the embodiments of this application, the step of grouping the target indicators according to the target data table and the target dimension to obtain the first target indicator group includes:
[0019] Obtain the target data table corresponding to each of the target indicators;
[0020] Identify a first target indicator that is identical to the target data table, and group the first target indicator into a group to obtain an initial target indicator grouping;
[0021] Obtain the target dimension corresponding to each of the first target indicators in each of the initial target indicator groups;
[0022] Identify a second target indicator that is the same as the target dimension, and group the second target indicators into a group to obtain the first target indicator group.
[0023] Furthermore, in the above-described indicator data processing method provided in the embodiments of this application, the step of grouping the first target indicator group to obtain the second target indicator group includes:
[0024] Determine the specific indicator corresponding to the target indicator characteristics;
[0025] The first target indicator group is split according to the specific indicator to obtain the second target indicator group.
[0026] Furthermore, in the above-described indicator data processing method provided in the embodiments of this application, obtaining the indicator features corresponding to each target indicator in the first target indicator group includes:
[0027] Obtain the indicator definition corresponding to each of the aforementioned target indicators;
[0028] Extract feature keywords from the aforementioned indicator definition;
[0029] The feature keywords are combined according to a preset data format to obtain the indicator features corresponding to each target indicator.
[0030] Furthermore, in the above-described indicator data processing method provided in the embodiments of this application, the query scenario for obtaining each target indicator in the second target indicator group includes:
[0031] Obtain the target dimension corresponding to each target indicator in the second target indicator group;
[0032] Obtain the initial query difficulty value and the initial indicator data processing difficulty value corresponding to each of the target dimensions;
[0033] Calculate the target query difficulty value and target indicator data processing difficulty value corresponding to the target indicator based on the initial query difficulty value and the initial indicator data processing difficulty value, and determine the query scenario corresponding to each target indicator based on the target query difficulty value and the target indicator data processing difficulty value.
[0034] Furthermore, in the above-described indicator data processing method provided in this application embodiment, before processing the data according to the priority information and the number of target dimensions to obtain the indicator value corresponding to the target indicator, the method further includes:
[0035] Obtain the target data table corresponding to the target indicator and the timestamp information of the target dimension;
[0036] Check whether the timestamp information is the same;
[0037] When the detection result indicates that the timestamp information is different, update the target data table and the target dimension corresponding to the target data table.
[0038] A second aspect of this application also provides an indicator data processing apparatus, the indicator data processing apparatus comprising:
[0039] The request parsing module is used to parse the indicator query request when it receives an indicator query request to obtain a target indicator information set. The target indicator information set includes the target indicator, the target data table corresponding to the target indicator, and the target dimension corresponding to the target data table.
[0040] The indicator grouping module is used to group the target indicators according to the target data table and the target dimension to obtain the first target indicator group.
[0041] The feature detection module is used to obtain the indicator features corresponding to each target indicator in the first target indicator group, obtain the indicator feature set, and detect whether the target indicator features exist in the indicator feature set.
[0042] The indicator grouping module is further configured to, when the detection result indicates that the target indicator feature exists in the indicator feature set, process the first target indicator group to obtain the second target indicator group;
[0043] The scenario acquisition module is used to acquire the query scenario corresponding to each of the target indicators in the second target indicator group, and to obtain the target dimension number corresponding to the query scenario by traversing the pre-set mapping relationship between the query scenario and the number of dimensions.
[0044] The priority acquisition module is used to acquire priority information of the second target indicator group, and perform data processing according to the priority information and the number of target dimensions to obtain the indicator value corresponding to the target indicator.
[0045] A third aspect of this application also provides a computer device, the computer device including a processor, the processor being configured to execute a computer program stored in a memory to implement the index data processing method as described in any of the preceding embodiments.
[0046] A fourth aspect of this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the index data processing method described in any one of the above embodiments.
[0047] The indicator data processing method, indicator data processing device, computer equipment, and computer-readable storage medium provided in this application, by grouping the target indicators and processing the data according to the priority information corresponding to the group to obtain the indicator value corresponding to the target indicator, can separately group and query indicators involving special configuration information when there are a large number of indicators to be queried, ensuring the timeliness of indicator query. Furthermore, this application determines the number of target dimensions according to the query scenario corresponding to each target indicator, which can further ensure indicator query performance and thus improve the efficiency of indicator data processing. This application can be applied to various functional modules of smart cities such as smart government affairs and smart transportation, such as the indicator data processing module of smart government affairs, and can promote the rapid development of smart cities. Attached Figure Description
[0048] Figure 1 This is a flowchart of the indicator data processing method provided in Embodiment 1 of this application.
[0049] Figure 2 This is a structural diagram of the index data processing device provided in Embodiment 2 of this application.
[0050] Figure 3 This is a schematic diagram of the structure of the computer device provided in Embodiment 3 of this application.
[0051] The following detailed description, in conjunction with the accompanying drawings, will further illustrate this application. Detailed Implementation
[0052] To better understand the above-mentioned objectives, features, and advantages of this application, the application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0053] Numerous specific details are set forth in the following description in order to provide a full understanding of this application. The described embodiments are only some, not all, of the embodiments of this application.
[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.
[0055] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0056] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0057] The indicator data processing method provided in this embodiment of the invention is executed by a computer device, and correspondingly, the indicator data processing device runs in the computer device. Figure 1 This is a flowchart of the indicator data processing method provided in Embodiment 1 of this application. Figure 1 As shown, the indicator data processing method may include the following steps. The order of these steps in the flowchart may be changed, and some may be omitted, depending on different requirements:
[0058] S11, when a metric query request is received, the metric query request is parsed to obtain a target metric information set, the target metric information set including the target metric, the target data table corresponding to the target metric, and the target dimension corresponding to the target data table.
[0059] In at least one embodiment of this application, the indicator query request can refer to a request sent by an application terminal to a preset indicator terminal to query the corresponding indicator value. The number of indicators requested in the indicator query request is not limited; it can be one or more. This embodiment of the application takes an example where the number of requested indicators is multiple. The preset indicator terminal is a pre-built terminal for processing indicator data. One end of the preset indicator terminal is connected to several application terminals, and the other end is connected to a large database terminal. When the preset indicator terminal receives the indicator query request sent by the application terminal, it retrieves and processes the indicator data from the large database terminal to obtain the indicator value corresponding to the target indicator. The indicator value can be a numerical value obtained by calculating the indicator data of the target indicator according to a preset calculation formula. The preset calculation formula is a pre-set formula used to reflect the mathematical relationship between indicator data corresponding to relevant dimensions. The target indicator information set refers to a collection of information describing the target indicator. The target indicator set can include the target indicator, the target data table corresponding to the target indicator, and the target dimension corresponding to the target data table. The target data table can be stored in a large database. In one embodiment, the target metric can be a sales revenue metric, a profit metric, or a discount metric, etc., and the target data table can correspond to a product sales data table, etc. The target dimension corresponding to the product sales data table can include information such as product number, product name, shipping date, country, and region, etc., without limitation. Considering the reliability and privacy of data storage, the large database can be a target node on a blockchain.
[0060] Optionally, parsing the indicator query request to obtain a target indicator information set, the target indicator information set including the target indicator, the target data table corresponding to the target indicator, and the target dimensions corresponding to the target data table, including:
[0061] Parse the indicator query request and detect whether the indicator query request carries an indicator identifier;
[0062] When the detection result shows that the indicator identifier is carried in the indicator query request, the indicator identifier is extracted;
[0063] The target indicator is obtained by traversing the pre-set mapping relationship between the indicator identifier and the indicator.
[0064] Obtain the indicator definition corresponding to the target indicator, and select the target data table and the target dimension corresponding to the target data table according to the indicator definition.
[0065] The indicator identifier can be a number, letter, or color identifier, and there is no limitation thereto. The indicator identifier is used to uniquely identify the corresponding indicator. By detecting the indicator identifier carried in the indicator query request, the target indicator corresponding to the indicator identifier can be traversed. In one embodiment, the target indicator includes statistical date elements, statistical period elements, dimension elements, and indicator definition elements. The statistical date element refers to the cutoff date for statistical analysis of the data table corresponding to the target indicator; the statistical period element refers to the statistical time interval of the data table corresponding to the target indicator; the dimension element refers to several dimensions in the data table corresponding to the target indicator; and the indicator definition element describes the business meaning and calculation formula corresponding to the target indicator. It can be understood that the business meaning can refer to the role of the target indicator in business operations. For example, when the target indicator is a sales revenue indicator, the business meaning can be the total price and extra charges received by a taxpayer from the purchaser or recipient of taxable services or labor services when selling goods or providing taxable labor or labor services. The calculation formula reflects the mathematical relationship between the data corresponding to the relevant dimensions. The calculation formula contains several mathematical terms, each of which carries dimension information from the data table. By querying each mathematical term in the calculation formula, the target data table corresponding to the target indicator and the target dimension corresponding to the target data table can be obtained.
[0066] In at least one embodiment of this application, the preset indicator terminal can be connected to a cache. For example, the preset indicator terminal is connected to a Redis cache, which is used to store hot indicators for preheating. When the indicator query request is received, the corresponding hot indicators are preheated through the Redis cache, and the target indicator in the indicator query request is matched with the hot indicators. There is no need to process the indicator data of the target indicators one by one, which can improve the efficiency of indicator query.
[0067] Optionally, after receiving the indicator query request and before parsing the indicator query request to obtain the target indicator information set, the method further includes:
[0068] Obtain the historical indicator set and the indicator popularity value corresponding to each historical indicator in the historical indicator set;
[0069] Determine the target terminal associated with the indicator query request;
[0070] Construct a terminal profile corresponding to the target terminal, and select and preheat target historical indicators whose indicator popularity value is greater than a preset indicator popularity threshold based on the terminal profile.
[0071] The historical indicator set refers to the collection of indicators historically processed by the preset indicator terminal, and the historical indicator set contains several historical indicators. The indicator popularity value refers to the frequency with which the indicator is called and queried. The indicator popularity value of the historical indicator can be obtained by calculating the number of times the indicator is called and queried within a certain period of time. The target terminal refers to the terminal (i.e., the application terminal) that issues the indicator query request. In one embodiment, constructing the terminal image corresponding to the target terminal includes: obtaining the target business information corresponding to the target terminal; and constructing the terminal profile corresponding to the target terminal using the target business information as tags. The business information may include product number, product name, enterprise number, enterprise name, and the enterprise's main business scope, etc., and the corresponding tags may be product number tag, product name tag, enterprise number tag, enterprise name tag, and enterprise's main business scope tag. It can be understood that different business information corresponds to different indicator preferences. By constructing the terminal profile of the target terminal through the business information, and preheating the target historical indicators according to the terminal profile, and then matching the target indicator in the indicator query request with the target historical indicators, it is not necessary to process the indicator data of each target indicator one by one, which can improve the efficiency of indicator query.
[0072] S12, the target indicators are grouped and processed according to the target data table and the target dimension to obtain the first target indicator group.
[0073] In at least one embodiment of this application, when the number of indicators requested in the indicator query request is multiple, the processing efficiency of indicator data can be improved by performing grouped query processing on the multiple target indicators. The first target indicator group refers to a group corresponding to the multiple target indicators; the number of the first target indicator groups can be one or more. Each first target indicator group can contain one or more target indicators.
[0074] Optionally, the step of grouping the target indicators according to the target data table and the target dimension to obtain the first target indicator group includes:
[0075] Obtain the target data table corresponding to each of the target indicators;
[0076] Identify a first target indicator that is identical to the target data table, and group the first target indicator into a group to obtain an initial target indicator grouping;
[0077] Obtain the target dimension corresponding to each of the first target indicators in each of the initial target indicator groups;
[0078] Identify a second target indicator that is the same as the target dimension, and group the second target indicators into a group to obtain the first target indicator group.
[0079] Each target indicator has a corresponding target data table. First target indicators with the same target data table are grouped together to obtain initial target indicator groups. The number of initial target indicator groups can be one or more, without limitation. "Same target data table" means that the data in the target data table is completely identical. By grouping first target indicators with the same target data table into one group, the number of calls to the same target data table can be reduced when querying this group of indicators, thereby improving the processing efficiency of indicator data. The target data table contains several target dimensions. Second target indicators belonging to the same target dimension in the initial target indicator group are further grouped together to obtain first target indicator groups. By grouping second target indicators with the same target dimension into one group, the number of calls to the target dimension can be reduced when querying this group of indicators, further improving the processing efficiency of indicator data.
[0080] For example, the indicator query request is used to request to query indicator 1, indicator 2, indicator 3, indicator 4, and indicator 5, wherein indicator 1 corresponds to target dimension 1 and target dimension 2 in target data table 1, and target dimension 3 and target dimension 4 in target data table 2; indicator 2 corresponds to target dimension 1, target dimension 2, and target dimension 5 in target data table 1; indicator 3 corresponds to target dimension 3 in target data table 2; indicator 4 corresponds to target dimension 6 and target dimension 7 in target data table 3; and indicator 5 corresponds to target dimension 8 and target dimension 9 in target data table 4. Based on the above grouping principle, indicators from the same data table are grouped together as initial target indicator groups. Indicators from the same data table corresponding to the same dimension in the initial target indicator groups are then grouped separately. Thus, indicator 1 and indicator 2 are grouped into group A, indicator 1 and indicator 3 into group B, indicator 4 is grouped separately into group C, and indicator 5 is grouped separately into group D.
[0081] S13, obtain the indicator features corresponding to each target indicator in the first target indicator group to obtain the indicator feature set, and detect whether the target indicator feature exists in the indicator feature set. When the detection result is that the target indicator feature exists in the indicator feature set, execute step S14.
[0082] In at least one embodiment of this application, the target indicator feature refers to the feature of an indicator that adversely affects the performance of indicator queries. By detecting the indicator features of the target indicator, indicators that adversely affect indicator queries can be identified in a timely manner, and these indicators can be queried separately in groups, thus ensuring the stability of indicator queries and improving the processing efficiency of indicator data. In one embodiment, the preset indicator includes an underlying query engine, Druid. When Druid involves multi-date queries, using the function TIME_FORMAT can lead to extremely low query performance. Therefore, it is necessary to perform separate group queries on indicators involving multi-date queries to improve query performance. Multi-date queries are one of the indicator features of this indicator.
[0083] Optionally, obtaining the indicator features corresponding to each target indicator in the first target indicator group includes:
[0084] Obtain the indicator definition corresponding to each of the aforementioned target indicators;
[0085] Extract feature keywords from the aforementioned indicator definition;
[0086] The feature keywords are combined according to a preset data format to obtain the indicator features corresponding to each target indicator.
[0087] The target indicator definition refers to the description of the business meaning and calculation formula corresponding to the target indicator. It is understood that the indicator definition includes the business meaning corresponding to the target indicator, which reflects the business identification content of the target indicator. The business meaning in the indicator definition is structured to obtain a structured indicator definition, and feature keywords are extracted from the structured indicator definition. The feature keywords are keywords used to identify indicator features. In one embodiment, the feature keywords can be dynamic date parameters, organization ranking parameters, etc., without limitation. In one embodiment, extracting feature keywords from the indicator definition may include: obtaining a preset feature keyword database and quantizing the preset feature keywords in the preset feature keyword database to obtain a preset feature keyword vector; vectorizing the indicator definition to obtain an indicator definition vector; detecting whether there exists a preset feature keyword vector whose distance to the indicator definition vector is less than a preset distance threshold; when the detection result indicates that there exists a preset feature keyword vector whose distance to the indicator definition vector is less than the preset distance threshold, determining that the preset keyword corresponding to the preset keyword vector is a feature keyword in the indicator definition. The preset distance threshold is a pre-set threshold for the distance between identification vectors. The preset data format is a pre-set format for combining the feature keywords. For example, the preset data format can be {feature keyword 1, feature keyword 2, feature keyword 3}.
[0088] Optionally, detecting whether the target indicator feature exists in the indicator feature set includes:
[0089] Obtain the target indicator features and the indicator features in the set of indicator features;
[0090] Calculate the similarity between the target indicator feature and the indicator feature;
[0091] Detect whether the similarity exceeds a preset similarity threshold;
[0092] When the detection result indicates that the similarity exceeds the preset similarity threshold, it is determined that the target indicator feature exists in the indicator feature set.
[0093] The preset similarity threshold is a pre-set threshold used to identify feature similarity, and is not limited here.
[0094] Optionally, when the detection result indicates that the target indicator feature does not exist in the indicator feature set, the query scenario corresponding to each target indicator in the first target indicator group is obtained, and the mapping relationship between the pre-set query scenario and the number of dimensions is traversed according to the query scenario to obtain the number of target dimensions corresponding to the query scenario; the priority information of the first target indicator group is obtained, and data processing is performed according to the priority information and the number of target dimensions to obtain the indicator value corresponding to the target indicator.
[0095] S14, process the first target indicator group to obtain the second target indicator group.
[0096] In at least one embodiment of this application, by promptly identifying indicators that adversely affect indicator queries and querying these indicators in separate groups, the stability of indicator queries can be ensured and the processing efficiency of indicator data can be improved. The second target indicator group refers to a group corresponding to multiple target indicators; the number of second target indicator groups can be one or more. Each second target indicator group can contain one or more target indicators.
[0097] Optionally, the grouping process for the first target indicator group to obtain the second target indicator group includes:
[0098] Determine the specific indicator corresponding to the target indicator characteristics;
[0099] The first target indicator group is split according to the specific indicator to obtain the second target indicator group.
[0100] Specifically, splitting the first target indicator group according to the specific indicator means dividing the specific indicator into a separate group to obtain the second target indicator group. For example, the first target indicator group includes a first indicator group A, a first indicator group B, and a first indicator group C, wherein the specific indicator exists in the first indicator group C. When the specific indicator is divided into a separate group D, the second target indicator group includes the first indicator group A, the first indicator group B, the first indicator group C after removing the specific indicator, and group D.
[0101] S15, obtain the query scenario corresponding to each target indicator in the second target indicator group, and traverse the pre-set mapping relationship between query scenarios and the number of dimensions according to the query scenario to obtain the number of target dimensions corresponding to the query scenario.
[0102] In at least one embodiment of this application, the query scenario can refer to the query difficulty and data processing difficulty scenarios corresponding to the target indicator. For different query scenarios, a corresponding number of dimensions can be set to optimize the query efficiency under that scenario. A mapping relationship exists between the query scenario and the number of dimensions; by querying this mapping relationship, the target number of dimensions corresponding to the query scenario can be obtained.
[0103] Optionally, the query scenario for obtaining the target indicator corresponding to each of the second target indicator groups includes:
[0104] Obtain the target dimension corresponding to each target indicator in the second target indicator group;
[0105] Obtain the initial query difficulty value and the initial indicator data processing difficulty value corresponding to each of the target dimensions;
[0106] Calculate the target query difficulty value and target indicator data processing difficulty value corresponding to the target indicator based on the initial query difficulty value and the initial indicator data processing difficulty value, and determine the query scenario corresponding to each target indicator based on the target query difficulty value and the target indicator data processing difficulty value.
[0107] The query difficulty and indicator data processing difficulty vary depending on the target dimension. For target dimensions with lower query difficulty and indicator data processing difficulty, the number of dimensions that can be queried is relatively large over a period of time; conversely, for target dimensions with higher query difficulty and indicator data processing difficulty, the number of dimensions that can be queried is relatively small over a period of time. The target indicator comprises several target dimensions. For each target dimension, there is a corresponding initial query difficulty value and an initial indicator data processing difficulty value, which can be preset.
[0108] In one embodiment, the calculation of the target query difficulty value and target indicator data processing difficulty value corresponding to the target indicator based on the initial query difficulty value and the initial indicator data processing difficulty value is equivalent to averaging the initial query difficulty values across all dimensions to obtain the target query difficulty, and averaging the initial indicator data processing difficulty values across all dimensions to obtain the target indicator data processing difficulty value. Arranging the target query difficulty and the target indicator data processing difficulty value according to a specific data format yields the query scenario corresponding to each target indicator.
[0109] In at least one embodiment of this application, there is a mapping relationship between the query scenario and the number of dimensions, and the target number of dimensions corresponding to the query scenario can be obtained by traversing the mapping relationship.
[0110] S16, obtain the priority information of the second target indicator group, and perform data processing according to the target dimension number based on the priority information to obtain the indicator value corresponding to the target indicator.
[0111] In at least one embodiment of this application, the priority information refers to the query priority order corresponding to the second target indicator group. Target indicators in the second target indicator group with higher priority can be queried first, while target indicators in the second target indicator group with lower priority can be queried later. In one embodiment, the second target indicator group containing a specific indicator can be set to the lowest priority. For the remaining groups that do not contain a specific indicator, the priority order is determined according to the number of indicators in the second target indicator group. The more indicators in the second target indicator group, the higher the corresponding priority, and the earlier they are queried. For example, if the second target indicator group A contains 3 indicators, and the number of indicators in the other second target indicator groups is less than 3, then the indicators in the second target indicator group A are queried first. When the second target indicator group A contains indicator 1, indicator 2, and indicator 3, data can be queried according to the number of target dimensions corresponding to each target indicator in a random query manner. The number of target dimensions is used to limit the maximum number of dimensions when querying the target indicator in a single query. Exceeding the number of target dimensions will lead to low efficiency in indicator data processing.
[0112] Optionally, before processing the data according to the priority information and the number of target dimensions to obtain the indicator value corresponding to the target indicator, the method further includes:
[0113] Obtain the target data table corresponding to the target indicator and the timestamp information of the target dimension;
[0114] Check whether the timestamp information is the same;
[0115] When the detection result indicates that the timestamp information is different, update the target data table and the target dimension corresponding to the target data table.
[0116] The timestamp information is used to identify the statistical date and period of the target data table and the target dimension. By detecting whether the timestamp information is the same, and updating the target data table and the corresponding target dimension with the latest timestamp when the detection result is that the timestamp information is different, it can be ensured that the indicator data is up-to-date and the indicator data on the large database side is synchronized, avoiding the problem of indicator value processing errors caused by indicator data asynchrony, and improving the accuracy of indicator data processing.
[0117] The indicator data processing method provided in this application, by grouping the target indicators and processing the data according to the priority information corresponding to the group, obtains the indicator value corresponding to the target indicator. This method can ensure the timeliness of indicator queries by separately grouping and querying indicators involving special configuration information when there are a large number of indicators to be queried. Furthermore, this application determines the number of target dimensions according to the query scenario corresponding to each target indicator, which further ensures the performance of indicator queries and thus improves the efficiency of indicator data processing. This application can be applied to various functional modules of smart cities, such as smart government affairs and smart transportation, including the indicator data processing module of smart government affairs, and can promote the rapid development of smart cities.
[0118] Figure 2 This is a structural diagram of the index data processing device provided in Embodiment 2 of this application.
[0119] In some embodiments, the indicator data processing device 20 may include a plurality of functional modules composed of computer program segments. The computer programs of each program segment in the indicator data processing device 20 may be stored in the memory of a computer device and executed by at least one processor to perform (see details). Figure 1 (Description) Functions for processing indicator data.
[0120] In this embodiment, the indicator data processing device 20 can be divided into multiple functional modules according to the functions it performs. These functional modules may include: a request parsing module 201, an indicator grouping module 202, a feature detection module 203, a scene acquisition module 204, and a priority acquisition module 205. The term "module" in this application refers to a series of computer program segments that can be executed by at least one processor and perform a fixed function, and which are stored in memory. In this embodiment, the functions of each module will be detailed in subsequent embodiments.
[0121] The request parsing module 201 can be used to parse the indicator query request when it receives an indicator query request to obtain a target indicator information set. The target indicator information set includes the target indicator, the target data table corresponding to the target indicator, and the target dimension corresponding to the target data table.
[0122] In at least one embodiment of this application, the indicator query request can refer to a request sent by an application terminal to a preset indicator terminal to query the corresponding indicator value. The number of indicators requested in the indicator query request is not limited; it can be one or more. This embodiment of the application takes an example where the number of requested indicators is multiple. The preset indicator terminal is a pre-built terminal for processing indicator data. One end of the preset indicator terminal is connected to several application terminals, and the other end is connected to a large database terminal. When the preset indicator terminal receives the indicator query request sent by the application terminal, it retrieves and processes the indicator data from the large database terminal to obtain the indicator value corresponding to the target indicator. The indicator value can be a numerical value obtained by calculating the indicator data of the target indicator according to a preset calculation formula. The preset calculation formula is a pre-set formula used to reflect the mathematical relationship between indicator data corresponding to relevant dimensions. The target indicator information set refers to a collection of information describing the target indicator. The target indicator set can include the target indicator, the target data table corresponding to the target indicator, and the target dimension corresponding to the target data table. The target data table can be stored in a large database. In one embodiment, the target metric can be a sales revenue metric, a profit metric, or a discount metric, etc., and the target data table can correspond to a product sales data table, etc. The target dimension corresponding to the product sales data table can include information such as product number, product name, shipping date, country, and region, etc., without limitation. Considering the reliability and privacy of data storage, the large database can be a target node on a blockchain.
[0123] Optionally, parsing the indicator query request to obtain a target indicator information set, the target indicator information set including the target indicator, the target data table corresponding to the target indicator, and the target dimensions corresponding to the target data table, including:
[0124] Parse the indicator query request and detect whether the indicator query request carries an indicator identifier;
[0125] When the detection result shows that the indicator identifier is carried in the indicator query request, the indicator identifier is extracted;
[0126] The target indicator is obtained by traversing the pre-set mapping relationship between the indicator identifier and the indicator.
[0127] Obtain the indicator definition corresponding to the target indicator, and select the target data table and the target dimension corresponding to the target data table according to the indicator definition.
[0128] The indicator identifier can be a number, letter, or color identifier, and there is no limitation thereto. The indicator identifier is used to uniquely identify the corresponding indicator. By detecting the indicator identifier carried in the indicator query request, the target indicator corresponding to the indicator identifier can be traversed. In one embodiment, the target indicator includes statistical date elements, statistical period elements, dimension elements, and indicator definition elements. The statistical date element refers to the cutoff date for statistical analysis of the data table corresponding to the target indicator; the statistical period element refers to the statistical time interval of the data table corresponding to the target indicator; the dimension element refers to several dimensions in the data table corresponding to the target indicator; and the indicator definition element describes the business meaning and calculation formula corresponding to the target indicator. It can be understood that the business meaning can refer to the role of the target indicator in business operations. For example, when the target indicator is a sales revenue indicator, the business meaning can be the total price and extra charges received by a taxpayer from the purchaser or recipient of taxable services or labor services when selling goods or providing taxable labor or labor services. The calculation formula reflects the mathematical relationship between the data corresponding to the relevant dimensions. The calculation formula contains several mathematical terms, each of which carries dimension information from the data table. By querying each mathematical term in the calculation formula, the target data table corresponding to the target indicator and the target dimension corresponding to the target data table can be obtained.
[0129] In at least one embodiment of this application, the preset indicator terminal can be connected to a cache. For example, the preset indicator terminal is connected to a Redis cache, which is used to store hot indicators for preheating. When the indicator query request is received, the corresponding hot indicators are preheated through the Redis cache, and the target indicator in the indicator query request is matched with the hot indicators. There is no need to process the indicator data of the target indicators one by one, which can improve the efficiency of indicator query.
[0130] Optionally, after receiving the indicator query request and before parsing the indicator query request to obtain the target indicator information set, the method further includes:
[0131] Obtain the historical indicator set and the indicator popularity value corresponding to each historical indicator in the historical indicator set;
[0132] Determine the target terminal associated with the indicator query request;
[0133] Construct a terminal profile corresponding to the target terminal, and select and preheat target historical indicators whose indicator popularity value is greater than a preset indicator popularity threshold based on the terminal profile.
[0134] The historical indicator set refers to the collection of indicators historically processed by the preset indicator terminal, and the historical indicator set contains several historical indicators. The indicator popularity value refers to the frequency with which the indicator is called and queried. The indicator popularity value of the historical indicator can be obtained by calculating the number of times the indicator is called and queried within a certain period of time. The target terminal refers to the terminal (i.e., the application terminal) that issues the indicator query request. In one embodiment, constructing the terminal image corresponding to the target terminal includes: obtaining the target business information corresponding to the target terminal; and constructing the terminal profile corresponding to the target terminal using the target business information as tags. The business information may include product number, product name, enterprise number, enterprise name, and the enterprise's main business scope, etc., and the corresponding tags may be product number tag, product name tag, enterprise number tag, enterprise name tag, and enterprise's main business scope tag. It can be understood that different business information corresponds to different indicator preferences. By constructing the terminal profile of the target terminal through the business information, and preheating the target historical indicators according to the terminal profile, and then matching the target indicator in the indicator query request with the target historical indicators, it is not necessary to process the indicator data of each target indicator one by one, which can improve the efficiency of indicator query.
[0135] The indicator grouping module 202 can be used to group the target indicators according to the target data table and the target dimension to obtain the first target indicator group.
[0136] In at least one embodiment of this application, when the number of indicators requested in the indicator query request is multiple, the processing efficiency of indicator data can be improved by performing grouped query processing on the multiple target indicators. The first target indicator group refers to a group corresponding to the multiple target indicators; the number of the first target indicator groups can be one or more. Each first target indicator group can contain one or more target indicators.
[0137] Optionally, the step of grouping the target indicators according to the target data table and the target dimension to obtain the first target indicator group includes:
[0138] Obtain the target data table corresponding to each of the target indicators;
[0139] Identify a first target indicator that is identical to the target data table, and group the first target indicator into a group to obtain an initial target indicator grouping;
[0140] Obtain the target dimension corresponding to each of the first target indicators in each of the initial target indicator groups;
[0141] Identify a second target indicator that is the same as the target dimension, and group the second target indicators into a group to obtain the first target indicator group.
[0142] Each target indicator has a corresponding target data table. First target indicators with the same target data table are grouped together to obtain initial target indicator groups. The number of initial target indicator groups can be one or more, without limitation. "Same target data table" means that the data in the target data table is completely identical. By grouping first target indicators with the same target data table into one group, the number of calls to the same target data table can be reduced when querying this group of indicators, thereby improving the processing efficiency of indicator data. The target data table contains several target dimensions. Second target indicators belonging to the same target dimension in the initial target indicator group are further grouped together to obtain first target indicator groups. By grouping second target indicators with the same target dimension into one group, the number of calls to the target dimension can be reduced when querying this group of indicators, further improving the processing efficiency of indicator data.
[0143] For example, the indicator query request is used to request to query indicator 1, indicator 2, indicator 3, indicator 4, and indicator 5, wherein indicator 1 corresponds to target dimension 1 and target dimension 2 in target data table 1, and target dimension 3 and target dimension 4 in target data table 2; indicator 2 corresponds to target dimension 1, target dimension 2, and target dimension 5 in target data table 1; indicator 3 corresponds to target dimension 3 in target data table 2; indicator 4 corresponds to target dimension 6 and target dimension 7 in target data table 3; and indicator 5 corresponds to target dimension 8 and target dimension 9 in target data table 4. Based on the above grouping principle, indicators from the same data table are grouped together as initial target indicator groups. Indicators from the same data table corresponding to the same dimension in the initial target indicator groups are then grouped separately. Thus, indicator 1 and indicator 2 are grouped into group A, indicator 1 and indicator 3 into group B, indicator 4 is grouped separately into group C, and indicator 5 is grouped separately into group D.
[0144] The feature detection module 203 can be used to obtain the indicator features corresponding to each target indicator in the first target indicator group, obtain the indicator feature set, and detect whether there are target indicator features in the indicator feature set.
[0145] In at least one embodiment of this application, the target indicator feature refers to the feature of an indicator that adversely affects the performance of indicator queries. By detecting the indicator features of the target indicator, indicators that adversely affect indicator queries can be identified in a timely manner, and these indicators can be queried separately in groups, thus ensuring the stability of indicator queries and improving the processing efficiency of indicator data. In one embodiment, the preset indicator includes an underlying query engine, Druid. When Druid involves multi-date queries, using the function TIME_FORMAT can lead to extremely low query performance. Therefore, it is necessary to perform separate group queries on indicators involving multi-date queries to improve query performance. Multi-date queries are one of the indicator features of this indicator.
[0146] Optionally, obtaining the indicator features corresponding to each target indicator in the first target indicator group includes:
[0147] Obtain the indicator definition corresponding to each of the aforementioned target indicators;
[0148] Extract feature keywords from the aforementioned indicator definition;
[0149] The feature keywords are combined according to a preset data format to obtain the indicator features corresponding to each target indicator.
[0150] The target indicator definition refers to the description of the business meaning and calculation formula corresponding to the target indicator. It is understood that the indicator definition includes the business meaning corresponding to the target indicator, which reflects the business identification content of the target indicator. The business meaning in the indicator definition is structured to obtain a structured indicator definition, and feature keywords are extracted from the structured indicator definition. The feature keywords are keywords used to identify indicator features. In one embodiment, the feature keywords can be dynamic date parameters, organization ranking parameters, etc., without limitation. In one embodiment, extracting feature keywords from the indicator definition may include: obtaining a preset feature keyword database and quantizing the preset feature keywords in the preset feature keyword database to obtain a preset feature keyword vector; vectorizing the indicator definition to obtain an indicator definition vector; detecting whether there exists a preset feature keyword vector whose distance to the indicator definition vector is less than a preset distance threshold; when the detection result indicates that there exists a preset feature keyword vector whose distance to the indicator definition vector is less than the preset distance threshold, determining that the preset keyword corresponding to the preset keyword vector is a feature keyword in the indicator definition. The preset distance threshold is a pre-set threshold for the distance between identification vectors. The preset data format is a pre-set format for combining the feature keywords. For example, the preset data format can be {feature keyword 1, feature keyword 2, feature keyword 3}.
[0151] Optionally, detecting whether the target indicator feature exists in the indicator feature set includes:
[0152] Obtain the target indicator features and the indicator features in the set of indicator features;
[0153] Calculate the similarity between the target indicator feature and the indicator feature;
[0154] Detect whether the similarity exceeds a preset similarity threshold;
[0155] When the detection result indicates that the similarity exceeds the preset similarity threshold, it is determined that the target indicator feature exists in the indicator feature set.
[0156] The preset similarity threshold is a pre-set threshold used to identify feature similarity, and is not limited here.
[0157] Optionally, when the detection result indicates that the target indicator feature does not exist in the indicator feature set, the query scenario corresponding to each target indicator in the first target indicator group is obtained, and the mapping relationship between the pre-set query scenario and the number of dimensions is traversed according to the query scenario to obtain the number of target dimensions corresponding to the query scenario; the priority information of the first target indicator group is obtained, and data processing is performed according to the priority information and the number of target dimensions to obtain the indicator value corresponding to the target indicator.
[0158] The indicator grouping module 202 can also be used to process the first target indicator group to obtain the second target indicator group when the detection result indicates that the target indicator feature exists in the indicator feature set.
[0159] In at least one embodiment of this application, by promptly identifying indicators that adversely affect indicator queries and querying these indicators in separate groups, the stability of indicator queries can be ensured and the processing efficiency of indicator data can be improved. The second target indicator group refers to a group corresponding to multiple target indicators; the number of second target indicator groups can be one or more. Each second target indicator group can contain one or more target indicators.
[0160] Optionally, the grouping process for the first target indicator group to obtain the second target indicator group includes:
[0161] Determine the specific indicator corresponding to the target indicator characteristics;
[0162] The first target indicator group is split according to the specific indicator to obtain the second target indicator group.
[0163] Specifically, splitting the first target indicator group according to the specific indicator means dividing the specific indicator into a separate group to obtain the second target indicator group. For example, the first target indicator group includes a first indicator group A, a first indicator group B, and a first indicator group C, wherein the specific indicator exists in the first indicator group C. When the specific indicator is divided into a separate group D, the second target indicator group includes the first indicator group A, the first indicator group B, the first indicator group C after removing the specific indicator, and group D.
[0164] The scenario acquisition module 204 can be used to acquire the query scenario corresponding to each of the target indicators in the second target indicator group, and to obtain the target dimension number corresponding to the query scenario by traversing the pre-set mapping relationship between the query scenario and the number of dimensions.
[0165] In at least one embodiment of this application, the query scenario can refer to the query difficulty and data processing difficulty scenarios corresponding to the target indicator. For different query scenarios, a corresponding number of dimensions can be set to optimize the query efficiency under that scenario. A mapping relationship exists between the query scenario and the number of dimensions; by querying this mapping relationship, the target number of dimensions corresponding to the query scenario can be obtained.
[0166] Optionally, the query scenario for obtaining the target indicator corresponding to each of the second target indicator groups includes:
[0167] Obtain the target dimension corresponding to each target indicator in the second target indicator group;
[0168] Obtain the initial query difficulty value and the initial indicator data processing difficulty value corresponding to each of the target dimensions;
[0169] Calculate the target query difficulty value and target indicator data processing difficulty value corresponding to the target indicator based on the initial query difficulty value and the initial indicator data processing difficulty value, and determine the query scenario corresponding to each target indicator based on the target query difficulty value and the target indicator data processing difficulty value.
[0170] The query difficulty and indicator data processing difficulty vary depending on the target dimension. For target dimensions with lower query difficulty and indicator data processing difficulty, the number of dimensions that can be queried is relatively large over a period of time; conversely, for target dimensions with higher query difficulty and indicator data processing difficulty, the number of dimensions that can be queried is relatively small over a period of time. The target indicator comprises several target dimensions. For each target dimension, there is a corresponding initial query difficulty value and an initial indicator data processing difficulty value, which can be preset.
[0171] In one embodiment, the calculation of the target query difficulty value and target indicator data processing difficulty value corresponding to the target indicator based on the initial query difficulty value and the initial indicator data processing difficulty value is equivalent to averaging the initial query difficulty values across all dimensions to obtain the target query difficulty, and averaging the initial indicator data processing difficulty values across all dimensions to obtain the target indicator data processing difficulty value. Arranging the target query difficulty and the target indicator data processing difficulty value according to a specific data format yields the query scenario corresponding to each target indicator.
[0172] In at least one embodiment of this application, there is a mapping relationship between the query scenario and the number of dimensions, and the target number of dimensions corresponding to the query scenario can be obtained by traversing the mapping relationship.
[0173] The priority acquisition module 205 can be used to acquire priority information of the second target indicator group, and perform data processing according to the target dimension number based on the priority information to obtain the indicator value corresponding to the target indicator.
[0174] In at least one embodiment of this application, the priority information refers to the query priority order corresponding to the second target indicator group. Target indicators in the second target indicator group with higher priority can be queried first, while target indicators in the second target indicator group with lower priority can be queried later. In one embodiment, the second target indicator group containing a specific indicator can be set to the lowest priority. For the remaining groups that do not contain a specific indicator, the priority order is determined according to the number of indicators in the second target indicator group. The more indicators in the second target indicator group, the higher the corresponding priority, and the earlier they are queried. For example, if the second target indicator group A contains 3 indicators, and the number of indicators in the other second target indicator groups is less than 3, then the indicators in the second target indicator group A are queried first. When the second target indicator group A contains indicator 1, indicator 2, and indicator 3, data can be queried according to the number of target dimensions corresponding to each target indicator in a random query manner. The number of target dimensions is used to limit the maximum number of dimensions when querying the target indicator in a single query. Exceeding the number of target dimensions will lead to low efficiency in indicator data processing.
[0175] Optionally, before processing the data according to the priority information and the number of target dimensions to obtain the indicator value corresponding to the target indicator, the method further includes:
[0176] Obtain the target data table corresponding to the target indicator and the timestamp information of the target dimension;
[0177] Check whether the timestamp information is the same;
[0178] When the detection result indicates that the timestamp information is different, update the target data table and the target dimension corresponding to the target data table.
[0179] The timestamp information is used to identify the statistical date and period of the target data table and the target dimension. By detecting whether the timestamp information is the same, and updating the target data table and the corresponding target dimension with the latest timestamp when the detection result is that the timestamp information is different, it can be ensured that the indicator data is up-to-date and the indicator data on the large database side is synchronized, avoiding the problem of indicator value processing errors caused by indicator data asynchrony, and improving the accuracy of indicator data processing.
[0180] See Figure 3 The diagram shown is a structural schematic of a computer device provided in Embodiment 3 of this application. In a preferred embodiment of this application, the computer device 3 includes a memory 31, at least one processor 32, at least one communication bus 33, and a transceiver 34.
[0181] Those skilled in the art should understand that Figure 3 The structure of the computer device shown does not constitute a limitation of the embodiments of this application. It can be a bus structure or a star structure. The computer device 3 may also include more or fewer other hardware or software than shown, or different component arrangements.
[0182] In some embodiments, the computer device 3 is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The computer device 3 may also include client devices, which include, but are not limited to, any electronic product that can interact with a client via a keyboard, mouse, remote control, touchpad, or voice control device, such as personal computers, tablet computers, smartphones, and digital cameras.
[0183] It should be noted that the computer device 3 described is merely an example. Other existing or future electronic products that are suitable for this application should also be included within the scope of protection of this application and are incorporated herein by reference.
[0184] In some embodiments, the memory 31 stores a computer program that, when executed by the at least one processor 32, implements all or part of the steps in the index data processing method described above. The memory 31 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.
[0185] Furthermore, the computer-readable storage medium may primarily include a program storage area and a data storage area, wherein the program storage area may store the operating system, at least one application required for a function, etc.; and the data storage area may store data created based on the use of blockchain nodes, etc.
[0186] The blockchain referred to in this application is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.
[0187] In some embodiments, the at least one processor 32 is the control unit of the computer device 3, connecting various components of the computer device 3 via various interfaces and lines. It executes programs or modules stored in the memory 31 and calls data stored in the memory 31 to perform various functions and process data. For example, when the at least one processor 32 executes the computer program stored in the memory, it implements all or part of the steps of the index data processing method described in this application embodiment; or it implements all or part of the functions of the index data processing device. The at least one processor 32 may be composed of integrated circuits, such as a single-packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips.
[0188] In some embodiments, the at least one communication bus 33 is configured to enable communication between the memory 31 and the at least one processor 32, etc.
[0189] Although not shown, the computer device 3 may also include a power supply (such as a battery) to power various components. Preferably, the power supply can be logically connected to the at least one processor 32 via a power management device, thereby enabling functions such as charging, discharging, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The computer device 3 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0190] The integrated unit implemented as a software functional module described above can be stored in a computer-readable storage medium. This software functional module, stored in a storage medium, includes several instructions to cause a computer device (which may be a personal computer, a computer device, or a network device, etc.) or a processor to execute portions of the methods described in the various embodiments of this application.
[0191] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0192] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0193] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0194] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that it can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other elements or, and the singular does not exclude the plural. Multiple elements or devices recited in the specification may also be implemented by a single element or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any particular order.
[0195] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.
Claims
1. An index data processing method characterized by, The index data processing method comprises: When receiving an index query request, the index query request is parsed to obtain a target index information set, the target index information set comprising a target index, a target data table corresponding to the target index, and a target dimension corresponding to the target data table; The target index is grouped and processed according to the target data table and the target dimension to obtain a first target index group, comprising: acquiring the target data table corresponding to each target index; determining a first target index with the same target data table, and dividing the first target index into a group to obtain an initial target index group; acquiring the target dimension corresponding to each first target index in each initial target index group; determining a second target index with the same target dimension, and dividing the second target index into a group to obtain a first target index group; Acquiring the index feature corresponding to each target index in the first target index group obtains an index feature set, and it is detected whether there is a target index feature in the index feature set; When the detection result is that there is a target index feature in the index feature set, the first target index group is grouped and processed to obtain a second target index group; Acquiring the query scene corresponding to each target index in the second target index group, and according to the query scene, a mapping relationship between a query scene and a dimension number is traversed to obtain a target dimension number corresponding to the query scene; Acquiring the priority information of the second target index group, and according to the priority information, data processing is performed according to the target dimension number to obtain an index value corresponding to the target index.
2. The indicator data processing method of claim 1, wherein, The parsing of the index query request to obtain a target index information set, the target index information set comprising a target index, a target data table corresponding to the target index, and a target dimension corresponding to the target data table, comprises: The index query request is parsed, and it is detected whether the index query request carries an index identifier; When the detection result is that the index query request carries the index identifier, the index identifier is extracted; According to the index identifier, a mapping relationship between an index identifier and an index is traversed to obtain a target index; Acquiring the index definition corresponding to the target index, and according to the index definition, a target data table and a target dimension corresponding to the target data table are selected.
3. The indicator data processing method of claim 1, wherein, The grouping and processing of the first target index group to obtain a second target index group comprises: Determining a specific index corresponding to the target index feature; According to the specific index, the first target index group is split to obtain a second target index group.
4. The indicator data processing method of claim 2, wherein, The acquisition of the index feature corresponding to each target index in the first target index group comprises: Acquiring the index definition corresponding to each target index; Extracting a feature keyword from the index definition; Combining the feature keyword according to a preset data format to obtain the index feature corresponding to each target index.
5. The indicator data processing method of claim 1, wherein, The acquisition of the query scene corresponding to each target index in the second target index group comprises: acquire a target dimension corresponding to each of the target indicators in the second target indicator group; acquire an initial query difficulty value and an initial indicator data processing difficulty value corresponding to each of the target dimensions; calculate a target query difficulty value and a target indicator data processing difficulty value corresponding to the target indicators according to the initial query difficulty value and the initial indicator data processing difficulty value, and determine a query scenario corresponding to each of the target indicators according to the target query difficulty value and the target indicator data processing difficulty value.
6. The indicator data processing method of claim 1, wherein, Before the data processing according to the priority information and the target dimension quantity to obtain the indicator value corresponding to the target indicators, the method further comprises: acquire the target data table corresponding to the target indicators and timestamp information of the target dimensions; detect whether the timestamp information is the same; when the detection result is that the timestamp information is not the same, update the target data table and the target dimensions corresponding to the target data table.
7. An index data processing apparatus for executing the index data processing method according to any one of claims 1 to 6, characterized by The indicator data processing device comprises: a request analysis module configured to analyze a target indicator information set including a target indicator, a target data table corresponding to the target indicator, and target dimensions corresponding to the target data table when receiving an indicator query request; an indicator grouping module configured to group process the target indicators according to the target data table and the target dimensions to obtain a first target indicator group; a feature detection module configured to acquire indicator features corresponding to each of the target indicators in the first target indicator group to obtain an indicator feature set, and detect whether there is a target indicator feature in the indicator feature set; the indicator grouping module is further configured to group process the first target indicator group to obtain a second target indicator group when the detection result is that there is the target indicator feature in the indicator feature set; a scenario acquisition module configured to acquire a query scenario corresponding to each of the target indicators in the second target indicator group, and obtain a target dimension quantity corresponding to the query scenario according to a pre-set mapping relationship between the query scenario and the dimension quantity; a priority acquisition module configured to acquire priority information of the second target indicator group, and perform data processing according to the priority information and the target dimension quantity to obtain an indicator value corresponding to the target indicators.
8. A computer device, comprising: The computer device comprises a processor configured to implement the indicator data processing method according to any one of claims 1 to 6 when executing a computer program stored in a memory.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that The computer program is configured to implement the indicator data processing method according to any one of claims 1 to 6 when executed by a processor.
Citation Information
Patent Citations
Method and device for querying multi-dimensional data
CN108932257A
Data inquiry method and device
CN109213829A