Database-based business index calculation method and device, medium and product
By defining a directed acyclic graph and a distributed computing engine, data storage and computing hardware are decoupled, solving the coupling problem of business computing in existing technologies. This enables efficient calculation of business metrics and reuse of data resources, improving computing efficiency and data value.
Patent Information
- Application Number
- CN202511548350.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-28
- Publication Date
- 2026-01-09
AI Technical Summary
In existing technologies, business computing methods lead to the coupling of data storage and data computing, resulting in high code duplication and strong coupling. Computational performance depends on database hardware, has poor scalability, cannot obtain accurate target data, and cannot reuse intermediate indicators generated during the computing process, resulting in low data resource value.
By obtaining the identification information of business computing tasks, a directed acyclic graph is determined. Based on the directed acyclic graph, the target basic data is queried in the database, and business indicators are calculated according to the indicator calculation order. Parallel computing is performed using a distributed computing engine, decoupling data storage from computing hardware and supporting the reuse of intermediate indicators.
It achieves high efficiency in business computing and decoupling of data storage and computing, improves computing efficiency, supports the reuse of intermediate indicators, and enhances the value of data assets.
Smart Images

Figure CN121301375A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of financial technology, and in particular to a business index calculation method and device based on a database, a medium and a product. BACKGROUND
[0002] In the field of financial technology, when performing business calculations such as business performance, business assessment or business early warning, a relational database is usually used, and business calculation logic is fixed in the database in the form of a stored procedure.
[0003] The business calculation method of the prior art causes data storage and data calculation to be coupled, and for each business channel, a stored procedure needs to be independently written for business calculation, which has a high code repetition rate, strong coupling, and the calculation performance depends on the database hardware, and the scalability is poor. Moreover, when performing business calculation, it is based on massive data, and it is impossible to obtain accurate target data, and it is also impossible to deposit and reuse intermediate indexes generated during calculation, and the value of data resources is low. SUMMARY
[0004] The present application provides a business index calculation method and device based on a database, a medium and a product, to accurately obtain data for efficient business calculation, and to improve data value through index reuse.
[0005] According to an aspect of the present application, a business index calculation method based on a database is provided, which comprises:
[0006] Obtaining a business calculation task to be calculated, and determining a corresponding directed acyclic graph according to identification information of the business calculation task; wherein the directed acyclic graph comprises a business index calculation sequence;
[0007] Querying target basic data corresponding to the identification information in the database according to the directed acyclic graph;
[0008] Performing business index calculation according to the index calculation sequence in the directed acyclic graph and the target basic data, to obtain a business calculation result.
[0009] According to another aspect of the present application, a business index calculation device based on a database is provided, which comprises:
[0010] A directed acyclic graph determination module for obtaining a business calculation task to be calculated, and determining a corresponding directed acyclic graph according to identification information of the business calculation task; wherein the directed acyclic graph comprises a business index calculation sequence;
[0011] A target basic data determination module for querying target basic data corresponding to the identification information in the database according to the directed acyclic graph;
[0012] a business computing result determination module configured to perform business index calculation according to the index calculation sequence in the directed acyclic graph and the target basic data, and obtain a business computing result.
[0013] According to another aspect of the present application, an electronic device is provided, which comprises:
[0014] at least one processor; and a memory connected to the at least one processor in communication; wherein,
[0015] 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 to enable the at least one processor to perform the database-based business index calculation method according to any one of the embodiments of the present application.
[0016] According to another aspect of the present application, a computer readable storage medium is provided, which stores computer instructions for enabling a processor to implement the database-based business index calculation method according to any one of the embodiments of the present application when executed by the processor.
[0017] According to another aspect of the present application, a computer program product is provided, which comprises a computer program for implementing the database-based business index calculation method according to any one of the embodiments of the present application when executed by a processor.
[0018] The technical solution of the embodiments of the present application acquires a business computing task to be calculated, and determines a corresponding directed acyclic graph according to the identification information of the business computing task; wherein the directed acyclic graph comprises a business index calculation sequence; queries target basic data corresponding to the identification information in the database according to the directed acyclic graph; and performs business index calculation according to the index calculation sequence in the directed acyclic graph and the target basic data, and obtains a business computing result, thereby solving the problem of coupling of data storage and data computing hardware in business computing. By acquiring basic data according to the index calculation sequence in the directed acyclic graph corresponding to the business computing task and performing multi-level index calculation, the corresponding basic data can be accurately extracted according to the business computing task; the data storage and computing hardware are decoupled, and the business computing efficiency is improved; and the intermediate index can be reused, and the value of data assets is improved.
[0019] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to make the technical solutions in the embodiments of the present application clearer, the accompanying drawings needed in the embodiments will be briefly introduced. Obviously, the accompanying drawings in the following description only show some embodiments of the present application, and all other drawings obtained by those of ordinary skill in the art without any creative effort should be within the protection scope of the present application.
[0021] Figure 1 is a flow chart of a database-based service index calculation method according to an embodiment of the present application;
[0022] Figure 2 is an exemplary configuration information diagram in service index calculation;
[0023] Figure 3 is an exemplary dependency relationship diagram between service indexes;
[0024] Figure 4 is a flow chart of a database-based service index calculation method according to an embodiment of the present application;
[0025] Figure 5 is an exemplary service calculation task parallel execution diagram;
[0026] Figure 6 is a structural diagram of a database-based service index calculation device according to an embodiment of the present application;
[0027] Figure 7 is a structural diagram of an electronic device implementing the database-based service index calculation method according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the technical solutions in the embodiments of the present application clearer, the accompanying drawings needed in the embodiments will be briefly introduced. Obviously, the accompanying drawings in the following description only show some embodiments of the present application, and all other drawings obtained by those of ordinary skill in the art without any creative effort should be within the protection scope of the present application.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0030] Embodiment one
[0031] Figure 1 is a flowchart of a database-based business indicator calculation method according to an embodiment one of the present application. The embodiment can be applicable to business indicator calculation in the financial field, such as business performance, business assessment or business early warning, etc. The method can be executed by a database-based business indicator calculation device, which can be realized in the form of hardware and / or software, and can be configured in an electronic device such as a computer, a distributed computing device, a server or a mobile phone, etc. As shown in the figure, the method comprises: Figure 1
[0032] Step 110, obtaining a business calculation task to be calculated, and determining a corresponding directed acyclic graph according to the identification information of the business calculation task.
[0033] The business calculation task can be a business performance calculation, business assessment or business early warning task in the financial field. The identification information of the business calculation task can be information corresponding to the basic insurance rules. For example, different calculation subjects in the business calculation task can be applicable to different basic insurance rules, so the corresponding basic rules can be determined according to the identification information of the calculation subject. For different basic rules, the corresponding indicators are different, and the dependency relationship between the indicators is different, so the directed acyclic graph corresponding to different basic rules can be different. The directed acyclic graph includes the business indicator calculation sequence. The basic rules can be business calculation files formulated to regulate different calculation subjects in the insurance business, which can involve commission distribution, promotion mechanism, assessment standard, etc. of different subjects. In the embodiment of the present application, the basic rules can include indicators of multiple levels, and the corresponding directed acyclic graph can be generated according to the calculation sequence between the indicators. The high-level indicators can reuse the lower-level indicators to improve the value of data resources.
[0034] Optionally, before determining the corresponding directed acyclic graph according to the identification information of the business computing task, the method further comprises: obtaining configuration information corresponding to the business index calculation, and determining the dependency relationship between the business indexes according to the configuration information; and generating the directed acyclic graph for the business index calculation according to the dependency relationship between the business indexes.
[0035] The configuration information can be information related to each index in the basic regulation, such as the definition of the index, the reuse relationship between the indexes, and the calculation logic of the index. Optionally, obtaining the configuration information corresponding to the business index calculation comprises: splitting the basic regulation in the insurance business into multi-granularity configurable metadata, the configurable metadata including index metadata, formula metadata, and rule metadata; receiving a user's processing operation on the configurable metadata through a graphical configuration interface, and generating metadata calculation logic according to the processing operation; and taking the metadata calculation logic as the configuration information.
[0036] The index metadata can include index code, name, data type, source table, and field. The formula metadata can include formula expression such as operation logic between indexes, index list participating in calculation, and operator. The rule metadata can include examination level threshold, performance ratio, effective time, and applicable business organization. In the graphical configuration interface, the user can generate metadata calculation logic by selecting, parameter inputting, and condition setting on the index metadata, formula metadata, and rule metadata through dragging or form filling. Thus, in the present application, the generation of the calculation logic of each index does not need to be implemented by writing a query statement (SQL) or code. The specific metadata calculation logic can be used as the configuration information of the index.
[0037] Figure 2 is an exemplary configuration information diagram in the business index calculation. As shown in Figure 2 The index management configuration platform corresponding to the basic regulation can include basic law information configuration, job level configuration, composite index configuration, rule configuration, business calculation result configuration, and examination result configuration. The index management configuration platform can also include basic index configuration, which can specifically include basic information configuration, channel configuration, and algorithm configuration. Through the configuration information of each index in the index management configuration platform, business performance calculation and management, business examination management, and business early warning can be performed. When there is a new business calculation demand, only the configuration of each index in the Figure 2 is required, without code development.
[0038] According to the above-mentioned configuration information, the business index calculation can be implemented through the index management configuration platform. The index management configuration platform can be used to implement the business index calculation, and the configuration information of each index in the index management configuration platform can be used to implement the business index calculation. The index management configuration platform can be used to implement the business index calculation, and the configuration information of each index in the index management configuration platform can be used to implement the business index calculation. Figure 2The configuration information, i.e., the metadata calculation logic, can determine the dependency relationship between the business indicators. For example, according to the metadata calculation logic, the rule indicators corresponding to the indicators of different levels can be different, the rule indicators can be determined according to a plurality of composite indicators and / or basic indicators, and the composite indicators can be determined according to a plurality of basic indicators. The dependency relationship between the business indicators can be obtained according to the metadata calculation logic. Further, the directed acyclic graph during business calculation can be generated according to the dependency relationship between the business indicators.
[0039] The basic indicators can be atomic data in a database underlying table and can be obtained by querying. For example, the basic indicators can be "personal premium" or "long-term insurance item number", etc. The composite indicators can be composed of one or more basic indicators or other composite indicators, etc. by four arithmetic operations or function combination. For example, the comprehensive premium = personal premium + life insurance premium. Both the basic indicators and the composite indicators can be reused by the higher-level indicators. The rule indicators can be generated for business assessment and judgment based on the basic indicators and / or the composite indicators by configuring conditions. The level indicators can be the business calculation corresponding to the level, for example, the business calculation result = comprehensive premium x premium rate + reward allowance.
[0040] Optionally, according to the dependency relationship between the business indicators, a directed acyclic graph during business indicator calculation is generated, including: determining the business calculation level indicators corresponding to the business levels according to the basic rules in the insurance business; determining the corresponding rule indicators according to the level indicators, and determining the corresponding composite indicators according to the rule indicators, and determining the corresponding basic indicators according to the composite indicators; and generating the directed acyclic graph during business indicator calculation according to the dependency relationship of the basic rules, the level indicators, the rule indicators, the composite indicators, and the basic indicators.
[0041] Figure 3 is an exemplary dependency relationship diagram between business indicators. The directed acyclic graph can be generated according to the dependency relationship between the business indicators as shown in Figure 3 The indicator calculation order and dependency relationship of basic rules -> level indicators -> rule indicators -> composite indicators -> basic indicators can be generated according to the dependency relationship between the business indicators as shown in
[0042] Step 120, querying the target basic data corresponding to the identification information in the database according to the directed acyclic graph.
[0043] The basic indicators corresponding to the current business calculation task can be determined through the directed acyclic graph, so as to query the target basic data in the database according to the basic indicators.
[0044] Step 130, according to the index calculation sequence in the directed acyclic graph and the target basic data, performing business index calculation to obtain a business calculation result.
[0045] According to the index calculation sequence in the directed acyclic graph, the calculation and reuse of the indexes involved in the directed acyclic graph can be performed according to the target basic data in the recursive order, i.e., basic index -> composite index -> rule index -> level index, and finally the business calculation result is obtained.
[0046] The technical solution of the embodiment, by obtaining a business calculation task to be calculated, and determining the corresponding directed acyclic graph according to the identification information of the business calculation task, wherein the directed acyclic graph includes a business index calculation sequence; querying the target basic data corresponding to the identification information in the database according to the directed acyclic graph; and performing business index calculation according to the index calculation sequence in the directed acyclic graph and the target basic data to obtain a business calculation result, solves the problem of coupling of data storage and data calculation hardware in business calculation, and by performing basic data acquisition and multi-level index calculation according to the index calculation sequence in the directed acyclic graph corresponding to the business calculation task, the corresponding basic data can be accurately extracted according to the business calculation task; when performing business calculation, the corresponding index calculation can be directly performed by calling the directed acyclic graph, without the need to repeatedly develop codes for calculation; the data storage and calculation hardware are decoupled, and when performing business calculation, the calculation hardware can be expanded without being limited to the database hardware, which can improve the business calculation efficiency; in addition, the intermediate indexes can be reused to improve the value of data assets.
[0047] Embodiment Two
[0048] Figure 4 is a flowchart of a business index calculation method based on a database according to the embodiment two of the present application, and the technical solution in the embodiment is a further refinement of the above technical solution, and the technical solution in the embodiment can be combined with each optional scheme in one or more of the above embodiments.
[0049] Optionally, according to the index calculation sequence in the directed acyclic graph and the target basic data, performing business index calculation to obtain a business calculation result, including: according to the index information in the directed acyclic graph corresponding to each subtask in the business calculation task, estimating the operation amount of each subtask; grouping the subtasks according to the micro-service computing power in the distributed computing engine and the operation amount; distributing the subtask grouping result to the micro-services in the distributed computing engine, and performing business index calculation in parallel; and collecting the subtask results calculated by each micro-service to obtain a business calculation result.
[0050] As shown in Figure 4 , the method comprises:
[0051] Step 410, obtain configuration information corresponding to the business index calculation, and determine the dependency relationship between the business indexes according to the configuration information.
[0052] Optionally, the configuration information corresponding to the business index calculation is obtained, including: splitting basic rules in the insurance business into multi-granularity configurable metadata, the configurable metadata including index metadata, formula metadata and rule metadata; receiving user processing operations on the configurable metadata through a graphical configuration interface, and generating metadata calculation logic according to the processing operations; and taking the metadata calculation logic as the configuration information.
[0053] Step 420, generating a directed acyclic graph for business index calculation according to the dependency relationship between the business indexes.
[0054] Optionally, the directed acyclic graph for business index calculation is generated according to the dependency relationship between the business indexes, including: determining a business calculation level index corresponding to a business level according to basic rules in the insurance business; determining a corresponding rule index according to the level index, and determining a corresponding composite index according to the rule index, and determining a corresponding basic index according to the composite index; and generating a directed acyclic graph for business index calculation according to the dependency relationship of the basic rules, the level index, the rule index, the composite index and the basic index.
[0055] Step 430, querying target basic data corresponding to the identification information in the database according to the directed acyclic graph.
[0056] Step 440, estimating the operation amount of each subtask corresponding to the index information in the directed acyclic graph of each subtask in the business calculation task.
[0057] The business calculation task can be a calculation task of a plurality of subjects in a plurality of departments of a plurality of institutions. Therefore, the business calculation task can include a plurality of subtasks, and a subtask can be an index calculation on a specified subject in a specified department of a specified institution. The operation amount of different indexes is different. The operation amount of each index can be determined in advance according to the complexity of the index calculation, and the operation amount of the corresponding subtask can be determined according to each index involved in the directed acyclic graph. Alternatively, the operation amount reference value of different level indexes can be determined in advance, and the operation amount of the corresponding subtask can be determined according to the number of each level index involved in the directed acyclic graph.
[0058] Step 450, grouping the subtasks of the business calculation task according to the micro-service computing power in the distributed computing engine and the operation amounts.
[0059] According to the micro-service computing power and the operation amount of the sub-tasks, the business computing task can be grouped into sub-tasks to fully exert the computing power of the micro-service and improve the resource utilization. For example, according to the micro-service computing power and the operation amount of the sub-tasks, it can be determined that a single micro-service can support the operation of 10 sub-tasks, so the 10 sub-tasks can be grouped as a group to obtain the sub-task grouping result.
[0060] Step 460, distributing the sub-task grouping result to the micro-service in the distributed computing engine, and performing business index calculation in parallel.
[0061] By using the distributed computing engine, the business computing task can be calculated in parallel by multiple micro-services in the distributed computing engine, and the efficiency of business index calculation can be improved.
[0062] Figure 5 is an exemplary schematic diagram of parallel execution of a business computing task. As shown in Figure 5 , the front end can initiate a business computing task request, receive a directed acyclic graph determination of the micro-service according to multiple sub-tasks in the business computing task, evaluate the corresponding task amount, and then perform sub-task grouping. The distributed micro-service can distribute the sub-task grouping result, and the computing micro-service can perform sub-task calculation. The calculation results of each sub-task can be obtained by parallel execution of multiple computing micro-services.
[0063] Step 470, aggregating the sub-task results calculated by each micro-service to obtain a business computing result.
[0064] Step 480, obtaining the current level index and the current rule index of the current business in the business computing task.
[0065] Step 490, determining whether to update the current level index of the current business according to the calculation result of the current rule index.
[0066] The technical solution of the embodiment of the application can also be used for business assessment. According to the parameter value corresponding to the rule index in the business computing result, it can be determined whether the corresponding subject satisfies the upgrade or downgrade condition, so as to update the current level index. In the subsequent business computing task, the subject can perform business index calculation according to the updated level index.
[0067] For example, as Figure 3As shown, when the composite index 1 is greater than 2000 and the basic index 8 is greater than 3, the promotion condition of level M01 is reached, the level index is updated to level index 2, i.e. M02, in the subsequent business index calculation of the subject, level index 2 can be used, the corresponding rule index, composite index, and basic index are determined to form the directed acyclic graph corresponding to the business index calculation, the target basic data is searched according to the directed acyclic graph, and the business index calculation is recursively performed according to the directed acyclic graph, so as to realize the business index calculation and business assessment.
[0068] Optionally, the business index calculation is performed according to the index calculation sequence in the directed acyclic graph and the target basic data to obtain a business calculation result, including: when any one of the target basic index, the target composite index, and the target rule index changes, determining a superior index corresponding to the changed index according to a target directed acyclic graph corresponding to the changed index; and performing business index calculation on the superior index again according to the change parameter of the changed index and the target directed acyclic graph to obtain the business calculation result.
[0069] Through the directed acyclic graph, when any one of the basic index, the composite index, or the rule index changes, the corresponding superior index can be traced back, so that all affected superior indexes are intelligently recalculated according to the lower level changed index, the automatic update of the business calculation result is realized, and the data consistency is ensured.
[0070] The technical scheme of the embodiment of the application comprises the following steps: obtaining configuration information corresponding to business index calculation, and determining the dependency relationship between the business indexes according to the configuration information; generating a directed acyclic graph for business index calculation according to the dependency relationship between the business indexes; querying target basic data corresponding to the identification information in the database according to the directed acyclic graph; estimating the operation amount of each subtask corresponding to the index information in the directed acyclic graph of the subtask according to the index information; grouping the subtasks according to the operation amount and the micro-service computing power in the distributed computing engine; distributing the subtask grouping result to the micro-services in the distributed computing engine, and performing parallel business index calculation; collecting the subtask results calculated by each micro-service to obtain the business calculation result; obtaining the current level index and the current rule index of the current business in the business calculation task; and determining whether to update the current level index of the current business according to the calculation result of the current rule index, thereby solving the problem of coupling of data storage and data calculation hardware in business calculation, and realizing business index calculation and business assessment. According to the index calculation sequence in the directed acyclic graph corresponding to the business calculation task, basic data corresponding to the business calculation task can be accurately extracted; when performing business calculation, the directed acyclic graph can be directly called to calculate the corresponding index, without the need to repeatedly develop codes for calculation; the data storage and calculation hardware are decoupled, and when performing business calculation, the calculation hardware can be expanded without being limited to the database hardware, thereby improving the business calculation efficiency; in addition, the intermediate index can be reused to improve the value of data assets.
[0071] The basic law minimum granularity metadata can be defined and configured through the construction of the configurable platform, individualized needs of channels and institutions can be supported, multiple version management can be set for different basic laws, and different versions of basic laws configured for different branch institutions can be released in gray scale and tested in A / B mode, so that the business can be smoothly transitioned. Through the construction of the index system comprising basic indexes, composite indexes and rule indexes of different levels, index reuse and individualized needs can be realized, the basic law can be flexibly changed, the development and production efficiency of the basic law can be improved, and the maintenance cost can be reduced. Through the distributed computing engine service, rapid horizontal expansion can be realized through parallel calculation, the basic law calculation processing speed can be comprehensively improved, and finally the business logic originally solidified in the database storage process can be decoupled into configurable, reusable and elastically expandable Java services, the performance calculation of the business subject and the separation and efficient management of the business assessment and calculation resources can be realized.
[0072] Embodiment three
[0073] Figure 6 is a structural schematic diagram of a business index calculation device based on a database according to the embodiment three of the application. As Figure 6As shown, the apparatus includes a directed acyclic graph determination module 610, a target basic data determination module 620, and a service calculation result determination module 630. Among them:
[0074] The directed acyclic graph determination module 610 is configured to obtain a service calculation task to be calculated, and determine a corresponding directed acyclic graph according to identification information of the service calculation task; wherein the directed acyclic graph includes a service index calculation order;
[0075] The target basic data determination module 620 is configured to query target basic data corresponding to the identification information in the database according to the directed acyclic graph;
[0076] The service calculation result determination module 630 is configured to perform service index calculation according to the index calculation order in the directed acyclic graph and the target basic data, and obtain a service calculation result.
[0077] Optionally, the apparatus further includes:
[0078] A dependency relationship determination module is configured to, before determining the corresponding directed acyclic graph according to the identification information of the service calculation task, obtain configuration information corresponding to the service index calculation, and determine a dependency relationship between the service indexes according to the configuration information;
[0079] A directed acyclic graph generation module is configured to generate a directed acyclic graph for service index calculation according to the dependency relationship between the service indexes.
[0080] Optionally, the dependency relationship determination module includes:
[0081] A metadata configuration unit is configured to split basic rules in an insurance service into multi-granularity configurable metadata, the configurable metadata including index metadata, formula metadata, and rule metadata;
[0082] A metadata calculation logic generation unit is configured to receive a processing operation of the user on the configurable metadata through a graphical configuration interface, and generate metadata calculation logic according to the processing operation;
[0083] A configuration information determination unit is configured to take the metadata calculation logic as configuration information.
[0084] Optionally, the directed acyclic graph generation module includes:
[0085] A level index determination unit is configured to determine a service calculation level index corresponding to a service level according to basic rules in an insurance service;
[0086] A basic index determination unit is configured to determine a rule index corresponding to the level index, determine a composite index corresponding to the rule index, and determine a basic index corresponding to the composite index;
[0087] A directed acyclic graph generation unit is configured to generate a directed acyclic graph for business index calculation according to the dependency relationship of the basic regulation rule, the level index, the regulation index, the composite index, and the basic index.
[0088] Optionally, the business calculation result determination module 630 comprises:
[0089] A subtask operation amount estimation unit is configured to estimate operation amounts of the subtasks according to index information in the directed acyclic graphs corresponding to the subtasks in the business calculation task.
[0090] A subtask grouping unit is configured to group the subtasks according to the microservice computing power in the distributed computing engine and the operation amounts.
[0091] A parallel computing unit is configured to distribute the subtask grouping results to the microservices in the distributed computing engine and perform parallel business index calculation.
[0092] A business calculation result determination unit is configured to aggregate the subtask results calculated by the microservices to obtain the business calculation result.
[0093] Optionally, the business calculation result determination module 630 comprises:
[0094] An index change tracing unit is configured to determine a superior index corresponding to a changed index according to a target directed acyclic graph corresponding to the changed index when any one of the target basic index, the target composite index, and the target regulation index changes.
[0095] A business calculation result updating unit is configured to perform business index calculation on the superior index according to a change parameter of the changed index and the target directed acyclic graph to obtain the business calculation result.
[0096] Optionally, the apparatus further comprises:
[0097] A current level information determination module is configured to obtain a current level index and a current regulation index of a current business in the business calculation task after performing business index calculation according to the index calculation sequence in the directed acyclic graph and the target basic data to obtain the business calculation result.
[0098] A current level index updating module is configured to determine whether to update the current level index of the current business according to a calculation result of the current regulation index.
[0099] The database-based business index calculation apparatus provided in the embodiments of the present application can perform the database-based business index calculation method provided in any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.
[0100] The collection, storage, use, processing, transmission, provision, and disclosure of the user personal information (such as basic data related to the business, etc.) involved in the technical solutions of the embodiments of the present application comply with relevant laws and regulations and do not violate public order and good customs.
[0101] The collected information is information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data comply with relevant national and regional laws and standards, necessary security measures are taken, public order and good customs are not violated, and appropriate operation portals are provided for the user to choose authorization or refusal.
[0102] Embodiment Four
[0103] Figure 7 A structural schematic diagram of an electronic device 10 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices (such as headsets, glasses, watches, etc.), and other similar computing devices. The components shown here, their connections, and their functions, as described above, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.
[0104] As shown in Figure 7 The electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is in communication connection with the at least one processor 11, wherein the memory stores a computer program that can be executed by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0105] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0106] The processor 11 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose 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 11 performs various methods and processes described above, such as the database-based business metric computation method.
[0107] In some embodiments, the database-based business metric computation method can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded onto the RAM 13 and executed by the processor 11, one or more steps of the database-based business metric computation method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the database-based business metric computation method by any other appropriate means, such as by means of firmware.
[0108] The various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, specially designed application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0109] A computer program for implementing the methods of the present application can be written in any combination of one or more programming languages. The computer program can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed by the processor of the machine, produces an apparatus the functions / operations specified in the flowcharts and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0110] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of electrical connections, a portable computer diskette, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0111] To provide for interaction with a user, the systems and techniques described here can 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 a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0112] The systems and techniques described herein can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described herein, or any combination of such back end, middleware, or front end components. The components of the system can 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.
[0113] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can 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 large management difficulty and weak business scalability in traditional physical host and VPS service.
[0114] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the scope of the present disclosure. For example, the steps recited in the present disclosure can be executed in parallel, executed in sequence, or executed in different orders, as long as the desired results of the technical solutions of the present disclosure can be achieved, and the present disclosure is not limited herein.
[0115] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A database-based business metric calculation method, characterized by, The method comprises the following steps: obtaining a business computing task to be calculated, and determining a corresponding directed acyclic graph according to identification information of the business computing task; wherein the directed acyclic graph comprises a business index calculation sequence; querying target basic data corresponding to the identification information in the database according to the directed acyclic graph; performing business index calculation according to the index calculation sequence in the directed acyclic graph and the target basic data to obtain a business calculation result.
2. The method of claim 1, wherein, Before determining the corresponding directed acyclic graph according to the identification information of the business computing task, the method further comprises the following steps: obtaining configuration information corresponding to business index calculation, and determining a dependency relationship between business indexes according to the configuration information; generating a directed acyclic graph for business index calculation according to the dependency relationship between business indexes.
3. The method of claim 2, wherein, Obtaining configuration information corresponding to business index calculation comprises the following steps: splitting basic rules in an insurance business into multi-granularity configurable metadata, wherein the configurable metadata comprises index metadata, formula metadata, and rule metadata; receiving a processing operation of the user on the configurable metadata through a graphical configuration interface, and generating metadata calculation logic according to the processing operation; taking the metadata calculation logic as the configuration information.
4. The method of claim 2, wherein, According to the dependency relationship between business indexes, generating a directed acyclic graph for business index calculation comprises the following steps: determining a business calculation level index corresponding to a business level according to basic rules in an insurance business; determining a corresponding rule index according to the level index, and determining a corresponding composite index according to the rule index, and determining a corresponding basic index according to the composite index; generating a directed acyclic graph for business index calculation according to the dependency relationship from the basic rules, the level index, the rule index, the composite index to the basic index.
5. The method of claim 1, wherein, According to the index calculation sequence in the directed acyclic graph and the target basic data, performing business index calculation to obtain a business calculation result comprises the following steps: estimating the operation amount of each subtask corresponding to the index information in the directed acyclic graph corresponding to each subtask in the business computing task; grouping subtasks according to the micro-service computing power in the distributed computing engine and the operation amount of each subtask; distributing the subtask grouping result to the micro-service in the distributed computing engine, and performing business index calculation in parallel; summarizing the subtask results calculated by each micro-service to obtain a business calculation result.
6. The method of claim 4, wherein, According to the index calculation sequence in the directed acyclic graph and the target basic data, performing business index calculation to obtain a business calculation result comprises the following steps: when there is a change in any one of the target basic index, the target composite index, and the target rule index, determining a superior index corresponding to the change index according to a target directed acyclic graph corresponding to the change index; re-performing business index calculation on the superior index according to the change parameter of the change index according to the target directed acyclic graph to obtain a business calculation result.
7. The method of claim 4, wherein, After performing business index calculation according to the index calculation sequence in the directed acyclic graph and the target basic data to obtain a business calculation result, the method further comprises the following steps: obtaining a current level indicator of a current service in the service computing task and a current rule indicator; determining whether to update the current level indicator of the current service according to a calculation result of the current rule indicator.
8. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected to the at least one processor in communication; 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 to enable the at least one processor to execute the database-based service indicator calculation method in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to implement the database-based service indicator calculation method in any one of claims 1-7 when executed.
10. A computer program product comprising a computer program which, when executed by a processor, implements the database-based service indicator calculation method according to any one of claims 1-7.