Indicator query method and system, electronic device and storage medium
The present disclosure relates to an indicator query method and system, an electronic device and a storage medium, which are applied to the technical field of data processing. The method comprises: acquiring an indicator query instruction, wherein the indicator query instruction carries an indicator name of a target indicator and target feature information about the target indicator; determining target operation information about the target indicator based on the indicator name, wherein the target operation information comprises a target operation parameter and a target operation rule; determining, from an indicator pre-computation data set, indicator intermediate data corresponding to the target operation parameter and the target feature information, wherein the indicator pre-computation data set is obtained by pre-computation based on original indicator data; determining a query result of the target indicator based on the indicator intermediate data and the target operation rule.
1 . An indicator query method, comprising:
acquiring an indicator query instruction, wherein the indicator query instruction carries an indicator name of a target indicator and target feature information about the target indicator;
determining target operation information about the target indicator based on the indicator name, wherein the target operation information comprises a target operation parameter and a target operation rule;
determining, from an indicator pre-computation data set, indicator intermediate data corresponding to the target operation parameter and the target feature information, wherein the indicator pre-computation data set is obtained by pre-computation based on original indicator data;
determining a query result of the target indicator based on the indicator intermediate data and the target operation rule;
wherein a process of pre-calculating the indicator pre-computation data set, based on the original indicator data comprises:
acquiring the original indicator data, wherein the original indicator data comprises original feature information about an indicator and original operation information about the indicator;
in cases where the original feature information satisfies a pre-computation condition, pre-calculating the original operation information to obtain at least one piece of the indicator intermediate data;
determining a set of corresponding relationships between the indicator intermediate data and the original feature information as the indicator pre-computation data set.
2 . The method for querying an indicator according to claim 1 , wherein the original operation information comprises an original operation parameter and an original operation rule between the original operation parameters;
the pre-computing the original operation information to obtain at least one piece of the indicator intermediate data comprises:
decomposing the original operation information into at least one sub-operation according to the original operation rule;
determining an operation result of each of the sub-operations as the indicator intermediate data.
3 . The method for querying an indicator according to claim 1 , wherein the pre-computation condition comprises at least one of the following: the original feature information comprises an indicator pre-computation identifier, an appearance frequency of the indicator is higher than a pre-set frequency, and computation complexity of the indicator is higher than pre-set complexity.
4 . The method for querying an indicator according to claim 3 , wherein the indicator pre-computation identifier is pre-set for the indicator and is used for indicating a query identifier of the indicator which needs to be pre-computed.
5 . The method for querying an indicator according to claim 3 , wherein the appearance frequency of the indicator is obtained by counting the number of times that the indicator appears in the query every day.
6 . The method for querying an indicator according to claim 3 , wherein the computation complexity of the indicator comprises computing the number of times that the indicator needs to be computed.
7 . The method for querying an indicator according to claim 1 , wherein before determining, from the indicator pre-computation data set, indicator intermediate data corresponding to the target computation parameter and the target feature information, the method further comprises:
determining that the indicator pre-computation data set corresponding to the target feature information exists.
8 . The method for querying an indicator according to claim 7 , wherein the determining that the indicator pre-computation data set corresponding to the target feature information exists comprises:
determining whether the target feature information satisfies a pre-computation condition;
in cases where the target feature information satisfies the pre-computation conditions, determine that the indicator pre-computation data set exists.
9 . The method for querying an indicator according to claim 1 , wherein the target operation parameter further comprises an original operation parameter, and before the determining a query result of the target indicator based on the intermediate data of the indicator, the method further comprises:
acquiring, from the original indicator data, original operation data corresponding to the original operation parameter, wherein the original operation parameter corresponding to the target feature information;
determining a query result of the target indicator based on the indicator intermediate data and the target operation rule, comprising:
determining a query result for the target indicator based on the original operation data, the indicator intermediate data and the target operation rule.
10 . The method for querying an indicator according to claim 1 , wherein the indicator query instruction may be triggered after a user inputs indicator-related information to be queried in the query interface, or generated based on selecting the indicator-related information to be queried in a pull-down menu option in the query interface.
11 . The method for querying an indicator according to claim 10 , wherein the indicator-related information is the indicator name and the target feature information.
12 . An electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory is configured to store a computer program;
the processor is configured to execute the computer program stored in the memory to:
acquire an indicator query instruction, wherein the indicator query instruction carries an indicator name of a target indicator and target feature information about the target indicator;
determine target operation information about the target indicator based on the indicator name, wherein the target operation information comprises a target operation parameter and a target operation rule;
determine, from an indicator pre-computation data set, indicator intermediate data corresponding to the target operation parameter and the target feature information, wherein the indicator pre-computation data set is obtained by pre-computation based on original indicator data;
determine a query result of the target indicator based on the indicator intermediate data and the target operation rule;
wherein the processor is further configured to:
acquire the original indicator data, wherein the original indicator data comprises original feature information about an indicator and original operation information about the indicator;
in cases where the original feature information satisfies a pre-computation condition, pre-calculate the original operation information to obtain at least one piece of the indicator intermediate data;
determine a set of corresponding relationships between the indicator intermediate data and the original feature information as the indicator pre-computation data set.
13 . The electronic device according to claim 12 , the processor is further configured to:
pre-compute the original operation information to obtain at least one piece of the indicator intermediate data comprises:
decompose the original operation information into at least one sub-operation according to the original operation rule;
determine an operation result of each of the sub-operations as the indicator intermediate data.
14 . The electronic device according to claim 12 , wherein the pre-computation condition comprises at least one of the following: the original feature information comprises an indicator pre-computation identifier, an appearance frequency of the indicator is higher than a pre-set frequency, and computation complexity of the indicator is higher than pre-set complexity.
15 . The electronic device according to claim 12 , the processor is further configured to:
determine that the indicator pre-computation data set corresponding to the target feature information exists.
16 . The electronic device according to claim 15 , the processor is further configured to:
determining whether the target feature information satisfies a pre-computation condition;
in cases where the target feature information satisfies the pre-computation conditions, determine that the indicator pre-computation data set exists.
17 . The electronic device according to claim 12 , the processor is further configured to:
acquire, from the original indicator data, original operation data corresponding to the original operation parameter, wherein the original operation parameter corresponding to the target feature information;
determine a query result for the target indicator based on the original operation data, the indicator intermediate data and the target operation rule.
18 . A non-transitory computer readable storage medium, storing a computer program, wherein the computer program is configured to, when executed by a processor, cause the processor to:
acquire an indicator query instruction, wherein the indicator query instruction carries an indicator name of a target indicator and target feature information about the target indicator;
determine target operation information about the target indicator based on the indicator name, wherein the target operation information comprises a target operation parameter and a target operation rule;
determine, from an indicator pre-computation data set, indicator intermediate data corresponding to the target operation parameter and the target feature information, wherein the indicator pre-computation data set is obtained by pre-computation based on original indicator data;
determine a query result of the target indicator based on the indicator intermediate data and the target operation rule;
wherein the computer program is further configured to cause the processor to:
acquire the original indicator data, wherein the original indicator data comprises original feature information about an indicator and original operation information about the indicator;
in cases where the original feature information satisfies a pre-computation condition, pre-calculate the original operation information to obtain at least one piece of the indicator intermediate data;
determine a set of corresponding relationships between the indicator intermediate data and the original feature information as the indicator pre-computation data set.