Evaluation rule optimization method, service evaluation method and related devices

By slicing the assessment rules into multiple task fragments and asynchronously distributing them to multiple assessment units for execution, the problem of low efficiency in enterprise expense reimbursement and tax filing is solved, achieving efficient business processing and resource optimization.

CN111858062BActive Publication Date: 2025-12-05CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010729231.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-27
Publication Date
2025-12-05
Estimated Expiration
2040-07-27

AI Technical Summary

Technical Problem

In existing technologies, the review process for corporate expense reimbursement and tax filing becomes inefficient when the volume of business increases dramatically, leading to data backlog and excessive server pressure. Existing solutions, such as processing in time periods or adding hardware, are costly and ineffective.

Method used

The evaluation rules are sliced ​​into multiple task fragments by a rule fragmentation processing algorithm and distributed to multiple evaluation units for asynchronous execution. The task allocation is optimized by using a linear regression model and a thread pool to achieve asynchronous parallel processing.

Benefits of technology

It improved business review efficiency, reduced data backlog, lowered server load, optimized processor resource utilization, and shortened review time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111858062B_ABST
    Figure CN111858062B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, and discloses an evaluation rule optimization method, a business evaluation method and related equipment, wherein the method is characterized in that a preset rule fragmentation processing algorithm is used to slice and process evaluation rules in a system to obtain a plurality of task fragments, the task fragments are then distributed to different processing units for execution, so that the pressure of a server on business auditing is reduced, the utilization rate of processor resources in a business system is improved, the efficiency of business processing is improved, and the backlog of business data is reduced; furthermore, asynchronous control is adopted between the processing units that execute the task fragments, the processing units can be independently and simultaneously operated without affecting each other, the execution time of the rules is further shortened, the length of time for business auditing is shortened, and the auditing efficiency is improved. In addition, the application also relates to the blockchain technology, and the task fragments obtained through slicing can be stored in the blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and in particular to an evaluation rule optimization method, a business evaluation method and related equipment. BACKGROUND

[0002] With the development of science and technology economy, especially the rapid development of social economy, especially the development of enterprises, due to the needs of enterprise development, a large number of reimbursement, tax reporting and other businesses are an essential part of the business, and in order to facilitate the operation of the enterprise or the enterprise for the process, more process systems have been developed, but these process systems are basically one-stop auditing operation for the reimbursement and tax reporting process auditing process. The time length consumed by the process is still reasonable in the case of small amount of business, but in the case of dramatic increase of business quantity, if the existing design rule engine execution scheme is continued, the execution efficiency cannot meet the daily business needs, and it is more likely to cause data backlog and server overload, resulting in the collapse of the entire system.

[0003] In this regard, the current way is to process by time period, or to solve it by replacing or increasing hardware device configuration, but such a way is not very effective, especially the way of replacing or increasing devices also increases the cost, and even the system security will also cause an impact that cannot be ignored. SUMMARY

[0004] The main purpose of the present application is to provide an evaluation rule optimization method, a business evaluation method and related equipment, which aims to solve the technical problem of low business auditing efficiency in the prior art.

[0005] The first aspect of the present application provides an evaluation rule optimization method, which comprises:

[0006] When receiving a business data evaluation request, a rule engine interface is called to obtain an evaluation rule stored in the business processing device, wherein the evaluation rule is an audit process rule for evaluating inputted to-be-evaluated business data;

[0007] According to a preset rule fragmentation processing algorithm, the evaluation rule is sliced to obtain at least two task fragments;

[0008] At least two evaluation units are assigned to at least two task fragments, and all evaluation units are controlled to run asynchronously to execute corresponding task fragments, so as to realize evaluation processing of the to-be-evaluated business data.

[0009] Optionally, in the first implementation manner of the first aspect of the present application, the slicing processing of the evaluation rule according to the preset rule fragmentation processing algorithm to obtain at least two task fragments comprises:

[0010] analyzing the audit process node of the evaluation rule, and drawing a tree diagram based on the analyzed audit process node;

[0011] According to the task granularity completion rule, a linear regression model is used to classify nodes of the tree diagram, and at least two node sets are obtained, wherein each node set contains nodes connected to the same parent node;

[0012] Based on the node set, the evaluation rule is sliced to obtain the same number of task fragments as the number of node sets, and a parent-child association relationship between the task fragments is established.

[0013] Optionally, in the second implementation manner of the first aspect of the present application, the step of distributing at least two task fragments to at least two evaluation units and controlling all evaluation units to asynchronously run and execute corresponding task fragments comprises:

[0014] According to the number of task fragments, the same number of evaluation units are invoked, and the evaluation units are sorted according to execution priority;

[0015] The task fragments are sequentially distributed to the sorted evaluation units from parent to child according to the parent-child association relationship, and the evaluation units are controlled to execute the task fragments in an asynchronous execution mode, wherein the evaluation unit with high priority receives the task fragments of the parent relationship first.

[0016] Optionally, in the third implementation manner of the first aspect of the present application, the step of controlling the evaluation units to execute the task fragments in an asynchronous execution mode comprises:

[0017] The time length required for the task fragments to complete execution in the evaluation units is calculated;

[0018] It is judged whether the time length is greater than a preset time value;

[0019] If yes, the task fragments are run in multiple threads, wherein the multiple thread running is an asynchronous running thread.

[0020] Optionally, in the fourth implementation manner of the first aspect of the present application, the step of running the task fragments in multiple threads comprises:

[0021] The total number of threads required to reduce the time length to half of the preset time value is calculated;

[0022] According to the total number of threads, the task fragments are refined into multiple task pieces;

[0023] The threads are started by a thread pool matching the total number of threads, and the threads are controlled to be executed asynchronously, wherein each thread executes at least one of the task pieces.

[0024] The second aspect of the present application provides a service evaluation method, which comprises:

[0025] Obtaining to-be-evaluated service data and evaluation rules corresponding to the to-be-evaluated service data, wherein the evaluation rules are audit process rules processed according to the evaluation rule optimization method provided above;

[0026] According to the evaluation rules, the to-be-evaluated service data is processed by slicing to obtain at least two data fragments;

[0027] Extracting key fields and factors in each data fragment, wherein the key fields are to-be-evaluated data items in the data fragment, and the factors are audit rule descriptions of the data items;

[0028] According to the key fields and factors, corresponding evaluation units are queried from a rule search engine on a service processing device;

[0029] At least two data fragments are sent to the corresponding evaluation units for evaluation, and an evaluation result is output.

[0030] The third aspect of the present application provides an evaluation rule optimization device, which comprises:

[0031] A rule calling module is configured to call a rule engine interface to obtain evaluation rules stored in the service processing device when a service data evaluation request is received, wherein the evaluation rules are audit process rules for evaluating input to-be-evaluated service data;

[0032] A fragmentation processing module is configured to perform slicing processing on the evaluation rules according to a preset rule fragmentation processing algorithm to obtain at least two task fragments;

[0033] A rule execution module is configured to distribute at least two task fragments to at least two evaluation units, and control all evaluation units to run and execute corresponding task fragments asynchronously to realize evaluation processing on the to-be-evaluated service data.

[0034] Optionally, in the first implementation manner of the third aspect of the present application, the fragmentation processing module comprises:

[0035] A drawing unit is configured to analyze audit process nodes of the evaluation rules, and draw a tree diagram based on the analyzed audit process nodes;

[0036] The classification unit is configured to classify nodes of the tree diagram according to a task granularity completion rule by using a linear regression model to obtain at least two node sets, wherein each node set contains nodes connected to a same parent node;

[0037] The cutting unit is configured to cut the evaluation rule based on the node sets to obtain task fragments with a same number as that of the node sets, and establish a parent-child association relationship between the task fragments.

[0038] Optionally, in a second implementation manner of the third aspect of the present application, the rule execution module comprises:

[0039] The sorting unit is configured to call evaluation units with a same number as that of the task fragments according to the number of the task fragments, and sort the evaluation units according to execution priorities;

[0040] The task distribution unit is configured to distribute the task fragments to the sorted evaluation units in a parent-child order according to the parent-child association relationship, and control the evaluation units to execute the task fragments in an asynchronous execution mode, wherein an evaluation unit with a high priority receives a task fragment with a parent relationship preferentially.

[0041] Optionally, in a third implementation manner of the third aspect of the present application, the task distribution unit is specifically configured to:

[0042] calculate a time length required for the task fragment to complete execution in the evaluation unit;

[0043] determine whether the time length is greater than a preset time value;

[0044] if yes, perform multi-threaded running on the task fragment, wherein the multi-threaded running is asynchronous running threads.

[0045] Optionally, in a fourth implementation manner of the second aspect of the present application, the task distribution unit is specifically configured to:

[0046] calculate a total number of threads required for reducing the time length to half of the preset time value;

[0047] refine the task fragment into a plurality of task pieces according to the total number of threads;

[0048] start threads matched with the total number of threads by using a thread pool, and control the threads to execute asynchronously, wherein each thread executes at least one task piece.

[0049] The fourth aspect of the present application provides a service processing device, which comprises an evaluation device and at least one evaluation rule optimization device as described above, wherein:

[0050] The evaluation device is used to obtain to-be-evaluated business data and an evaluation rule corresponding to the to-be-evaluated business data; the to-be-evaluated business data is subjected to slicing processing according to the evaluation rule, to obtain at least two data fragments; a key field and a factor in each data fragment are extracted, wherein the key field is a data item to be evaluated in the data fragment, and the factor is a description of an audit rule of the data item; a corresponding evaluation unit is queried from a rule search engine on a business processing device according to the key field and the factor; the at least two data fragments are sent to the corresponding evaluation unit for evaluation, and an evaluation result is output, wherein the evaluation rule is an audit process rule processed according to the above evaluation rule optimization method by the evaluation rule optimization device.

[0051] A fifth aspect of the present application provides a business processing device, comprising: a memory and at least one processor, the memory storing instructions, and the memory and the at least one processor being interconnected by a circuit;

[0052] The at least one processor invokes the instructions in the memory, so that the business processing device executes the evaluation rule optimization method according to any one of the above aspects;

[0053] Or,

[0054] The at least one processor invokes the instructions in the memory, so that the business processing device executes the business evaluation method according to the above aspects.

[0055] A sixth aspect of the present application provides a computer readable storage medium, the computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the steps of the evaluation rule optimization method according to any one of the above aspects;

[0056] Or,

[0057] The computer program is executed by a processor to implement the steps of the business evaluation method according to the above aspects.

[0058] In the technical solution provided by the present application, the evaluation rule is fragmented and distributed to multiple evaluation units for execution, which not only reduces the dependence of the evaluation rule on a single evaluation unit, but also greatly shortens the overall execution time of the rule, so that the efficiency of the audit is greatly improved when the business is audited, and the phenomenon of data backlog of the system in the case of large amount of data is avoided. BRIEF DESCRIPTION OF DRAWINGS

[0059] Figure 1 A first embodiment of the evaluation rule optimization method in the embodiments of the present application is shown in the figure;

[0060] Figure 2 A second embodiment of the evaluation rule optimization method in the embodiments of the present application is shown in the figure;

[0061] Figure 3 A kind of schematic diagram of tree diagram in the embodiments of the present application is shown in the figure;

[0062] Figure 4 Another kind of schematic diagram of tree diagram in the embodiments of the present application is shown in the figure;

[0063] Figure 5 A schematic diagram of the task fragment execution process in the embodiments of the present application is shown in the figure;

[0064] Figure 6 An embodiment of the service evaluation method in the embodiments of the present application is shown in the figure;

[0065] Figure 7 An embodiment of the evaluation rule optimization device in the embodiments of the present application is shown in the figure;

[0066] Figure 8 Another embodiment of the evaluation rule optimization device in the embodiments of the present application is shown in the figure;

[0067] Figure 9 An embodiment of the service processing device in the embodiments of the present application is shown in the figure;

[0068] Figure 10 Another embodiment of the service processing device in the embodiments of the present application is shown in the figure. DETAILED DESCRIPTION

[0069] The embodiments of the present application provide a scheme of block auditing, which can solve the problem of low processing efficiency of existing business auditing process, leading to data accumulation. The scheme is mainly aimed at the optimization method of auditing rules in the business processing system. Specifically, the evaluation rules in the system are sliced by a pre-set rule fragmentation processing algorithm to obtain multiple task fragments, and then the task fragments are distributed to different processing units for execution, thereby reducing the pressure of the server on business auditing, improving the utilization rate of processor resources in the business system, improving the efficiency of business processing, and reducing the backlog of business data. Further, the processing units executing the task fragments in the present application are controlled asynchronously, can run independently and simultaneously without affecting each other, further shortening the execution time of the rules, thereby shortening the length of time for business auditing.

[0070] The terms "first", "second", "third", "fourth" and the like in the description and in the claims of the present application, and above-described drawings, if any, are used to distinguish between similar objects and are not necessarily used to describe a particular sequential or chronological order. It is to be understood that the use of the terms so-termed, where appropriate, can be interchanged with each other to the extent that embodiments described herein can be carried out in sequences other than those illustrated or described herein. Furthermore, the terms "comprise" or "have" and any variations thereof are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or apparatus that includes a list of steps or units not necessarily limited to those explicitly listed, but can include other steps or units not expressly listed or inherent to such processes, methods, products or apparatus.

[0071] For the sake of understanding, the specific flow of the embodiments of the present application is described below, please refer to Figure 1 An embodiment of the evaluation rule optimization method in the embodiments of the present application includes:

[0072] 101、Upon receiving a service data evaluation request, calling a rule engine interface to obtain the evaluation rules stored in the service processing device;

[0073] In this step, the evaluation rules are audit process rules for evaluating the input to be evaluated service data. The evaluation rules can be understood as the service data itself, or as the audit rules for auditing the service data.

[0074] Optionally, the audit rules are selected here, but the processing mode when selecting the service data is the same as that of the audit rules. Upon receiving a service data evaluation request, the corresponding evaluation rules are extracted from the service processing system according to the type of service data required to be evaluated in the request.

[0075] In this embodiment, when the evaluation rules are extracted, they can be called according to the correspondence between the interfaces and the types. First, the type of service data is identified from the request, and based on the type, the corresponding interface is determined by querying the pre-set correspondence between the rule engine interface and the type, and the corresponding evaluation rules are extracted by calling the interface. In actual application, each business will be assigned a unique interface, and the interface is connected to the rule library for calling the corresponding business audit rules, and the rules corresponding to the business can be obtained through the interfaces.

[0076] 102、According to a pre-set rule fragmentation processing algorithm, the evaluation rules are sliced to obtain at least two task fragments;

[0077] In this embodiment, the preset rule fragmentation processing algorithm refers to the fragmentation technology of the rules for the review business. For example, the rule execution granularity refers to the smallest unit of data, such as the relationship between a data set and data elements. A data element can be understood as the rule execution granularity. In practical applications, it can also be understood as the smallest execution subject. For example, a business review process includes multiple review nodes, and each node completes a stage of review. Connecting all the stage reviews together forms a complete business review process. Correspondingly, business rules follow the same principle. A business rule includes multiple stages of review rules, and the execution subject of each stage is different. Based on different execution subjects, the evaluation rules are segmented into stages, and rule fragments (i.e., task fragments) are output.

[0078] In this embodiment, when segmenting the evaluation rules, segmentation can be performed according to actual needs. The number of times the rule fragmentation processing algorithm is executed can be determined based on the actual duration of the evaluation rule. If the business data evaluation request includes a time requirement for the evaluation review, the algorithm execution needs to be adjusted according to the time requirement in the request. For example, the algorithm may be executed multiple times to achieve fragmentation of the evaluation rules. If the required execution time for the evaluation rules is several times the required time, the number of times the algorithm is executed needs to be adjusted according to this multiple. The evaluation rules are then segmented sequentially based on this number of executions, and each segmentation operation targets the evaluation rule fragments obtained after the previous segmentation.

[0079] In practical applications, in order to ensure the integrity of task fragments and prevent them from being maliciously modified, the obtained task fragments can be stored in the blockchain. Then, during the evaluation process, they can be retrieved from the blockchain and distributed to various evaluation units for evaluation.

[0080] 103. Distribute at least two of the task fragments to at least two evaluation units, and control all evaluation units to asynchronously run and execute the corresponding task fragments, so as to evaluate and process the business data to be evaluated.

[0081] In this step, the evaluation unit can be understood as a server. Before distributing task fragments, the process includes selecting the appropriate evaluation unit based on the specific number of task fragments, and then sending the task fragments one by one to the corresponding evaluation unit for execution. Here, sending one by one means that the task fragments executed by each evaluation unit are different.

[0082] In the embodiment, the running time points of each evaluation unit are set while the evaluation units are distributed for execution. Optionally, the time points are set in an asynchronous running mode. The running time points of all the evaluation units are set to the same time point, i.e., the evaluation units are run in parallel. Thus, the execution time of one evaluation rule becomes the time of a single evaluation unit, instead of the sum of the times of all the evaluation units. The running time of the rule is greatly shortened, and the utilization of the evaluation units in the system is improved.

[0083] In actual application, when the evaluation units are selected, the evaluation units in an idle state and supporting task fragmentation execution time and low power consumption are selected according to the working state, working time length and power consumption proportion of each evaluation unit, the power consumption proportion is the proportion of the total power consumption of the processor of the system, and the evaluation completion time point required in the request.

[0084] Through the execution of the above method, the evaluation rule is fragmented and distributed to multiple evaluation units for execution. Thus, the dependence of the rule on a single processing unit is reduced, and the overall execution time of the rule is greatly shortened. In business auditing, the auditing efficiency is greatly improved, and the data backlog of the system is avoided in the case of large data volume.

[0085] Referring to Figure 2 Another embodiment of the evaluation rule optimization method in the embodiment includes:

[0086] 201. When a business data evaluation request is received, a rule engine interface is called to obtain the evaluation rules stored in the business processing device;

[0087] 202. The audit process nodes of the evaluation rules are analyzed, and a tree diagram is drawn based on the analyzed audit process nodes;

[0088] 203. According to the task granularity completion rule, a linear regression model is used to classify the nodes of the tree diagram, and at least two node sets are obtained;

[0089] In this step, the nodes in each node set are connected to the same parent node. Specifically, when the tree diagram of the audit process nodes is drawn using the linear regression model, the distance between the nodes on the tree diagram is calculated by the linear regression algorithm. As shown in the following figure, when the distance between the nodes is less than a certain value, and the corresponding nodes can be drawn as a linear straight line, the nodes on the straight line are classified into one group, and are cut to obtain the task fragments corresponding to the rule.

[0090] As Figure 3 and 4As shown, first, the nodes of the audit rules are combed from the overall perspective to obtain Figure 3 The linear regression algorithm is used to calculate the process nodes. First, a linear straight line is established between the last audit node on one branch and the parent node. Based on the linear straight line, the distance between the surrounding process nodes on the molecule and the straight line is calculated. If the distance meets the condition, the process node is classified as the node on the straight line.

[0091] Further, after calculating the branch node set on the parent node, it can also be calculated whether there are other molecules in the node set on the molecule node set, as shown in Figure 4 The classification method is the same as that of Figure 3 This will not be repeated here. This layer-by-layer classification calculation obtains more refined task fragments (i.e., rule fragments), which are then assigned to different levels of evaluation units for execution as the evaluation unit audit rules, thereby achieving rule fragmentation, reducing the overall control pressure of the processor, and greatly improving the final audit efficiency of the business.

[0092] 204. Based on the node set, the evaluation rules are sliced to obtain task fragments with the same number of nodes as the node set, and the parent-child association relationship between the task fragments is established;

[0093] In this embodiment, for the rule fragmentation processing algorithm, the preferred selection is the execution granularity of the rule. The rule execution granularity here can be understood as the auditor during rule execution. For the system, the auditor is the node of the process. Generally, the business audit process includes multiple sub-processes, and each sub-process is set to have an auditor. During the audit process, each auditor is only responsible for auditing its corresponding process. Therefore, it can be seen that a complete evaluation rule can be divided according to different audit nodes.

[0094] In this embodiment, after obtaining the corresponding evaluation rules according to the type of business data, the evaluation rules are parsed. Of course, the parsing here refers to the analysis and extraction of the audit nodes in the evaluation rules. Then, in order to facilitate viewing and division, after extracting the audit nodes, the audit nodes are classified and a tree diagram of the audit nodes is drawn. The tree diagram can be drawn according to the order of the audit nodes. The order here is the order of the execution of the evaluation rules based on the prior art, and is not the order in the present application. The audit nodes in the present application do not have a relationship of order, and after the tree diagram is drawn, the audit nodes in the tree diagram are marked to classify the audit nodes based on the marking.

[0095] In practical applications, when drawing a tree diagram, the review nodes can be classified first, and then the tree diagram can be drawn based on the classified review nodes. When classifying, you can choose to classify based on the parent node, that is, group all child nodes connected to the same parent node into one category.

[0096] 205. Distribute at least two of the task fragments to at least two evaluation units, and control all evaluation units to asynchronously run and execute the corresponding task fragments to evaluate the business data to be evaluated.

[0097] Furthermore, the evaluation rules are segmented according to the categories of the categorized review nodes to obtain corresponding task fragments. In practical applications, in order to further improve the execution efficiency of the rules, the task fragmentation is set according to the time limit required by the customer, or even according to the specific number of servers (evaluation units) that can be executed in the business processing system at the current moment.

[0098] In practical applications, when slicing evaluation rules, further segmentation can be performed based on dimensions such as the implementing agency and the type of review. For example, in an expense reimbursement system, segmentation can be based on the granularity of rule execution, as well as dimensions such as the agency to which the expense report belongs and the type of expense.

[0099] In this embodiment of the invention, the evaluation rules in the system are sliced ​​according to a preset rule fragmentation processing algorithm to obtain multiple task fragments. The task fragments are then distributed to different processing units for execution, thereby reducing the pressure on the server for business review, improving the utilization rate of processor resources in the business system, improving the efficiency of business processing, reducing the backlog of business data, and thus shortening the time for business review and improving review efficiency.

[0100] In this embodiment, after obtaining the task fragments using the above method, in step 205, a matching evaluation unit is selected for execution based on the task fragments. When calling the number of evaluation units, the selection can be based on the execution time of the task fragments, specifically as follows: Figure 5 As shown:

[0101] 2051. Based on the number of task fragments, retrieve the same number of evaluation units and sort the evaluation units by execution priority;

[0102] In practical application, the evaluation unit can be understood as a server, and can also be understood as a complete rule executor. When the evaluation unit is selected, a corresponding number of rule executors are selected from a rule executor library according to the number of task fragments. Specifically, the rule executor can be selected according to the type of business data. Further, the selection can also be realized according to the calling interface of the rule.

[0103] In the embodiment, after the evaluation unit is selected, the task fragments are sequentially sent to the corresponding evaluation unit for execution. When sending, if the number of selected evaluation units is the same as the number of task fragments, one task fragment is allocated to each evaluation unit. If the number of evaluation units is less than the number of task fragments, it is determined whether to distribute multiple task fragments or one task fragment according to the execution capacity of the evaluation unit. Specifically, the number of distributed task fragments is calculated according to the maximum support of the execution capacity.

[0104] Further, in the embodiment, the evaluation units can also be prioritized before the task fragments are issued. The prioritization can be according to the execution capacity of the evaluation unit, or according to the execution force level of the evaluation unit itself. The task fragments are sequentially distributed based on the priority, and then all the evaluation units are controlled to start executing the task fragments at the same time point through an asynchronous control mode. In practical application, when the evaluation rule is used to evaluate business data, the business data is also sent to the evaluation units used by the evaluation rule, and then all the evaluation units are started at the same time to evaluate the part of the data corresponding to the task fragments in the business data.

[0105] 2052, calculate the time length required for the task fragment to complete execution in the evaluation unit;

[0106] 2053, determine whether the time length is greater than a preset time value;

[0107] 2054, if yes, perform multi-threaded running on the task fragment, wherein the multi-threaded running is an asynchronous running thread.

[0108] In practical application, each evaluation unit also includes a thread pool, that is, the evaluation unit (i.e., a server) controls the execution of the task fragment through a thread. One thread can execute one complete task fragment, but multiple threads can also be used. When multiple threads are started, the task fragment needs to be further divided. Here, the division can be directly performed according to the audit node. Of course, the division can also be performed in the bundled mode of multiple audit nodes. Specifically, how to divide is calculated according to the required completion time in the request.

[0109] In the embodiment, the time length refers to the time length consumed by a thread in executing the task fragment, and when the time length is greater than a specified time value, multi-thread execution of the task fragment is selected, where the specified time value (i.e., the preset time value) should be understood as the longest running time of the evaluation unit, for example, the system sets the idle time period of the evaluation unit as 1 minute in the current time period, and the evaluation unit needs to be used to execute other tasks after 1 minute. In the application, the evaluation unit is called to temporarily execute the task fragment, which must be completed within 1 minute. If the time length of the thread execution is greater than the time length of 1 minute, multi-thread execution is selected.

[0110] Further, before step 2052, the task fragments are sequentially distributed to the sorted evaluation units according to the parent-child association relationship. In actual application, when the task fragments are distributed, the task fragments of the parent relationship in the task fragment set are first distributed to the evaluation unit with the highest priority for execution, and then the remaining task fragments are sequentially distributed to the remaining evaluation units according to the parent-child relationship. When the evaluation units are distributed, the evaluation units also need to be distributed according to the priority from high to low. In this way, the execution order of the fragments can be ensured, and the efficiency of the evaluation units in processing the task fragments can also be ensured.

[0111] In the embodiment, the multi-thread execution of the task fragment includes:

[0112] The total number of threads required to reduce the time length to half of the preset time value is calculated.

[0113] According to the total number of threads, the task fragment is refined into a plurality of task pieces.

[0114] The thread pool is started to start threads matching the total number of threads, and the threads are controlled to be executed asynchronously, where each thread executes at least one task piece.

[0115] In actual application, when the multi-thread execution of the task fragment is started, the number of threads to be started is selected according to the time requirement. Here, the number of threads is set according to half or less of the preset time value, and then the task fragment is secondarily divided according to the number of threads, so as to realize the matching of the task fragment and the thread.

[0116] Further, the thread pool is controlled to start threads to execute the divided task pieces. Here, when the task pieces are executed, the threads are changed to asynchronous threads in the thread pool in an asynchronous manner, so as to realize the simultaneous execution of the task pieces, and further shorten the execution time of the evaluation rule.

[0117] For example, when evaluating a reimbursement form, a large number of reimbursement forms are generally executed, and the service has 8 servers. If no granularity division is performed, the execution is performed on only one server. Through parameter configuration, all data to be run is divided into smaller pieces according to different parameters (such as organization level, organization area, and expense type), and then the divided task pieces are distributed according to the load of the 8 servers through a task scheduling platform, so that multiple servers are simultaneously executed to improve the execution efficiency.

[0118] The above describes that the task pieces are distributed to multiple servers for processing, which improves the execution efficiency at the scheduling level. On each server, the task can be further refined into multiple threads for concurrent processing. For example, a task piece allocated to the server has 100 reimbursement forms, and it takes 1 second for a thread to process one reimbursement form. If 10 threads are used to process the 100 reimbursement forms in parallel through a thread pool, each thread processes 10, that is, it takes about 10 seconds to process the 100 reimbursement forms

[0119] In the embodiment, since the evaluation rules need to be called according to different business data, in order to improve the evaluation rule calling efficiency, the application further includes the following steps after the at least two task pieces are distributed to the at least two evaluation units for execution:

[0120] extracting a rule keyword of each task piece and establishing a corresponding relationship between the rule keyword and an evaluation unit for executing the task piece;

[0121] synchronizing the corresponding relationship to a rule search engine on the business processing system.

[0122] In the embodiment, the scheme mainly implements synchronization of the divided evaluation rules to the search engine on the business system, so that the business can quickly call the rules to process the business data when the rules are used.

[0123] Further, after the business rules are divided by the above embodiment, the business audit process is executed, and the business data is distributed to the corresponding evaluation unit to implement the corresponding audit. The specific process is as shown in Figure 6

[0124] 601、obtaining business data to be evaluated and evaluation rules corresponding to the business data to be evaluated;

[0125] The evaluation rules are the audit process rules processed according to the above-provided business rule optimization method.

[0126] ​602. The business data to be evaluated is sliced ​​according to the evaluation rules to obtain at least two data fragments;

[0127] 603. Extract the key fields and factors from each of the data fragments, wherein the key fields are the data items to be evaluated in the data fragments, and the factors are the audit rule descriptions of the data items;

[0128] 604. Based on the key fields and factors, retrieve the corresponding evaluation unit from the rule search engine on the business processing system;

[0129] 605. Send at least two of the data fragments to the corresponding evaluation unit for evaluation and output the evaluation results.

[0130] In this embodiment, key fields are specific data dimensions within the rules, such as employee type, organization type, and department number. Factors are composed of key fields; different rules may use the same key field, for example, factor 1 "department number is even" and factor 2 "department number is odd." Both factors use the key field "department number." A rule is composed of multiple factors through a series of logical operations. It can be understood that a rule is a series of conditions linked by logical relationships, while factors describe data items, and key fields are the data items themselves. Optimizing the query efficiency of factors and field values ​​is achieved by storing the rule-related factor fields of the expense report in Elasticsearch, which improves query efficiency.

[0131] When using this evaluation rule to evaluate business data, in order to improve the evaluation efficiency, the business data also needs to be segmented according to the evaluation rule; of course, it is also possible not to segment it and directly share the business data with each evaluation unit, which can then filter it itself.

[0132] In this embodiment, the above-mentioned business data evaluation method can be implemented based on the search engine in the business processing system. The search engine is equipped with evaluation rules set based on historical data. Based on the evaluation rules, the business data to be evaluated is segmented and processed, and the corresponding server is quickly retrieved to execute the corresponding rules in order to achieve rapid evaluation of the business data.

[0133] Specifically, taking expense reports as an example, the expense report data is synchronized from the data provider (the data provider for expense reports is the old and new FAS systems) to the risk control system. It is then classified according to the granularity of rule execution, the institution to which the expense report belongs, the type of expense, and other dimensions to obtain the fragments of the expense report. The expense report fragments are then stored in a high-performance search engine (elasticsearch).

[0134] In actual application, before storing the reimbursement single fragment into elasticSearch, the keywords of the reimbursement single fragment need to be extracted, and based on the keywords, the corresponding server can be quickly queried in the search engine to realize calling the evaluation rule to evaluate the reimbursement single fragment.

[0135] Further, the search engine also introduces a cache mechanism, and the existing rules and factor fields are added to the cache to avoid direct querying of the database.

[0136] That is, according to historical data, the reimbursement single with different dimensions such as rule execution granularity, reimbursement single belonging organization, and expense type is physically fragmented into different financial risk control instances, and the rule execution task is distributed to different financial risk control instances. On the basis of multi-threading, the parallel execution ability of the task is improved based on distribution. The above design can be realized by program design, and the original synchronous thread execution task is changed to an asynchronous thread task, thereby reducing the waiting time of the system.

[0137] In the embodiment, the optimization of the business rule and the evaluation of the business data are realized by the above-mentioned manner, and such an implementation manner has better technical expansibility and business adaptability, and after the task is fragmented, it is executed in parallel on multiple instances, which can adapt to larger task quantity.

[0138] The evaluation rule optimization method in the embodiment of the application is described above, and the evaluation rule optimization device in the embodiment of the application is described below. Please refer to Figure 7 One embodiment of the evaluation rule optimization device in the embodiment of the application includes:

[0139] The rule calling module 701 is configured to call a rule engine interface to obtain the evaluation rule stored in the business processing device when receiving a business data evaluation request, wherein the evaluation rule is an audit process rule for evaluating inputted to-be-evaluated business data.

[0140] The fragmentation processing module 702 is configured to perform slicing processing on the evaluation rule according to a preset rule fragmentation processing algorithm to obtain at least two task fragments.

[0141] The rule execution module 703 is configured to distribute the at least two task fragments to at least two evaluation units, and control all the evaluation units to run and execute the corresponding task fragments asynchronously to realize evaluation processing on the to-be-evaluated business data.

[0142] In the embodiment of the present application, according to a preset rule fragmentation processing algorithm, the evaluation rule polarity slice processing in the system is processed, a plurality of task fragments are obtained, and then the task fragments are distributed to different processing units for execution, thereby reducing the pressure of the server on business audit, improving the utilization rate of processor resources in the business system, improving the efficiency of business processing, and reducing the backlog of business data; further, the processing units executing the task fragments in the present application are asynchronously controlled, can be independently and simultaneously run without affecting each other, further shortening the execution time of the rules, thereby shortening the length of the business audit time, and improving the audit efficiency.

[0143] Please refer to Figure 8 In another embodiment of the evaluation rule optimization device in the embodiment of the present application, the device comprises:

[0144] The rule calling module 701 is configured to call a rule engine interface to obtain the evaluation rules stored in the business processing device when receiving a business data evaluation request, wherein the evaluation rules are audit process rules for evaluating inputted to-be-evaluated business data;

[0145] The fragmentation processing module 702 is configured to perform slice processing on the evaluation rules according to a preset rule fragmentation processing algorithm, and obtain at least two task fragments;

[0146] The rule execution module 703 is configured to distribute the at least two task fragments to at least two evaluation units, and control all the evaluation units to asynchronously run and execute the corresponding task fragments, so as to realize the evaluation processing on the to-be-evaluated business data.

[0147] Optionally, the fragmentation processing module 702 comprises a drawing unit 7021, a classification unit 7022 and a cutting unit 7023.

[0148] The drawing unit 7021 is configured to analyze the audit process nodes of the evaluation rules, and draw a tree diagram based on the analyzed audit process nodes;

[0149] The classification unit 7022 is configured to perform node classification on the tree diagram by using a linear regression model according to a rule completion task granularity, and obtain at least two node sets, wherein the nodes included in each node set are connected to the same parent node;

[0150] The cutting unit 7023 is configured to perform slice processing on the evaluation rules based on the node sets, obtain task fragments with the same number as the node sets, and establish parent-child association relationships between the task fragments.

[0151] Optionally, the rule execution module 703 comprises a sorting unit 7031 and a task distribution unit 7032, wherein:

[0152] The sorting unit 7031 is configured to call the same number of evaluation units according to the number of the task fragments, and sort the evaluation units according to execution priorities.

[0153] The task distribution unit 7032 is configured to distribute the task fragments from the parent to the child in sequence according to the parent-child association relationship to the sorted evaluation units, and control the evaluation units to execute the task fragments in an asynchronous execution mode, wherein the evaluation units with high priorities receive the task fragments of the parent relationship preferentially.

[0154] Optionally, the task distribution unit 7032 is specifically configured to:

[0155] calculate a time length required for the task fragments to complete execution in the evaluation units;

[0156] determine whether the time length is greater than a preset time value;

[0157] If yes, the task fragments are executed in a multi-thread mode, wherein the multi-thread mode is an asynchronous running thread.

[0158] Optionally, the task distribution unit 7032 is specifically configured to:

[0159] calculate a total number of threads required for reducing the time length to half of the preset time value;

[0160] refine the task fragments into a plurality of task pieces according to the total number of threads;

[0161] start threads matched with the total number of threads through a thread pool, and control the threads to execute asynchronously, wherein each thread executes at least one task piece.

[0162] In the embodiment of the application, the evaluation rules are fragmented and distributed to a plurality of evaluation units to be executed simultaneously, so that the dependence of the rules on a single processing unit is reduced, and the overall execution time of the rules is shortened exponentially, so that the efficiency of the audit is greatly improved when the business is audited, and the phenomenon of data backlog of the system in the case of large data is avoided.

[0163] Further, the application also provides a business processing device, as shown in the figure, the device comprises: an evaluation device 902 and at least one evaluation rule optimization device 901 provided by the above-mentioned embodiment, wherein: Figure 9

[0164] ​The evaluation device 901 is configured to acquire to-be-evaluated business data and evaluation rules corresponding to the to-be-evaluated business data, perform slicing processing on the to-be-evaluated business data according to the evaluation rules to obtain at least two data fragments, extract a key field and a factor in each data fragment, wherein the key field is a data item to be evaluated in the data fragment, and the factor is a description of an audit rule of the data item, query a corresponding evaluation unit from a rule search engine on the business processing system according to the key field and the factor, send the at least two data fragments to the corresponding evaluation unit for evaluation, and output an evaluation result, wherein the evaluation rules are audit process rules processed by the rule optimization method executed by the evaluation rule optimization device 901 according to the above embodiments.

[0165] The above Figures 7-8 The evaluation rule optimization device in the embodiments of the present application is described in detail from the perspective of a modular functional entity. In actual applications, the evaluation rule optimization device can be part of a business processing device, or even a program module in a processor. The business processing device in the embodiments of the present application is described in detail from the perspective of hardware processing.

[0166] Figure 10 FIG. 1 is a structural schematic diagram of a business processing device according to an embodiment of the present application. The business processing device 1000 can have great differences due to different configurations or performances, and can include one or more processors (central processing units, CPUs) 1010 (for example, one or more processors) and a memory 1020, and one or more storage media 1030 (for example, one or more mass storage devices) storing application programs 1033 or data 1032. The memory 1020 and the storage media 1030 can be temporary storage or persistent storage. The programs stored in the storage media 1030 can include one or more modules (not shown in the figure), and each module can include a series of instruction operations in the business processing device 1000. Further, the processor 1010 can be configured to communicate with the storage media 1030, execute a series of instruction operations in the storage media 1030 on the business processing device 1000, and the functions implemented by the series of instruction operations are the steps of the evaluation rule optimization method and the steps of the business evaluation method provided in the above embodiments.

[0167] The service processing device 1000 can also include one or more power supplies 1040, one or more wired or wireless network interfaces 1050, one or more input / output interfaces 1060, and / or one or more operating systems 1031, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art can understand that Figure 10 The illustrated service processing device structure does not constitute a limitation on the service processing device and the evaluation rule optimization apparatus for performing the above method embodiments, and can include more or fewer components than illustrated, or combine certain components, or different component arrangements.

[0168] The present application also provides a computer readable storage medium, which can be a non-volatile computer readable storage medium, or a volatile computer readable storage medium, and the computer readable storage medium stores instructions, which, when executed on a computer, cause the computer to perform the steps of the evaluation rule optimization method, or implement the steps of the service evaluation method provided by the above embodiments.

[0169] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system, apparatus and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.

[0170] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that makes a contribution to the prior art, or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.

[0171] The blockchain referred to in the present application is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism and encryption algorithm. The blockchain is essentially a decentralized database, and is a string of data blocks associated using a cryptographic method, each data block containing information of a batch of network transactions, for verifying the validity (anti-fake) of the information and generating the next block. The blockchain can include a blockchain underlying platform, a platform product service layer and an application service layer and the like.

[0172] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An evaluation rule optimization method characterized by, The evaluation rule optimization method comprises: Upon receiving a service data evaluation request, calling a rule engine interface to obtain an evaluation rule stored in a service processing device, wherein the evaluation rule is an audit process rule for evaluating inputted to-be-evaluated service data; According to a preset rule fragmentation processing algorithm, performing slicing processing on the evaluation rule to obtain at least two task fragments; Distributing the at least two task fragments to at least two evaluation units and controlling all the evaluation units to asynchronously run and execute corresponding task fragments, so as to realize evaluation processing on the to-be-evaluated service data; The slicing processing on the evaluation rule according to the preset rule fragmentation processing algorithm to obtain at least two task fragments comprises: Analyzing audit process nodes of the evaluation rule and drawing a tree diagram based on the analyzed audit process nodes; According to a task granularity completion rule, using a linear regression model to classify nodes of the tree diagram to obtain at least two node sets, wherein each node set contains nodes connected to a same parent node; Based on the node sets, slicing the evaluation rule to obtain task fragments with a same number as the node sets, and establishing a parent-child association relationship between the task fragments.

2. The method of evaluating a rule optimization of claim 1, wherein, The distribution of the at least two task fragments to the at least two evaluation units for execution comprises: According to the number of the task fragments, calling the same number of evaluation units and sorting the evaluation units according to execution priorities; According to the parent-child association relationship, distributing the task fragments from parents to children to the sorted evaluation units in sequence, and controlling the evaluation units to execute the task fragments in an asynchronous execution mode, wherein an evaluation unit with a higher priority receives a task fragment with a parent relationship in priority.

3. The method of evaluating a rule optimization of claim 2, wherein, The control of the evaluation units to execute the task fragments in an asynchronous execution mode comprises: Calculating a time length required for the task fragments to complete execution in the evaluation units; Judging whether the time length is greater than a preset time value; If yes, performing multi-threaded running on the task fragments, wherein the multi-threaded running is asynchronous running threads.

4. The method of evaluating a rule optimization of claim 3, wherein, The multi-threaded running on the task fragments comprises: Calculating a total number of threads required for reducing the time length to half of the preset time value; According to the total number of threads, refining the task fragments into a plurality of task pieces; Starting threads matched with the total number of threads through a thread pool and controlling the threads to execute asynchronously, wherein each thread executes at least one task piece.

5. A service evaluation method characterized by, The service evaluation method comprises: Obtaining to-be-evaluated service data and an evaluation rule corresponding to the to-be-evaluated service data, wherein the evaluation rule is an audit process rule processed by the evaluation rule optimization method according to any one of claims 1-4; According to the evaluation rule, performing slicing processing on the to-be-evaluated service data to obtain at least two data fragments; Extracting key fields and factors in each data fragment, wherein the key fields are data items to be evaluated in the data fragments, and the factors are audit rule descriptions of the data items; According to the key field and the factor, a corresponding evaluation unit is queried from a rule search engine on the business processing device; At least two data fragments are sent to the corresponding evaluation unit for evaluation, and an evaluation result is output.

6. An evaluation rule optimization apparatus characterized by comprising: The evaluation rule optimization device comprises: A rule calling module is configured to call a rule engine interface to obtain an evaluation rule stored in a business processing device when a business data evaluation request is received, wherein the evaluation rule is an audit process rule used to evaluate inputted to-be-evaluated business data; A fragmentation processing module is configured to perform slicing processing on the evaluation rule according to a preset rule fragmentation processing algorithm to obtain at least two task fragments; A rule execution module is configured to distribute the at least two task fragments to at least two evaluation units and control all the evaluation units to run and execute corresponding task fragments asynchronously to realize evaluation processing on the to-be-evaluated business data. The slicing processing on the evaluation rule according to the preset rule fragmentation processing algorithm to obtain at least two task fragments comprises: Analyzing audit process nodes of the evaluation rule and drawing a tree diagram based on the analyzed audit process nodes; According to a task granularity completion rule, a linear regression model is used to classify nodes of the tree diagram to obtain at least two node sets, wherein nodes included in each node set are connected to a same parent node; Based on the node sets, the evaluation rule is sliced to obtain task fragments with a same number as the node sets, and a parent-child association relationship between the task fragments is established.

7. A service processing device, characterized by comprising: The business processing device comprises an evaluation device and at least one evaluation rule optimization device according to claim 6, wherein: The evaluation device is configured to obtain to-be-evaluated business data and an evaluation rule corresponding to the to-be-evaluated business data; perform slicing processing on the to-be-evaluated business data according to the evaluation rule to obtain at least two data fragments; extract key fields and factors in each data fragment, wherein the key field is a data item to be evaluated in the data fragment, and the factor is an audit rule description of the data item; according to the key field and the factor, a corresponding evaluation unit is queried from a rule search engine on the business processing device; at least two data fragments are sent to the corresponding evaluation unit for evaluation, and an evaluation result is output, wherein the evaluation rule is an audit process rule processed by the evaluation rule optimization device according to the evaluation rule optimization method of any one of claims 1-4.

8. A service processing device, characterized by comprising: The business processing device comprises a memory and at least one processor, the memory stores instructions, and the memory and the at least one processor are interconnected by a circuit; The at least one processor calls the instructions in the memory to enable the business processing device to execute the evaluation rule optimization method according to any one of claims 1-4; Alternatively, The at least one processor calls the instructions in the memory to enable the business processing device to execute the business evaluation method according to claim 5.

9. A computer-readable storage medium having stored thereon a computer program, characterized in that The computer program, which a processor executes, realizes the steps of the method for evaluating the optimization of rules as claimed in any one of claims 1-4; or The computer program, which a processor executes, realizes the steps of the method for evaluating the optimization of rules as claimed in any one of claims 1-4.

Citation Information

Patent Citations

  • Business checking method, device and equipment based on rule engine

    CN111260336A