A method, device, equipment, medium and product for determining financial indicators
Through the combination of the main database and distributed processing cluster, the complex logic of financial indicators is judged and processed, and the problems of inefficient code execution and poor maintainability in financial indicator processing are solved, and efficient financial indicator calculation and resource conservation are achieved.
Patent Information
- Application Number
- CN202210306380.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-25
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2042-03-25
AI Technical Summary
During the processing of existing financial indicators, code execution is inefficient and poor maintainability, resulting in excessive database load and affecting the execution of other processing tasks.
The combination of the main database and the distributed processing cluster is adopted to generate basic model data through the main database and determine whether complex logical processing is involved. If it is involved, the distributed processing cluster will determine the indicators and summarize the results to the main database.
It improves the efficiency of financial indicator processing, saves computing resources, realizes flexible and linear expansion of computing power, and solves the problems of inefficient code execution and poor maintenance.
Smart Images

Figure CN114676177B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a method, device, equipment, medium and product for determining financial indicators. Background Art
[0002] Commercial banks have many financial indicator processing tasks, such as net interest income level forecasting, interest rate risk economic capital calculation, etc. The determination of financial indicators usually requires the aggregation of all kinds of product transaction data of the whole bank and the use of a series of complex financial formulas for calculation.
[0003] At present, the industry usually adopts the following steps to process complex logical financial indicators of massive data: (1) gather the contract, account and transaction information of all product components of the bank, aggregate the elements required for subsequent measurement and processing, and generate derived attributes to generate basic model data tables; (2) use SQL statements to calculate complex financial formulas on massive basic model data one by one, and store the results in detailed result tables; (3) summarize and statistically analyze the detailed results for various business scenarios, such as business plan simulation, risk measurement analysis and stress testing, to obtain the final required measurement results.
[0004] However, the existing solution uses SQL scripts to operate database tables, which easily leads to lengthy codes, poor readability, poor logic, and difficulty in maintenance and expansion. At the same time, SQL scripts are slow to execute and cannot respond, which easily affects the execution of other processing tasks, resulting in an overly high overall database load. Summary of the invention
[0005] The present invention provides a method, device, equipment, medium and product for determining financial indicators to solve the problems of low code execution efficiency and poor maintainability in the process of financial indicator processing. It can maximize the saving of computing resources while improving the efficiency of financial indicator processing and realize flexible linear expansion of computing power.
[0006] According to one aspect of the present invention, a method for determining a financial indicator is provided. The method is performed by a financial indicator processing system. The financial indicator processing system includes a main database and a distributed processing cluster. The main database interacts with the distributed processing cluster. The method includes:
[0007] Generate basic model data through the main database according to the pre-acquired data of each product component; and determine whether the determination of the financial indicator involves complex logic processing according to the determination rules of the financial indicator;
[0008] If the determination of the financial indicator involves complex logic processing, determining the indicator using the basic model data through a distributed processing cluster, generating at least one processing result, and loading the at least one processing result into the main database;
[0009] The at least one processing result is summarized through a main database, and the financial indicator is determined according to the summarized result.
[0010] According to another aspect of the present invention, a device for determining a financial indicator is provided. The device is configured to be executed in a financial indicator processing system. The financial indicator processing system includes a main database and a distributed processing cluster. The main database interacts with the distributed processing cluster. The device includes:
[0011] The data generation and processing judgment module is used to generate basic model data based on the pre-acquired product component data through the main database; and determine whether the determination of the financial indicator involves complex logical processing according to the determination rules of the financial indicator;
[0012] An indicator processing and loading module, for determining the indicator using the basic model data through a distributed processing cluster if the determination of the financial indicator involves complex logic processing, generating at least one processing result, and loading the at least one processing result into the main database;
[0013] The financial indicator determination module is used to summarize the at least one processing result through the main database and determine the financial indicator according to the summary result.
[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for determining a financial indicator described in any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining a financial indicator according to any embodiment of the present invention when executed.
[0019] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method for determining a financial indicator as described in any one of the embodiments of the present invention is implemented.
[0020] The technical solution of the embodiment of the present invention generates basic model data and realizes the judgment of complex logical processing in financial indicators through the main database. When financial indicators involve complex logical processing, indicators are determined through distributed processing clusters, and the aggregation of processing results and determination of financial indicators are realized through the main database. This technical solution can solve the problems of low code execution efficiency and poor maintainability in the process of financial indicator processing, and can maximize the saving of computing resources while improving the efficiency of financial indicator processing, and realize flexible linear expansion of computing power.
[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 is a flow chart of a method for determining a financial indicator provided according to the first embodiment of the present invention;
[0024] Figure 2 is a flow chart of a method for determining a financial indicator provided according to Embodiment 2 of the present invention;
[0025] Figure 3 is a flow chart of a method for determining a financial indicator provided according to Embodiment 3 of the present invention;
[0026] Figure 4 is a schematic diagram of the structure of a device for determining a financial indicator according to a fourth embodiment of the present invention;
[0027] Figure 5 It is a structural schematic diagram of an electronic device for implementing the method for determining a financial indicator according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned 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 data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0030] Embodiment 1
[0031] Figure 1 A flowchart of a method for determining a financial indicator is provided for the first embodiment of the present invention. This embodiment is applicable to the scenario of determining a financial indicator. The method can be executed by a device for determining a financial indicator. The device can be implemented in the form of hardware and / or software, and the device can be configured in an electronic device. Figure 1 As shown, the method includes:
[0032] S110, generating basic model data according to pre-acquired product component data through the main database; and determining whether the determination of the financial indicator involves complex logic processing according to the determination rule of the financial indicator.
[0033] This solution can be executed by a financial indicator processing system, which can be used to process financial indicators, such as the bank's net interest income level, interest rate risk, economic capital and other financial indicators. Taking the determination of a bank's financial indicators as an example, the financial indicator processing system needs to aggregate the data of various product components of the entire bank and use a series of complex financial formulas to complete the processing of financial indicators. Compared with conventional data batch processing, the processing of financial indicators has the following characteristics:
[0034] (1) The amount of data processed is huge, and the scale of data involved in the calculation is usually more than one billion;
[0035] (2) It is necessary to process each transaction data based on its business characteristics. There are complex relationships between transaction data, such as mutual dependence and recursive references.
[0036] (3) It requires the use of a large number of financial formulas and complex processing logic, such as splitting cash flows;
[0037] (4) After processing each item, it is necessary to summarize and compile statistics on the processing details.
[0038] Based on the above characteristics of financial indicator processing, the financial indicator processing system can be divided into two parts: a main database and a distributed processing cluster, and the main database and the distributed processing cluster can interact. The main database can be an Oracle database, a MySQL database, or a large-scale parallel analysis (AnalyticalMassively Parallel Processing Databases, Mpp) database. It is easy to understand that the main database is good at performing simple logical processing on data tables through database scripts, such as SQL statements. Therefore, the main database can collect the data of each product component and generate basic model data. Among them, the component data may include product-related data such as transaction data and attribute data, and the basic model data may be data generated based on the product component data to cooperate with the determination of financial indicators. The basic model data may include the original product component data, and may also include data obtained after the original product component data is derived, processed, etc.
[0039] In this solution, optionally, generating basic model data through the master database according to the pre-acquired product component data includes:
[0040] The pre-acquired data of each product component is aggregated through the main database, and the derived indicators are processed according to the processing requirements of financial indicators to generate basic model data.
[0041] It is understandable that the master database can aggregate product component data from different data sources to obtain complete product data. The master database can use each product data to process each product data according to the processing requirements of financial indicators to obtain derivative indicators. For example, assuming that the product data is the contract expiration date in the transaction data, when measuring liquidity risk, it is necessary to calculate the time length from the expiration date to the current date, and the time length can be considered as a derivative indicator of the contract expiration date. Based on the product data and derivative indicators, the master database can prepare the necessary input data for the determination of financial indicators and generate basic model data, and the basic model data can be generated in the form of a data table.
[0042] The above scheme can generate basic model data according to the processing needs of financial indicators, make sufficient data preparation for the determination of financial indicators, and help improve the processing efficiency of financial indicators.
[0043] At the same time, according to the determination rules of the financial indicators, the main database can determine whether the determination of the financial indicators involves complex logic processing. The main database can set complexity calculation rules for different operation methods, and then determine the calculation complexity of the financial indicators based on the complexity calculation rules according to the operation methods included in the determination rules of the financial indicators. Next, it is determined whether the determination of the financial indicators involves complex logic processing based on whether the calculation complexity exceeds a preset complexity threshold.
[0044] Specifically, determining whether the determination of the financial indicator involves complex logic processing according to the determination rule of the financial indicator includes:
[0045] If the determination rule of the financial indicator includes at least one of loop traversal, iteration, recursion, and a financial formula with complexity higher than a preset complexity threshold, it is determined that the determination of the financial indicator involves complex logic processing.
[0046] The master database may also set a complex logic operation set, and put the logically complex operation mode into the complex logic operation set. For example, loop traversal, iteration, recursion, and financial formulas with complexity higher than a preset complexity threshold are put into the complex logic operation set. If one or more elements in the complex logic operation set are present in the determination rule of the financial indicator, it can be considered that the determination of the financial indicator involves complex logic processing. If the determination rule of the financial indicator does not involve any element in the complex logic operation set, it can be considered that the determination of the financial indicator does not involve complex logic processing.
[0047] In this solution, the main database can identify and screen out several complex logical operations in the determination rules of financial indicators, and divide the determination of financial indicators into two categories according to whether complex logical processing is involved. This is conducive to allocating different computing resources according to the complexity of logic and realizing the rational use of hardware resources.
[0048] S120. If the determination of the financial indicator involves complex logic processing, the basic model data is used to determine the indicator through a distributed processing cluster, at least one processing result is generated, and the at least one processing result is loaded into the main database.
[0049] If the determination of financial indicators involves complex logic processing, the main database can assign it to a distributed processing cluster to perform the complex logic processing. The distributed processing cluster includes multiple processing nodes, each of which can complete independent logic processing and generate one or more processing results. Therefore, the distributed processing cluster has a strong computing power. The distributed processing cluster can use object-oriented languages such as JAVA, C++ and Python to design indicator processing codes, making it easier to implement complex logic processing, especially operations such as loop traversal, iteration and recursion.
[0050] After the completion indicator is determined, the distributed processing cluster can write back each processing result to the main database. Specifically, the distributed processing cluster can send each processing result directly to the main database. Since each processing node has differences in processing tasks and processing rates, the distributed processing cluster can also save the processing results generated by the processing node that has completed the processing task in the form of a data table, and send all processing results to the main database after all processing nodes have completed the processing tasks.
[0051] Optionally, after determining whether the financial indicator involves complex logic processing, the method further includes:
[0052] If the determination of the financial indicator does not involve complex logic processing, the financial indicator is determined by using the basic model data through the main database.
[0053] If the determination of financial indicators does not involve complex logical processing, the main database can directly implement simple logical processing based on basic model data through database scripts to complete the determination of financial indicators.
[0054] This solution can reasonably allocate computing resources for financial indicators of different processing types, which is conducive to the rational use of computing resources and thus improves processing efficiency.
[0055] S130. Summarize the at least one processing result through a main database, and determine the financial indicator according to the summarized result.
[0056] The main database can summarize all processing results. The main database can directly obtain financial indicators based on the summary results, or perform simple logical processing on the summary results to obtain financial indicators.
[0057] In this solution, optionally, determining the indicator by using the basic model data through a distributed processing cluster includes:
[0058] Using the basic model data through a distributed processing cluster, based on Python tools, to determine indicators;
[0059] The step of aggregating the at least one processing result through the main database includes:
[0060] The at least one processing result is summarized by using a SQL statement through the main database.
[0061] This solution can give full play to the respective advantages of the main database and distributed processing cluster to achieve efficient calculation of financial indicators.
[0062] This technical solution generates basic model data and implements the judgment of complex logical processing in financial indicators through the main database. When financial indicators involve complex logical processing, indicators are determined through distributed processing clusters, and the aggregation of processing results and determination of financial indicators are achieved through the main database. This technical solution can solve problems such as low code execution efficiency and poor maintainability in the process of financial indicator processing. It can maximize the saving of computing resources while improving the efficiency of financial indicator processing and realize flexible linear expansion of computing power.
[0063] Embodiment 2
[0064] Figure 2 This is a flow chart of a method for determining a financial indicator provided by Embodiment 2 of the present invention. This embodiment is based on the above embodiment and is refined. Figure 2 As shown, the method includes:
[0065] S210, generating basic model data according to pre-acquired product component data through the main database; and determining whether the determination of the financial indicator involves complex logic processing according to the determination rule of the financial indicator.
[0066] In this solution, the distributed processing cluster may include a master control node and at least one processing node, and the distributed processing cluster may also include a network storage, wherein the master control node may be a management server, and the processing node may be a computing server.
[0067] S220. If the determination of the financial indicator involves complex logic processing, the computing resource usage information of each processing node is collected through the main control node, and the basic model data is divided into blocks according to the pre-set processing allocation rules and the computing resource usage information, and the association relationship between each block data and each processing node is determined.
[0068] If the determination of financial indicators involves complex logic processing, the master control node can collect computing resource usage information of each processing node. The computing resource usage information may include information such as processor status, memory status, disk status, and network status. The computing resource usage information can also further determine the computing resource utilization rate based on the above status information. For example, the utilization rate of hardware such as processors and memory can be used as the computing resource utilization rate. The master control node can also calculate the computing resource utilization rate by combining the utilization rates of multiple status indicators such as processors and memory with preset weights. For example, the master control node uses two indicators, processor and memory, to calculate the computing resource utilization rate. Among them, the processor utilization rate is 80%, the memory utilization rate is 70%, and the preset weights of the processor and memory are both 50%. Then the computing resource utilization rate can be calculated by 80%×50%+70%×50% to get 75%.
[0069] The master control node can determine the processing nodes that can be assigned to each processing task based on the matching of computing resource usage information and processing tasks, and then select the target node from the assignable processing nodes according to the processing allocation rules. Assume that there are 4 processing nodes in the distributed processing cluster, and the master control node has 3 processing tasks to be assigned. Among them, processing task 1 can be assigned to processing node 1, processing node 2 and processing node 4, processing task 2 can only be assigned to processing node 1, and processing task 3 can be assigned to processing node 1 and processing node 3. The processing allocation rule can be to prioritize the processing tasks and processing nodes that have a unique matching relationship. If the processing task matches multiple processing nodes, it is assigned in sequence according to the assignable processing node numbers. According to the processing allocation rule, the master control node can assign processing task 2 to processing node 1 for execution, processing task 1 to processing node 2, and processing task 3 to processing node 3.
[0070] It is understandable that the master control node can divide the basic model data into blocks according to the division of the processing tasks. According to the association between the processing tasks and the block data, and the association between the processing tasks and the processing nodes, the master control node can determine the association between each block data and each processing node.
[0071] S230: Sending a processing instruction to each processing node through the main control node according to the association relationship.
[0072] The master control node may send corresponding processing instructions to each processing node according to the processing task, so that each processing node completes the corresponding processing task according to the processing instructions.
[0073] S240. Read the associated block data in the basic model data through each processing node, determine the index according to the processing instruction, and generate at least one processing result.
[0074] Each processing node can read the block data related to the assigned processing task in the basic model data, perform index processing on the block data according to the processing instructions, and generate processing results after the processing is completed.
[0075] In a feasible solution, after generating at least one processing result, the method further includes:
[0076] The processing results are stored in the network storage in the form of files through each processing node.
[0077] After completing the processing task, each processing node can store the processing result in the form of a file to the network storage so that the processing node can continue to execute other tasks.
[0078] This solution can store the processing results of each processing node through the network storage, avoiding the frequent operations of each processing node on the main database, which is conducive to ensuring the reliability of financial indicator calculation. At the same time, this solution is conducive to achieving load balancing and improving the processing efficiency of the distributed processing cluster.
[0079] S250: Performing an atomicity check on the processing tasks of each processing node through the master control node.
[0080] The master control node can perform atomicity verification on each processing task according to the processing results of each processing node to ensure that each processing task is executed to completion without any execution failure.
[0081] S260: If the atomicity check result indicates that the processing task is completed, the processing results are loaded into the main database by using an external table through the main control node.
[0082] If the atomicity check result of each processing result is that the processing task has been completed, the master control node can load each processing result into the main database through an external table. The external table can be a table that does not exist in the database and will not affect the content in the main database, thereby ensuring the reliability of financial indicator calculation.
[0083] S270. Summarize the at least one processing result through a main database, and determine the financial indicator according to the summarized result.
[0084] This technical solution generates basic model data and implements the judgment of complex logical processing in financial indicators through the main database. When financial indicators involve complex logical processing, indicator processing is performed through a distributed processing cluster, and the aggregation of processing results and determination of financial indicators are achieved through the main database. This technical solution can solve problems such as low code execution efficiency and poor maintainability in the process of financial indicator processing. It can improve the efficiency of financial indicator processing while ensuring the reliability of financial indicator calculations, and realize flexible linear expansion of computing power.
[0085] Embodiment 3
[0086] This embodiment is a specific example based on the above embodiment. Figure 3 A flowchart of a method for determining a financial indicator provided in Embodiment 3 of the present invention is shown in FIG. Figure 3 As shown, the method includes:
[0087] 1. Generate basic model data.
[0088] The main database designs data models based on the needs of distributed computing and subsequent summary application processing, aggregates data from various product transaction components, contract components, and accounting components, and processes derived indicators.
[0089] 2. The master control node divides and marks the computing source data and allocates computing resources.
[0090] The master node collects the currently available processing node resources and logically marks the block data according to the configuration principles.
[0091] 3. The master control node issues processing instructions to the processing node.
[0092] The master node notifies the idle processing nodes to start computing.
[0093] 4. Each processing node reads its own computing source data and starts distributed computing.
[0094] The nodes involved in the calculation read the source data that needs to be calculated in batches, record the execution status of the block, and perform calculations one by one.
[0095] 5. The result data of the processing node is stored in NAS (Network Attached Storage) in the form of files.
[0096] The processing node temporarily stores the results of each processing in the form of files to the NAS to avoid frequent updates to the main database.
[0097] 6. The master control node loads the processing results into the main database.
[0098] The master control node performs atomicity checks on distributed transactions to ensure that all processing tasks are effectively executed, and uses external tables to load the processing result details into the main database.
[0099] 7. The main database is used for summary measurement and analysis.
[0100] The master database will further conduct summary analysis and measurement based on the detailed result data according to subsequent needs.
[0101] This technical solution generates basic model data and implements the judgment of complex logical processing in financial indicators through the main database. When financial indicators involve complex logical processing, indicator calculations are performed through a distributed processing cluster, and the aggregation of processing results and determination of financial indicators are achieved through the main database. This technical solution can solve problems such as low code execution efficiency and poor maintainability in the process of financial indicator processing. It can improve the efficiency of financial indicator processing while ensuring the reliability of financial indicator calculations, and maximize the savings of computing resources.
[0102] Embodiment 4
[0103] Figure 4 This is a schematic diagram of the structure of a device for determining a financial indicator provided by Embodiment 4 of the present invention. Figure 4 As shown, the device comprises:
[0104] The data generation and determination judgment module 410 is used to generate basic model data according to the pre-acquired product component data through the main database; and determine whether the determination of the financial indicator involves complex logic processing according to the determination rules of the financial indicator;
[0105] An indicator determination and loading module 420, for determining the indicator using the basic model data through a distributed processing cluster if the determination of the financial indicator involves complex logic processing, generating at least one processing result, and loading the at least one processing result into the main database;
[0106] The financial indicator determination module 430 is used to summarize the at least one processing result through the main database and determine the financial indicator according to the summary result.
[0107] Optionally, the distributed processing cluster includes a master control node and at least one processing node;
[0108] The indicator determination and loading module 420 includes:
[0109] An association determination unit, used to collect computing resource usage information of each processing node through a master control node, and divide the basic model data into blocks according to a preset allocation rule and the computing resource usage information, and determine the association relationship between each block data and each processing node;
[0110] A processing instruction sending unit, used to send a processing instruction to each processing node through the main control node according to the association relationship;
[0111] The indicator determination unit is used to read the associated block data in the basic model data through each processing node, and determine the indicator according to the processing instruction.
[0112] Based on the above solution, optionally, the distributed processing cluster further includes a network storage;
[0113] The indicator determination and loading module 420 is also used for:
[0114] The processing results are stored in the network storage in the form of files through each processing node.
[0115] In a feasible solution, the indicator determination and loading module 420 is specifically used to:
[0116] Performing atomicity check on the processing tasks of each processing node through the master control node;
[0117] If the atomicity check result indicates that the processing task is completed, the processing results are loaded into the main database through the main control node using an external table.
[0118] In this solution, optionally, the indicator determination and loading module 420 is specifically used to:
[0119] Using the basic model data through a distributed processing cluster, based on Python tools, to determine indicators;
[0120] The financial indicator determination module 430 is specifically used to:
[0121] The at least one processing result is summarized by using a SQL statement through the main database.
[0122] Optionally, the data generation and processing judgment module 410 is further used to:
[0123] If the determination of the financial indicator does not involve complex logic processing, the financial indicator is determined by using the basic model data through the main database.
[0124] In this solution, optionally, the data generation and processing judgment module 410 includes:
[0125] The basic model data generation unit is used to aggregate the pre-acquired product component data through the main database, and process the derived indicators according to the processing requirements of the financial indicators to generate basic model data.
[0126] Optionally, the data generation and processing judgment module 410 further includes:
[0127] The complex logic processing judgment unit is used to determine that the determination of the financial indicator involves complex logic processing if at least one of loop traversal, iteration, recursion and a financial formula with complexity higher than a preset complexity threshold exists in the determination rule of the financial indicator.
[0128] The device for determining a financial indicator provided in the embodiment of the present invention can execute the method for determining a financial indicator provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0129] Embodiment 5
[0130] Figure 5 A schematic diagram of an electronic device 510 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0131] like Figure 5 As shown, the electronic device 510 includes at least one processor 511, and a memory connected to the at least one processor 511 in communication, such as a read-only memory (ROM) 512, a random access memory (RAM) 513, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 511 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 512 or the computer program loaded from the storage unit 518 to the random access memory (RAM) 513. In the RAM 513, various programs and data required for the operation of the electronic device 510 can also be stored. The processor 511, the ROM 512, and the RAM 513 are connected to each other via a bus 514. An input / output (I / O) interface 515 is also connected to the bus 514.
[0132] A number of components in the electronic device 510 are connected to the I / O interface 515, including: an input unit 516, such as a keyboard, a mouse, etc.; an output unit 517, such as various types of displays, speakers, etc.; a storage unit 518, such as a disk, an optical disk, etc.; and a communication unit 519, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 519 allows the electronic device 510 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0133] The processor 511 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 511 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 511 executes the various methods and processes described above, such as a method for determining a financial indicator.
[0134] In some embodiments, the method for determining a financial indicator may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 518. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 510 via the ROM 512 and / or the communication unit 519. When the computer program is loaded into the RAM 513 and executed by the processor 511, one or more steps of the method for determining a financial indicator described above may be performed. Alternatively, in other embodiments, the processor 511 may be configured to perform the method for determining a financial indicator in any other appropriate manner (e.g., by means of firmware).
[0135] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0136] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0137] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0138] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0139] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0140] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0141] Embodiment 6
[0142] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements a method for determining a financial indicator as provided in any embodiment of the present application.
[0143] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0144] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0145] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for determining a financial indicator, characterized in that: The method is performed by a financial indicator processing system, wherein the financial indicator processing system includes a main database and a distributed processing cluster; the main database interacts with the distributed processing cluster; the method includes: Generate basic model data through the main database according to the pre-acquired data of each product component; and determine whether the determination of the financial indicator involves complex logic processing according to the determination rules of the financial indicator; If the determination of the financial indicator involves complex logic processing, determining the indicator using the basic model data through a distributed processing cluster, generating at least one processing result, and loading the at least one processing result into the main database; Summarizing the at least one processing result through a main database, and determining the financial indicator according to the summarized result; Wherein, determining whether the determination of the financial indicator involves complex logic processing according to the determination rule of the financial indicator includes: If the determination rule of the financial indicator contains at least one of loop traversal, iteration, recursion, and a financial formula with complexity higher than a preset complexity threshold, it is determined that the determination of the financial indicator involves complex logic processing; Wherein, the distributed processing cluster includes a master control node and at least one processing node; The determining of indicators using the basic model data through a distributed processing cluster includes: The computing resource usage information of each processing node is collected through the master control node, and the basic model data is divided into blocks according to the preset processing allocation rules and the computing resource usage information, and the association relationship between each block data and each processing node is determined; Sending a processing instruction to each processing node through the main control node according to the association relationship; The associated block data is read from the basic model data by each processing node, and the index is determined according to the processing instruction.
2. The method according to claim 1, characterized in that The distributed processing cluster also includes a network memory; After generating at least one processing result, the method further includes: The processing results are stored in the network storage in the form of files through each processing node.
3. The method according to claim 1, characterized in that The step of loading the at least one processing result into the main database comprises: Performing atomicity check on the processing tasks of each processing node through the master control node; If the atomicity check result indicates that the processing task is completed, the processing results are loaded into the main database through the main control node using an external table.
4. The method according to claim 1, characterized in that: The determining of indicators using the basic model data through a distributed processing cluster includes: Using the basic model data through a distributed processing cluster, based on Python tools, to determine indicators; The step of aggregating the at least one processing result through the main database includes: The at least one processing result is summarized by using a SQL statement through the main database.
5. The method according to claim 1, characterized in that After determining whether the financial indicator involves complex logic processing, the method further includes: If the determination of the financial indicator does not involve complex logic processing, the financial indicator is determined by using the basic model data through the main database.
6. The method according to claim 1, characterized in that The basic model data is generated by the master database according to the pre-acquired product component data, including: The pre-acquired data of each product component is aggregated through the main database, and the derived indicators are processed according to the processing requirements of financial indicators to generate basic model data.
7. A device for determining a financial indicator, characterized in that: The device is configured to be executed in a financial indicator processing system, wherein the financial indicator processing system comprises a main database and a distributed processing cluster; The main database interacts with the distributed processing cluster; the device includes: The data generation and processing judgment module is used to generate basic model data based on the pre-acquired product component data through the main database; and determine whether the determination of the financial indicator involves complex logical processing according to the determination rules of the financial indicator; An indicator determination and loading module, for determining the indicator using the basic model data through a distributed processing cluster if the determination of the financial indicator involves complex logic processing, generating at least one processing result, and loading the at least one processing result into the main database; A financial indicator determination module, configured to summarize the at least one processing result through a main database, and determine the financial indicator according to the summary result; Wherein, determining whether the determination of the financial indicator involves complex logic processing according to the determination rule of the financial indicator includes: If the determination rule of the financial indicator contains at least one of loop traversal, iteration, recursion, and a financial formula with complexity higher than a preset complexity threshold, it is determined that the determination of the financial indicator involves complex logic processing; Wherein, the distributed processing cluster includes a master control node and at least one processing node; The determining of indicators using the basic model data through a distributed processing cluster includes: The computing resource usage information of each processing node is collected through the main control node, and the basic model data is divided into blocks according to the preset processing allocation rules and the computing resource usage information, and the association relationship between each block data and each processing node is determined; Sending a processing instruction to each processing node through the main control node according to the association relationship; The associated block data is read from the basic model data by each processing node, and the index is determined according to the processing instruction.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the method for determining a financial indicator according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining a financial indicator according to any one of claims 1 to 6 when executed.
10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the method for determining a financial indicator according to any one of claims 1 to 6.
