A method and device for calculating accounting index logic for production data
Through the accounting indicator calculation logic trial calculation method for production data, the accounting indicator calculation logic trial calculation engine is used to conduct trial calculations under the isolation of production data, solving the problems of data security and long change cycles in traditional methods, achieving high efficiency , safe accounting indicator calculation logic trial calculation.
Patent Information
- Application Number
- CN202410324288.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-21
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-03-21
AI Technical Summary
The traditional accounting indicator calculation logic trial method has problems such as lack of data security, long change cycle, low efficiency and possible pollution of accounting indicator production data.
A method of accounting indicator calculation logic calculating for production data is proposed. By receiving the trial instructions from the front-end production, the data required for the trial calculation from the production database are obtained, and the calculation is carried out in the accounting indicator calculation logic trial calculation engine to obtain accounting indicators. Calculate the result and return it to the production front-end. This method uses an indicator metadatabase, an indicator operation dependency parser and an indicator data isolation calculator to ensure data security and trial calculation efficiency.
It realizes the trial calculation of accounting indicators in isolation from production data, ensures data security, and greatly shortens the change cycle of accounting indicators calculation logic, improving work efficiency.
Smart Images

Figure CN118193039B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of accounting indicator calculation logic trial calculation, and in particular to a method for accounting indicator calculation logic trial calculation for production data, a device for accounting indicator calculation logic trial calculation for production data, an electronic device and a computer-readable medium. Background Art
[0002] An indicator is a summary result obtained by statistically analyzing data through a certain calculation logic. It is a measurement value that is obtained by finely dividing and quantifying business units, making business goals describable, measurable, and decomposable.
[0003] Indicator trial calculation is a method in which business personnel change the indicator calculation logic and perform indicator operations, and then verify whether the indicator operation results meet the business requirements. If they do not meet the business requirements, business personnel continue to adjust the indicator calculation logic, continue operations, continue verification, and continue to explore and try until the indicator operation results meet the business requirements.
[0004] At present, with the popularization of big data and the rapid development of business lines, the accounting indicator system contains thousands of indicators, the calculation logic of accounting indicators is complex and changeable, the accounting indicators change frequently, and the change of a certain accounting indicator may involve the combined change of 20 or 30 indicators. The traditional accounting indicator calculation logic trial calculation method needs to go through multiple links from the change of accounting indicator calculation logic to production use. Only after it is put into production environment and batch processed can the indicator calculation result after the indicator change be seen. If the trial calculation result does not meet the business requirements, the above process is repeated until the accounting indicator calculation result meets the business requirements. There are many links, low efficiency, long change cycle and other problems. Now due to strict data security requirements, production data cannot be directly imported into the test environment, so that the change of accounting indicator calculation logic is difficult to be verified by production data and the correctness of accounting indicator calculation results cannot be guaranteed. Therefore, after the indicator calculation logic is changed by the traditional accounting indicator calculation logic trial calculation method, it may be incorrect after being put into the production environment and batch processed, thereby causing pollution of accounting indicator production data.
[0005] In other words, the traditional accounting indicator calculation logic trial calculation method has the following obvious defects:
[0006] 1) Lack of data security. Before the indicator verification is passed, the reading and writing calculations are directly based on the production data, and the data security is not guaranteed;
[0007] 2) The accounting indicator calculation logic change cycle is long and the efficiency is low. Figure 1, which shows a flow chart of the traditional accounting indicator calculation logic trial calculation method. The change of accounting indicator calculation logic cannot be calculated immediately, and needs to go through a change process of multiple links such as "business personnel submit indicator change application - technical personnel change accounting indicator calculation logic - technical personnel / business personnel test in the development environment - technical personnel / business personnel / testing technicians put into production batch processing accounting indicators - business personnel verify accounting indicator calculation results". If the accounting indicator calculation result does not meet the business requirements, the above process is repeated until the accounting indicator calculation result meets the business requirements. The change implementation cycle is generally 1 to 2 weeks or even more. The indicator change of the traditional accounting indicator calculation logic trial calculation method requires technical personnel to intervene in development and production, which is very inefficient and cannot meet the needs of rapid business development.
[0008] In addition, the traditional accounting indicator calculation logic trial calculation method is basically based on frequent reading and writing calculations directly on production data. When encountering large amounts of data or complex business logic queries, it takes a long time to wait, so it is not safe, efficient, or universal. At present, there is no indicator calculation logic trial calculation product on the market that is specifically optimized for real-time trial calculation of large amounts of production data and has data security isolation and high response speed. Summary of the invention
[0009] In view of the above problems, embodiments of the present invention are proposed to provide a method for calculating accounting indicators logically for production data, a device for calculating accounting indicators logically for production data, an electronic device and a computer-readable medium that overcome the above problems or at least partially solve the above problems.
[0010] The embodiment of the present invention discloses a method for calculating accounting index logic for production data, the method comprising:
[0011] Receive accounting indicator calculation logic trial calculation instructions sent by the production front end;
[0012] According to the accounting indicator calculation logic trial calculation instruction, obtain the production data required for trial calculation from the production database;
[0013] The production data is used to perform calculations in the accounting indicator calculation logic trial calculation engine to obtain the accounting indicator calculation results and return them to the production front end; the production front end is used to submit the current accounting indicator calculation logic from the trial calculation version to the formal production version when it is determined that the accounting indicator calculation results are correct and meet the business requirements.
[0014] Optionally, the accounting indicator calculation logic trial calculation engine includes an indicator metadata database, an indicator calculation dependency parser, and an indicator data isolation operator. The indicator metadata database is used to store indicator metadata; the indicator metadata includes indicator-related dimensions, calculation logic caliber, attribution model, data tables involved in the model, and indicator upstream and downstream relationships;
[0015] The step of receiving the accounting indicator calculation logic trial calculation instruction sent by the production front end includes:
[0016] The indicator operation dependency parser receives the accounting indicator calculation logic trial calculation instruction sent by the production front end;
[0017] The step of acquiring production data required for trial calculation from a production database according to the accounting indicator calculation logic trial calculation instruction comprises:
[0018] The indicator operation dependency parser reads the indicator metadata of the target accounting indicator from the indicator metadata database according to the target accounting indicator recorded in the accounting indicator calculation logic trial calculation instruction;
[0019] The indicator operation dependency parser parses the indicator metadata to obtain a data table required for indicator operation and sends it to the indicator data isolation operator;
[0020] The indicator data isolation operator reads the production data corresponding to the data table required for the indicator operation from the production database according to the data table required for the indicator operation, and imports the production data corresponding to the data table required for the indicator operation into the indicator data isolation operator and stores it as temporary data required for the indicator operation.
[0021] Optionally, the method further comprises:
[0022] The indicator operation dependency parser parses the indicator metadata to obtain the accounting indicator calculation logic and sends it to the indicator data isolation operator; the accounting indicator calculation logic includes the dependency relationship between the indicator and the upper-level indicator, the dependency relationship between the indicator and the data table, and the calculation path.
[0023] Optionally, the step of using the production data to perform calculations in an accounting indicator calculation logic trial calculation engine to obtain accounting indicator calculation results and return them to the production front end includes:
[0024] The indicator data isolation operator performs hierarchical operations based on the accounting indicator calculation logic and the temporarily required data for the indicator operation to obtain the accounting indicator calculation results and returns them to the production front end.
[0025] Optionally, the indicator data isolation operator performs hierarchical calculations according to the accounting indicator calculation logic using the temporarily required data for the indicator calculation to obtain the accounting indicator calculation result and returns it to the production front end, including:
[0026] The indicator data isolation operator uses the data of each data table to perform calculations according to the dependency relationship between the indicator and the data table, and obtains the layer node accounting indicator and the layer node accounting indicator calculation result corresponding to each data table;
[0027] According to the dependency relationship between the indicator and the upper-level indicator and the operation path, the layer node accounting indicator and the layer node accounting indicator operation result are used to perform at least one layered operation to obtain the accounting indicator calculation result and return it to the production front end.
[0028] Optionally, the data storage of the indicator data isolation operator supports a relational database and / or a columnar database.
[0029] Optionally, the production front end is also used to generate and display an indicator map of the target accounting indicators recorded in the accounting indicator calculation logic trial calculation instructions, so that business personnel can perform trial calculation verification on the calculation results of the accounting indicators at each layer and node in the indicator map; the indicator map is a visualization of the trial calculation process of the accounting indicator calculation logic trial calculation engine.
[0030] The embodiment of the present invention also discloses a production data-oriented accounting indicator calculation logic trial calculation device, the device comprising:
[0031] The receiving module is used to receive the accounting indicator calculation logic trial calculation instructions sent by the production front end;
[0032] An acquisition module, used for acquiring production data required for trial calculation from a production database according to the accounting indicator calculation logic trial calculation instruction;
[0033] The operation module is used to use the production data to perform operations in the accounting indicator calculation logic trial calculation engine to obtain the accounting indicator calculation results and return them to the production front end; the production front end is used to submit the current accounting indicator calculation logic from the trial calculation version to the formal production version when it is determined that the accounting indicator calculation results are correct and meet the business requirements.
[0034] Optionally, the accounting indicator calculation logic trial calculation engine includes an indicator metadata database, an indicator calculation dependency parser, and an indicator data isolation operator. The indicator metadata database is used to store indicator metadata; the indicator metadata includes indicator-related dimensions, calculation logic caliber, attribution model, data tables involved in the model, and indicator upstream and downstream relationships;
[0035] The receiving module comprises:
[0036] A receiving submodule, used for the indicator operation dependency parser to receive the accounting indicator calculation logic trial calculation instruction sent by the production front end;
[0037] The acquisition module comprises:
[0038] A reading submodule, used for the indicator operation dependency parser to read the indicator metadata of the target accounting indicator from the indicator metadata database according to the target accounting indicator recorded in the accounting indicator calculation logic trial calculation instruction;
[0039] A parsing submodule, used for the indicator operation dependency parser to parse the indicator metadata to obtain a data table required for indicator operation and send it to the indicator data isolation operator;
[0040] An import submodule is used for the indicator data isolation operator to read the production data corresponding to the data table required for the indicator operation from the production database according to the data table required for the indicator operation, and import the production data corresponding to the data table required for the indicator operation into the indicator data isolation operator to store it as temporary data required for the indicator operation.
[0041] Optionally, the device further comprises:
[0042] The parsing module is used for the indicator operation dependency parser to parse the indicator metadata to obtain the accounting indicator calculation logic and send it to the indicator data isolation operator; the accounting indicator calculation logic includes the dependency relationship between the indicator and the upper-level indicator, the dependency relationship between the indicator and the data table, and the calculation path.
[0043] Optionally, the operation module includes:
[0044] The operation submodule is used for the indicator data isolation operator to perform hierarchical operations according to the accounting indicator calculation logic, using the data temporarily required for the indicator operation to obtain the accounting indicator calculation results and return them to the production front end.
[0045] Optionally, the operator module includes:
[0046] A first operation unit, used for the indicator data isolation operator to respectively use the data of each data table to perform operations according to the dependency relationship between the indicator and the data table, and respectively obtain the layer node accounting indicator and the layer node accounting indicator operation result corresponding to each data table;
[0047] The second operation unit is used to perform at least one hierarchical operation using the layer node accounting indicators and the layer node accounting indicator operation results according to the dependency relationship between the indicators and the upper layer indicators and the operation path, obtain the accounting indicator calculation results and return them to the production front end.
[0048] Optionally, the data storage of the indicator data isolation operator supports a relational database and / or a columnar database.
[0049] Optionally, the production front end is also used to generate and display an indicator map of the target accounting indicators recorded in the accounting indicator calculation logic trial calculation instructions, so that business personnel can perform trial calculation verification on the calculation results of the accounting indicators at each layer and node in the indicator map; the indicator map is a visualization of the trial calculation process of the accounting indicator calculation logic trial calculation engine.
[0050] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0051] The memory is used to store computer programs;
[0052] The processor is used to implement the accounting indicator calculation logic trial calculation method for production data as described in the embodiment of the present invention when executing the program stored in the memory.
[0053] The embodiment of the present invention also discloses one or more computer-readable media on which instructions are stored, which, when executed by one or more processors, enable the processors to execute the accounting indicator calculation logic trial calculation method for production data as described in the embodiment of the present invention.
[0054] The embodiments of the present invention include the following advantages:
[0055] The accounting indicator calculation logic trial calculation method for production data of the embodiment of the present invention receives and responds to the accounting indicator calculation logic trial calculation instruction sent by the production front end, obtains the production data required for the trial calculation from the production database, uses the production data to perform calculations in the accounting indicator calculation logic trial calculation engine, obtains the accounting indicator calculation result and returns it to the production front end, and when the production front end determines that the accounting indicator calculation result is correct and meets the business requirements, the current accounting indicator calculation logic is submitted from the trial calculation version to the formal production version. With this method, the indicator calculation logic trial calculation is isolated from the production data, and the data security is high; and in the process of indicator trial calculation using the accounting indicator calculation logic trial calculation engine of the present invention, only business personnel need to directly operate, and business personnel can modify the accounting indicator calculation logic of the production environment in real time, and perform real-time trial calculation on the new accounting indicator calculation logic without the intervention of technical personnel. After one or more real-time trial calculations, when it is verified that the accounting indicator calculation result meets the business requirements, the business personnel can submit the accounting indicator calculation logic from the trial calculation version to the formal production version, and the change of the accounting indicator calculation logic can be completed. Compared with the traditional accounting indicator calculation logic trial calculation method which requires technical personnel to modify the code and batch process each time the indicator calculation logic is changed, the change process of the present invention has fewer steps, a short change cycle and high efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a flow chart of a traditional accounting indicator calculation logic trial calculation method provided in an embodiment of the present invention;
[0057] Figure 2 It is a flowchart of the steps of a method for calculating a logic trial calculation of an accounting indicator for production data provided in an embodiment of the present invention;
[0058] Figure 3 It is a flow chart of a method for calculating a logic calculation of an accounting indicator for production data according to an embodiment of the present invention;
[0059] Figure 4 It is a communication diagram of the accounting indicator calculation logic trial calculation engine provided in an embodiment of the present invention;
[0060] Figure 5 It is a schematic diagram of the accounting indicator calculation logic trial calculation engine provided in an embodiment of the present invention;
[0061] Figure 6 It is a data representation scheme in the indicator metadata database provided in the embodiment of the present invention;
[0062] Figure 7 is a schematic diagram of an indicator operation dependency parser provided in an embodiment of the present invention;
[0063] Figure 8is a schematic diagram of indicator dependency analysis provided in an embodiment of the present invention;
[0064] Fig. 9 is a schematic diagram of an indicator data isolation operator provided in an embodiment of the present invention;
[0065] Fig.10 It is a schematic diagram of accounting indicator calculation provided in an embodiment of the present invention;
[0066] Fig.11 It is a structural block diagram of a production data-oriented accounting indicator calculation logic trial calculation device provided in an embodiment of the present invention;
[0067] Fig.12 is a block diagram of an electronic device provided in an embodiment of the present invention;
[0068] Fig.13 is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0069] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0070] Reference Figure 2 , shows a flowchart of a method for calculating a production data-oriented accounting indicator logic calculation provided in an embodiment of the present invention, which may specifically include the following steps:
[0071] Step 201, receiving the accounting indicator calculation logic trial calculation instruction sent by the production front end;
[0072] In view of the problems of lack of data security and low efficiency in the traditional accounting indicator calculation logic trial calculation method, the present invention constructs an accounting indicator calculation logic trial calculation engine that can be isolated from the production database for trial calculation and has high trial calculation efficiency. The accounting indicator calculation logic trial calculation engine can be connected to the production front end, so that business personnel can control the accounting indicator calculation logic trial calculation engine to perform trial calculation through the production front end.
[0073] In the specific implementation, business personnel can modify the accounting indicator calculation logic of the production environment in real time at the production front end, and perform real-time calculations on the new accounting indicator calculation logic, so that the production front end can send accounting indicator calculation logic calculation instructions to the accounting indicator calculation logic calculation engine. The accounting indicator calculation logic calculation engine can be a calculation task for a certain indicator calculation logic. The accounting indicator calculation logic calculation engine can calculate the accounting indicator according to the accounting indicator calculation logic according to the accounting indicator calculation logic calculation instructions.
[0074] Step 202, according to the accounting indicator calculation logic trial calculation instruction, obtain the production data required for the trial calculation from the production database;
[0075] After receiving the accounting indicator calculation logic trial calculation instruction, the accounting indicator calculation logic trial calculation engine can parse the accounting indicator calculation logic trial calculation instruction to determine which trial calculation data is required for this trial calculation. After determining the required data, the data can be read from the production database and stored in the accounting indicator calculation logic trial calculation engine for the next trial calculation. The production data required for the trial calculation is read and stored in the accounting indicator calculation logic trial calculation engine, so that the trial calculation can be isolated from the production database, without affecting the original production data of the production database throughout the process, which is safe and reliable.
[0076] Step 203, uses the production data to perform calculations in the accounting indicator calculation logic trial calculation engine to obtain the accounting indicator calculation results and returns them to the production front end; the production front end is used to submit the current accounting indicator calculation logic from the trial calculation version to the formal production version when it is determined that the accounting indicator calculation results are correct and meet the business requirements.
[0077] The accounting indicator calculation logic trial calculation engine of the present invention can automatically calculate the target accounting indicator recorded in the accounting indicator calculation logic trial calculation instruction according to the accounting indicator calculation logic provided by the business personnel after receiving the accounting indicator calculation logic trial calculation instruction and obtaining the data required for the trial calculation, thereby obtaining the accounting indicator calculation result, and can return it to the production front end for verification by the business personnel. The business personnel can determine whether the accounting indicator calculation result is correct and whether it meets the business requirements. Then, when the business personnel determine that the accounting indicator calculation result is correct and meets the business requirements, the production front end can respond to the operation of the business personnel, submit the current accounting indicator calculation logic from the trial calculation version to the formal production version, complete the change of the accounting indicator calculation logic, and realize the change implementation cycle from the traditional trial calculation method of 1 to 2 weeks to 2 to 3 days or even less, greatly eliminating the intermediate links of the traditional accounting indicator calculation logic trial calculation method and improving work efficiency.
[0078] Reference Figure 3 , shows a flow chart of a method for calculating a production data-oriented accounting indicator logic calculation provided in an embodiment of the present invention, the specific process is:
[0079] Business personnel can directly adjust the indicator calculation caliber of the production environment at the production front end, and send accounting indicator calculation logic trial calculation instructions to the accounting indicator calculation logic trial calculation engine. After receiving the accounting indicator calculation logic trial calculation instructions, the accounting indicator calculation logic trial calculation engine immediately performs indicator calculations and returns the accounting indicator calculation results for verification by business personnel. If the calculation results do not meet the business requirements, the above process is repeated until the accounting indicator calculation results meet the business requirements. This method constructs an accounting indicator calculation logic trial calculation engine, and the accounting indicator calculation logic trial calculation is performed in the accounting indicator calculation logic trial calculation engine, which is isolated from production data and does not affect production data throughout the process. The invention has the security of isolating production data and the efficiency of real-time accounting indicator calculation logic trial calculation and verification.
[0080] Reference Figure 4 , shows a communication schematic diagram of the accounting indicator calculation logic trial calculation engine provided in an embodiment of the present invention, and the specific process is:
[0081] The accounting indicator calculation logic trial calculation engine receives the accounting indicator calculation logic trial calculation instructions from the production front end or API, applies for the required data from the production database, performs calculations within the accounting indicator calculation logic trial calculation engine, and returns the accounting indicator calculation results.
[0082] The accounting indicator calculation logic trial calculation engine reads the required production data from the production database to the accounting indicator calculation logic trial calculation engine, and performs trial calculations in the accounting indicator calculation logic trial calculation engine. Regardless of whether there are multiple layers of indicator references for the accounting indicator, the intermediate and final calculation results are only saved in the accounting indicator calculation logic trial calculation engine, and no write operations are performed on the production database; the calculation data in the accounting indicator calculation logic trial calculation engine is completely isolated from the production database, and the accounting indicator calculation logic trial calculation process does not affect the stock indicator results of the production environment.
[0083] In one embodiment of the present invention, the accounting indicator calculation logic trial calculation engine includes an indicator metadata database, an indicator calculation dependency parser, and an indicator data isolation operator. The indicator metadata database is used to store indicator metadata; the indicator metadata includes indicator-related dimensions, calculation logic caliber, attribution model, data tables involved in the model, and indicator upstream and downstream relationships;
[0084] The step of receiving the accounting indicator calculation logic trial calculation instruction sent by the production front end includes:
[0085] S11, the indicator operation dependency parser receives the accounting indicator calculation logic trial calculation instruction sent by the production front end;
[0086] The step of acquiring production data required for trial calculation from a production database according to the accounting indicator calculation logic trial calculation instruction comprises:
[0087] S21, the indicator operation dependency parser reads the indicator metadata of the target accounting indicator from the indicator metadata database according to the target accounting indicator recorded in the accounting indicator calculation logic trial calculation instruction;
[0088] S22, the indicator operation dependency parser parses the indicator metadata to obtain a data table required for indicator operation and sends it to the indicator data isolation operator;
[0089] S23, the indicator data isolation operator reads the production data corresponding to the data table required for the indicator operation from the production database according to the data table required for the indicator operation, and imports the production data corresponding to the data table required for the indicator operation into the indicator data isolation operator and stores it as temporary data required for the indicator operation.
[0090] In one embodiment of the present invention, the method further comprises:
[0091] S31, the indicator operation dependency parser parses the indicator metadata to obtain the accounting indicator calculation logic and sends it to the indicator data isolation operator; the accounting indicator calculation logic includes the dependency relationship between the indicator and the upper-level indicator, the dependency relationship between the indicator and the data table, and the calculation path.
[0092] In one embodiment of the present invention, the step of using the production data to perform calculations in an accounting indicator calculation logic trial calculation engine to obtain accounting indicator calculation results and return them to the production front end includes:
[0093] S41, the indicator data isolation operator performs hierarchical calculations based on the accounting indicator calculation logic and the temporarily required data for the indicator calculation, obtains the accounting indicator calculation results and returns them to the production front end.
[0094] In one embodiment of the present invention, the indicator data isolation operator performs hierarchical calculations based on the accounting indicator calculation logic using the temporarily required data for the indicator calculation to obtain the accounting indicator calculation result and returns it to the production front end, including:
[0095] S51, the indicator data isolation operator uses the data of each data table to perform calculations according to the dependency relationship between the indicator and the data table, and obtains the layer node accounting indicator and the layer node accounting indicator calculation result corresponding to each data table;
[0096] S52, according to the dependency relationship between the indicator and the upper-level indicator and the calculation path, the layer node accounting indicator and the layer node accounting indicator calculation result are used to perform at least one layered calculation to obtain the accounting indicator calculation result and return it to the production front end.
[0097] In one embodiment of the present invention, the data storage of the indicator data isolation operator supports a relational database and / or a column database.
[0098] In one embodiment of the present invention, the production front end is also used to generate and display an indicator map of the target accounting indicator recorded in the accounting indicator calculation logic trial calculation instruction, so that business personnel can perform trial calculation verification on the calculation results of the indicators of each layer and each node in the indicator map; the indicator map is a visualization of the trial calculation process of the accounting indicator calculation logic trial calculation engine.
[0099] Reference Figure 5 , showing a schematic diagram of an accounting indicator calculation logic trial calculation engine provided in an embodiment of the present invention;
[0100] In the embodiment of the present invention, the accounting indicator calculation logic trial calculation engine may include an indicator metadata database, an indicator operation dependency parser, and an indicator data isolation operator.
[0101] 1. Index Metadata Database
[0102] In the embodiment of the present invention, the related attributes of the indicators are elementized and regularized and stored in the indicator metadata database. As an important component of the accounting indicator calculation logic trial calculation engine, the indicator metadata database provides strong support for indicator trial calculation.
[0103] The indicator metadata database stores indicator-related dimensions, calculation logic, attribution model, data source tables involved in the model, indicator upstream and downstream relationships, and other indicator metadata. It mainly includes the following data tables:
[0104] Model information table: saves the element information of the indicator model.
[0105] Model dimension information table: saves the relationship between indicator models and their dimensions.
[0106] Indicator information table: saves the indicator and the element information of the model to which the indicator belongs.
[0107] Model indicator and dimension information table: saves the relationship between models, dimensions, and indicators.
[0108] Relationship map details table: saves the element information required for the upstream and downstream dependencies between traceability models and indicators.
[0109] Reference Figure 6 , showing a schematic diagram of data representation in the indicator metadata database provided in an embodiment of the present invention;
[0110] (II) Index Operation Dependency Parser
[0111] The indicator operation depends on the parser, which can receive the accounting indicator calculation logic trial calculation instructions of a certain accounting indicator sent by the production front end or various APIs, read the indicator metadata related to the indicator for analysis, and obtain the accounting indicator calculation logic and the data table list corresponding to the required data.
[0112] Reference Figure 7 , showing a schematic diagram of an indicator operation dependency parser provided in an embodiment of the present invention;
[0113] The indicator operation dependency parser includes an instruction recognition module and an indicator dependency parsing module, as follows:
[0114] 1. Command recognition module
[0115] The instruction recognition module receives various instructions from the production front end or API, identifies the accounting indicator calculation logic trial calculation instructions, and converts the format according to the internal interface specifications as the input of the indicator dependency parser.
[0116] 2. Indicator dependency parsing module
[0117] The indicator dependency parsing module reads and parses the dependency relationship between the indicator and the upper-level indicators, and between the indicator and the data table from the indicator metadata database according to the accounting indicator calculation logic trial calculation instructions sent by the instruction recognition module, and obtains the accounting indicator calculation logic, the list of data tables required for indicator calculation and other result information as the input of the indicator data isolation operator.
[0118] The accounting indicator calculation logic includes indicator relationships and calculation paths. Indicator relationships include the dependency relationship between indicators and upper-level indicators, and the dependency relationship between indicators and data tables. The accounting indicator calculation logic is used to achieve efficient hierarchical calculation of accounting indicators and verification of the calculation results of accounting indicators at each level.
[0119] As an example of the present invention, refer to Figure 8 , showing a schematic diagram of indicator dependency analysis provided in an embodiment of the present invention;
[0120] The indicator dependency parsing module parses the metadata and calculation logic of the accounting indicator to be calculated (such as indicator A). After parsing, there are three layers of indicator operation dependency, namely indicator operation dependency layer 1, indicator operation dependency layer 2 and indicator operation dependency layer 3. 1) Indicator A depends on indicators 1 and 2 of indicator operation dependency layer 1 (that is, indicator A is formed by indicators 1 and 2 according to certain logical operations); 2) Indicator 1 depends on indicators 3 and 4 of indicator operation dependency layer 2, and indicator 2 depends on indicator 5 of indicator operation dependency layer 2; 3) Indicator 3 depends on the data of data table 1 of indicator operation dependency layer 3 (that is, indicator 3 is formed by the data of data table 1 according to certain logical operations), indicator 4 depends on the data of data table 2 of indicator operation dependency layer 3, and the data of indicator 5 depends on the data of data table 3 of indicator operation dependency layer 3.
[0121] (III) Index data isolation operator
[0122] Reference Fig. 9 , showing a schematic diagram of an indicator data isolation operator provided in an embodiment of the present invention;
[0123] The indicator data isolation operator can read the relevant data of the accounting indicator calculation logic trial calculation from the production database in real time to the data storage of the indicator data isolation operator and perform trial calculation, so as to isolate the indicator trial calculation data from the production data. The data storage of the indicator data isolation operator is independent of the production database. All data generated during the indicator trial calculation process are isolated from the production data and do not affect each other. If an error occurs in changing the indicator calculation logic, it will not affect the production data. It is safe and reliable.
[0124] The indicator data isolation operator can receive the accounting indicator calculation logic and the list of data tables required for indicator calculation output by the indicator calculation dependency parser. First, the data of the corresponding data table of the production database is read according to the list of data tables required for indicator calculation and imported into the indicator data isolation operator. Then, the indicators of each indicator dependency layer are calculated according to the accounting indicator calculation logic, and finally the accounting indicator calculation results are obtained. The indicator trial calculation is performed in the indicator data isolator. The trial calculation data in the indicator data isolator is completely isolated from the production database. The indicator trial calculation does not affect the stock indicator results of the production environment throughout the process.
[0125] The indicator data isolation operator includes a data import module and an indicator operation module, as follows:
[0126] 1. Data import module
[0127] The data import module receives the list of data tables required for the indicator operation output by the indicator operation dependency parser, reads the data of the corresponding data table of the production database in real time according to the list of data tables required for the indicator operation, and imports it into the data storage of the indicator data isolation operator, generating and saving it as the temporary data required for the indicator operation. The data storage of the indicator data isolation operator supports relational databases or columnar databases.
[0128] 2. Index calculation module
[0129] The indicator operation module reads the data temporarily required for indicator operation, and according to the indicator relationship and operation path in the accounting indicator calculation logic, hierarchically calculates the accounting indicators of each indicator dependency layer in the indicator data isolation operator, and finally obtains and returns the accounting indicator calculation result.
[0130] As an example of the present invention, refer to Fig.10 , showing a schematic diagram of accounting indicator calculation provided in an embodiment of the present invention;
[0131] The indicator calculation module is based on the accounting indicator calculation logic. 1) Indicator 3, indicator 4, and indicator 5 of indicator calculation dependency layer 2 are calculated from the data in data table 1, data table 2, and data table 3 of indicator calculation dependency layer 3; 2) Indicator 1 of indicator calculation dependency layer 1 is calculated from indicator 3 and indicator 4, and indicator 2 of indicator dependency layer 1 is calculated from indicator 5; 3) Indicator A is finally calculated from indicator 1 and indicator 2, and indicator A is returned to the front end or API as the final accounting indicator calculation result.
[0132] The indicator data isolation operator allows business personnel to modify the accounting indicator calculation logic of the production environment in real time, and perform real-time trial calculations on the new accounting indicator calculation logic in the indicator data isolation operator without the intervention of technical personnel. After one or more real-time trial calculations, and after verifying that the accounting indicator calculation results meet business requirements, business personnel can submit the accounting indicator calculation logic from the trial calculation version directly to the formal production version in the production environment to complete the change of the accounting indicator calculation logic. The change implementation cycle is reduced from 1 to 2 weeks in the traditional trial calculation method to 2 to 3 days or even less, which greatly saves the intermediate links of the traditional accounting indicator calculation logic trial calculation method and improves work efficiency.
[0133] In addition, the production front end can also generate and display the indicator map of the target accounting indicator recorded in the accounting indicator calculation logic trial calculation instruction. The indicator map can be a visualization of the trial calculation process of the accounting indicator calculation logic trial calculation engine. Therefore, business personnel can perform trial calculation verification on the calculation results of the accounting indicators of each layer and node in the indicator map one by one, and determine the specific factors that affect the final accounting indicator calculation results.
[0134] In the embodiment of the present invention, by receiving the accounting indicator calculation logic trial calculation instruction sent by the production front end, according to the accounting indicator calculation logic trial calculation instruction, the production data required for the trial calculation is obtained from the production database, and the production data is used to perform calculations in the accounting indicator calculation logic trial calculation engine to obtain the accounting indicator calculation results and return them to the production front end; the production front end is used to submit the current accounting indicator calculation logic from the trial calculation version to the formal production version when it is determined that the accounting indicator calculation results are correct and meet the business requirements. The use of this method has the following advantages:
[0135] 1) The accounting indicator calculation logic is isolated from production data, which has high data security. All data generated in the accounting indicator calculation logic calculation process are isolated from production data and do not affect each other. If an error occurs in changing the accounting indicator calculation logic, it will not affect the production data, which is safe and reliable.
[0136] 2) The accounting indicator calculation logic change cycle is short and efficient. Business personnel can modify the accounting indicator calculation logic of the production environment immediately and perform real-time trial calculations on the new accounting indicator calculation logic without the intervention of technical personnel. After one or more real-time trial calculations, if the accounting indicator calculation results meet the business requirements, business personnel can submit the accounting indicator calculation logic from the trial calculation version to the formal production version to complete the change of the accounting indicator calculation logic. The change implementation cycle is reduced from 1 to 2 weeks for the traditional trial calculation method to 2 to 3 days or even less.
[0137] The present invention aims to overcome the defects of the traditional accounting indicator calculation logic trial calculation method and to explore a universal and efficient accounting indicator calculation logic trial calculation method for a production environment.
[0138] As an example of the present invention, accounting indicators may include financial analysis report indicators and performance appraisal indicators. Among them, the accuracy and rationality of the calculation logic of the performance appraisal indicator can be verified. For example, the performance appraisal indicator may include a deposit summary, and the accuracy of the calculation logic of the deposit summary may be calculated. The calculation logic of the deposit summary may be calculated by calculating the balance summary of various deposit products (current, fixed, large-value certificates of deposit, etc.), and the indicator map of the deposit summary is used for verification and verification. The performance appraisal indicator may also include the profit adjustment result of the performance appraisal indicator. The profit refers to the scenario in which the corresponding performance involves multiple units (institutions or individuals) in the daily operation and sales activities of the institution, and the corresponding performance profit needs to be distributed according to the agreed ratio. In this scenario, in addition to ensuring that the calculation logic of the corresponding indicator is correct, it is also necessary to ensure that the profit ratio coefficient between the institutions is correctly entered. The calculation logic accuracy of the profit adjustment result of the performance appraisal indicator can be calculated. The calculation logic of the profit adjustment result may be verified by the indicator map of the profit adjustment result to verify the profit ratio data and the profit result calculated based on the changed profit calculation logic. Performance appraisal indicators can also include the ranking distribution of performance appraisal indicators. When formulating new appraisal rules, the management department needs to calculate whether the scores and rankings of each institution under the new appraisal rules are consistent with the actual situation based on historical data. At the same time, it is also necessary to pay attention to whether the overall score distribution of the appraisal sample is reasonable or in line with expectations. The rationality of the calculation logic of the performance appraisal indicator ranking distribution can be tested. The rationality of the calculation logic of the performance appraisal indicator ranking distribution can be verified by using production data to quickly generate the score details of each institution under the new appraisal rules, and statistically analyzing the distribution of each score interval. Through the indicator map of the performance appraisal indicator ranking distribution, it is judged whether the distribution of each score interval is reasonable, and then determine whether the new performance appraisal indicator ranking distribution calculation logic is reasonable.
[0139] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0140] Reference Fig.11 , shows a structural block diagram of an accounting indicator calculation logic trial calculation device for production data provided in an embodiment of the present invention, which may specifically include the following modules:
[0141] Receiving module 1101, used for receiving the accounting index calculation logic trial calculation instruction sent by the production front end;
[0142] An acquisition module 1102 is used to acquire production data required for trial calculation from a production database according to the accounting indicator calculation logic trial calculation instruction;
[0143] The operation module 1103 is used to use the production data to perform operations in the accounting indicator calculation logic trial calculation engine to obtain the accounting indicator calculation results and return them to the production front end; the production front end is used to submit the current accounting indicator calculation logic from the trial calculation version to the formal production version when it is determined that the accounting indicator calculation results are correct and meet the business requirements.
[0144] Optionally, the accounting indicator calculation logic trial calculation engine includes an indicator metadata database, an indicator calculation dependency parser, and an indicator data isolation operator. The indicator metadata database is used to store indicator metadata; the indicator metadata includes indicator-related dimensions, calculation logic caliber, attribution model, data tables involved in the model, and indicator upstream and downstream relationships;
[0145] The receiving module comprises:
[0146] A receiving submodule, used for the indicator operation dependency parser to receive the accounting indicator calculation logic trial calculation instruction sent by the production front end;
[0147] The acquisition module comprises:
[0148] A reading submodule, used for the indicator operation dependency parser to read the indicator metadata of the target accounting indicator from the indicator metadata database according to the target accounting indicator recorded in the accounting indicator calculation logic trial calculation instruction;
[0149] A parsing submodule, used for the indicator operation dependency parser to parse the indicator metadata to obtain a data table required for indicator operation and send it to the indicator data isolation operator;
[0150] An import submodule is used for the indicator data isolation operator to read the production data corresponding to the data table required for the indicator operation from the production database according to the data table required for the indicator operation, and import the production data corresponding to the data table required for the indicator operation into the indicator data isolation operator to store it as temporary data required for the indicator operation.
[0151] Optionally, the device further comprises:
[0152] The parsing module is used for the indicator operation dependency parser to parse the indicator metadata to obtain the accounting indicator calculation logic and send it to the indicator data isolation operator; the accounting indicator calculation logic includes the dependency relationship between the indicator and the upper-level indicator, the dependency relationship between the indicator and the data table, and the calculation path.
[0153] Optionally, the operation module includes:
[0154] The operation submodule is used for the indicator data isolation operator to perform hierarchical operations according to the accounting indicator calculation logic, using the data temporarily required for the indicator operation to obtain the accounting indicator calculation results and return them to the production front end.
[0155] Optionally, the operator module includes:
[0156] A first operation unit, used for the indicator data isolation operator to respectively use the data of each data table to perform operations according to the dependency relationship between the indicator and the data table, and respectively obtain the layer node accounting indicator and the layer node accounting indicator operation result corresponding to each data table;
[0157] The second operation unit is used to perform at least one hierarchical operation using the layer node accounting indicators and the layer node accounting indicator operation results according to the dependency relationship between the indicators and the upper layer indicators and the operation path, obtain the accounting indicator calculation results and return them to the production front end.
[0158] Optionally, the data storage of the indicator data isolation operator supports a relational database and / or a columnar database.
[0159] Optionally, the production front end is also used to generate and display an indicator map of the target accounting indicators recorded in the accounting indicator calculation logic trial calculation instructions, so that business personnel can perform trial calculation verification on the calculation results of the accounting indicators at each layer and node in the indicator map; the indicator map is a visualization of the trial calculation process of the accounting indicator calculation logic trial calculation engine.
[0160] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0161] In addition, an embodiment of the present invention further provides an electronic device, such as Fig.12 As shown, it includes a processor 1201, a communication interface 1202, a memory 1203 and a communication bus 1204, wherein the processor 1201, the communication interface 1202, and the memory 1203 communicate with each other through the communication bus 1204.
[0162] Memory 1203, used for storing computer programs;
[0163] The processor 1201 is used to implement the accounting indicator calculation logic trial calculation method for production data as described in the above embodiment when executing the program stored in the memory 1203.
[0164] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0165] The communication interface is used for communication between the above terminal and other devices.
[0166] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0167] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0168] like Fig.13 As shown, in another embodiment provided by the present invention, a computer-readable storage medium 1301 is also provided, in which instructions are stored. When the computer-readable storage medium 1301 is run on a computer, the computer executes the accounting indicator calculation logic trial calculation method for production data described in the above embodiment.
[0169] In another embodiment provided by the present invention, a computer program product containing instructions is also provided, which, when executed on a computer, enables the computer to execute the accounting indicator calculation logic trial calculation method for production data described in the above embodiment.
[0170] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0171] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0172] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0173] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A method for calculating accounting indicators based on production data, characterized in that: Applied to the accounting indicator calculation logic trial calculation engine, the method includes: Receive accounting indicator calculation logic trial calculation instructions sent by the production front end; According to the accounting indicator calculation logic trial calculation instruction, obtain the production data required for trial calculation from the production database; The production data is used to perform calculations in the accounting indicator calculation logic trial calculation engine to obtain the accounting indicator calculation results and return them to the production front end; the production front end is used to submit the current accounting indicator calculation logic from the trial calculation version to the formal production version when it is determined that the accounting indicator calculation results are correct and meet the business requirements; The accounting indicator calculation logic trial calculation engine includes an indicator metadata database, an indicator calculation dependency parser, and an indicator data isolation operator. The indicator metadata database is used to store indicator metadata; the indicator metadata includes indicator-related dimensions, calculation logic caliber, attribution model, data tables involved in the model, and indicator upstream and downstream relationships; The step of receiving the accounting indicator calculation logic trial calculation instruction sent by the production front end includes: The indicator operation dependency parser receives the accounting indicator calculation logic trial calculation instruction sent by the production front end; The step of acquiring production data required for trial calculation from a production database according to the accounting indicator calculation logic trial calculation instruction comprises: The indicator operation dependency parser reads the indicator metadata of the target accounting indicator from the indicator metadata database according to the target accounting indicator recorded in the accounting indicator calculation logic trial calculation instruction; The indicator operation dependency parser parses the indicator metadata to obtain a data table required for indicator operation and sends it to the indicator data isolation operator; The indicator data isolation operator reads the production data corresponding to the data table required for the indicator calculation from the production database according to the data table required for the indicator calculation, and imports the production data corresponding to the data table required for the indicator calculation into the indicator data isolation operator and stores it as temporary data required for the indicator calculation; The indicator operation dependency parser parses the indicator metadata to obtain the accounting indicator calculation logic and sends it to the indicator data isolation operator; the accounting indicator calculation logic includes the dependency relationship between the indicator and the upper-level indicator, the dependency relationship between the indicator and the data table, and the calculation path.
2. The method according to claim 1, characterized in that The step of using the production data to perform calculations in the accounting indicator calculation logic trial calculation engine to obtain the accounting indicator calculation results and return them to the production front end includes: The indicator data isolation operator performs hierarchical calculations based on the accounting indicator calculation logic using the temporarily required data for the indicator calculation to obtain the accounting indicator calculation results and returns them to the production front end; The indicator data isolation operator performs hierarchical calculations based on the accounting indicator calculation logic and the temporarily required data for the indicator calculation to obtain the accounting indicator calculation results and returns them to the production front end, including: The indicator data isolation operator uses the data of each data table to perform calculations according to the dependency relationship between the indicator and the data table, and obtains the layer node accounting indicator and the layer node accounting indicator calculation result corresponding to each data table; According to the dependency relationship between the indicator and the upper-level indicator and the operation path, the layer node accounting indicator and the layer node accounting indicator operation result are used to perform at least one layered operation to obtain the accounting indicator calculation result and return it to the production front end.
3. The method according to claim 1, characterized in that The data storage of the indicator data isolation operator supports relational database and / or column database.
4. The method according to claim 1, characterized in that: The production front end is also used to generate and display the indicator map of the target accounting indicator recorded in the accounting indicator calculation logic trial calculation instructions, so that business personnel can perform trial calculation verification on the calculation results of the accounting indicators of each layer and each node in the indicator map; the indicator map is a visualization of the trial calculation process of the accounting indicator calculation logic trial calculation engine.
5. A logical calculation device for accounting indicators for production data, characterized in that: Applied to the accounting indicator calculation logic trial calculation engine, the device comprises: The receiving module is used to receive the accounting indicator calculation logic trial calculation instructions sent by the production front end; An acquisition module, used for acquiring production data required for trial calculation from a production database according to the accounting indicator calculation logic trial calculation instruction; A calculation module is used to use the production data to perform calculations in the accounting indicator calculation logic trial calculation engine to obtain the accounting indicator calculation results and return them to the production front end; the production front end is used to submit the current accounting indicator calculation logic from the trial calculation version to the formal production version when it is determined that the accounting indicator calculation results are correct and meet the business requirements; The accounting indicator calculation logic trial calculation engine includes an indicator metadata database, an indicator calculation dependency parser, and an indicator data isolation operator. The indicator metadata database is used to store indicator metadata; the indicator metadata includes indicator-related dimensions, calculation logic caliber, attribution model, data tables involved in the model, and indicator upstream and downstream relationships; The receiving module comprises: A receiving submodule, used for the indicator operation dependency parser to receive the accounting indicator calculation logic trial calculation instruction sent by the production front end; The acquisition module comprises: A reading submodule, used for the indicator operation dependency parser to read the indicator metadata of the target accounting indicator from the indicator metadata database according to the target accounting indicator recorded in the accounting indicator calculation logic trial calculation instruction; A parsing submodule, used for the indicator operation dependency parser to parse the indicator metadata to obtain a data table required for indicator operation and send it to the indicator data isolation operator; An import submodule is used for the indicator data isolation operator to read the production data corresponding to the data table required for the indicator operation from the production database according to the data table required for the indicator operation, and import the production data corresponding to the data table required for the indicator operation into the indicator data isolation operator to store it as temporary data required for the indicator operation; The device also includes: The parsing module is used for the indicator operation dependency parser to parse the indicator metadata to obtain the accounting indicator calculation logic and send it to the indicator data isolation operator; the accounting indicator calculation logic includes the dependency relationship between the indicator and the upper-level indicator, the dependency relationship between the indicator and the data table, and the calculation path.
6. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the accounting indicator calculation logic trial calculation method for production data as described in any one of claims 1 to 4 when executing the program stored in the memory.
7. One or more computer-readable media having instructions stored thereon, which, when executed by one or more processors, enable the processors to execute the accounting indicator calculation logic trial calculation method for production data as described in any one of claims 1-4.
Citation Information
Patent Citations
Service index construction method and system, electronic equipment and storage medium
CN112488552A
Automatic index processing method, device and equipment and storage medium
CN116661778A
Computational logic processing method, electronic device, and readable storage medium
WO2023065847A1
