A method, system, device, and medium for dynamic decision flow execution
Patent Information
- Application Number
- CN202611142248.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-10-16
AI Technical Summary
1、规则引擎方案:仍然依赖人工预定义的规则集驱动决策,无法有效应对未知或突发业务场景,且缺乏自主学习能力,规则库需随业务变化频繁迭代,维护成本呈指数级增长
(1)基于上下文层次聚类的场景划分机制,实现了对当前节点流程运行状态的高精度识别,置信度驱动自适应模式切换,在保证决策准确性的同时,显著降低了计算开销,实现了低延迟下的高收益路径选择;
Smart Images

Figure CN122928262A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of process management, and in particular relates to a method, system, device and medium for executing dynamic decision-making processes. Background Technology
[0002] Modern enterprise information systems commonly integrate workflow engines to automate business processes. Current mainstream workflow engines (such as Activiti and Flowable) rely on predefined static decision models, which must solidify all potential execution paths and decision logic during the design phase. Such static decision models have several limitations in practical applications: first, they lack flexibility and struggle to respond to dynamically changing business needs at runtime; second, the model complexity increases dramatically with the expansion of business scenarios, leading to high maintenance costs; and third, they lack the ability to mine historical execution data, hindering continuous learning and optimization of decision-making strategies.
[0003] To address the rigid constraints of static models, the industry has attempted to introduce dynamic routing mechanisms to improve adaptability. Typical solutions include rule-based decision-making systems and path selection methods based on pre-trained machine learning models. However, these solutions still have significant drawbacks: 1. Rule engine solution: It still relies on manually predefined rule sets to drive decision-making, which cannot effectively cope with unknown or sudden business scenarios, and lacks self-learning ability. The rule base needs to be frequently iterated with business changes, and the maintenance cost increases exponentially.
[0004] 2. Static machine learning model solution: It uses offline training models to predict the optimal path, but it faces two major challenges. First, the parameters are fixed after the model is trained, making it difficult to adapt to the dynamic evolution of business data distribution (i.e., the "concept drift" problem), which easily leads to the decay of decision performance over time. Second, the reasoning process of complex models is usually accompanied by high computational overhead, making it difficult to meet the low latency requirements of process execution.
[0005] 3. Simple exploratory strategy solutions: such as the ε-greedy algorithm, which optimizes decisions through random exploration. Although it can accumulate some experience, its indiscriminate exploration behavior is prone to causing a large number of invalid path attempts, which not only causes significant performance loss, but may also trigger potential risks due to wrong decisions, threatening business continuity.
[0006] In summary, there is an urgent need in this field to build a dynamic process decision-making mechanism that can accurately identify and select the execution path that maximizes business benefits in a dynamic environment, thereby improving the flexibility and accuracy of process execution. Summary of the Invention
[0007] To overcome the aforementioned shortcomings of the prior art, this application proposes a method, system, device, and medium for executing a dynamic decision-making process, which can achieve synergistic optimization of process execution efficiency and decision accuracy, and continuously optimize decision-making strategies.
[0008] The technical solution is as follows: A method for executing a dynamic decision-making process includes: Load the initial process definition, which at least includes a start node and a reference identifier to the hybrid optimization decision-maker; Execute the process of the currently active node and collect the context information of the process running in the currently active node; The context information is input into the hybrid optimization decision-maker, triggering the hybrid optimization decision-maker to perform the following operations: The context information is mapped to a pre-constructed context feature space to determine the context scene to which it belongs; Calculate the matching confidence score between the context information and the context scene; Based on the relationship between the matching confidence level and the preset threshold, dynamically switch to exploitation mode or exploration mode; If switched to exploitation mode, the Thompson sampling strategy is used to select the target node from the candidate nodes corresponding to the context scenario; If switched to exploration mode, a Bayesian prior-based directional exploration strategy is adopted, which aggregates global prior knowledge of all scenarios and selects the node with the highest global prior benefit as the target node. Execute the process of the target node, and update the decision model parameters of the context scenario and its parent-level scenario based on the execution effect of the target node's process.
[0009] A system for executing a dynamic decision-making process, wherein the method for implementing the aforementioned dynamic decision-making process during system operation includes: The process definition module is used to store and manage the initial process definition, which at least includes a start node and a reference identifier to the hybrid optimization decision-maker. The core module of the process engine is used to create and manage the lifecycle of process instances, driving the execution and switching of the current active node; The context management module is used to collect the context information of the process instance running at the current active node; The hybrid optimization decision-maker is used to receive the context information and perform dynamic routing decisions. It integrates a scene matching unit, a mode switching unit, a decision execution unit and a feedback update unit. The scene matching unit is used to map the context information to a pre-constructed context feature space, determine the context scene to which it belongs, and calculate the matching confidence between the context information and the context scene. The mode switching unit is used to dynamically switch to utilization mode or exploration mode according to the relationship between the matching confidence and the preset threshold. The decision execution unit is used to select a target node from the candidate nodes corresponding to the context scenario by adopting the Thompson sampling strategy when switching to the utilization mode; and to adopt a Bayesian prior-based directional exploration strategy when switching to the exploration mode, aggregating the global prior knowledge of all scenarios and selecting the node with the highest global prior benefit as the target node. The feedback update unit is used to update the decision model parameters of the context scenario and its parent-level scenario based on the process execution effect of the target node. The node executor library contains various types of node executors for loading and executing the processes of the target node; The offline learning module is used to pre-build the context feature space and initialize the decision model parameters based on historical process execution data.
[0010] Based on the same inventive concept, an electronic device is also provided, comprising: a memory and a processor; The memory is used to store computer programs; the processor is used to execute the computer programs to implement the method of executing the above-described dynamic decision-making process.
[0011] Based on the same inventive concept, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the method for executing the above-mentioned dynamic decision-making process.
[0012] The beneficial effects of this plan are as follows: (1) The scenario partitioning mechanism based on context hierarchical clustering achieves high-precision identification of the current node process running status. The confidence level drives adaptive mode switching, which significantly reduces the computational overhead while ensuring decision accuracy and achieves high-yield path selection under low latency. (2) The cross-level Bayesian feedback update mechanism not only supports online incremental learning, enabling decision-making strategies to dynamically adapt to business evolution (anti-concept drift), but also realizes cross-scenario knowledge transfer through hierarchical parameter backtracking, which greatly improves the decision stability in cold start scenarios; (3) The targeted exploration strategy avoids the blindness of methods such as ε-greedy, and constrains the exploration behavior to the Bayesian prior high expectation region. Under strict risk control, the strategy optimization is completed, effectively balancing the dual needs of business security and performance exploration.
[0013] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the techniques pointed out in the description, claims and drawings. Attached Figure Description
[0014] To more clearly illustrate the technical solution of this application, the accompanying drawings used in the description of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0015] Figure 1 This is a flowchart illustrating the method for executing the dynamic decision-making process in this application embodiment; Figure 2 This is a flowchart illustrating the implementation of the dynamic decision-making process in this application embodiment; Figure 3 This is a schematic diagram of the system structure for executing the dynamic decision-making process in the embodiments of this application. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be noted that the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the protection scope of this application.
[0017] like Figure 1 and Figure 2 As shown in the figure, this application provides a method for executing a dynamic decision-making process, including: S1. Load the initial process definition, which includes at least a starting node and a reference identifier to the hybrid optimization decision-maker; The initial process definition refers to a lightweight process description file, which differs from the complete BPMN process definition used in existing workflow engines (such as Activiti and Flowable). Existing technologies require pre-defining the complete process topology during the process design phase, including all possible decision branches, gateway nodes, and flow paths, resulting in a bloated process model with poor flexibility. In contrast, the initial process definition in this embodiment only contains the most basic process skeleton information, namely at least one starting node and a reference identifier to the hybrid optimization decision maker.
[0018] The starting node is the first active node executed after the process instance starts, and its function is to trigger the start of the process instance. As the entry point for process startup, the starting node carries a reference identifier of the hybrid optimization decision-maker to ensure that the process engine can call the correct decision-maker to make subsequent routing decisions after completing the execution of the starting node.
[0019] The reference identifier is a unique identification information for a hybrid optimization decision-maker instance, which can be the decision-maker's name, number, service address, or interface class name.
[0020] Since the initial process definition does not contain any fixed routing rules or branch nodes, its data volume is much smaller than that of a traditional complete BPMN process definition, which significantly improves the storage and loading efficiency of the process definition and greatly shortens the startup time of the process instance. It is especially suitable for high-concurrency business scenarios that require frequent creation of a large number of process instances.
[0021] S2. Execute the process of the current active node and collect the context information of the process running in the current active node; The currently active node refers to the node that the process instance is currently executing at its current progress. After the process instance starts, the first currently active node is the starting node in the initial process definition. During subsequent execution, whenever a target node completes execution without meeting the process termination condition, that target node becomes the new currently active node. The process engine will continue to execute the business logic of that node, and after completion, it will trigger the hybrid optimization decision-maker again to make the next round of routing decisions. This process iterates until the process termination condition is met. It should be noted that the currently active node in this embodiment is not limited to a single node. In embodiments that support parallel execution, the currently active node can include multiple concurrent active nodes.
[0022] Executing the current active node refers to the process by which the core module of the process engine instantiates and executes the business logic corresponding to the current active node by calling the corresponding node executor in the node executor library. Different types of nodes correspond to different business logic and execution methods. For example, the node types include, but are not limited to: manual task nodes (which need to wait for user operation to complete), automatic service nodes (which call external system interfaces or execute internal calculation logic), sub-process nodes (which start a nested sub-process instance), waiting nodes (which suspend the process instance until specific conditions are met), and termination nodes (which terminate the process instance).
[0023] The context information refers to all runtime state data generated during the execution of the process instance that is relevant to the current decision. Preferably, the context information includes one or more of the following dimensions: (1) Process variables: Various business variables generated during the execution of a process instance, such as order amount, order status, approval opinions, processing time, etc.; (2) User attributes: User characteristic information related to the current process instance, such as user level, user registration duration, historical transaction records, user credit score, etc.; (3) Business object characteristics: The attribute information of the business object itself processed by the process, such as product category, product price, shipping address, product inventory, etc.; (4) External system status: Current status information of external systems on which the process depends, such as available inventory in the inventory system, risk assessment results of the risk control system, and transaction status of the payment system; (5) Historical execution trajectory: The historical execution path information of the current process instance from the starting node to the current node, including the type, order and execution result of the executed nodes.
[0024] Taking the e-commerce order processing flow as an example, the context information specifically includes: order amount, user level, product category, shipping address, payment method, user's historical purchase records, etc.
[0025] S3. Input the context information into the hybrid optimization decision-maker, triggering the hybrid optimization decision-maker to perform the following operations: The context information is mapped to a pre-constructed context feature space to determine the context scene to which it belongs; Calculate the matching confidence score between the context information and the context scene; Based on the relationship between the matching confidence level and the preset threshold, dynamically switch to exploitation mode or exploration mode; If switched to exploitation mode, the Thompson sampling strategy is used to select the target node from the candidate nodes corresponding to the context scenario; If switched to exploration mode, a Bayesian prior-based directional exploration strategy is adopted, which aggregates global prior knowledge of all scenarios and selects the node with the highest global prior benefit as the target node. In this embodiment, after the process of the current active node is completed, the core module of the process engine calls the service interface of the hybrid optimization decision-maker, passes the runtime context information of the current process instance as input parameters to the hybrid optimization decision-maker, thereby triggering the hybrid optimization decision-maker to start a complete routing decision process.
[0026] The context feature space is obtained by hierarchical clustering of historical process execution data. For example, before system startup or during the offline phase of system operation, a high-dimensional vector space is constructed based on a large amount of historical process execution data using a hierarchical clustering algorithm. In this feature space, the context information of each historical process instance is represented as a feature vector. The hierarchical clustering is used to divide historical context samples into multiple scene clusters. Historical instances with similar context features are clustered into the same scene cluster. Each scene cluster corresponds to a context scene, and a set of decision model parameters is maintained independently for each scene cluster.
[0027] The real-time context information of the current process instance is converted into a feature vector with the same dimension as the feature space. In the feature space, the scene cluster center that is closest to the current feature vector is found through an approximate nearest neighbor search algorithm. This scene cluster is the context scene to which the current context belongs.
[0028] S4. Execute the process of the target node, and update the decision model parameters of the context scenario and its parent-level scenario based on the execution effect of the target node's process.
[0029] After receiving the target node identifier returned by the hybrid optimization decision maker, the core module of the process engine matches the corresponding node executor from the node executor library based on the identifier. The executor then instantiates the target node and executes its business logic.
[0030] In this embodiment, a high confidence threshold θ_high and a low confidence threshold θ_low are set, where θ_high > θ_low. Based on the relationship between the matching confidence and the preset threshold, the dynamic switching between the exploitation mode and the exploration mode is realized. The specific switching logic is as follows: When the matching confidence is higher than the high confidence threshold θ_high, it indicates that the current context is highly consistent with the historical samples of its own scenario. The historical decision-making experience in this scenario has high reference value. The hybrid optimization decision-maker switches to the utilization mode and directly uses the historical knowledge of this scenario to select the target node. When the matching confidence is lower than the low confidence threshold θ_low, it indicates that the current context differs significantly from the typical features of its own scene. The historical experience of this scene may not be sufficient to reliably guide the current decision. The hybrid optimization decision maker switches to exploration mode, temporarily getting rid of the limitations of the current scene and turning to explore the target node at the global level. When the matching confidence level falls between the high confidence threshold θ_high and the low confidence threshold θ_low, it indicates that the similarity between the current context and the core scene is in a fuzzy zone. The utilization mode or exploration mode is then randomly selected according to the matching confidence level ratio. Preferably, the matching confidence level (normalized value) is used as the probability value for selecting the utilization mode, and (1 - the matching confidence level) is used as the probability value for selecting the exploration mode, for random sampling decision-making. Higher confidence levels indicate a greater inclination towards utilization, while lower confidence levels indicate a greater inclination towards exploration, achieving a smooth transition between utilization and exploration.
[0031] Existing ε-greedy algorithms employ a fixed exploration probability ε, performing random exploration with a constant probability regardless of the current state, leading to a large number of invalid explorations. This embodiment, however, uses confidence-driven mode switching to initiate exploration only when decision-making evidence is insufficient (low confidence). When decision-making evidence is sufficient (high confidence), it directly utilizes known experience, achieving on-demand exploration and significantly reducing the number of invalid explorations. Simultaneously, the probabilistic switching in the intermediate region avoids discontinuous jumps between utilization and exploration, ensuring the smoothness of the decision-making strategy.
[0032] According to this embodiment, in the utilization mode, the Thompson sampling strategy is adopted to select the target node from the candidate nodes corresponding to the context scenario, including: maintaining a beta distribution for each candidate node corresponding to the context scenario as its revenue distribution; sampling a revenue value from the beta distribution of each candidate node; and selecting the candidate node with the largest sampled revenue value as the target node.
[0033] Thompson Sampling is an online decision-making algorithm based on probability matching. Its core idea is to maintain a payoff probability distribution for each candidate node. By sampling from various distributions and selecting the node with the largest sample value, a natural balance is achieved between utilizing current knowledge and exploring uncertainty. This embodiment maintains an independent multi-armed gambling machine model for each context scenario, where each "arm" corresponds to an optional node in that scenario. The payoff distribution for each arm is modeled using a beta distribution, determined by two parameters α and β. α represents the number of times the node has received successful / positive feedback in its historical executions, and β represents the number of times it has received unsuccessful / negative feedback. For each candidate node, the hybrid optimization decision-maker independently samples a random value from its corresponding beta distribution Beta(α, β), representing the expected payoff at that node. After sampling all candidate nodes, the node with the largest sample value is selected as the target node.
[0034] Because randomness is introduced into the sampling process of the beta distribution, even if the historical average return of a certain node is high, its single sample value may still be lower than that of other nodes. This inherent randomness allows Thompson sampling to utilize the historical best node while retaining the possibility of trying other nodes, thus achieving the optimal exploration-utilization balance in the sense of "probability matching".
[0035] The Bayesian prior-based targeted exploration strategy is an active exploration method that differs from random exploration. According to this embodiment, in exploration mode, a Bayesian prior-based targeted exploration strategy is adopted, aggregating global prior knowledge from all scenarios and selecting the node with the highest global prior benefit as the target node.
[0036] The strategy includes the following steps: 1. Aggregate the historical revenue data of each candidate node under all context scenarios, and calculate the global prior expected revenue of each candidate node; For each candidate node, its revenue data across all scenarios is weighted and aggregated to calculate the node's global prior expected revenue. The aggregation method can be a simple arithmetic average or a weighted average based on the similarity between the scenario and the current context.
[0037] 2. Select the candidate node with the highest global prior expected return as the target node for exploration. Although the node with the highest global prior benefit lacks sufficient data support in the current specific scenario, it has been proven to perform well globally and has the highest exploration value.
[0038] 3. After execution, the revenue data obtained in this exploration will be used to update the global prior distribution of the node.
[0039] After the target node is completed, the benefit data obtained in this exploration is not only used to update the model parameters of the current scene, but also to update the global prior distribution of the node, so that the global prior knowledge is continuously enriched and optimized as the exploration progresses.
[0040] The hybrid decision-making mechanism in this embodiment comprises a utilization mode (Thompson sampling) and an exploration mode (Bayesian prior-oriented exploration). Their synergistic relationship is as follows: the utilization mode, based on historical knowledge of the current scene, selects nodes using probabilistic sampling to achieve meticulous refinement, i.e., making optimal decisions in familiar scenarios; the exploration mode, guided by global prior knowledge, selects nodes in a targeted manner to achieve expansion, i.e., efficiently acquiring new knowledge in unfamiliar scenarios. Confidence-driven mode switching acts as a bridge connecting the two, dynamically determining which strategy to adopt based on the sufficiency of knowledge in the current scene, forming a complete perception-judgment-decision-feedback closed loop.
[0041] According to this embodiment, the process of executing the target node specifically includes: 1. Identify node type: The core module of the process engine identifies the type of the node (such as manual task node, automatic service node, sub-process node, waiting node, or end node, etc.) based on the type information carried in the target node identifier. 2. Invoke the matching executor: Based on the identified node type, the core module of the process engine searches for and invokes the node executor that matches that type from the node executor library; Each node executor encapsulates the common logic required to execute a type of node, including the creation of node instances, the assembly of input parameters, the triggering of business logic, the recording of execution status, and the collection of output results.
[0042] 3. Execute node business logic: The node executor executes the specific business logic corresponding to the node; For example, for automated service nodes, the executor calls the pre-configured service implementation class or the API interface of the external system; for manual task nodes, the executor generates a task to be done and suspends the process instance, waiting for the user to complete the operation before resuming execution through a callback mechanism.
[0043] 4. Collect execution results: After a node finishes execution, the node executor collects the execution effect data of that node.
[0044] The execution effect data includes whether the execution was successful, the generated business output, the time consumed, and any exception information. This execution effect data is stored in association with the context information of the current process instance, providing a data foundation for subsequent feedback and update steps.
[0045] In existing static process engines, the execution order of nodes is entirely determined by the fixed topology defined in the BPMN process definition. The engine simply needs to execute each node sequentially according to the predefined connection order. However, in this embodiment, the target node is not predetermined but is calculated in real-time by the hybrid optimization decision-maker after the previous node has been executed. Therefore, the core module of the process engine needs to have the ability to dynamically load and execute target nodes determined at runtime. After executing the current node, the core module does not immediately jump to a fixed path but actively calls the hybrid optimization decision-maker to obtain the identifier of the next node, and then dynamically loads the corresponding node executor based on this identifier. This "execution-decision-re-execution" cyclical mode is the key mechanism that distinguishes this application from existing static process engines.
[0046] The execution effect of a process is a quantitative indicator that measures the quality of the execution results of a target node. It reflects whether the selected node brings positive business benefits in the current context. The specific definition of execution effect varies depending on the application scenario and business objectives, but it generally follows the following principle: the execution effect of a node should be positively correlated with the ultimate business objectives of the business process (such as improved order conversion rates, increased customer satisfaction, reduced processing costs, and fewer risk events).
[0047] In different business scenarios, the effectiveness of the process execution can be quantified using one or more of the following methods. In e-commerce order processing scenarios, effectiveness indicators may include: whether the order was successfully completed, whether returns or complaints occurred, order processing time, logistics costs, profit margin, etc. For example, if the order is fulfilled smoothly without complaints, the effect is positive; if returns or complaints occur, the effect is negative. In loan approval scenarios, effectiveness indicators may include: whether the loan is repaid on time (positive benefit) or if overdue / default occurs (negative benefit), approval processing time, etc. Preferably, the effectiveness of the process execution is normalized into a numerical benefit signal with a value range of [-1, 1] or [0, 1], so that the benefit values between different node types and different scenarios are comparable.
[0048] In this embodiment, the execution effect of the target node is used as a feedback signal to update the decision model parameters of the context scenario and its parent-level scenarios, enabling the model to more accurately select the optimal target node in similar decision scenarios in the future. This update process follows the basic principles of reinforcement learning, namely, positive feedback (high reward) enhances the probability of the decision behavior that results in that reward, while negative feedback (low reward) reduces the probability of the decision behavior that results in that reward.
[0049] In the multi-armed gambling machine model described above, the model parameters are the profit distribution parameters of each candidate node in each scenario.
[0050] Preferably, for the utilization mode using Thompson sampling, the update specifically involves updating two parameters of the beta distribution: if the execution effect is positive, the α parameter of the node is increased (success count +1); if the execution effect is negative, the β parameter of the node is increased (failure count +1). Through this incremental parameter update, the node's revenue distribution will be continuously optimized based on historical feedback, making the sampled values increasingly reflect the node's true expected revenue.
[0051] The specific execution method for cross-level feedback updates is as follows: (a) Current scenario update: Based on the feedback signal, update the decision model parameters corresponding to the context scenario according to the first update ratio (e.g., 100% or complete value); Since the current scenario is the one most directly related to this decision, its parameter update range should be the largest.
[0052] (b) Parent-level scene update: Based on the feedback signal, update the decision model parameters corresponding to the parent-level scene of the context scene according to the second update ratio; The parent-level scenario refers to the next higher-level cluster to which the current scenario belongs in the hierarchical clustering structure. During hierarchical clustering, a clustering tree (tree diagram / phylogenetic tree) is generated. Leaf nodes represent the finest-grained context scenarios, while parent nodes represent coarser-grained scenarios that further aggregate these fine-grained scenarios. For example, in an e-commerce scenario, the fine-grained scenarios "New User - High-Value Digital Products" and "New User - High-Value Home Appliances" can be aggregated into the parent scenario "New User - High Value," which can then be further aggregated into the higher-level "New User" scenario.
[0053] The second update ratio is less than the first update ratio, preferably 50% to 80% of the first update ratio, that is, if the current scene parameter increases by one unit, the parent scene parameter increases by 0.5 to 0.8 units.
[0054] (c) Multi-level backtracking update: The feedback signal can continue to backtrack and update the parameters of the ancestor scene at a higher level according to the progressively decreasing ratio, until the root node.
[0055] The aforementioned cross-level feedback update steps achieve cross-level knowledge transfer. The feedback signal is not only used to update the model parameters of the current context scene, but also to retrospectively update the model parameters of its parent scene according to a certain proportion. For example, the update proportion of the current scene is 100%, the parent scene is 60%, the grandparent scene is 30%, and the great-grandparent scene is 10%. The specific proportion can be exponentially or linearly decayed according to the scene hierarchy distance.
[0056] The updated parameters include the payout distribution parameters (i.e., the α and β parameters of the beta distribution) of candidate nodes in the gambling machine model corresponding to each level of scenario, as well as the fine-tuning of the scenario's core center vector.
[0057] The aforementioned cross-level feedback update mechanism accelerates the learning of new scenarios. When a new scenario first appears, its historical data is scarce or even zero (cold start problem). By inheriting the updated parameters from the parent scenario, the new scenario can quickly obtain an initial model with some reference value, avoiding the inefficient process of learning from scratch. For fine-grained scenarios with limited data, relying solely on the scenario's own feedback signals for learning can easily lead to model overfitting or instability. This embodiment introduces the data knowledge from the parent scenario in a certain proportion, which is equivalent to applying a regularization constraint to the model of the fine-grained scenario. This prevents the decisions of the fine-grained scenario from relying too much on a small amount of sporadic feedback, improving the model's generalization ability and stability. Furthermore, when multiple fine-grained scenarios share the same parent scenario, successful experiences gained in one scenario can be indirectly transferred to other sibling scenarios through the parent scenario, thereby achieving efficient knowledge transfer between different but similar scenarios.
[0058] The feedback update step is performed after each node execution and before the next round of routing decision-making begins. Specifically, each decision-making cycle includes the following process: execute the current node and collect context → dynamically decide and select the target node → execute the target node → update model parameters with feedback → the target node of the previous round becomes the new current node, and execution continues. In this cyclical mechanism, the feedback signal is updated before the next round of decision-making begins, ensuring that the model used in the next round has absorbed the execution experience of the previous round, achieving true online incremental learning. As process instances are continuously executed, model parameters are continuously optimized, and the system's decision-making capabilities gradually improve, achieving an adaptive effect of "becoming smarter with use." It should be noted that for business scenarios with delayed feedback, the feedback update can be postponed until the feedback signal is actually generated, but the update timing still follows the principle of "completing the update before the next round of decision-making after receiving feedback." During the delayed feedback period, the model parameters are not updated temporarily; an incremental update is performed after the feedback data arrives.
[0059] This application also provides a system for executing dynamic decision-making processes, wherein the system implements the above-described method for executing dynamic decision-making processes during operation.
[0060] like Figure 3 As shown, the system includes: a process definition module 110, a process engine core module 120, a context management module 130, a hybrid optimization decision-maker (dynamic routing decision-maker) module 140, a node executor library 150, and an offline learning module 160.
[0061] The process definition module 110 is used to store and manage initial process definitions, which at least include a starting node and a reference identifier to the hybrid optimization decision maker.
[0062] The core module 120 of the process engine is used to create and manage the lifecycle of process instances, driving the execution and switching of the current active node.
[0063] The context management module 130 is used to collect the context information of the process instance running at the current active node.
[0064] The hybrid optimization decision-maker module 140 is used to receive the context information and perform dynamic routing decisions. It integrates a scene matching unit 141, a confidence calculation unit 142, a mode switching unit, a decision execution unit, and a feedback update unit 145.
[0065] The scene matching unit 141 is used to map the context information to a pre-constructed context feature space to determine the context scene to which it belongs.
[0066] The confidence calculation unit 142 is used to calculate the matching confidence of the context information and the context scene.
[0067] The mode switching unit is used to dynamically switch between exploitation mode and exploration mode based on the relationship between the matching confidence level and a preset threshold. The matching confidence level is used to measure the similarity or matching reliability between the current real-time context information and the matched predefined context scene. A high confidence level means that the current situation highly conforms to historical experience patterns, while a low confidence level means that the current situation is relatively unfamiliar or on the edge of a known scene.
[0068] Preferably, the decision-making mechanism of the mode switching unit is as follows: when the matching confidence is higher than a preset high confidence threshold, the utilization mode is selected; when the matching confidence is lower than a preset low confidence threshold, the exploration mode is selected; when the matching confidence is between the high confidence threshold and the low confidence threshold, the utilization mode or the exploration mode is randomly selected according to the probability corresponding to the matching confidence.
[0069] According to a preferred embodiment, the decision execution unit includes a Thompson sampling execution unit 143 and a Bayesian prior exploration unit 144. When switching to the exploitation mode, the Thompson sampling execution unit 143 employs a Thompson sampling strategy to select a target node from candidate nodes corresponding to the context scenario. When switching to the exploration mode, the Bayesian prior exploration unit 144 employs a Bayesian prior-based directed exploration strategy, aggregating global prior knowledge from all scenarios and selecting the node with the highest global prior benefit as the target node.
[0070] The feedback update unit 145 is used to update the decision model parameters of the context scenario and its parent-level scenario based on the process execution effect of the target node.
[0071] The node executor library 150 contains various types of node executors for loading and executing the processes of the target node.
[0072] The offline learning module 160 is used to perform the pre-construction of the context feature space and the initialization of the decision model parameters based on historical process execution data.
[0073] Regarding the system in the above embodiments, the specific manner in which each unit module performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.
[0074] Example 1 Example 1 aims to demonstrate the application of a dynamic process decision-making system in e-commerce order processing business scenarios.
[0075] 1. Initial preparation and offline learning (pre-construction of context feature space) First, the offline learning module loads the execution data of historical orders, including: Contextual information: order amount, user level, product category, shipping address complexity, etc. Node execution effect data: Business results brought about by the nodes executed in the process (such as "manual review", "automatic review", "fast delivery"), such as whether the contract was successfully fulfilled, whether a complaint was generated, and the final profit.
[0076] Subsequently, based on this historical data, hierarchical clustering is performed using a joint metric of contextual information similarity and node execution performance data. For example, the clustering may result in the following representative contextual scenarios: C1 (High Risk - High Value): Characterized by {high amounts, new users, digital products} C2 (Low Risk - Standard): Characterized by {low transaction amount, long-term customers, daily necessities} C3 (New User - Promotional Items): Characterized by {low to medium spending amount, new user, promotional item category} These scenarios together constitute a tree-like hierarchical context feature space.
[0077] At the same time, a multi-armed gambling machine model is initialized for each scenario, with each "arm" corresponding to... Optional nodes, such as "manual review", "automatic review (with additional risk control)", "fast delivery", and "issuance of gift coupons", have initial parameters that reflect the prior revenue of each node in historical data.
[0078] 2. Online process dynamic decision-making When a new order enters the system, the online execution process is as follows: Step 1: Load the initial process definition and execute the current active node; The process definition module creates a process instance based on an initial process definition, which is very simple and contains only a "Start" node and a reference to the hybrid optimization decision maker.
[0079] After executing the "Start" node, the process engine collects the context information of the current active node through the context management module, {Amount: High; User Level: New; Category: Digital}.
[0080] Step 2: Hybrid optimization decision-making system makes decisions The process engine inputs the collected context information into the hybrid optimization decision-maker module, which then performs the following operations: a) Determine the context scene using the scene matching unit Specifically, the context information of the current active node is mapped to a pre-constructed context feature space, and the context information of the current active node is determined to be most similar to scenario C1 (high risk - high value) through approximate nearest neighbor search.
[0081] b) Calculate the matching confidence using the confidence calculation unit. Calculate the matching confidence between the current context information and the core features of scenario C1. For example, since the user is a "new user", their behavior pattern is somewhat different from that of a typical user in scenario C1. Therefore, the calculated matching confidence (e.g., 0.65) is at a medium level.
[0082] c) Dynamically select the mode using the mode switching unit. Suppose that the high confidence threshold θ_high is set to 0.8 and the low confidence threshold θ_low is set to 0.5. Since the current matching confidence of 0.65 is between the two, the mode switching unit randomly selects either the exploit mode or the exploration mode.
[0083] d) Determine the target node using the decision execution unit. Case A (This execution has entered the exploitation mode): The Thompson sampling execution unit adopts the Thompson sampling strategy to sample a benefit value for each of the optional nodes in scenario C1 ("manual review", "automatic review", etc.). Assuming that the "manual review" node has the highest benefit value, it is determined as the target node.
[0084] Case B (This execution has entered exploration mode): The Bayesian prior exploration unit aggregates historical revenue data from multiple context scenarios (such as C1, C2, C3), constructs a global Bayesian prior distribution, and calculates the prior expected revenue of each node. If it is found that the "automatic review (with additional risk control)" node has excellent historical performance in similar scenarios (such as C3) and its prior expected revenue is the highest, then it is identified as the target node.
[0085] Step 3: Execute the process at the target node and update the model parameters based on the feedback. The core module of the process engine receives the target node instructions (e.g., "automatic review (with additional risk control)" in this case) from the hybrid optimization decision-maker, dynamically loads and executes the process of the target node from the node executor library.
[0086] After the process at the target node is completed, collect the process execution results (e.g., the order quickly passed risk control and completed payment, there was no fraud, the profit was considerable, and it was rated as high return).
[0087] The feedback and update module performs the following operations based on the feedback data of the target node's process execution effect: Update the model parameters for the current context scenario C1, for example, significantly improve the expected revenue of the "Automatic Review (with Additional Risk Control)" node in scenario C1; The system backtracks and updates the model parameters of the parent-level clustering scenario. Since scenario C1 may belong to a broader parent scenario (such as "high-value orders"), the system will use the feedback benefit signal from this feedback to update the model of that parent scenario according to a preset ratio (such as 50%). This allows knowledge to be gained from this exploration even in orders that do not match C1 precisely but match its parent scenario.
[0088] Step 4: Looping and Optimizing By repeating the above steps, when encountering "new user high-value digital orders" with similar characteristics, the probability of being selected will be greatly increased because the model parameters of the "automatic review (with additional risk control)" node have been optimized. Through continuous looping of "decision-execution-feedback-update", a dynamic process that becomes smarter with use is achieved. While ensuring risk control, unnecessary manual review is gradually reduced, and efficiency and accuracy are precisely optimized in a coordinated manner.
[0089] Based on the same inventive concept, this application also provides an electronic device, including: a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to implement the above-described method for executing dynamic decision-making processes.
[0090] Based on the same inventive concept, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, wherein when the computer program is executed by a processor, it implements the above-described method for executing dynamic decision-making processes.
[0091] While the foregoing discussion includes several specific implementation details, these should not be construed as limiting the scope of this application. The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept.
[0092] Those skilled in the art should also understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for executing a dynamic decision-making process, characterized in that, The method includes: Load the initial process definition, which at least includes a start node and a reference identifier to the hybrid optimization decision-maker; Execute the process of the currently active node and collect the context information of the process running in the currently active node; The context information is input into the hybrid optimization decision-maker, triggering the hybrid optimization decision-maker to perform the following operations: The context information is mapped to a pre-constructed context feature space to determine the context scene to which it belongs; Calculate the matching confidence score between the context information and the context scene; Based on the relationship between the matching confidence level and the preset threshold, dynamically switch to exploitation mode or exploration mode; If switched to exploitation mode, the Thompson sampling strategy is used to select the target node from the candidate nodes corresponding to the context scenario; If switched to exploration mode, a Bayesian prior-based directional exploration strategy is adopted, which aggregates global prior knowledge of all scenarios and selects the node with the highest global prior benefit as the target node. Execute the process of the target node, and update the decision model parameters of the context scenario and its parent-level scenario based on the execution effect of the target node's process.
2. The method according to claim 1, characterized in that, The context feature space is obtained by hierarchical clustering of historical process execution data. The hierarchical clustering is used to divide the historical context samples into multiple scene clusters, each scene cluster corresponds to a context scene, and a set of decision model parameters is maintained independently for each scene cluster.
3. The method according to claim 1, characterized in that, The step of dynamically switching between exploitation mode and exploration mode based on the relationship between the matching confidence level and a preset threshold includes: Set a high confidence threshold θ_high and a low confidence threshold θ_low, where θ_high > θ_low; When the matching confidence is higher than the high confidence threshold θ_high, the hybrid optimization decision-maker switches to the utilization mode; When the matching confidence is lower than the low confidence threshold θ_low, the hybrid optimization decision-maker switches to exploration mode; When the matching confidence level is between the high confidence threshold θ_high and the low confidence threshold θ_low, the utilization mode or exploration mode is randomly selected according to the probability corresponding to the matching confidence level.
4. The method according to claim 3, characterized in that, The step of randomly selecting the utilization mode or exploration mode according to the probability corresponding to the matching confidence level includes: Using the matching confidence level as the probability value for selecting the utilization mode and (1 - the matching confidence level) as the probability value for selecting the exploration mode, a random sampling decision is made.
5. The method according to claim 1, characterized in that, The step of employing the Thompson sampling strategy to select the target node from the candidate nodes corresponding to the context scene includes: Maintain a beta distribution as the revenue distribution for each candidate node corresponding to the context scenario; Sample a payoff value from the beta distribution of each candidate node; The candidate node with the largest sampling benefit value is selected as the target node.
6. The method according to claim 1, characterized in that, The proposed method employs a Bayesian prior-based targeted exploration strategy, aggregating global prior knowledge from all scenarios and selecting the node with the highest global prior benefit as the target node. This includes: Aggregate the historical revenue data of each candidate node in all context scenarios, and calculate the global prior expected revenue of each candidate node; The candidate node with the highest global prior expected return is selected as the target node for exploration. After execution, the revenue data obtained from this exploration will be used to update the global prior distribution of this node.
7. The method according to claim 1, characterized in that, The step of updating the decision model parameters of the context scenario and its parent-level scenarios based on the process execution effect of the target node includes: Using the process execution effect of the target node as a feedback signal, the decision model parameters corresponding to the context scenario are updated according to the first update ratio; The decision model parameters corresponding to the parent-level scene of the context scene are updated according to the second update ratio, where the second update ratio is less than the first update ratio. The parent-level scene is the next higher-level scene cluster to which the context scene belongs when performing hierarchical clustering and backtracking.
8. A system for executing a dynamic decision-making process, wherein the system implements the method as described in any one of claims 1-7 during operation, characterized in that, The system includes: The process definition module is used to store and manage the initial process definition, which at least includes a start node and a reference identifier to the hybrid optimization decision-maker. The core module of the process engine is used to create and manage the lifecycle of process instances, driving the execution and switching of the current active node; The context management module is used to collect the context information of the process instance running at the current active node; The hybrid optimization decision-maker is used to receive the context information and perform dynamic routing decisions. It integrates a scene matching unit, a mode switching unit, a decision execution unit and a feedback update unit. The scene matching unit is used to map the context information to a pre-constructed context feature space, determine the context scene to which it belongs, and calculate the matching confidence between the context information and the context scene. The mode switching unit is used to dynamically switch to utilization mode or exploration mode according to the relationship between the matching confidence and the preset threshold. The decision execution unit is used to select a target node from the candidate nodes corresponding to the context scenario by adopting the Thompson sampling strategy when switching to the utilization mode; and to adopt a Bayesian prior-based directional exploration strategy when switching to the exploration mode, aggregating the global prior knowledge of all scenarios and selecting the node with the highest global prior benefit as the target node. The feedback update unit is used to update the decision model parameters of the context scenario and its parent-level scenario based on the process execution effect of the target node. The node executor library contains various types of node executors for loading and executing the processes of the target node; The offline learning module is used to pre-build the context feature space and initialize the decision model parameters based on historical process execution data.
9. An electronic device, characterized in that, include: Memory and processor; Memory is used to store computer programs; The processor is used to execute the computer program to implement the method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.