A dual-engine collaborative method and system for intelligent agents and workflows in enterprise scenarios

By generating a hybrid execution topology and a tokenized state interlocking protocol, the decision weights of workflows and agents are dynamically adjusted, resolving the contradiction between flexibility and determinism in enterprise-level task execution and realizing a collaborative strategy with high adaptability, traceability, and resource optimization.

CN123114593APending Publication Date: 2026-11-17HAIKAI WISDOM (BEIJING) TECHNOLOGY SERVICES CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202611345841.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies cannot dynamically balance the flexible decision-making capabilities of intelligent agents with the deterministic execution logic of workflows during enterprise-level task execution, resulting in poor task execution controllability, low state consistency, and the inability of collaborative strategies to adaptively optimize.

Method used

A hybrid execution topology graph is generated by a dual-mode task deconstructor, which parses enterprise tasks into alternating fixed workflow segments and agent decision slots. State synchronization and conflict arbitration are achieved through a tokenized state interlocking protocol. The node collaboration strategy is updated online using a backtracking optimizer, which either downgrades low-value decision slots to fixed workflow segments or upgrades them to agent decision slots.

Benefits of technology

It achieves a balance between high adaptability and strong compliance in enterprise task execution, ensuring state consistency and traceability, reducing unnecessary agent calls, and optimizing the utilization of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114593A_ABST
    Figure CN123114593A_ABST
Patent Text Reader

Abstract

This invention discloses a dual-engine collaborative method and system for intelligent agents and workflows in enterprise scenarios. It includes using a dual-mode task deconstructor to parse enterprise task inputs into a hybrid execution topology graph, with each decision slot and workflow segment explicitly associated through semantic anchors; using a tokenized state interlocking protocol to synchronize states and arbitrate conflicts by exchanging execution lock tokens and decision lock tokens; and using a backtracking optimizer to update the node collaboration strategy in the hybrid execution topology graph online based on the execution path value. This invention generates a hybrid topology graph through a dual-mode task deconstructor, ensures consistency of heterogeneous engine states through a tokenized interlocking protocol, and enables dynamic migration of node affiliation through a backtracking optimizer. These three elements work together to form a complete closed loop. This solution achieves, for the first time in enterprise-level task execution, an organic unity of flexible decision-making and rigid execution, solving the technical challenge of balancing flexibility and determinism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of enterprise digitalization and artificial intelligence collaborative computing technology, and in particular to a dual-engine collaborative method and system for intelligent agents and workflows in enterprise scenarios. Background Technology

[0002] With the advancement of enterprise digital transformation, business process automation has become a key means to improve operational efficiency. Currently, enterprise-level task execution mainly relies on two types of technical paths: rule-based workflow engines and large-model-based agents.

[0003] Traditional workflow engines (such as Activiti and Camunda) use predefined flowcharts and deterministic rules to break down enterprise business processes into a series of ordered nodes, which are then executed sequentially by the system or manually. The advantages of this approach are high controllability of the execution process, traceability of status, and compliance with audit requirements, making it suitable for standardized and repetitive enterprise scenarios such as financial approvals, procurement requests, and contract processing. However, its limitations are equally significant: it cannot handle undefined exceptions in the process, lacks the ability to understand unstructured information (such as email content and chat logs), and struggles to cope with complex tasks requiring dynamic decision-making.

[0004] Intelligent agent technology, centered on large language models, utilizes autonomous planning, tool use, and memory mechanisms to understand natural language instructions, dynamically decompose tasks, and invoke external APIs to complete operations. This technology excels in handling scenarios with high uncertainty and requiring semantic understanding and flexible response (such as customer service Q&A, email classification, and anomaly attribution). For example, existing patents have proposed multi-agent-based task processing methods that parse tasks into multiple task nodes and dynamically invoke corresponding intelligent agents for execution. However, intelligent agents exhibit significant shortcomings in long-cycle, multi-role, and highly compliant enterprise environments: decision-making processes lack deterministic guarantees, and behavior is unpredictable; state management is loose, making it difficult to meet audit traceability requirements; and concurrent execution by multiple intelligent agents can easily lead to resource contention and data inconsistencies.

[0005] In recent years, some researchers and companies have attempted to combine workflows with intelligent agents, resulting in two main collaborative models: (1) Workflow Invocation Agent Mode: An agent invocation is embedded at a certain node of the workflow, and a specific subtask is handled by the agent. For example, Chinese patent CN118691231B discloses a workflow operation method based on multi-agent and human-machine collaboration, which breaks down the business scenario into workflow tasks and constructs a workflow model. During the workflow execution, the agent node performs human-machine collaboration and business review, and updates the global state. Although this scheme gives the workflow a certain degree of flexibility, there is still a lack of a unified state management mechanism between agent nodes and workflow nodes, which can easily lead to context loss or state drift.

[0006] (2) Agent-invoking workflow mode: During the autonomous planning process, the agent delegates some deterministic steps to the workflow engine for execution. For example, Chinese patent CN122111588A discloses a multi-agent AI interaction method and system based on intelligent scheduling and workflow integration. By establishing a connection between the front end and the execution end, it supports parallel / sequential collaboration and iterative loops among multiple sub-agents. Although this mode can leverage the standardization advantages of workflow, the planning results of the agent are often not fixed, making it difficult for workflow instances to be precisely aligned with the agent's dynamic decision-making path, increasing the complexity of execution tracing and anomaly backtracking.

[0007] Regarding state pipelines, Chinese patent CN122044773A discloses a workflow loop execution method based on cyclic sub-workflow binding. This method addresses the issues of high logical coupling and poor reusability in agent workflows handling complex iterative tasks, as well as data state pollution and consistency failures caused by the lack of physical isolation and dynamic synchronization mechanisms for intermediate variables during loop execution. It implements heterogeneous workflow definitions through type fields and establishes pointer-based decoupling bindings in conjunction with sub-flow identifiers. However, this method primarily addresses the state management problem within a single agent workflow and does not address the collaboration and state synchronization between the workflow engine and the agent engine, two heterogeneous execution entities.

[0008] Regarding self-evolution, Chinese patent CN122114043A discloses a method and system for implementing self-evolutionary learning of intelligent agents, which improves capabilities through the self-evolutionary learning of intelligent agents. This technology mainly focuses on the evolution of the intelligent agent itself, rather than the optimization of the collaborative strategy between the intelligent agent and the workflow.

[0009] A comprehensive analysis of the existing technologies reveals the following common problems: 1. Existing solutions cannot dynamically balance the agent's "flexible decision-making ability" and the workflow's "rigid execution logic" during the execution of the same task. Both are either completely dominated by the agent (leading to uncontrollable behavior) or completely hard-coded by the workflow (unable to cope with uncertainty), lacking a mechanism that can adaptively allocate decision weights according to task characteristics. Although existing solutions have attempted to combine the two, they are all simple combinations of "serial calls" and have failed to achieve deep structural integration and collaboration.

[0010] 2. The workflow engine and the agent engine each have their own independent state machine, context storage, and execution semantics. When switching between the two, existing technologies lack standardized state transfer and consistency guarantee protocols. Existing state management solutions are mainly designed for homogeneous agent workflows and cannot solve the problem of cross-state synchronization between heterogeneous engines. This leads to frequent issues such as data races, state loss, and duplicate execution, seriously affecting the reliability of enterprise-level tasks.

[0011] 3. In existing solutions, the collaboration methods between workflows and agents (such as which node is executed by whom and when the switch occurs) are pre-configured and fixed. The system cannot automatically optimize the collaboration strategy based on historical execution results. Although there are technologies for agent self-evolutionary learning, the object of evolution is the agent's own capability parameters, rather than the dynamic switching mechanism of node affiliation between workflows and agents. This leads to frequent "pseudo-intelligent decisions" that continuously consume computing resources, while some fixed nodes that should be intelligent execute rigidly for a long time.

[0012] Therefore, this invention aims to provide a dual-engine collaborative method and system for intelligent agents and workflows in enterprise scenarios, in order to solve the problems of poor task execution controllability, low state consistency, and inability to adaptively optimize collaborative strategies caused by the inability to effectively coordinate the flexible decision-making capabilities of intelligent agents and the deterministic execution logic of workflows in the prior art. Thus, it can simultaneously achieve high adaptability, traceability, and deterministic resource scheduling in the execution of complex enterprise-level tasks. Summary of the Invention

[0013] The technical problem solved by this invention is to provide a dual-engine collaborative method and system for intelligent agents and workflows in enterprise scenarios.

[0014] This application provides a dual-engine collaborative method for intelligent agents and workflows in enterprise scenarios, including the following steps: S1: The dual-mode task deconstructor parses the enterprise task input into a hybrid execution topology graph consisting of alternating fixed workflow segments and agent decision slots, where each decision slot and workflow segment are explicitly associated through semantic anchors. S2: Based on the tokenized state interlocking protocol, the workflow engine and the agent engine can synchronize states and arbitrate conflicts by exchanging execution lock tokens and decision lock tokens during execution. S3: After the task is completed, the backtracking optimizer updates the node collaboration strategy in the hybrid execution topology graph online according to the execution path value score. Low-value decision slots are downgraded to fixed workflow segments, or high-value fixed workflow segments are upgraded to agent decision slots, and the changes take effect within the enterprise's predefined constraints.

[0015] This application also provides a dual-engine collaborative system of intelligent agents and workflows for enterprise scenarios, comprising the following components: A dual-mode task deconstructor is used to parse enterprise task inputs into a hybrid execution topology graph consisting of alternating fixed workflow segments and agent decision slots, where each decision slot is explicitly associated with a workflow segment via semantic anchors. The tokenized state interlocking layer connects the workflow engine and the agent engine, and is used to synchronize states and arbitrate conflicts by exchanging execution lock tokens and decision lock tokens. The backtracking optimizer is used to update the node collaboration strategy in the hybrid execution topology graph online based on the execution path value. It can downgrade low-value decision slots to fixed workflow segments or upgrade high-value fixed workflow segments to agent decision slots, and take effect within the enterprise's predefined constraints.

[0016] Compared to existing technologies, this invention uses a dual-mode task deconstructor to parse the hybrid execution topology of enterprise task inputs, achieving a formal separation and organic integration of a "rigid skeleton" and "flexible decision points." Fixed workflow segments ensure the rigid execution of the core compliance path, while the agent decision slot provides adaptive decision-making capabilities to uncertainty. Both coexist in the same hybrid topology and are connected through semantic anchors, enabling dynamic allocation of decision weights based on business characteristics during task execution, simultaneously meeting the dual requirements of high adaptability and strong compliance. By generating triple tokens for each node in the hybrid execution topology and establishing a cross-locking mechanism where the workflow engine holds the execution lock token and the agent engine holds the decision lock token, deterministic collaboration between the two heterogeneous state machines is achieved. After execution, either engine must submit a state proof, which must be verified by the interlocking layer before releasing the token and switching execution rights, ensuring state consistency and traceability at the protocol level. Furthermore, the timeout recovery mechanism and the design of immutable audit logs further enhance the system's fault tolerance and compliance support capabilities. Through a backtracking optimizer, the system updates the node collaboration strategies in the hybrid execution topology graph online based on the execution path value score. The system can identify frequently occurring "pseudo-intelligent decisions" (i.e., agents repeatedly making the same decisions with value scores lower than fixed rules), automatically downgrading them to fixed workflow segments, thereby reducing unnecessary agent calls and lowering computational resource consumption. Simultaneously, for fixed workflow segments with large input state variance and multiple reasonable output paths, the system can upgrade them to agent decision slots, enhancing adaptability to complex scenarios. This mechanism achieves continuous optimization and evolution of process assets while preserving the enterprise's immutable constraints. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention.

[0018] Figure 1 This is a flowchart of the intelligent agent and workflow dual-engine collaborative method for enterprise scenarios according to the present invention; Figure 2 This is a flowchart of step S1 of the present invention; Figure 3 This is an interaction timing diagram of the token exchange protocol in step S2 of the present invention; Figure 4 This is a structural block diagram of the intelligent agent and workflow dual-engine collaborative system for enterprise scenarios according to the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0020] Example 1 like Figures 1 to 3 As shown, the intelligent agent and workflow dual-engine collaborative method of the present invention for enterprise scenarios includes the following steps: S1: Hybrid execution topology graph generation The dual-mode task deconstructor parses enterprise task inputs into a hybrid execution topology graph consisting of alternating fixed workflow segments and agent decision slots, where each decision slot is explicitly associated with a workflow segment through semantic anchors. Specifically, this step includes the following parts: S11: Utilize a large language model (which can employ public cloud APIs such as GPT-4, Wenxin Yiyan, and Tongyi Qianwen, or locally deployed open-source models such as Llama 3, ChatGLM, and Qwen) to identify the business objectives, constraints, and expected outputs of enterprise task inputs, and output an intent vector. For example, taking the enterprise task input "Process the amount difference of invoice number INV-2025-001; automatically adjust if the difference is less than 5%, and negotiate with the supplier if the difference is greater than 5%": The large language model outputs the business objective Goal = "Resolve the inconsistency between the invoice amount and the order amount", outputs the constraint list Constraints = {Difference threshold: 5%, Allowed actions: [Automatic adjustment, Negotiation], Compliance requirements: [Retain negotiation logs]}, and outputs the expected output OutputSpec = "Final adjusted amount or negotiation conclusion". The above business objective is then encoded into a fixed-length intent vector. ,in For vector dimensions.

[0021] S12: Match the intent vector with workflow segments in the enterprise's predefined process asset library. Each workflow segment has an entry semantic anchor and an exit semantic anchor. The process asset library is stored in the form of a graph database (such as Neo4j) or a vector database (such as Milvus), which supports efficient semantic similarity retrieval.

[0022] Suppose the process asset library contains N workflow fragments. Each workflow segment It has: entry semantic anchor vector (Describe the business state that this segment is suitable for processing), exit semantic anchor vector (Describe the business status after the segment is completed), internal node sequence (such as deterministic steps like "verify if the invoice exists", "calculate the percentage difference", "send approval request", etc., stored in BPMN or DSL format); the path matching module calculates the intent vector. anchor vectors of each workflow segment entry point Cosine similarity between them:

[0023] Selecting samples with similarity greater than a preset threshold The set of candidate workflow segments:

[0024] in, Typical value .

[0025] S13: Identify uncertainty gaps between or within matched workflow segments, instantiate an agent decision slot for each gap, and alternately connect workflow segments and agent decision slots according to task logic order to generate the hybrid execution topology graph; For candidate workflow segments, check adjacent segments. and The connection between them. If one of the following conditions is met, then an uncertainty gap is determined to exist: (1) Export semantic anchor vector With the entry semantic anchor vector There are multiple possible paths. For example, in the "Invoice Difference Processing" scenario, after the "Calculate Difference Percentage" node, depending on the difference rate, there may be two paths: "Automatic Adjustment" and "Contact Supplier for Negotiation". Which path is taken depends on the specific value of the difference rate, which cannot be predicted before the task is executed. (2) The input parameters of a certain step in the business objective obtained after parsing the enterprise task input cannot be derived from deterministic rules.

[0026] Let the set of identified gaps be... For each gap Instantiate an agent decision slot Its definition is:

[0027] in: The input context is the set of output variables from the step preceding the gap. The decision objective is to select or generate an action while satisfying the constraint set C. The allowed action space is defined by the constraint set. The mapping is obtained.

[0028] The topology assembler alternately connects workflow fragments and agent decision slots according to the task logic sequence, forming a directed acyclic graph, which is the hybrid execution topology graph:

[0029] Where V represents the node association, and each node With type tag

[0030] ; Let be a set of directed edges, each directed edge Include semantic anchors (e.g., "Invoice verification completed → Discrepancy analysis decision slot").

[0031] S2: Based on the tokenized state interlocking protocol, the workflow engine and the agent engine can synchronize states and arbitrate conflicts by exchanging execution lock tokens and decision lock tokens during execution. Specifically, this step includes the following parts: S21: Generate a triplet token for each node in the hybrid execution topology graph. The triplet token contains a task ID, a step ID, and a semantic hash, where each node corresponds to a workflow segment executed by the workflow engine or a decision slot executed by the agent engine. The node is the starting node when a task begins execution. Generate execution lock token This is assigned to the workflow engine. The decision lock token initially held by the agent engine... .

[0032] S22: The workflow engine holds the execution lock token. The current workflow node is executed. During execution, the shared data area can be read and written, but no agent actions can be triggered. After execution, the workflow engine submits a state proof to the interlocking layer.

[0033] in, For the set of output variables of node v, For the summary function, This is the semantic hash of the node. For execution timestamp.

[0034] Interlock layer verification Recalculate And compare with the submitted value, if If the verification passes, update the state proof cache and release it. .

[0035] S23: Workflow engine detects the next node satisfy At this time, the workflow engine sends a decision lock request to the interlocking layer:

[0036] Interlock layer check condition: No lock currently held or Released and with no conflicting locks. If the condition is met, generate a decision lock token. And assign it to the agent engine, while passing the input context.

[0037] S24: The agent engine holds the decision lock token. Execution Decision Slot , generate decision-making actions During execution, the agent can modify the shared data area. After execution, the agent engine submits a decision state proof to the interlocking layer.

[0038] in: For the decision outcome, For the reasoning chain summary, List of changes to the affected data variables. For the semantic hash of this decision slot, For execution timestamp.

[0039] After submission, the agent engine returns...

[0040] Interlock layer verification Check the changed variables Does it conform to constraint set C? If the verification passes, Merge into the global state and regenerate the execution lock token. Assign to the workflow engine, and based on the decision results. Indicates the next node. The workflow engine continues executing subsequent workflow nodes.

[0041] S25: Let the timeout threshold be... (Typical value) (seconds). If any engine holds the lock for a certain period of time. The interlock layer forcibly reclaims tokens and records timeout events. All token acquisition, release, and state proofs are written to an immutable audit log.

[0042] The immutable audit log includes the following fields: timestamp, task ID, step ID, engine type (workflow / agent), operation type (acquire lock / release lock / submit proof / timeout recovery), token triple, and state proof digest. The audit log uses a blockchain-style storage structure, with each log block containing the hash value of the previous block to prevent log tampering and meet enterprise compliance audit requirements.

[0043] S3: After the task is completed, the backtracking optimizer updates the node collaboration strategy in the hybrid execution topology graph online according to the execution path value score. Low-value decision slots are downgraded to fixed workflow segments, or high-value fixed workflow segments are upgraded to agent decision slots, and the changes take effect within the enterprise's predefined constraints.

[0044] Specifically, this step includes the following parts: S31: For each pair of adjacent "fixed workflow segment - agent decision slot - fixed workflow segment" combinations in the hybrid execution topology graph, define it as a cooperative unit; S32: Calculate the collaborative value score for each collaborative unit based on the task execution success rate, time consumption, compliance score, and agent invocation cost; specifically: Let's define a task execution instance. After completion, collect the following metrics: Successful completion indicator (1 for success, 0 for failure); Total task time (seconds); Compliance score, automatically calculated by audit rules; : Agent invocation cost (including the number of inference attempts and computational resource consumption).

[0045] Let the historical average time for similar tasks be... Define the normalization time:

[0046] For collaborative units The value assessor calculates its value score:

[0047] in, Set the upper bound of the time contribution of timed-out tasks to 1. For configurable weighting coefficients, satisfying Typical values , , , .

[0048] Value points The theoretical range of values ​​is ,in This represents the maximum agent call cost that a single task may generate, with the lower limit determined by the cost item and the upper limit being the sum of all positive contributions.

[0049] S33: Perform statistical analysis on multiple execution records under the same semantic anchor point, and calculate the average value score of the agent's decision and the value score of the simulated fixed workflow segment; Set semantic anchors The corresponding decision slot is in The value sequence in this execution is: Define the average value score of the agent's decisions:

[0050] Let the most common decision outcome of this decision slot be The frequency of occurrence is:

[0051] If the decision slot is replaced with a fixed workflow segment (i.e., always executed) Simulation value is divided into Calculations are performed using historical data backtesting.

[0052] S34: When the value score of the simulated fixed workflow segment is higher than the average value score of the agent's decision and exceeds the lag threshold, the corresponding agent decision slot will be downgraded to a fixed workflow segment. When the variance of the input state of a fixed workflow segment is greater than a preset variance threshold and there are multiple reasonable output paths, the fixed workflow segment is upgraded to an agent decision slot. Set hysteresis threshold (Typical value) and frequency threshold (Typical value) Policy update executor judgment: Downgrade conditions:

[0053] When the degradation condition is met, the corresponding agent decision slot will be... It is downgraded to a workflow conditional branch node. This workflow conditional branch node is structurally and functionally identical to the fixed workflow segment; both are execution units driven by deterministic rules. Its branching rules are defined as follows:

[0054] Upgrade requirements: Set fixed workflow segments The input state variance is The preset variance threshold is .like:

[0055] Then the fixed workflow segment Upgrade to agent decision slot .

[0056] Before performing an upgrade or downgrade operation, check the corresponding semantic anchors. Whether it is marked as immutable. Define the set of immutable anchor points:

[0057] like If the operation fails, it is ignored and a skip log is recorded; otherwise, an upgrade or downgrade suggestion is generated, which takes effect after administrator confirmation or automatic confirmation, and the process asset library is updated. Immutable Anchor Point Set Semantic anchors on critical paths, such as financial approval nodes and compliance approval nodes, are predefined by enterprise administrators based on business compliance requirements and marked as immutable. The system has no authority to upgrade or downgrade these anchors. The set of immutable anchors is stored in the system configuration center and supports dynamic updates.

[0058] Example 2 This embodiment provides a dual-engine collaborative system of intelligent agents and workflows for enterprise scenarios, used to implement the above-mentioned method, such as... Figure 4 As shown, it includes the following parts: A dual-mode task deconstructor is used to parse enterprise task inputs into a hybrid execution topology graph consisting of alternating fixed workflow segments and agent decision slots, where each decision slot is explicitly associated with a workflow segment via semantic anchors. The dual-mode task destructor specifically includes: The intent extraction module is used to identify the business objectives and other relevant information from enterprise task inputs using a large language model. The module extracts the constraints and expected outputs, outputting an intent vector. This module can use large language model APIs such as GPT-4 and Wenxin Yiyan, or locally deployed open-source models (such as Llama 3 and ChatGLM). The intent extraction module outputs structured data, including business objective fields, a list of constraints, and a description of the expected outputs.

[0059] The path matching module is used to match the intent vector with the work in the enterprise's predefined process asset library. Workflow segments are matched, with each segment having an entry semantic anchor and an exit semantic anchor. The process asset library is stored in the form of a graph database (such as Neo4j) or a vector database (such as Milvus), supporting efficient semantic similarity retrieval. Each workflow segment also contains an internal node sequence (deterministic step definition), stored in BPMN or DSL format.

[0060] The topology assembler identifies uncertainty gaps and instantiates agent decision slots. For each gap, it instantiates one agent decision slot and alternately connects workflow fragments with these slots according to task logic, generating a hybrid execution topology graph. The hybrid execution topology graph is serialized and stored in JSON or YAML format for easy parsing by the execution engine.

[0061] The tokenized state interlocking layer connects the workflow engine and the agent engine, and is used to synchronize states and arbitrate conflicts by exchanging execution lock tokens and decision lock tokens. The tokenized state interlocking layer specifically includes: Token Manager: Used to generate, destroy, and verify triple tokens. The token manager uses a distributed coordination service (such as etcd, ZooKeeper) to achieve high availability deployment and ensure the atomicity of token operations.

[0062] State proof cache: Used to store a state summary of each engine after its most recent action. The state proof cache is implemented using Redis, with a TTL (e.g., 30 minutes) set to automatically clean up expired data to avoid memory overflow. The state front in the cache includes an execution timestamp, an output variable summary, and a pointer to the inference chain (stored in object storage).

[0063] The interlocking protocol engine implements a finite state machine of request-release-verification. It maintains the lock type (execution lock / decision lock / lockless), lock holder ID, and lock grant timestamp for each task. Upon receiving a token request, the engine performs state transitions according to predefined finite state transition rules based on the current state and request type.

[0064] A workflow engine is used by users to execute deterministic steps within a fixed workflow segment. Workflow engines can be further developed using open-source engines (such as Activiti, Camunda, and Flowable) to add interfaces for interaction with the interlocking layer. Before executing each node, the workflow engine needs to confirm with the interlocking layer that it holds an execution lock token; after execution, it calls the interlocking layer interface to submit state proof and release the lock token.

[0065] The agent engine is used to execute dynamic decision-making tasks in the agent's decision slots. It encapsulates the large model's calling interface and supports inference frameworks such as ReAct and CoT. Before executing a decision, the agent engine requests a decision lock token from the interlocking layer; after execution, it calls the interlocking layer interface to submit state proof (including an inference chain digest) and returns the lock token.

[0066] The backtracking optimizer is used to update the node collaboration strategy in the hybrid execution topology graph online based on the execution path value. It can downgrade low-value decision slots to fixed workflow segments or upgrade high-value fixed workflow segments to agent decision slots, and take effect within the enterprise's predefined constraints.

[0067] The backtracking optimizer specifically includes: Value evaluator: Used to calculate the value score of each collaborative unit based on task execution success rate, time consumption, compliance score, and agent invocation cost. The value evaluator periodically reads execution records from the audit log, calculates value scores in batches, and writes the results to the value score database.

[0068] Pattern mining: Used for statistical analysis of multiple execution records under the same semantic anchor point. The pattern mining uses a sliding window mechanism (e.g., the most recent 100 executions), triggering an analysis every time a preset number of similar tasks are completed (e.g., 20). The mining results include: the decision distribution of each decision slot, the average value score of the agent's decisions, the value score of the simulated fixed rule, and the variance of the input state.

[0069] The strategy update executor is used to perform upgrade or downgrade operations between decision slots and fixed workflow segments. After generating upgrade / downgrade suggestions, the strategy update executor pushes the task to be done through the enterprise's internal approval system (such as OA); if the enterprise has enabled automatic evolution mode, it will execute automatically if the conditions are met and there is no manual intervention. Before execution, the strategy update executor needs to query the immutable constraint table to confirm that the semantic anchor point is not locked.

[0070] The process asset repository stores predefined workflow segments and their entry / exit semantic anchors. It uses a graph database (such as Neo4j) as its core storage, with each workflow segment as a node, semantic anchors as node attributes, and the order relationships between segments as edges. The process asset repository supports version management; each upgrade / downgrade operation generates a new version, while historical versions are retained for rollback support.

[0071] This invention can be integrated with existing enterprise IT systems as follows: Integration with OA / ERP systems: The system executes tasks via a RESTful API, and returns the execution result via a callback interface upon completion. Integration with BPM engine: Embedded in bypass mode, workflow nodes are executed by the existing BPM engine, and decision slots are taken over by the intelligent agent engine of this invention, enabling bidirectional calls through the standardized interface of the interlock layer; Integration with data platform: Read historical execution records and execution metrics (time consumption, success rate, etc.) from the data platform for value retrospective analysis; Integration with the audit system: Token exchange records, status certificates, and upgrade / downgrade operation records are pushed to the enterprise's unified audit platform in real time via log push.

[0072] Example 3 This embodiment applies the method described in Embodiment 1 and the system described in Embodiment 2 to a scenario of handling discrepancies in enterprise invoices, in order to illustrate the actual operation of the present invention.

[0073] Scenario Description: A company's purchasing department needs to process a large number of discrepancies between supplier invoices and purchase orders daily. Traditionally, invoices with discrepancies less than 5% require manual adjustments by finance staff, while those with discrepancies greater than 5% require contacting the supplier via email for negotiation—a cumbersome and inefficient process. This invention automates and intelligently processes invoice discrepancies.

[0074] 1. Task Structure Phase Users input the task through the system interface: "Handle invoice discrepancies; for discrepancies <5%, automatic adjustment will be performed; for discrepancies ≥5%, a negotiation process will be initiated."

[0075] The dual-mode task struct performs the following operations: The intent extraction module calls the Big Prophet model and outputs: Business Goal = "Resolve discrepancies between invoice amount and order amount", constraint set .

[0076] The path matching module searches the process asset library and matches the workflow fragments. [Invoice Verification → Calculate Difference Percentage] (Entry anchor "Received Invoice Difference Task", Exit anchor "Difference Percentage Calculated"), Workflow Segment Automatic reconciliation node (entry anchor "Difference < 5%", exit anchor "Reconciliation Complete"), workflow segment Negotiation process (entry anchor point "difference ≥ 5%", exit anchor point "negotiation completed"). The topology assembler identifies an uncertainty gap between "calculate the percentage difference" and subsequent branches, implements an agent decision slot, binds the input context to the percentage difference value, and selects either "automatic adjustment" or "negotiation" as the decision target.

[0077] The final generated hybrid execution topology is: WFNode (invoice verification) → WFNode (calculate the percentage difference) → AgentSlot (path selection) → branch → WFNode (automatic reconciliation) or WFNode (negotiation) → WFNode (record results).

[0078] 2. Tokenized Collaborative Execution Phase Taking an invoice with an 8% discrepancy rate as an example: (1) The workflow engine holds the execution lock token. The workflow engine sequentially executes the "Invoice Verification" and "Calculate Difference Percentage" nodes, calculating a difference rate of 8%. Upon completion, the workflow engine submits a status certificate. ,release .

[0079] (2) The workflow engine detects the next node. satisfy (Path selection) Send a decision lock request to the interlocking layer. The interlocking layer will then send the decision lock token. Grant the agent an engine, while passing in the input context (8% difference rate).

[0080] (3) The intelligent agent engine holds The large model analysis is invoked: the difference rate is 8%, which is greater than the 5% threshold, so the "negotiation" path is selected. The agent engine generates a decision state proof. (Including the decision outcome "negotiation" and the reasoning chain summary "difference rate 8% > 5%)", return .

[0081] (4) Interlock layer verification After passing, the execution of the lock token is resumed. It is then returned to the workflow engine, along with information on the next node. (Negotiation process).

[0082] (5) The workflow engine continues to execute the "negotiation process" node, sends a negotiation request email to the supplier, and records the negotiation log.

[0083] 3. Self-evolution stage of collaborative strategies After 200 invoice discrepancy processing tasks were executed, the backtracking optimizer collected and analyzed the data: In the decision slot corresponding to the semantic anchor point, after 180 executions (difference rate <5%), the agent selected "self". "Dynamic adjustment account", 20 executions (difference rate ≥ 5%) selected "negotiation".

[0084] Average value of agent decisions .

[0085] If the decision slot is replaced with a fixed workflow segment, and the most frequent decision result is selected... As a fixed rule, its simulated value is... .

[0086] Meets the downgrade criteria: And the difference and frequency .

[0087] After confirmation by the process administrator, the policy update executor converts the decision slot into a workflow conditional branch. Node. In subsequent tasks, invoices with a discrepancy rate of less than 5% are automatically adjusted by the workflow engine without needing to invoke an intelligent agent, reducing processing costs by approximately 70%.

[0088] This invention generates a hybrid topology graph containing workflow nodes and decision slots through a dual-mode task destructor, ensures state consistency between the workflow engine and the agent engine through a tokenized interlocking protocol, and automatically downgrades high-frequency, low-value agent decisions to workflow rules through a backtracking optimizer. The synergistic effect of these three elements significantly improves the automation level and resource utilization efficiency of invoice discrepancy processing while ensuring compliance.

[0089] Example 4 This embodiment provides another application example of the present invention in an IT service management scenario. Scenario Description: A company's IT service desk receives a large number of employee work orders, including password resets, software installations, and network failures. Traditional workflows allocate work orders by type, but some complex issues require technical personnel intervention for diagnosis.

[0090] After adopting the system of this invention: Task deconstruction: The hybrid topology graph is as follows: WFNode (work order reception) → WFNode (work order classification) → AgentSlot (difficult case diagnosis) → Branch → WFNode (automatic work order dispatch) or WFNode (manual intervention) → WFNode (work order closure).

[0091] System Execution: When a work order is categorized as "password reset," it directly proceeds to the automatic dispatch node. When it is categorized as "network failure" and the description contains keywords such as "VPN connection failure," the workflow engine activates the intelligent agent decision slot. The intelligent agent engine queries the knowledge base, analyzes logs, and generates diagnostic suggestions. Based on these suggestions, the workflow engine automatically executes repair scripts or dispatches the work order to the appropriate technical personnel.

[0092] Strategy Evolution: After three months of system operation, the pattern miner discovered: In "password reset" type work orders, the agent decision slot was never triggered (trigger count was 0). Value points ,in The system automatically marks the basic cost incurred by each agent call as redundant and recommends its removal.

[0093] The diagnostic patterns for "VPN connection failure" tickets are becoming increasingly rigid, with the intelligent agent repeatedly executing synchronization. If the diagnosis is accurate and the accuracy rate reaches 98%, meeting the downgrade criteria, the system will convert the decision slot into an automated workflow repair process.

[0094] "Software installation request" work orders often result in errors due to significant variations in user descriptions and the frequent misclassification by fixed categorization rules. Input state variance Exceeding the threshold The system triggers an upgrade, transforming the classification nodes into intelligent agent decision slots, whereby the intelligent agents proactively query users to obtain detailed information before accurately dispatching orders.

[0095] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.

[0096] Furthermore, the descriptions using terms such as "first" and "second" in this application are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed in this application.

[0097] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0098] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. An enterprise-scenario-oriented agent and workflow dual-engine collaborative method, characterized in that, Includes the following steps: S1: The dual-mode task deconstructor parses the enterprise task input into a hybrid execution topology graph consisting of alternating fixed workflow segments and agent decision slots, where each decision slot and workflow segment are explicitly associated through semantic anchors. S2: Based on the tokenized state interlocking protocol, the workflow engine and the agent engine can synchronize states and arbitrate conflicts by exchanging execution lock tokens and decision lock tokens during execution. S3: After the task is completed, the backtracking optimizer updates the node collaboration strategy in the hybrid execution topology graph online according to the execution path value score. Low-value decision slots are downgraded to fixed workflow segments, or high-value fixed workflow segments are upgraded to agent decision slots, and the changes take effect within the enterprise's predefined constraints.

2. The dual-engine collaborative method and system for intelligent agents and workflows in enterprise scenarios as described in claim 1, characterized in that, In step S1, the enterprise task input is parsed into a hybrid execution topology graph using a dual-mode task deconstructor, specifically including: S11: Utilize a large language model to identify the business objectives, constraints, and expected outputs of enterprise task inputs, and output an intent vector; S12: Match the intent vector with workflow segments in the enterprise's predefined process asset library, each workflow segment having an entry semantic anchor and an exit semantic anchor; S13: Identify uncertainty gaps between or within the matched workflow segments, instantiate an agent decision slot for each gap, and alternately connect the workflow segments and agent decision slots according to the task logic order to generate the hybrid execution topology graph.

3. The dual-engine collaborative method of intelligent agent and workflow for enterprise scenarios as described in claim 2, characterized in that, In step S13, identifying uncertainty gaps specifically involves identifying the position as an uncertainty gap when there are multiple possible paths between the exit semantic anchor point of the current workflow segment and the entry semantic anchor point of the next workflow segment, or when the input parameters of a certain step cannot be derived from deterministic rules.

4. The dual-engine collaborative method of intelligent agent and workflow for enterprise scenarios as described in claim 3, characterized in that, The tokenized state interlock protocol in step S2 includes: Generate a triplet token for each node in the hybrid execution topology graph. The triplet token contains a task ID, a step ID, and a semantic hash, wherein each node corresponds to a workflow segment executed by the workflow engine or a decision slot executed by the agent engine. The workflow engine holds the execution lock token, and the agent engine holds the decision lock token. The two engines hold different types of lock tokens mutually exclusively. After each engine completes the execution of the current node, it submits a state proof to the interlocking layer. Once the interlocking layer verifies the proof, it releases the lock token held by the current engine and grants a lock token to the corresponding engine based on the type of the next node in the hybrid execution topology.

5. The dual-engine collaborative method of intelligent agent and workflow for enterprise scenarios as described in claim 4, characterized in that, The state proof includes: a summary of the node's output variables, a semantic hash of the node, and an execution timestamp; for the agent engine, it also includes an inference chain summary and a list of changed variables.

6. The dual-engine collaborative method and system for intelligent agents and workflows in enterprise scenarios as described in claim 5, characterized in that, The tokenized state interlocking protocol in step S2 also includes a timeout recovery mechanism: if any engine holds a lock token for more than a preset threshold without releasing it, the interlocking layer forcibly recovers the token and records the timeout event; all token acquisition, release and state proof are written to an immutable audit log.

7. The dual-engine collaborative method of intelligent agent and workflow for enterprise scenarios as described in claim 6, characterized in that, In step S3, the backtracking optimizer updates the node collaboration strategy online based on the execution path value score, specifically including: For each pair of adjacent fixed workflow segment-agent decision slot-fixed workflow segment combinations in the hybrid execution topology graph, it is defined as a cooperative unit; Each collaboration is calculated based on the task execution success rate, time consumption, compliance score, and agent invocation cost. The collaborative value of the unit; Statistical analysis was performed on multiple execution records under the same semantic anchor point to calculate the average value score of the agent's decision and the value score of the simulated fixed workflow segment. When the value score of the simulated fixed workflow segment is higher than the average value score of the agent's decision, and the difference between the two exceeds a preset lag threshold, and the frequency of the most common decision result exceeds a preset frequency threshold, the corresponding agent decision slot will be downgraded to a fixed workflow segment. When the variance of the input state of a fixed workflow segment is greater than a preset variance threshold and there are multiple reasonable output paths, the fixed workflow segment is upgraded to an agent decision slot.

8. The dual-engine collaborative method of intelligent agent and workflow for enterprise scenarios as described in claim 7, characterized in that, Before performing an upgrade or downgrade operation, check whether the corresponding semantic anchor is marked as immutable; if it is marked as immutable, ignore the operation and record a skip log; if it is not marked, generate an upgrade or downgrade suggestion, which takes effect after being confirmed by the administrator or automatically confirmed, and update the corresponding entry in the process asset library.

9. A dual-engine collaborative system of intelligent agents and workflows for enterprise scenarios, used to implement the method described in any one of claims 1-8, characterized in that, Includes the following parts: A dual-mode task deconstructor is used to parse enterprise task inputs into a hybrid execution topology graph consisting of alternating fixed workflow segments and agent decision slots, where each decision slot is explicitly associated with a workflow segment via semantic anchors. The tokenized state interlocking layer connects the workflow engine and the agent engine, and is used to synchronize states and arbitrate conflicts by exchanging execution lock tokens and decision lock tokens. The backtracking optimizer is used to update the node collaboration strategy in the hybrid execution topology graph online based on the execution path value. It can downgrade low-value decision slots to fixed workflow segments or upgrade high-value fixed workflow segments to agent decision slots, and take effect within the enterprise's predefined constraints.

10. The dual-engine collaborative system of intelligent agents and workflows for enterprise scenarios as described in claim 9, characterized in that, The dual-mode task destructor includes: The intent extraction module is used to identify the business objectives and other relevant information from enterprise task inputs using a large language model. Given the constraints and expected outputs, output the intent vector. The path matching module is used to match the intent vector with the work in the enterprise's predefined process asset library. The workflow segments are matched, and each workflow segment has an ingress semantic anchor and an egress semantic anchor; A topology assembler is used to identify uncertainty gaps and instantiate agent decision slots to generate a hybrid execution topology graph.

Citation Information

Patent Citations

  • Workflow operation method, device and medium based on multi-agent and human-machine collaboration

    CN118691231B

  • Workflow loop execution method based on loop sub-workflow binding

    CN122044773A

  • Multi-agent AI interaction method and system based on intelligent scheduling and workflow integration

    CN122111588A

  • Method and system for realizing self-evolution learning of intelligent agent

    CN122114043A