Decision engine management method, system and device, storage medium and program product
By optimizing the decision engine through stateless session management and decision path pruning strategies, combined with a visual writing platform and rule grammar tools, the problems of closedness and insufficient visual operation of existing decision engine systems are solved, and efficient strategy management and rapid response are achieved.
Patent Information
- Application Number
- CN202510790734.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-09-19
AI Technical Summary
The existing decision engine system is highly closed, difficult to operate and maintain, has poor scalability, lacks visual operation support, and has low policy deployment efficiency, making it difficult to meet the rapid response needs in complex business scenarios.
Based on the stateless session management strategy and decision path pruning strategy, a preset rule engine is generated, and a visual policy writing platform is built. Combined with the rule grammar tool, the policy configuration language entered by the user is converted into the underlying rule file and deployed to the preset rule engine for execution.
It significantly improves the efficiency of policy management and decision-making response speed, lowers the threshold for policy writing, improves the performance and stability of the system in high-concurrency scenarios, and supports diversified financial business needs.
Smart Images

Figure CN120669970A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data analysis technology, and in particular to a decision engine management method, system, device, storage medium, and program product. Background Art
[0002] In the credit card business, encompassing customer acquisition, product review, risk management, and customer engagement, a vast array of high-value business strategies has been accumulated over years of development. Decision engine systems are particularly crucial in this context, as they enable flexible management and adjustment of these business strategies and provide real-time computing services. However, in industry practice, many similar systems rely on commercial products such as the Vincio engine to build their decision-making capabilities. With the rapid growth of the business, inherent issues with the Vincio engine have gradually become obstacles to growth, including, but not limited to, a closed-source engine product, high operational and maintenance difficulties, and an outdated technical architecture with poor scalability.
[0003] Furthermore, some decision-making engine products on the market primarily focus on optimizing rule execution efficiency, relying primarily on code-based policy configuration and lacking graphical user interface support for non-technical personnel. Furthermore, existing systems often lack a complete closed loop for development, testing, rollout, and monitoring across the entire policy lifecycle. This results in inefficient policy deployment and makes it difficult to meet the rapid response requirements of complex business scenarios. Summary of the Invention
[0004] The main purpose of this application is to provide a decision engine management method, system, device, storage medium and program product, aiming to solve the technical problem of how to achieve efficient decision management.
[0005] To achieve the above objectives, the present application proposes a decision engine management method, which includes:
[0006] Based on the stateless session management strategy and decision path pruning strategy, the performance of the initial decision engine is optimized to generate a preset rule engine;
[0007] Based on the preset rule engine, a visual strategy writing platform is constructed;
[0008] Combining the visual policy writing platform and the preset rule grammar writing tool, the original policy configuration language input by the user is converted into an underlying rule file adapted to the preset rule engine;
[0009] The underlying rule file is deployed to the preset rule engine for execution to complete the release and decision-making of the strategy.
[0010] In one embodiment, the step of optimizing the performance of the initial decision engine based on the stateless session management strategy and the decision path pruning strategy to generate a preset rule engine includes:
[0011] Adjusting the initial decision engine to stateless execution to obtain a decision engine in stateless execution mode;
[0012] Performing path optimization on the decision tree in the initial decision engine according to the decision path pruning strategy to obtain a decision tree structure after path optimization;
[0013] Based on the decision engine of the stateless execution mode and the decision tree after path optimization, a preset rule engine is generated.
[0014] In one embodiment, the step of performing path optimization on the decision tree in the initial decision engine according to the decision path pruning strategy to obtain a path-optimized decision tree includes:
[0015] Obtaining historical execution data of each decision path in the initial decision engine, wherein each decision path corresponds to an output result;
[0016] Classify all paths whose output results are preset target outputs as target paths, and classify all paths whose output results are non-preset target outputs as non-target paths;
[0017] According to a preset pruning rule, the non-target path is deleted and the target path is retained;
[0018] The decision tree structure is reconstructed based on the target path to generate a decision tree after path optimization.
[0019] In one embodiment, the step of constructing a visual policy writing platform based on the preset rule engine includes:
[0020] Based on the preset rule engine, the decision components are graphically configured and orchestrated to obtain a visual policy writing platform, wherein the visual policy writing platform supports policy development, testing, approval, launch and operation management processes.
[0021] In one embodiment, the step of converting the original policy configuration language input by the user into an underlying rule file adapted to the preset rule engine by combining the visual policy writing platform and the preset rule grammar writing tool includes:
[0022] Receiving original policy configuration language input by the user through graphical drag and drop or text input on the visual policy writing platform;
[0023] Based on the preset rule grammar writing tool, convert the original policy configuration language into a predefined front-end conditional branch control grammar;
[0024] Parsing the predefined front-end conditional branch control grammar to generate a conditional statement;
[0025] An underlying rule file executable by the preset rule engine is generated based on the conditional statement.
[0026] In one embodiment, the step of converting the original policy configuration language into a predefined front-end conditional branch control grammar includes:
[0027] Identify output variables, input variables, and rule bodies in the original policy configuration language through regular expressions;
[0028] Based on the branch layer relationship of the rule body, converting the branch control symbol in the original policy configuration language into a front-end branch syntax format;
[0029] According to the front-end branch syntax format, the set / string operation is mapped to the preset front-end function syntax, and the logical connectors between the input variables are converted to the preset front-end logical combination format;
[0030] Based on the preset front-end function syntax and the preset front-end logic combination format, the output variable is mapped to a predefined front-end conditional branch control syntax.
[0031] In addition, to achieve the above objectives, the present application also proposes a decision engine management system, which includes:
[0032] The optimization module is used to optimize the performance of the initial decision engine based on the stateless session management strategy and decision path pruning strategy, and generate a preset rule engine;
[0033] A construction module, used to build a visual strategy writing platform based on the preset rule engine;
[0034] A conversion module, configured to convert the rule grammar input by the user into an underlying rule file adapted to the preset rule engine by combining the visual strategy writing platform and the preset rule grammar writing tool;
[0035] The deployment module is used to deploy the underlying rule file to the preset rule engine for execution to complete the release and decision-making of the strategy.
[0036] In addition, to achieve the above-mentioned purpose, the present application also proposes a decision engine management device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the decision engine management method as described above.
[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium, and when the computer program is executed by the processor, the steps of the decision engine management method described above are implemented.
[0038] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the decision engine management method described above.
[0039] This application proposes a decision engine management method, system, device, storage medium and program product. The method includes: optimizing the performance of the initial decision engine based on the stateless session management strategy and the decision path pruning strategy to generate a preset rule engine; building a visual policy writing platform based on the preset rule engine; combining the visual policy writing platform and the preset rule grammar writing tool to convert the original policy configuration language input by the user into an underlying rule file that is adapted to the preset rule engine; deploying the underlying rule file to the preset rule engine for execution to complete the policy release and decision-making. This solution optimizes the engine performance through stateless session management and path pruning strategies, builds a visual policy writing platform, and combines the rule grammar tool to realize the automatic conversion of the policy configuration language to the underlying rule file, thereby improving the policy deployment efficiency and decision execution performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0042] Figure 1 A flowchart of the first embodiment of the decision engine management method of this application is provided;
[0043] Figure 2 This is a schematic diagram of the visual strategy writing platform architecture provided in Example 1 of this application;
[0044] Figure 3 A comparative diagram of the transition from the traditional C / S architecture to the modern B / S (browser / server) architecture provided in Example 1 of the present application;
[0045] Figure 4 A list of functions supported by the visual policy writing platform provided in Example 1 of this application;
[0046] Figure 5 A flowchart of the second embodiment of the decision engine management method of this application is provided;
[0047] Figure 6 A schematic diagram of the decision tree shortening process provided in Example 2 of this application;
[0048] Figure 7 A flowchart of the third embodiment of the decision engine management method of this application is provided;
[0049] Figure 8 This is a schematic diagram of the module structure of the decision engine management system according to an embodiment of the present application;
[0050] Figure 9 This is a schematic diagram of the device structure of the hardware operating environment involved in the decision engine management method in the embodiment of the present application.
[0051] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0052] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0053] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0054] The main solution of the embodiment of the present application is: based on the stateless session management strategy and decision path pruning strategy, the performance of the initial decision engine is optimized to generate a preset rule engine; based on the preset rule engine, a visual policy writing platform is constructed; combining the visual policy writing platform and the preset rule grammar writing tool, the original policy configuration language input by the user is converted into an underlying rule file that is adapted to the preset rule engine; the underlying rule file is deployed to the preset rule engine for execution to complete the policy release and decision-making.
[0055] In this embodiment, for ease of description, the following description is made with the decision engine management system as the execution entity.
[0056] Currently, inherent issues with Vincio engines in the market are gradually hindering business development. These include, but are not limited to, closed-source engine products, high operational and maintenance difficulties, outdated technical architectures, and poor scalability. Furthermore, many existing engine products lack key features, such as visual, efficient, and convenient policy development, testing, and rollout capabilities, as well as a lack of high-performance underlying rule engines. This inability to provide comprehensive policy management and operations significantly hinders the development of decision-making businesses.
[0057] This application provides a solution. First, based on stateless session management and decision path pruning strategies, a secure and controllable preset rule engine is built to achieve "lightweight" iteration of credit card decision-making capabilities and significantly improve execution performance. At the same time, relying on the full-scenario visual rule writing platform of B / S architecture, a one-stop lifecycle management system covering policy development, testing, approval, online launch, and operation is created to form a complete product closed loop, effectively solving the problems of single functions and insufficient scenario adaptation capabilities of existing decision-making products. Through this solution, the non-standard syntax entered by the user can be automatically converted into a DRL file executable by the rule engine, and deployed to the preset rule engine to realize automatic policy release and real-time decision-making, which can comprehensively improve policy management efficiency and decision response speed.
[0058] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of performing the above functions. The following uses a personal computer as an example to illustrate this embodiment and the following embodiments.
[0059] Based on this, the embodiment of the present application provides a decision engine management method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the decision engine management method of this application.
[0060] In this embodiment, the decision engine management method includes steps S10 to S40:
[0061] Step S10: Based on the stateless session management strategy and the decision path pruning strategy, the performance of the initial decision engine is optimized to generate a preset rule engine;
[0062] It should be noted that in this embodiment, the preset rule engine refers to a self-developed high-performance rule engine designed based on a stateless execution architecture and equipped with path pruning capabilities. It can support the rapid matching and efficient execution of complex decision logic and is suitable for the real-time policy processing requirements in high-concurrency business scenarios.
[0063] A stateless session means that during a rule execution, no state information related to the call context is retained. Each decision request is independent and does not affect each other.
[0064] Decision path pruning refers to dynamically skipping subsequent irrelevant or impossible-to-trigger judgment paths during rule execution based on the currently met or unmet conditions, thereby reducing invalid calculations.
[0065] It is understandable that since traditional decision engines have problems such as high resource usage, large response delays, and low efficiency in executing complex strategies in high-concurrency scenarios, step S10 is performed to construct a preset rule engine based on the stateless session management strategy and the decision path pruning strategy. This can avoid the memory overhead and thread blocking caused by maintaining the session state, and at the same time, by constructing a "lightweight" decision engine to iterate the credit card decision-making capabilities, the performance is better.
[0066] In a feasible implementation, step S10 may include steps S11 to S13:
[0067] Step S11, adjusting the initial decision engine to stateless execution to obtain a decision engine in stateless execution mode;
[0068] Step S12, performing path optimization on the decision tree in the initial decision engine according to the decision path pruning strategy to obtain a decision tree structure after path optimization;
[0069] Step S13: generating a preset rule engine based on the decision engine of the stateless execution mode and the decision tree structure after path optimization.
[0070] It should be noted that a decision engine in stateless execution mode refers to an engine specifically designed to process independent transactions, where each request is treated as independent of other requests and does not depend on previous state information.
[0071] Since the initial decision engine cannot completely break away from the decision flow database dependency during its decision execution process, this embodiment designs a three-level available architecture that combines application cache, configuration service cache, and database, aiming to resolve the database connection data resource bottleneck in high-concurrency access scenarios.
[0072] For complex policy scenarios, such as those with more than three layers of loop-nested policies and more than 10 referenced policies, this embodiment proposes two optimization methods: first, rewriting the stateless session management in the source code, adjusting the initial decision engine to stateless execution, and creating a stateless execution container; second, optimizing the decision tree execution path in the initial decision engine.
[0073] Specifically, when adjusting the initial decision engine for stateless execution, the original StatefulKieSession (stateful knowledge session) is first replaced with StatelessKieSession (stateless knowledge session). StatelessKieSession has the following characteristics: each execution is an independent session, all input data is explicitly passed in through the API, all resources are automatically released after execution is completed, no state information is retained, and multiple rounds of execution or incremental updates are not supported. It is suitable for a single complete rule execution.
[0074] In this mode, all variables and fact objects required for execution must be passed in at once via ExecutionResults (rule execution results) or custom parameter objects. Rule execution results are also obtained through return values, rather than relying on internal session state. Furthermore, operations such as insert() and retract() that dynamically modify fact sets are prohibited, ensuring that all judgments are completed within a single execution, avoiding cross-round dependencies and guaranteeing the independence and consistency of each execution.
[0075] Building on the stateless transformation described above, a stateless execution container was further encapsulated. This stateless execution container releases resources upon completion of each execution, leaving no residual state. It also supports concurrent calls, avoiding lock contention between threads and significantly improving the decision engine's execution performance and system stability. Finally, based on the stateless execution container, a high-performance rule engine with a stateless execution mode was further constructed. This high-performance rule engine in this stateless execution mode executes each policy independently, without relying on historical context information, thereby improving the system's concurrent processing capabilities and resource utilization.
[0076] By following these steps, we can effectively adapt the initial decision engine to a stateless execution mode, resulting in an efficient, lightweight stateless execution container. This significantly improves the system's performance and stability in high-concurrency scenarios. This approach not only reduces resource consumption but also enhances the system's scalability and flexibility, making it suitable for a variety of business scenarios requiring rapid response.
[0077] When executing decision tree path pruning, the judgment processing logic of conditional branches is rewritten. When a branch condition is not hit, the system will directly skip the branch path instead of continuing to traverse its subsequent nodes. This optimizes the original full path traversal calculation to a calculation algorithm that only targets valid target paths, significantly reducing redundant judgments and improving rule execution efficiency.
[0078] Finally, based on the stateless execution container obtained from the above optimization and the decision tree structure with completed path pruning, a preset rule engine is built.
[0079] Through the above steps, a stateless execution mechanism and decision path pruning strategy are introduced. Under the premise of ensuring the integrity of business logic, the engine significantly improves execution efficiency and resource utilization. After multiple rounds of testing and verification, under the same hardware resources and load conditions, compared with traditional decision engines, the preset rule engine proposed in this invention reduces the underlying computing time by an average of 32% and improves the concurrency performance by an average of 120%.
[0080] Step S20: Building a visual strategy writing platform based on the preset rule engine;
[0081] It's important to note that the Visual Strategy Writing Platform is a graphical, interactive tool for business and strategy operators. It supports rapid definition of decision rules through drag-and-drop and configuration, eliminating the need for complex code writing or familiarity with underlying rule syntax. The platform manages the entire policy lifecycle, from development and testing to approval, rollout, and operations, significantly lowering the barrier to entry for policy writing and improving the efficiency of policy iteration.
[0082] It is understandable that since traditional decision-making products rely on technical personnel to write rule scripts, there are problems such as high learning costs, difficulty in collaboration, and slow change response, which makes it difficult to meet the needs of the business side to quickly adjust policies. Therefore, step S20 is executed to build a visual policy writing platform based on the preset rule engine, which can achieve efficient configuration and real-time effectiveness of policies, improve the ease of use and agility of policy management, and support the rapid decision-making response needs in financial business scenarios such as credit cards.
[0083] Since the original C / S client access method requires users to install client applications on their local machines, there are problems such as high deployment cost, complex maintenance, poor cross-terminal compatibility, and low policy coordination efficiency. Therefore, this embodiment provides a visual policy writing platform that can solve the above problems and achieve efficient and flexible policy management and execution. Figure 2 As shown, Figure 2 Write a platform architecture diagram for visualization strategy.
[0084] Furthermore, if Figure 3 As shown, Figure 3 This is a comparative diagram of the transition from traditional C / S architecture to modern B / S (browser / server) architecture, which shows the transition from traditional C / S architecture to modern B / S (browser / server) architecture. Figure 3 The left section shows the old locally installed policy management window, while the right shows the upgraded browser-based access interface.
[0085] This full-scenario visual strategy writing platform not only covers all the component functions of the original decision engine, but also introduces a series of enhanced features, including but not limited to shared decision flow, independent decision flow, rule set, rule priority and champion challenge and other component functions, such as Figure 4 As shown, Figure 4 A list of features supported by the visual policy writing platform. These new features greatly enrich the flexibility of business usage scenarios and reduce the complexity of policy writing.
[0086] Furthermore, the decision-making components within this full-scenario visual policy writing platform are configured and orchestrated based on the stateless execution mode and path pruning strategies of the pre-configured rule engine. The platform abstracts complex rule logic into visual component modules, allowing users to complete policy design through drag-and-drop and parameter configuration. The underlying high-performance mechanisms of the rule engine ensure efficient policy execution.
[0087] For example, when building a credit card approval strategy, business personnel can use the platform to select modules such as the "Conditional Judgment Component," the "Scorecard Component," and the "Decision Table Component" to construct a complete strategy flowchart. The Conditional Judgment Component defines customer access rules (e.g., "age ≥ 18 and ≤ 60"); the Scorecard Component assesses a customer's credit risk level (e.g., calculating a comprehensive score based on variables such as income and debt ratio); and the Decision Table Component outputs the final decision (e.g., "Approve," "Reject," or "Manual Review") based on the scoring results.
[0088] During policy execution, the platform automatically converts the above graphical configuration into an intermediate structure recognizable by the rule engine and combines the following core technologies to improve execution performance:
[0089] First, all decision-making components run in a stateless execution container, ensuring that each policy execution is independent and retains no contextual state information. This approach effectively avoids lock contention issues that can arise when multiple threads execute concurrently, significantly reducing memory usage and improving overall system throughput. It is particularly suitable for high-concurrency, low-latency, real-time decision-making scenarios.
[0090] Secondly, before policy deployment, the platform analyzes decision paths based on test data and dynamically skips irrelevant branches at runtime based on input variable values. For example, if a path's condition is "Customer Type = VIP," but the customer type in the current request is "Ordinary Customer," that path will be automatically skipped, eliminating the need to match subsequent conditions. This path pruning mechanism effectively reduces inefficient computation and further improves policy execution efficiency and responsiveness.
[0091] By following these steps and building the visual policy writing platform, we not only greatly enrich the flexibility of business usage scenarios, but also significantly reduce the complexity of policy writing, enabling business personnel to efficiently complete policy design and iteration without coding, and fully support diversified financial business needs such as credit card approval, risk control, and intelligent marketing.
[0092] Step S30: Combining the visual policy writing platform and the preset rule grammar writing tool, converting the original policy configuration language input by the user into an underlying rule file adapted to the preset rule engine;
[0093] It should be noted that the preset rule grammar writing tool refers to a set of semantic parsing and compilation tool chains developed based on rule expression specifications, which are used to automatically convert the graphical strategies or non-standard strategy description languages configured by users on the visualization platform into standard rule files that can be recognized by the rule engine.
[0094] It is understandable that since policy writing in traditional decision-making systems relies on technical personnel to manually write complex rule scripts, there are problems such as high learning threshold, easy errors, and difficult maintenance, and it is difficult to efficiently connect with high-performance rule engines. Therefore, executing step S30 can achieve automatic conversion from graphical policy configuration to rule engine executable rule files, significantly reducing the difficulty of policy development, improving policy deployment efficiency, and ensuring the high compatibility and execution performance of policy logic and the underlying execution engine.
[0095] In a feasible embodiment, step S30 may include steps S31 to S34:
[0096] Step S31, receiving the original policy configuration language input by the user through graphical drag and drop or text input on the visual policy writing platform;
[0097] Step S32: using the preset rule grammar writing tool, converting the original policy configuration language into a predefined front-end conditional branch control grammar;
[0098] Step S33, parsing the predefined front-end conditional branch control grammar to generate a conditional statement;
[0099] Step S34: Generate an underlying rule file executable by the preset rule engine based on the conditional statement.
[0100] This embodiment uses an efficient writing tool based on rule grammar to automatically convert the original policy configuration language (such as IF-ELSE rule grammar) input by business personnel into the underlying rule engine DRL grammar, thereby reducing the overall policy writing workload by 70%.
[0101] Specifically, first, the visual strategy writing platform receives the original decision engine rule syntax obtained by the user through graphical drag and drop or text input and converts it into a predefined front-end conditional branch control syntax, such as the IF-ELSE-THEN standardized syntax structure defined in the Yunce platform.
[0102] Then, based on the predefined front-end conditional branch control syntax, key elements of the policy are further extracted, including but not limited to the extraction and conversion of variable names, function names, and operators. After completing these key element extractions, the system converts them into structured conditional statements, which serve as the basis for generating the underlying rule files. This process is implemented through a semantic mapping and syntax conversion mechanism, ensuring that the business logic is accurately mapped to the expression system supported by the pre-set rule engine.
[0103] Finally, a DRL rule file executable by the preset rule engine is generated based on the extracted conditional statements.
[0104] Through the above steps, the non-standard format syntax input by the user can be converted into an executable rule DRL file. It has been calculated that the efficiency of rule writing is improved by 70%, and syntax problems can be pre-checked and avoided in advance during the conversion process.
[0105] Step S40: deploy the underlying rule file to the preset rule engine for execution to complete policy release and decision-making.
[0106] Specifically, after adapting the underlying DRL rule file executed by the preset rule engine, the system pushes it to the execution environment of the preset rule engine and activates the policy through the rule loading mechanism so that it can respond to subsequent decision requests.
[0107] Through the above-described embodiment method, the performance of the initial decision engine is optimized based on the stateless session management strategy and the decision path pruning strategy to generate a preset rule engine. Based on the preset rule engine, a visual policy writing platform is constructed. Combining the visual policy writing platform with the preset rule syntax writing tool, the original policy configuration language entered by the user is converted into an underlying rule file that is compatible with the preset rule engine. This solution, based on stateless session management and the decision path pruning strategy, constructs a preset rule engine, enabling a "lightweight" decision engine to efficiently support credit card business and significantly improve performance. At the same time, combining the visual and efficient rule writing platform to convert non-standard syntax into a DRL file executable by the rule engine can improve policy management efficiency and decision responsiveness.
[0108] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 5, further refining step S12, step S12 may further include steps A1 to A4:
[0109] Step A1: Obtain each decision path in the initial decision engine, wherein each decision path corresponds to an output result;
[0110] Step A2: classify all paths whose output results are preset target outputs as target paths, and classify all paths whose output results are non-preset target outputs as non-target paths;
[0111] Step A3: deleting the non-target path and retaining the target path according to a preset pruning rule;
[0112] Step A4: reconstructing a decision tree structure based on the target path to generate a decision tree after path optimization.
[0113] Specifically, before rule execution, all decision paths in the initial decision engine's decision tree are identified, with each decision path corresponding to an output result. Simultaneously, the decision tree is simulated based on a pre-set test strategy, traversing all possible input variable combinations to identify all complete paths that meet the pre-set target output. Paths that meet the pre-set target output are classified as target paths, while those that do not are classified as non-target paths.
[0114] Then, according to the preset pruning rules, pruning operations are performed on invalid paths that do not meet the target path set, that is, these paths are removed from the decision tree, thereby reducing unnecessary rule matching and condition judgment, while only retaining the target path.
[0115] Finally, based on the remaining target path set, a decision tree model with a simpler structure and higher execution efficiency is reconstructed.
[0116] For example, the decision tree shortening process is as follows Figure 6 As shown in the figure. Assuming the test strategy determines that the target result set is result set 6, in traditional native open source engines, rule execution is to sequentially traverse all paths from the starting node to the result set node. That is, the execution path is: [Path 1 → Path 2 → Path 3 → Path 4 → Path 5 → Path 6 → End of hit], requiring a total of 6 paths to be traversed and calculated.
[0117] The optimization scheme proposed in this implementation intelligently prunes decision paths, retaining only valid paths that ultimately lead to the target output. Once the rule engine identifies a path that leads directly to the target output, it immediately terminates the calculation of all other irrelevant paths, resulting in only one path being executed. This optimization mechanism effectively prunes unnecessary paths, significantly reducing the number of rule matches and conditional checks, and significantly lowering performance overhead during the decision-making process.
[0118] Through the above-mentioned embodiment method, the intelligent pruning and structural optimization of the decision path significantly reduce the number of condition judgments and path traversal depth required by the rule engine during execution, thereby improving the system response speed and execution efficiency.
[0119] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above introduction and will not be described in detail later. Figure 7 , further refining step S31, step S31 may further include steps B1 to B4:
[0120] Step B1, identifying output variables, input variables and rule bodies in the original policy configuration language through regular expressions;
[0121] Step B2: based on the branch layer relationship of the rule body, convert the branch control symbol in the original policy configuration language into a front-end branch syntax format;
[0122] Step B3: Mapping the set / string operation to a preset front-end function syntax according to the front-end branch syntax format, and converting the logical connectors between the input variables to a preset front-end logical combination format;
[0123] Step B4: Mapping the output variable to a predefined front-end conditional branch control syntax based on the preset front-end function syntax and the preset front-end logic combination format.
[0124] Specifically, the system first uses a regular expression matching mechanism to parse and extract the structure of the original measurement configuration language input by the user (such as unstructured IF-ELSE syntax, natural language description or semi-structured rule statement), and identifies three types of key elements from the original text, including input variables, output variables and rule bodies. Among them, input variables refer to fields or parameters used for conditional judgment, and input variables include but are not limited to user attributes (such as customer age, income level, credit score), transaction information (such as transaction amount, transaction time), and environmental variables (such as current date, geographic location); output variables refer to the results generated after the rule is executed or the status values that need to be updated, and output variables include but are not limited to decision results (such as approval status, risk level), calculation results (such as discount rate, operation instructions); the rule body refers to the part that contains a complete logical judgment structure, which defines the specific logic of how to derive output variables based on input variables. The rule body includes but is not limited to conditional statements, multi-branch results, nested conditions, function calls, set operations and string operations.
[0125] After completing the extraction of variables and rule bodies, the system further analyzes the branch hierarchical structure within the rule body (such as nested IF conditions, multi-branch CASE structures, etc.), and based on their logical relationships, converts the branch control operators in the original strategy (such as if, else if, then, else) into a standardized front-end branch syntax format, such as the IF-THEN-ELSE expression structure defined by the Yunce platform.
[0126] Subsequently, the set operations (such as in, not in) and string operations (such as contains, startsWith) designed in the original strategy are converted into the preset front-end function call format, for example, field in[A, B, C] is converted to includes(field, ['A', 'B', 'C']).
[0127] At the same time, the logical connectors used in the original strategy (such as &&, ||, !) are converted into the front-end logical combination format (such as AND, OR, NOT) to adapt to the expression specifications of the visual strategy writing platform and the semantic understanding requirements of the preset rule engine.
[0128] Finally, the system integrates all the above processing results and binds the output variables to the conditional branch structure to generate a complete conditional branch control syntax structure that meets the requirements of the front-end policy editor.
[0129] In the above embodiment method, the non-standard policy language is converted into a unified front-end executable syntax through steps such as variable extraction, rule subject identification, and logical structure conversion, so that business intent can be accurately mapped into execution logic that the system can understand.
[0130] It should be noted that the above examples are only used to understand this application and do not constitute a limitation on the decision engine management method of this application. More simple transformations based on this technical concept are all within the scope of protection of this application.
[0131] This application also provides a decision engine management system, please refer to Figure 8 , the decision engine management system includes:
[0132] An optimization module 10 is configured to optimize the performance of the initial decision engine based on the stateless session management strategy and the decision path pruning strategy, and generate a preset rule engine;
[0133] A construction module 20 is used to construct a visual strategy writing platform based on the preset rule engine;
[0134] The conversion module 30 is used to convert the rule grammar input by the user into an underlying rule file adapted to the preset rule engine by combining the visual strategy writing platform and the preset rule grammar writing tool;
[0135] The deployment module 40 is used to deploy the underlying rule file to the preset rule engine for execution to complete the release and decision-making of the policy.
[0136] The decision engine management system provided in this application, employing the decision engine management method of the aforementioned embodiment, can solve the technical problem of achieving efficient decision management. Compared with the prior art, the beneficial effects of the decision engine management system provided in this application are the same as those of the decision engine management method provided in the aforementioned embodiment. Other technical features of the decision engine management system are the same as those disclosed in the aforementioned embodiment and are not further described here.
[0137] The present application provides a decision engine management device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the decision engine management method in the above-mentioned embodiment one.
[0138] Reference below Figure 9 , which shows a schematic diagram of the structure of a decision engine management device suitable for implementing embodiments of the present application. The decision engine management device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), etc., as well as fixed terminals such as digital TVs and desktop computers. Figure 9 The decision engine management device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0139] like Figure 9As shown, the decision engine management device may include a processing system 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory 1002 or programs loaded from a storage device 1003 into a random access memory 1004. Random access memory 1004 also stores various programs and data required for the operation of the decision engine management device. Processing device 1001, read-only memory 1002, and random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems may be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, hard disk, etc.; and a communication device 1009. The communication device 009 can allow the decision engine management device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a decision engine management device with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems can be implemented or have alternatively.
[0140] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication system, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are performed.
[0141] The decision engine management device provided in this application, employing the decision engine management method of the aforementioned embodiment, can solve the technical problem of achieving efficient decision management. Compared to the prior art, the beneficial effects of the decision engine management device provided in this application are the same as those of the decision engine management method provided in the aforementioned embodiment. Other technical features of the decision engine management device are the same as those disclosed in the aforementioned embodiment and are not further elaborated here.
[0142] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0143] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0144] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, and the computer-readable program instructions are used to execute the decision engine management method in the above-mentioned embodiment.
[0145] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0146] The computer-readable storage medium may be included in the decision engine management device; or may exist independently without being assembled into the decision engine management device.
[0147] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the decision engine management device, the decision engine management device: optimizes the performance of the initial decision engine based on the stateless session management strategy and the decision path pruning strategy, and generates a preset rule engine; builds a visual policy writing platform based on the preset rule engine; combines the visual policy writing platform and the preset rule grammar writing tool to convert the original policy configuration language input by the user into an underlying rule file that is adapted to the preset rule engine.
[0148] The computer program code for performing the operations of the present application may be written in one or more programming files or a combination thereof, including object-oriented programming files such as Java, Smalltalk, C++, and conventional procedural programming files such as "C" files or similar programming files. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0149] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0150] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0151] The computer-readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned decision engine management method, thereby solving the technical problem of achieving efficient decision management. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the decision engine management method provided in the aforementioned embodiments, and are not further elaborated here.
[0152] The present application also provides a computer program product, comprising a computer program, which implements the steps of the decision engine management method as described above when the computer program is executed by a processor.
[0153] The computer program product provided in this application can solve the technical problem of achieving efficient decision management. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the decision engine management method provided in the above embodiment, and will not be repeated here.
[0154] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A decision engine management method, characterized in that: The decision engine management method includes: Based on the stateless session management strategy and decision path pruning strategy, the performance of the initial decision engine is optimized to generate a preset rule engine; Based on the preset rule engine, a visual strategy writing platform is constructed; Combining the visual policy writing platform and the preset rule grammar writing tool, the original policy configuration language input by the user is converted into an underlying rule file adapted to the preset rule engine; The underlying rule file is deployed to the preset rule engine for execution to complete the release and decision-making of the strategy.
2. The decision engine management method according to claim 1, wherein: The step of optimizing the performance of the initial decision engine based on the stateless session management strategy and the decision path pruning strategy to generate a preset rule engine includes: Adjusting the initial decision engine to stateless execution to obtain a decision engine in stateless execution mode; Performing path optimization on the decision tree in the initial decision engine according to the decision path pruning strategy to obtain a path-optimized decision tree; Based on the decision engine of the stateless execution mode and the decision tree after path optimization, a preset rule engine is generated.
3. The decision engine management method according to claim 2, wherein: The step of performing path optimization on the decision tree in the initial decision engine according to the decision path pruning strategy to obtain a decision tree after path optimization includes: Obtaining each decision path in the initial decision engine, wherein each decision path corresponds to an output result; Classify all paths whose output results are preset target outputs as target paths, and classify all paths whose output results are non-preset target outputs as non-target paths; According to a preset pruning rule, the non-target path is deleted and the target path is retained; The decision tree structure is reconstructed based on the target path to generate a decision tree after path optimization.
4. The decision engine management method according to claim 1, wherein: The step of building a visual strategy writing platform based on the preset rule engine includes: Based on the preset rule engine, the decision components are graphically configured and orchestrated to obtain a visual policy writing platform, wherein the visual policy writing platform supports policy development, testing, approval, launch and operation management processes.
5. The decision engine management method according to claim 1, wherein: The step of converting the original policy configuration language input by the user into an underlying rule file adapted to the preset rule engine by combining the visual policy writing platform and the preset rule grammar writing tool includes: Receiving original policy configuration language input by the user through graphical drag and drop or text input on the visual policy writing platform; Converting the original policy configuration language into a predefined front-end conditional branch control grammar through the preset rule grammar writing tool; Parsing the predefined front-end conditional branch control grammar to generate a conditional statement; An underlying rule file executable by the preset rule engine is generated based on the conditional statement.
6. The decision engine management method according to claim 5, wherein: The step of converting the original policy configuration language into a predefined front-end conditional branch control grammar comprises: Identify output variables, input variables, and rule bodies in the original policy configuration language through regular expressions; Based on the branch layer relationship of the rule body, converting the branch control symbol in the original policy configuration language into a front-end branch syntax format; According to the front-end branch syntax format, the set / string operation is mapped to the preset front-end function syntax, and the logical connectors between the input variables are converted to the preset front-end logical combination format; Based on the preset front-end function syntax and the preset front-end logic combination format, the output variable is mapped to a predefined front-end conditional branch control syntax.
7. A decision engine management system, characterized in that: The decision engine management system includes: The optimization module is used to optimize the performance of the initial decision engine based on the stateless session management strategy and decision path pruning strategy, and generate a preset rule engine; A construction module, used to build a visual strategy writing platform based on the preset rule engine; A conversion module, configured to convert the rule grammar input by the user into an underlying rule file adapted to the preset rule engine by combining the visual strategy writing platform and the preset rule grammar writing tool; The deployment module is used to deploy the underlying rule file to the preset rule engine for execution to complete the release and decision-making of the strategy.
8. A decision engine management device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the decision engine management method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the decision engine management method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the decision engine management method according to any one of claims 1 to 6 are implemented.