Workflow processing method and device, equipment and medium

By generating and optimizing workflows through a multi-agent collaborative system, the problem of insufficient workflow generation quality in existing technologies is solved, and an efficient, safe and transparent workflow generation process is achieved.

CN121707302APending Publication Date: 2026-03-20SANGFOR TECH INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511871579.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-10
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient decision-making expertise, lack of collaboration mechanisms, static and rigid systems, and opaque decision-making processes in workflow generation, resulting in inadequate workflow quality.

Method used

A multi-agent collaborative system is adopted, including a process design agent, a security assessment agent, and a cost assessment agent. By generating a set of candidate workflows and performing security and cost assessments, the target workflow is determined using weighted computation, and the decision-making process is generated through adaptive optimization and interpretability.

Benefits of technology

It improves the quality of workflow generation, balances efficiency and security, enables workflow self-optimization and transparent decision-making processes, and reduces system integration costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121707302A_ABST
    Figure CN121707302A_ABST
Patent Text Reader

Abstract

The invention discloses a workflow processing method and device, equipment and a medium. The method comprises the steps of obtaining task description data; inputting the task description data into a process design agent to generate a candidate workflow set corresponding to the task description data; respectively inputting the candidate workflow set into a safety evaluation agent and a cost evaluation agent to obtain a safety evaluation value and a cost evaluation value of each candidate workflow; and determining a target workflow based on the security evaluation value, the cost evaluation value and the candidate workflow set. In this way, the workflow is generated through cooperation of multiple agents, the efficiency and safety of the workflow can be considered, and therefore the workflow generation quality is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a workflow processing method, apparatus, device and medium. Background Technology

[0002] Workflow automation is a core component of enterprise digital transformation, widely applied in scenarios such as business approval, IT operations and maintenance, and data processing. Current mainstream solutions mainly rely on general large models to directly parse user requirements and generate process definitions. While this approach has initially achieved natural language-driven automation, the quality of the generated workflows is insufficient.

[0003] Therefore, how to improve the quality of workflow generation is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a workflow processing method, apparatus, device, and medium that can balance workflow efficiency and security, thereby improving the quality of workflow generation. The specific solution is as follows:

[0005] Firstly, this application provides a workflow processing method, including:

[0006] Retrieve task description data;

[0007] The task description data is input into the process design agent to generate a set of candidate workflows corresponding to the task description data.

[0008] The candidate workflow set is input into the security assessment agent and the cost assessment agent respectively to obtain the security assessment value and the cost assessment value of each candidate workflow.

[0009] The target workflow is determined based on the security assessment value, the cost assessment value, and the candidate workflow set.

[0010] Optionally, determining the target workflow based on the security assessment value, the cost assessment value, and the candidate workflow set includes:

[0011] The security assessment value and the cost assessment value are weighted and calculated based on the first weight coefficient corresponding to the security assessment agent and the second weight coefficient corresponding to the cost assessment agent to obtain the comprehensive assessment value of each candidate workflow.

[0012] The candidate workflow with the highest comprehensive evaluation value is selected from the candidate workflow set and used as the preliminary workflow.

[0013] The target workflow is determined based on the preliminary workflow.

[0014] Optionally, determining the target workflow based on the preliminary workflow includes:

[0015] If the preliminary workflow does not meet the preset conflict conditions, then the preliminary workflow is determined as the target workflow;

[0016] If the preliminary workflow meets the preset conflict conditions, the preliminary workflow and conflict description information are input to the process design agent, the security assessment agent, and the cost assessment agent to obtain the alternative workflow generated by the process design agent and the modification suggestion information output by the security assessment agent and the cost assessment agent.

[0017] The modification suggestion information and the preliminary workflow are input into the process design agent to obtain the modified workflow generated by the process design agent.

[0018] The target workflow is determined from the alternative workflow and the modified workflow.

[0019] Optionally, determining the target workflow from the alternative workflow and the modified workflow includes:

[0020] Using the security assessment agent and the cost assessment agent, the security assessment values ​​and cost assessment values ​​of the alternative workflow and the modified workflow are obtained;

[0021] The comprehensive evaluation values ​​of the alternative workflow and the modified workflow are determined based on the safety assessment values ​​and the cost assessment values.

[0022] The workflow with the highest overall evaluation value among the alternative workflows and the modified workflows is selected as the candidate workflow;

[0023] If the candidate workflows meet the preset conflict conditions, the target workflow is determined based on the preset arbitration rules;

[0024] If the preliminary workflow does not meet the preset conflict conditions, then the candidate workflow is determined as the target workflow.

[0025] Optionally, the task description data is multimodal data, and inputting the task description data into the process design agent includes:

[0026] The task description data is input into a multimodal large language model to obtain the structured semantic representation corresponding to the task description data;

[0027] The structured semantic representation is used to design an intelligent agent for the input process.

[0028] Optionally, after determining the target workflow based on the security assessment value, the cost assessment value, and the candidate workflow set, the method further includes:

[0029] Execute the target workflow;

[0030] Update the workflow library based on the target workflow.

[0031] Optionally, the structured semantic representation is input into the process of designing an intelligent agent, including:

[0032] Under the condition of agent generation, the structured semantic representation is input into the process to design the agent;

[0033] Accordingly, the method further includes: filtering target workflows from the workflow library when the agent generation conditions are not met.

[0034] Optionally, it also includes:

[0035] Input the task description data sample into the process design agent to generate multiple workflows corresponding to the task description data sample;

[0036] Execute the multiple workflows, and based on the execution status of the multiple workflows, select the optimal workflow and add it to the workflow library.

[0037] Secondly, this application provides a workflow processing apparatus, comprising:

[0038] The data acquisition module is used to acquire task description data;

[0039] The workflow generation module is used to input the task description data into the process design agent and generate a set of candidate workflows corresponding to the task description data.

[0040] The workflow evaluation module is used to input the candidate workflow set into the security evaluation agent and the cost evaluation agent respectively, and obtain the security evaluation value and cost evaluation value of each candidate workflow.

[0041] The workflow determination module is used to determine the target workflow based on the security assessment value, the cost assessment value, and the candidate workflow set.

[0042] Thirdly, this application provides an electronic device, including a memory and a processor, wherein:

[0043] The memory is used to store computer programs;

[0044] The processor is used to execute the computer program to implement the aforementioned workflow processing method.

[0045] Fourthly, this application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned workflow processing method.

[0046] Fifthly, this application provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the aforementioned workflow processing method.

[0047] As can be seen from the above scheme, the present invention provides a workflow processing method, including: acquiring task description data; inputting the task description data into a process design agent to generate a candidate workflow set corresponding to the task description data; inputting the candidate workflow set into a security assessment agent and a cost assessment agent respectively to obtain a security assessment value and a cost assessment value for each candidate workflow; and determining a target workflow based on the security assessment value, the cost assessment value, and the candidate workflow set.

[0048] As can be seen, the beneficial effects of this application are as follows: by using a process design agent to generate a set of candidate workflows corresponding to task description data, and then using a security assessment agent and a cost assessment agent to output the security assessment value and cost assessment value of each candidate workflow, the target workflow is determined based on the security assessment value, the cost assessment value and the set of candidate workflows. In this way, the multi-agent collaborative generation of workflows can take into account both the efficiency and security of the workflow, thereby improving the quality of workflow generation.

[0049] Correspondingly, the workflow processing apparatus, device, and readable storage medium provided in this application also have the above-mentioned technical effects. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0051] Figure 1 A flowchart of a workflow processing method provided in this application embodiment;

[0052] Figure 2 A schematic diagram of workflow processing provided in an embodiment of this application;

[0053] Figure 3 A feedback tuning diagram provided for an embodiment of this application;

[0054] Figure 4A schematic diagram of a workflow processing device provided in an embodiment of this application;

[0055] Figure 5 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0056] 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 some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0057] Workflow automation is a core component of enterprise digital transformation, widely applied in scenarios such as business approval, IT (Information Technology) operations and maintenance, and data processing. With the development of artificial intelligence, intelligent workflow generation technology based on Large Language Models (LLMs) has gradually emerged, aiming to automatically generate executable processes through natural language instructions, thus lowering the automation threshold. However, existing technologies still face many challenges in practical applications. Current mainstream solutions mainly rely on general large models to directly parse user requirements and generate process definitions, or simply connect large models with rule engines to form a linear architecture of understanding → generation → execution. While these methods have initially achieved natural language-driven automation, they still have significant drawbacks: First, insufficient decision-making expertise: General large models are not fine-tuned for specific domains, and the generated processes often do not conform to internal enterprise standards (such as approval levels, naming rules, and system call order), leading to the need for extensive manual correction of the generated results and limiting their practicality. Second, lack of collaborative mechanisms: Independent decision-making by a single model or agent makes it difficult to balance security, efficiency, and compliance. For example, when generating a data export process, the model may ignore permission verification or data anonymization requirements, posing security risks. Secondly, the system is statically fixed: existing solutions are mostly generated in a one-time manner, unable to self-optimize based on data such as process execution success rate, time consumption, and user feedback, lacking continuous evolution capabilities, and making it difficult to improve long-term performance. Finally, the decision-making process is opaque: the reasoning process of large model generation is a black box; users cannot understand why a path was chosen or whether security checks were performed, affecting trust building, especially in scenarios with high compliance requirements such as finance and healthcare. Furthermore, due to the reliance on manual configuration of API (Application Programming Interface) connectors and field mappings, system integration costs are high, and the integration cycle for new business systems is long, further limiting the scalability of automation capabilities. In summary, the inventors have found that existing technologies have significant shortcomings in terms of professionalism, collaboration, evolvability, explainability, and integration efficiency, urgently requiring a new intelligent orchestration architecture to achieve more intelligent, reliable, and sustainably optimizable automation capabilities.

[0058] See Figure 1 As shown in the figure, this application discloses a workflow processing method, including:

[0059] Step S11: Obtain task description data.

[0060] The task description data can be user input data used to describe the task, and this data can be multimodal, such as natural language commands, screenshots, text logs, and historical conversation records. The workflow is an executable task flow that meets user needs, generated based on the task description data. Workflow generation, or workflow orchestration, refers to the unified scheduling and management of the execution order, dependencies, data flow, and exception handling of a series of automated tasks. By defining process templates or dynamically generating execution paths, cross-system and cross-service task collaboration can be achieved.

[0061] In other words, this embodiment employs multimodal input, enabling simultaneous reception and processing of multiple types of data input, such as text, images, audio, and log files. Users can initiate task requests through various means, including natural language commands, screenshots, and error logs, enhancing interactive flexibility.

[0062] Step S12: Input the task description data into the process design agent to generate a set of candidate workflows corresponding to the task description data.

[0063] In an optional implementation, this embodiment can input the task description data into a multimodal large language model to obtain a structured semantic representation corresponding to the task description data; and input the structured semantic representation into a process design agent.

[0064] The multimodal large model is a general intelligent model that integrates multimodal encoders for images, audio, and video on top of a large language model, achieving cross-modal alignment. In this embodiment, the multimodal large language model performs cross-modal semantic alignment to identify text content in images, extract key events from logs, and perform contextual reasoning based on instructions, outputting a structured semantic representation. A large language model can be understood as a deep learning module with a parameter scale exceeding a certain limit. Structured semantic representation refers to transforming the semantic information of unstructured or semi-structured data such as natural language, images, and audio into a machine-understandable, computable, and reasonable structured form. Structured semantic representation can include task categories, the inferred name of the target business system, operation types such as query, export, and restart, and additional constraints.

[0065] An intelligent agent can be understood as an intelligent system with a large language model as its core engine. In this embodiment, a process design intelligent agent, a security assessment intelligent agent, and a cost assessment intelligent agent are implemented based on a large language model. An intelligent agent is a software entity capable of perceiving the environment, making inference decisions, and executing actions. An intelligent agent is an autonomously operating module built upon a large language model, with specific functional orientations. Each intelligent agent is assigned a clear role and responsibility, and outputs structured suggestions within its scope of responsibility. This embodiment provides a multi-agent system, a distributed system composed of multiple intelligent agents with autonomous decision-making capabilities. Each intelligent agent can play different roles, collaborating and negotiating to jointly complete complex tasks, achieving division of labor and collaboration in the workflow generation process.

[0066] In this embodiment, the process design agent can be pre-trained and fine-tuned using historically successfully executed workflow templates and their structured semantic representations, enabling the agent to generate reliable workflow templates. The candidate workflow set may include one or more candidate workflows. After fine-tuning, the model's accuracy on the corresponding task is significantly higher than that of the un-fine-tuned general model.

[0067] Step S13: Input the candidate workflow set into the security assessment agent and the cost assessment agent respectively to obtain the security assessment value and cost assessment value of each candidate workflow.

[0068] In this embodiment, both the security assessment agent and the cost assessment agent are implemented based on large models. The security assessment agent can be pre-trained and fine-tuned using security policy documents and / or a library of violation cases. The annotation information can be a security score, such as -1.0 to +1.0. The cost assessment agent can be pre-trained and fine-tuned using execution logs with performance labels. The annotation information can be a performance score, such as 0.0 to +1.0. In an optional implementation, the candidate workflows and structured semantic representations of the security assessment agent and cost assessment agent can be used to obtain the security assessment value and cost assessment value for each candidate workflow, thus characterizing the security and cost of the candidate workload.

[0069] Step S14: Determine the target workflow based on the security assessment value, the cost assessment value, and the candidate workflow set.

[0070] This embodiment can perform weighted calculations on the security assessment value and the cost assessment value based on the first weight coefficient corresponding to the security assessment agent and the second weight coefficient corresponding to the cost assessment agent to obtain a comprehensive assessment value for each candidate workflow; determine the candidate workflow with the highest comprehensive assessment value from the candidate workflow set as the preliminary workflow; and determine the target workflow based on the preliminary workflow.

[0071] In this process, different weighting coefficients can be assigned to the security assessment agent and the cost assessment values ​​in advance, and the candidate workflow with the highest weighted comprehensive assessment value, i.e., the comprehensive score, can be selected as the initial workflow.

[0072] In an optional implementation, determining the target workflow based on the preliminary workflow may include: if the preliminary workflow does not meet preset conflict conditions, then determining the preliminary workflow as the target workflow; if the preliminary workflow meets the preset conflict conditions, then inputting the preliminary workflow and conflict description information to the process design agent, the security assessment agent, and the cost assessment agent to obtain an alternative workflow generated by the process design agent, and modification suggestion information output by the security assessment agent and the cost assessment agent; inputting the modification suggestion information and the preliminary workflow to the process design agent to obtain a modified workflow generated by the process design agent; and determining the target workflow from the alternative workflow and the modified workflow.

[0073] The preset conflict conditions can be one or more of the following: the difference between the highest and second-highest comprehensive evaluation values ​​is less than a preset difference threshold; the security evaluation value is lower than a preset score threshold; or there is a logical contradiction. Logical contradictions can be determined using a large language model or preset rules, such as deleting and then reading the same resource. Conflict description information describes the conflict, such as the security evaluation value being lower than a preset score threshold. By designing prompts, the process design agent can generate an alternative workflow, the security evaluation agent and cost evaluation agent can output modification suggestions, and the process design agent can generate a modified workflow based on the modification suggestions and the initial workflow.

[0074] In an optional implementation, determining the target workflow from the alternative workflow and the modified workflow may include: using the security assessment agent and the cost assessment agent to obtain the security assessment value and cost assessment value of the alternative workflow and the modified workflow; determining the comprehensive assessment value of the alternative workflow and the modified workflow based on the security assessment value and the cost assessment value; determining the workflow with the highest comprehensive assessment value from the alternative workflow and the modified workflow as the candidate workflow; if the candidate workflow meets the preset conflict condition, then determining the target workflow based on the preset arbitration rule; if the preliminary workflow does not meet the preset conflict condition, then determining the candidate workflow as the target workflow.

[0075] The comprehensive evaluation value of the alternative workflow and the modified workflow is determined based on the security assessment value and the cost assessment value. This is achieved by weighting the security assessment value and the cost assessment value using a first weighting coefficient corresponding to the security assessment agent and a second weighting coefficient corresponding to the cost assessment agent. A preset arbitration rule can be used to determine legality and compliance. If legal and compliant, the candidate workflow is selected as the target workflow; otherwise, a failure message is displayed. In other words, if conflicts still exist, or if there is a violation of laws, regulations, or mandatory corporate policies, the option with the highest comprehensive score is directly rejected; otherwise, the option with the highest comprehensive score is selected. The specific steps for determining the target workflow based on the security assessment value, the cost assessment value, and the candidate workflow set can be implemented using a coordinator.

[0076] This application's embodiments can guide the behavior of a large model by providing role-based prompting when inputting data to the agent. By explicitly specifying the model's role in the input (e.g., you are a security expert), the model's output will conform to its specific responsibilities. This application defines the professional behavioral boundaries of each agent through role-based prompting.

[0077] Furthermore, after determining the target workflow based on the security assessment value, the cost assessment value, and the candidate workflow set, the method further includes: executing the target workflow. In an optional implementation, the workflow library may also be updated based on the target workflow.

[0078] In this embodiment, a security check is performed before executing the target workflow. If the security check passes, the target workflow is executed; if the security check fails, an error message is generated. The security check may include one or more of the following: permission verification, parameter validity check, and sensitive operation confirmation. Permission verification confirms whether the current execution environment has the necessary credentials to call the required API; parameter validity check verifies that all parameters conform to the API contract (e.g., date format, enumeration value range); sensitive operation confirmation checks whether permissions exist for high-risk operations such as deletion and batch export. If any check fails, the process is terminated and an error code is returned.

[0079] This embodiment can use a rules engine to load and execute the target workflow. The target workflow can be executed through a DAG (Directed Acyclic Graph), and each step can be scheduled sequentially according to the topology. The execution status can be monitored in real time. Anomaly recovery strategies are supported: retrying with a preset number of attempts, skipping or marking failures to execute subsequent steps, and using alternative paths, that is, a certain step can enable backup services or degradation schemes.

[0080] Furthermore, if the target metrics for the target workflow are available, and the target workflow does not exist in the workflow library, then the target metrics and the target workflow are saved to the workflow library. If the target workflow exists in the workflow library, then the target metrics in the workflow library are updated. Target metrics may include time consumption, resource consumption, and execution success rate, etc. In another optional implementation, if the target workflow executes successfully, the workflow library is updated based on the target workflow; otherwise, if the target workflow fails to execute, the workflow library is not updated.

[0081] In an optional implementation, the success rate of execution can be used as a reward signal, and the PPO (Proximal Policy Optimization) algorithm can be used to fine-tune the aforementioned process design agent, security assessment agent, and cost assessment agent.

[0082] In other words, this application implements closed-loop optimization, using execution results and user feedback to retrain and optimize the model or policy, forming a continuous iterative mechanism of execution → feedback → improvement. This enables reinforcement learning optimization of each agent, improving long-term performance.

[0083] In an optional implementation, inputting the structured semantic representation into the process design agent includes: inputting the structured semantic representation into the process design agent when the agent generation conditions are met; correspondingly, the method further includes: filtering target workflows from the workflow library when the agent generation conditions are not met.

[0084] Specifically, the system can satisfy the agent generation condition if the user inputs a directive or if a probability selector determines that agent generation is to be used; otherwise, the condition is not met. The probability selector implements a probabilistic selection algorithm, controlling the probability of selecting agent generation and filtering from the workflow library when workflows with the same structured semantic representation exist. Furthermore, workflows with the same structured semantic representation can have different selection probabilities, and the selection probability is positively correlated with the success rate.

[0085] In an optional implementation, this application embodiment may further input task description data samples into a process design agent to generate multiple workflows corresponding to the task description data samples; execute the multiple workflows, and select the optimal workflow based on the execution status of the multiple workflows, and add it to the workflow library.

[0086] In other words, this embodiment can generate workflows in advance based on task description data samples of typical scenarios, and select the optimal workflow based on preset screening indicators. For example, the optimal workflow can be selected based on comprehensive indicators such as execution success rate, time consumption, and resource consumption.

[0087] In an optional implementation, multiple workflows can be executed. If multiple workflows involve write operations (such as modifying order status or sending notifications), concurrent execution may lead to state confusion or duplicate actions. This embodiment uses idempotent design and transaction locking mechanisms to prevent confusion. Read-only operation testing is the primary method: it is applied by default to non-modifiable tasks (such as querying, exporting, and diagnostics) and does not include write or state-changing operations; unique identifier binding: each instance is bound to a unique identifier, and the source of all operations is marked in the log; idempotent design: all executable actions are idempotent, meaning multiple executions have the same effect as a single execution; transaction locking mechanism: for scenarios that must include write operations, a distributed lock is applied to the target entity to ensure that only one branch can execute write operations at a time, while the remaining branches switch to observation mode (simulating execution only).

[0088] Furthermore, embodiments of this application can also generate decisions including: reasons for selecting the target workflow, security check results, and anomaly response strategies. The output can be in natural language or a visual decision tree. That is, it is interpretable, capable of explaining its decision-making process and basis in a human-understandable way. In workflow orchestration, an inference chain is output, enhancing user trust and compliance auditing capabilities.

[0089] Furthermore, during workflow execution, it can automatically retrieve the API documentation of the target open platform; parse the interface functions and authentication methods of the large model; automatically generate adapter code and field mappings; and complete system integration without manual development.

[0090] In other words, it achieves zero-configuration integration: zero-configuration integration refers to the system's ability to automatically identify and integrate with new systems (such as API services) without requiring manual writing of interface code or manual mapping of fields. This application uses a large model to parse the target system's API documentation, automatically generating adapters and semantic mapping rules, thus reducing system integration costs.

[0091] As can be seen, the embodiments of this application utilize a process design agent to generate a set of candidate workflows corresponding to the task description data. Then, a security assessment agent and a cost assessment agent are used to output the security assessment value and cost assessment value of each candidate workflow. Based on the security assessment value, cost assessment value, and the set of candidate workflows, the target workflow is determined. In this way, the multi-agent collaborative generation of workflows can take into account both the efficiency and security of the workflow, thereby improving the quality of workflow generation.

[0092] Further, see Figure 2 As shown, Figure 2 This is a schematic diagram of a workflow processing method provided in an embodiment of this application. This application provides an interpretable workflow orchestration scheme based on multi-agent collaboration and adaptive optimization. The user (user terminal) submits multimodal input; the InputModule transmits raw data to the MultiModalParser (multimodal parsing module) to input structured intent, i.e., structured semantic representation; the MultiAgentEngine (multi-agent collaboration engine) performs multi-agent negotiation, sends the executable process (target workflow) to the RuleEngine (rule engine) for execution and monitoring, reports the execution results to the ExecutionFeedback (execution feedback module), triggers A / B testing and tuning, the SelfEvolution module updates the Agent model, and can generate an interpretable report for the user terminal.

[0093] First, the system receives and integrates user input (natural language, images, or system logs) through an input module and a multimodal parsing module to extract task intent and contextual information, improving the accuracy of intent recognition. Then, a multi-agent collaborative engine is activated, where role-based agents such as a process design agent, a security and compliance agent, and a cost-efficiency agent, fine-tuned with domain data, negotiate to generate a process logic structure that conforms to enterprise standards. During execution, the system ensures stable process operation through a rules engine, and after task completion, it performs reinforcement learning optimization on each agent based on execution results and user feedback, achieving self-evolutionary process optimization. Furthermore, it supports A / B testing of multiple process paths and outputs decision-making basis through an interpretability generator, enhancing the system's transparency and credibility. This significantly improves the accuracy, compliance, and adaptability of workflow generation.

[0094] Multimodal Input and Parsing: Receives composite input data from the user, including but not limited to: text_input: A UTF-8 encoded string representing a natural language command. Example: "Check yesterday's order status, there was an error, so I took a screenshot"; image_input: Base64 encoded PNG / JPEG image data, or a URL (Uniform Resource Locator) pointing to an image file. Example: A browser screenshot displaying "Error 500: Internal Server Error"; log_input: A plain text log fragment, which may contain timestamps, error codes, and stack traces. Example: [2025-11-09 10:30:01] ERROR API / v1 / orders failed with status 500; context_history: Optional history of conversations, formatted as a JSON array. [

[0096] {"role": "user", "content": "I want to see recent sales data"},

[0097] {"role": "assistant", "content": "Last week's report has been generated for you"} ]

[0099] All inputs are fed into a single multimodal large language model (such as Qwen-VL-Chat); the model performs cross-modal semantic alignment, recognizes text content in images (OCR (Optical Character Recognition)), extracts key events from logs, and performs contextual reasoning based on text commands; the output is a structured semantic representation, i.e., a standardized structured semantic object, in the following format:

[0100] {

[0101] "intent": "diagnose_and_fix_api_failure",

[0102] "target_system": "order_management_service",

[0103] "operation_type": "query_status",

[0104] "constraints": {

[0105] "time_range": "yesterday",

[0106] "required_fields": ["order_id", "status", "error_message"]

[0107] },

[0108] "evidence_sources": ["text_input", "image_input", "log_input"]

[0109] }

[0110] Where: intent: a standardized task category selected from a predefined enumeration set (i.e., a category set); target_system: the inferred name of the target business system; operation_type: the operation type, such as query, export, restart, etc.; constraints: additional constraints; evidence_sources: indicates which input sources provided valid information. This output serves as the input for the next stage.

[0111] The multi-agent collaborative engine takes structured semantic objects from the previous module as input:

[0112] {

[0113] "intent": "...",

[0114] "target_system": "...", ...

[0116] }

[0117] As shown in Table 1, Table 1 provides information on the set of intelligent agents provided in the embodiments of this application. The process design agent is the process design intelligent agent, the security compliance agent is the aforementioned security assessment intelligent agent, and the cost efficiency agent is the aforementioned cost assessment intelligent agent. The process design agent is responsible for generating process structures that conform to enterprise specifications; the security compliance agent is responsible for detecting potential security risks and policy violations; and the cost efficiency agent is responsible for assessing resource consumption and execution delays.

[0118] Table 1

[0119]

[0120] Fine-tuning refers to further training the model parameters using domain-specific or task-specific datasets on top of a pre-trained large model, adapting it to specific application scenarios. In this application, to improve the accuracy of the process design agent in generating enterprise process specifications and industry terminology, each agent uses the following types of data for supervised fine-tuning: Process design agent: using JSON samples of successfully executed workflows from the enterprise's history; Security and compliance agent: using audit logs containing positive examples (compliant operations) and negative examples (violation cases); Cost efficiency agent: using operation records with performance metric labels (such as response time and CPU utilization). After fine-tuning, the model's accuracy on the corresponding tasks is significantly higher than that of the un-fine-tuned general model.

[0121] This embodiment provides a weighted voting mechanism, through which the coordinator performs the following steps: broadcasting input to all agents; collecting candidate workflow drafts output by agents and their scores (i.e., security assessment values ​​and cost assessment values), and calculating a comprehensive score (i.e., a comprehensive assessment value):

[0122] ;

[0123] in, This represents the score (real number) given by the i-th agent. This represents the weight coefficient of the agent, with an initial value set according to the role (e.g., the weight of the security agent is 0.9), and can be dynamically adjusted through reinforcement learning; n represents the number of agents participating in the voting. The candidate workflow draft with the highest overall score is selected as the preliminary solution.

[0124] This embodiment provides a conflict negotiation mechanism that initiates the negotiation process when any of the following conditions occur: the difference between the highest and second-highest scores is less than the threshold δ=0.1; the security compliance agent score is lower than -0.6; or a logical contradiction exists (e.g., deleting and then reading the same resource). The negotiation process is as follows: the coordinator sends the current candidate solutions and conflict descriptions to all agents; each agent returns modification suggestions or alternative solutions within a limited time; the coordinator summarizes the suggestions and re-runs the weighted voting; if a consensus still cannot be reached, the arbitration stage is entered. The arbitration decision is made by the coordinator's built-in rule engine: if there is any violation of laws, regulations, or mandatory corporate policies, the solution is directly rejected; otherwise, the solution with the highest comprehensive score is selected; all decision-making processes are fully recorded. The final workflow draft generated after negotiation and arbitration is output in standard JSON format, such as:

[0125] {

[0126] "workflow_id": "auto_gen_20251109_001",

[0127] "status": "draft",

[0128] "steps": [

[0129] {

[0130] "step_id": "s1",

[0131] "action": "call_api",

[0132] "api_endpoint": " / v1 / orders / diagnose",

[0133] "method": "GET",

[0134] "params": {"date": "2025-11-08"},

[0135] "auth_required": true

[0136] },

[0137] {

[0138] "step_id": "s2",

[0139] "action": "send_notification",

[0140] "recipient": "admin@company.com",

[0141] "content_template": "Detected error: {{error_code}}"

[0142] } ]

[0144] }

[0145] Furthermore, this embodiment employs a workflow execution and security verification module, taking a JSON object representing the workflow draft from the previous module as input. The following security checks are performed: Permission verification: confirming whether the current execution environment possesses the necessary credentials to call the required API; Parameter validity check: verifying that all parameters conform to the API contract (e.g., date format, enumeration value range); Sensitive operation confirmation: requiring secondary authorization for high-risk operations such as deletion and batch export (confirmation can be made via API interface callback). If any check fails, the process terminates and an error code is returned. Rule engine execution: loading and executing the workflow using a DAG (Directed Acyclic Graph) method with a rule engine. Each step is scheduled sequentially according to the topology; execution status is monitored in real time; and exception recovery strategies are supported: Retry: up to 3 times, with exponential backoff; Skip: marking failure but continuing subsequent steps; Fallback: enabling backup services or degradation schemes. An execution result report is output, in the following format:

[0146] {

[0147] "execution_id": "exec_20251109_001",

[0148] "workflow_id": "auto_gen_20251109_001",

[0149] "start_time": "2025-11-09T10:45:00Z",

[0150] "end_time": "2025-11-09T10:45:23Z",

[0151] "status": "success", / / or "failed", "partially_success"

[0152] "step_results": [

[0153] {

[0154] "step_id": "s1",

[0155] "status": "success",

[0156] "response_code": 200,

[0157] "output_data_ref": "data: / / temp / result_1.json"

[0158] },

[0159] {

[0160] "step_id": "s2",

[0161] "status": "success",

[0162] "delivery_status": "sent"

[0163] }

[0164] ],

[0165] "metrics": {

[0166] "total_duration_ms": 23000,

[0167] "api_calls": 1,

[0168] "data_volume_mb": 0.5

[0169] }

[0170] }

[0171] The execution feedback and self-evolution module is used for execution feedback and self-evolution. The system automatically triggers the following process after each process execution, see [link / reference]. Figure 3 As shown, Figure 3 This is a schematic diagram illustrating a feedback optimization method provided in an embodiment of this application. After execution, metrics are collected. If the execution is successful, the time and resources consumed are recorded; otherwise, the error log is analyzed, and the workflow library is updated. The execution data of the workflow can be used to feed back into the training of the intelligent agent.

[0172] A / B Test Management: Manages multiple process versions of the same requirement (i.e., the same structured semantic representation) to determine the optimal path; Dynamic Template Library Updates: Workflows can be updated to the workflow library, carrying their metric information. After a certain number of workflows are generated and executed, high-success-rate workflows (greater than a preset high-success-rate threshold) can be stored in the template library for rapid reuse. Alternatively, low-success-rate workflows (below a preset low-success-rate threshold) can be deleted from the workflow library and reused, selecting workflows for the same requirement based on probability. Reinforcement Learning Optimization: The PPO algorithm can be used to fine-tune the Agent using the process pass rate (success rate) as a reward signal. Self-evolution refers to the behavior of a system automatically optimizing its internal strategies or models based on historical execution data, user feedback, and performance metrics during operation. In this embodiment, the workflow template library is automatically updated based on A / B test results and success rates, achieving continuous process improvement.

[0173] Additionally, in optional implementations, this application embodiment can pre-create a workflow library, add workflows for typical scenarios, use A / B testing, execute multiple candidate workflows in parallel, and filter the optimal workflow to store it in the workflow library. During parallel execution, if multiple workflows involve write operations (such as modifying order status or sending notifications), concurrent execution may lead to state confusion or duplicate actions. For example: Process A has marked an order as "processed"; Process B attempts to process the same order again, causing an exception. Solution: Read-only operation testing is the primary method: A / B testing is applied by default to non-modifiable tasks (such as querying, exporting, and diagnosing), and does not include write or status change operations; Unique identifier binding: Each test instance is bound to a unique test_run_id, and all operation sources are marked in the log; Idempotency design: All executable actions are idempotent, meaning that multiple executions have the same effect as a single execution; Transaction locking mechanism: For test scenarios that must include write operations, the system adds a distributed lock to the target entity at the entry point to ensure that only one branch can execute write operations at a time, while the remaining branches switch to observation mode (simulating execution only).

[0174] Furthermore, this embodiment provides interpretable generation and zero-configuration integration. The interpretable generator automatically generates a decision report, including: "Why was this process chosen?", based on historical success rates and user preferences; "Is it secure?", with permission check results and compliance basis; and "How to handle failure?", with anomaly recovery strategies. Output format: natural language + visual decision tree. Zero-configuration semantic integration: When a user says they want to connect to an open platform: the system automatically retrieves the open platform's API documentation; parses the interface functions and authentication methods using a large model; automatically generates adapter code and field mappings; and completes system integration without manual development.

[0175] This embodiment provides an interpretable workflow orchestration scheme that supports multi-agent collaboration and adaptive optimization. It offers a novel workflow orchestration approach, including a workflow triggering mechanism based on a multimodal input interface module. This module can identify and parse requests from different channels (such as text and images), providing rich contextual information for subsequent processing. Compared to traditional single input sources, this module significantly improves the system's flexibility and applicability. It provides a collaborative engine integrating multiple agents, including a process design agent, a security and compliance agent, and a cost-efficiency agent. Each agent is fine-tuned according to specific tasks to achieve efficient collaboration. This multi-agent collaboration allows the system to automatically adapt to different business scenarios and make optimal decisions. It provides a self-evolution and optimization control module: by collecting execution feedback data and combining A / B testing management, template library updates, and reinforcement learning optimization, it continuously optimizes the entire workflow orchestration process. This enables the system to continuously learn and evolve during operation, thereby improving long-term performance and stability. It provides an interpretability generator: ensuring not only the transparency and reliability of workflow execution but also a user-friendly feedback mechanism. This is crucial for building trust relationships, especially in application scenarios involving sensitive information or high-risk decisions. By introducing features such as multi-agent collaboration, adaptive optimization, and explainability, it can not only more effectively address complex business needs but also provide users with a more flexible, reliable, and easy-to-understand workflow management system.

[0176] Any system with an architecture or method similar to that of this application, but applied to other intelligent automation scenarios, including but not limited to production scheduling and orchestration in intelligent manufacturing, clinical pathway recommendation in the medical field, and dynamic generation of approval strategies in the financial field, or technical solutions that employ different basic large-scale models or intelligent agent collaboration mechanisms, including but not limited to using alternative models such as Llama, ChatGLM, and Claude, or employing different multi-agent collaboration paradigms such as master-slave, debate, and graph communication, or self-evolutionary schemes that employ different feedback signals or optimization algorithms, including but not limited to technical implementations that use user ratings as feedback and supervised learning or evolutionary algorithms for model optimization, or zero-configuration semantic connection schemes that employ different system integration methods, including but not limited to achieving automatic API connection and field mapping based on OpenAPI, GraphQL, and interface recognition, or schemes that output interpretable reports in different forms, including but not limited to interpretable output forms such as decision tree visualization, causal graph display, and blockchain evidence audit logs, are all within the scope of protection of this application.

[0177] This application first receives composite information from user input, including natural language commands, screenshots, and system logs, through a multimodal parsing module. This information is then integrated with the context to understand intent and improve the accuracy of input recognition. Subsequently, a multi-agent collaborative engine is introduced, comprising role-based agents such as a process design agent, a security and compliance agent, and a cost-efficiency agent, fine-tuned based on domain data. Each agent analyzes and provides suggestions based on its professional role, reaching consensus through a negotiation mechanism to generate a target workflow logic structure that balances functionality, security, and efficiency. After security verification, this process is executed by a rules engine to ensure operational stability. Upon completion, the system automatically collects execution results, time consumption, success rate, and user feedback, triggering a self-evolution module. This module performs A / B testing on historical processes, selecting high-performance paths to update the process template library. It also uses feedback signals for reinforcement learning optimization, continuously improving the decision-making capabilities of each agent and achieving closed-loop system evolution. Simultaneously, an interpretability generator outputs a complete decision chain, including "why this process was chosen," "security check basis," and "anomaly handling strategy," enhancing system transparency and audit compliance. Furthermore, addressing the challenges of integrating new systems, this solution supports zero-configuration semantic integration: it automatically retrieves the target system's API documentation, uses the large model to understand interface functions and generate adapters, completing field semantic mapping and significantly reducing integration costs. This application, by constructing a finely tuned, collaborative, explainable, and evolvable intelligent agent orchestration architecture, significantly improves the accuracy, compliance, and adaptability of workflow generation, solving the problems of numerous illusions, lack of professionalism, and difficulty in trusting general large models. It is applicable to low-code platforms, intelligent operation and maintenance systems, enterprise automation platforms, and other products, and can be widely applied in industries such as finance, healthcare, and manufacturing, possessing high practical value and promising prospects for widespread adoption.

[0178] See Figure 4 As shown, this application provides a workflow processing apparatus, including:

[0179] Data acquisition module 11 is used to acquire task description data;

[0180] Workflow generation module 12 is used to input the task description data into the process design agent and generate a candidate workflow set corresponding to the task description data;

[0181] Workflow evaluation module 13 is used to input the candidate workflow set into the security evaluation agent and the cost evaluation agent respectively, and obtain the security evaluation value and cost evaluation value of each candidate workflow.

[0182] Workflow determination module 14 is used to determine the target workflow based on the security assessment value, the cost assessment value, and the candidate workflow set.

[0183] In an optional implementation, the workflow determination module 14 may include:

[0184] The weighted calculation submodule is used to perform weighted calculation on the security assessment value and the cost assessment value based on the first weight coefficient corresponding to the security assessment agent and the second weight coefficient corresponding to the cost assessment agent, so as to obtain the comprehensive assessment value of each candidate workflow.

[0185] The preliminary workflow determination submodule is used to determine the candidate workflow with the highest comprehensive evaluation value from the candidate workflow set, and use it as the preliminary workflow;

[0186] The target workflow determination submodule is used to determine the target workflow based on the preliminary workflow.

[0187] In an optional implementation, the target workflow determination submodule can be specifically used for: if the preliminary workflow does not meet the preset conflict conditions, then determining the preliminary workflow as the target workflow; if the preliminary workflow meets the preset conflict conditions, then inputting the preliminary workflow and conflict description information to the process design agent, the security assessment agent, and the cost assessment agent to obtain the alternative workflow generated by the process design agent, and the modification suggestion information output by the security assessment agent and the cost assessment agent; inputting the modification suggestion information and the preliminary workflow to the process design agent to obtain the modified workflow generated by the process design agent; and determining the target workflow from the alternative workflow and the modified workflow.

[0188] Furthermore, the target workflow determination submodule can be specifically used to: obtain the security assessment values ​​and cost assessment values ​​of the alternative workflow and the modified workflow using the security assessment agent and the cost assessment agent; determine the comprehensive assessment value of the alternative workflow and the modified workflow based on the security assessment value and the cost assessment value; determine the workflow with the highest comprehensive assessment value from the alternative workflow and the modified workflow as the candidate workflow; if the candidate workflow meets the preset conflict conditions, determine the target workflow based on the preset arbitration rules; if the preliminary workflow does not meet the preset conflict conditions, determine the candidate workflow as the target workflow.

[0189] The task description data is multimodal data. The workflow generation module 12 can be specifically used to input the task description data into a multimodal large language model to obtain the structured semantic representation corresponding to the task description data; and input the structured semantic representation into a process design agent.

[0190] Furthermore, the device also includes:

[0191] The workflow execution module is used to execute the target workflow;

[0192] The library update module is used to update the workflow library based on the target workflow.

[0193] The workflow generation module 12 can be used to input the structured semantic representation into the process design agent when the agent generation conditions are met; and to filter target workflows from the workflow library when the agent generation conditions are not met.

[0194] The device may further include:

[0195] The workflow library creation module is used to input task description data samples into the process design agent, generate multiple workflows corresponding to the task description data samples, execute the multiple workflows, and select the optimal workflow based on the execution status of the multiple workflows, and add it to the workflow library.

[0196] As can be seen, the embodiments of this application utilize a process design agent to generate a set of candidate workflows corresponding to the task description data. Then, a security assessment agent and a cost assessment agent are used to output the security assessment value and cost assessment value of each candidate workflow. Based on the security assessment value, cost assessment value, and the set of candidate workflows, the target workflow is determined. In this way, the multi-agent collaborative generation of workflows can take into account both the efficiency and security of the workflow, thereby improving the quality of workflow generation.

[0197] See Figure 5 As shown in the figure, this application discloses an electronic device 20, including a processor 21 and a memory 22; wherein, the memory 22 is used to store a computer program; the processor 21 is used to execute the computer program, the workflow processing method disclosed in the foregoing embodiments.

[0198] For details regarding the specific process of the above workflow processing method, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0199] Furthermore, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, and the storage method can be temporary storage or permanent storage.

[0200] In addition, the electronic device 20 also includes a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26; wherein, the power supply 23 is used to provide operating voltage for the various hardware devices on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0201] Furthermore, embodiments of this application also disclose a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the workflow processing method disclosed in the foregoing embodiments.

[0202] For details regarding the specific process of the above workflow processing method, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0203] Furthermore, this application provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the workflow processing method disclosed in the foregoing embodiments.

[0204] For details regarding the specific process of the above workflow processing method, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0205] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0206] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0207] The above provides a detailed description of a workflow processing method, apparatus, device, and medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A workflow processing method, characterized in that, include: Get task description data; The task description data is input into the process design agent to generate a set of candidate workflows corresponding to the task description data. The candidate workflow set is input into the security assessment agent and the cost assessment agent respectively to obtain the security assessment value and the cost assessment value of each candidate workflow. The target workflow is determined based on the security assessment value, the cost assessment value, and the candidate workflow set.

2. The workflow processing method according to claim 1, characterized in that, The target workflow is determined based on the security assessment value, the cost assessment value, and the candidate workflow set, including: The security assessment value and the cost assessment value are weighted and calculated based on the first weight coefficient corresponding to the security assessment agent and the second weight coefficient corresponding to the cost assessment agent to obtain the comprehensive assessment value of each candidate workflow. The candidate workflow with the highest comprehensive evaluation value is selected from the candidate workflow set and used as the preliminary workflow. The target workflow is determined based on the preliminary workflow.

3. The workflow processing method according to claim 2, characterized in that, Based on the preliminary workflow, the target workflow is determined, including: If the preliminary workflow does not meet the preset conflict conditions, then the preliminary workflow is determined as the target workflow; If the preliminary workflow meets the preset conflict conditions, the preliminary workflow and conflict description information are input to the process design agent, the security assessment agent, and the cost assessment agent to obtain the alternative workflow generated by the process design agent and the modification suggestion information output by the security assessment agent and the cost assessment agent. The modification suggestion information and the preliminary workflow are input into the process design agent to obtain the modified workflow generated by the process design agent. The target workflow is determined from the alternative workflow and the modified workflow.

4. The workflow processing method according to claim 3, characterized in that, Determining the target workflow from the alternative workflow and the modified workflow includes: Using the security assessment agent and the cost assessment agent, the security assessment values ​​and cost assessment values ​​of the alternative workflow and the modified workflow are obtained; The comprehensive evaluation values ​​of the alternative workflow and the modified workflow are determined based on the safety assessment values ​​and the cost assessment values. The workflow with the highest overall evaluation value among the alternative workflows and the modified workflows is selected as the candidate workflow; If the candidate workflows meet the preset conflict conditions, the target workflow is determined based on the preset arbitration rules; If the preliminary workflow does not meet the preset conflict conditions, then the candidate workflow is determined as the target workflow.

5. The workflow processing method according to claim 1, characterized in that, The task description data is multimodal data. Inputting the task description data into the process design agent includes: The task description data is input into a multimodal large language model to obtain the structured semantic representation corresponding to the task description data; The structured semantic representation is used to design an intelligent agent for the input process.

6. The workflow processing method according to any one of claims 5, characterized in that, After determining the target workflow based on the security assessment value, the cost assessment value, and the candidate workflow set, the process further includes: Execute the target workflow; Update the workflow library based on the target workflow.

7. The workflow processing method according to claim 6, characterized in that, Designing an intelligent agent from the structured semantic representation input process includes: Under the condition of agent generation, the structured semantic representation is input into the process to design the agent; Accordingly, the method further includes: filtering target workflows from the workflow library when the agent generation conditions are not met.

8. The workflow processing method according to claim 7, characterized in that, Also includes: Input the task description data sample into the process design agent to generate multiple workflows corresponding to the task description data sample; Execute the multiple workflows, and based on the execution status of the multiple workflows, select the optimal workflow and add it to the workflow library.

9. A workflow processing device, characterized in that, include: The data acquisition module is used to acquire task description data; The workflow generation module is used to input the task description data into the process design agent and generate a set of candidate workflows corresponding to the task description data. The workflow evaluation module is used to input the candidate workflow set into the security evaluation agent and the cost evaluation agent respectively, and obtain the security evaluation value and cost evaluation value of each candidate workflow. The workflow determination module is used to determine the target workflow based on the security assessment value, the cost assessment value, and the candidate workflow set.

10. An electronic device, characterized in that, Includes memory and processor, wherein: The memory is used to store computer programs; The processor is configured to execute the computer program to implement the workflow processing method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, Used to store a computer program, wherein the computer program, when executed by a processor, implements the workflow processing method as described in any one of claims 1 to 8.