Task processing method and device, electronic equipment, storage medium and program product
By using a three-tier architecture of "planner-guide-executor" and MCP protocol decoupling tools, the problems of logical confusion and poor quality in complex tasks are solved, and the stability, logical consistency and high-quality execution of task processing are achieved.
Patent Information
- Application Number
- CN202610756948.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-08-25
AI Technical Summary
Existing technologies suffer from logical confusion and poor processing quality in handling complex tasks, mainly due to the coupling between planning and execution, which leads to distraction and difficulty in accurately conveying planning results.
A multi-role collaboration mechanism is adopted to form a three-layer logical architecture of "planner-guide-executor". The planner plans the task, the guide generates detailed execution guidance, and the executor executes the sub-tasks. The MCP protocol is used to achieve decoupling of tool calls.
It improves the stability and logical consistency of task processing, ensures that the execution results are consistent with the original planning intentions, enhances the quality and maintainability of task processing, and has high scalability and rapid response capabilities.
Smart Images

Figure CN122633259A_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of computer technology, and in particular to a task processing method, apparatus, electronic device, storage medium, and program product. Background Technology
[0002] In the field of AI-driven content production, AI models are often needed to complete specific tasks, such as generating lengthy analytical reports. However, in the processing of some complex tasks, problems such as logical inconsistencies and poor processing quality often arise. Summary of the Invention
[0003] This specification provides an information processing method, apparatus, electronic device, storage medium, and program product. The embodiments of this specification employ the following technical solutions: Firstly, a task processing method is provided, including: In response to receiving a request to instruct a first task, the first intelligent unit is used to plan the first task to obtain planning information for the first task, the planning information indicating at least one sub-task. The planning information is provided to the second intelligent unit to obtain guidance information for each sub-task; The guidance information for the at least one sub-task is provided to at least one third intelligent unit so that the at least one third intelligent unit can execute the at least one sub-task.
[0004] Secondly, a task processing device is provided, comprising: A planning module is configured to, in response to receiving a request indicating a first task, plan the first task using a first intelligent unit to obtain planning information for the first task, wherein the planning information indicates at least one sub-task. The guidance module is used to provide the planning information to the second intelligent unit to obtain guidance information for each sub-task; An execution module is configured to provide guidance information for the at least one sub-task to at least one third intelligent unit, so that the at least one third intelligent unit may execute the at least one sub-task.
[0005] Thirdly, an electronic device is provided, comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the task processing method provided in the first aspect.
[0006] Fourthly, a computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the task processing method provided in the first aspect.
[0007] Fifthly, a computer program product is provided, the computer program product including a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps in the task processing method provided in the first aspect.
[0008] The solution in the embodiments of this specification adopts a multi-role intelligent unit collaborative mechanism to process tasks, forming a three-layer logical architecture of "planner-guide-executor". Planning, guidance and execution are completely separated and undertaken by different intelligent units. This decoupling design enables each intelligent unit to focus on its own work, which helps to improve the execution stability and logical consistency of the task.
[0009] Furthermore, the guidance information for subtasks can provide clear and detailed execution instructions for each subtask. On the one hand, this helps the executor better understand the global positioning of the subtask without needing to re-reason, thereby reducing computational load and ensuring consistency between the execution result and the initial planning intent. On the other hand, it can prevent the executor from adopting an "egalitarian strategy" to handle subtasks, ensuring that the executor develops a deep understanding and analysis of the subtasks. Moreover, it allows the executor to move beyond processing pre-set fixed tasks and dynamically adjust execution capabilities according to specific needs and upstream planning. This not only improves task processing quality but also makes the task processing method in the embodiments of this specification maintainable and highly scalable, enabling rapid response to various task requests. Attached Figure Description
[0010] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings: Figure 1 This is a schematic diagram of an example environment in which the embodiments of this specification can be implemented. Figure 2 This is a flowchart illustrating a task processing method according to one embodiment; Figure 3 This is a schematic diagram of the structure of a task processing device according to one embodiment; Figure 4 This is a schematic diagram of the structure of an electronic device according to one embodiment. Detailed Implementation
[0011] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this document.
[0012] The term "comprising" and its variations as used in this document are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the following description. The term "in response to" indicates that the performed operation depends on a condition or state. When the dependent condition or state is met, one or more operations may be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which multiple operations are performed.
[0013] It should be noted that the concepts of "first" and "second" mentioned in this document are used only to distinguish different devices, modules or units, and are not used to restrict the order of functions performed by these devices, modules or units or their interdependencies.
[0014] It should be noted that the terms "one" and "more" used in this document are illustrative rather than restrictive, and those skilled in the art should understand that, unless explicitly stated otherwise in the context, they should be understood as "one or more".
[0015] The names of messages or information exchanged between multiple devices in this document are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0016] In this document, any processing of personal information will be conducted only on a legal basis (such as with the consent of the data subject or as necessary for the performance of a contract) and will only be carried out within the scope stipulated or agreed upon. A user's refusal to have personal information beyond what is necessary for basic functions processed will not affect their use of basic functions.
[0017] As mentioned earlier, problems such as logical inconsistencies and poor processing quality often arise during the processing of some complex tasks. Therefore, improving the logical consistency and processing quality of tasks remains a bottleneck that urgently needs to be overcome.
[0018] Through extensive research, the applicant discovered that the root cause of the low reliability and logical inconsistencies in task execution lies in the fact that existing task processing mechanisms have not yet achieved the coupling of "planning" and "execution": when executing specific tasks, dynamic planning is often required simultaneously. This "execute while planning" model leads to a dispersion of the model's "attention"—it has to understand the specific requirements of the current step, as well as perform complex tool selection and logical reasoning, making it prone to errors and resulting in unstable execution.
[0019] In view of this, the task processing method provided in the embodiments of this specification adopts a multi-role collaborative mechanism to process tasks. By separating "planning" and "execution," which are undertaken by different intelligent units respectively—the intelligent unit acting as the planner plans the task to obtain at least one sub-task, and the intelligent unit acting as the executor executes these sub-tasks. This decoupling design allows each intelligent unit to focus its attention on its own work, which helps to improve the execution stability and logical consistency of the task.
[0020] However, this two-tiered "planner-executor" architecture has revealed two significant limitations in practice: Rigidity and Insufficient Generalization: Many intelligent units have hard-coded logic and rigid dependencies on specific context states in their design. This means that when these intelligent units act as executors, they can only handle pre-defined, fixed tasks and lack the ability to dynamically adjust strategies according to specific needs. Faced with fine-tuning of upstream planning or lack of contextual information, the executor may fail to function.
[0021] Planning quality is difficult to pass down: Planners typically output high-level natural language descriptions. Due to the highly compressed nature of natural language descriptions, original requirement information is lost during transmission. Implementers, unable to obtain the global location of subtasks, are forced to re-reason. This not only increases the computational load but also makes it difficult to guarantee that the reasoning results are completely consistent with the original planning intent.
[0022] To address this, the two-layer "planner-executor" architecture is improved to a three-layer "planner-guide-executor" architecture. This involves adding an intelligent unit acting as a guide. After the planner designs the task and obtains at least one sub-task, the guide generates highly customized, real-time guidance information for each sub-task. This guidance information provides clear and detailed execution instructions for the sub-task. Furthermore, by providing the guidance information for the sub-task to the corresponding executor, on the one hand, it helps the executor better understand the global positioning of the sub-task without needing to re-reason, thereby reducing computational load and ensuring consistency between the execution result and the initial planning intention. On the other hand, it avoids the executor adopting an "egalitarian strategy" to handle sub-tasks, ensuring that the executor develops a deep understanding and analysis of the sub-tasks. Additionally, it allows the executor to move beyond handling pre-set, fixed tasks and dynamically adjust its execution capabilities based on specific needs and upstream planning. Therefore, this not only improves task processing quality but also makes the task processing method in this embodiment maintainable and highly scalable, enabling rapid response to various task requests.
[0023] As can be seen, the task processing method provided in the embodiments of this specification adopts a three-layer architecture of "planner-guide-executor". Through the layer-by-layer refinement mechanism, it achieves a complete separation of macro-level planning, micro-level guidance and specific execution, ensuring the stability, logical consistency and analytical depth of complex task execution, and improving the quality of task processing.
[0024] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0025] Figure 1 A schematic diagram illustrates an example environment in which embodiments of this specification can be implemented. For example... Figure 1 As shown, this example environment may include an electronic device 110 and an intelligent system 120.
[0026] An application 111 is installed in the electronic device 110, and the user 130 can interact with the application 111 through the electronic device 110. In some embodiments, the application 111 can present a corresponding interface to the user 130 based on the user's operation, so as to output and / or receive relevant information from the user 130. The application 111 supports multiple modalities of input, such as text, audio, and visual (e.g., images, video).
[0027] Application 111 can invoke intelligent system 120 to process relevant information received from user 130. For example, application 111 can receive a task to be processed input by user 130 through the interface, invoke intelligent system 120 to process the task, and receive execution information output by intelligent system 120; application 111 also presents the execution information of the task to user 130 through the interface. The execution information of the task may include, but is not limited to, at least one of the following: task execution result, execution status, execution progress, etc.
[0028] The intelligent system 120 may include multiple intelligent units 121. Each intelligent unit 121 possesses information understanding and processing capabilities. Each intelligent unit 121 may be constructed based on one or more machine learning models. In some embodiments, the machine learning model upon which the intelligent unit 121 is based may include, but is not limited to, at least one of the following: a language model (such as a large language model), a multimodal model, etc.
[0029] In some embodiments, the intelligent unit 121 in the intelligent system 120 may have specific roles. For example, one or more intelligent units may act as planners, planning tasks to decompose them into at least one subtask; one or more intelligent units may act as guides, generating corresponding guidance information for each subtask to provide clear and detailed execution guidance for the subtask; one or more intelligent units may act as executors, executing subtasks based on the guidance information. Application 111 can synthesize the execution information of all subtasks to obtain task execution information and present it to the user 130 through an interface.
[0030] In some embodiments, the intelligent unit 121 may invoke one or more tools 140 to assist in task execution and provide execution information according to task requirements. These tools 140 may include any type of tool, such as functions. These tools 140 may be used to perform specific operations, such as sending messages, creating files, querying databases, etc.
[0031] In some embodiments, electronic device 110 can communicate with a server (not shown) to provide services to application 111. Electronic device 110 may include any type of mobile terminal, fixed terminal, or portable terminal, specifically including but not limited to: smartphones, tablets, laptops, desktop computers, smart voice interaction devices, smart wearable devices, etc.
[0032] although Figure 1The intelligent system 120 and the electronic device 110 are configured separately, but this document is not limited to this. In some embodiments, some or all of the intelligent units in the intelligent system 120 may be deployed locally on the electronic device 110 or deployed remotely. When some or all of the intelligent units are deployed remotely, the electronic device 110 may directly invoke these intelligent units or invoke them via a server.
[0033] It should be understood that the above description of the structure and function of the various elements in the example environment is for illustrative purposes only and does not constitute any limitation on the scope of this document.
[0034] Figure 2 This is a flowchart illustrating a task processing method according to one embodiment. The method may include the following steps: S202, in response to receiving a request to instruct a first task, the first intelligent unit is used to plan the first task to obtain planning information for the first task, the planning information indicating at least one sub-task.
[0035] The first task can be understood as any task to be processed. In some embodiments, the application may present an interface for user interaction, in which requests initiated by the user can be received. Exemplarily, the interactive interface provides an input area for task input and a send control for triggering a request. In the input area, the user can input the first task to be performed, such as describing the first task in natural language, and initiate a request to instruct the first task through the send control.
[0036] The first intelligent unit can be understood as an intelligent unit acting as a planner. The first intelligent unit has the ability to understand intent and plan tasks.
[0037] In some embodiments, S202 may include instructing the first intelligent unit to understand the macroscopic intent of the first task and convert it into structured planning information. For example, a third prompt word may be input into the first intelligent unit, and planning information output by the first intelligent unit may be received. The third prompt word includes the first task, and the third prompt word is used to instruct task planning based on the understanding of the intent of the first task.
[0038] In some other embodiments, S202 may include instructing the first intelligent unit to perform the following operations: obtaining requirement information for a first task, generating a content directory of the execution results of the first task based on the first object and the requirement information, the content directory indicating at least one chapter information, and converting the at least one chapter information into a corresponding subtask.
[0039] For example, a fourth prompt word can be input into the first intelligent unit. The fourth prompt word may include the first task and indicate the above operation.
[0040] The requirements for the first task may include, but are not limited to, at least one of the following: the target audience, the purpose of the analysis, and the structural requirements for the planned information. The table of contents may include titles for at least one chapter. For example, if the first task is "to generate a marketing review report for brand XX regarding the XX market, with an analysis period of the most recent year," the target audience may include, but is not limited to, the brand, industry, and time period; the purpose of the analysis may include a review; and the structural requirements for the planned information may include a marketing review report format.
[0041] The first intelligent unit can generate a content catalog based on a built-in template library or a user-specified catalog template. The report template library stores report templates suitable for different industries and analytical purposes. The first intelligent unit can select a catalog template suitable for the first task from the report template library based on the analytical purpose and industry of the first task, and generate a content catalog based on that catalog template.
[0042] For each chapter of information in the report template library, the first intelligent unit can convert that chapter information into a standardized and executable subtask.
[0043] It is understandable that by instructing the first intelligent unit to perform the above operations, the first intelligent unit can be guided to understand and plan the first task more deeply and in a more granular manner, thereby obtaining more accurate and reasonable planning information.
[0044] The planning information for the first task may include task information for each subtask. In some embodiments, the task information for a subtask may include, but is not limited to, at least one of the following: a unique identifier for the subtask, the chapter information corresponding to the subtask in the content directory, a description of the subtask's objective, task information of the preceding subtasks that the subtask depends on, and a parameter template required to execute the subtask. The parameter template defines the core elements that need to be obtained from the global context.
[0045] In some embodiments, the planning information for the first task may further include at least one of the following: a global objective for the first task, a table of contents for the execution results of the first task, etc. The global objective indicates the goal to be achieved in processing the first task, and may include the analytical purpose of the first task, etc. The global objective helps to more accurately understand the global positioning of subtasks when guiding and executing them subsequently. The table of contents helps to organize and output the execution results of the first task.
[0046] The planning information for the first task supports multiple formats. In some embodiments, the planning information can be encapsulated as a JSON (JavaScript Object Notation) object, using a key-value pair structure to carry hierarchical planning logic.
[0047] The above illustrates a partial implementation of S202. It should be understood that S202 can also be implemented in other ways, and no limitation is made thereto.
[0048] S204, the planning information is given to the second intelligent unit to obtain guidance information for each subtask.
[0049] The second intelligent unit can be understood as an intelligent unit acting as a guide. It possesses information understanding and generation capabilities, and can generate highly customized, real-time guidance information for each sub-task based on its understanding of the planning information.
[0050] In some embodiments, the guidance information for a subtask may include, but is not limited to, at least one of the following: the analysis logic of the subtask, the tools to be called to complete the subtask, the resources to be used to complete the subtask, the prompt template for indicating the execution of the subtask, the workflow for guiding the tool call, the parameter constraints of the tool, the constraints of the subtask, the verification rules corresponding to the subtask, and the context whitelist of the subtask.
[0051] The analysis logic indicates the analysis steps and reasoning paths of the subtask. Tools can include various functions used to perform specific operations, such as sending messages, creating files, and querying databases. Resources can include readable data, such as file content, database records, and application programming interface (API) responses. Prompt templates can include predefined user interaction flows to guide the intelligent unit in completing specific tasks. The workflow indicates a recommended list of tools, the order in which tools are invoked, and methods for interpreting tool results. Tool parameter constraints can include, but are not limited to, at least one of the following: detailed format of parameters required for tool invocation, and requirements for the structure, format, or layout of the final output. Subtask constraints indicate the conditions that must be met to execute the subtask, such as the output format of the execution result. Validation rules can include the content to be verified and the criteria for passing the verification. A context whitelist is used to restrict the context information used to complete the subtask and can be used to create a minimal runtime environment.
[0052] Understandably, the above guidance information can provide executors with clear and detailed execution guidance. It not only helps executors better understand the global positioning of subtasks without having to re-reason, thereby reducing computational load and ensuring that the execution results are consistent with the original planning intentions, but also avoids executors adopting an "egalitarian strategy" to handle subtasks. It ensures that executors form a deep understanding and analysis of subtasks, laying the foundation for the accurate execution of subsequent subtasks.
[0053] In some embodiments, in addition to the information above, the guidance information for a subtask may also include the task information for the subtask.
[0054] In some embodiments, S204 may include: for each subtask, obtaining first knowledge information matching the subtask from a first knowledge base based on the task information of the subtask; and providing the first knowledge information and the task information of the subtask to a second intelligent unit so that the second intelligent unit can generate guidance information for the subtask.
[0055] For example, the first knowledge base can be a pre-defined knowledge base that stores knowledge information corresponding to different task information, such as best practice information for different analysis topics and different analysis purposes. To this end, the analysis purpose and the corresponding chapter information in the content directory can be obtained from the task information of the subtask, and the most relevant first knowledge information can be matched in the first knowledge base based on the analysis purpose and chapter information.
[0056] The first knowledge information and the task information of the subtask can be provided to the second intelligent unit in the form of prompt words. For example, a fifth prompt word can be input into the second intelligent unit. The fifth prompt word may include the first knowledge information and the task information of the subtask, and the fifth prompt word indicates that corresponding guidance information should be generated for the subtask.
[0057] It is understandable that firstly matching the first knowledge information to the sub-task based on the planning information, and then providing the first knowledge information and the task information of the sub-task together to the second intelligent unit, helps the second intelligent unit to understand the original intention of the planning of the first task more deeply, and to customize guidance information for the sub-task in a more targeted manner.
[0058] In other embodiments, the planning information can be directly input into the second intelligent unit, which then generates corresponding guidance information for each subtask based on the planning information.
[0059] The above illustrates a partial implementation of S204. It should be understood that S204 can also be implemented in other ways, and no limitation is made thereto.
[0060] S206, providing guidance information for at least one sub-task to at least one third intelligent unit so that at least one third intelligent unit can execute at least one sub-task.
[0061] The third intelligent unit can be understood as an intelligent unit acting as an executor. The third intelligent unit possesses information understanding and task execution capabilities. It can execute sub-tasks based on its understanding of the guidance information for those sub-tasks and output the execution information of the sub-tasks. The execution information of the sub-tasks can include various information related to the execution of the sub-tasks, such as, but not limited to, at least one of the following: data on which the sub-task execution depends, description information of the sub-tasks, execution results of the sub-tasks, execution progress of the sub-tasks, and execution status of the sub-tasks (e.g., pending execution, in progress, completed).
[0062] It's worth noting that the third intelligent unit often involves calling external tools during the execution of subtasks. Typically, this requires integration using proprietary plugins or customized application programming interfaces (APIs). Faced with a large set of tools with similar functions, the third intelligent unit struggles to accurately and efficiently select the most suitable tool without explicit guidance. Secondly, many best practices for these tools, such as correct parameter formats, call order, retry logic, and interpretation of return results, are implicit knowledge. In proprietary integration models, this knowledge is usually hard-coded into the third intelligent unit's logic, leading to high coupling between the third intelligent unit and the tool. Furthermore, adapting the same tool to different third intelligent units requires repetitive development, and the coarse-grained access control makes it difficult to achieve minimum necessary authorization, posing security risks.
[0063] In view of this, the third intelligent unit can be configured to call external tools based on the MCP (Model Context Protocol).
[0064] The MCP protocol is an open standard protocol designed to standardize bidirectional connections and context management between artificial intelligence applications and external data sources and tools. It defines a set of standard protocols that allow models or intelligent units to securely and reliably invoke external capabilities in a "plug-and-play" manner. The MCP architecture typically includes three core roles: the MCP host, the MCP client, and the MCP server. The MCP host hosts AI-interactive applications, such as AI assistants and IDEs (Integrated Development Environment Plugins). The MCP client runs within the MCP host and is responsible for communicating with the MCP server. The MCP server understands the server exposing specific capabilities and provides the following three core primitives according to the protocol standard: resources, tools, and prompt templates.
[0065] For example, a third intelligent unit can be configured and connected to an MCP server. After the connection is established, the third intelligent unit, acting as an MCP client, actively queries the MCP server for the tools it provides. The server returns a list of tools, including the name, function description, and required parameter structure of each tool. Based on the parameter requirements of the selected tool, the third intelligent unit constructs a standardized request and sends it to the corresponding MCP server via the MCP protocol. Upon receiving the request, the MCP server parses the tool and parameters to be invoked, executes its internal logic, and obtains the result. The MCP server encapsulates the result of the tool execution in a standard response and returns it to the third intelligent unit.
[0066] As can be seen, MCP decouples tools from third-party intelligent units by developing a protocol layer, supports reuse across intelligent units and applications, and ensures secure authorization and minimum necessary context passing through standardized protocols, effectively reducing context noise and tool coupling.
[0067] In terms of security: By establishing a mandatory and unified authentication "gate" on the MCP server, the risk of data leakage due to oversights in interface implementation can be eliminated. All data access must undergo strict verification based on the user's real identity and resource ownership, ensuring compliance with data privacy regulations for external clients.
[0068] Regarding the consistency of permission policies: all MCP tools follow the same set of authentication object selection logic, the same set of interaction methods with external permission services, and the same set of error handling standards. This ensures that permission policies are highly consistent across the entire platform, eliminating policy "gaps".
[0069] Regarding system maintainability and iteration efficiency: Common logic such as access control, data anonymization, and identifier escaping can be extracted from business code and integrated into the framework layer. When creating new MCP tools, business developers only need to focus on the business logic itself, simplifying development. Furthermore, when the access control model, data anonymization rules, or identifier services change, only the unified implementation at the framework layer needs to be modified, and all MCP tools will automatically take effect without requiring individual modifications, greatly improving maintenance efficiency.
[0070] In terms of development efficiency and engineering implementation: For complex scenarios such as competitor analysis, standardized interface conventions and implementation paradigms enable developers to quickly and systematically create new data interfaces, avoiding repetitive work and inconsistent implementations, and accelerating the response speed to task requirements.
[0071] In terms of scalability: the intelligent unit is responsible for business orchestration and context provision, the MCP protocol is responsible for the implementation of permissions and compliance, and the model focuses on business understanding and content generation. Each part has a single responsibility and clear boundaries. When it is necessary to access new data sources or support new resource types, it is only necessary to add support for new resource types to the unified authentication logic, or add corresponding tags to special interfaces, so that new resources can be smoothly incorporated into the permission control system, which has strong scalability.
[0072] In terms of performance and stability: It can liberate the deterministic logic of access control from the "soft constraints" of prompt words and hand it over to the engineering side for "hard implementation". This allows prompt words to focus more on the task itself, reduces its complexity, and avoids problems caused by model "illusion" or "disobedience", thus improving the stability of the entire artificial intelligence application.
[0073] In some embodiments, the third intelligent unit is configured to execute subtasks based on guidance information without planning. This forces the third intelligent unit to execute subtasks solely according to the guidance information, without the ability to replan or deviate from the guidance information. This allows the third intelligent unit to focus solely on the execution of the specific subtask, avoiding the attention distraction problem caused by the "execute while planning" mode, thereby ensuring the stability of subtask execution.
[0074] In some embodiments, the number of third intelligent units can be one. In this case, guidance information for all subtasks can be provided to the third intelligent unit, meaning that all subtasks are assigned to one third intelligent unit for execution.
[0075] In some embodiments, there can be multiple third intelligent units. In this case, each subtask has a corresponding third intelligent unit; that is, for each subtask, guidance information for that subtask is provided to the corresponding third intelligent unit. For example, each subtask may be executed by one third intelligent unit, or some subtasks may be executed by one third intelligent unit, and other subtasks by another third intelligent unit.
[0076] In some embodiments, S206 may include: For each subtask, a first prompt word is input into the third intelligent unit corresponding to the subtask. The first prompt word may include guidance information for the subtask. The first prompt word instructs the following operations to be performed: generate an execution plan for the subtask based on the guidance information of the subtask; execute the subtask according to the execution plan and output the execution information of the subtask. Receive first execution information, which is output by the third intelligent unit corresponding to the subtask based on the first prompt word. The first execution information corresponds to the subtask.
[0077] The execution plan of a subtask can indicate at least one processing operation. For example, the execution plan of a subtask indicates the following processing operations: First, invoke the tool; second, process the returned data; third, write the first paragraph... Based on this execution plan, the third intelligent unit accurately invokes the tool and obtains the returned data from the tool according to the tool and workflow in the guidance information of the subtask, and then generates and outputs the execution information of the subtask according to the analysis logic and constraints in the guidance information.
[0078] It is understandable that by instructing the third intelligent unit to perform the above operations, the third intelligent unit can be guided to perform sub-tasks more precisely and systematically, thereby improving the processing quality of the sub-tasks.
[0079] Optionally, the first prompt word may instruct the generation of an execution plan for a subtask by: in response to the guidance information of the subtask indicating that the subtask is processed from multiple dimensions, splitting the subtask into multiple microtasks, with the multiple microtasks corresponding to the multiple dimensions; and generating an execution plan for the subtask based on the dependencies between the multiple microtasks and the guidance information of the subtask.
[0080] In this context, a microtask can be understood as a task unit with a smaller granularity than a subtask, such as an atomic task, an atomic operation, or a processing operation of a subtask. When multiple microtasks are interdependent, they can be executed serially by the third intelligent unit; when multiple microtasks are independent, they can be executed in parallel by the third intelligent unit.
[0081] For example, the guidance information for a subtask instructs the analysis of the content strategies of three competitors. Based on this guidance information, a third intelligent unit can be instructed to decompose the subtask into three independent microtasks, each microtask analyzing one competitor. These microtasks share the guidance information of the subtask, but the input parameters of each microtask are different.
[0082] This enables a secondary breakdown of subtasks, which can more effectively guide the third intelligent unit to execute subtasks in a more refined and organized manner.
[0083] Optionally, in response to the guidance information for the subtask including verification rules, the operation performed by the third intelligent unit instructed by the first prompt word may further include: verifying and correcting the execution information of the subtask based on the verification rules.
[0084] This allows the third intelligent unit to execute subtasks according to the logic of "planning → calling → reflecting loop," enabling the third intelligent unit to automatically correct any non-compliant content in the execution information based on verification rules, such as re-calling tools or rewriting parts of the content, to ensure that the output execution information is accurate and reliable.
[0085] In some embodiments, S206 may include: for each third intelligent unit, based on the dependency relationship between at least one subtask, obtaining a first task set and a second task set corresponding to the third intelligent unit from at least one subtask, wherein the first task set includes independent subtasks and the second task set includes dependent subtasks; inputting a second prompt word into the third intelligent unit, wherein the second prompt word includes the first task set and the second task set, and the second prompt word indicates that the first task set is executed in parallel based on the guidance information of the subtasks in the first task set, and the second task set is executed serially based on the guidance information of the subtasks in the second task set.
[0086] In some cases, the dependencies between at least one subtask can be represented using a directed acyclic graph.
[0087] For example, the subtasks assigned to a third intelligent unit for execution include subtasks 1 through 5, where subtasks 1 and 2 are independent, subtask 5 depends on subtask 4, and subtask 4 depends on subtask 3. Based on this, the first task set corresponding to the third intelligent unit includes subtasks 1 and 2, and the second task set corresponding to the third intelligent unit includes subtasks 3, 4, and 5. The second prompt instructs the third intelligent unit to execute subtasks 1 and 2 in parallel, and to execute subtasks 3, 4, and 5 sequentially.
[0088] Thus, the orderly and efficient execution of multiple sub-tasks is achieved within the third intelligent unit.
[0089] In some embodiments, where the guidance information for a subtask includes a context whitelist of the subtask, before S206 above, the process may further include: for each subtask, in response to the triggering of the subtask, obtaining first context information of the subtask based on the context whitelist of the subtask; and providing the first context information to the third intelligent unit corresponding to the subtask.
[0090] Each subtask has a corresponding triggering method. The triggering method of a subtask can be understood as the rule that switches the subtask from a pending state to an executing state, and it determines when and how the subtask is triggered. The triggering method of a subtask can be set according to actual needs.
[0091] Subtasks can be triggered in at least one of the following ways: automatic triggering and manual triggering. Automatic triggering can be understood as automatically triggering the execution of a subtask according to configured triggering rules, without manual intervention. For example, a triggering event can be configured for a subtask, such as the completion of its dependent upstream subtask; in response to the detection of this triggering event, the subtask is triggered.
[0092] Manual triggering can be understood as a designated role (such as the second intelligent unit or the person in charge of the subtask) manually triggering the relevant controls to actively trigger the subtask.
[0093] In response to the triggering of a subtask, the global state of the first task is filtered based on the context whitelist of the subtask to obtain the first context information of the subtask. The global state can include the execution information of each subtask within the first task. The first context information can be a minimal sufficient set filtered from the global state, retaining only the essential and indispensable information necessary to complete the subtask, and removing all redundant, irrelevant, and inferable content and other noise.
[0094] It is understandable that noise can interfere with the judgment of the third intelligent unit, causing it to forget or deviate from the original planning intent when executing sub-tasks, resulting in content unrelated to the sub-tasks, i.e., a "task drift" phenomenon. By obtaining the first context information after removing noise and providing it to the third intelligent unit, this phenomenon can be avoided, thereby improving the execution accuracy of sub-tasks.
[0095] In some cases, the first context information of a subtask may include at least one of the following: the execution result of the first subtask, a summary of the execution result, etc. The first subtask includes the preceding subtasks that the subtask depends on.
[0096] For example, if subtask 1 is executed before subtask 2, and the execution of subtask 2 depends on the execution result of subtask 1, then subtask 1 is the preceding subtask that subtask 2 depends on. Therefore, the first context information of subtask 2 may include, but is not limited to, at least one of the following: the execution result of subtask 1, a summary of that execution result, etc.
[0097] It is understandable that by providing this kind of first context information to the third intelligent unit corresponding to the subtask, the information transmission between the two is strictly constrained when one subtask depends on another. That is, only the execution result or summary of the preceding subtask is transmitted, rather than its complete execution process and original data. This ensures that necessary information is transmitted while minimizing noise.
[0098] In other cases, the first context information of a subtask may also include at least one of the following: the specific requirements of the subtask, the necessary parameters (such as key variables) required to complete the subtask, and the constraints of the subtask (such as output format requirements, output specifications, and permission restrictions).
[0099] It is worth noting that obtaining the first context information of a subtask and providing it to the third intelligent unit can instruct the second intelligent unit to complete it. Furthermore, shared information across the third intelligent unit can be transmitted compliantly through agreed-upon interfaces or referencing strategies, thereby ensuring necessary information transmission while minimizing noise.
[0100] In the above embodiments, the first context information can be provided to the third intelligent unit in various ways, and there is no limitation thereto.
[0101] In some cases, the first context information can be directly input into the third intelligent unit corresponding to the subtask, so that the third intelligent unit can execute the subtask based on the first context information.
[0102] In other cases, the first context information can be injected into the first runtime environment, which is used to run the third intelligent unit corresponding to the subtask. The runtime environments of each third intelligent unit are isolated from each other. The state of the first context information is set to read-only.
[0103] For example, if a subtask needs to be completed by a third intelligent unit calling an external tool based on the MCP protocol, the first context information can be injected as an MCP resource into the runtime environment of the third intelligent unit through the MCP host or client before the third intelligent unit starts.
[0104] Therefore, each third intelligent unit operates as if in a "sandbox," only able to read the first context information of its own assigned subtask and unable to modify it. This ensures security by preventing accidental or malicious tampering of the first context information by the third intelligent unit. It also guarantees isolation, preventing cross-contamination of the first context information between different third intelligent units, avoiding the leakage of irrelevant information such as analysis conclusions, tool call logs, and intermediate artifacts from preceding subtasks into the execution of subsequent subtasks, thus preventing noise and interference. Furthermore, it guarantees determinism, ensuring that the initial design intent of the first intelligent unit is not altered by the third intelligent unit. In short, the second scenario creates a minimal, dedicated operating environment for each subtask, fundamentally eliminating information leakage and interference.
[0105] In some embodiments, after S206 above, the method may further include: obtaining the execution results of at least one subtask; and integrating and performing global consistency verification on the execution results of at least one subtask based on the dependencies between at least one subtask to obtain the execution result of the first task.
[0106] For example, after all subtasks have been executed, the execution results of all subtasks can be integrated and a global consistency check can be performed to obtain the execution result of the first task.
[0107] The integration and global consistency verification of the execution results of at least one subtask can be performed simultaneously or sequentially. For example, the execution results of at least one subtask can be integrated first, and then the integrated result can be verified globally. Alternatively, the execution results of at least one subtask can be verified globally first, and then the execution results of each subtask after verification can be integrated.
[0108] In some cases, the execution results of each subtask can be concatenated and globally consistent according to the dependencies between at least one subtask to obtain the execution result of the first task.
[0109] In other cases, the planning information in response to the first task includes a content directory of the execution results of the first task, and each subtask has corresponding chapter information in the content directory. Based on the dependencies between at least one subtask and the chapter information corresponding to each subtask, the execution results of at least one subtask are concatenated and a global consistency check is performed to obtain the execution result of the first task.
[0110] The aforementioned global consistency check may include, but is not limited to, at least one of the following: Verify the global layout consistency of the execution results of each subtask; Verify the cross-reference consistency of the execution results of each subtask; In response to at least one subtask being generated by a different third intelligent unit, verify the consistency of tool call logs and resource references of each third intelligent unit in the MCP identifier dimension.
[0111] It is understandable that, due to factors such as contextual pollution and task drift, there may be issues such as factual inconsistencies, inconsistent terminology, and inconsistent analytical standards between the execution results output by different third-level intelligent units or the same third-level intelligent unit at different points in time for sub-tasks. By integrating the execution results of each sub-task and performing global consistency verification, the aforementioned problems can be effectively avoided, thereby ensuring the accuracy and reliability of the final execution result of the first task.
[0112] According to the task processing method of the embodiments of this specification, a multi-role intelligent unit collaborative mechanism is adopted to process tasks, forming a three-layer logical architecture of "planner-guide-executor". Planning, guidance and execution are completely separated and undertaken by different intelligent units. This decoupling design enables each intelligent unit to focus on its own work, which helps to improve the execution stability and logical consistency of the task.
[0113] Furthermore, the guidance information for subtasks can provide clear and detailed execution instructions for each subtask. On the one hand, this helps the executor better understand the global positioning of the subtask without needing to re-reason, thereby reducing computational load and ensuring consistency between the execution result and the initial planning intent. On the other hand, it can prevent the executor from adopting an "egalitarian strategy" to handle subtasks, ensuring that the executor develops a deep understanding and analysis of the subtasks. Moreover, it allows the executor to move beyond processing pre-set fixed tasks and dynamically adjust execution capabilities according to specific needs and upstream planning. This not only improves task processing quality but also makes the task processing method in the embodiments of this specification maintainable and highly scalable, enabling rapid response to various task requests.
[0114] In addition, with the above Figure 2Corresponding to the task processing method shown, this specification also provides a task processing device in its embodiments. Figure 3 This is a schematic diagram of the structure of a task processing device 300 according to an embodiment, including: a planning module 310, a guidance module 320 and an execution module 330.
[0115] The planning module 310 is configured to, in response to receiving a request indicating a first task, plan the first task using a first intelligent unit to obtain planning information for the first task, wherein the planning information indicates at least one sub-task.
[0116] The guidance module 320 is used to provide the planning information to the second intelligent unit to obtain guidance information for each sub-task.
[0117] The execution module 330 is used to provide guidance information for the at least one sub-task to at least one third intelligent unit so that the at least one third intelligent unit can execute the at least one sub-task.
[0118] In some embodiments, the guidance information for the subtask includes at least one of the following: the analysis logic of the subtask, the tools required to complete the subtask, the resources required to complete the subtask, a prompt template indicating the execution of the subtask, a workflow for guiding tool calls, the parameter constraints of the tools, the constraints of the subtask, the verification rules corresponding to the subtask, and the context whitelist of the subtask; wherein the context whitelist is used to restrict the context information used to complete the subtask.
[0119] In some embodiments, the third intelligent unit is configured to execute the subtask based on guidance information for the subtask without performing planning.
[0120] In some embodiments, the guidance information for the subtask includes a context whitelist for the subtask, which is used to restrict the context information used to complete the subtask. The task processing device may further include: The first acquisition module is used to acquire the first context information of each subtask in response to the triggering of the subtask, based on the context whitelist of the subtask. The first providing module is used to provide the first context information to the third intelligent unit corresponding to the subtask.
[0121] In some embodiments, the first providing module is configured to: The first context information is injected into the first runtime environment, which is used to run the third intelligent unit corresponding to the subtask. The runtime environments of each third intelligent unit are isolated from each other. Set the state of the first context information to read-only.
[0122] In some embodiments, the first context information includes at least one of the following: the execution result of the first subtask, and a summary of the execution result; The first subtask includes the preceding subtasks that the subtask depends on.
[0123] In some embodiments, the execution module is configured to: For each subtask, a first prompt word is input into the third intelligent unit corresponding to the subtask. The first prompt word includes guidance information for the subtask and instructs the following operations to be performed: generate an execution plan for the subtask based on the guidance information, wherein the execution plan indicates at least one processing operation; execute the subtask according to the execution plan and output the execution information of the subtask. Receive first execution information, which is output by the third intelligent unit corresponding to the subtask based on the first prompt word, and the first execution information corresponds to the subtask.
[0124] In some embodiments, the first prompt word instructs the generation of an execution plan for the subtask in the following manner: In response to the guidance information of the subtask indicating that the subtask is processed from multiple dimensions, the subtask is broken down into multiple microtasks, the multiple microtasks corresponding to the multiple dimensions; Based on the dependencies between the multiple microtasks and the guidance information, an execution plan for the subtasks is generated.
[0125] In some embodiments, the execution module is configured to: For each third intelligent unit, based on the dependency relationship between the at least one subtask, a first task set and a second task set corresponding to the third intelligent unit are obtained from the at least one subtask. The first task set includes independent subtasks, and the second task set includes dependent subtasks. The second prompt word is input into the third intelligent unit; the second prompt word includes the first task set and the second task set, the second prompt word instructs the first task set to be executed in parallel based on the guidance information of the sub-tasks in the first task set, and the second task set to be executed serially based on the guidance information of the sub-tasks in the second task set.
[0126] In some embodiments, the planning module is used for: The first intelligent unit is instructed to perform the following operations: obtain the requirement information of the first task, generate a content directory of the execution result of the first task based on the requirement information, the content directory indicating at least one chapter information, and convert the at least one chapter information into a corresponding sub-task.
[0127] In some embodiments, the task processing apparatus may further include: The second acquisition module is used to acquire the execution result of the at least one subtask; An integration module is used to integrate and perform global consistency verification on the execution results of the at least one subtask based on the dependencies between the at least one subtask, so as to obtain the execution result of the first task.
[0128] According to the task processing device provided in the embodiments of this specification, a multi-role intelligent unit collaborative mechanism is adopted to process tasks, forming a three-layer logical architecture of "planner-guide-executor". Planning, guidance and execution are completely separated and undertaken by different intelligent units. This decoupling design enables each intelligent unit to focus on its own work, which helps to improve the execution stability and logical consistency of the task.
[0129] Furthermore, the guidance information for subtasks can provide clear and detailed execution instructions for each subtask. On the one hand, this helps the executor better understand the global positioning of the subtask without needing to re-reason, thereby reducing computational load and ensuring consistency between the execution result and the initial planning intent. On the other hand, it can prevent the executor from adopting an "egalitarian strategy" to handle subtasks, ensuring that the executor develops a deep understanding and analysis of the subtasks. Moreover, it allows the executor to move beyond processing pre-set fixed tasks and dynamically adjust execution capabilities according to specific needs and upstream planning. This not only improves task processing quality but also makes the task processing method in the embodiments of this specification maintainable and highly scalable, enabling rapid response to various task requests.
[0130] Obviously, the task processing device in the embodiments of this specification can be used as described above. Figure 2 The task processing method shown is the execution entity, thus enabling the method to perform... Figure 2 The functions implemented are the same, so they will not be described in detail here.
[0131] Figure 4 This is a schematic diagram of the structure of an electronic device according to one embodiment. Please refer to... Figure 4At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for other business operations.
[0132] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0133] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.
[0134] The processor reads the corresponding computer program from non-volatile memory into main memory and then executes it, forming a task processing unit at the logical level. The processor executes the program stored in memory and specifically performs the following operations: In response to receiving a request to instruct a first task, the first intelligent unit is used to plan the first task to obtain planning information for the first task, the planning information indicating at least one sub-task. The planning information is provided to the second intelligent unit to obtain guidance information for each sub-task; The guidance information for the at least one sub-task is provided to at least one third intelligent unit so that the at least one third intelligent unit can execute the at least one sub-task.
[0135] The above is as described in this instruction manual. Figure 2The methods executed by the task processing apparatus disclosed in the illustrated embodiments can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor, etc.; it can also be a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this specification. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this specification can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), electrically erasable programmable memory (EPROM), registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0136] It should be understood that the electronic devices described in the embodiments of this specification can realize task processing devices in Figure 2 The embodiments shown have the same function. Since the principle is the same, the embodiments in this specification will not be described again here.
[0137] Of course, in addition to software implementation, the electronic device described in this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0138] The electronic device provided in the embodiments of this specification adopts a multi-role intelligent unit collaborative mechanism to process tasks, forming a three-layer logical architecture of "planner-guide-executor". Planning, guidance and execution are completely separated and undertaken by different intelligent units. This decoupling design enables each intelligent unit to focus on its own work, which helps to improve the execution stability and logical consistency of the task.
[0139] Furthermore, the guidance information for subtasks can provide clear and detailed execution instructions for each subtask. On the one hand, this helps the executor better understand the global positioning of the subtask without needing to re-reason, thereby reducing computational load and ensuring consistency between the execution result and the initial planning intent. On the other hand, it can prevent the executor from adopting an "egalitarian strategy" to handle subtasks, ensuring that the executor develops a deep understanding and analysis of the subtasks. Moreover, it allows the executor to move beyond processing pre-set fixed tasks and dynamically adjust execution capabilities according to specific needs and upstream planning. This not only improves task processing quality but also makes the task processing method in the embodiments of this specification maintainable and highly scalable, enabling rapid response to various task requests.
[0140] This specification also provides an embodiment of a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by an electronic device including multiple applications, enable the electronic device to perform... Figure 2 The method of the illustrated embodiment is specifically used to perform the following operations: In response to receiving a request to instruct a first task, the first intelligent unit is used to plan the first task to obtain planning information for the first task, the planning information indicating at least one sub-task. The planning information is provided to the second intelligent unit to obtain guidance information for each sub-task; The guidance information for the at least one sub-task is provided to at least one third intelligent unit so that the at least one third intelligent unit can execute the at least one sub-task.
[0141] According to the computer-readable storage medium provided in the embodiments of this specification, a multi-role intelligent unit collaborative mechanism is adopted to process tasks, forming a three-layer logical architecture of "planner-guide-executor". Planning, guidance and execution are completely separated and undertaken by different intelligent units. This decoupling design enables each intelligent unit to focus on its own work, which helps to improve the execution stability and logical consistency of the task.
[0142] Furthermore, the guidance information for subtasks can provide clear and detailed execution instructions for each subtask. On the one hand, this helps the executor better understand the global positioning of the subtask without needing to re-reason, thereby reducing computational load and ensuring consistency between the execution result and the initial planning intent. On the other hand, it can prevent the executor from adopting an "egalitarian strategy" to handle subtasks, ensuring that the executor develops a deep understanding and analysis of the subtasks. Moreover, it allows the executor to move beyond processing pre-set fixed tasks and dynamically adjust execution capabilities according to specific needs and upstream planning. This not only improves task processing quality but also makes the task processing method in the embodiments of this specification maintainable and highly scalable, enabling rapid response to various task requests.
[0143] This specification also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps in the task processing method provided in the embodiments of this specification.
[0144] The computer program product provided in the embodiments of this specification adopts a multi-role intelligent unit collaborative mechanism to process tasks, forming a three-layer logical architecture of "planner-guide-executor". Planning, guidance and execution are completely separated and undertaken by different intelligent units. This decoupling design enables each intelligent unit to focus on its own work, which helps to improve the execution stability and logical consistency of the task.
[0145] Furthermore, the guidance information for subtasks can provide clear and detailed execution instructions for each subtask. On the one hand, this helps the executor better understand the global positioning of the subtask without needing to re-reason, thereby reducing computational load and ensuring consistency between the execution result and the initial planning intent. On the other hand, it can prevent the executor from adopting an "egalitarian strategy" to handle subtasks, ensuring that the executor develops a deep understanding and analysis of the subtasks. Moreover, it allows the executor to move beyond processing pre-set fixed tasks and dynamically adjust execution capabilities according to specific needs and upstream planning. This not only improves task processing quality but also makes the task processing method in the embodiments of this specification maintainable and highly scalable, enabling rapid response to various task requests.
[0146] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0147] In summary, the above description is merely a preferred embodiment of this specification and is not intended to limit the scope of protection of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.
[0148] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0149] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory, static random access memory, dynamic random access memory, other types of random access memory, read-only memory, electrically erasable programmable read-only memory, flash memory or other memory technologies, optical disc read-only memory, digital versatile optical disc or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media do not include temporary computer-readable media, such as modulated data signals and carrier waves.
[0150] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0151] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
Claims
1. A task processing method, comprising: In response to receiving a request to instruct a first task, the first intelligent unit is used to plan the first task to obtain planning information for the first task, the planning information indicating at least one sub-task. The planning information is provided to the second intelligent unit to obtain guidance information for each sub-task; The guidance information for the at least one sub-task is provided to at least one third intelligent unit so that the at least one third intelligent unit can execute the at least one sub-task.
2. The method according to claim 1, wherein the guidance information of the subtask includes at least one of the following: the analysis logic of the subtask, the tools to be called to complete the subtask, the resources to be used to complete the subtask, the prompt template for indicating the execution of the subtask, the workflow for guiding the tool call, the parameter constraints of the tool, the constraints of the subtask, the verification rules corresponding to the subtask, and the context whitelist of the subtask.
3. The method according to claim 1, wherein the third intelligent unit is configured to execute the subtask based on the guidance information of the subtask without performing planning.
4. The method according to claim 1, wherein the guidance information for the subtask includes a context whitelist of the subtask; Before providing guidance information for the at least one sub-task to at least one third intelligent unit, the method further includes: For each subtask, in response to the triggering of the subtask, the first context information of the subtask is obtained based on the context whitelist of the subtask; The first context information is provided to the third intelligent unit corresponding to the subtask.
5. The method according to claim 4, wherein providing the first context information to the third intelligent unit corresponding to the subtask comprises: The first context information is injected into the first runtime environment, which is used to run the third intelligent unit corresponding to the subtask. The runtime environments of each third intelligent unit are isolated from each other. Set the state of the first context information to read-only.
6. The method according to claim 4, wherein the first context information includes at least one of the following: the execution result of the first subtask, and a summary of the execution result; in, The first subtask includes the preceding subtasks that the subtask depends on.
7. The method according to claim 1, wherein providing guidance information for the at least one sub-task to at least one third intelligent unit comprises: For each subtask, a first prompt word is input into the third intelligent unit corresponding to the subtask. The first prompt word includes guidance information for the subtask and instructs the following operations to be performed: generate an execution plan for the subtask based on the guidance information of the subtask, and execute the subtask according to the execution plan and output the execution information of the subtask. Receive first execution information, which is output by the third intelligent unit corresponding to the subtask based on the first prompt word, and the first execution information corresponds to the subtask.
8. The method of claim 7, wherein the first prompt word instructs the generation of the execution plan for the subtask in the following manner: In response to the guidance information of the subtask indicating that the subtask is processed from multiple dimensions, the subtask is broken down into multiple microtasks, the multiple microtasks corresponding to the multiple dimensions; Based on the dependencies between the multiple microtasks and the guidance information, an execution plan for the subtasks is generated.
9. The method according to claim 1, wherein providing guidance information for the at least one sub-task to at least one third intelligent unit comprises: For each third intelligent unit, based on the dependency relationship between the at least one subtask, a first task set and a second task set corresponding to the third intelligent unit are obtained from the at least one subtask. The first task set includes independent subtasks, and the second task set includes dependent subtasks. The second prompt word is input into the third intelligent unit; the second prompt word includes the first task set and the second task set, the second prompt word instructs the first task set to be executed in parallel based on the guidance information of the sub-tasks in the first task set, and the second task set to be executed serially based on the guidance information of the sub-tasks in the second task set.
10. The method according to claim 1, wherein the first intelligent unit is used to plan the first task to obtain planning information for the first task, comprising: The first intelligent unit is instructed to perform the following operations: obtain the requirement information of the first task, generate a content directory of the execution result of the first task based on the requirement information, the content directory indicating at least one chapter information, and convert the at least one chapter information into a corresponding sub-task.
11. The method according to claim 1, further comprising: Obtain the execution result of the at least one subtask; Based on the dependencies between the at least one subtask, the execution results of the at least one subtask are integrated and globally consistent to obtain the execution result of the first task.
12. A task processing apparatus, comprising: A planning module is configured to, in response to receiving a request indicating a first task, plan the first task using a first intelligent unit to obtain planning information for the first task, wherein the planning information indicates at least one sub-task. The guidance module is used to provide the planning information to the second intelligent unit to obtain guidance information for each sub-task; An execution module is configured to provide guidance information for the at least one sub-task to at least one third intelligent unit, so that the at least one third intelligent unit may execute the at least one sub-task.
13. An electronic device, comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the task processing method as described in any one of claims 1 to 11.
14. A computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the task processing method as described in any one of claims 1 to 11.
15. A computer program product comprising a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform the task processing method as described in any one of claims 1 to 11.