CN116050713A - Index calculation method, apparatus, electronic device and computer program product - Google Patents

Index calculation method, apparatus, electronic device and computer program product Download PDF

Info

Publication number
CN116050713A
CN116050713A CN202310234738.3A CN202310234738A CN116050713A CN 116050713 A CN116050713 A CN 116050713A CN 202310234738 A CN202310234738 A CN 202310234738A CN 116050713 A CN116050713 A CN 116050713A
Authority
CN
China
Prior art keywords
index
calculation
directed acyclic
acyclic graph
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310234738.3A
Other languages
Chinese (zh)
Inventor
杨阳
曹丹
陈鹏晖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xunce Technology Co ltd
Original Assignee
Shenzhen Xunce Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Xunce Technology Co ltd filed Critical Shenzhen Xunce Technology Co ltd
Priority to CN202310234738.3A priority Critical patent/CN116050713A/en
Publication of CN116050713A publication Critical patent/CN116050713A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Theoretical Computer Science (AREA)
  • Marketing (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Educational Administration (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Game Theory and Decision Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Technology Law (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to the technical field of data computing, and in particular relates to an index computing method, an index computing device, electronic equipment and a computer program product. The method comprises the following steps: acquiring calculation information, wherein the calculation information comprises at least one calculation object; determining a calculation object and a first index and index parameters thereof which directly characterize the calculation object according to the calculation information, and generating a directed acyclic graph of the dependency relationship of the index on the calculation object, wherein leaf nodes of the directed acyclic graph consist of preset mutually decoupled second indexes; and calculating an index result of the first index based on the directed acyclic graph. According to the method and the device, the dependency relationship among the indexes is automatically generated according to the demand scene, and the upper-layer indexes are calculated based on the lower-layer basic indexes according to the dependency relationship, so that the problems of low calculation efficiency and low performance of an existing index calculation model based on big data are solved.

Description

Index calculation method, apparatus, electronic device and computer program product
Technical Field
The disclosure relates to the technical field of data computing, and in particular relates to an index computing method, an index computing device, electronic equipment and a computer program product.
Background
In order to meet the demands of the explosive development of domestic financial markets on the increasing of application scenes and the increasing of data, various index calculation models based on big data appear on the market to meet the higher demands of businesses on the accuracy and performance of index calculation.
Traditional index calculation based on big data is either a single index calculation scheme based on decoupling between indexes or a multi-index classification calculation scheme based on high coupling between indexes. The single index calculation scheme indexes are independent, and the indexes can be dynamically assembled according to the use scene, so that the expansibility is good. However, if the lower-layer indexes on which different upper-layer indexes depend are the same, the same lower-layer indexes need to be repeatedly developed and calculated, so that the calculation performance is not high; and in the multi-index classification calculation scheme, the indexes of the same class are interdependent, and under the same index classification, the dependent indexes are calculated once without repeated calculation. However, for the requirements of calculating different indexes in different scenes, all indexes of one type must be calculated each time, so that resource waste is caused, more useless indexes are calculated, and the calculation efficiency is low.
Disclosure of Invention
The embodiment of the disclosure provides an index calculation method, an index calculation device, electronic equipment, a computer readable storage medium and a computer program product, which are used for solving the problems of low calculation efficiency and low performance of the existing index calculation model based on big data.
A first aspect of an embodiment of the present disclosure provides an index calculation method, including:
calculation information is acquired, wherein the calculation information comprises at least one calculation object.
Determining a calculation object and a first index and index parameters thereof which directly characterize the calculation object according to the calculation information, and generating a directed acyclic graph of the dependency relationship of the index on the calculation object, wherein leaf nodes of the directed acyclic graph are composed of preset mutually decoupled second indexes.
In some embodiments, the dependency directed acyclic graph for the computing object generation metrics includes:
taking each first index as each root node of the directed acyclic graph;
in the directed acyclic graph, starting from any root node, taking the index on which the node index is calculated as a child node of the node, generating an edge pointing from the node to the child node based on the dependency relationship from the node index to the child node index, and repeating the steps until the leaf nodes of the directed acyclic graph are all composed of the second index.
In some embodiments, after the generating the directed acyclic graph of the dependency relationship of the index on the computing object, the method further includes:
compiling the directed acyclic graph into a class file which can be identified by FLINK, and uploading the class file to a FLINK server.
And calculating an index result of the first index based on the directed acyclic graph.
In some embodiments, the calculating the index result of the first index based on the directed acyclic graph comprises:
determining a data source for calculating the first index based on the index parameter;
calculating index results of leaf nodes of the directed acyclic graph based on the data source;
in the directed acyclic graph, starting from a leaf node, calculating an index result of a parent node of the current node based on a dependency relationship from the parent node index to the current node index represented by an edge pointing to the current node from the parent node of the current node, and repeating the steps until the index result of the root node is obtained.
In some embodiments, the calculating the index result of the first index based on the directed acyclic graph comprises:
obtaining the class file from the FLINK server;
analyzing the class file, and calculating the class file from the bottom layer to the top based on the directed acyclic graph for generating the class file;
and pushing the final calculation result to the service calling party.
In some embodiments, pushing the final calculation result to the service caller comprises:
the final calculation result is pushed to the service caller through the KAFKA message center.
A second aspect of an embodiment of the present disclosure provides an index calculation device, including:
the acquisition module is used for acquiring calculation information, wherein the calculation information comprises at least one calculation object;
the generation module is used for determining a calculation object and a first index and index parameters thereof which directly characterize the calculation object according to the calculation information, and generating a directed acyclic graph of the dependency relationship of the index on the calculation object, wherein leaf nodes of the directed acyclic graph are composed of preset mutually decoupled second indexes;
and the calculation module is used for calculating an index result of the first index based on the directed acyclic graph.
A third aspect of the disclosed embodiments provides an electronic device, comprising a memory and a processor,
the memory is used for storing a computer program;
the processor is configured to implement the index calculation method according to the first aspect of the present disclosure when executing the computer program.
A fourth aspect of the embodiments of the present disclosure provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the index calculation method according to the first aspect of the present disclosure.
A fifth aspect of the disclosed embodiments provides a computer program product comprising a computer program, instructions which, when executed by a processor, implement the index calculation method according to the first aspect of the disclosure.
According to the method and the device, the dependency relationship among the indexes is automatically generated according to the requirement scene, the upper-layer indexes are calculated based on the lower-layer basic indexes in a concurrent mode according to the dependency relationship, because the upper-layer indexes are coupled and the lower-layer basic indexes are decoupled from each other, data sources required for calculating the basic indexes only need to be loaded once, index calculation results can be multiplexed, repeated calculation and number acquisition are not needed, and therefore the problem that if the lower-layer indexes relied on by different upper-layer indexes in a single-index calculation scheme are the same, the same lower-layer indexes need to be repeatedly developed and calculated repeatedly, and therefore calculation performance is not high is avoided; meanwhile, because the upper-layer index to be calculated is calculated based on the lower-layer index, and the index results of the lower-layer index can be multiplexed, the problems that the resource waste is caused by the fact that one type of index is required to be calculated completely each time for calculating different indexes under different scenes in a multi-index classified calculation scheme, more useless indexes are calculated, and the calculation efficiency is low are avoided.
Drawings
The features and advantages of the present disclosure will be more clearly understood by reference to the accompanying drawings, which are schematic and should not be construed as limiting the disclosure in any way, in which:
FIG. 1 is a schematic diagram of a computer system to which the present disclosure is applicable;
FIG. 2 is a flow chart of a method of index calculation shown in accordance with some embodiments of the present disclosure;
FIG. 3 is an example of a user entering computing information through an interactive interface, as shown in some embodiments of the present disclosure;
FIG. 4 is a directed acyclic graph generated by some embodiments of the present disclosure based on the computing information shown in FIG. 3;
FIG. 5 is a schematic diagram of an index calculation device according to some embodiments of the present disclosure;
fig. 6 is a schematic diagram of an electronic device shown in some embodiments of the present disclosure.
Detailed Description
In the following detailed description, numerous specific details are set forth by way of examples in order to provide a thorough understanding of the relevant disclosure. However, it will be apparent to one of ordinary skill in the art that the present disclosure may be practiced without these specific details. It should be appreciated that the use of "system," "apparatus," "unit," and/or "module" terms in this disclosure is one method for distinguishing between different parts, elements, portions, or components at different levels in a sequential arrangement. However, these terms may be replaced with other expressions if the other expressions can achieve the same purpose.
It will be understood that when a device, unit, or module is referred to as being "on," "connected to," or "coupled to" another device, unit, or module, it can be directly on, connected to, or coupled to, or in communication with the other device, unit, or module, or intervening devices, units, or modules may be present unless the context clearly indicates an exception. For example, the term "and/or" as used in this disclosure includes any and all combinations of one or more of the associated listed items.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to limit the scope of the present disclosure. As used in the specification and the claims, the terms "a," "an," "the," and/or "the" are not specific to a singular, but may include a plurality, unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" are intended to cover only those features, integers, steps, operations, elements, and/or components that are explicitly identified, but do not constitute an exclusive list, as other features, integers, steps, operations, elements, and/or components may be included.
These and other features and characteristics of the present disclosure, as well as the methods of operation, functions of the related elements of structure, combinations of parts and economies of manufacture, may be better understood with reference to the following description and the accompanying drawings, all of which form a part of this specification. It is to be expressly understood, however, that the drawings are for the purpose of illustration and description only and are not intended as a definition of the limits of the disclosure. It will be understood that the figures are not drawn to scale.
Various block diagrams are used in the present disclosure to illustrate various modifications of the embodiments according to the present disclosure. It should be understood that the foregoing or following structures are not intended to limit the present disclosure. The protection scope of the present disclosure is subject to the claims.
FIG. 1 is a schematic diagram of a computer system to which the present disclosure is applicable. The computer system 100 shown in fig. 1 includes a calculation information input client 110, a calculation server 120, a message center 130, and a calculation information output client 140.
Wherein:
the calculation information input client 110 is used to acquire calculation information from a user or a third party service. The computing information input client 110 may be a mobile device based on a mobile operating system, such as an android or apple system, or may be a personal computer, workstation or server based on a Windows operating system. The computing information includes at least one piece of information related to the computing object. The computing information input client 110 is in network connection with the computing server 120. The calculation information input client 110 may perform preliminary analysis on the calculation information, and transmit the analysis result to the calculation server 120; the calculation information may be transmitted to the calculation server 120 without processing.
In particular, the computing information input client 110 may be a device having user interaction capability, and may obtain computing information that the user wishes to calculate through interaction with the user.
The calculation server 120 is configured to perform calculation of a final index based on the calculation information, and push a calculation result to a user or a third party service requesting the calculation through the message center 130. The computing server 120 may be any of a stand-alone, clustered, or distributed server.
The message center 130 is network-connected to the computing server 120 and the computing information output client 140. The message center 130 pushes the final index result calculated by the calculation server 120 to the calculation information output client 140 to be presented to the user or the third party service requesting the calculation. In some embodiments of the present disclosure, the message center is a KAFKA message center.
The message center 130 may be a stand-alone message server or a message module deployed on the computing server 120.
The calculation information output client 140 is used for displaying the final calculation result to the user requesting the calculation or outputting the final calculation result to the third party service requesting the calculation. The computing information output client 140 may be a mobile device or a personal computer, workstation or server. In some embodiments of the present disclosure, the computing information output client 140 and the computing information input client 110 are the same device, and may obtain computing information input by a user in an interactive manner and display the final computing result to the user.
In some embodiments of the present disclosure, the computing information input client 110 and the computing information output client 140 are deployed on the computing server 120 in the form of software clients.
Fig. 2 is a flow chart of a method of index calculation shown in accordance with some embodiments of the present disclosure. In some embodiments, the metric calculation method may be performed by the calculation server 120 shown in fig. 1. As shown in fig. 2, the index calculation method includes the steps of:
s201, obtaining calculation information, wherein the calculation information comprises at least one calculation object.
Specifically, the calculation server acquires calculation information from the calculation information input client.
The calculation information input client acquires calculation information from a calculation service request party, and transmits the calculation information to a calculation server or transmits the calculation information after simple analysis to the calculation server.
The calculation information is information including a calculation object and a calculation index characterizing the calculation object, which is used by a calculation service requester to request calculation. In some embodiments of the present disclosure, the calculation information includes only the calculation object, and the calculation server may obtain the calculation index and the index parameter of the calculation index from the preset calculation scheme.
In some embodiments of the present disclosure, the computing information may be structured information that is preprocessed by a computer, or may be natural language or voice, image, video in text form that can be parsed by a computing information input client or a computing server.
In some embodiments of the present disclosure, a user requesting a computing service may input structured computing information to a computing information input client through an interactive interface. The computing server obtains the computing information from the computing information input client.
FIG. 3 is an example of a user entering computing information through an interactive interface deployed at a computing information input client, as shown in some embodiments of the present disclosure. In the example shown in fig. 3, a user may construct a computing scheme corresponding to an application scenario according to actual requirements. The example shown in fig. 3 is a financial industry application. If a business person wants to know three indexes of var, beta and market yield of a product, so that the product is subjected to market risk analysis, the business person can select the three indexes of var, beta and market yield by clicking a mouse on the interactive interface. The product and the three indexes of var, beta and market yield are selected to form a calculation scheme corresponding to the market risk analysis of the product. And the calculation information input client receives the calculation scheme acquired by the interactive interface, assembles the calculation scheme into structured calculation information and sends the structured calculation information to the calculation server.
S202, determining a calculation object and a first index and index parameters thereof which directly represent the calculation object according to the calculation information, and generating a directed acyclic graph of the dependency relationship of the index on the calculation object, wherein leaf nodes of the directed acyclic graph are composed of preset mutually decoupled second indexes.
Specifically, firstly, a calculation server acquires a calculation object, an index list and index parameters which need to be calculated at the time from the input calculation information. Wherein:
the computing scheme is constructed by a user based on the application scene and expressed by computing information.
The index refers to the results of individual business analyses, such as: var index, beta index, market yield index, market quotation index, etc. The calculation indexes of the user for directly representing the calculation object in the calculation scheme are called final indexes, such as var indexes, beta indexes and market yield indexes shown in fig. 3. The index which is the most basic in a certain aspect and used for business analysis is called basic index. The basic indexes are preset in the system and mutually decoupled, and no dependence exists. The index that is needed to calculate the final index is called the intermediate index.
The basic index is the upper layer of the data source data, and the index result is generated through processing the data source data, not through index calculation. The user may determine the data source of the computing base data through the configuration of the index parameters at the interactive interface shown in fig. 3. The intermediate index and the final index can be expressed as the dependency relationship of the basic index, and the index result is obtained by calculating the indexes of the basic index.
Such as a database or dis, there are stock market data (data storing daily maximum price, minimum price, closing price, volume, etc. of stock). The data source is stock ticker data existing in a database or Redis.
Based on this data source, 4 basic metrics can be derived: highest price, lowest price, closing price, and volume.
The intermediate index and the final index are not fixed, and can be used as the final index to display and output. If the daily yield sequence index is to be displayed, the final index is the final index, if the var is to be calculated, the yield sequence is used as an intermediate index, and the dependency index of the var index is the dependency index. The intermediate and final metrics are not labels of metrics but are determined based on whether the final presentation is the customer in the calculation or whether it is the root node of the directed acyclic graph.
Index parameters: there are many different algorithms and implementation paths for an index, and index parameters are used to specify the manner in which the index is calculated. In particular, the index parameters may determine the data source that the present calculation uses to calculate the base index.
And secondly, dynamically analyzing each calculation object and the final index to be calculated by a FILIB calculation engine of the calculation server to generate an index dependency relationship DAG (directed acyclic graph) which needs to be calculated by each calculation object.
Specifically, each final index is taken as each root node of the directed acyclic graph,
in the directed acyclic graph, starting from any root node, taking the index on which the calculated node index depends as a child node of the node, generating an edge pointing from the node to the child node based on the dependency relationship from the node index to the child node index, and repeating the steps until the leaf nodes of the directed acyclic graph are all composed of the basic indexes.
In the example of fig. 3, calculating Var index depends on the product daily gain index, calculating beta index depends on the product daily gain index, the base daily gain index, and the risk-free gain index, and calculating market gain index depends on the base daily gain index. And calculating a daily gain index of the product, wherein the daily gain index of the product depends on the net value data of the product and the splitting data of the product, the daily gain index of the product depends on the index market data, and the non-risk gain index of the product depends on the interest rate data. The net value data, the splitting data of the product splitting, the index market data and the interest rate data are basic indexes of mutual decoupling preset by the system, the daily gain rate index, the reference daily gain rate index and the risk-free gain rate index are intermediate indexes, and the Var index, the beta index and the market gain rate index are final indexes of representing the product appointed by a user in a calculation scheme.
FIG. 4 is a directed acyclic graph generated by FILIB parsing the calculated information of the example of FIG. 3. The three root nodes Var index, beta index and market yield index on the left side are final indexes selected by a user in a calculation scheme to directly characterize a product. The net value data, the product splitting data, the index quotation data and the interest rate data of the leaf node products on the right side are mutually decoupled basic indexes preset by the system. The daily gain index, the reference daily gain index and the risk-free gain index of the product are intermediate indexes required for calculating the Var index, the beta index and the market gain index.
In some embodiments of the present disclosure, after generating the directed acyclic graph of the dependency of the index on the computing object, the method further includes:
compiling the directed acyclic graph into a class file which can be identified by FLINK, and uploading the class file to a FLINK server. The class file is a java binary file and can be identified and operated by a computer.
And S203, calculating an index result of the first index based on the directed acyclic graph.
Specifically, in the index dependency relationship directed acyclic graph, a data source of a leaf node is determined according to index parameters, data is loaded from the data source, and an index result of the leaf node is calculated. Starting from the leaf node, calculating an index result of the parent node of the current node based on the dependency relationship from the parent node index to the current node index represented by the edge pointing to the current node from the parent node of the current node, and repeating the steps until the index result of the root node is obtained.
Different dependency relation trees to which the root nodes represented by different final indexes belong can be calculated in parallel, so that the calculation efficiency is improved.
In some embodiments of the present disclosure, a user browses and clicks a selected calculation scheme in an interactive interface shown in fig. 3, and after inputting corresponding parameters, clicks calculation to obtain corresponding index results. And after the computing server receives the operation of click computation of the user, acquiring the class file from the FLINK server. And analyzing the class file, calculating the class file from the bottom layer upwards based on the directed acyclic graph for generating the class file, and pushing the calculated result into a KAFKA message center. The user or third party service requesting this calculation may obtain the KAFKA data through a message queue and assemble the final index result,
fig. 5 is a schematic diagram of an index calculation device according to some embodiments of the present disclosure. As shown in fig. 5, the index calculating device 500 includes an obtaining module 510, a generating module 520, and a calculating module 530. The metric calculation function may be performed by the calculation server 120 in fig. 1. Wherein:
an obtaining module 510, configured to obtain calculation information, where the calculation information includes at least one calculation object;
the generating module 520 is configured to determine a computing object and a first index and an index parameter thereof that directly characterize the computing object according to the computing information, and generate a directed acyclic graph of a dependency relationship of the index on the computing object, where leaf nodes of the directed acyclic graph are composed of preset second indexes that are decoupled from each other;
a calculation module 530, configured to calculate an index result of the first index based on the directed acyclic graph.
An embodiment of the present disclosure provides an electronic device, the electronic device 600 comprising a memory 620 and a processor 610, the memory 620 for storing a computer program; the processor 610 is configured to implement the index calculation methods described in S201-S203 in fig. 2 when executing the computer program.
One embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor, implements the index calculation method described in S201-S203 in fig. 2.
One embodiment of the present disclosure provides a computer program product comprising a computer program, instructions which, when executed by a processor, implement the index calculation method described in S201-S203 in fig. 2.
In summary, the index calculation method, the index calculation device, the electronic equipment, the computer readable storage medium and the program product provided by the embodiments of the present disclosure automatically generate the dependency relationship between the indexes according to the requirement scene, and calculate the upper-layer indexes based on the lower-layer indexes concurrently according to the dependency relationship, because the upper-layer indexes are coupled and the lower-layer basic indexes are decoupled from each other, the data sources required for calculating the basic indexes only need to be loaded once, the index calculation results can be multiplexed, and repeated calculation and number taking are not needed, thereby avoiding the problem that if the lower-layer indexes relied on by different upper-layer indexes in a single-index calculation scheme are the same, the same lower-layer indexes need to be repeatedly developed and repeatedly calculated, so that the calculation performance is not high; meanwhile, because the upper-layer index to be calculated is calculated based on the lower-layer index, and the index results of the lower-layer index can be multiplexed, the problems that the resource waste is caused by the fact that one type of index is required to be calculated completely each time for calculating different indexes under different scenes in a multi-index classified calculation scheme, more useless indexes are calculated, and the calculation efficiency is low are avoided.
It will be clear to those skilled in the art that, for convenience and brevity of description, the specific operation of the apparatus and modules described above may refer to the corresponding description in the foregoing apparatus embodiments, which is not repeated here.
While the subject matter described herein is provided in the general context of operating systems and application programs that execute in conjunction with the execution of a computer system, those skilled in the art will recognize that other implementations may also be performed in combination with other types of program modules. Generally, program modules include routines, programs, components, data structures, and other types of structures that perform particular tasks or implement particular abstract data types. Those skilled in the art will appreciate that the subject matter described herein may be practiced with other computer system configurations, including hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframe computers, and the like, as well as distributed computing environments that have tasks performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.
Those of ordinary skill in the art will appreciate that the elements and method steps of the examples described in connection with the embodiments disclosed herein can be implemented as electronic hardware, or as a combination of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
It is to be understood that the above-described embodiments of the present disclosure are merely illustrative or explanatory of the principles of the disclosure and are not restrictive of the disclosure. Accordingly, any modifications, equivalent substitutions, improvements, or the like, which do not depart from the spirit and scope of the present disclosure, are intended to be included within the scope of the present disclosure. Furthermore, the appended claims of this disclosure are intended to cover all such changes and modifications that fall within the scope and boundary of the appended claims, or the equivalents of such scope and boundary.

Claims (10)

1. An index calculation method, comprising:
acquiring calculation information, wherein the calculation information comprises at least one calculation object;
determining a calculation object and a first index and index parameters thereof which directly characterize the calculation object according to the calculation information, and generating a directed acyclic graph of the dependency relationship of the index on the calculation object, wherein leaf nodes of the directed acyclic graph consist of preset mutually decoupled second indexes;
and calculating an index result of the first index based on the directed acyclic graph.
2. The method of claim 1, wherein the dependency directed acyclic graph of the computing object generation metrics comprises:
taking each first index as each root node of the directed acyclic graph;
in the directed acyclic graph, starting from any root node, taking the index on which the node index is calculated as a child node of the node, generating an edge pointing from the node to the child node based on the dependency relationship from the node index to the child node index, and repeating the steps until the leaf nodes of the directed acyclic graph are all composed of the second index.
3. The method of claim 2, wherein the calculating the index result for the first index based on the directed acyclic graph comprises:
determining a data source for calculating the first index based on the index parameter;
calculating index results of leaf nodes of the directed acyclic graph based on the data source;
in the directed acyclic graph, starting from a leaf node, calculating an index result of a parent node of the current node based on a dependency relationship from the parent node index to the current node index represented by an edge pointing to the current node from the parent node of the current node, and repeating the steps until the index result of the root node is obtained.
4. The method of claim 2, further comprising, after generating the directed acyclic graph of the dependency of the index on the computing object:
compiling the directed acyclic graph into a class file which can be identified by FLINK, and uploading the class file to a FLINK server.
5. The method of claim 4, wherein said calculating an index result for said first index based on said directed acyclic graph comprises:
obtaining the class file from the FLINK server;
analyzing the class file, and calculating the class file from the bottom layer to the top based on the directed acyclic graph for generating the class file;
and pushing the final calculation result to the service calling party.
6. The method of claim 5, wherein pushing the final calculation result to the service caller comprises:
the final calculation result is pushed to the service caller through the KAFKA message center.
7. An index calculation device, comprising:
the acquisition module is used for acquiring calculation information, wherein the calculation information comprises at least one calculation object;
the generation module is used for determining a calculation object and a first index and index parameters thereof which directly characterize the calculation object according to the calculation information, and generating a directed acyclic graph of the dependency relationship of the index on the calculation object, wherein leaf nodes of the directed acyclic graph are composed of preset mutually decoupled second indexes;
and the calculation module is used for calculating an index result of the first index based on the directed acyclic graph.
8. An electronic device, characterized in that: comprising a memory and a processor, wherein the memory is configured to store,
the memory is used for storing a computer program;
the processor for implementing the index calculation method according to any one of claims 1-6 when executing the computer program.
9. A computer-readable storage medium, characterized by: the storage medium has stored thereon a computer program which, when executed by a processor, implements the index calculation method according to any one of claims 1-6.
10. A computer program product, characterized by: comprising a computer program, instructions which, when executed by a processor, implement the index calculation method according to any one of claims 1-6.
CN202310234738.3A 2023-03-13 2023-03-13 Index calculation method, apparatus, electronic device and computer program product Pending CN116050713A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310234738.3A CN116050713A (en) 2023-03-13 2023-03-13 Index calculation method, apparatus, electronic device and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310234738.3A CN116050713A (en) 2023-03-13 2023-03-13 Index calculation method, apparatus, electronic device and computer program product

Publications (1)

Publication Number Publication Date
CN116050713A true CN116050713A (en) 2023-05-02

Family

ID=86133403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310234738.3A Pending CN116050713A (en) 2023-03-13 2023-03-13 Index calculation method, apparatus, electronic device and computer program product

Country Status (1)

Country Link
CN (1) CN116050713A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109726216A (en) * 2018-12-29 2019-05-07 北京九章云极科技有限公司 A kind of data processing method and processing system based on directed acyclic graph
US20210406068A1 (en) * 2020-06-30 2021-12-30 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and system for stream computation based on directed acyclic graph (dag) interaction
CN113868098A (en) * 2021-10-18 2021-12-31 杭州安恒信息技术股份有限公司 Task monitoring method, device, equipment and storage medium
WO2022021420A1 (en) * 2020-07-31 2022-02-03 华为技术有限公司 Root cause localization method and apparatus, and electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109726216A (en) * 2018-12-29 2019-05-07 北京九章云极科技有限公司 A kind of data processing method and processing system based on directed acyclic graph
US20210406068A1 (en) * 2020-06-30 2021-12-30 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and system for stream computation based on directed acyclic graph (dag) interaction
WO2022021420A1 (en) * 2020-07-31 2022-02-03 华为技术有限公司 Root cause localization method and apparatus, and electronic device
CN113868098A (en) * 2021-10-18 2021-12-31 杭州安恒信息技术股份有限公司 Task monitoring method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US9569288B2 (en) Application pattern discovery
US8751558B2 (en) Mashup infrastructure with learning mechanism
Hussain et al. Integrated AHP-IOWA, POWA framework for ideal cloud provider selection and optimum resource management
US20120054335A1 (en) Methods and systems for managing quality of services for network participants in a networked business process
US20130173388A1 (en) Methods and systems for service discovery and selection
CN110781180B (en) Data screening method and data screening device
US20200302350A1 (en) Natural language processing based business domain modeling
US8291061B2 (en) Method and system for business-oriented web services management
CN111104556A (en) Service processing method and device
CN116414370A (en) Platform construction method and device based on low codes, medium and electronic equipment
CN110888672A (en) Metadata architecture-based expression engine implementation method and system
CN112947919A (en) Method and device for constructing service model and processing service request
CN116205697A (en) Resource recommendation method and resource recommendation device for virtual public cloud
US9607018B2 (en) Pluggable domain-specific typing systems and methods of use
CN113760961B (en) Data query method and device
CN113536748A (en) Method and device for generating chart data
CN116050713A (en) Index calculation method, apparatus, electronic device and computer program product
CN111324579B (en) Query method, system, terminal and storage medium of ERP (Enterprise resource planning) file
KR101864509B1 (en) Method and system for analyzing bigdata
CN113485942B (en) Automatic testing method and device based on independent modules
CN115619452A (en) User operation method and device based on arithmetic expression configuration
Mdarbi et al. An approach for selecting cloud service adequate to big data case study: E-health context
US20210273900A1 (en) Methods and systems for processing electronic messages
CN114880321A (en) Service early warning method and device
CN114817297A (en) Method and device for processing data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination