Batch task processing method and device, electronic equipment and computer readable storage medium

By introducing a master agent and task agents into the AI ​​dialogue system, and generating execution plans and task graphs, the problem of existing AI assistants being unable to efficiently handle batch parallel tasks is solved. This enables the orderly execution and efficient processing of tasks, lowers the barrier to entry, and adapts to diverse task requirements.

CN122155634APending Publication Date: 2026-06-05SHENZHEN TCL NEW-TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN TCL NEW-TECH CO LTD
Filing Date
2026-02-05
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing AI assistants cannot efficiently handle batch parallel tasks, resulting in cumbersome and inefficient task processing workflows. Furthermore, existing technologies require users to have professional task orchestration skills, which raises the barrier to entry and makes it difficult to adapt to diverse batch task processing needs.

Method used

By introducing a master agent and a task agent into the AI ​​dialogue system, the system identifies batch task information input by the user and external structured data, generates a structured representation of the execution plan and a task graph, executes the first atomic task according to the serial timing requirements, and executes the second atomic task asynchronously in parallel, thereby achieving efficient parallel execution of tasks.

Benefits of technology

It achieves the orderliness of batch tasks and the standardization of result processing, improves the stability and fault tolerance of task execution, lowers the threshold for use, adapts to diverse batch task processing scenarios, and meets the needs of efficient parallel task processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122155634A_ABST
    Figure CN122155634A_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a batch task processing method and device, electronic equipment and computer readable storage medium, and relate to the technical field of computer; The method comprises: identifying batch task information and external structured data; Analyzing the batch task information to obtain a plurality of atomic tasks, and expanding the external structured data row by row to obtain task instances; Generating a structured representation of an execution plan; Generating a task graph based on the structured representation; According to the directed edges between the nodes of the task graph, a plurality of first atomic tasks with serial timing requirements and a plurality of second atomic tasks without serial timing requirements are determined; According to the serial timing requirements, task agents corresponding to the plurality of first atomic tasks are determined in turn, the first atomic tasks are executed in turn, task agents corresponding to the plurality of second atomic tasks are determined asynchronously and in parallel, and the plurality of second atomic tasks are executed in parallel; The execution results of the plurality of task agents are obtained. In this way, the present scheme can realize batch processing of batch tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a batch task processing method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] With the development of large-scale modeling technology, artificial intelligence (AI) assistants are increasingly widely used in daily office scenarios, becoming an important tool for improving office processing efficiency. However, mainstream AI assistants can only respond to and process a single question at a time. For batch task scenarios with parallel attributes, they cannot achieve simultaneous processing and response to multiple questions. Therefore, users can only use a one-by-one interaction method of inputting a single question, resulting in cumbersome task processing flow, low overall efficiency, and difficulty in meeting the high-efficiency processing requirements of batch parallel tasks. Related technologies have proposed batch task execution schemes based on workflow canvases, but the operation logic of workflow canvases is disconnected from natural language conversation scenarios, and requires users to have professional task orchestration skills, resulting in a high barrier to entry and difficulty in adapting to diverse batch task processing needs. Summary of the Invention

[0003] This application provides a batch task processing method, apparatus, electronic device, and computer-readable storage medium, which can realize batch processing of batch tasks.

[0004] In a first aspect, embodiments of this application provide a batch task processing method applied to an AI dialogue system, the AI ​​dialogue system including a main agent and multiple task agents; the method includes: The main agent identifies batch task information and external structured data input by the user; the external structured data represents the result processing method of the batch tasks. The batch task information is parsed to obtain multiple atomic tasks, and the external structured data is expanded line by line to obtain task instances; Based on the task instance and the multiple atomic tasks, a structured representation of the execution plan is generated; A task graph is generated based on the structured representation; the nodes of the task graph represent the atomic tasks, and the directed edges of the task graph represent the dependencies between the nodes. Based on the directed edges between nodes in the task graph, determine multiple first atomic tasks with serial timing requirements and multiple second atomic tasks without such serial timing requirements. According to the serial timing requirements, a plurality of task proxies corresponding to the first atomic tasks are determined sequentially, and the first atomic tasks are executed sequentially based on the task proxies. In addition, a plurality of task proxies corresponding to the second atomic tasks are determined asynchronously and in parallel, and a plurality of second atomic tasks are executed asynchronously and in parallel based on the task proxies. Obtain the execution results of multiple task agents, and process the multiple execution results based on the task instance.

[0005] Secondly, embodiments of this application provide a batch task processing device applied to an AI dialogue system, the AI ​​dialogue system including a main agent and multiple task agents; the device includes: The input recognition module is used to recognize batch task information and external structured data input by the user based on the main agent; the external structured data represents the result processing method of the batch task. The task parsing module is used to parse the batch task information to obtain multiple atomic tasks, and to expand the external structured data line by line to obtain task instances; The plan generation module is used to generate a structured representation of the execution plan based on the task instance and multiple atomic tasks; A graph generation module is used to generate a task graph based on the structured representation; the nodes of the task graph represent the atomic tasks, and the directed edges of the task graph represent the dependencies between the nodes. The requirement is to determine the module, which is used to determine, based on the directed edges between nodes in the task graph, multiple first atomic tasks that have serial timing requirements and multiple second atomic tasks that do not have the serial timing requirements. The task execution module is configured to sequentially determine task agents corresponding to multiple first atomic tasks according to the serial timing requirements, and sequentially execute the first atomic tasks based on the task agents, and asynchronously and in parallel determine task agents corresponding to multiple second atomic tasks, and asynchronously and in parallel execute multiple second atomic tasks based on the task agents. The result processing module is used to obtain the execution results of multiple task agents and process the multiple execution results based on the task instance.

[0006] Thirdly, embodiments of this application also provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps in the batch task processing method described above.

[0007] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the batch task processing method described above.

[0008] Fifthly, embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described in embodiments of this application.

[0009] The embodiments of this application have the following beneficial effects: The AI ​​dialogue system comprises a main agent and task agents. Based on the main agent, a structured representation of the execution plan and a task graph are generated. Scheduling of atomic tasks and task agents ensures the orderliness of task execution and the standardization of result processing. Executing individual atomic tasks through multiple task agents enables efficient parallel execution of atomic tasks, improving stability and fault tolerance. Parsing batch tasks yields atomic tasks, which represent minimal execution delays, thus eliminating task logic coupling and avoiding the problems of difficult-to-locate execution anomalies and high adjustment costs caused by overly large task granularity. Expanding external structured data line by line to obtain task instances ensures accurate mapping of external structured data, resulting in accurate batch task result processing methods. These methods are then used to process multiple execution results subsequently. A structured representation of the execution plan is generated based on task instances and multiple atomic tasks, providing a computer-readable execution plan for task scheduling. Furthermore, a task graph is generated based on this structured representation of the execution plan. By intuitively presenting the serial / parallel dependencies and data flow paths between atomic tasks, the main agent can quickly identify the dependency chains of multiple first atomic tasks with serial timing requirements and multiple second atomic tasks without serial timing requirements, thereby reducing scheduling complexity. The system sequentially determines the task agents corresponding to multiple first atomic tasks according to serial timing requirements and executes the first atomic tasks sequentially based on the task agents. It also asynchronously and in parallel determines the task agents corresponding to multiple second atomic tasks and executes them asynchronously and in parallel based on the task agents. This enables the serially ordered execution and parallel synchronous processing of batch tasks, significantly improving batch task processing efficiency and meeting the high-efficiency processing requirements of parallel tasks. Furthermore, the technical solution of this application embodiment does not require users to have professional orchestration skills. Relying on the main agent to identify batch task information, it automatically generates execution plans to realize the conversion of batch tasks into a task graph, avoiding the problem of the separation between the process canvas and natural language conversation in related technologies, lowering the usage threshold, and adapting to diverse batch task processing scenarios. Attached Figure Description

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

[0011] Figure 1 This is a schematic diagram of the steps of a batch task processing method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the user interface of an AI dialogue system provided in an embodiment of this application; Figure 3 This is a schematic diagram of a batch task judgment interface provided in an embodiment of this application; Figure 4 This is a schematic diagram of the notification method selection interface provided in an embodiment of this application; Figure 5 This is a task diagram provided in one embodiment of this application; Figure 6 This is a schematic diagram of the interface for a batch task execution mode provided in an embodiment of this application; Figure 7 This is a schematic diagram of a task management interface provided in an embodiment of this application; Figure 8 This is a flowchart illustrating a batch task processing method provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of a batch task processing device provided in an embodiment of this application; Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0012] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0013] In one embodiment, such as Figure 1As shown, a batch task processing method is provided. Although the logical order is illustrated in the step diagram, in some cases, the steps shown or described can be executed in a different order than that shown in the diagram. Specifically, this batch task processing method can be applied to an AI dialogue system, where the terminal may include a master agent and multiple task agents. The master agent can generate a structured representation of the execution plan, a task graph, and schedule atomic tasks and task agents; the task agents can be independent computing entities with specific hardware resources, software environments, and execution capabilities, capable of receiving and executing assigned atomic tasks and obtaining the execution results of the atomic tasks. Detailed descriptions are provided below. It should be noted that the order of description in the following embodiments is not intended to limit the priority of the embodiments.

[0014] according to Figure 1 The batch task processing method shown includes at least steps S110 to S170, which are described in detail below: In step S110, the main agent identifies the batch task information and external structured data input by the user. The external structured data represents the result processing method of the batch task.

[0015] Figure 2 This is a schematic diagram of the user interface of an AI dialogue system provided in an embodiment of this application; see reference. Figure 2 The user interface of an AI dialogue system can include input fields and batch task management controls. Users can input questions in the input fields using various methods such as voice or keyboard, and the user's input questions can be identified as task information. Tasks can include batch tasks and non-batch tasks. Batch tasks can be multiple tasks of the same or different categories; for example, batch tasks can include image generation tasks and writing tasks.

[0016] In one embodiment, such as Figure 3 As shown, a schematic diagram of a batch task judgment interface is provided. When the user inputs task information but does not operate the batch task management control in the preset way, the main agent can automatically perform semantic analysis on the task information based on a semantic classification model (such as a fine-tuned BERT model or a large language model) and rule keywords (including one by one, for each, separately and batch, etc.) to determine whether the task is a batch task.

[0017] In another embodiment, when a user inputs task information and operates the batch task management control in a preset manner, it can be directly determined that the task information input by the user is batch task information, and the task is a batch task.

[0018] When a task is determined to be a batch task, a boolean flag for the batch task (such as is_batch_mode) can be output and persisted in the session context after entering batch mode.

[0019] The result processing methods for batch tasks include result aggregation and notification. The result aggregation method specifies how to aggregate the execution results obtained from the execution of atomic tasks by multiple task agents to obtain the task processing result of the batch task; the notification method specifies how to notify the user of the task processing result of the batch task.

[0020] Because batch task processing can be time-consuming, users don't need to wait for the AI ​​dialogue system to complete the processing in real time. Instead, they can directly select the result aggregation and notification methods. After the batch tasks are completed, the AI ​​dialogue system can notify the user of the task processing results according to the user's selected result aggregation and notification methods. Multiple result aggregation and notification methods can be provided to the user, and the user can pre-enter information for various notification methods. For example, for email notifications, the user can pre-enter the email address to receive notifications and choose the pre-set notification method during batch task processing. Figure 4 This is a schematic diagram of the notification method selection interface provided in an embodiment of this application; see reference. Figure 4 The AI ​​dialogue system's user interface offers multiple notification options. Results aggregation methods may include, but are not limited to: form completion, presentation (PPT) templates, and / or comparison reports; users can choose the desired aggregation method. Based on the user-selected aggregation and notification methods, external structured data can be automatically generated.

[0021] During the processing of batch tasks, the user interface can be closed, and the AI ​​dialogue system can automatically process batch tasks in the background. Users can then view the execution status and results of batch tasks in the historical conversation records or task management interface.

[0022] In step S120, the batch task information is parsed to obtain multiple atomic tasks, and the external structured data is expanded line by line to obtain task instances.

[0023] Batch task information can be parsed based on syntax trees to identify task boundaries and obtain multiple atomic tasks. An atomic task is the smallest indivisible execution unit within a batch task, possessing independent operational logic and input / output parameters, and can be directly executed by a task proxy. Specifically, dependency parsing can be used to analyze the dependency relationships between words in a sentence, identifying the dependency relationships and logical levels of each component, thereby determining the sentence's syntactic logic and semantic connections, and delineating the functional boundaries, execution entities, and interaction logic of each atomic task for subsequent atomic task scheduling.

[0024] External structured data is read and split line by line, with each line corresponding to an independent aggregation and notification task configuration unit. For each split line, the result aggregation method field and notification method field are parsed. The former maps to the aggregation rules of atomic task execution results (such as data aggregation methods), and the latter maps to the user notification rules of task processing results (such as notification channels, push formats, and recipients). The parsed field information is bound to a preset aggregation and notification task instance template, and the instance's attribute fields are filled in to generate a standardized task instance that can be directly recognized and executed by the task scheduling system. This task instance includes an execution result aggregation task instance and a notification task instance. Based on this task instance, the system can complete the aggregation of execution results and result notification.

[0025] In step S130, a structured representation of the execution plan is generated based on the task instance and the plurality of atomic tasks.

[0026] The structured representation of an execution plan can be in DSL or JSON file format. This structured representation is a standardized document that can be directly parsed and executed by an AI dialogue system. Information from multiple atomic tasks and task instances can be combined to generate the structured representation of the execution plan. This structured representation integrates core configurations such as result aggregation and notification methods from task instances, as well as the task identifier, operation type, input, parameters, and dependencies of each atomic task.

[0027] In step S140, a task graph is generated based on the structured representation. The nodes of the task graph represent the atomic tasks, and the directed edges of the task graph represent the dependencies between the nodes.

[0028] A task graph can be generated based on the dependencies between atomic tasks in the structured representation, as well as the information of each atomic task. Each atomic task can be directly identified as a node in the task graph. The label of each node is determined based on the information of each atomic task, and the directed edges between nodes are determined based on the dependencies between nodes. Directed edges point from a preceding node to a subsequent node; a subsequent node is invoked only after the preceding node has completed execution. The direction of the directed edges between nodes can be from the dependent node to the dependent node. For example, if the execution of the first node depends on the execution result of the second node (or the execution result of the second node is the input of the first node), then the directed edge between the second node and the first node is from the second node to the first node.

[0029] Figure 5 This is a task diagram provided in an embodiment of this application; see reference. Figure 5 Each box represents a node. The node corresponding to atomic task 1 points to the node corresponding to atomic task 2. Therefore, atomic task 2 depends on atomic task 1, and thus atomic task 1 must be executed before atomic task 2. There is no dependency between atomic task 1 and atomic task 3. Therefore, without considering priority or other factors, the execution order of atomic task 1 and atomic task 3 is not required. Similarly, without considering priority or other factors, the execution order of atomic task 2, atomic task 3, and atomic task 7 is not mandatory; the execution order of atomic task 2, atomic task 4, and atomic task 7 is not mandatory; and the execution order of atomic task 2, atomic task 5, atomic task 6, and atomic task 7 is also not mandatory. This only lists some of the execution order relationships between atomic tasks.

[0030] The task graph can be a topological graph or a directed acyclic graph (DAG). A DAG is a directed graph without any directed cycles. Each directed edge in a DAG points from one node to another, and no closed cycle is formed along these edges. Setting the task graph to be acyclic avoids the problem of tasks failing due to circular dependencies.

[0031] In step S150, based on the directed edges between nodes in the task graph, multiple first atomic tasks with serial timing requirements and multiple second atomic tasks without such serial timing requirements are determined.

[0032] Based on the directed edges between nodes, the atomic task can be divided into a first atomic task and a second atomic task, where the first atomic task and the second atomic task may overlap, such as... Figure 5 As shown, Atomic Task 1 can be the first atomic task when analyzed with Atomic Task 2, and Atomic Task 1 can be the second atomic task when analyzed with Atomic Task 3.

[0033] When a directed edge exists between two nodes, there are serial timing requirements between the nodes, and there are also serial timing requirements between the atomic tasks corresponding to the nodes. For example... Figure 5 As shown, there is a directed edge between atomic tasks 1 and 2, therefore there is a sequential timing requirement between them, meaning atomic task 1 must be executed before atomic task 2. Similarly, there is a sequential timing requirement between atomic tasks 3, 4, and 5, requiring them to be executed in the order they appear. There is no directed edge between atomic tasks 1 and 3, therefore there is no sequential timing requirement between them. Although atomic tasks 4 and 5, and 4 and 6 are connected by directed edges, there is no directed edge between atomic tasks 5 and 6; therefore, there is no sequential timing requirement between them, and they do not need to follow a specific order.

[0034] In step S160, multiple task proxies corresponding to the first atomic tasks are determined sequentially according to the serial timing requirements, and the first atomic tasks are executed sequentially based on the task proxies. In addition, multiple task proxies corresponding to the second atomic tasks are determined asynchronously and in parallel, and multiple second atomic tasks are executed asynchronously and in parallel based on the task proxies.

[0035] For a first atomic task with a sequential timing requirement, task proxies are matched and executed sequentially according to the sequential timing requirement. For a second atomic task without a sequential constraint, the matching and execution of task proxies can be completed asynchronously and in parallel. When an atomic task is both a first atomic task and a second atomic task, if the preceding tasks of the atomic task have not yet been completed, the corresponding task proxies of the atomic task can be ignored and the atomic task can not be executed. Once all the preceding tasks of the atomic task have been completed, the atomic task can be treated as a second atomic task, and its corresponding task proxies can be determined asynchronously and in parallel with other second atomic tasks. The atomic task is then executed based on the determined task proxies.

[0036] like Figure 5As shown, although atomic task 2 is the second atomic task relative to atomic tasks 3 and 7, when atomic task 1 has not yet been completed, there is no need to consider the task agent corresponding to atomic task 2, nor is there any need to execute atomic task 2. When atomic task 1 has been completed and atomic tasks 3 and 7 have not been executed, atomic tasks 2, 3, and 7 can be identified as the second atomic tasks to be assigned to task agents, and task agents can be assigned to and executed for atomic tasks 2, 3, and 7 based on priority and other conditions. When atomic tasks 1 and 3 have been completed and atomic tasks 4 and 7 have not been executed, atomic tasks 2, 4, and 7 can be identified as the second atomic tasks to be assigned to task agents, and task agents can be assigned to and executed for atomic tasks 2, 4, and 7 based on priority and other conditions.

[0037] In this way, on the one hand, the dependency logic of the first atomic task is guaranteed (such as the serial execution of atomic task 3 → atomic task 4), and the overall task processing efficiency is improved through the asynchronous parallelism of the second atomic task (such as the parallel execution of atomic task 2 and atomic task 3). On the other hand, atomic tasks like atomic task 1, which can be either the first or the second atomic task, can also flexibly adapt to the scheduling strategy in different dependencies: they are executed serially when linked with atomic task 2, and in parallel when linked with atomic task 3, making full use of the complex dependency structure of the task graph to achieve the scheduling of atomic tasks.

[0038] When executing an atomic task, the task agent can send a heartbeat periodically (e.g., every 10 seconds), which includes the task identifier, execution progress, and / or current log fragments.

[0039] In step S170, the execution results of multiple task agents are obtained, and the multiple execution results are processed based on the task instance.

[0040] After completing an atomic task, a task agent can continue to assign other atomic tasks to itself. A task agent can execute multiple second atomic tasks simultaneously; for example, a task agent with low current resource usage can execute two second atomic tasks concurrently.

[0041] It can obtain the execution results of each atomic task from multiple task agents, thus obtaining the execution results of all atomic tasks. Based on the task instance, the execution results of multiple atomic tasks are summarized to obtain the task processing result of the batch task, and the task processing result is notified to the user.

[0042] In one embodiment, task instances can be extracted from the structured representation of the execution plan, the result aggregation method and notification method can be determined based on the task instances, multiple execution results can be aggregated according to the aggregation method to obtain the task processing results of batch tasks, and the task processing results can be sent according to the notification method.

[0043] Results summarization methods can include, but are not limited to: table backfilling, PPT templates, and / or comparison reports. Table backfilling refers to automatically filling multiple execution results into corresponding cells of a pre-set structured table template according to pre-defined field mapping rules, data format standards, and content validation logic. Table backfilling supports batch data import and precise matching, enabling data classification, dynamic updates, and visualization, facilitating subsequent data verification, secondary calculations, and archiving management. PPT templates refer to automatically embedding multiple execution results (including but not limited to key conclusions, trend charts, data dashboards, case studies, etc.) into corresponding pages and locations of a pre-built standardized PPT template (including fixed layout, font styles, color schemes, chart components, and content frameworks) according to pre-defined content association rules. PPT templates enable rapid adaptation of results content to the presentation medium, ensuring the standardization and consistency of output documents, and are suitable for results reporting, solution presentations, and information transmission scenarios targeting different audiences. A comparative report refers to a results summary method based on multi-dimensional comparative analysis. Specifically, it involves comparing multiple execution results horizontally and vertically, quantitatively calculating indicators such as difference values, difference rates, and similarity, and combining this with qualitative feature summarization and conclusion deduction to ultimately generate a complete report that includes comparison dimensions, comparison data, difference analysis, trend judgment, and optimization suggestions. This method can intuitively present the advantages and disadvantages and changing patterns of the target results, providing data support for decision-making.

[0044] Notification methods can include, but are not limited to: Instant Messaging (IM), email, and / or Lark. IM refers to a real-time information interaction channel built on network communication protocols, pushing the results of batch tasks to the target recipient's terminal through the data transmission link between the client and server of the instant messaging tool. Email refers to an asynchronous information notification channel implemented based on email transmission protocols, sending the results of batch tasks to the target recipient's email account by constructing a standardized email format in the task instance (including recipients, CC / BCC recipients, subject, body, attachments, etc.). This method supports batch uploading and storage of attachments, long-term archiving and traceability of messages, and logging of reception status. It is suitable for business scenarios that require the retention of formal records, transmission of complex information, or cross-organizational communication, and can meet the requirements of standardization and traceability in information transmission. Lark is an integrated notification channel built on an enterprise-level collaborative office platform. It combines instant messaging, email, task dashboards, and document sharing modules, supporting the push of batch task processing results to the target recipient's Lark terminal in various forms such as message pop-ups, to-do reminders, document annotations, and group announcements. This approach enables deep integration of notifications with business processes; for example, notifications can automatically associate with to-do tasks, synchronize project progress updates, and trigger subsequent approval processes. It is suitable for cross-departmental collaboration, project management, and task scheduling within enterprises, improving the collaborative efficiency and process closure capabilities of notification processing.

[0045] In this way, after entering batch task information, users do not need to wait for the AI ​​dialogue system to complete the batch task processing in real time. Instead, they can wait to receive the batch task processing results summarized according to the selected notification method, thus avoiding user waiting.

[0046] The AI ​​dialogue system, employing the technical solution of this application embodiment, includes a main agent and task agents. Based on the main agent, a structured representation of the execution plan and a task graph are generated, and atomic tasks and task agents are scheduled. This ensures the orderly execution of tasks and the standardization of result processing. Executing individual atomic tasks through multiple task agents enables efficient parallel execution of atomic tasks, improving the stability and fault tolerance of task execution. Parsing batch tasks yields atomic tasks, which represent minimal execution delays, thus eliminating the coupling of task logic and avoiding the problems of difficult-to-locate execution anomalies and high adjustment costs caused by excessively large task granularity. Expanding external structured data line by line to obtain task instances ensures accurate mapping of external structured data, thereby obtaining an accurate batch task result processing method. This allows subsequent processing of multiple execution results according to this method. Generating a structured representation of the execution plan based on task instances and multiple atomic tasks provides a computer-readable execution plan for task scheduling, and further, based on this structured representation of the execution plan... Generating a task graph visually presents the serial / parallel dependencies and data flow paths between atomic tasks, enabling the main agent to quickly identify the dependency chains of multiple first atomic tasks with serial timing requirements and multiple second atomic tasks without serial timing requirements, thereby reducing scheduling complexity. By sequentially determining the task agents corresponding to multiple first atomic tasks according to serial timing requirements and executing the first atomic tasks sequentially based on the task agents, and asynchronously and in parallel determining the task agents corresponding to multiple second atomic tasks and executing the second atomic tasks asynchronously and in parallel based on the task agents, the sequential ordered execution and parallel synchronous processing of batch tasks can be achieved, significantly improving batch task processing efficiency and meeting the high-efficiency processing requirements of parallel tasks. Furthermore, the technical solution of this application embodiment does not require users to have professional orchestration skills. Relying on the main agent to identify batch task information and automatically generate execution plans to realize the conversion of batch tasks into a task graph, it avoids the problem of the separation between the process canvas and natural language conversation in related technologies, lowers the usage threshold, and adapts to diverse batch task processing scenarios.

[0047] Based on the above technical solution, as an embodiment, generating a task graph based on the structured representation may include: identifying dependency fields in the structured representation; determining the dependencies between atomic tasks when the dependency fields record dependencies between atomic tasks; performing semantic understanding on the structured representation when the dependency fields do not record dependencies between atomic tasks, and determining the dependencies between atomic tasks based on the semantic understanding results; determining the nodes of the task graph based on the atomic tasks, and generating directed edges between the nodes based on the dependencies between the atomic tasks, thereby obtaining the task graph.

[0048] The structured representation includes information about each atomic task, which includes, but is not limited to, task identifier, operation type, input, parameters, and / or dependencies. Dependencies can be determined based on a dependency field (deps), which defines the atomic task and its dependent tasks. For example, "deps=[atomic task 2] (depends on atomic task 1)" defines atomic task 2 as dependent on atomic task 1. Therefore, the dependency field of an atomic task can be identified, and it can be determined whether the dependency field completely records the atomic task and its dependent tasks. When the dependency field records the dependencies between atomic tasks, the dependency can be directly obtained so that a task graph can be generated subsequently based on this dependency.

[0049] When the dependencies of atomic tasks are not recorded in the dependency field, semantic understanding can be performed on the atomic task information and / or batch task information in the structured representation to identify the execution logic of the atomic tasks. For example, if the information clearly states that certain data is generated first and then statistically analyzed, it can be determined that the statistical task depends on the generation task, thus establishing the dependency relationship between the statistical task and the generation task. Subsequently, a task graph can be generated based on this dependency relationship. Furthermore, the dependency field can be supplemented based on the semantically understood dependencies.

[0050] When generating the task graph, multiple nodes can be constructed based on the information of each atomic task. Then, directed edges between nodes can be generated based on the dependencies between atomic tasks. When there is a dependency between two atomic tasks, it is determined that there is a directed edge between their corresponding nodes, and the direction of the directed edge can be from the dependent node to the dependent node. When there is no dependency between two atomic tasks, it is determined that there is no directed edge between their corresponding nodes.

[0051] The technical solution adopted in this application embodiment can generate a task graph based on the structured representation of the execution plan, thereby intuitively presenting the serial / parallel dependencies and data flow paths between atomic tasks. This enables the main agent to quickly identify the dependency chains of multiple first atomic tasks with serial timing requirements and multiple second atomic tasks without serial timing requirements, thereby reducing scheduling complexity. Subsequently, according to the serial timing requirements, the task agents corresponding to multiple first atomic tasks are determined sequentially, and the first atomic tasks are executed sequentially based on the task agents. Similarly, the task agents corresponding to multiple second atomic tasks are determined asynchronously and in parallel, and the multiple second atomic tasks are executed asynchronously and in parallel based on the task agents. This can realize the serial ordered execution and parallel synchronous processing of batch tasks, greatly improving the processing efficiency of batch tasks and meeting the high-efficiency processing requirements of parallel tasks.

[0052] Based on the above technical solution, as an example, when determining the task agent corresponding to an atomic task (including the first atomic task and the second atomic task), the attributes of the atomic task can be obtained; the attributes of multiple task agents can be obtained; and the task agent corresponding to the atomic task can be determined according to the matching degree between the attributes of the atomic task and the attributes of the multiple task agents.

[0053] The attributes of an atomic task can be obtained from its information. These attributes may include, but are not limited to, network bandwidth, data volume, estimated execution time, data type, and / or required software version. The attributes of a task agent may include, but are not limited to, remaining network bandwidth, free storage space, current load rate, supported data types, and / or compatible software versions.

[0054] It can identify multiple atomic tasks that need to be assigned task proxies, perform attribute matching based on the attributes of multiple atomic tasks and multiple task proxies, and assign suitable task proxies to each atomic task to maximize the overall execution efficiency of multiple atomic tasks and the overall resource utilization of multiple task proxies.

[0055] The technical solution adopted in this application allocates task proxies based on the attributes of atomic tasks and the attributes of multiple task proxies. This can avoid the execution failure problem caused by task allocation to incompatible proxies, improve the stability of task execution, and at the same time achieve precise matching of resource supply and demand, reduce resource waste, and improve overall scheduling efficiency and system throughput.

[0056] Based on the above technical solution, as an embodiment, the asynchronous parallel execution of multiple second atomic tasks based on the task agent may include: determining the priority of multiple second atomic tasks according to the attributes of the multiple second atomic tasks; and controlling the multiple task agents to asynchronously and parallelly execute the second atomic tasks according to the priority.

[0057] When multiple second atomic tasks are pending task assignment, their priorities can be determined, and task agents can be assigned to the highest-priority second atomic tasks. Alternatively, for each currently idle task agent, the priority of each pending second atomic task relative to that agent can be calculated, thus determining the second atomic task to be executed by that agent. The AI ​​dialogue system can automatically identify the attributes of each atomic task, thus determining the priority of multiple second atomic tasks based on these attributes. Atomic task attributes may include, but are not limited to: task deadline, cost budget, attribute matching degree, and / or user-defined priority. Attribute matching degree refers to the degree of matching between the atomic task's attributes and the task agent's attributes; different task agents have different attribute matching degrees. User-defined priority refers to the priority pre-set by the user for different types of atomic tasks. Pre-configured weighted coefficients corresponding to each attribute of the atomic tasks can be obtained from the policy library. Each attribute is quantified, and a weighted sum is performed based on the weighted coefficients corresponding to each attribute to obtain the priority of each second atomic task.

[0058] Alternatively, the priority of each atomic task can be determined based on the following formula: P=(w_d×deadline)+(w_c×cost_budget)+(w_r×resource_fit)+(w_u×user_priorit); Where P represents the priority of the atomic task, w_d, w_c, w_r and w_u represent the weighting coefficients corresponding to each task attribute respectively; deadline represents the task deadline, cost_budget represents the cost budget, resource_fit represents the attribute matching degree, and user_priorit represents the priority set by the user.

[0059] Based on the priority of each second atomic task to be executed, task agents are assigned to each second atomic task in turn, and the second atomic task is executed based on the task agent after the corresponding task agent is determined.

[0060] In this way, the resource supply for high-priority second atomic tasks can be prioritized, avoiding delays in the execution of core tasks due to resource contention; it helps to improve the orderliness of overall task scheduling, reduce the risk of process blockage caused by chaotic task execution, and ensure the timeliness and reliability of task execution.

[0061] The batch task processing method may further include: monitoring the length of the task waiting queue, and when the length exceeds a length threshold, reducing the number of the second atomic tasks executed simultaneously.

[0062] To maintain stable system load, the number of concurrently executing secondary atomic tasks can be dynamically adjusted. The length of the task waiting queue can be monitored in real time. This queue is an ordered data structure used to temporarily store atomic tasks awaiting execution. Atomic tasks not immediately executed can enter this queue according to preset rules (such as priority and submission time) to await scheduling. The queue length is a core indicator reflecting the system load status; an excessively long queue indicates task backlog, while a short queue indicates insufficient resource utilization.

[0063] The length threshold can be set according to actual needs. When the length of the task waiting queue exceeds the length threshold, the system can actively reduce the number of second atomic tasks currently being executed asynchronously in parallel. By reducing the concurrency of parallel tasks, the computing resources and scheduling bandwidth of the task agent are released, thereby alleviating the backlog pressure of the task waiting queue, avoiding problems such as task execution delay and resource exhaustion caused by queue overload, balancing the concurrency of task execution and the system resource carrying capacity, preventing excessive resource consumption, and ensuring the stable operation of the task agent.

[0064] The batch task processing method may further include: monitoring the target task agent that is executing a task; when the execution time of the target task agent for the current task exceeds the time threshold corresponding to the current task, starting the task agent copy corresponding to the target task agent; executing the current task based on the task agent copy; when either the target task agent or the task agent copy obtains the execution result first, obtaining the execution result and controlling the other to stop executing the current task.

[0065] The target task agent is the task agent currently executing the atomic task (including the first atomic task and the second atomic task). It can monitor the duration of each target task agent's execution of the current atomic task. It can obtain the historical execution durations of multiple similar or same-category tasks of the target task agent's currently executing atomic task (the current task), and determine the target duration based on these historical execution durations. A certain percentage of the target duration is then set as the duration threshold corresponding to the current task. For example, if the current task is an image generation task, and the average duration of multiple historical image generation tasks is 10 seconds, then the target duration can be 10 seconds, and 95% of the target duration (i.e., 0.95 seconds) can be set as the duration threshold corresponding to the image generation task.

[0066] When the execution time of the current task by the target task agent exceeds the corresponding time threshold, the task agent replica corresponding to the target task agent can be started to execute the current task. The task agent replica corresponding to the target task agent can be a task agent with similar attributes to the target task agent. After the task agent replica is determined, the main agent distributes the current task executed by the target task agent to the task agent replica, so that the task agent replica and the target task agent form a dual-instance parallel execution mode. The execution progress (such as completion rate, resource utilization rate, etc.) of the two can be synchronized through a heartbeat mechanism. During the dual-instance execution process, once either the target task agent or the task agent replica generates an execution result that meets the requirements (passes data integrity and accuracy verification), the main agent can immediately lock the execution result as the final output of the current task and simultaneously send a forced termination command to the other agent that has not completed execution, releasing the hardware resources and scheduling links it occupies.

[0067] In this way, redundant execution can effectively avoid the risk of task delays caused by single agent failure or inefficiency. The mechanism of the first to finish wins can minimize the task execution time and ensure the timely completion of tasks with high timeliness requirements. The redundant copy is terminated immediately after obtaining a valid execution result, which can avoid the ineffective occupation of resources and achieve dual optimization of reliability and resource utilization.

[0068] Based on the above technical solution, as an example, when the task agent executes an atomic task, it can obtain the key information of the atomic task; the key information may include, but is not limited to: core operations, input parameters, model version and / or random number seed; perform hash operation on the key information of the atomic task to obtain the idempotent fingerprint of the atomic task; based on the idempotent fingerprint of the atomic task, ensure that the repeated execution results of the atomic task are consistent.

[0069] To avoid result deviations due to changes in key information such as input parameters and model versions for the same task, and to identify duplicate tasks, the task agent can calculate the idempotent fingerprint of each atomic task.

[0070] It can obtain key information about atomic tasks, including but not limited to: core operations, input parameters, model version, and / or random number seed. Core operations can include, but are not limited to, specific operations such as data training, image recognition, and / or numerical computation. Input parameters can include, but are not limited to, the data to be processed, calculation thresholds, and / or configuration parameters. The random number seed is the initial value for initializing the pseudo-random number generator. The same seed ensures that the pseudo-random number generator outputs a completely consistent random number sequence, thus guaranteeing the consistency of repeated execution results for tasks involving random processes (such as model training and data sampling).

[0071] After obtaining the key information of the atomic task, these key pieces of information can be integrated into a standardized data string. A hash algorithm is then used to generate a unique and fixed hash value, which is the idempotent fingerprint of the atomic task. An idempotent fingerprint has the property that if the inputs are consistent, the output is unique. If the key information of the atomic task remains unchanged, the generated idempotent fingerprint will always be the same regardless of how many times the task is executed. The idempotent fingerprint can be calculated using the formula: fingerprint = hash(op + normalized_inputs + model_version + seed), where fingerprint represents the idempotent fingerprint, hash represents the hash operation, op is the core operation, normalized_inputs are the input parameters, model_version is the model version, and seed is the random number seed.

[0072] Based on idempotent fingerprints, a consistency guarantee mechanism for the execution of atomic tasks can be constructed. When an atomic task needs to be executed repeatedly, its idempotent fingerprint is first calculated and compared with the fingerprint in the historical execution record. If the fingerprints match, the historical execution result is directly reused or the key conditions used in this execution are ensured to be consistent with those in the past. If the fingerprints do not match, it is determined that the core elements of the task have changed, and the task needs to be re-executed and the fingerprint record updated.

[0073] By adopting the technical solution of this application embodiment, idempotent fingerprints can not only avoid the waste of resources caused by repeatedly executing the same task, but also ensure the consistency of key elements of the task through fingerprint verification, thus guaranteeing the accuracy and consistency of repeated execution results; by directly reusing historical results, redundant calculations can also be reduced and resource utilization improved.

[0074] Based on the above technical solution, as an example, when an exception occurs during the execution of an atomic task by the task agent, the following steps can be taken: obtain the exception information reported by the task agent; obtain the exception root cause category and the exception resolution strategy corresponding to each exception root cause; determine the exception root cause category to which the exception belongs based on the exception information, and obtain the exception resolution strategy corresponding to the exception root cause category; and execute the exception resolution strategy.

[0075] When executing atomic tasks, the task agent can monitor for anomalies. If an anomaly is detected, it can report the anomaly information to the main agent. The anomaly information may include, but is not limited to, the time of occurrence, the execution stage, the error code, and / or a snapshot of resource usage.

[0076] A standardized anomaly root cause classification system and corresponding anomaly resolution strategy library have been pre-built. The anomaly root cause categories may include, but are not limited to: rate limit exceeding (RateLimit), network / node transient error (InfraTransient), generation result deviation / instability (ModelStochastic), input format error / data missing (DataError), and / or, compliance or security policy blocking (PolicyDenied), etc.

[0077] Anomaly resolution strategies are pre-defined for each type of root cause. For example, strategies for handling rate throttling exceeding limits may include exponential backoff (1s, 2s, 4s, 8s…) and dynamic token bucket adjustment; strategies for handling network / node transient errors may include node switching / line replacement with a maximum of a fixed number of retries (e.g., 3); strategies for handling deviations / instability in generated results may include switching to a backup model, switching to a lower random temperature, and / or switching to a fixed seed; strategies for handling input format errors / missing data may include automatic data repair (default value filling / regular expression cleaning) and / or manual verification; and strategies for handling compliance or security policy-related blocking may include automatic de-identification before execution.

[0078] Based on the abnormal information reported by the task agent, intelligent analysis can be performed through keyword matching, error code mapping, etc., to determine the abnormal root cause category to which the abnormal belongs, and then obtain the abnormal resolution strategy corresponding to the abnormal root cause type from the abnormal resolution strategy library, execute the abnormal resolution strategy, and thus eliminate the abnormal.

[0079] The technical solution adopted in this application embodiment can realize rapid response and accurate repair of atomic task execution anomalies. By pre-setting root cause classification and strategy library, the delay of manual investigation is avoided. Based on the automatic matching of solutions based on anomaly information, the efficiency of problem handling can be greatly improved and the task interruption time can be reduced. The closed-loop handling mechanism of anomalies can ensure the stability of task recovery execution, reduce the overall system failure rate, and improve resource utilization.

[0080] In one embodiment, a full-link task log can be recorded, storing a structured representation of the execution plan, task graph, task status, idempotent fingerprint and execution context, path and checksum of intermediate products, etc.

[0081] Figure 6 This is a schematic diagram of the interface for a batch task execution mode provided in an embodiment of this application; as shown below. Figure 6 As shown, in one embodiment, when running batch tasks, the completion progress of the batch tasks can be displayed in a dialog interface.

[0082] Figure 7This is a schematic diagram of a task management interface provided in an embodiment of this application; as shown Figure 7 As shown, in one embodiment, a task management interface can be displayed. This interface can display the execution status of each atomic task, including task status, task source, creation time, and completion time. The task management interface can provide operation controls for each atomic task, which may include, but are not limited to, a stop control, a view control, a download control, and a retry control. Using the stop control stops the execution of the atomic task; using the view control allows viewing the execution result of the atomic task; using the download control downloads the execution result of the atomic task; and using the retry control re-executes the atomic task.

[0083] Figure 8 This is a flowchart illustrating a batch task processing method provided in an embodiment of this application; see reference. Figure 8 Users can input a query in natural language, such as "Give me an image based on each row in an Excel file, with the image style being XXXXX." This input serves as the initial interaction point for the system. The system can determine the user's interaction method: if the user explicitly inputs a command such as "Enter batch mode," the batch task management mode can be explicitly triggered; if the user simply describes the task in natural language, the recognition process can be implicitly triggered. When the interaction method is implicitly triggered, the system can call the rules and model recognizer to determine whether the task belongs to a batch task. If it is not a batch task, it enters the regular task execution process; if it is a batch task, the batch task information is handed over to the main agent for processing. The main agent can analyze and parse the batch task information, extracting multi-task requirements (such as multiple rows of data in an Excel file → multiple subtasks) from the input batch task information, and decompose the batch task into multiple atomic tasks, organizing them into a batch task queue. The main agent distributes the atomic tasks to multiple task agents, each task agent is responsible for the execution of the atomic tasks; if the task execution fails, the main agent can trigger retries and perform scheduling optimization. Each task agent executes its assigned atomic tasks and produces execution results. During execution, the task agents report their execution status and intermediate results to the main agent in real time. The main agent collects the execution results from each task agent and summarizes, organizes, and processes them uniformly (e.g., generating unified reports, packaging files, or performing comparative analysis). The system pushes the summarized results to users through the notification module; notification methods can include channels pre-specified by the user, such as IM messages, emails, or Webhook callback interfaces.

[0084] In this application embodiment, batch tasks may include, but are not limited to: generating multiple images (e.g., batch generating PPT illustrations, batch generating poster images, etc.), processing multiple similar files according to a certain method / standard (e.g., evaluating multiple files), translating a large amount of text, batch generating introductory articles for papers, and / or generating corresponding communication scripts / emails for different objects.

[0085] Related technologies often rely on "multi-window / multi-session" or "script toolchains" to handle batch tasks, lacking unified task dependency management, failure retry, result aggregation, and traceability mechanisms. For complex / repetitive tasks (such as "generating images / reports in batches by reading hundreds of rows of parameters from Excel"), a large number of manual operations are required, resulting in numerous interaction rounds, extended overall time, and invisible failures, making management difficult. The technical solution adopted in this application can automatically identify batch / multi-task intentions (including explicit and implicit triggers) and generate executable task plans within a single session context; it can construct an implicit task graph and achieve resource-aware parallel / priority scheduling and backpressure control without changing the user's natural language habits; it can perform root cause analysis and strategic retries for abnormal tasks while ensuring idempotency and consistency; and it can uniformly aggregate multi-task results into structured deliverables (such as Excel backfilling / PPT templates / comparison reports) and provide asynchronous notifications and traceable auditing.

[0086] In one embodiment of this application, the main agent can effectively identify batch tasks through fine-tuning and prompts, automatically entering batch task management mode even if the user does not manually enable it. The main agent is responsible for the overall task parsing, decomposition, and management, including task dependency parsing, scheduling strategy formulation, root cause analysis and retries for failed tasks, and result aggregation. The task agent can execute individual atomic tasks, ensuring idempotency and interruptible recovery, and returning the output and execution status to the main agent. The system transforms natural language into an executable task graph through a structured representation of the execution plan (such as DSL / JSON), thereby achieving traceability and verifiability of complex batch requests. The final task processing results can be structured and output through a unified output assembly mechanism (such as Excel backfilling, PPT templates, and report generation), and asynchronously notified to users via business IM, email, or Lark, avoiding blocking waits. During task scheduling, dynamic scheduling can be performed based on task priority, backpressure control, and speculative execution to reduce tail latency. Idempotent fingerprints prevent duplicate execution, and fixed seeds and style constraints ensure consistency of results across tasks. Package the results into standardized deliverables and reflect the progress and status in the interface and event flow to facilitate auditing and identification.

[0087] In one embodiment of this application, when there are no upstream or downstream dependencies between atomic tasks, the execution result of the atomic task can be provided to the user after the atomic task is completed. This way, if the user finds a problem, they can make timely adjustments and interventions, avoiding unnecessary waiting time and wasted computing power.

[0088] Based on the technical solutions of this application, users can perform batch task hosting with very low barriers to entry, without the need for complex development of intelligent agents, workflows, etc. The structured representation based on execution plans can transform natural language user input into executable plans, ensuring that batch tasks are transparent and auditable. Task graphs, unlike simple parallelism, can support complex sequence orders and barrier synchronization. Deliverable-level assembly and asynchronous notifications can directly output standardized deliverables, rather than fragmented results, greatly improving the user experience for enterprises.

[0089] To facilitate better implementation of the batch task processing method of this application, this application also provides a batch task processing apparatus based on the above-described batch task processing method. The meanings of the terms used are the same as in the batch task processing method described above, and specific implementation details can be found in the descriptions of the method embodiments.

[0090] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a batch task processing device provided in an embodiment of this application, wherein the batch task processing device is applied to an AI dialogue system, the AI ​​dialogue system including a main agent and multiple task agents; the device includes: The input recognition module 901 is used to recognize batch task information and external structured data input by the user based on the main agent; the external structured data represents the result processing method of the batch task. The task parsing module 902 is used to parse the batch task information to obtain multiple atomic tasks, and to expand the external structured data line by line to obtain task instances. The plan generation module 903 is used to generate a structured representation of the execution plan based on the task instance and the multiple atomic tasks; Graph generation module 904 is used to generate a task graph based on the structured representation; the nodes of the task graph represent the atomic tasks, and the directed edges of the task graph represent the dependencies between the nodes. The requirement is to determine module 905, which is used to determine, based on the directed edges between nodes in the task graph, multiple first atomic tasks with serial timing requirements and multiple second atomic tasks without such serial timing requirements. The task execution module 906 is used to determine the task agents corresponding to multiple first atomic tasks in sequence according to the serial timing requirements, and execute the first atomic tasks in sequence based on the task agents, and to determine the task agents corresponding to multiple second atomic tasks asynchronously and in parallel, and execute the multiple second atomic tasks asynchronously and in parallel based on the task agents. The result processing module 907 is used to obtain the execution results of multiple task agents and process the multiple execution results based on the task instance.

[0091] In one embodiment, the task execution module 906 is specifically used to execute: Based on the attributes of multiple second atomic tasks, determine the priority of multiple second atomic tasks; Control multiple task agents to execute the second atomic task asynchronously and in parallel according to the priority; The device further includes: The length monitoring module is used to monitor the length of the task waiting queue, and when the length exceeds the length threshold, the number of the second atomic tasks executed at the same time is reduced. The replica startup module is used to monitor the target task agent that is executing a task. When the execution time of the target task agent exceeds the time threshold corresponding to the current task, the task agent replica corresponding to the target task agent is started. The stop execution module is used to execute the current task based on the task agent copy. When either the target task agent or the task agent copy obtains the execution result first, the module obtains the execution result and controls the other to stop executing the current task.

[0092] In one embodiment, the device further includes: An exception reporting module is used to obtain exception information reported by the task agent when an exception occurs during the execution of the atomic task by the task agent; The anomaly classification module is used to obtain the anomaly root cause category and the anomaly resolution strategy corresponding to each anomaly root cause. The strategy acquisition module is used to determine the root cause category of the anomaly based on the anomaly information, and to acquire the anomaly resolution strategy corresponding to the root cause category. The strategy execution module is used to execute the exception handling strategy.

[0093] In one embodiment, the device further includes: The key information acquisition module is used to acquire key information of the atomic task when the task agent executes the atomic task; the key information includes: core operation, input parameters, model version and / or random number seed; The hash operation module is used to perform hash operations on the key information of the atomic task to obtain the idempotent fingerprint of the atomic task; The result assurance module is used to ensure that repeated executions of the atomic task yield consistent results based on the idempotent fingerprint of the atomic task.

[0094] In one embodiment, the graph generation module 904 is specifically used to perform: Identify the dependent fields in the structured representation; When the dependency field records the dependencies between the atomic tasks, the dependencies between the atomic tasks are determined. When the dependency field does not record the dependency relationship between the atomic tasks, the structured representation is semantically understood, and the dependency relationship between the atomic tasks is determined based on the semantic understanding result. The nodes of the task graph are determined based on the atomic tasks, and directed edges are generated between the nodes based on the dependencies between the atomic tasks, thus obtaining the task graph.

[0095] In one embodiment, the result processing module 907 is specifically used to perform: The result aggregation method and notification method will be determined based on the task instance; According to the aggregation method, the multiple execution results are aggregated to obtain the task processing result of the batch task; Send the task processing result according to the notification method described above.

[0096] In one embodiment, the task execution module 906 is specifically used to execute: Obtain the attributes of the atomic task; Obtain the attributes of multiple task agents; The task agent corresponding to the atomic task is determined based on the matching degree between the attributes of the atomic task and the attributes of the multiple task agents.

[0097] The AI ​​dialogue system, employing the technical solution of this application embodiment, includes a main agent and task agents. Based on the main agent, a structured representation of the execution plan and a task graph are generated, and atomic tasks and task agents are scheduled. This ensures the orderly execution of tasks and the standardization of result processing. Executing individual atomic tasks through multiple task agents enables efficient parallel execution of atomic tasks, improving the stability and fault tolerance of task execution. Parsing batch tasks yields atomic tasks, which represent minimal execution delays, thus eliminating the coupling of task logic and avoiding the problems of difficult-to-locate execution anomalies and high adjustment costs caused by excessively large task granularity. Expanding external structured data line by line to obtain task instances ensures accurate mapping of external structured data, thereby obtaining an accurate batch task result processing method. This allows subsequent processing of multiple execution results according to this method. Generating a structured representation of the execution plan based on task instances and multiple atomic tasks provides a computer-readable execution plan for task scheduling, and further, based on this structured representation of the execution plan... Generating a task graph visually presents the serial / parallel dependencies and data flow paths between atomic tasks, enabling the main agent to quickly identify the dependency chains of multiple first atomic tasks with serial timing requirements and multiple second atomic tasks without serial timing requirements, thereby reducing scheduling complexity. By sequentially determining the task agents corresponding to multiple first atomic tasks according to serial timing requirements and executing the first atomic tasks sequentially based on the task agents, and asynchronously and in parallel determining the task agents corresponding to multiple second atomic tasks and executing the second atomic tasks asynchronously and in parallel based on the task agents, the sequential ordered execution and parallel synchronous processing of batch tasks can be achieved, significantly improving batch task processing efficiency and meeting the high-efficiency processing requirements of parallel tasks. Furthermore, the technical solution of this application embodiment does not require users to have professional orchestration skills. Relying on the main agent to identify batch task information and automatically generate execution plans to realize the conversion of batch tasks into a task graph, it avoids the problem of the separation between the process canvas and natural language conversation in related technologies, lowers the usage threshold, and adapts to diverse batch task processing scenarios.

[0098] Specific limitations regarding the batch task processing device can be found in the limitations of the batch task processing method described above, and will not be repeated here. Each module in the aforementioned batch task processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0099] In addition, this application also provides an electronic device, such as Figure 10 As shown, it illustrates the structural diagram of the electronic device involved in this application, specifically: The electronic device may include components such as a processor 101 with one or more processing cores and a memory 102 of one or more computer-readable storage media. Those skilled in the art will understand that... Figure 10 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 101 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 102, and by calling data stored in the memory 102, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 101 may include one or more processing cores; preferably, the processor 101 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 101.

[0100] The memory 102 can be used to store software programs and modules. The processor 101 executes various functional applications and data processing by running the software programs and modules stored in the memory 102. The memory 102 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 102 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 102 may also include a memory controller to provide the processor 101 with access to the memory 102.

[0101] In one embodiment, the electronic device further includes a power supply 103 for supplying power to the various components. Preferably, the power supply 103 can be logically connected to the processor 101 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 103 may also include one or more DC or AC power supplies, recharging systems, power equipment debugging circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0102] In one embodiment, the electronic device may further include an input unit 104, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0103] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 101 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 102 according to the following instructions, and the processor 101 runs the applications stored in the memory 102, thereby implementing the steps in any batch task processing method provided in the embodiments of this application.

[0104] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0105] In one embodiment, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the methods described in any embodiment of this application.

[0106] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of this application.

[0107] In some embodiments, a computer program product is also provided, including a computer program or instructions that, when executed by a processor, implement the methods described in any embodiment of this application.

[0108] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0109] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0110] Therefore, this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps in any of the batch task processing methods provided in this application.

[0111] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0112] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0113] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the batch task processing methods provided in this application, the beneficial effects that any of the batch task processing methods provided in this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0114] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0115] The above provides a detailed description of a batch task processing method, apparatus, electronic device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A batch task processing method, characterized in that, The method is applied to an AI dialogue system, which includes a main agent and multiple task agents; the method includes: The main agent identifies batch task information and external structured data input by the user; the external structured data represents the result processing method of the batch tasks. The batch task information is parsed to obtain multiple atomic tasks, and the external structured data is expanded line by line to obtain task instances; Based on the task instance and the multiple atomic tasks, a structured representation of the execution plan is generated; A task graph is generated based on the structured representation; the nodes of the task graph represent the atomic tasks, and the directed edges of the task graph represent the dependencies between the nodes. Based on the directed edges between nodes in the task graph, determine multiple first atomic tasks with serial timing requirements and multiple second atomic tasks without such serial timing requirements. According to the serial timing requirements, a plurality of task proxies corresponding to the first atomic tasks are determined sequentially, and the first atomic tasks are executed sequentially based on the task proxies. In addition, a plurality of task proxies corresponding to the second atomic tasks are determined asynchronously and in parallel, and a plurality of second atomic tasks are executed asynchronously and in parallel based on the task proxies. Obtain the execution results of multiple task agents, and process the multiple execution results based on the task instance.

2. The method according to claim 1, characterized in that, The asynchronous parallel execution of multiple second atomic tasks based on the task agent includes: Based on the attributes of multiple second atomic tasks, determine the priority of multiple second atomic tasks; Control multiple task agents to execute the second atomic task asynchronously and in parallel according to the priority; The method further includes: Monitor the length of the task waiting queue, and when the length exceeds a length threshold, reduce the number of the second atomic tasks that are executed simultaneously; Monitor the target task agent that is executing a task, and when the execution time of the target task agent exceeds the time threshold corresponding to the current task, start the task agent copy corresponding to the target task agent; The current task is executed based on the task agent copy. When either the target task agent or the task agent copy obtains the execution result first, the execution result is obtained, and the other is controlled to stop executing the current task.

3. The method according to claim 1, characterized in that, The method further includes: When an exception occurs during the execution of the atomic task by the task agent, obtain the exception information reported by the task agent; Obtain the types of root causes of anomalies, and the corresponding anomaly resolution strategies for each type of root cause; Based on the anomaly information, determine the anomaly root cause category to which the anomaly belongs, and obtain the anomaly resolution strategy corresponding to the anomaly root cause category; Execute the aforementioned exception handling strategy.

4. The method according to claim 1, characterized in that, The method further includes: When the task agent executes the atomic task, it obtains key information about the atomic task; the key information includes: core operations, input parameters, model version and / or random number seed; A hash operation is performed on the key information of the atomic task to obtain the idempotent fingerprint of the atomic task; Based on the idempotent fingerprint of the atomic task, the consistent results of repeated execution of the atomic task are ensured.

5. The method according to claim 1, characterized in that, The generation of the task graph based on the structured representation includes: Identify the dependent fields in the structured representation; When the dependency field records the dependencies between the atomic tasks, the dependencies between the atomic tasks are determined. When the dependency field does not record the dependency relationship between the atomic tasks, the structured representation is semantically understood, and the dependency relationship between the atomic tasks is determined based on the semantic understanding result. The nodes of the task graph are determined based on the atomic tasks, and directed edges are generated between the nodes based on the dependencies between the atomic tasks, thus obtaining the task graph.

6. The method according to claim 1, characterized in that, The processing of multiple execution results based on the task instance includes: The result aggregation method and notification method will be determined based on the task instance; According to the aggregation method, the multiple execution results are aggregated to obtain the task processing result of the batch task; Send the task processing result according to the notification method described above.

7. The method according to claim 1, characterized in that, Determining the task agent corresponding to the atomic task includes: Obtain the attributes of the atomic task; Obtain the attributes of multiple task agents; The task agent corresponding to the atomic task is determined based on the matching degree between the attributes of the atomic task and the attributes of the multiple task agents.

8. A batch task processing device, characterized in that, The device is applied to an AI dialogue system, which includes a main agent and multiple task agents; the device includes: The input recognition module is used to recognize batch task information and external structured data input by the user based on the main agent; the external structured data represents the result processing method of the batch task. The task parsing module is used to parse the batch task information to obtain multiple atomic tasks, and to expand the external structured data line by line to obtain task instances; The plan generation module is used to generate a structured representation of the execution plan based on the task instance and multiple atomic tasks; A graph generation module is used to generate a task graph based on the structured representation; the nodes of the task graph represent the atomic tasks, and the directed edges of the task graph represent the dependencies between the nodes. The requirement is to determine the module, which is used to determine, based on the directed edges between nodes in the task graph, multiple first atomic tasks that have serial timing requirements and multiple second atomic tasks that do not have the serial timing requirements. The task execution module is configured to sequentially determine task agents corresponding to multiple first atomic tasks according to the serial timing requirements, and sequentially execute the first atomic tasks based on the task agents, and asynchronously and in parallel determine task agents corresponding to multiple second atomic tasks, and asynchronously and in parallel execute multiple second atomic tasks based on the task agents. The result processing module is used to obtain the execution results of multiple task agents and process the multiple execution results based on the task instance.

9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the batch task processing method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the batch task processing method as described in any one of claims 1 to 7.