Calculation method and device of index data, equipment, storage medium and program product
By parsing indicator information and setting preset calculation rules, multiple computing nodes are used to process document data, which solves the problem of low indicator calculation efficiency in the existing technology and achieves efficient indicator data calculation.
Patent Information
- Application Number
- CN202410881497.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-08-30
AI Technical Summary
The existing indicator data calculation methods have low calculation efficiency, resulting in slow indicator calculation speed and difficulty in meeting the calculation needs of complex indicators.
By obtaining the indicator calculation instructions, parsing the target indicator information, determining the target indicator type and document data collection, and setting preset calculation rules according to different indicator types, using multiple calculation nodes (filtering, mapping, aggregation, sorting, merging, splitting) Nodes) process document data in a preset order to achieve efficient calculation of indicator data.
It improves the calculation efficiency of indicator data, reduces the number of data placements, simplifies the indicator calculation logic, and improves the calculation speed of complex indicators.
Smart Images

Figure CN118569733A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of indicator calculation, and in particular to an indicator data calculation method, device, equipment, storage medium and program product. Background Art
[0002] Indicators are digital representations used to measure, analyze and compare specific phenomena, events or business activities. Indicators can reflect the production and operation status of an enterprise and provide data support for enterprise decision-making. Therefore, as one of the important links in data warehouse construction, data indicator construction involves a large number of complex calculations in order to ensure that the indicators reflect the actual situation comprehensively and accurately while being practical.
[0003] In order to realize complex indicator calculation, the existing indicator data calculation method requires data warehouse developers to manually write scripts to calculate indicators, or manage the indicator system through the indicator platform, establish a separate indicator library, and automatically generate structured query language for indicator calculation.
[0004] However, the existing indicator data calculation methods are slow and have low calculation efficiency when calculating indicators. Summary of the invention
[0005] The embodiments of the present application provide a method, apparatus, device, storage medium and program product for calculating indicator data, so as to solve the problem of low efficiency in calculating the existing indicator data.
[0006] In a first aspect, the present application provides a method for calculating indicator data, comprising:
[0007] Obtaining an indicator calculation instruction, wherein the indicator calculation instruction includes: target indicator information;
[0008] Parsing the target indicator information to obtain target indicator elements, and determining the target indicator type and the document data set corresponding to the target indicator type according to the target indicator elements;
[0009] Determining a target calculation rule corresponding to the target indicator type, the target calculation rule comprising a plurality of target calculation nodes connected in a target execution order;
[0010] Each target computing node processes the document data set in turn according to the target execution order to obtain target indicator data.
[0011] In a possible implementation manner, before obtaining the target indicator information, the method further includes:
[0012] Setting a plurality of preset computing nodes, wherein different preset computing nodes are used to perform different document data processing operations;
[0013] Acquire multiple indicator types and indicator elements corresponding to each indicator type, wherein the indicator types include: atomic indicators, derived indicators, and composite indicators;
[0014] According to the indicator elements corresponding to each indicator type and the preset calculation nodes, the preset calculation rules corresponding to the multiple indicator types are determined, and the indicator elements include: time period, aggregation function, dimension information, modifiers, limitation information, and expression.
[0015] In a possible implementation, the preset computing nodes include: a filtering node, a mapping node, an aggregation node, a sorting node, a merging node, and a splitting node;
[0016] The filtering node is used to filter the document data and return the filtered document data;
[0017] The aggregation node is used to perform grouping and aggregation processing on multiple document data and obtain an aggregation value;
[0018] The mapping node is used to modify the field structure of the document data;
[0019] The sorting node is used to sort the document data;
[0020] The merging node is used to merge the same document fields in the document data;
[0021] The split node is used to split the array field in the document data.
[0022] In a possible implementation, determining the preset calculation rules corresponding to the multiple indicator types according to the indicator elements corresponding to each indicator type and the preset calculation nodes includes:
[0023] When the indicator elements of the atomic indicator are a time period, an aggregation function, and dimension information, the filtering node, the mapping node, and the aggregation node are sequentially connected according to a first preset execution order to obtain a first preset calculation rule;
[0024] When the indicator elements of the derived indicator are a time period, an aggregation function, dimension information, and limiting information, the filtering node, the mapping node, the aggregation node, the sorting node, the merging node, and the splitting node are sequentially connected according to a second preset execution order to obtain a second preset calculation rule;
[0025] When the indicator elements of the composite indicator are multiple atomic indicators and / or multiple derived indicators and operation rules with the same dimensional information, the filtering node, the mapping node and the merging node are connected in sequence according to a third preset execution order to obtain a third preset calculation rule.
[0026] In a possible implementation, the target indicator data includes: target atomic indicator data, and each target computing node processes the document data set in sequence according to the target execution order to obtain the target indicator data, including:
[0027] When the target calculation rule is the first preset calculation rule;
[0028] By means of the filtering node, the document data set is filtered according to a first time period to obtain first document data, and the first document data is input into the mapping node;
[0029] By means of the mapping node, mapping processing is performed on the first document data according to the first dimension information to obtain second document data, and the second document data is input into the aggregation node;
[0030] Through the aggregation node, the second document data is aggregated according to the first aggregation function to obtain a first aggregation value, and the first aggregation value is input into the mapping node so that the mapping node generates target atomic indicator data according to the first dimension information and the first aggregation value.
[0031] In a possible implementation, the target indicator data includes: target derived indicator data, each target computing node processes the document data set in sequence according to the target execution order to obtain the target indicator data, and further includes:
[0032] When the target calculation rule is the second preset calculation rule;
[0033] Through the filtering node, filtering the document data set according to the second time period and the target modifier to obtain third document data, and inputting the third document data into the mapping node;
[0034] By means of the mapping node, mapping processing is performed on the third document data according to the second dimension information to obtain fourth document data, and the fourth document data is input into the aggregation node;
[0035] Through the aggregation node, the fourth document data is aggregated according to the target limitation information, and a second aggregation value is obtained, and the second aggregation value is input into the mapping node, so that the mapping node generates target derived indicator data according to the second dimension information and the second aggregation value.
[0036] In a possible implementation, the target indicator data includes: target composite indicator data, each target computing node processes the document data set in sequence according to the target execution order to obtain the target indicator data, and further includes:
[0037] When the target calculation rule is the third preset calculation rule;
[0038] By means of the filtering node, the document data set is filtered according to a third time period to obtain a plurality of fifth document data, and the plurality of fifth document data is input into the mapping node;
[0039] By means of the mapping node, mapping processing is performed on the plurality of fifth document data according to the third dimension information to obtain a plurality of sixth document data, and the plurality of sixth document data is input into the merging node;
[0040] Merging the plurality of sixth document data into seventh document data through the merging node, and inputting the seventh document data into the mapping node;
[0041] The seventh document data is calculated and processed through the mapping node according to the target expression to obtain a target value, and target composite indicator data is generated according to the third dimension information and the target value.
[0042] In a second aspect, the present application provides a device for calculating indicator data, comprising:
[0043] An acquisition module is used to acquire an indicator calculation instruction, wherein the indicator calculation instruction includes: target indicator information;
[0044] A processing module, used to parse the target indicator information to obtain target indicator elements, and determine the target indicator type and the document data set corresponding to the target indicator type according to the target indicator elements;
[0045] The processing module is further used to determine a target calculation rule corresponding to the target indicator type, wherein the target calculation rule includes a plurality of target calculation nodes connected in a target execution order;
[0046] The processing module is also used to process the document data set in sequence through each target computing node according to the target execution order to obtain target indicator data.
[0047] In a possible implementation manner, the processing module is further used to set a plurality of preset computing nodes, wherein different preset computing nodes are used to perform different document data processing operations;
[0048] The acquisition module is further used to acquire multiple indicator types and indicator elements corresponding to each indicator type, wherein the indicator types include: atomic indicators, derived indicators, and composite indicators;
[0049] The processing module is also used to determine the preset calculation rules corresponding to the multiple indicator types based on the indicator elements corresponding to each indicator type and the preset calculation nodes, and the indicator elements include: time period, aggregation function, dimension information, modifiers, limitation information, and expression.
[0050] In a possible implementation, the preset computing nodes include: a filtering node, a mapping node, an aggregation node, a sorting node, a merging node, and a splitting node;
[0051] The filtering node is used to filter the document data and return the filtered document data;
[0052] The aggregation node is used to perform grouping and aggregation processing on multiple document data and obtain an aggregation value;
[0053] The mapping node is used to modify the field structure of the document data;
[0054] The sorting node is used to sort the document data;
[0055] The merging node is used to merge the same document fields in the document data;
[0056] The split node is used to split the array field in the document data.
[0057] In a possible implementation, the processing module is further configured to, when the indicator elements of the atomic indicator are a time period, an aggregation function, and dimension information, sequentially connect the filtering node, the mapping node, and the aggregation node according to a first preset execution order to obtain a first preset calculation rule;
[0058] The processing module is further configured to connect the filtering node, the mapping node, the aggregation node, the sorting node, the merging node and the splitting node in sequence according to a second preset execution order to obtain a second preset calculation rule when the indicator elements of the derived indicator are a time period, an aggregation function, dimension information and limiting information;
[0059] The processing module is also used to connect the filtering node, the mapping node and the merging node in sequence according to a third preset execution order to obtain a third preset calculation rule when the indicator elements of the composite indicator are multiple atomic indicators and / or multiple derived indicators and operation rules with the same dimensional information.
[0060] In a possible implementation manner, the processing module is further configured to, when the target calculation rule is the first preset calculation rule;
[0061] By means of the filtering node, the document data set is filtered according to a first time period to obtain first document data, and the first document data is input into the mapping node;
[0062] The processing module is further configured to perform mapping processing on the first document data according to the first dimension information through the mapping node to obtain second document data, and input the second document data into the aggregation node;
[0063] The processing module is also used to aggregate the second document data through the aggregation node according to the first aggregation function, and obtain a first aggregation value, and input the first aggregation value to the mapping node so that the mapping node generates target atomic indicator data according to the first dimensional information and the first aggregation value.
[0064] In a possible implementation manner, the processing module is further configured to, when the target calculation rule is the second preset calculation rule;
[0065] The processing module is further used to filter the document data set according to the second time period and the target modifier through the filtering node to obtain third document data, and input the third document data into the mapping node;
[0066] The processing module is further configured to perform mapping processing on the third document data according to the second dimension information through the mapping node to obtain fourth document data, and input the fourth document data into the aggregation node;
[0067] The processing module is also used to aggregate the fourth document data through the aggregation node according to the target limitation information, and obtain a second aggregation value, and input the second aggregation value to the mapping node so that the mapping node generates target derived indicator data according to the second dimension information and the second aggregation value.
[0068] In a possible implementation manner, the processing module is further configured to, when the target calculation rule is the third preset calculation rule;
[0069] The processing module is further configured to filter the document data set according to a third time period through the filtering node to obtain a plurality of fifth document data, and input the plurality of fifth document data to the mapping node;
[0070] The processing module is further configured to perform mapping processing on the plurality of fifth document data according to the third dimension information through the mapping node to obtain a plurality of sixth document data, and input the plurality of sixth document data into the merging node;
[0071] The processing module is further configured to merge the plurality of sixth document data into seventh document data through the merging node, and input the seventh document data into the mapping node;
[0072] The processing module is further used to calculate and process the seventh document data according to the target expression through the mapping node to obtain a target value, and generate target composite indicator data according to the third dimension information and the target value.
[0073] In a third aspect, an embodiment of the present application provides an indicator data calculation device, including: a memory, a processor;
[0074] The memory stores computer-executable instructions;
[0075] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the method for calculating indicator data as described in the first aspect and / or various possible implementations of the first aspect.
[0076] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement the method for calculating the indicator data as described in the first aspect and / or various possible implementation methods of the first aspect.
[0077] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method for calculating indicator data as described in the first aspect and / or various possible implementations of the first aspect.
[0078] The indicator data calculation method, device, equipment, storage medium and program product provided in the embodiments of the present application, after obtaining the indicator calculation task, parse the indicator calculation information to obtain the target indicator elements, and determine the target indicator type and the document data set corresponding to the target indicator type according to the target indicator elements, so as to determine the target calculation rule corresponding to the target indicator type, and finally, based on multiple target calculation nodes set in the target calculation rule, in accordance with the target execution order, sequentially process the document data set to obtain the target indicator data; the method improves the calculation efficiency of the indicator data by formulating corresponding indicator calculation logic for different indicators and adopting common calculation nodes to realize the calculation of the indicator data. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0080] Figure 1 A schematic diagram of the scenario for the calculation method of the indicator data provided for this application;
[0081] Figure 2 Schematic diagram of the calculation method of the indicator data provided for this application Figure 1 ;
[0082] Figure 3 Schematic diagram of the calculation method of the indicator data provided for this application Figure 2 ;
[0083] Figure 4 Schematic diagram of the calculation method of the indicator data provided for this application Figure 3 ;
[0084] Figure 5 Schematic diagram of the calculation method of the indicator data provided for this application Figure 4 ;
[0085] Figure 6 Schematic diagram of the calculation method of the indicator data provided for this application Figure 5 ;
[0086] Figure 7 A schematic diagram of the structure of the device for calculating the indicator data provided by this application;
[0087] Figure 8 A schematic diagram of the structure of the computing device for the indicator data provided in this application.
[0088] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0089] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0090] The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein.
[0091] In the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0092] Indicators are digital representations used to measure, analyze and compare specific phenomena, events or business activities. Indicators can reflect the production and operation status of an enterprise and provide data support for enterprise decision-making. Therefore, as one of the important links in data warehouse construction, data indicator construction involves a large number of complex calculations in order to ensure that the indicators reflect the actual situation comprehensively and accurately while being practical.
[0093] In order to realize complex indicator calculation, there are usually two existing indicator data calculation methods. One is that data warehouse developers manually write scripts to calculate indicators according to indicator calculation requirements. The other is to manage the indicator system through the indicator platform, establish a separate indicator library, and automatically generate structured query language (SQL) for indicator calculation.
[0094] The above two methods have the following problems respectively:
[0095] 1) The traditional method of manually developing indicators by data warehouse developers has a long indicator development cycle, and each new indicator needs to be manually written for indicator calculation and processing logic, which results in very low indicator calculation efficiency.
[0096] 2) The method of automatically generating SQL for indicator calculation through the indicator platform improves the efficiency of indicator processing, but it still has certain limitations. Different indicators will have different dimensional information, and the indicator dimensional information may change with the change of demand. When facing the logically complex indicator calculation, the SQL will be extremely large, and it may be necessary to write very long and very complex query statements, resulting in slow execution.
[0097] In short, the existing indicator data calculation methods are slow and have low calculation efficiency when calculating indicators with complex logic.
[0098] First, the types of indicators involved in this application are explained:
[0099] Atomic indicators: They are the basic indicators that constitute other indicators. They are used to describe a specific event, behavior or state, such as sales, production value, number of visits, etc. They are the smallest measurable unit.
[0100] Derived indicators are derived from atomic indicators. They define their own dimensional information and aggregation methods based on atomic indicators. They usually also include time period limitations, modifier limitations, and some special limitations, such as proportion, ranking, year-on-year growth, etc.
[0101] Composite indicators: They are calculated from multiple atomic indicators and derived indicators with the same dimensions through certain operation rules, such as per capita consumption value.
[0102] Figure 1 A schematic diagram of the scenario of the calculation method of the indicator data provided for this application, such as Figure 1 As shown, computing nodes A, B, and C are connected to form an indicator computing pipeline, which can calculate indicator data of atomic indicator types, and each computing node has different data processing functions.
[0103] For example, computing node A is a filtering node, computing node B is a mapping node, and computing node C is an aggregation node. If the definition of the indicator to be calculated is: total sales in 2023, where the time period is "2023", the dimension information is "sales", and the aggregation method is "sum", after obtaining the original data in document format, the original data is input into computing node A, and the original data is filtered by computing node A for a time period, where "year" is determined as the time granularity, "January 1, 2023" is the start time, and "December 31, 2023" is the end time, and the filtered document data is returned, and the filtered document data is input into computing node B. Through computing node B, the input document The data is mapped. Specifically, only the field list corresponding to the dimension information "sales" is retained. At the same time, the "year" field can be added to the document data structure to facilitate subsequent aggregation processing according to the year. Calculation node B inputs the document data obtained after calculation into calculation node C, so that through calculation node C, the aggregation function is determined to be "sum" according to the summary method, and all the data to be aggregated are summed to obtain the aggregation result field: 20000. The aggregation result field is input into calculation node B, and then mapped. The purpose is to retain only the fields corresponding to the indicator dimension information and the aggregation result fields. For example, the indicator calculation data finally output by calculation node B is "total sales in 2023": 20000.
[0104] The method for calculating indicator data provided in the present application is based on the flexibility of data structure in document-type databases, uses document-type databases as the repository of indicators, and according to the common logic of indicator calculation, abstracts multiple general computing nodes of atomic granularity in the indicator calculation process, and defines different calculation rules for indicator types of different complexity. Therefore, when calculating indicators, different types of indicator calculations are completed through the combination of multiple preset computing nodes to improve the calculation speed when calculating complex indicators. Moreover, each node is processed in the form of a pipeline, and the input of each node is the indicator data before calculation, and the output is the indicator data after calculation, which serves as the input of the next node, reducing the number of data drops to disk, thereby improving the efficiency of indicator data calculation.
[0105] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0106] Figure 2 Schematic diagram of the process of calculating the indicator data provided in the embodiment of the present application Figure 1The execution subject of this embodiment is, for example, a device for calculating indicator data. Figure 2 As shown, the calculation method of indicator data provided in this embodiment includes:
[0107] S201. Obtain an indicator calculation instruction, where the indicator calculation instruction includes: target indicator information.
[0108] Among them, the indicator calculation instruction is used to instruct the calculation of target indicator data, and the target indicator information refers to the definition of the target indicator data, for example, it can be: indicator name, data source, calculation formula and other indicator elements.
[0109] S202: parse the target indicator information to obtain target indicator elements, and determine the target indicator type and the document data set corresponding to the target indicator type according to the target indicator elements.
[0110] Among them, the target indicator element refers to the indicator element that has an association relationship with the target indicator type among the multiple indicator elements contained in the target indicator information. The target indicator type includes: atomic indicators, derived indicators and composite indicators, etc. The document data set refers to the original data corresponding to the target indicator type.
[0111] It can be understood that after receiving the target indicator calculation task, it is necessary to extract the indicator elements that can be used to determine the target indicator type from all the indicator elements in the target indicator information, that is, the target indicator elements, such as: time period, dimension information, limitation information, modifiers, expressions, etc., and determine the target indicator type based on the association between the target indicator elements and the pre-set indicator types. For example, if the target indicator elements obtained by analysis only have time period, dimension information and aggregation function, it can be determined that the target indicator type is an atomic indicator, that is, the most basic indicator type.
[0112] In this step, after determining the type of indicator to be calculated, it is necessary to collect the original data corresponding to the indicator type from the target database. This is because different types of indicators have different data processing levels and complexities, so different indicator types have different document data sets. The target database refers to a document database, such as mongodb or elasticsearch.
[0113] For example, an atomic indicator is a basic indicator, and its corresponding document data set is quantitative business data, such as annual sales; a derived indicator is derived from an atomic indicator, and is an indicator type that defines its own dimensional information and aggregation method based on the atomic indicator. Therefore, the document data set corresponding to a derived indicator can be at least one atomic indicator data; the document data set corresponding to a composite indicator can be multiple atomic indicator data and / or multiple derived indicator data.
[0114] S203: Determine a target calculation rule corresponding to the target indicator type, wherein the target calculation rule includes a plurality of target calculation nodes connected in a target execution order.
[0115] The target calculation rule refers to a pre-set calculation rule based on the commonly used calculation logic of the target indicator type, and the target calculation node refers to a preset calculation node in the target calculation rule that can obtain the target indicator data by processing the document data set in a certain order.
[0116] It is understandable that the same type of indicators may also lead to different execution orders of target computing nodes due to different aggregation functions in the indicator elements. For example, when the aggregation function of the atomic indicator is counting, the connection order of the target computing nodes is: filtering node, mapping node, aggregation node and mapping node; when the aggregation function of the atomic indicator is deduplication counting, two aggregation processes are required. At this time, the connection order of the target computing nodes is: filtering node, mapping node, aggregation node (deduplication counting), aggregation node (count aggregation), mapping node.
[0117] S204. Each target computing node processes the document data set in turn according to the target execution order to obtain target indicator data.
[0118] Among them, different target computing nodes are used to perform data processing operations with different functions. Therefore, each target computing node performs data processing on the document data set in turn, and the document data set is used as the input data of the first target computing node and input into the first target computing node. After the first target computing node performs corresponding data processing operations on the document data, the calculated indicator data is input into the second target computing node so that the second target computing node performs data processing, and the processed indicator data is input into the third target computing node, and so on, until the last target computing node outputs the target indicator data corresponding to the indicator calculation instruction, and the target indicator data is used to indicate dimension information and measurement values, including fields corresponding to the dimension information and calculation result fields.
[0119] It can be understood that after each target computing node executes the computing operation, according to the execution log of each target computing node, the execution status of the indicator calculation in each link can also be monitored to facilitate the troubleshooting of the cause of the problem.
[0120] The method for calculating indicator data provided in the embodiment of the present application, after obtaining the indicator calculation task, parses the indicator calculation information to obtain the target indicator elements, and determines the target indicator type and the document data set corresponding to the target indicator type according to the target indicator elements, thereby determining the target calculation rule corresponding to the target indicator type, and finally, based on multiple target calculation nodes set in the target calculation rule, in accordance with the target execution order, sequentially processes the document data set to obtain the target indicator data; the method improves the calculation efficiency of the indicator data by formulating corresponding indicator calculation logic for different indicators and adopting common calculation nodes to realize the calculation of the indicator data.
[0121] Figure 3 Schematic diagram of the calculation method of the indicator data provided for this application Figure 2 ,like Figure 3 As shown, in this embodiment Figure 2 Based on the embodiment, the process of setting the preset calculation rules before calculating the target indicator data is described in detail. The calculation method of the indicator data provided in this embodiment includes:
[0122] S301. Set a plurality of preset computing nodes.
[0123] Different preset computing nodes are used to perform different document data processing operations, and the multiple preset computing nodes include: filtering nodes, mapping nodes, aggregation nodes, sorting nodes, merging nodes, and splitting nodes.
[0124] The functions of the above-mentioned multiple preset computing nodes are explained in turn below:
[0125] Filter node: used to filter document data and return the filtered document data.
[0126] Aggregation node: used to group and aggregate multiple document data and obtain aggregate values. Aggregation nodes refer to calculation nodes that perform statistical results through aggregation functions. Aggregation functions can be, for example, count, deduplication count, average, sum, maximum value, minimum value, etc.
[0127] Mapping node: used to modify the field structure of document data, for example, rename document fields, add or delete fields, add calculated fields, etc.
[0128] Sorting node: used to sort document data and output the sorted document data.
[0129] Merge node: used to merge the same document fields in the document data so as to perform calculations in the same row of document data.
[0130] Split node: used to split the array fields in the document data, for example, split a document into multiple document data.
[0131] S302: Obtain multiple indicator types and indicator elements corresponding to each indicator type.
[0132] Among them, the indicator types include: atomic indicators, derived indicators, composite indicators, etc., and the indicator elements include: time period, aggregation function, dimension information, modifiers, limitation information, expressions, etc.
[0133] Here, the time period includes: time granularity, start time, and end time; the aggregation function refers to the aggregation method when calculating indicators; the dimension information is used to indicate the description angle or characteristics of the indicator, such as: city, product category, brand, customer age, customer gender, etc.; the modifier refers to a special dimension based on the dimension information and limited by special conditions, so as to better count the scope of the target; the limiting information refers to special qualifiers based on the aggregation method, such as: proportion, ranking, year-on-year, quarter-on-quarter, etc.; the expression refers to the operation rules between multiple atomic indicators and / or derived indicators, which are used to calculate composite indicators, such as weight expressions, formula expressions and function expressions.
[0134] For example, according to the complexity and comprehensiveness of different indicator types in reflecting business conditions, the indicator elements of atomic indicators can be obtained as follows: time period, dimension information and aggregation function; the indicator elements of derived indicators are: time period, dimension information, modifiers, and limiting information; and the indicator elements of composite indicators are: time period, dimension information and expression.
[0135] S303: Determine preset calculation rules corresponding to the multiple indicator types according to the indicator elements corresponding to each indicator type and the preset calculation nodes.
[0136] Exemplarily, when the indicator elements of the atomic indicator are a time period, an aggregation function, and dimensional information, the filtering node, the mapping node, and the aggregation node are connected in sequence according to a first preset execution order to obtain a first preset calculation rule.
[0137] When the indicator elements of the derived indicator are a time period, an aggregation function, dimension information, and limitation information, the filtering node, the mapping node, the aggregation node, the sorting node, the merging node, and the splitting node are connected in sequence according to a second preset execution order to obtain a second preset calculation rule.
[0138] Among them, the limiting information can be sum, average, proportion, ranking, year-on-year, quarter-on-quarter, etc. Different second preset calculation rules are formulated according to different limiting information. For example, when the limiting information is sum or average, the connection order of the calculation nodes in the second preset calculation rule is: filtering node, mapping node, aggregation node, splitting node and mapping node; when the limiting information is proportion, the connection order of the calculation nodes in the second preset calculation rule is: filtering node, mapping node, aggregation node, splitting node and mapping node; when the limiting information is ranking, the connection order of the calculation nodes in the second preset calculation rule is: filtering node, mapping node, sorting node, aggregation node, splitting node and mapping node; when the limiting information is year-on-year or quarter-on-quarter, the connection order of the calculation nodes in the second preset calculation rule is: filtering node, mapping node, merging node and mapping node.
[0139] When the indicator elements of the composite indicator are multiple atomic indicators and / or multiple derived indicators and operation rules with the same dimensional information, the filtering node, the mapping node and the merging node are connected in sequence according to a third preset execution order to obtain a third preset calculation rule.
[0140] The method for calculating indicator data provided in the embodiment of the present application sets a plurality of preset calculation nodes, and matches corresponding preset calculation rules for each indicator type according to different indicator types and indicator elements corresponding to the indicator types, as well as a plurality of preset calculation nodes, thereby setting the calculation pipeline in advance, facilitating direct use during calculation, and improving the calculation efficiency of the indicator data.
[0141] Figure 4 Schematic diagram of the calculation method of the indicator data provided for this application Figure 3 ,like Figure 4 As shown, in this embodiment Figure 2 and Figure 3 Based on the embodiment, a method for calculating target atomic indicator data when the target calculation rule is the first preset calculation rule is described in detail, and the method includes:
[0142] S401 : filtering the document data set according to a first time period through the filtering node to obtain first document data, and inputting the first document data into the mapping node.
[0143] Among them, when the type of target indicator data is an atomic indicator, and the target indicator elements are: the first time period, the first dimension information and the first aggregation function, according to the association between multiple preset calculation rules and the target indicator type, the target calculation rule can be determined to be the first preset calculation rule. At this time, the target connection order between the target calculation nodes is filtering node, mapping node, aggregation node, and mapping node.
[0144] For example, when the target atomic indicator data to be calculated is: total sales in 2023, the first time period is 2023, the time granularity is year, the start date is January 1, and the end time is December 31. The original data is filtered according to the first time period, and other data that does not meet the conditions of the first time period will not be retained, and the first document data is obtained, and the first document data is input into the mapping node.
[0145] S402 . Mapping the first document data according to the first dimension information through the mapping node to obtain second document data, and inputting the second document data into the aggregation node.
[0146] For example, the first dimension information is sales, and the field list corresponding to the sales in the first document data is retained. Optionally, some fields required for subsequent calculations can be added, such as year, month, day, hour, minute, second, etc. for aggregation processing by time. The remaining fields in the first document data will not be retained in the subsequent aggregation process.
[0147] S403 . Aggregate the second document data through the aggregation node according to a first aggregation function, obtain a first aggregation value, and input the first aggregation value to the mapping node.
[0148] For example, the first aggregation function is counting, and the second document data is counted to obtain a first aggregation value of 2000. Here, if the first aggregation function is deduplication counting, it is necessary to perform two aggregations through the aggregation node. First, duplicate items are removed from the second document data, and then the remaining data is aggregated to obtain the final aggregation result.
[0149] S404: Generate target atomic indicator data through the mapping node according to the first dimension information and the first aggregation value.
[0150] Among them, the purpose of using the mapping node again is to retain only the fields corresponding to the first dimension information and the aggregation result fields, so as to generate the target atomic indicator data, for example: "Total sales in 2023": 2000.
[0151] The method for calculating indicator data provided in the embodiment of the present application determines the first preset calculation rule corresponding to the atomic indicator, and then processes the document data in sequence through multiple calculation nodes in the first preset calculation rule, thereby improving the calculation efficiency of the atomic indicator data.
[0152] Figure 5 Schematic diagram of the calculation method of the indicator data provided for this application Figure 4 ,like Figure 5 As shown, in this embodiment Figure 2and Figure 3 Based on the embodiment, a method for calculating target derived indicator data when the target calculation rule is the second preset calculation rule is described in detail, and the method includes:
[0153] S501 : filtering the document data set according to the second time period and the target modifier through the filtering node to obtain third document data, and inputting the third document data into the mapping node.
[0154] Among them, when the type of target indicator data is a derived indicator, and the target indicator elements are: a second time period, second dimension information, target modifiers, and target limitation information, based on the association between multiple preset calculation rules and the target indicator type, it can be determined that the target calculation rule is the second preset calculation rule. At this time, the target connection order between the target calculation nodes is filtering node, mapping node, aggregation node, and mapping node. Among them, the aggregation node can also be aggregated in combination with other nodes (sorting node, merging node, splitting node) according to the target limitation information.
[0155] For example, when the target derived indicator data to be calculated is: the proportion of consumption amount of new users on the e-commerce platform in North America in the last quarter, where the second time period is "last quarter" and the target modifier is "new user", the document data set refers to the atomic indicator that has an association relationship with the target derived indicator: "consumption amount". First, the document data set corresponding to the "consumption amount" is filtered according to the second time period "last quarter", and the target modifier "new user" is used as a filtering condition. The target modifier filtering process is implemented through the filtering node, thereby obtaining the third document data. The third document data refers to the data in the "consumption amount" that meets the conditions of "consumption amount in the last quarter" and "consumption amount of new users".
[0156] The purpose of this step is to eliminate data that is not relevant to the current analysis, ensure that the calculated indicators are highly relevant to the business problem, and improve the effectiveness and practicality of the analysis.
[0157] S502 . Mapping the third document data according to the second dimension information through the mapping node to obtain fourth document data, and input the fourth document data into the aggregation node.
[0158] For example, the second dimension information here refers to "North America" and "E-commerce Platform". These two dimensions help us segment the data from the perspectives of geographic location and service platform. Based on the second dimension, we select the list of fields to be retained to obtain the fourth document data. At the same time, we can also add some fields needed in the indicator calculation process, such as quarter.
[0159] S503 . Aggregate the fourth document data through the aggregation node according to target limitation information, obtain a second aggregation value, and input the second aggregation value to the mapping node.
[0160] The target limitation information refers to the qualifiers in the derived indicators that indicate the aggregation method, such as proportion, ranking, year-on-year growth, etc. Therefore, the aggregation node needs to be combined with different computing nodes here to implement different pipeline operations.
[0161] Taking the proportion calculation as an example, to calculate the proportion of the corresponding metric of each dimension value under a certain dimension, you need to use the aggregation node, split node, and mapping node. First, aggregate the dimensions other than the dimension under the derived indicator, merge multiple records into one record, and obtain the sum of the corresponding metrics of each dimension value of the dimension; then split the data according to the dimension to form multiple records; perform data mapping on each record to obtain the proportion of the corresponding metric of the dimension value to the total metric, and form a new calculated field as the indicator calculation result, thereby realizing batch calculation.
[0162] For example, when the target restriction information is "proportion", the aggregation node, split node, and mapping node are required to calculate the proportion of the corresponding measure (consumption amount) of the "North America region" and "e-commerce platform" dimensions. First, aggregate the dimensions other than the "North America region" and "e-commerce platform" dimensions, and merge multiple records into one record to obtain all the consumption amounts of the "North America region" and "e-commerce platform", that is, the second aggregation value. Then, according to this dimension, split the data through the split node to form multiple records, and input them into the mapping node.
[0163] S504: Generate target derived indicator data through the mapping node according to the second dimension information and the second aggregation value.
[0164] For example, data mapping is performed on each record to obtain the consumption amount of new users of the e-commerce platform in North America and the proportion of the total consumption amount of the e-commerce platform in North America to form a new calculation field: 20%.
[0165] The method for calculating indicator data provided in the embodiment of the present application determines the second preset calculation rule corresponding to the derived indicator, and then processes the document data in sequence through multiple calculation nodes in the second preset calculation rule, thereby improving the calculation efficiency of the derived indicator data.
[0166] Figure 6 Schematic diagram of the calculation method of the indicator data provided for this application Figure 5 ,like Figure 6 As shown, in this embodiment Figure 2 and Figure 3Based on the embodiment, a method for calculating target composite index data when the target calculation rule is the third preset calculation rule is described in detail, and the method includes:
[0167] S601. Filter the document data set through the filtering node according to a third time period to obtain a plurality of fifth document data, and input the plurality of fifth document data into the mapping node.
[0168] Among them, the document data set refers to multiple atomic indicators and / or derived indicators with the same dimension. For example, it is necessary to calculate the per capita production value in North America in 2001, and the indicators associated with the per capita production value are: gross domestic product and total population. Among them, the third time period is, for example, 2001. Then, the gross domestic product and total population are filtered according to the third time period, and the document data that meets the conditions of the third time period is retained, that is, the fifth document data.
[0169] S602 . Mapping the plurality of fifth document data according to the third dimension information through the mapping node to obtain a plurality of sixth document data, and inputting the plurality of sixth document data into the merging node.
[0170] For example, the fifth document data is mapped, and the sixth document data related to the gross domestic product and total population of the dimension fields of the "North America region" is retained.
[0171] S603 . Merge the plurality of sixth document data into seventh document data through the merging node, and input the seventh document data into the mapping node.
[0172] Among them, different indicators with the same time period and dimension are merged into one record for composite indicator calculation. For example, the two sixth document data "Gross Product of North America in 2001" and "Total Population of North America in 2001" are merged and the seventh document data obtained after the merger is input into the mapping node.
[0173] S604: Through the mapping node, the seventh document data is calculated and processed according to the target expression to obtain a target value, and target composite indicator data is generated according to the third dimension information and the target value.
[0174] The target composite indicator data may be, for example, “per capita production value in North America in 2001”: 50,000.
[0175] It can be understood that according to the target expression, the relationship between the composite indicator and the associated atomic indicator can be obtained, and it can be converted into an expression that can be recognized by the expression engine. The expression engine converts the expression into document database syntax to complete the calculation of the composite indicator. Specifically, the indicator code of the indicator can be used as a parameter of the target expression, and the target expression can be mapped as a calculation field to the indicator code field of the composite indicator. During the calculation execution, the expression engine converts the expression into document database syntax to perform the calculation operation to complete the calculation of the composite indicator.
[0176] The method for calculating indicator data provided in the embodiment of the present application obtains a data calculation expression, namely, a target expression, so that the mapping node converts the target expression into a document database syntax through an expression engine, and based on the uniqueness of the indicator code, uses the indicator code as a database field to perform composite indicator calculations, thereby simplifying the implementation logic of composite indicator calculations, reducing the number of operations for data to enter the memory, saving system resources, and also improving the efficiency of composite indicator calculations.
[0177] Figure 7 A schematic diagram of the structure of the calculation device for the indicator data provided in this application, such as Figure 4 As shown, the indicator data calculation device 700 provided in this embodiment includes:
[0178] The acquisition module 701 is used to acquire an indicator calculation instruction, wherein the indicator calculation instruction includes: target indicator information;
[0179] The processing module 702 is used to parse the target indicator information to obtain target indicator elements, and determine the target indicator type and the document data set corresponding to the target indicator type according to the target indicator elements;
[0180] The processing module 702 is further used to determine a target calculation rule corresponding to the target indicator type, wherein the target calculation rule includes a plurality of target calculation nodes connected in a target execution order;
[0181] The processing module 702 is further configured to process the document data set in sequence through each target computing node according to the target execution order to obtain target indicator data.
[0182] Optionally, the processing module 702 is further used to set a plurality of preset computing nodes, wherein different preset computing nodes are used to perform different document data processing operations;
[0183] The acquisition module 701 is further used to acquire multiple indicator types and indicator elements corresponding to each indicator type, wherein the indicator types include: atomic indicators, derived indicators, and composite indicators;
[0184] The processing module 702 is also used to determine the preset calculation rules corresponding to the multiple indicator types according to the indicator elements corresponding to each indicator type and the preset calculation nodes, and the indicator elements include: time period, aggregation function, dimension information, modifiers, limitation information, and expressions.
[0185] Optionally, the preset computing nodes include: filtering nodes, mapping nodes, aggregation nodes, sorting nodes, merging nodes, and splitting nodes;
[0186] The filtering node is used to filter the document data and return the filtered document data;
[0187] The aggregation node is used to perform grouping and aggregation processing on multiple document data and obtain an aggregation value;
[0188] The mapping node is used to modify the field structure of the document data;
[0189] The sorting node is used to sort the document data;
[0190] The merging node is used to merge the same document fields in the document data;
[0191] The split node is used to split the array field in the document data.
[0192] Optionally, the processing module 702 is further configured to, when the indicator elements of the atomic indicator are a time period, an aggregation function, and dimension information, sequentially connect the filtering node, the mapping node, and the aggregation node according to a first preset execution order to obtain a first preset calculation rule;
[0193] The processing module 702 is further configured to connect the filter node, the mapping node, the aggregation node, the sorting node, the merging node and the splitting node in sequence according to a second preset execution order to obtain a second preset calculation rule when the indicator elements of the derived indicator are a time period, an aggregation function, dimension information and limiting information;
[0194] The processing module 702 is also used to connect the filtering node, the mapping node and the merging node in sequence according to a third preset execution order to obtain a third preset calculation rule when the indicator elements of the composite indicator are multiple atomic indicators and / or multiple derived indicators and operation rules with the same dimensional information.
[0195] Optionally, the processing module 702 is further configured to, when the target calculation rule is the first preset calculation rule, filter the document data set according to a first time period through the filtering node to obtain first document data, and input the first document data to the mapping node;
[0196] The processing module 702 is further configured to perform mapping processing on the first document data according to the first dimension information through the mapping node to obtain second document data, and input the second document data to the aggregation node;
[0197] The processing module 702 is also used to aggregate the second document data through the aggregation node according to the first aggregation function, obtain a first aggregation value, and input the first aggregation value to the mapping node so that the mapping node generates target atomic indicator data according to the first dimensional information and the first aggregation value.
[0198] Optionally, the processing module 702 is further configured to: when the target calculation rule is the second preset calculation rule;
[0199] The processing module 702 is further configured to filter the document data set according to the second time period and the target modifier through the filtering node to obtain third document data, and input the third document data into the mapping node;
[0200] The processing module 702 is further configured to perform mapping processing on the third document data according to the second dimension information through the mapping node to obtain fourth document data, and input the fourth document data to the aggregation node;
[0201] The processing module 702 is also used to aggregate the fourth document data through the aggregation node according to the target limitation information, and obtain a second aggregation value, and input the second aggregation value to the mapping node so that the mapping node generates target derived indicator data according to the second dimension information and the second aggregation value.
[0202] Optionally, the processing module 702 is further configured to: when the target calculation rule is the third preset calculation rule;
[0203] The processing module 702 is further configured to filter the document data set according to a third time period through the filtering node to obtain a plurality of fifth document data, and input the plurality of fifth document data to the mapping node;
[0204] The processing module 702 is further configured to perform mapping processing on the plurality of fifth document data according to the third dimension information through the mapping node to obtain a plurality of sixth document data, and input the plurality of sixth document data into the merging node;
[0205] The processing module 702 is further configured to merge the plurality of sixth document data into seventh document data through the merging node, and input the seventh document data into the mapping node;
[0206] The processing module is further used to calculate and process the seventh document data according to the target expression through the mapping node to obtain a target value, and generate target composite indicator data according to the third dimension information and the target value.
[0207] The indicator data calculation device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0208] Figure 8 A schematic diagram of the structure of the device for calculating the indicator data provided in this application. Figure 8 As shown, the present application provides an indicator data calculation device, and the indicator data calculation device 800 includes: a receiver 801, a transmitter 802, a processor 803 and a memory 804.
[0209] Receiver 801, used for receiving instructions and data;
[0210] A transmitter 802, used for sending instructions and data;
[0211] Memory 804, used to store computer-executable instructions;
[0212] The processor 803 is used to execute the computer-executable instructions stored in the memory 804 to implement the various steps performed by the method for calculating the indicator data in the above embodiment. For details, please refer to the relevant description in the above embodiment of the method for calculating the indicator data.
[0213] Optionally, the memory 804 may be independent or integrated with the processor 803 .
[0214] When the memory 804 is independently provided, the electronic device further includes a bus for connecting the memory 804 and the processor 803 .
[0215] The present application also provides a computer program product, including a computer program, which implements the above-mentioned method for calculating indicator data when executed by a processor.
[0216] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above-mentioned method for calculating indicator data is implemented.
[0217] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0218] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0219] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for calculating indicator data, characterized in that: The method comprises: Obtaining an indicator calculation instruction, wherein the indicator calculation instruction includes: target indicator information; Parsing the target indicator information to obtain target indicator elements, and determining the target indicator type and the document data set corresponding to the target indicator type according to the target indicator elements; Determining a target calculation rule corresponding to the target indicator type, the target calculation rule comprising a plurality of target calculation nodes connected in a target execution order; Each target computing node processes the document data set in turn according to the target execution order to obtain target indicator data.
2. The method according to claim 1, characterized in that Before obtaining the target indicator information, the method further includes: Setting a plurality of preset computing nodes, wherein different preset computing nodes are used to perform different document data processing operations; Acquire multiple indicator types and indicator elements corresponding to each indicator type, wherein the indicator types include: atomic indicators, derived indicators, and composite indicators; According to the indicator elements corresponding to each indicator type and the preset calculation nodes, the preset calculation rules corresponding to the multiple indicator types are determined, and the indicator elements include: time period, aggregation function, dimension information, modifiers, limitation information, and expression.
3. The method according to claim 2, characterized in that The preset computing nodes include: filtering nodes, mapping nodes, aggregation nodes, sorting nodes, merging nodes and splitting nodes; The filtering node is used to filter the document data and return the filtered document data; The aggregation node is used to perform grouping and aggregation processing on multiple document data and obtain an aggregation value; The mapping node is used to modify the field structure of the document data; The sorting node is used to sort the document data; The merging node is used to merge the same document fields in the document data; The split node is used to split the array field in the document data.
4. The method according to claim 3, characterized in that The determining, according to the indicator elements corresponding to each indicator type and the preset calculation nodes, the preset calculation rules corresponding to the multiple indicator types includes: When the indicator elements of the atomic indicator are a time period, an aggregation function, and dimension information, the filtering node, the mapping node, and the aggregation node are sequentially connected according to a first preset execution order to obtain a first preset calculation rule; When the indicator elements of the derived indicator are a time period, an aggregation function, dimension information, and limiting information, the filtering node, the mapping node, the aggregation node, the sorting node, the merging node, and the splitting node are sequentially connected according to a second preset execution order to obtain a second preset calculation rule; When the indicator elements of the composite indicator are multiple atomic indicators and / or multiple derived indicators and operation rules with the same dimensional information, the filtering node, the mapping node and the merging node are connected in sequence according to a third preset execution order to obtain a third preset calculation rule.
5. The method according to claim 4, characterized in that The target indicator data includes: target atomic indicator data, and each target computing node processes the document data set in sequence according to the target execution order to obtain the target indicator data, including: When the target calculation rule is the first preset calculation rule; By means of the filtering node, the document data set is filtered according to a first time period to obtain first document data, and the first document data is input into the mapping node; By means of the mapping node, mapping processing is performed on the first document data according to the first dimension information to obtain second document data, and the second document data is input into the aggregation node; Through the aggregation node, the second document data is aggregated according to the first aggregation function to obtain a first aggregation value, and the first aggregation value is input into the mapping node so that the mapping node generates target atomic indicator data according to the first dimension information and the first aggregation value.
6. The method according to claim 4, characterized in that The target indicator data includes: target derived indicator data, each target computing node processes the document data set in turn according to the target execution order to obtain the target indicator data, and also includes: When the target calculation rule is the second preset calculation rule; Through the filtering node, filtering the document data set according to the second time period and the target modifier to obtain third document data, and inputting the third document data into the mapping node; By means of the mapping node, mapping processing is performed on the third document data according to the second dimension information to obtain fourth document data, and the fourth document data is input into the aggregation node; Through the aggregation node, the fourth document data is aggregated according to the target limitation information, and a second aggregation value is obtained, and the second aggregation value is input into the mapping node, so that the mapping node generates target derived indicator data according to the second dimension information and the second aggregation value.
7. The method according to claim 4, characterized in that The target indicator data includes: target composite indicator data, each target computing node processes the document data set in sequence according to the target execution order to obtain the target indicator data, and also includes: When the target calculation rule is the third preset calculation rule; By means of the filtering node, the document data set is filtered according to a third time period to obtain a plurality of fifth document data, and the plurality of fifth document data is input into the mapping node; By means of the mapping node, mapping processing is performed on the plurality of fifth document data according to the third dimension information to obtain a plurality of sixth document data, and the plurality of sixth document data is input into the merging node; Merging the plurality of sixth document data into seventh document data through the merging node, and inputting the seventh document data into the mapping node; The seventh document data is calculated and processed through the mapping node according to the target expression to obtain a target value, and target composite indicator data is generated according to the third dimension information and the target value.
8. A device for calculating index data, characterized in that: The device comprises: An acquisition module is used to acquire an indicator calculation instruction, wherein the indicator calculation instruction includes: target indicator information; A processing module, used to parse the target indicator information to obtain target indicator elements, and determine the target indicator type and the document data set corresponding to the target indicator type according to the target indicator elements; The processing module is further used to determine a target calculation rule corresponding to the target indicator type, wherein the target calculation rule includes a plurality of target calculation nodes connected in a target execution order; The processing module is also used to process the document data set in sequence through each target computing node according to the target execution order to obtain target indicator data.
9. A device for calculating index data, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the method for calculating indicator data according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method for calculating indicator data according to any one of claims 1 to 7.
Citation Information
Cited By
Configuration-based multi-level index calculation system and method
CN120256496A
Data reporting method, data reporting toolkit and data auditing platform
CN120541111A
Data reporting method, data reporting toolkit and data auditing platform
CN120541111B
