Conditional branch short-circuit evaluation optimization method and system applied to decision flow

CN122779956BActive Publication Date: 2026-10-20SHANGHAI ICEKREDIT INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611232714.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-14
Publication Date
2026-10-20
Estimated Expiration
2046-08-14

AI Technical Summary

Technical Problem

现有短路求值优化方法大多仅针对相邻的逻辑判定节点做局部优化,只能处理紧邻节点之间的短路逻辑,无法覆盖存在逻辑依赖但间隔较远的判定谓词单元,优化空间有限;部分全局优化方法仅基于逻辑结构直接划分短路片段,没有区分判定谓词单元的依赖属性,会生成大量冗余的短路片段,不仅无法提升求值效率,反而会增加短路判断的额外开销;此外,现有方法在划分短路片段时,没有考虑依赖深度对逻辑截断有效性的影响,对不满足依赖条件的判定节点错误划分短路片段,容易引发逻辑错误,导致最终决策结果出错,整体而言,现有方法无法实现风控决策流条件分支的全局精准短路优化,难以在保证决策结果正确的前提下最大化减少不必要的求值操作,无法满足高并发风控场景下的效率提升需求

Benefits of technology

通过获取按判定顺序组织多个判定节点条目的风控决策流结构描述文本,依据结论引用路径构建决策流转连通图并提取从起始到终止节点的判定节点序列,将判定谓词单元按顺序拼接为判定谓词长链,实现了风控决策流逻辑结构的全局梳理,解决了现有方法仅能做局部优化、无法覆盖全局逻辑依赖的技术缺陷;针对每对判定谓词单元计算逻辑依赖深度参数,标记出远程依赖对与独立判定谓词单元,实现了不同依赖属性判定谓词单元的精准区分,避免了错误划分引发的逻辑错误;将每个判定谓词单元作为候选短路锚点,确定触发短路的逻辑截断位置并划分短路求值片段,设置对应短路触发真值,实现了全局维度的短路片段划分,充分挖掘了风控决策流中的短路优化空间;剔除冗余短路求值片段得到精简集合,去除了不必要的短路判断逻辑,避免了额外计算开销对决策效率的负面影响,保证了优化效率;在实时求值过程中按顺序逐单元求值,触发短路条件时跳过对应片段内所有后续求值,沿用触发真值作为结果,实现了精准高效的短路求值,既保证了风控决策结果的正确性,又最大化减少了不必要的求值操作,有效提升了高并发场景下风控决策流的整体求值效率,降低了单次决策的平均耗时,适配了大规模风控决策请求的处理需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122779956B_ABST
    Figure CN122779956B_ABST
Patent Text Reader

Abstract

The application provides a conditional branch short-circuit evaluation optimization method and system applied to a decision flow. First, a risk control decision flow structure text is acquired, a connected graph is constructed according to the conclusion reference path between nodes, a complete judgment node sequence is extracted, and all judgment predicates are spliced into a long chain of judgment predicates. Then, the logical dependence depth of each pair of judgment predicates is calculated, the remote dependence pairs and independent judgment predicates are marked, each judgment predicate is taken as a candidate short-circuit anchor point to divide a short-circuit evaluation segment, redundant segments are removed to obtain a simplified short-circuit segment set. In the real-time evaluation process of the risk control decision flow, the predicates are evaluated in sequence one by one. When the evaluated result triggers the trigger condition of any short-circuit segment, the evaluation operation of all subsequent predicates in the short-circuit segment is directly skipped, and the trigger truth value is used as the evaluation result of the short-circuit segment. The application can effectively reduce redundant calculation and improve the execution efficiency of risk control decisions in a high-concurrency scenario under the premise of ensuring the correctness of the decision result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of risk control decision flow execution optimization technology, and more specifically, to a conditional branch short-circuit evaluation optimization method and system applied to decision flow. Background Technology

[0002] In risk control decision-making scenarios, the risk control decision flow usually consists of multiple condition judgment nodes arranged in sequence. Each risk control decision requires the evaluation and calculation of all judgment nodes in sequence to obtain the final decision result. When the concurrency of risk control requests is high, a large number of redundant judgment evaluations will slow down the overall decision efficiency. Therefore, it is necessary to optimize the condition branches by short-circuiting the evaluation and terminate unnecessary evaluation calculations in advance to improve decision efficiency. Most existing short-circuit evaluation optimization methods only perform local optimization on adjacent logical decision nodes, and can only handle short-circuit logic between closely adjacent nodes. They cannot cover decision predicate units that have logical dependencies but are far apart, resulting in limited optimization space. Some global optimization methods simply divide short-circuit segments based on the logical structure without distinguishing the dependency attributes of decision predicate units, generating a large number of redundant short-circuit segments. This not only fails to improve evaluation efficiency but also increases the additional overhead of short-circuit judgment. In addition, existing methods do not consider the impact of dependency depth on the effectiveness of logical truncation when dividing short-circuit segments. Incorrectly dividing short-circuit segments for decision nodes that do not meet the dependency conditions can easily lead to logical errors and cause the final decision result to be incorrect. Overall, existing methods cannot achieve global and accurate short-circuit optimization of the conditional branches of the risk control decision flow. They are unable to minimize unnecessary evaluation operations while ensuring the correctness of the decision result, and cannot meet the efficiency improvement requirements in high-concurrency risk control scenarios. Summary of the Invention

[0003] In view of this, the purpose of this application is to provide a conditional branch short-circuit evaluation optimization method and system for decision flow.

[0004] According to a first aspect of this application, a conditional branch short-circuit evaluation optimization method for decision flow is provided, the method comprising: Obtain the risk control decision flow structure description text, which contains multiple decision node entries organized in decision order; Based on the conclusion reference path between decision node entries in the risk control decision flow structure description text, a decision flow connection graph with decision node entries as vertices is constructed. In the decision flow connection graph, a decision node sequence from the starting decision node entry to the ending decision node entry is extracted. The decision predicate units of each decision node entry in the extracted decision node sequence are concatenated into a long chain of decision predicates in the order of the decision node sequence. For each pair of decision predicate units in the decision predicate long chain, calculate the logical dependency depth parameter between the first occurrence positions of the pair of decision predicate units in the decision node sequence, mark decision predicate unit pairs whose logical dependency depth parameter exceeds the dependency depth threshold as remote dependency pairs, and mark decision predicate units in the decision predicate long chain that do not belong to any remote dependency pairs and are only referenced by a single decision node entry as independent decision predicate units. Using each decision predicate unit in the long chain of decision predicates as a candidate short-circuit anchor point, determine the logical truncation position where the first truth value after the candidate short-circuit anchor point can determine the truth value result of the remaining chain segment, divide the set of decision predicate units between the candidate short-circuit anchor point and the logical truncation position into short-circuit evaluation segments, and set a segment short-circuit trigger truth value for each short-circuit evaluation segment. From all the short-circuit evaluation segments, redundant short-circuit evaluation segments that intersect with independent decision predicate units and whose short-circuit evaluation segments no longer participate in the evaluation of long chain decision predicates after the truth value of the independent decision predicate units are determined are removed, resulting in a set of concise short-circuit evaluation segments. During the real-time evaluation process of the risk control decision flow, the decision predicate units are evaluated one by one according to the decision node sequence. When the truth value of the evaluated decision predicate unit triggers the short-circuit trigger truth value of any short-circuit evaluation segment in the set of short-circuit evaluation segments, the evaluation operation of all subsequent decision predicate units in that short-circuit evaluation segment is skipped, and the short-circuit trigger truth value of that short-circuit evaluation segment is used as the short-circuit evaluation result of that short-circuit evaluation segment.

[0005] According to a second aspect of this application, a conditional branch short-circuit evaluation optimization system for decision flow is provided. The conditional branch short-circuit evaluation optimization system for decision flow includes a machine-readable storage medium and a processor. The machine-readable storage medium stores machine-executable instructions. When the processor executes the machine-executable instructions, the conditional branch short-circuit evaluation optimization system for decision flow implements the aforementioned conditional branch short-circuit evaluation optimization method for decision flow.

[0006] Based on any of the above aspects, the technical effect of this application is as follows: By acquiring the risk control decision flow structure description text of multiple decision node entries organized in decision order, constructing a decision flow connectivity graph based on the conclusion reference path, and extracting the decision node sequence from the start to the end node, the decision predicate units are sequentially concatenated into a long chain of decision predicates. This achieves a global overview of the logical structure of the risk control decision flow, overcoming the technical deficiency of existing methods that can only perform local optimization and cannot cover global logical dependencies. For each pair of decision predicate units, a logical dependency depth parameter is calculated, marking remote dependency pairs and independent decision predicate units, achieving accurate differentiation of decision predicate units with different dependency attributes, and avoiding logical errors caused by incorrect partitioning. Each decision predicate unit is used as a candidate short-circuit anchor point to determine the logical truncation position that triggers the short circuit and to divide the short-circuit evaluation segment. By setting corresponding short-circuit trigger truth values, the system achieves global-level short-circuit segment division, fully exploring the short-circuit optimization space in the risk control decision flow. Redundant short-circuit evaluation segments are eliminated to obtain a simplified set, removing unnecessary short-circuit judgment logic and avoiding the negative impact of additional computational overhead on decision efficiency, thus ensuring optimization efficiency. During real-time evaluation, values ​​are evaluated sequentially unit by unit. When a short-circuit condition is triggered, all subsequent evaluations within the corresponding segment are skipped, and the trigger truth value is used as the result. This achieves accurate and efficient short-circuit evaluation, ensuring the correctness of risk control decision results while minimizing unnecessary evaluation operations. This effectively improves the overall evaluation efficiency of the risk control decision flow in high-concurrency scenarios, reduces the average time of a single decision, and adapts to the processing needs of large-scale risk control decision requests. Attached Figure Description

[0007] Figure 1 A flowchart illustrating the conditional branch short-circuit evaluation optimization method for decision flow provided in an embodiment of this application is shown.

[0008] Figure 2 This is a schematic diagram of the decision flow console interface provided in the embodiments of this application. Detailed Implementation

[0009] Figure 1This illustration shows a flowchart of a conditional branch short-circuit evaluation optimization method for decision flows, provided in an embodiment of this application. This method runs within a risk control decision engine and is used to perform static analysis and segmentation of the long chain of decision predicates before the execution of the risk control decision flow. During execution, a short-circuit jump mechanism is used to skip redundant decision predicate evaluation operations. This embodiment uses a financial risk control decision engine processing a corporate loan application as an example for illustration. This risk control decision flow includes six decision nodes: enterprise business registration information verification, tax data verification, legal litigation verification, related-party transaction verification, credit score calculation, and credit conclusion generation. Each decision node contains multiple decision predicate units, and the decision flow executes these decision predicate units sequentially to arrive at the final credit conclusion. This method is applicable to any scenario that requires the sequential execution of a large number of decision conditions and the skipping of subsequent redundant decisions based on the executed results.

[0010] Step S110: Obtain the risk control decision flow structure description text, which contains multiple decision node entries organized in the decision order.

[0011] The risk control decision flow structure description text is generated by the risk control strategy configuration platform and distributed to the risk control decision engine. This text is stored in JSON format, with a top-level JSON object containing a decision flow identifier field and a decision node entry array field. Each element in the decision node entry array field is a decision node entry object. Each decision node entry object contains a node identifier field, a node decision premise field, and a node decision conclusion field. The node decision premise field stores the decision condition expression for that decision node, which is composed of multiple decision predicate units concatenated using logical connectives AND or OR. The node decision conclusion field stores the conclusion value after the decision node passes and the identifier of the target decision node for the next step. The elements in the decision node entry array field are arranged in the order of decision flow execution. In a financial risk control scenario, the decision node entry array contains six decision node entries: enterprise business registration information verification node, tax data verification node, judicial litigation verification node, related-party transaction verification node, credit score calculation node, and credit conclusion generation node.

[0012] Step S120: Based on the conclusion reference path between decision node entries in the risk control decision flow structure description text, construct a decision flow connection graph with decision node entries as vertices. Extract the decision node sequence from the starting decision node entry to the ending decision node entry in the decision flow connection graph. Concatenate the decision predicate units of each decision node entry in the extracted decision node sequence into a long chain of decision predicates according to the order of the decision node sequence.

[0013] Step S121: Parse the target decision node entry identifier pointed to by the node decision conclusion of each decision node entry in the risk control decision flow structure description text, establish a directed flow edge from the current decision node entry to the target decision node entry identifier, and form a set of directed flow edges with decision node entries as vertices after traversing all decision node entries.

[0014] Iterate through each decision node entry object in the decision node entry array of the risk control decision flow structure description text. For each decision node entry object, parse its node decision conclusion field. The node decision conclusion field contains one or more target decision node entry identifiers, indicating the target decision node to which the current decision node should proceed after passing the current decision node's judgment. For each target decision node entry identifier in the node decision conclusion field, create a directed flow edge, with the starting point of the directed flow edge being the node identifier of the current decision node entry and the ending point being the target decision node entry identifier. Merge all created directed flow edges into a directed flow edge set. In a financial risk control scenario, if the node decision conclusion of the enterprise business registration information verification node points to the tax data verification node and the judicial litigation verification node, then create directed flow edges from the enterprise business registration information verification node to the tax data verification node, and from the enterprise business registration information verification node to the judicial litigation verification node.

[0015] Step S122: Combine the set of directed flow edges and the set of vertex entries of decision nodes into a decision flow connected graph. In the decision flow connected graph, identify vertex entries of decision nodes with empty in-degree as starting decision nodes and vertex entries of decision nodes with empty out-degree as ending decision nodes.

[0016] The node identifiers of all decision node entries in the decision node entry array are used as the vertex set. The set of directed flow edges generated in step S121 is used as the edge set. The vertex set and edge set are combined into a directed graph data structure, which is the decision flow connected graph. The decision flow connected graph is stored in the form of an adjacency list. Each vertex in the decision flow connected graph is traversed, and the in-degree and out-degree values ​​of each vertex are counted. The in-degree value is equal to the number of directed flow edges pointing to that vertex. The out-degree value is equal to the number of directed flow edges from that vertex to other vertices. Vertices with an in-degree value of zero are identified as starting decision node entries. Vertices with an out-degree value of zero are identified as ending decision node entries. In the financial risk control scenario, the enterprise business information verification node has an in-degree of zero and is the starting decision node entry. The credit conclusion generation node has an out-degree of zero and is the ending decision node entry.

[0017] Step S123: Starting from the initial decision node entry, perform a depth-first search along the directed flow edge, record all reachable paths from the initial decision node entry to the final decision node entry, and generate a decision node sequence for each reachable path according to the order of the decision node entries along the path.

[0018] Starting with the initial decision node entry, a depth-first search algorithm is executed in the decision flow connected graph. During the search, a stack structure is maintained to record the current search path. Starting from the initial decision node entry, the search proceeds along the directed flow edges to adjacent vertices. Each visited adjacent vertex is pushed onto the stack. When the search reaches the final decision node entry, all vertices recorded in the stack, arranged from bottom to top, form a reachable path from the initial decision node entry to the final decision node entry. The vertices in this reachable path are arranged in order to generate a decision node sequence. The depth-first search continues to backtrack and explore other branches until all reachable paths have been traversed. In a financial risk control scenario, there are two reachable paths. The first path is: enterprise registration information verification node, tax data verification node, credit score calculation node, and credit conclusion generation node. The second path is: enterprise registration information verification node, judicial litigation verification node, related-party transaction verification node, credit score calculation node, and credit conclusion generation node.

[0019] Step S124: For each decision node sequence, count the total number of decision predicate units covered by the decision node sequence and the number of times the decision predicate units are repeated in different decision node entries, and select the decision node sequence with the largest ratio of the total number of decision predicate units to the number of repeated occurrences as the main decision node sequence.

[0020] For each decision node sequence, traverse each decision node entry in the sequence and parse the decision predicate units in its decision premise field. Let the total number of decision predicate units in the decision node sequence be T, and let the number of times a decision predicate unit appears repeatedly among different decision node entries be R. Calculate T×(1 / R) as the score of the decision node sequence. Select the decision node sequence with the highest score as the main decision node sequence. In a financial risk control scenario, the first of two reachable paths has a higher score and is selected as the main decision node sequence.

[0021] Step S125: Expand the node decision premise of each decision node entry in the main decision node sequence into a conjunction sequence or disjunction sequence of decision predicate units, arrange the expanded decision predicate units in sequence according to the order of the decision node sequence, and insert node boundary markers at the intersection of adjacent decision node entries to generate a long chain of decision predicates.

[0022] Iterate through each decision node entry in the main decision node sequence. For each decision node entry, parse the decision condition expression in its decision premise field. The logical connective AND in the decision condition expression represents a conjunction, and OR represents a disjunction. Split the decision condition expression into a conjunction or disjunction sequence of decision predicate units according to the logical connectives. A decision predicate unit is an indivisible atomic decision condition, such as "the registered capital of the enterprise is greater than or equal to the preset minimum registered capital". Arrange the expanded decision predicate unit sequences of each decision node entry in the order of the decision node sequence. Insert a node boundary marker between the expanded decision predicate unit sequences of two adjacent decision node entries. The node boundary marker is a special identifier used to identify the boundary between decision nodes. After arrangement, a long decision predicate unit sequence is obtained, i.e., the long chain of decision predicates. In financial risk control scenarios, the long chain of judgment predicates includes multiple judgment predicate units of enterprise business information verification nodes, multiple judgment predicate units of tax data verification nodes, multiple judgment predicate units of credit score calculation nodes, and multiple judgment predicate units of credit granting conclusion generation nodes, with adjacent nodes separated by node boundary markers.

[0023] Step S126: In the long chain of determination predicates, add a source determination node identifier and a position number within the source determination node to each determination predicate unit to form a long chain of determination predicates carrying source tracing information.

[0024] For each decision predicate unit in the long chain of decision predicates, record its source decision node identifier and its position number within the source decision node. The source decision node identifier is the node identifier of the decision node entry to which the decision predicate unit belongs. The position number within the source decision node is the position of the decision predicate unit in the sequence of decision predicate units within its respective decision node entry. This traceability information is appended to the data structure of the decision predicate unit to form a long chain of decision predicates carrying source traceability information.

[0025] Step S130: For each pair of decision predicate units in the decision predicate long chain, calculate the logical dependency depth parameter between the first occurrence positions of the pair of decision predicate units in the decision node sequence, mark decision predicate unit pairs whose logical dependency depth parameter exceeds the dependency depth threshold as remote dependency pairs, and mark decision predicate units in the decision predicate long chain that do not belong to any remote dependency pairs and are only referenced by a single decision node entry as independent decision predicate units.

[0026] Step S131: Traverse all pairs of decision predicate units formed by combining them in the decision predicate long chain, and extract the in-chain position index of the first occurrence of each decision predicate unit in the decision predicate long chain for each pair of decision predicate units.

[0027] All decision predicate units in the long decision predicate chain are paired to generate all decision predicate unit pairs. Let the total number of decision predicate units be N, then the total number of decision predicate unit pairs M = N × (N-1) × (1 / 2). For each pair of decision predicate units, extract the in-chain position index of the first occurrence of the two decision predicate units in the long decision predicate chain. The in-chain position index is the sequence number of the decision predicate unit in the long decision predicate chain, starting from 1.

[0028] Step S132: Calculate the absolute difference between the indices of the first occurrence of the two decision predicate units within the chain, and divide the absolute difference by the total number of decision predicate units contained in the long chain of decision predicates to obtain the normalized predicate position difference. At the same time, extract the number of decision node sequence position intervals corresponding to the source decision node identifiers of the two decision predicate units, and divide the number of decision node sequence position intervals by the total number of decision node entries contained in the decision node sequence to obtain the normalized node interval number. The normalized predicate position difference and the normalized node interval number are weighted and summed to obtain the logical dependency depth parameter between the two decision predicate units.

[0029] Let the in-chain position indices of the two decision predicate units be P1 and P2, respectively, and the total number of decision predicate units in the long decision predicate chain be N. The normalized predicate position difference D1 = |P1 - P2| × (1 / N). Extract the position indices of the source decision node identifiers of each of the two decision predicate units in the main decision node sequence, and let the position indices of the two source decision node identifiers in the main decision node sequence be S1 and S2, respectively. The number of position intervals in the decision node sequence L = |S1 - S2|. Let the total number of decision node entries contained in the main decision node sequence be K. The normalized node interval number D2 = L × (1 / K). The logical dependency depth parameter Z = D1 × w1 + D2 × w2, where w1 is the predicate position weight coefficient, w2 is the node interval weight coefficient, and w1 + w2 = 1. A larger value of Z indicates a greater logical dependency distance between the two decision predicate units.

[0030] Step S133: Sort all decision predicate pairs in descending order according to the logical dependency depth parameter, take the logical dependency depth parameter value corresponding to the first preset quantile in the descending order as the dependency depth threshold, and mark decision predicate pairs whose logical dependency depth parameter exceeds the dependency depth threshold as remote dependency pairs.

[0031] Sort the logical dependency depth parameters of all decision predicate unit pairs calculated in step S132 in descending order of their numerical values. Set a preset quantile order ratio parameter r, where r ranges from greater than 0 to less than 1. Take the logical dependency depth parameter value at the (r×M)th position in the descending sort as the dependency depth threshold, where M is the total number of decision predicate unit pairs. Traverse all decision predicate unit pairs and mark those with logical dependency depth parameters greater than the dependency depth threshold as remote dependency pairs. Remote dependency pairs indicate that two decision predicate units are far apart in the long chain of decision predicates and belong to different decision nodes, thus having a remote logical dependency relationship.

[0032] Step S134: Construct a set of attribution tags for each decision predicate unit. If the decision predicate unit appears in any remote dependency pair, add a remote attribution tag to the set of attribution tags for that decision predicate unit. After traversing all remote dependency pairs, count the number of times the remote attribution tag appears in the set of attribution tags for each decision predicate unit.

[0033] Assign a home tag set to each decision predicate unit in the long decision predicate chain. The home tag set is a list structure. Iterate through all the remote dependency pairs marked in step S133. For each decision predicate unit appearing in a remote dependency pair, add a remote home tag to its home tag set. After the iteration is complete, count the number of remote home tags in the home tag set of each decision predicate unit. This number equals the number of remote dependency pairs that the decision predicate unit participates in.

[0034] Step S135: Extract the source decision node identifier of each decision predicate unit in the decision predicate long chain, and count the number of times each decision predicate unit is referenced by different decision node entries as the cross-node reference frequency.

[0035] Traverse each decision predicate unit in the long chain of decision predicates and read the source decision node identifier from its attached source tracing information. For each decision predicate unit, count the number of duplicate source decision node identifiers; this number is the number of times the decision predicate unit is referenced by different decision node entries, denoted as the cross-node reference frequency C. If the decision predicate unit is referenced by only one decision node entry, then C=1.

[0036] Step S136: Mark the decision predicate unit in the set of ownership tags where the number of occurrences of the remote ownership tag is zero and the cross-node reference frequency is equal to one as an independent decision predicate unit, and keep the remaining decision predicate units as non-independent decision predicate units.

[0037] Iterate through each decision predicate unit in the long chain of decision predicates, checking the number of remote attribution tags and the cross-node reference frequency in its attribution tag set. If the number of remote attribution tags is zero and the cross-node reference frequency is one, it means that the decision predicate unit does not participate in any remote dependencies and is used only by a single decision node; it is marked as an independent decision predicate unit. The truth value judgment result of an independent decision predicate unit has no remote effect on other decision predicate units. Decision predicate units that do not meet the above conditions remain as non-independent decision predicate units.

[0038] Step S140: Using each decision predicate unit in the long chain of decision predicates as a candidate short-circuit anchor point, determine the logical truncation position where the first truth value after the candidate short-circuit anchor point can determine the truth value result of the remaining chain segment, divide the set of decision predicate units between the candidate short-circuit anchor point and the logical truncation position into short-circuit evaluation segments, and set a segment short-circuit trigger truth value for each short-circuit evaluation segment.

[0039] Step S141: Select each decision predicate unit from the decision predicate long chain as a candidate short-circuit anchor point, and extract all decision predicate units from the candidate short-circuit anchor point to the end of the decision predicate long chain to form the remaining decision predicate chain segment.

[0040] Starting from the first decision predicate unit in the long decision predicate chain, each decision predicate unit is selected sequentially as a candidate short-circuit anchor point. For each candidate short-circuit anchor point, all decision predicate units are extracted from the next position after its in-chain position index to the last decision predicate unit in the long decision predicate chain. These decision predicate units constitute the remaining decision predicate chain segment.

[0041] Step S142: Analyze the logical connectives between the decision predicate units in the remaining decision predicate chain segment, identify the distribution positions of conjunction and disjunction connections in the remaining decision predicate chain segment, and construct the logical connective structure string of the remaining decision predicate chain segment.

[0042] Iterate through each decision predicate unit in the remaining decision predicate chain segment, and read the logical connectives connecting adjacent decision predicate units from the long decision predicate chain. Logical connectives include AND and OR. AND represents a conjunction join, and OR represents a disjunction join. Alternately arrange the decision predicate units and logical connectives in the remaining decision predicate chain segment to form a logical join structure string. The format of the logical join structure string is: decision predicate unit 1, logical connective 1, decision predicate unit 2, logical connective 2, decision predicate unit 3, and so on.

[0043] Step S143: Based on the logical join structure string, determine the position of the last decision predicate unit that uniquely determines the truth value of the remaining decision predicate chain segment, and use the position of the last decision predicate unit as the logical truncation position. If the logical join structure string of the remaining decision predicate chain segment consists of a pure conjunction join and the truth value of the candidate short-circuit anchor is false, then the logical truncation position is the position of the candidate short-circuit anchor itself. If the logical join structure string of the remaining decision predicate chain segment consists of a pure disjunctive join and the truth value of the candidate short-circuit anchor is true, then the logical truncation position is the position of the candidate short-circuit anchor itself. If the logical join structure string contains a mixed structure of conjunction join and disjunctive join, then determine the shortest logical truncation position layer by layer based on the calculation rules of the logical join structure string.

[0044] Analyze the logical join structure of the remaining decision predicate chain. If all logical join terms in the logical join structure are AND, then the remaining decision predicate chain is a pure conjunction structure. In this case, if the truth value of the candidate short-circuit anchor is false, according to the conjunction operation rule, if any conjunction term is false, the overall result is false, and the truth value of the remaining decision predicate chain is uniquely determined to be false. The logical truncation position is the position of the candidate short-circuit anchor itself. If the truth value of the candidate short-circuit anchor is true, the result of the conjunction operation cannot be uniquely determined, and the evaluation needs to continue.

[0045] If all logical join terms in the logical join structure string are OR, then the remaining decision predicate chain is a pure disjunctive structure. In this case, if the candidate short-circuit anchor is true, according to the disjunctive operation rules, if any disjunctive term is true, the overall result is true, and the truth value of the remaining decision predicate chain is uniquely determined to be true. The logical truncation position is the position of the candidate short-circuit anchor itself. If the candidate short-circuit anchor is false, the result of the disjunctive operation cannot be uniquely determined, and further evaluation is required.

[0046] If the logical join string contains a mixture of AND and OR structures, it is analyzed layer by layer according to the priority rules of logical operations. First, the logical join string is divided into multiple disjunction segments according to OR, and each disjunction segment contains a pure AND structure. For each disjunction segment, if the truth value of the candidate short-circuit anchor can uniquely determine the result of the disjunction segment, the logical truncation position is the position of the final decision predicate unit of the disjunction segment. If the truth value of the candidate short-circuit anchor cannot uniquely determine the result of the current disjunction segment, the analysis continues to the next disjunction segment until the shortest position that can uniquely determine the result is found as the logical truncation position.

[0047] Step S144: All decision predicate units between the candidate short-circuit anchor point and the logic truncation position, as well as the decision predicate units corresponding to the candidate short-circuit anchor point itself and the logic truncation position, are included in the same short-circuit evaluation fragment. The truth value of the candidate short-circuit anchor point is configured as the fragment short-circuit trigger truth value for the short-circuit evaluation fragment. This results in a set of candidate short-circuit evaluation fragments that correspond one-to-one with the candidate short-circuit anchor points. Each candidate short-circuit evaluation fragment in the set of candidate short-circuit evaluation fragments has a different fragment short-circuit trigger truth value.

[0048] For each candidate short-circuit anchor, a short-circuit evaluation segment is defined as the set consisting of all decision predicate units between the anchor and its corresponding logical truncation position, the anchor itself, and the decision predicate units corresponding to the logical truncation position. A short-circuit evaluation segment is a continuous subsequence of decision predicate units. A short-circuit trigger truth value is assigned to this segment; the truth value is equal to the truth value of the candidate short-circuit anchor, i.e., true or false. All short-circuit evaluation segments constitute the candidate short-circuit evaluation segment set.

[0049] Step S150: Remove redundant short-circuit evaluation segments from all the short-circuit evaluation segments that have an intersection with the independent decision predicate unit and whose short-circuit evaluation segments no longer participate in the evaluation of the long chain of decision predicates after the truth value of the independent decision predicate unit is determined, and obtain a set of concise short-circuit evaluation segments.

[0050] Step S151: Traverse each short-circuit evaluation segment, extract the set of decision predicate units contained in the short-circuit evaluation segment, and perform an intersection operation on the set of decision predicate units and the marked independent decision predicate unit set to obtain the intersection decision predicate unit subset.

[0051] Iterate through each short-circuit evaluated fragment in the candidate short-circuit evaluated fragment set. For each short-circuit evaluated fragment, extract all decision predicate units contained therein to form a decision predicate unit set. Perform a set intersection operation on the decision predicate unit set and the independent decision predicate unit set marked in step S136. The result of the intersection operation is the subset of decision predicate units formed by decision predicate units that belong to both sets.

[0052] Step S152: If the intersection decision predicate unit subset is a non-empty set, extract the position index of each independent decision predicate unit in the long chain of decision predicates in the intersection decision predicate unit subset, and determine the first independent decision predicate unit with the smallest position index in the intersection decision predicate unit subset.

[0053] If the subset of intersection decision predicate units is not empty, it means that the short-circuit evaluation fragment contains some independent decision predicate units. Extract the in-chain position index of each independent decision predicate unit in the subset of intersection decision predicate units. Compare the size of these in-chain position indices and select the independent decision predicate unit with the smallest in-chain position index as the first independent decision predicate unit. The first independent decision predicate unit appears earliest in the long chain of decision predicates.

[0054] Step S153: Substitute the truth value of the first independent decision predicate unit into the logical connection structure string of the decision predicate long chain to which the short-circuit evaluation segment belongs, and determine whether the short-circuit evaluation segment still has a diversion effect on the final truth value result of the decision predicate long chain after substitution.

[0055] Substitute the truth value of the first independent decision predicate unit into the logical join structure string of the long chain of decision predicates to which the short-circuited evaluation segment belongs. As an independent decision predicate unit, the truth value of the first independent decision predicate unit can be determined independently during the decision process, unaffected by other decision predicate units. After substitution, re-evaluate the impact of the short-circuited evaluation segment on the final truth value of the long chain of decision predicates. If, after substitution, the short-circuit trigger truth value of the short-circuited evaluation segment no longer changes the final truth value of the long chain of decision predicates, it indicates that the short-circuited evaluation segment no longer has a shunting effect. If, after substitution, the short-circuit trigger truth value of the short-circuited evaluation segment still changes the final truth value, it indicates that the short-circuited evaluation segment still has a shunting effect.

[0056] Step S154: If the short-circuit evaluation fragment after substitution no longer has a diversion effect on the final truth result of the long decision predicate chain, then the short-circuit evaluation fragment is marked as a redundant short-circuit evaluation fragment. If the short-circuit evaluation fragment after substitution still has a diversion effect on the final truth result of the long decision predicate chain, then the short-circuit evaluation fragment is marked as a valid short-circuit evaluation fragment. Short-circuit evaluation fragments whose intersection decision predicate unit subset is empty are directly marked as valid short-circuit evaluation fragments. All valid short-circuit evaluation fragments are collected to form a refined short-circuit evaluation fragment set. At the same time, short-circuit evaluation fragments with a fragment length of one unit are removed from the refined short-circuit evaluation fragment set.

[0057] Based on the judgment result of step S153, the segments are classified and labeled. Segments that no longer cause a shunting effect are labeled as redundant short-circuit evaluation segments, while those that still cause a shunting effect are labeled as valid short-circuit evaluation segments. For short-circuit evaluation segments whose intersection decision predicate unit subset is empty, they do not intersect with any independent decision predicate units and are directly labeled as valid short-circuit evaluation segments. All valid short-circuit evaluation segments are collected to form a refined short-circuit evaluation segment set. The segment length of each short-circuit evaluation segment in the refined short-circuit evaluation segment set is checked; the segment length is equal to the number of decision predicate units contained in the short-circuit evaluation segment. If the segment length is a unit length, i.e., it contains only one decision predicate unit, then the short-circuit evaluation segment cannot achieve the optimization effect of skipping multiple decision predicate units and is removed from the refined short-circuit evaluation segment set.

[0058] Step S160: During the real-time evaluation process of the risk control decision flow, evaluate the decision predicate units one by one according to the decision node sequence. When the truth value of the evaluated decision predicate unit triggers the fragment short-circuit trigger truth value of any short-circuit evaluation fragment in the set of short-circuit evaluation fragments, skip the evaluation operation of all subsequent decision predicate units in the short-circuit evaluation fragment, and use the fragment short-circuit trigger truth value of the short-circuit evaluation fragment as the short-circuit evaluation result of the short-circuit evaluation fragment.

[0059] Step S161: Receive a risk control service request message, extract the request parameter field carried in the risk control service request message, and establish a binding relationship between the request parameter field and the judgment variable of the first judgment predicate unit in the judgment predicate long chain.

[0060] The risk control decision engine receives risk control service request messages from external systems. These messages are in JSON format and contain multiple request parameter fields. Each request parameter field includes a field name and a field value. The engine iterates through all request parameter fields in the message, binding the value of each field to the corresponding decision variable in the decision predicate chain. The binding is established by matching the decision variable name with the request parameter field name. After binding, the decision variable required by each decision predicate unit in the decision predicate chain receives a specific value under the current request.

[0061] Step S162: Take out the current value-to-be-determined predicate unit in the order of the decision predicate units in the decision predicate long chain, perform truth value determination on the current value-to-be-determined predicate unit according to the current value of the request parameter field, and write the truth value determination result into the evaluated truth value record table.

[0062] Starting from the first decision predicate unit in the long chain of decision predicates, each decision predicate unit is sequentially extracted as the current decision predicate unit to be evaluated. For the current decision predicate unit to be evaluated, its decision condition expression is parsed, and the current value of the decision variable in the decision condition expression is obtained from the binding relationship established in step S161. The decision variable value and the decision threshold are compared according to the comparison operator in the decision condition expression to obtain the truth value determination result. The truth value determination result is true or false. The truth value determination result is written to the evaluated truth value record table. The evaluated truth value record table is a hash table structure, where the key is the index of the decision predicate unit's position in the chain, and the value is the truth value determination result.

[0063] Step S163: After each truth value determination result is written into the evaluated truth value record table, traverse each refined short-circuit evaluation segment in the refined short-circuit evaluation segment set, and obtain the segment short-circuit trigger truth value of the refined short-circuit evaluation segment and the set of decision predicate units contained in the refined short-circuit evaluation segment.

[0064] After each evaluation of a decision predicate unit is completed and written to the evaluated truth value record table, a short-circuit jump detection is triggered. Each refined short-circuit evaluation fragment in the refined short-circuit evaluation fragment set is traversed. For each refined short-circuit evaluation fragment, its fragment short-circuit trigger truth value attribute is read; this attribute is set in step S144. Simultaneously, the set of decision predicate units contained in the refined short-circuit evaluation fragment is extracted, and the in-chain position index of the first decision predicate unit in the set is obtained.

[0065] Step S164: Check whether the evaluated truth value record table contains the truth value of the first decision predicate unit in the simplified short-circuit evaluation segment and whether the truth value is consistent with the short-circuit trigger truth value of the segment. If they are consistent, trigger the short-circuit jump operation of the simplified short-circuit evaluation segment.

[0066] Using the in-chain index of the first decision predicate unit in the simplified short-circuit evaluation segment as the key, the corresponding truth value decision result is retrieved from the evaluated truth value record table. If a truth value decision result is found and this truth value is the same as the segment short-circuit trigger truth value of the simplified short-circuit evaluation segment, a short-circuit jump operation is triggered. If no truth value decision result is found or the truth value is different from the segment short-circuit trigger truth value, a short-circuit jump operation is not triggered.

[0067] Step S165: When performing the short-circuit jump operation, the pointer of the current evaluation position of the long chain of decision predicates is directly moved to the position of the first decision predicate unit after the end decision predicate unit of the short-circuit evaluation segment. The short-circuit trigger truth value of the segment is filled into the corresponding record position of all decision predicate units in the short-circuit evaluation segment as the short-circuit evaluation result of the entire short-circuit evaluation segment in the evaluated truth value record table.

[0068] When a short-circuit jump operation is triggered, the index of the final decision predicate unit in the chain of the simplified short-circuit evaluation fragment is obtained. The pointer of the current evaluation position of the long chain of decision predicates is moved directly to the position of the first decision predicate unit after the final decision predicate unit, skipping all decision predicate units within the simplified short-circuit evaluation fragment. The short-circuit trigger truth value of the fragment is used as the short-circuit evaluation result of the entire simplified short-circuit evaluation fragment and written to the corresponding record position of each decision predicate unit in the evaluated truth value record table.

[0069] Step S166: After completing the traversal of the set of short-circuit evaluation segments and the short-circuit jump operation, continue to move the evaluation position pointer along the long chain of decision predicates to the next unevaluated decision predicate unit until all decision predicate units in the long chain of decision predicates have obtained true value records.

[0070] After traversing the set of concise short-circuit evaluation fragments and handling short-circuit jumps, the evaluation position pointer continues to move along the long chain of decision predicates. Decision predicate units already covered by short-circuit jumps are skipped, and the evaluation position pointer is moved to the next unevaluated decision predicate unit. Steps S162 to S166 are repeated until all decision predicate units in the long chain of decision predicates have corresponding truth records in the evaluated truth record table. After evaluation, based on the truth value combination of the decision predicate units of each decision node entry in the long chain of decision predicates, the node decision conclusion for each decision node entry is obtained, and the risk control decision result is finally output. In financial risk control scenarios, if some decision predicate units of the enterprise business information verification node trigger short-circuit jumps, the remaining decision predicate units of that node and some decision predicate units of downstream nodes will be skipped, directly leading to the conclusion that the enterprise business information verification fails, thus accelerating the execution of the risk control decision flow.

[0071] Step S210: Obtain the field source type of the request parameter field that each decision predicate unit in the decision predicate long chain depends on. The field source type includes the request message body field source, the request message header field source, and the external context field source. Group decision predicate units with the same field source type into the same evaluation source group.

[0072] Iterate through each decision predicate unit in the long chain of decision predicates and extract the field names of the request parameter fields that the decision predicate unit depends on. Locate the source of the field in the risk control service request message structure definition based on the field name. Field source types include request message body field source, request message header field source, and external context field source. A request message body field source indicates that the field is located in the request body of the risk control service request message. A request message header field source indicates that the field is located in the request header of the risk control service request message. An external context field source indicates that the field is not in the request message and needs to be obtained from an external context data source. Decision predicate units with the same field source type are grouped into the same evaluation source group. Each evaluation source group contains several decision predicate units, and these decision predicate units have the same data source.

[0073] Step S220: Within each evaluation source group, construct the group-specific decision predicate sub-chain according to the order of appearance of the decision predicate unit in the decision predicate long chain. Independently divide the group-specific short-circuit evaluation segment for each group-specific decision predicate sub-chain, considering only the logical connection relationship within the decision predicate sub-chain of the evaluation source group during the division.

[0074] For each evaluation source group, the decision predicate units within that group are arranged according to their order of appearance in the long decision predicate chain, forming a sub-chain of decision predicates within that group. The sub-chain of decision predicates within a group is a subsequence of the long decision predicate chain. Steps S140 to S150 are performed independently on each sub-chain of decision predicates within that group for short-circuit evaluation segment partitioning. During partitioning, only the logical connections between decision predicate units within the sub-chain of decision predicates within that group are considered; decision predicate units across groups are not considered. The partitioning result is the set of short-circuit evaluation segments corresponding to that evaluation source group.

[0075] Step S230: During the real-time evaluation process of the risk control decision flow, an independent data prefetching thread is assigned to different evaluation source groups. Each data prefetching thread pre-extracts the current values ​​of the request parameter fields required by all decision predicate units within the evaluation source group from the corresponding field source, and temporarily stores the extracted current values ​​of the request parameter fields in the group's dedicated data prefetching cache.

[0076] Before real-time evaluation of the risk control decision flow begins, a separate data prefetch thread is started for each evaluation source group. The data prefetch thread executes in parallel with the main evaluation thread. For request body field source groups, the data prefetch thread parses all request parameter fields required by the decision predicate units within the group from the request body of the risk control service request message in batches, storing the field names and values ​​in the group's dedicated data prefetch cache. For request header field source groups, the data prefetch thread extracts field values ​​from the request header of the risk control service request message in batches. For external context field source groups, the data prefetch thread reads field values ​​in batches from the cache of the external context data source. The data prefetch cache is a hash table structure, with the field name as the key and the current value of the field as the value.

[0077] Step S240: When the current evaluation position pointer of the decision predicate chain points to a certain decision predicate unit, read the current value of the request parameter field from the data prefetch buffer corresponding to the evaluation source group to which the decision predicate unit belongs, perform truth value determination, and limit the group short-circuit evaluation fragment trigger detection of the evaluation source group to the reading range of the data prefetch buffer of the evaluation source group.

[0078] During truth value determination in step S162, the current value of the required field is read from the data prefetch buffer corresponding to the evaluation source group to which the current evaluation predicate unit belongs. The short-circuit jump detection in step S163 is limited to the set of short-circuit evaluation fragments within the evaluation source group to which the current evaluation predicate unit belongs. That is, only short-circuit evaluation fragments within this group are detected; short-circuit evaluation fragments from other groups are not detected. This isolates the scope of short-circuit detection according to data source groups.

[0079] Step S250: If the data prefetching thread of a certain evaluation source group encounters a data source unavailable state when performing data prefetching operation, all short-circuit evaluation segments corresponding to the evaluation source group are marked as temporarily disabled. The decision predicate units in the evaluation source group are evaluated sentence by sentence in the order of the decision predicate long chain during the real-time evaluation process of this risk control decision flow.

[0080] If the data prefetching thread encounters a data source connection timeout, a data source error, or a data source that is unavailable while retrieving data, it determines that the data source is unavailable. The status of all short-circuit evaluation segments corresponding to the evaluation source group is marked as temporarily disabled. For short-circuit evaluation segments in the temporarily disabled state, these segments are skipped in the short-circuit jump detection in step S163 without short-circuit detection. The decision predicate units within this group are evaluated sentence by sentence in the order of the decision predicate long chain, without using short-circuit jump optimization.

[0081] Step S260: After the real-time evaluation process of this risk control decision flow is completed, the short-circuit evaluation segment corresponding to the evaluation source group whose data source unavailable state has been eliminated is restored from the temporarily disabled state to the enabled state. The restored short-circuit evaluation segment will participate in the short-circuit jump detection again in the next real-time evaluation process of the risk control decision flow.

[0082] After the real-time evaluation process of this risk control decision flow ends and returns the result, it checks whether the data source corresponding to the evaluation source group that was previously unavailable has been restored to availability. If the data source has been restored to availability, the status of the short-circuit evaluation segment corresponding to that evaluation source group is restored from the temporarily disabled state to the enabled state. In the next real-time evaluation process of the risk control decision flow, the short-circuit evaluation segment of the group that has been restored to the enabled state will participate in the short-circuit jump detection again.

[0083] Step S310: During the real-time evaluation process of the risk control decision flow, record the numerical snapshot of the request parameter field corresponding to each short-circuit evaluation segment when it is triggered to jump to a short circuit. Perform cluster analysis on the numerical snapshots of the request parameter field corresponding to the same short-circuit evaluation segment when it is triggered to jump to a short circuit multiple times, and extract the boundary of the numerical cluster region of the request parameter field of the triggering condition of the short-circuit evaluation segment.

[0084] When the short-circuit jump operation is triggered in step S164, a snapshot of the request parameter fields related to the short-circuit evaluation segment that triggered the short circuit is recorded in the current risk control service request message. The snapshot contains the field name and field value of the request parameter fields on which each decision predicate unit in the short-circuit evaluation segment depends. Snapshots of the same short-circuit evaluation segment triggered in multiple risk control decision flow evaluation processes are collected. When the number of collected snapshots reaches a preset sample size, cluster analysis is performed on these snapshots. The cluster analysis uses the DBSCAN density clustering algorithm to cluster the snapshots into several clusters based on the similarity of the request parameter field values. The cluster containing the most snapshots is selected, and the minimum and maximum values ​​of this cluster in each request parameter field dimension are calculated as the boundaries of the request parameter field numerical clustering region for the triggering condition of the short-circuit evaluation segment.

[0085] Step S320: Based on the boundary of the request parameter field value aggregation region, generate a supplementary trigger condition constraint for each short-circuit evaluation segment. The supplementary trigger condition constraint limits the fact that the fragment short-circuit trigger truth value of the short-circuit evaluation segment only takes effect when the request parameter field value falls within the boundary of the request parameter field value aggregation region.

[0086] The request parameter field values ​​extracted in step S310 are converted into a trigger condition supplementary constraint. The trigger condition supplementary constraint is a conditional expression consisting of the request parameter field name, a comparison operator, and a boundary value. The meaning of the trigger condition supplementary constraint is: the short-circuit trigger truth value of the short-circuit evaluation fragment will only take effect and trigger a short-circuit jump if the request parameter field value falls within the boundary of the cluster region.

[0087] Step S330: In the subsequent real-time evaluation process of the risk control decision flow, when the truth value of the evaluated judgment predicate unit triggers the short-circuit trigger truth value of a certain short-circuit evaluation segment, it is further detected whether the value of the current request parameter field falls within the boundary of the request parameter field value clustering area corresponding to the short-circuit evaluation segment. The short-circuit jump operation is only performed when the value of the current request parameter field falls within the boundary of the request parameter field value clustering area.

[0088] In step S164, if the truth value in the evaluated truth value record table matches the short-circuit trigger truth value, the short-circuit jump is not executed immediately. First, the values ​​of the request parameter fields corresponding to the short-circuit evaluated fragment are extracted from the current risk control service request message. It is then checked whether these values ​​fall within the boundary of the aggregation region defined by the supplementary trigger condition constraint generated in step S320. If they fall within the boundary, the short-circuit jump operation in step S165 is executed. If they do not fall within the boundary, the short-circuit jump operation is not executed.

[0089] Step S340: If the current request parameter field value does not fall within the boundary of the request parameter field value cluster area, then the short-circuit jump operation of the short-circuit evaluation segment is rejected. Continue to evaluate the subsequent decision predicate units in the short-circuit evaluation segment along the decision predicate long chain, and record this rejection triggering event in the rejection triggering log of the short-circuit evaluation segment.

[0090] When the value of a request parameter field is not within the boundary of the aggregation region, a short-circuit jump is refused. The pointer to the current evaluation position of the decision predicate chain is kept at its original position, and subsequent decision predicate units within the short-circuit evaluation segment continue to be evaluated sequentially. At the same time, a refusal trigger record is generated and written to the refusal trigger log of the short-circuit evaluation segment. The refusal trigger record includes a snapshot of the current request parameter field value, the time of occurrence, and the reason for the refusal trigger.

[0091] Step S350: When the cumulative number of rejection trigger events recorded in the rejection trigger log of a certain short-circuit evaluation segment exceeds the preset rejection trigger cumulative threshold, the short-circuit evaluation segment is permanently removed from the set of streamlined short-circuit evaluation segments. The permanently removed short-circuit evaluation segment will no longer participate in the short-circuit jump detection of any subsequent risk control decision flow real-time evaluation process.

[0092] The total number of rejection events in the rejection trigger log for each short-circuit evaluation segment is counted. When the total number of rejection events exceeds a preset cumulative rejection threshold, it indicates that the triggering condition of that short-circuit evaluation segment is frequently not met in actual requests, and its short-circuit optimization effect is poor. This short-circuit evaluation segment is permanently removed from the streamlined short-circuit evaluation segment set. Permanently removed short-circuit evaluation segments will no longer participate in short-circuit jump detection during all subsequent real-time evaluation processes in the risk control decision flow.

[0093] Step S410: Obtain the business scenario tag associated with each decision node entry in the risk control decision flow structure description text. The business scenario tag is used to identify the risk control business type to which the decision node entry is applicable. Decision node entries with the same business scenario tag are grouped into the same business scenario decision node group.

[0094] The risk control decision flow structure description text describes how each decision node entry object contains a business scenario tag field. The business scenario tag field can take values ​​such as "corporate loan," "personal consumer loan," or "supply chain finance," representing risk control business types. All decision node entries are iterated through, and the business scenario tag for each entry is extracted. Decision node entries with the same business scenario tag are grouped into the same business scenario decision node group. Each business scenario decision node group contains a set of decision node entries that need to be executed under that business scenario.

[0095] Step S420: For each business scenario decision node group, extract the distribution area of ​​the decision predicate units of all decision node entries in the business scenario decision node group in the decision predicate long chain, and take the distribution area as the scenario decision predicate chain segment corresponding to the business scenario decision node group.

[0096] For each business scenario decision node group, extract the decision predicate units corresponding to all decision node entries within that group from the decision predicate long chain. These decision predicate units occupy a continuous or multi-segment distribution region in the decision predicate long chain. Record the start and end positions of this distribution region; this distribution region is the scenario decision predicate chain segment corresponding to that business scenario decision node group. The scenario decision predicate chain segment is a subsequence of the decision predicate long chain.

[0097] Step S430: Before the risk control service request message enters the real-time evaluation process of the risk control decision flow, the business scenario identifier field carried in the risk control service request message is parsed, the corresponding business scenario judgment node group is matched according to the business scenario identifier field, and the short-circuit evaluation range of the risk control service request message is limited to the scenario judgment predicate chain segment corresponding to the business scenario judgment node group.

[0098] The request header of the risk control service request message contains a business scenario identifier field. During step S161, when parsing the risk control service request message, the value of this business scenario identifier field is extracted. The value of the business scenario identifier field is then matched against the business scenario label of the business scenario decision node group. If a match is found, the short-circuit evaluation range for this real-time evaluation of the risk control decision flow is limited to the scenario decision predicate chain segment corresponding to this business scenario decision node group. Decision predicate units outside the scenario decision predicate chain segment do not participate in short-circuit jump detection during this evaluation.

[0099] Step S440: Re-execute the long chain splicing process of the judgment predicate and the short-circuit evaluation fragment division process on the limited scenario judgment predicate chain segment to generate a scenario short-circuit evaluation fragment set exclusive to the business scenario judgment node group. The short-circuit evaluation fragments in the scenario short-circuit evaluation fragment set only participate in short-circuit jump detection when evaluating the risk control service request message corresponding to the business scenario judgment node group.

[0100] The defined scenario-determining predicate chain is used as a new long-chain predicate, and the complete processing flow of steps S120 to S150 is re-executed on it. A scenario short-circuit evaluation fragment set specific to this business scenario determination node group is generated. The short-circuit evaluation fragments in the scenario short-circuit evaluation fragment set only participate in short-circuit jump detection when evaluating the risk control service request message that matches the business scenario identifier field.

[0101] Step S450: During the real-time evaluation of the risk control decision flow, if the business scenario indicated by the business scenario identifier field of the current risk control service request message changes, the use of the scenario short-circuit evaluation fragment set corresponding to the current business scenario judgment node group is suspended, the scenario short-circuit evaluation fragment set corresponding to the changed business scenario is loaded, and the part of the truth value result of the evaluated judgment predicate unit that overlaps with the coverage of the changed business scenario judgment node group is retained at the switching point.

[0102] When processing multiple risk control service request messages in batches, if the business scenario identifier field of two consecutive request messages is different, a business scenario switch occurs. The use of the current business scenario's short-circuit evaluation fragment set is paused. The short-circuit evaluation fragment set corresponding to the switched business scenario is loaded from the pre-loaded business scenario short-circuit evaluation fragment cache. The truth values ​​of the judgment predicate units in the already evaluated truth value record table that fall within the coverage of the judgment node group of the switched business scenario are retained and not re-evaluated. Truth values ​​outside the coverage are cleared. After the switch, short-circuit jump detection continues according to the new scenario short-circuit evaluation fragment set.

[0103] For example, in step S510: During the real-time evaluation process of the risk control decision flow, the distribution pattern of the truth value sequence of the evaluated decision predicate units in the long chain of decision predicates is monitored. When it is detected that the truth value sequence of multiple consecutive evaluated decision predicate units shows a trend that is inconsistent with the short-circuit trigger truth value of the segment of the divided short-circuit evaluation segment but tends to trigger another short-circuit evaluation segment, the corresponding consecutive truth value sequence is recorded as the short-circuit trend trajectory.

[0104] During the iterative evaluation process in steps S162 to S166, a sliding window is maintained, recording the truth sequence of multiple recently evaluated decision predicate units. The truth sequence within the window is compared with the decision predicate unit composition structure of each short-circuit evaluation segment in the set of concise short-circuit evaluation segments. If the truth sequence does not conform to the triggering mode of any triggered short-circuit evaluation segment, but gradually approaches the triggering condition of another untriggered short-circuit evaluation segment, then the continuous truth sequence within that window is recorded as a short-circuit trend trajectory. The short-circuit trend trajectory includes the in-chain position index sequence of the decision predicate unit and the corresponding truth sequence.

[0105] Step S520: Perform pattern matching between the short-circuit trend trajectory and the decision predicate unit composition structure of each short-circuit evaluation segment in the set of refined short-circuit evaluation segments. If the decision predicate unit composition structure of the short-circuit trend trajectory intersects with the decision predicate unit composition structure of a certain non-triggered short-circuit evaluation segment and the intersection ratio exceeds the trend matching threshold, then mark the non-triggered short-circuit evaluation segment as a candidate trend short-circuit segment.

[0106] The set of in-chain position indices of the decision predicate units involved in the short-circuit trend trajectory is intersected with the set of decision predicate units contained in each non-triggered short-circuit evaluation segment. The intersection percentage = number of intersection elements × (1 / total number of decision predicate units in the short-circuit evaluation segment). If the intersection percentage exceeds the trend matching threshold, the non-triggered short-circuit evaluation segment is marked as a candidate trend short-circuit segment.

[0107] Step S530: The candidate trend short-circuit segment is split into a front segment that intersects with the short-circuit trend trajectory and a rear segment that does not intersect with the short-circuit trend trajectory. The front segment that intersects with the short-circuit trend trajectory is retained as a new short-circuit evaluation segment and added to the refined short-circuit evaluation segment set. The rear segment that is irrelevant is released back to the long chain of decision predicates as an independent decision predicate unit group.

[0108] The sequence of decision predicate units contained in the candidate short-circuit segment is split into two parts based on their intersection with the short-circuit trajectory. Decision predicate units that intersect with the short-circuit trajectory constitute the first intersecting part. Decision predicate units that do not intersect with the short-circuit trajectory constitute the second unrelated part. The first intersecting part is added as a new short-circuit evaluation segment to the refined short-circuit evaluation segment set. The decision predicate units of the second unrelated part are released back into the long chain of decision predicates, restoring them to ordinary independent decision predicate units.

[0109] Step S540: Set an update segment short-circuit trigger truth value for the new short-circuit evaluation segment that is consistent with the final truth value trend of the short-circuit trend trajectory. In the subsequent real-time evaluation process of the risk control decision flow, when the truth value sequence of the judgment predicate unit conforms to the judgment predicate unit composition structure of the short-circuit trend trajectory, the short-circuit jump operation of the new short-circuit evaluation segment is triggered.

[0110] Analyze the final truth value trend of the short-circuit trend trajectory, i.e., whether the final truth value result of the trajectory is true or false. Set this final truth value trend as the short-circuit trigger truth value of the new short-circuit evaluation segment. In the subsequent real-time evaluation process of the risk control decision flow, when the truth value sequence of the decision predicate unit re-presents the same decision predicate unit composition structure and truth value pattern as the short-circuit trend trajectory, the short-circuit jump operation of this new short-circuit evaluation segment is triggered.

[0111] Step S610: Identify conjunctive sub-chains composed of multiple consecutive decision predicate units linked by conjunctive connectives in the long chain of decision predicates, extract the probability that the historical truth value of each decision predicate unit in the conjunctive sub-chain is determined to be false as the false value probability, and mark the decision predicate unit with the highest false value probability in the conjunctive sub-chain as the priority evaluation predicate of the conjunctive sub-chain.

[0112] In the long chain of decision predicates, scan conjunctive subchains consisting of consecutive decision predicate units linked by AND connectors. All decision predicate units within a conjunctive subchain are connected by AND; if even one decision predicate unit is false, the entire conjunctive subchain is false. For each decision predicate unit in the conjunctive subchain, calculate the ratio of the number of times it was judged as false in the historical evaluation records to the total number of evaluations; this is the false probability. A higher false probability indicates that the decision predicate unit is more likely to be judged as false in the historical evaluations. Select the decision predicate unit with the highest false probability within the conjunctive subchain as the priority evaluation predicate.

[0113] Step S620: Rearrange the remaining decision predicate units in the conjunctive sub-chain segment, except for the priority evaluation predicate, in descending order of false value probability after the priority evaluation predicate to form the rearranged decision predicate sequence of the conjunctive sub-chain segment. Replace the original order of the conjunctive sub-chain segment in the decision predicate long chain with the rearranged decision predicate sequence.

[0114] The decision predicate units within the conjunctive subchain are reordered. The priority evaluation predicate is placed first. The remaining decision predicate units are arranged in descending order of false value probability, following the priority evaluation predicate. The resulting sequence is the rearranged decision predicate sequence. The original order of the conjunctive subchain within the long decision predicate chain is replaced with the order of the rearranged decision predicate sequence.

[0115] Step S630: Based on the truth value determination result of the priority evaluation predicate in the rearranged decision predicate sequence, construct a direct short-circuit jump path for the conjunctive sub-chain segment corresponding to the false truth value of the priority evaluation predicate. When the truth value of the priority evaluation predicate is false, the direct short-circuit jump path moves the evaluation position pointer directly to the first decision predicate unit after the end of the conjunctive sub-chain segment, and takes the false value as the short-circuit evaluation result of the entire conjunctive sub-chain segment.

[0116] Construct a short-circuit jump path for the conjunctive subchain. The short-circuit jump path is triggered when the truth value of the priority evaluation predicate is false. After triggering, the execution action is to move the evaluation position pointer to the position of the first decision predicate unit after the end of the conjunctive subchain, and write the false value to the corresponding record position of all decision predicate units in the evaluated truth value record table.

[0117] Step S640: When the truth value of the priority evaluation predicate is true, evaluate the subsequent decision predicate units sequentially along the rearranged decision predicate sequence. When the truth value of any subsequent decision predicate unit is false, trigger the branch short-circuit jump path corresponding to the subsequent decision predicate unit, take the false value as the short-circuit evaluation result of the entire conjunctive sub-chain segment, and skip the evaluation operation of the remaining decision predicate units in the conjunctive sub-chain segment.

[0118] If the truth value of the predicate evaluated first is true, the result of the conjunctive subchain is not yet determined, and subsequent decision predicate units need to be evaluated. Subsequent decision predicate units are evaluated one by one in the order of the rearranged decision predicate sequence. If the truth value of a certain subsequent decision predicate unit is false, a branch short-circuit jump path is triggered, and the false value is used as the short-circuit evaluation result of the entire conjunctive subchain, skipping the evaluation operation of the remaining decision predicate units in that conjunctive subchain.

[0119] Step S650: When the rearranged decision predicate sequence is evaluated sequentially to the last subsequent decision predicate unit and the truth value of the last subsequent decision predicate unit is still true, the truth value is taken as the short-circuit evaluation result of the entire conjunction sub-chain segment, and the short-circuit evaluation process of the conjunction sub-chain segment is completed.

[0120] If the truth values ​​of all subsequent decision predicate units in the rearranged decision predicate sequence are true, then the overall truth value of the conjunctive sub-chain is true. The truth value is then written to the corresponding record position of all decision predicate units within that conjunctive sub-chain in the evaluated truth value record table.

[0121] Step S660: Record the correspondence between the truth value judgment result of the priority evaluation predicate and the overall short-circuit evaluation result of the conjunct sub-chain segment during each short-circuit evaluation process, update the false value probability of each decision predicate unit, and dynamically adjust the selection of priority evaluation predicates and the order of the decision predicate sequence based on the updated false value probability during the subsequent real-time evaluation process of the risk control decision flow.

[0122] The truth value determination results of the priority evaluation predicates and the overall short-circuit evaluation results of the conjunctive subchain segments are written as feedback records to the historical database during each evaluation process. The false value probability of each decision predicate unit is recalculated periodically based on the newly added historical evaluation data. The priority evaluation predicates are re-determined and the order of the decision predicate sequences is rearranged according to the updated false value probabilities, achieving dynamic optimization.

[0123] Step S710: Obtain the timestamp sequence of truth value flips of each decision predicate unit in the long chain of decision predicates during the evaluation process of historical risk control decision flow. Calculate the stable duration of truth value for each decision predicate unit based on the time interval between adjacent flip timestamps in the timestamp sequence of truth value flips. Mark decision predicate units whose stable duration of truth value exceeds a preset stable duration threshold as steady-state decision predicate units.

[0124] Extract the truth-flip timestamp sequence for each decision predicate unit from the historical evaluation records. A truth-flip refers to the change of the truth value of a decision predicate unit from true to false or from false to true. The time interval between adjacent flip timestamps represents the duration for which the decision predicate unit maintains a certain truth value between two flips. Calculate the average of all durations, and mark decision predicate units whose average exceeds a preset stable duration threshold as steady-state decision predicate units. The truth value of a steady-state decision predicate unit remains stable over a relatively long period.

[0125] Step S720: In the long chain of decision predicates, detect steady-state decision predicate sub-chains composed of continuous steady-state decision predicate units, extract truth value combination snapshots of the non-steady-state decision predicate units that are adjacent to both ends of the steady-state decision predicate sub-chain at different historical evaluation times, count the occurrence frequency of each truth value combination snapshot, and determine the truth value combination snapshots whose occurrence frequency exceeds the preset mode frequency threshold as the triggering truth value combination mode of the steady-state decision predicate sub-chain.

[0126] In the long chain of decision predicates, sub-chains composed of continuous steady-state decision predicate units are detected. The decision predicate units immediately adjacent to the two ends of a steady-state decision predicate sub-chain are non-steady-state decision predicate units. A snapshot of the truth value combination of these two non-steady-state decision predicate units is extracted in each historical evaluation. There are four possibilities for the truth value combination snapshot: true-true, true-false, false-true, and false-false. The frequency of each truth value combination snapshot is counted. The truth value combination snapshot whose frequency exceeds a preset pattern frequency threshold is determined as the triggering truth value combination pattern for that steady-state decision predicate sub-chain.

[0127] Step S730: Establish a mapping table between the trigger truth value combination mode of the steady-state decision predicate sub-chain segment and the overall truth value result of the steady-state decision predicate sub-chain segment. Each trigger truth value combination mode in the mapping table corresponds to a preset combination truth value result.

[0128] For each trigger truth value combination pattern, calculate the overall truth value result corresponding to the truth value combination of all steady-state decision predicate units within the steady-state decision predicate sub-chain segment under that pattern. The overall truth value result is the truth value with the highest occurrence frequency. Write the correspondence between trigger truth value combination patterns and overall truth value results into a mapping table.

[0129] Step S740: During the real-time evaluation process of the risk control decision flow, when the truth value combination of the evaluated judgment predicate unit matches the trigger truth value combination pattern of a certain steady-state judgment predicate sub-chain, skip the evaluation operation of each steady-state judgment predicate unit in the steady-state judgment predicate sub-chain, read the preset combination truth value result corresponding to the trigger truth value combination pattern from the mapping relationship table, and use the preset combination truth value result as the short-circuit evaluation result of the steady-state judgment predicate sub-chain as a whole.

[0130] In the short-circuit jump detection in step S163, it is checked whether the truth value combination of the non-steady-state decision predicate units at both ends of the steady-state decision predicate sub-chain in the evaluated truth value record table matches a certain triggering truth value combination pattern. If they match, a short-circuit jump is triggered, skipping the evaluation of all steady-state decision predicate units in the steady-state decision predicate sub-chain, and reading the corresponding preset combination truth value result from the mapping table and writing it into the evaluated truth value record table.

[0131] Step S750: When the truth value combination of the evaluated decision predicate unit does not match the trigger truth value combination mode of any steady-state decision predicate sub-chain segment, perform evaluation operation on the steady-state decision predicate unit in the steady-state decision predicate sub-chain segment according to the original order of the decision predicate long chain, and write the true truth value result obtained by the evaluation operation into the mapping relationship table.

[0132] If the truth value combination does not match any triggering truth value combination pattern, then the steady-state decision predicate units within the steady-state decision predicate sub-chain are evaluated one by one according to the normal process. The evaluated true value result is associated with the corresponding triggering truth value combination pattern and written into the mapping table as a new supplementary record.

[0133] Step S760: Accumulate the occurrence frequency of the trigger truth value combination mode corresponding to the real truth value result supplemented in the mapping relationship table. When the occurrence frequency exceeds the preset mode frequency threshold, upgrade the trigger truth value combination mode to a formal trigger truth value combination mode, and enable short-circuit jump detection of the trigger truth value combination mode in the subsequent real-time evaluation process of risk control decision flow.

[0134] The frequency of occurrence of the supplementary truth value combination patterns is accumulated. When the accumulated frequency exceeds a preset pattern frequency threshold, the trigger truth value combination pattern is promoted to a formal pattern. In subsequent evaluation processes, this formal pattern participates in short-circuit jump detection.

[0135] Step S810: Detect mutually exclusive decision predicate unit pairs in the decision predicate long chain. The mutual exclusion relationship means that the two decision predicate units have never obtained true values ​​at the same time in the historical risk control decision flow evaluation process. Record the detected mutually exclusive decision predicate unit pairs in the mutually exclusive predicate pair set.

[0136] Extract the sequence of truth value combinations for each pair of decision predicate units from the historical evaluation records. If a pair of decision predicate units has never simultaneously obtained a truth value in all historical evaluation records, that is, if the truth value combination never contains a true-true combination, then the pair of decision predicate units is determined to be mutually exclusive. Record all mutually exclusive decision predicate unit pairs in the set of mutually exclusive predicate pairs.

[0137] Step S820: Merge different mutually exclusive predicate pairs that share the same decision predicate unit in the set of mutually exclusive predicate pairs into mutually exclusive predicate groups. When the truth value of any decision predicate unit in each mutually exclusive predicate group is true, the truth values ​​of all other decision predicate units in the mutually exclusive predicate group must be false. Generate a mutually exclusive constraint description structure for each mutually exclusive predicate group that describes all decision predicate units and their mutual exclusion constraint relationships.

[0138] Scan the set of mutually exclusive predicate pairs. If two mutually exclusive predicate pairs share the same decision predicate unit, merge them into the same mutually exclusive predicate group. Any two decision predicate units within a mutually exclusive predicate group are mutually exclusive. Generate a mutual exclusion constraint description structure for each mutually exclusive predicate group. This structure contains a list of in-chain position indices of all decision predicate units within the group and a mutual exclusion relationship type marker.

[0139] Step S830: Configure a mutual exclusion short-circuit jump rule for each mutual exclusion predicate group in the decision predicate long chain. The mutual exclusion short-circuit jump rule includes a mutual exclusion short-circuit trigger condition and a mutual exclusion short-circuit execution action. The mutual exclusion short-circuit trigger condition is that the truth value of any decision predicate unit in the mutual exclusion predicate group is determined to be true. The mutual exclusion short-circuit execution action is to directly set the truth values ​​of all other decision predicate units in the mutual exclusion predicate group that have not yet been evaluated to false and skip the evaluation operation of all other decision predicate units that have not yet been evaluated.

[0140] Configure a mutual exclusion short-circuit jump rule for each mutual exclusion predicate group. The mutual exclusion short-circuit trigger condition is that any decision predicate unit in the mutual exclusion predicate group is determined to be true in step S162. The mutual exclusion short-circuit execution action is to set all the true values ​​of the remaining decision predicate units in the mutual exclusion predicate group that have not yet been evaluated to false, and to skip these decision predicate units sequentially by the current evaluation position pointer of the decision predicate long chain.

[0141] Step S840: During the real-time evaluation of the risk control decision flow, whenever the evaluation operation of a decision predicate unit is completed and its truth value is true, traverse the mutual exclusion constraint description structure of all mutual exclusion predicate groups, find the mutual exclusion predicate group containing the decision predicate unit, and trigger the mutual exclusion short-circuit jump rule for the found mutual exclusion predicate group.

[0142] After evaluating a decision predicate unit in step S162, if the truth value is true, a mutual exclusion short-circuit detection is triggered. The mutual exclusion constraint description structures of all mutual exclusion predicate groups are traversed, and it is checked whether the current decision predicate unit belongs to a certain mutual exclusion predicate group. If it does, the mutual exclusion short-circuit jump rule configured in step S830 is triggered for that mutual exclusion predicate group.

[0143] Step S850: When executing the mutual exclusion short-circuit jump rule, write false values ​​to all remaining decision predicate units in the mutual exclusion predicate group that have not yet been evaluated in the evaluated truth value record table, and move the current evaluation position pointer of the decision predicate long chain to skip all remaining decision predicate units in the mutual exclusion predicate group that have not yet been evaluated in turn, and move it to the position of the first decision predicate unit after the end decision predicate unit of the mutual exclusion predicate group.

[0144] In the evaluated truth record table, using the indices of the remaining unevaluated decision predicate units within the mutex predicate group as keys, write the truth value as false. Move the current evaluation position pointer to the position of the first decision predicate unit after the decision predicate unit with the largest indices in the mutex predicate group.

[0145] Step S860: For isolated mutual exclusion predicate pairs in the set of mutual exclusion predicate pairs that have not participated in any mutual exclusion predicate combination, configure a binary mutual exclusion short-circuit jump rule separately. When the truth value of any decision predicate unit in the isolated mutual exclusion predicate pair is true, directly set the truth value of the other decision predicate unit in the isolated mutual exclusion predicate pair to false and skip the evaluation operation of the other decision predicate unit.

[0146] For isolated mutex predicate pairs that are not merged with other mutex predicate pairs, configure a separate binary mutex short-circuit jump rule. The trigger condition is that the truth value of any decision predicate unit in the isolated mutex predicate pair is true. The action is to directly set the truth value of the other decision predicate unit in the isolated mutex predicate pair to false and skip its evaluation operation.

[0147] Step S910: Detect recurring decision predicate unit subsequences in the decision predicate long chain, and extract decision predicate unit subsequences that appear more than a preset recurrence threshold as recurring predicate templates. The recurring predicate templates have the same decision predicate unit composition and the same decision predicate unit arrangement order in different decision node entries.

[0148] Subsequence mining is performed on long chains of decision predicates. A frequent subsequence mining algorithm is used, with the minimum support set to equal a preset repetition threshold. Subsequences of decision predicate units that recur within different decision node entries are mined. The mined subsequences are extracted into repeating predicate templates. The repeating predicate template contains two attributes: a list of decision predicate units and the order of the decision predicate units.

[0149] Step S920: Replace the decision predicate unit subsequences belonging to the same repeated predicate template in the decision predicate long chain with the template reference mark of the repeated predicate template, and store the decision predicate unit composition definition of the repeated predicate template and the independent short-circuit evaluation fragment partitioning results inside the repeated predicate template in the risk control decision flow structure description text.

[0150] For decision predicate unit subsequences belonging to the same repeated predicate template within a long decision predicate chain, each subsequence is replaced with a template reference marker. The template reference marker is a special identifier containing the template identifier of the repeated predicate template. The short-circuit evaluation segmentation processing of steps S140 to S150 is performed independently on the decision predicate unit subsequences within the repeated predicate template, and the segmentation results are bound and stored with the repeated predicate template.

[0151] Step S930: When the evaluation position pointer points to a template reference mark during the real-time evaluation of the risk control decision flow, read the short-circuit evaluation fragment partitioning result of the repeated predicate template corresponding to the template reference mark, and perform independent short-circuit jump detection within the decision predicate unit subsequence represented by the template reference mark according to the short-circuit evaluation fragment partitioning result.

[0152] In step S162, if the current predicate unit to be evaluated is a template reference marker, the short-circuit evaluation fragment partitioning result of the repeating predicate template corresponding to the template reference marker is read. Short-circuit jump detection in steps S163 to S166 is performed within the subsequence of the predicate unit within the template reference marker, and the detection range is limited to within the template.

[0153] Step S940: The short-circuit evaluation result obtained from the short-circuit jump detection inside the template reference mark is used as the truth value output of the entire subsequence of the decision predicate unit corresponding to the template reference mark. The truth value output is written into the evaluated truth value record table and associated with the corresponding record position of all decision predicate units covered by the template reference mark.

[0154] After the template reference flag's internal short-circuit jump detection is completed, the resulting overall truth value output is written to the evaluated truth value record table. For each decision predicate unit covered by the template reference flag, a record is created in the evaluated truth value record table, with the key being the template's internal position index and the value being the overall truth value output.

[0155] Step S950: After the short-circuit jump detection inside the template reference mark is completed and the true value is output, the evaluation position pointer skips all decision predicate units covered by the template reference mark and moves to the first decision predicate unit after the template reference mark or the template reference mark position to continue evaluating along the long chain of decision predicates.

[0156] Move the evaluation position pointer directly from the first decision predicate unit position of the template reference mark to the first decision predicate unit position after the template reference mark.

[0157] Step S960: Outside of the real-time evaluation process of the risk control decision flow, version management is performed on the composition definition of the decision predicate unit of the repeated predicate template. When the decision predicate unit of any decision node entry in the risk control decision flow structure description text changes and the change involves the defined repeated predicate template, the decision predicate unit composition definition is updated again for the affected repeated predicate template and the short-circuit evaluation segment is re-divided.

[0158] When the risk control strategy configuration platform updates the decision predicate unit of a decision node entry in the risk control decision flow structure description text, it checks whether the change involves a defined repeated predicate template. If so, it updates the version of the decision predicate unit composition definition of the affected repeated predicate template and updates the version number. The short-circuit evaluation segmentation processing of steps S140 to S150 is then re-executed on the updated repeated predicate template. The new version of the repeated predicate template is used in the next real-time evaluation of the risk control decision flow.

[0159] Step S1010: Detect the head-to-tail connection relationship between different short-circuit evaluation fragments in the set of short-circuit evaluation fragments. If the end decision predicate unit of the first short-circuit evaluation fragment and the first decision predicate unit of the second short-circuit evaluation fragment are adjacent in the decision predicate long chain, then mark the first short-circuit evaluation fragment and the second short-circuit evaluation fragment as an adjacent short-circuit fragment pair.

[0160] Iterate through all pairs of short-circuit evaluation fragments in the set of short-circuit evaluation fragments. For each pair of short-circuit evaluation fragments, compare the in-chain position index of the last decision predicate unit of the first short-circuit evaluation fragment with the in-chain position index of the first decision predicate unit of the second short-circuit evaluation fragment. If the difference between the two in-chain position indices is equal to 1, it means that the two short-circuit evaluation fragments are adjacent at the beginning and end in the long chain of decision predicates, and mark them as a pair of adjacent short-circuit fragments.

[0161] Step S1020: Extract the fragment short-circuit trigger truth value of the first refined short-circuit evaluation fragment and the fragment short-circuit trigger truth value of the second refined short-circuit evaluation fragment from the adjacent short-circuit fragment pair. Determine whether the fragment short-circuit trigger truth value of the first refined short-circuit evaluation fragment and the fragment short-circuit trigger truth value of the second refined short-circuit evaluation fragment are consistent. If they are consistent, merge the adjacent short-circuit fragment pair into a series fused short-circuit fragment.

[0162] If two adjacent short-circuit evaluation fragments have the same short-circuit trigger truth value, they can be merged. The first and second refined short-circuit evaluation fragments are merged into a single cascaded fused short-circuit fragment. The cascaded fused short-circuit fragment covers both original fragments and the decision predicate unit between them.

[0163] Step S1030: Set the short-circuit trigger truth value for the series-fused short-circuit segment. The short-circuit trigger truth value of the fused segment is consistent with the original short-circuit trigger truth value of the adjacent short-circuit segment pair. Add the series-fused short-circuit segment as an indivisible whole short-circuit evaluation unit to the set of refined short-circuit evaluation segments. At the same time, remove the first refined short-circuit evaluation segment and the second refined short-circuit evaluation segment before merging from the set of refined short-circuit evaluation segments.

[0164] Set the short-circuit trigger truth value of the merged fragment to the short-circuit trigger truth value of the original fragment in the adjacent short-circuit fragment pair. Add the cascaded merged short-circuit fragment to the set of refined short-circuit evaluation fragments, and remove the two original refined short-circuit evaluation fragments before merging.

[0165] Step S1040: During the real-time evaluation of the risk control decision flow, when the truth value of the evaluated judgment predicate unit triggers the short circuit trigger truth value of the fusion segment of the series fusion short circuit segment, the short circuit jump operation corresponding to the series fusion short circuit segment is executed, and the evaluation position pointer is moved directly from the position of the first judgment predicate unit of the series fusion short circuit segment to the position of the first judgment predicate unit after the end of the series fusion short circuit segment.

[0166] The short-circuit jump operation of the cascaded fused short-circuit segment is the same as that of the normal short-circuit evaluation segment. The trigger condition is that the truth value of the first decision predicate unit of the cascaded fused short-circuit segment is consistent with the short-circuit trigger truth value of the fused segment. The action is to skip all decision predicate units within the cascaded fused short-circuit segment.

[0167] Step S1050: Take the short-circuit trigger truth value of the fused segment of the series-fused short-circuit segment as the short-circuit evaluation result of the entire series-fused short-circuit segment, and write it into the corresponding record position of all decision predicate units covered by the series-fused short-circuit segment in the evaluated truth value record table.

[0168] The truth value of the short-circuit trigger of the fused segment is used as the short-circuit evaluation result of the entire fused short-circuit segment, and written into the position of all decision predicate units covered by the fused short-circuit segment in the evaluated truth value record table.

[0169] Step S1060: Perform trigger probability merging statistics on the series-fused short-circuit segments, and sum the segment hit counts of the first refined short-circuit evaluation segment and the second refined short-circuit evaluation segment before merging as the fused segment hit count of the series-fused short-circuit segment. Calculate the fused segment hit ratio of the series-fused short-circuit segment based on the ratio of the fused segment hit count to the total number of risk control service request messages.

[0170] Before merging, each short-circuit evaluation segment maintains its own segment hit count counter. The segment hit counts of the two original segments are added together to obtain the merged segment hit count of the cascaded short-circuit segment. The merged segment hit ratio = merged segment hit count × (1 / total number of risk control service request messages).

[0171] Step S1070: During the maintenance of the subsequent set of refined short-circuit evaluation segments, if the hit ratio of the fused short-circuit segments is lower than the preset hit ratio threshold, the fused short-circuit segments are split into the first refined short-circuit evaluation segment and the second refined short-circuit evaluation segment before merging, and their independent short-circuit trigger truth values ​​and independent short-circuit jump detection logic are restored.

[0172] Periodically evaluate the hit rate of the merged short-circuit segments. If the hit rate is lower than the preset hit rate threshold, it indicates that the trigger rate of the merged short-circuit evaluation segment is too low, and the merging effect is poor. Split the fused short-circuit segment into two original refined short-circuit evaluation segments before merging, and restore their independent short-circuit trigger truth values ​​and short-circuit jump detection logic.

[0173] In actual deployment and operation, the front-end console interface provided in this application offers risk control strategy configuration personnel a complete method execution entry point and a visual interactive environment. Combined with... Figure 2 The console interface layout shown features a left navigation bar with menu entries related to risk control decision flow management, short-circuit rule configuration, predicate dependency analysis, and evaluation monitoring. Policy configuration personnel can access different configuration and monitoring views by selecting the corresponding menu items. At the top of the main content area on the right side of the interface, there is an operation bar for configuring basic information about the corresponding decision flow. Policy configuration personnel can enter the name of the currently processed decision flow through the input boxes in the operation bar and complete the corresponding step S110, obtaining the risk control decision flow structure description text and subsequent version control operations for the adjusted decision flow, using operation buttons such as Create, Import, Save, and Publish.

[0174] The visualization canvas area on the left side of the main content area of ​​the interface corresponds to the operation of constructing the decision flow connectivity graph and extracting the decision node sequence in step S120 of this application. The canvas includes buttons for adding decision nodes and adding flow edges. Strategy configuration personnel can construct multiple sets of directed flow edges with decision node entries as vertices by dragging and connecting them. The canvas also includes selection tools and a delete button for modifying and deleting constructed decision nodes and their directed flow edges. In the completed decision flow connectivity graph, the canvas visually distinguishes and marks the start and end nodes of the decision process to clearly identify the start and end points of the decision node sequence. The canvas also includes a zoom slider and a "Fit to Canvas" button to ensure that strategy configuration personnel can fully view the global connectivity when there are many decision nodes. Additionally, the canvas provides a highlighting function, which can bold and highlight a specific decision path, making it easier for strategy configuration personnel to intuitively confirm the extraction results of the main decision node sequence.

[0175] In the attribute configuration panel on the right side of the main content area of ​​the interface, there are two tabs: Node Attribute Configuration and Short-Circuit Rule Configuration. Under the Node Attribute Configuration tab, when a strategy configurer selects a decision node on the left canvas, the right panel loads the corresponding node name input box, decision premise editing area (supporting the addition of predicate units), logical connective selection dropdown, node decision conclusion input box, conclusion reference target node selection dropdown, and business scenario label selection dropdown. These configuration items correspond one-to-one with the content of the parsed decision flow structure description text in step S110. Strategy configurers can use this interface to edit the node decision premise, logical connective, and configure the reference path between the decision conclusion and subsequent target nodes. Under the Short-Circuit Rule Configuration tab, there are parameter configuration and automated operation entry points corresponding to steps S130, S140, and S150. The remote dependency pair list displays the calculated dependency depth value for each pair of predicate units in tabular form. Strategy configurers can manually confirm or modify the remote dependency tags through the checkboxes in the table. The independent decision predicate unit list is arranged horizontally in label form, intuitively displaying the marked independent predicate units. The automatic redundant fragment detection button and the one-click simplified fragment generation button configured in the configuration panel correspond to the operations of removing redundant fragments and generating a set of simplified short-circuit evaluation fragments in step S150, respectively. Furthermore, the short-circuit evaluation fragment list displays the generated fragment number, the number of predicates contained, the trigger truth value label, and the start / stop status in tabular form, facilitating policy configuration personnel in managing the effective status of each short-circuit fragment. The fragment details expansion area displays the predicate unit list, trigger truth value selection, and logic truncation position within the selected fragment, corresponding to the operation of setting the short-circuit trigger truth value for each short-circuit evaluation fragment in step S140.

[0176] At the bottom of the interface, the status bar area displays global metrics related to the current decision flow status. Strategy configuration personnel can view in real time the total number of decision nodes, the total number of decision predicate units, the number of initially partitioned short-circuit evaluation fragments, and the number of simplified fragments. These metrics directly reflect the fragment partitioning and simplification results of steps S140 and S150. The status bar also includes a dependency depth threshold slider. Strategy configuration personnel can drag the slider to adjust the threshold value in real time and click the "Apply Threshold" and "Recalculate Dependency Depth" buttons to trigger the recalculation of logical dependency depth parameters and the remarking of remote dependency pairs in step S130, achieving dynamic threshold tuning. The status bar also displays the current decision flow version number and last save time for collaborative management.

[0177] When strategy configuration personnel switch to the evaluation monitoring panel page via the left navigation bar, the chart area configured on this page corresponds to the real-time evaluation and subsequent monitoring steps in step S160. In the short-circuit segment hit count bar chart, the system visually displays the number of times each streamlined short-circuit evaluation segment is triggered for short-circuit jumps in actual risk control requests and the hit rate, facilitating strategy configuration personnel's evaluation of the actual optimization effect of each segment. In the evaluation time comparison line chart, the system intuitively demonstrates the overall execution efficiency improvement brought about by short-circuit evaluation optimization by comparing the average evaluation time curves before and after optimization. In the short-circuit jump trigger frequency pie chart, the system statistically distributes jump events according to the trigger truth value being true or false. In the rejection trigger event statistics table, the system records events where short-circuit jumps are rejected due to unmet supplementary constraints of the trigger condition. The table includes fields such as the number of rejections, the reason for rejection, and the most recent rejection time. This information corresponds to the operations in steps S340 and S350 where the rejection trigger log is recorded and the number of rejections is accumulated. The log list at the bottom displays detailed historical trigger logs, including timestamps, business session identifiers, trigger fragment numbers, trigger truth values, number of skipped predicates, and snapshots of request parameter field values.

[0178] When strategy configuration personnel switch to the strategy version management page via the left navigation bar, the version comparison view provided on the interface corresponds to the operations of extracting the decision node sequence and concatenating the decision predicate long chain in step S120. Strategy configuration personnel can compare the differences in the decision predicate long chain between two versions. The interface highlights added predicates, deleted predicates, and modified predicates with different visual markers and simultaneously displays the short-circuit segments of added, deleted, and modified predicates. This facilitates strategy configuration personnel in quickly locating the scope of logical changes during version iteration and ensures that the reprocessing of steps S120 to S150 can be correctly triggered after the new version strategy is imported.

[0179] When the strategy configuration personnel switch to the system settings page via the left navigation bar, the parameter input boxes in the interface configuration are consistent with the global parameters such as the logical dependency depth threshold, tendency matching threshold, and steady-state duration threshold in steps S130, S140, S150, and the extended embodiment. The strategy configuration personnel can adjust and save parameters such as the default value of the dependency depth threshold, the remote dependency pair judgment weight coefficient, the redundant fragment detection switch, the rejection trigger cumulative threshold, and the mutual exclusion predicate pair detection switch here.

[0180] Through the configuration and monitoring of the aforementioned front-end console interface, policy configuration personnel can intuitively complete the input and modification of the decision flow structure text in step S110 on the visualization canvas, confirm the extraction results of the decision node sequence in step S120 by highlighting the graph connectivity path, monitor the entire processing process of remote dependency pair identification, candidate short-circuit segment division, and redundant segment removal in steps S130 to S150 in the short-circuit rule configuration panel, and verify the short-circuit evaluation optimization effect in step S160 in real time in the monitoring panel, thereby transforming the method steps of this application into intuitive, controllable, and traceable operation and maintenance management operations.

[0181] For example, in actual deployment and operation, the conditional branch short-circuit evaluation optimization method proposed in this application provides a visual configuration, analysis, and verification environment through a front-end console interface. Combined with... Figure 2 The decision flow console interface shown includes configuration menus on the left, such as "Decision Flow Management," "Short-Circuit Rule Configuration," "Predicate Dependency Analysis," "Evaluation Monitoring Panel," "Execution Log Query," and "System Settings." The top operation bar displays the current decision flow name as "Risk Control and Credit Granting Decision Flow - Credit Assessment" and includes function buttons such as "Create," "Import," "Save," and "Publish."

[0182] exist Figure 2 The "Decision Flow Connection Graph Visualization Canvas" area, slightly to the left of center, displays the risk control decision flow connection graph constructed and extracted in step S120. This canvas connects multiple decision nodes with directed arrows, specifically including nodes such as "Credit Score Determination," "Debt Ratio Check," "Income Verification," "Fraud Detection," and "Comprehensive Review," with each node labeled with its corresponding decision conclusion reference path (e.g., "—Credit Limit Calculation," "—Income Verification," "—Fraud Detection Node," "—Comprehensive Review," "—Termination Node"). The "Credit Score Determination" node corresponds to the decision premise "income>30K∧age≥25," representing the concatenation process of the decision predicate unit; the "Comprehensive Review" node is marked as the termination node. The selected "Credit Score Determination" node is highlighted in the canvas, corresponding to the operation in step S120 of extracting the decision node sequence from the starting decision node to the termination decision node.

[0183] exist Figure 2The attribute configuration panel on the right displays the specific configuration items and short-circuit rule configuration information corresponding to the currently selected node "Credit Score Determination", corresponding to the refined processing in steps S130 to S150. Under the "Attribute Configuration" tab, the panel includes a node name input box, the node determination prerequisite is displayed as "income>30K∧age≥25", as well as a logical connector drop-down box, determination conclusion ("Enter Credit Limit Calculation"), business scenario label ("Credit Assessment"), and other configuration content, corresponding to the operation of parsing the risk control decision flow structure description text in step S110. Under the "Short-Circuit Rules" tab, the panel displays a list of "Short-Circuit Evaluation Fragments", which includes fragment #A1 (4 predicates, triggering truth value FALSE, status enabled), fragment #B3 (2 predicates, triggering truth value TRUE, status enabled), fragment #C2 (5 predicates, triggering truth value FALSE, status disabled), and fragment #D1 (3 predicates, triggering truth value TRUE, status enabled). Below the list, statistical results for "Independent Predicates: 3" and "Remote Dependency Pairs: 2" are displayed, along with operation buttons such as "Add Fragment," "Detect Redundancy," and "One-Click Simplification." These interface elements intuitively demonstrate the marking results of remote dependency pairs and independent decision predicate units in step S130, as well as the division and simplification logic of short-circuit evaluation fragments in steps S140 and S150.

[0184] At the bottom of the interface, the status bar displays the statistical results generated by the set of short-circuit evaluation fragments in step S150. The status bar is divided into areas to display the real-time data indicators of "total number of nodes (12)", "predicate units (47)", "short-circuit fragments (6)" and "after simplification (4)", reflecting the actual optimization effect of the current decision flow after analysis. The central information area displays the current decision flow version number "V2.4.1" and the last save time "14:32:18", which is convenient for version management. The right information area displays the numerical slider of "dependency depth threshold 0.62" and operation entries such as "application threshold" and "recalculate dependency depth", which correspond to the dynamic adjustment of the dependency depth threshold and the recalculation of remote dependency pairs in step S130.

[0185] Through the connectedness canvas, predicate attribute configuration panel, short-circuit segment list, and status bar quantification metrics presented on the console interface, operators can... Figure 2 The decision flow structure shown in the document forms a clear mapping with the parsing, calculation, partitioning, simplification and real-time evaluation logic in steps S110 to S160 of the specification, which facilitates the deployment, configuration, monitoring and optimization of the method in this application in actual risk control business scenarios.

[0186] Furthermore, an embodiment of this application provides a conditional branch short-circuit evaluation optimization system for decision flow, comprising a processor and a memory. The processor and memory are connected, for example, via a bus. Optionally, the conditional branch short-circuit evaluation optimization system for decision flow may further include a transceiver, which can be used for data interaction between this system and other systems applied to decision flow, such as sending and / or receiving data. It should be noted that in actual scheduling, the transceiver is not limited to one, and the structure of this conditional branch short-circuit evaluation optimization system for decision flow does not constitute a limitation on the embodiments of this application.

[0187] The memory stores program code for executing the embodiments of this application, and its execution is controlled by a processor. The processor executes the program code stored in the memory to implement the steps shown in the foregoing method embodiments.

[0188] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application, without departing from the technical concept of this application, also fall within the protection scope of the embodiments of this application.

Claims

1. A conditional branch short-circuit evaluation optimization method applied to decision flow, characterized in that, The method includes: Obtain the risk control decision flow structure description text, which contains multiple decision node entries organized in decision order; Based on the conclusion reference path between decision node entries in the risk control decision flow structure description text, a decision flow connection graph with decision node entries as vertices is constructed. In the decision flow connection graph, a decision node sequence from the starting decision node entry to the ending decision node entry is extracted. The decision predicate units of each decision node entry in the extracted decision node sequence are concatenated into a long chain of decision predicates in the order of the decision node sequence. For each pair of decision predicate units in the decision predicate long chain, calculate the logical dependency depth parameter between the first occurrence positions of the pair of decision predicate units in the decision node sequence, mark decision predicate unit pairs whose logical dependency depth parameter exceeds the dependency depth threshold as remote dependency pairs, and mark decision predicate units in the decision predicate long chain that do not belong to any remote dependency pairs and are only referenced by a single decision node entry as independent decision predicate units. Using each decision predicate unit in the long chain of decision predicates as a candidate short-circuit anchor point, determine the logical truncation position where the first truth value after the candidate short-circuit anchor point can determine the truth value result of the remaining chain segment, divide the set of decision predicate units between the candidate short-circuit anchor point and the logical truncation position into short-circuit evaluation segments, and set a segment short-circuit trigger truth value for each short-circuit evaluation segment. From all the short-circuit evaluation segments, redundant short-circuit evaluation segments that intersect with independent decision predicate units and whose short-circuit evaluation segments no longer participate in the evaluation of long chain decision predicates after the truth value of the independent decision predicate units are determined are removed, resulting in a set of concise short-circuit evaluation segments. During the real-time evaluation process of the risk control decision flow, the decision predicate units are evaluated one by one according to the decision node sequence. When the truth value of the evaluated decision predicate unit triggers the short-circuit trigger truth value of any short-circuit evaluation segment in the set of short-circuit evaluation segments, the evaluation operation of all subsequent decision predicate units in that short-circuit evaluation segment is skipped, and the short-circuit trigger truth value of that short-circuit evaluation segment is used as the short-circuit evaluation result of that short-circuit evaluation segment.

2. The conditional branching and short-circuit evaluation optimization method for decision flow according to claim 1, characterized in that, Each decision node entry records the decision premise and the decision conclusion. The decision premise consists of multiple decision predicate units linked together by logical connectives. Based on the conclusion reference paths between decision node entries in the risk control decision flow structure description text, a decision flow connectivity graph with decision node entries as vertices is constructed. A decision node sequence from the starting decision node entry to the ending decision node entry is extracted from this graph. The decision predicate units of each decision node entry in the extracted decision node sequence are concatenated into a long chain of decision predicates according to the order of the decision node sequence, including: The target decision node entry identifier pointed to by the node decision conclusion of each decision node entry in the risk control decision flow structure description text is analyzed. A directed flow edge from the current decision node entry to the target decision node entry identifier is established. After traversing all decision node entries, a set of directed flow edges with decision node entries as vertices is formed. The set of directed flow edges and the set of vertex entries of decision nodes are combined into a decision flow connected graph. In the decision flow connected graph, vertex entries of decision nodes with empty in-degree are identified as starting decision nodes, and vertex entries of decision nodes with empty out-degree are identified as ending decision nodes. Starting from the initial decision node entry, perform a depth-first search along the directed flow edge, record all reachable paths from the initial decision node entry to the final decision node entry, and generate a decision node sequence for each reachable path according to the order of the decision node entries along the path. For each decision node sequence, the total number of decision predicate units covered by the decision node sequence and the number of times the decision predicate units are repeated in different decision node entries are counted. The decision node sequence with the largest ratio of the total number of decision predicate units to the number of repetitions is selected as the main decision node sequence. The node decision premise of each decision node entry in the main decision node sequence is expanded into a conjunction sequence or disjunction sequence of decision predicate units. The expanded decision predicate units are arranged in sequence according to the order of the decision node sequence, and node boundary markers are inserted at the junction of adjacent decision node entries to generate a long chain of decision predicates. In the long chain of decision predicates, each decision predicate unit is appended with a source decision node identifier and a position number within the source decision node, forming a long chain of decision predicates carrying source tracing information.

3. The conditional branching and short-circuit evaluation optimization method for decision flow according to claim 1, characterized in that, For each pair of decision predicate units in the decision predicate long chain, the logical dependency depth parameter between the first occurrence positions of the pair of decision predicate units in the decision node sequence is calculated. Decision predicate unit pairs whose logical dependency depth parameter exceeds the dependency depth threshold are marked as remote dependency pairs. Decision predicate units in the decision predicate long chain that do not belong to any remote dependency pair and are referenced only by a single decision node entry are marked as independent decision predicate units, including: Traverse all pairs of decision predicate units formed by combining them in the long chain of decision predicates, and extract the in-chain position index of the first occurrence of each decision predicate unit in the long chain of decision predicates for each pair of decision predicate units; Calculate the absolute difference between the indices of the first occurrence of two decision predicate units within the chain, and divide the absolute difference by the total number of decision predicate units contained in the long chain of decision predicates to obtain the normalized predicate position difference. At the same time, extract the number of decision node sequence position intervals corresponding to the source decision node identifiers of the two decision predicate units, and divide the number of decision node sequence position intervals by the total number of decision node entries contained in the decision node sequence to obtain the normalized node interval number. The normalized predicate position difference and the normalized node interval number are weighted and summed to obtain the logical dependency depth parameter between the two decision predicate units. All decision predicate pairs are sorted in descending order according to the logical dependency depth parameter. The logical dependency depth parameter value corresponding to the first preset quantile in the descending sort is taken as the dependency depth threshold. Decision predicate pairs whose logical dependency depth parameter exceeds the dependency depth threshold are marked as remote dependency pairs. Construct a set of attribution tags for each decision predicate unit. If a decision predicate unit appears in any remote dependency pair, add a remote attribution tag to the set of attribution tags for that decision predicate unit. After traversing all remote dependency pairs, count the number of times the remote attribution tag appears in the set of attribution tags for each decision predicate unit. Extract the source decision node identifier of each decision predicate unit in the decision predicate long chain, and count the number of times each decision predicate unit is referenced by different decision node entries as the cross-node reference frequency; The decision predicate unit in the attribution mark set that has zero occurrences of the remote attribution mark and a cross-node reference frequency of one is marked as an independent decision predicate unit, and the remaining decision predicate units are kept as non-independent decision predicate units.

4. The conditional branching and short-circuit evaluation optimization method for decision flow according to claim 1, characterized in that, The process involves using each decision predicate unit in the long chain of decision predicates as a candidate short-circuit anchor point, determining the logical truncation position where the first truth value after the candidate short-circuit anchor point determines the truth value result of the remaining chain segment, dividing the set of decision predicate units between the candidate short-circuit anchor point and the logical truncation position into short-circuit evaluation segments, and setting a segment short-circuit trigger truth value for each short-circuit evaluation segment, including: Each decision predicate unit is selected sequentially from the decision predicate long chain as a candidate short-circuit anchor point, and all decision predicate units from the candidate short-circuit anchor point to the end of the decision predicate long chain are extracted to form the remaining decision predicate chain segment. The logical connectives between the decision predicate units in the remaining decision predicate chain segment are analyzed, the distribution of conjunction and disjunction in the remaining decision predicate chain segment is identified, and the logical connective structure string of the remaining decision predicate chain segment is constructed. Based on the logical connection structure string, determine the position of the last decision predicate unit that makes the truth value result of the remaining decision predicate chain segment unique. Take the position of the last decision predicate unit as the logical truncation position. If the logical connection structure string of the remaining decision predicate chain segment is composed of pure conjunction connection and the truth value of the candidate short-circuit anchor is false, then the logical truncation position is the position of the candidate short-circuit anchor itself. If the logical connection structure string of the remaining decision predicate chain segment is composed of pure disjunctive connections and the truth value of the candidate short-circuit anchor is true, then the logical truncation position is the position of the candidate short-circuit anchor itself. If the logical connection structure string contains a mixed structure of conjunction and disjunctive connections, then the shortest logical truncation position is determined layer by layer based on the calculation rules of the logical connection structure string. All decision predicate units between the candidate short-circuit anchor point and the logic truncation position, as well as the decision predicate units corresponding to the candidate short-circuit anchor point itself and the logic truncation position, are included in the same short-circuit evaluation fragment. The truth value of the candidate short-circuit anchor point is configured as the fragment short-circuit trigger truth value for this short-circuit evaluation fragment. This results in a set of candidate short-circuit evaluation fragments that correspond one-to-one with the candidate short-circuit anchor points. Each candidate short-circuit evaluation fragment in the set of candidate short-circuit evaluation fragments has a different fragment short-circuit trigger truth value.

5. The conditional branching and short-circuit evaluation optimization method for decision flow according to claim 1, characterized in that, The process involves removing redundant short-circuit evaluation fragments from all the short-circuit evaluation fragments that intersect with independent decision predicate units and whose truth values ​​are determined after the independent decision predicate units are no longer involved in the evaluation of long chain decision predicates, resulting in a refined set of short-circuit evaluation fragments, including: Traverse each short-circuit evaluation segment, extract the set of decision predicate units contained in the short-circuit evaluation segment, and perform an intersection operation on the set of decision predicate units and the marked independent decision predicate units to obtain the intersection decision predicate unit subset; If the intersection decision predicate unit subset is a non-empty set, then extract the position index of each independent decision predicate unit in the long chain of decision predicates in the intersection decision predicate unit subset, and determine the first independent decision predicate unit with the smallest position index in the intersection decision predicate unit subset; The truth value of the first independent decision predicate unit is simulated and substituted into the logical connection structure string of the decision predicate long chain to which the short-circuit evaluation segment belongs, and it is determined whether the short-circuit evaluation segment still has a diversion effect on the final truth value result of the decision predicate long chain after substitution. If the short-circuit evaluation segment no longer has a diversion effect on the final truth value of the long predicate chain after substitution, then the short-circuit evaluation segment is marked as a redundant short-circuit evaluation segment. If the short-circuit evaluation segment still has a diversion effect on the final truth value of the long predicate chain after substitution, then the short-circuit evaluation segment is marked as a valid short-circuit evaluation segment. Short-circuit evaluation fragments whose intersection determination predicate unit subset is empty are directly marked as valid short-circuit evaluation fragments. All valid short-circuit evaluation fragments are collected to form a refined short-circuit evaluation fragment set. At the same time, short-circuit evaluation fragments with a fragment length of unit length in the refined short-circuit evaluation fragment set are removed.

6. The conditional branching and short-circuit evaluation optimization method for decision flow according to claim 1, characterized in that, In the real-time evaluation process of the risk control decision flow, the decision predicate units are evaluated one by one according to the decision node sequence. When the truth value of an evaluated decision predicate unit triggers the short-circuit trigger truth value of any short-circuit evaluation segment in the set of short-circuit evaluation segments, the evaluation operation of all subsequent decision predicate units within that short-circuit evaluation segment is skipped, and the short-circuit trigger truth value of that short-circuit evaluation segment is used as the short-circuit evaluation result of that short-circuit evaluation segment, including: Receive a risk control service request message, extract the request parameter field carried in the risk control service request message, and establish a binding relationship between the request parameter field and the judgment variable of the first judgment predicate unit in the judgment predicate long chain; The current value to be evaluated is retrieved sequentially according to the order of the evaluation predicate units in the long chain of evaluation predicates. The truth value of the current value to be evaluated is evaluated based on the current value of the request parameter field. The truth value evaluation result is written into the evaluated truth value record table. After each truth value determination result is written into the evaluated truth value record table, each refined short-circuit evaluation segment in the refined short-circuit evaluation segment set is traversed to obtain the segment short-circuit trigger truth value of the refined short-circuit evaluation segment and the set of decision predicate units contained in the refined short-circuit evaluation segment. Check whether the evaluated truth value record table contains the truth value of the first decision predicate unit in the simplified short-circuit evaluation segment and whether the truth value is consistent with the short-circuit trigger truth value of the segment. If they are consistent, trigger the short-circuit jump operation of the simplified short-circuit evaluation segment. When performing a short-circuit jump operation, the pointer of the current evaluation position of the long chain of decision predicates is moved directly to the position of the first decision predicate unit after the end decision predicate unit of the short-circuit evaluation segment. The short-circuit trigger truth value of the segment is filled into the corresponding record position of all decision predicate units in the short-circuit evaluation segment as the short-circuit evaluation result of the entire short-circuit evaluation segment in the evaluated truth value record table. After completing the traversal of the set of short-circuit evaluation segments and the short-circuit jump operation, the evaluation position pointer continues to move along the long chain of decision predicates to the next unevaluated decision predicate unit until all decision predicate units in the long chain of decision predicates have obtained true value records.

7. The conditional branching and short-circuit evaluation optimization method for decision flow according to claim 1, characterized in that, The method further includes: Obtain the field source type of the request parameter field that each decision predicate unit in the decision predicate long chain depends on. The field source type includes the request message body field source, the request message header field source, and the external context field source. Group decision predicate units with the same field source type into the same evaluation source group. Within each evaluation source group, a sub-chain of decision predicates is constructed based on the order in which decision predicate units appear in the long chain of decision predicates. Each sub-chain of decision predicates within a group is independently divided into short-circuit evaluation segments, and only the logical connection relationships within the sub-chain of decision predicates within that evaluation source group are considered during the division. During the real-time evaluation process of the risk control decision flow, independent data prefetching threads are allocated to different evaluation source groups. Each data prefetching thread pre-extracts the current values ​​of the request parameter fields required by all decision predicate units within the evaluation source group from the corresponding field source, and temporarily stores the extracted current values ​​of the request parameter fields in the group's dedicated data prefetching cache. When the current evaluation position pointer of the long chain of decision predicates points to a certain decision predicate unit, the current value of the request parameter field is read from the data prefetch buffer corresponding to the evaluation source group to which the decision predicate unit belongs, and truth value determination is performed. The group short-circuit evaluation fragment trigger detection of the evaluation source group to which the decision predicate unit belongs is limited to the reading range of the data prefetch buffer of the evaluation source group. If the data prefetching thread of a certain evaluation source group encounters a data source unavailable state when performing data prefetching operations, all short-circuit evaluation segments corresponding to that evaluation source group are marked as temporarily disabled. The decision predicate units in that evaluation source group are evaluated sentence by sentence in the order of the long chain of decision predicates during the real-time evaluation process of this risk control decision flow. After the real-time evaluation process of this risk control decision flow is completed, the short-circuit evaluation segment corresponding to the evaluation source group whose data source unavailable state is eliminated will be restored from the temporarily disabled state to the enabled state. The restored short-circuit evaluation segment will re-participate in the short-circuit jump detection in the next real-time evaluation process of the risk control decision flow.

8. The conditional branching and short-circuit evaluation optimization method for decision flow according to claim 1, characterized in that, The method further includes: During the real-time evaluation process of the risk control decision flow, a snapshot of the value of the request parameter field corresponding to each short-circuit evaluation segment is recorded when the short-circuit jump is triggered. Cluster analysis is performed on the snapshots of the value of the request parameter field corresponding to the same short-circuit evaluation segment when the short-circuit jump is triggered multiple times to extract the boundary of the cluster region of the value of the request parameter field of the triggering condition of the short-circuit evaluation segment. Based on the boundary of the request parameter field value clustering region, a supplementary triggering condition constraint is generated for each short-circuit evaluation segment. The supplementary triggering condition constraint limits the segment short-circuit trigger truth value of the short-circuit evaluation segment to take effect only when the request parameter field value falls within the boundary of the request parameter field value clustering region. In the subsequent real-time evaluation process of the risk control decision flow, when the truth value of the evaluated judgment predicate unit triggers the short-circuit trigger of the truth value of a certain short-circuit evaluation segment, it is further checked whether the value of the current request parameter field falls within the boundary of the request parameter field value clustering area corresponding to the short-circuit evaluation segment. The short-circuit jump operation is only performed when the value of the current request parameter field falls within the boundary of the request parameter field value clustering area. If the current request parameter field value does not fall within the boundary of the request parameter field value cluster area, the short-circuit jump operation of the short-circuit evaluation segment is not triggered. The subsequent decision predicate units in the short-circuit evaluation segment are evaluated sequentially along the decision predicate long chain, and the current refusal triggering event is recorded in the refusal triggering log of the short-circuit evaluation segment. When the cumulative number of rejection trigger events recorded in the rejection trigger log of a certain short-circuit evaluation segment exceeds the preset rejection trigger cumulative threshold, the short-circuit evaluation segment is permanently removed from the set of streamlined short-circuit evaluation segments. The permanently removed short-circuit evaluation segment will no longer participate in the short-circuit jump detection of any subsequent risk control decision flow real-time evaluation process.

9. The conditional branching and short-circuit evaluation optimization method for decision flow according to claim 1, characterized in that, The method further includes: Obtain the business scenario tag associated with each decision node entry in the risk control decision flow structure description text. The business scenario tag is used to identify the risk control business type to which the decision node entry is applicable. Decision node entries with the same business scenario tag are grouped into the same business scenario decision node group. For each business scenario decision node group, extract the distribution area of ​​the decision predicate units of all decision node entries in the business scenario decision node group in the decision predicate long chain, and take the distribution area as the scenario decision predicate chain segment corresponding to the business scenario decision node group. Before the risk control service request message enters the real-time evaluation process of the risk control decision flow, the business scenario identifier field carried in the risk control service request message is parsed, the corresponding business scenario judgment node group is matched according to the business scenario identifier field, and the short-circuit evaluation range of the risk control service request message is limited to the scenario judgment predicate chain segment corresponding to the business scenario judgment node group. The judgment predicate chain segment of the limited scenario judgment is re-executed for judgment predicate long chain splicing and short-circuit evaluation segment division to generate a scenario short-circuit evaluation segment set exclusive to the business scenario judgment node group. The short-circuit evaluation segment in the scenario short-circuit evaluation segment set only participates in short-circuit jump detection when the risk control service request message corresponding to the business scenario judgment node group is evaluated. During the real-time evaluation of the risk control decision flow, if the business scenario indicated by the business scenario identifier field of the current risk control service request message changes, the use of the scenario short-circuit evaluation fragment set corresponding to the current business scenario judgment node group is suspended, the scenario short-circuit evaluation fragment set corresponding to the changed business scenario is loaded, and at the switching point, the part of the truth value result of the evaluated judgment predicate unit that overlaps with the coverage of the changed business scenario judgment node group is retained.

10. A conditional branching short-circuit evaluation optimization system applied to decision flow, characterized in that, The method includes a processor and a computer-readable storage medium storing machine-executable instructions that, when executed by the processor, implement the conditional branch short-circuit evaluation optimization method for decision flows as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Enterprise semantic search and deep association rule mining method and system based on ontology

    CN122414177A

  • First-order logical neural networks with bidirectional inference

    WO2021229321A1