Task processing method, electronic equipment and program product

By splitting the task into subtasks and using the decision tree structure for decision making, the problem that the agent cannot make logical judgments in complex tasks is solved, and the stability and efficiency of task processing are improved.

CN119917269APending Publication Date: 2025-05-02KE COM (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411975868.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

When existing agents are processing complex tasks, they cannot make logical judgments in the nodes, resulting in frequent calls to large models, reducing the stability and task processing efficiency of the agent.

Method used

By splitting the pending tasks into multiple subtasks and obtaining at least one execution action for each subtask, using the decision tree structure for decision making and path guidance, reducing dependence on the big model.

Benefits of technology

It improves the flexibility and adaptability of the agent in complex task environments, reduces the dependence on large models, and improves the stability and efficiency of task processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917269A_ABST
    Figure CN119917269A_ABST
Patent Text Reader

Abstract

The invention provides a task processing method, electronic equipment and a program product. The task processing method disclosed by the invention comprises the following steps: splitting a to-be-processed task to obtain a plurality of sub-tasks; respectively obtaining at least one execution action of each subtask; and in the process of executing the plurality of sub-tasks, in response to start execution of a first execution action organized as the decision tree in the at least one execution action, making a decision based on the decision tree and guiding execution of the first execution action.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of computers, and more particularly to a task processing method, an electronic device, and a program product. Background Art

[0002] An agent is a system or program that can perceive the environment, make decisions, and act autonomously to achieve a specific goal. In the field of artificial intelligence, an agent is usually designed as an autonomous entity that can interact with the external environment and perform tasks through perception, reasoning, and decision-making. Agents are widely used in autonomous driving, robotics, smart homes, financial services, and other fields.

[0003] In the prior art, most intelligent agents process tasks in a single node or serial node manner. A single node has only one core processing link that determines the direction of the task; a serial node processes each link of the task in sequence, like a chain, and the next node processes the task only after the previous node has completed the task.

[0004] However, since tasks in actual production life often involve various decisions, and intelligent agents cannot make logical judgments in nodes, it is necessary to call large models to participate in decision-making. However, frequent calls to large models will lead to poor stability of the intelligent agent and low task processing efficiency. Summary of the invention

[0005] The present disclosure provides a task processing method, an electronic device, and a program product.

[0006] According to one aspect of the present disclosure, there is provided a task processing method, comprising: Split the pending tasks into multiple subtasks; Obtain at least one execution action of each subtask respectively; In the process of executing the multiple subtasks, in response to the start of execution of a first execution action organized in a decision tree among the at least one execution action, a decision is made based on the decision tree and execution of the first execution action is guided.

[0007] According to the task processing method of at least one embodiment of the present disclosure, the execution action is organized in one of atomic actions, linear processes, non-decision tree tree structures, and decision trees.

[0008] According to at least one embodiment of the task processing method of the present disclosure, before making a decision based on the decision tree and guiding the execution of the first execution action, the method further includes: Respectively obtain at least one attribute of each execution action of each subtask; An organization mode analysis is performed according to at least one attribute of each execution action of each subtask to obtain an organization mode of each execution action of each subtask.

[0009] According to at least one embodiment of the task processing method of the present disclosure, if the execution of the second execution action organized as an atomic action in the at least one execution action starts, it also includes: Call the action execution function to execute the atomic action.

[0010] According to at least one embodiment of the task processing method of the present disclosure, if the third execution action organized as a linear process in the at least one execution action starts to be executed, it also includes: Acquire multiple operations included in the linear process and the operation order of the multiple operations; The multiple operations are performed according to an operation order.

[0011] According to at least one embodiment of the task processing method of the present disclosure, splitting the tasks to be processed includes: Preprocessing the tasks to be processed to obtain processed tasks; The post-processing tasks are split.

[0012] According to the task processing method of at least one embodiment of the present disclosure, the splitting of the processed tasks includes: Acquire multiple decomposition decision parameters of the processed task; The processed tasks are split according to the multiple decomposition decision parameters.

[0013] According to the task processing method of at least one embodiment of the present disclosure, making a decision based on the decision tree and guiding the execution of the first execution action includes: Splitting from a root node of the decision tree based on the first execution action; After each split, recursively execute along the branches of the decision tree until a leaf node is reached; Execute the task of the leaf node and obtain the leaf execution result; When the decision tree is traversed, the execution result of the first execution action is obtained according to the leaf execution results of the leaf nodes in the decision tree; Optionally, in the process of executing the multiple subtasks, the method further includes: Monitoring whether the at least one execution action is executed successfully; If any execution action of the at least one execution action fails, a failure processing operation is performed on the execution action.

[0014] According to another aspect of the present disclosure, an electronic device is provided, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes the task processing method of any embodiment of the present disclosure.

[0015] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the task processing method of any embodiment of the present disclosure is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.

[0017] Figure 1 The task processing method of one embodiment of the present disclosure is as follows: Figure 1 .

[0018] Figure 2 The task processing method of one embodiment of the present disclosure is as follows: Figure 2 .

[0019] Figure 3 The task processing method of one embodiment of the present disclosure is as follows: Figure 3 .

[0020] Figure 4 The task processing method of one embodiment of the present disclosure is as follows: Figure 4 .

[0021] Figure 5 yes Figure 1 A flowchart of a task splitting method in a task processing method is shown.

[0022] Figure 6 yes Figure 5 The flowchart of the parameter splitting method in the task splitting method is shown.

[0023] Figure 7 yes Figure 1 A flowchart of a method for guiding execution in a task processing method is shown.

[0024] Figure 8 The task processing method of one embodiment of the present disclosure is as follows: Figure 5 .

[0025] Fig. 9 is a schematic flowchart of a task processing method according to an embodiment of the present disclosure.

[0026] Fig.10 It is a schematic block diagram of the structure of a task processing device according to another embodiment of the present invention.

[0027] Fig.11 It is a schematic block diagram of the structure of an electronic device according to yet another embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] The present disclosure is further described in detail below in conjunction with the accompanying drawings and examples. It is understood that the specific examples described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.

[0029] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0030] Taking the intelligent customer service system as an example, the task of the agent is to provide accurate answers or guide users to complete operations based on the questions entered by the user. Traditional intelligent customer service systems usually adopt a single-node or serial node design method. For example, after the user enters the question, the agent determines the type of question through the intention recognition node; then enters the corresponding task processing node; if the task is complex or exceeds the rule range of the current node, the agent will call the large model for reasoning and decision-making, and then return the result. In simple scenarios, this process can work normally, but in actual business, the scenario is more complicated. If a task that cannot be solved by the node occurs, each subtask included in the task needs to call the large model to determine the next operation path, and frequent calls to the large model will lead to poor stability of the agent and low task processing efficiency.

[0031] To this end, the present disclosure proposes a task processing method, electronic device and program product. For lightweight, highly mobile and low resource demand task processing, the present disclosure can be implemented through task processing software set on electronic devices such as mobile phones and tablet computers; for medium-complexity tasks, especially task processing in scenarios requiring graphical interfaces, medium computing resources or task localization, the present disclosure can be implemented through task processing software set on electronic devices such as computers; for high-concurrency, large-scale and high-performance task processing, the present disclosure can be implemented through task processing software set on electronic devices such as servers.

[0032] For the convenience of description and to make the technical solutions of the specific implementation methods of the present disclosure easier to understand, before describing the task processing method implemented by the present disclosure, the technical terms involved in the specific implementation methods of the present disclosure are explained as follows: Organization refers to the way different actions are arranged and executed in a certain structure or pattern.

[0033] Execution actions refer to the specific operations or activities that need to be taken to perform a subtask.

[0034] A non-decision tree tree structure refers to a tree structure other than a decision tree, which is used to represent the hierarchical relationship between nodes without involving decision or classification logic.

[0035] A decision tree is a special type of tree structure used primarily to represent decision-making or classification processes.

[0036] An atomic action is an indivisible basic operation or behavior.

[0037] A linear process is an operation process that is performed in a fixed order. Each step depends on the result of the previous step, forming a sequential execution process.

[0038] Figure 1 FIG. 1 is a schematic diagram showing the overall process of a task processing method M100 according to an embodiment of the present disclosure. Figure 1 The task processing method shown includes steps S110 to S130. The method can be executed by electronic devices such as mobile phones and computers.

[0039] Specifically, Figure 1 The task processing method shown includes: Step S110, splitting the task to be processed into multiple subtasks.

[0040] In some embodiments of the present disclosure, the task to be processed in step S110 may come from user instructions, such as instructions input by the user through voice, text or touch; the task to be processed may also come from environmental perception, such as sensing temperature, humidity, image or sound data through sensors, and automatically triggered based on certain specific events; the task to be processed may also come from local or external system requirements, such as triggering the task to be processed based on local current performance or status (such as adjusting device power consumption, improving response time, etc.), or triggering the task to be processed based on data or requests provided by an external system, etc.

[0041] Based on different application scenarios, the tasks to be processed in step S110 may involve different task types, such as physical tasks (such as navigation, grasping and manipulating objects, etc.), perception tasks (such as environmental perception, data collection, etc.), decision-making tasks (such as action strategy planning, risk assessment and response, etc.), cognitive tasks (such as natural language processing, problem solving, etc.), etc. The specific goals and requirements of each task determine how the task processing software is designed and executes the tasks, as well as the required technologies, tools and algorithms.

[0042] In some embodiments of the present disclosure, when the task to be processed is split through step S110, the splitting method is usually affected by factors such as task complexity, target structure, resource limitations, etc.; for example, when the task to be processed is too complex, it is necessary to split the task to be processed into smaller and simpler sub-tasks; under the condition of limited resources, large tasks need to be split, etc.

[0043] The relationships among the multiple subtasks obtained through step S110 may include the following: sequential relationship (i.e., some subtasks must be executed in a specific order, and the output or result of one subtask is the input or prerequisite of another subtask), parallel relationship (i.e., some subtasks are independent, they are not dependent on each other, and can be executed simultaneously), conditional relationship (i.e., the execution of some subtasks may depend on whether certain conditions or events occur, which determines which subtask will be executed), mutually exclusive relationship (i.e., some subtasks are mutually exclusive, that is, only one of them can be executed, rather than multiple at the same time), etc.

[0044] Step S120: Obtain at least one execution action of each subtask.

[0045] In some embodiments of the present disclosure, for any subtask among the multiple subtasks obtained through step S110, step S120 can select at least one specific and suitable execution action to implement the subtask based on comprehensive considerations of factors such as the objectives, functional requirements, task types, execution environment, and resource limitations of the subtask.

[0046] Step S130 , in the process of executing the plurality of subtasks, in response to the start of execution of a first execution action in at least one execution action organized in a decision tree, making a decision based on the decision tree and guiding execution of the first execution action.

[0047] In some embodiments of the present disclosure, when executing multiple subtasks based on at least one execution action, the subtasks can be executed according to the execution order and dependency relationship of the subtasks; in the execution process of subtasks including multiple execution actions, these execution actions can be executed according to the execution strategy of the execution action.

[0048] The specific organization mode of the execution action obtained in step S120 depends on the requirements of the execution action, the complexity of the execution, etc. It describes how to combine multiple operations to achieve a complex execution action. The organization mode is determined in the process of obtaining the execution action in step S120.

[0049] When executing a first execution action in the form of a decision tree through step S130, it is possible to judge layer by layer starting from the root node according to the first execution action, walk along the branches of the decision tree to the leaf nodes, and finally execute the operation or decision corresponding to the leaf node.

[0050] The task processing method provided by the present disclosure enhances the flexibility and adaptability of task processing through a decision tree structure, so that the task processing method can flexibly adjust the decision path in a complex, changeable and uncertain task environment, thereby effectively coping with the uncertainty of the task and optimizing the task execution effect. The task processing method localizes the decision logic through a decision tree, thereby significantly reducing the reliance on large models, solving the problem in the prior art that since tasks in actual production and life often involve various decisions, and the intelligent agent cannot perform logical judgments in the node, it is necessary to call a large model to participate in the decision-making, but frequent calls to the large model will lead to poor stability of the intelligent agent and low efficiency in task processing.

[0051] In some embodiments of the present disclosure, the organization method of any execution action of any subtask among the multiple subtasks obtained in step S110 determines how the execution action is defined, described and executed in the entire task system, thereby ensuring that the subtask and the entire task to be processed can be effectively completed. The organization method determines whether the execution action is executed individually, according to a fixed process, or dynamically selected according to conditions or coordinated by other non-conditional complex structures, etc. The organization method essentially describes the organization and management method of the execution action in the subtask.

[0052] The organization mode of the execution action obtained in step S120 is one of atomic action, linear process, tree structure other than decision tree, and decision tree.

[0053] Among them, atomic actions have the characteristics of atomicity (i.e. single and independent, and cannot be further decomposed), illogicality (i.e. the execution of the action does not depend on complex conditions or judgments), staticity (i.e. predefined actions that can be executed by direct call) and high efficiency (i.e. low execution overhead). They are suitable for simple and direct execution actions, such as controlling hardware devices, single data processing operations, etc.

[0054] Linear processes have the characteristics of sequencing (i.e. operations are performed according to preset fixed steps), logic (i.e. can contain simple conditional judgments or loop logic), determinism (i.e. the process is statically designed and the behavioral results are predictable), linearity or branching (i.e. supporting basic sequential structures or simple branching structures), etc. They are suitable for execution actions with clear execution steps, such as assembly line production, multi-step data processing, etc.

[0055] Decision trees have the characteristics of condition-driven (i.e., selecting an execution path based on input or status), tree structure (i.e., internal nodes represent judgment conditions, and leaf nodes identify specific actions), and dynamics (i.e., the execution path is determined at runtime and is flexible). They are suitable for scenarios that require dynamic decision-making, such as behavior control, recommendation systems, etc.

[0056] The tree structure of the non-decision tree has the characteristics of non-conditionality (i.e., it is not based on conditional branch decisions, but uses other logic to organize actions), complexity (i.e., it is suitable for describing complex behaviors, including parallel tasks, priority scheduling, etc.), flexibility (i.e., it supports asynchronous operations and dynamic priorities), etc., and is suitable for complex tasks that require flexible scheduling, dynamic adaptation and priority control, such as industrial control, distributed task management, etc. The tree structure of the non-decision tree can be specifically a behavior tree, which is suitable for scenarios such as robot control and industrial automation; it can also be specifically a state tree, which is suitable for scenarios such as embedded systems and motion control; it can also be specifically a priority tree, which is suitable for scenarios such as real-time control and multi-task scheduling; the tree structure of the non-decision tree can also be a task decomposition tree, a parallel tree, etc.

[0057] The tree structure can be used to subdivide the execution action into multiple levels of operation steps. This structure can provide clear task dependencies and controllable execution order, which is suitable for task scenarios with clear dependencies; it ensures that each step of the task is completed in a predetermined order, thereby improving the certainty and predictability of the execution process. In the tree structure, each internal node represents a further decomposition of the execution action, and the leaf node is a specific execution step. During execution, you can start from the root node of the tree and gradually refine the task according to the hierarchy of the tree structure. When executing the leaf nodes, you can traverse and execute the leaf nodes in the execution order (such as from left to right, randomly, etc.); the next level can only be executed after the previous level task is completed, thereby ensuring that the specific operation steps are completed in the predetermined order.

[0058] Furthermore, the task processing method provided by the present disclosure may further include the following steps before step S130: Figure 2 Step S140 and step S150 are shown.

[0059] Step S140: Obtain at least one attribute of each execution action of each subtask.

[0060] In some embodiments of the present disclosure, the at least one attribute acquired through step S140 may include one or more of action complexity, action execution logic, action decomposability, environment dynamics, and action scalability.

[0061] Among them, action complexity is used to describe the inherent complexity of the execution of the action itself, including the number of steps, the number of logical branches, the amount of data processing, and the degree of dependence on the external environment. The standard of action complexity can be set according to needs, such as simple, medium, complex, etc. Action complexity determines whether the organization of the execution of the action needs to adopt a more complex structure, such as a linear process or a tree structure.

[0062] Action execution logic is used to determine whether the execution of an action needs to dynamically select an execution path or behavior based on runtime conditions, states, or inputs. Action execution logic determines the control logic of executing an action. If the action execution logic does not require dynamic selection, the execution of actions can be organized as atomic actions or a linear process; if the action execution logic requires dynamic selection, the execution of actions can be organized as a decision tree or similar structure.

[0063] Action decomposability is used to determine whether the execution action can be further decomposed. Action decomposability determines the decomposition and organization of the execution action. If it can be further decomposed, the execution action can be organized into a linear process, a decision tree, or a tree structure other than a decision tree. If it cannot be further decomposed, the execution action can be organized into an atomic action.

[0064] Environmental dynamism refers to whether the execution action needs to adapt to the dynamically changing environment, input, and state when it is executed. When the environmental dynamism is high, the organization of the execution actions can be a tree structure other than a decision tree; when the environmental dynamism is low, the organization of the execution actions can be a linear process or other simple structure.

[0065] Action scalability refers to whether the execution action is easy to modify, debug, or expand new functions. If the execution action has high scalability, the execution action can be organized in a tree structure other than a decision tree; if the execution action has low scalability, the execution action can be organized in a simple linear process, atomic action, or other simple structure.

[0066] Step S150 , performing an organization mode analysis according to at least one attribute of each execution action of each subtask, to obtain an organization mode of each execution action of each subtask.

[0067] In some embodiments of the present disclosure, when there is only one attribute obtained through step S140, step S150 can select the best combination through a single-objective optimization analysis method, combined with goal-driven scoring, optimization theory or trade-off-based analysis; when there are multiple attributes obtained through step S140, step S150 can use hierarchical analysis method, multi-objective decision analysis method, etc. to perform organizational analysis.

[0068] Taking at least one attribute obtained through step S140 including action complexity, action execution logic, action decomposability, environment dynamics and action scalability as an example, for any execution action of any subtask, the process of analyzing and obtaining the organization mode of each execution action of each subtask through step S150 may include: judging whether the execution action can be disassembled according to the action decomposability and action complexity of the execution action; if it cannot be disassembled, obtaining the preliminary organization mode "atomic action" of the execution action; if it can be disassembled, judging whether the execution action needs dynamic selection according to the action execution logic of the execution action; if not, obtaining the preliminary organization mode "linear process" of the execution action; if necessary, The action execution logic determines whether the execution action depends on conditional judgment or involves complex logical judgment; if it depends on conditional judgment, obtain the preliminary organization mode of the execution action "decision tree"; if it is complex logical judgment, obtain the preliminary organization mode of the execution action "non-decision tree tree structure"; considering the dynamic environment and the scalability of the action, in the case of low dynamics or low scalability, the preliminary organization mode of the execution action can be "atomic action" or "linear process"; in the case of high dynamics or high scalability, the preliminary organization mode of the execution action can be "decision tree" or "non-decision tree tree structure"; finally, based on the decision rules, the preliminary organization mode obtained in the above process is finally analyzed to obtain the final organization mode.

[0069] Among them, the decision rules can be set as needed, and the decision rules can be: if the preliminary organization method obtained based on the decomposability of the action, the complexity of the action and the logic of the action execution is already suitable (for example, the execution path is already clear, and the requirements for the environment dynamics and action scalability are low), then this preliminary organization method can be used as the final organization method; if the requirements for the environment dynamics and action scalability are high, then the preliminary organization method determined based on the environment dynamics and action scalability can be used as the final organization method.

[0070] By determining the organization method according to a series of attributes through steps S140 to S150, it is possible to ensure that the execution method of the execution action best meets the needs of the execution action itself, thereby improving the execution efficiency of the execution action.

[0071] Furthermore, in the process of executing multiple subtasks, if in response to the start of execution of a second execution action organized as an atomic action in at least one execution action, the task processing method provided by the present disclosure may further include: Figure 3 Step S160 is shown.

[0072] Step S160: calling the action execution function to execute the atomic action.

[0073] In some embodiments of the present disclosure, an atomic action is directly executed when a certain trigger condition is met and the second execution action is triggered to start execution. An atomic action usually has no complicated subsequent steps and will immediately feedback an execution result after execution.

[0074] In step S160, the atomic action is executed by calling the action execution function in the task processing software, without calling a large model, which can improve the task processing efficiency; in addition, the execution of the atomic action can be managed by the state machine to ensure that the atomic action is triggered and completed in the correct state.

[0075] For simple, fixed, and highly real-time execution actions, they can be executed through step S160 to improve execution efficiency.

[0076] Furthermore, in the process of executing multiple subtasks, if in response to the start of execution of a third execution action organized as a linear process in at least one execution action, the task processing method provided by the present disclosure may also include the following steps: Figure 4 Steps S170 to S180 are shown.

[0077] Step S170, obtaining multiple operations included in the linear process and the operation order of the multiple operations.

[0078] Step S180, executing multiple operations according to the operation sequence.

[0079] In some embodiments of the present disclosure, step S180 may first determine a starting operation from multiple operations according to the operation sequence; secondly, execute the starting operation; for subsequent operations after the starting operation in the multiple operations, the execution of each operation usually depends on the completion of the previous operation; and the operation ends when all operations are completed. The execution timing of each operation may be determined by task scheduling to ensure that the next operation is executed after the previous operation is completed.

[0080] To optimize performance, each operation can be encapsulated as an independent function or method, and then these functions or methods are called in the order of operations; the order of operations can be managed through the call stack.

[0081] For multi-step, clearly ordered, and structured execution actions, they can be executed through steps S170 to S180, which can improve execution consistency and efficiency.

[0082] Regarding step S110, in some embodiments of the present disclosure, it may include: Figure 5 Steps S111 to S112 are shown.

[0083] Step S111, pre-processing the task to be processed to obtain a processed task.

[0084] In some embodiments of the present disclosure, the preprocessing in step S111 may include data cleaning (such as removing noise, processing missing values, removing duplicate data, etc.), data conversion (such as standardization, encoding conversion, etc.), feature extraction and selection, etc. For complex information in the task to be processed, more representative features can be obtained through feature extraction, and the most useful features for the task to be processed can be selected through feature selection to reduce the data dimension.

[0085] Step S112, splitting the processed tasks.

[0086] Preprocessing the task to be processed in step S111 and then splitting it in step S112 can simplify the complexity of task splitting and improve the splitting efficiency and accuracy.

[0087] Regarding step S112, in some embodiments of the present disclosure, it may include the following steps: Figure 6 Steps S1121 and S1122 are shown.

[0088] Step S1121, obtaining multiple decomposition decision parameters of the processed task.

[0089] In some embodiments of the present disclosure, the decomposition decision parameters in step S1121 are various factors used to guide and determine the task decomposition method, the number of subtasks, the scope of subtask content, and other related decisions in the process of decomposing the processed task into multiple subtasks. These decomposition decision parameters can help the task processing software to reasonably split the processed tasks according to various factors such as the specific characteristics of the processed tasks, resource conditions, time requirements, quality expectations, and potential risks, so as to ensure that the processed tasks can be processed efficiently and with high quality.

[0090] The multiple decomposition decision parameters obtained through step S1121 may include parameters based on the task itself, parameters based on resources, parameters based on time and progress, parameters based on quality and risk, etc.

[0091] Among them, parameters based on the task itself may include task complexity (such as the number of operations, domain span, data diversity, etc.), clarity of overall goals and sub-goals (the overall goal is the final result to be achieved by the post-processing task, and the sub-goal is the intermediate step or component to achieve the overall goal), and the correlation and sequence between goals (strong correlation means that close coordination is required during the execution of the post-processing task, and strong sequence means that some goals must be started only after other goals are completed).

[0092] Resource-based parameters may include resource demand, which indicates the demand for computing resources, storage resources, human resources, and other resources.

[0093] Time and progress-based parameters may include time constraints (such as deadlines, milestone requirements, etc.) and goal urgency (referring to the importance and urgency of sub-goals).

[0094] Quality and risk-based parameters may include quality parameters (such as quality standard parameters, quality inspection parameters) and risk parameters.

[0095] Specifically, the multiple decomposition decision parameters obtained through step 1121 may include task complexity, resource requirement and time limit parameters.

[0096] Step S1122, splitting the processed tasks according to multiple decomposition decision parameters.

[0097] In some embodiments of the present disclosure, taking the multiple decomposition decision parameters obtained through step S1121 including task complexity, resource requirement and time limit parameter as an example, the specific process of task splitting through step S1122 may include: first, preliminarily splitting the processed task according to the task complexity (the splitting process can be implemented according to functions, logical modules, etc.) to determine the basic sub-task units; secondly, analyzing the computing resources, storage resources and other resources required for each preliminarily split sub-task unit according to the resource requirement to determine whether it meets the system resource upper limit. If it exceeds, adjust the granularity of the corresponding sub-task according to the resource load; thirdly, further split the sub-tasks with high time requirements in parallel according to the time limit parameter to shorten the execution time; finally, cross-validate the task complexity, resource requirement and time limit parameter to obtain the final splitting plan and split based on the splitting plan.

[0098] By splitting the tasks through steps S1121 and S1122, efficient, flexible and stable task processing can be achieved to meet complex environments and diverse needs.

[0099] Regarding step S130, in some embodiments of the present disclosure, it may include the following steps: Figure 7 Steps S131 to S134 are shown.

[0100] Step S131, splitting starts from the root node of the decision tree based on the first execution action.

[0101] In some embodiments of the present disclosure, the first execution action can be used as the input of the decision tree and executed from the root node. Starting from the root node of the decision tree, the following logic is executed based on the condition of the root node: check whether the condition is satisfied and obtain the judgment result; and use the node corresponding to the judgment result as the next execution path.

[0102] Step S132, after each split, recursively execute along the branches of the decision tree until a leaf node is reached.

[0103] In some embodiments of the present disclosure, after each split, the above logic is repeated for the current node, gradually going deeper along the decision path; the gradual deepening process includes: detecting whether the node is a leaf node (i.e., a node without subsequent branches); if it is a leaf node, executing step S133; if it is not a leaf node, continue to recurse downward until reaching a leaf node.

[0104] Step S133, execute the task of the leaf node and obtain the leaf execution result.

[0105] In some embodiments of the present disclosure, after reaching a leaf node through step S132, the task of the node can be executed through step S133. After the task is executed, the current recursive path ends; if multiple paths are involved, the recursive execution continues according to the judgment logic of other paths until the entire decision tree is traversed or all tasks are completed.

[0106] The task of executing the leaf node through step S133 can be achieved through one interaction with the large language model, or by calling a fixed processing logic (such as calling a function to process data, etc.).

[0107] Step S134, when the decision tree is traversed, the execution result of the first execution action is obtained according to the leaf execution result of the leaf node in the decision tree.

[0108] In some implementations of the present disclosure, the leaf execution results of all leaf nodes in the decision tree may be summarized in step S134 to obtain a first execution result.

[0109] Through steps S131 to S134, each node automatically selects the subsequent node to execute the task according to the task status and results, thereby realizing an adaptive decision path; this method enables the task processing software to respond flexibly to complex and dynamically changing environments, effectively optimize the task execution path, and make dynamic decisions when task conditions change, skipping unnecessary steps, reducing task execution time and resource consumption, and being able to efficiently and flexibly process the first execution action.

[0110] Furthermore, in the process of executing multiple subtasks, the task processing method provided by the present disclosure may also include: Figure 8 Steps S190 to S191 are shown.

[0111] Step S190, monitoring whether at least one execution action is executed successfully.

[0112] In some implementations of the present disclosure, step S190 may monitor whether at least one execution action is successfully executed through a callback mechanism, a polling mechanism, or an event monitoring mechanism.

[0113] When a certain execution action is successfully executed through monitoring in step S190, it can be determined whether this execution action is the last one; if it is the last one, the task processing operation is terminated; if it is not the last one, the next execution action is continued.

[0114] When it is monitored through step S190 that a certain execution action fails, step S191 is executed.

[0115] Step S191, performing a failure processing operation on the execution action.

[0116] In some embodiments of the present disclosure, the specific processing method of the failure handling operation in step S190 can be pre-set, and the failure handling operation can be retry, switch to alternative plan, task rollback, task termination, error isolation, task reallocation, logging and alarm, etc.

[0117] If the execution of the action fails due to a temporary failure or external factors (such as network delays, insufficient resources, etc.), you can try to retry automatically; the retry process usually sets the maximum number of retries and the interval time to avoid infinite retries.

[0118] If the execution of the action fails because a resource or service on which the action depends is unavailable, the action can be continued by switching to a backup solution.

[0119] If the execution fails at a certain stage and causes the system state to be inconsistent, you can perform a task rollback to restore the system to the state before the failure.

[0120] If the reason for the execution failure cannot be recovered, you can choose to terminate the execution directly to avoid further wasting resources or generating erroneous results.

[0121] If a part of the execution process of the action fails, the failed part can be isolated through error isolation, and only the remaining part can be executed; the failed part can also be reallocated to other available resources or rescheduled for execution.

[0122] During the above processing, detailed execution status can also be recorded through logs and alarm notifications can be generated to help monitoring personnel respond to execution failures in real time and analyze the causes of failures.

[0123] During the task processing, the execution results of all execution actions can be accumulated and recorded, and the final execution results of the pending tasks can be determined based on the execution results of all execution actions. In order to ensure the efficient operation of the task processing software in various complex environments, the execution actions can be optimized in real time according to the data and task status to flexibly adapt to the changes of the pending tasks.

[0124] The task processing method provided by the present disclosure can perform the task processing process through an intelligent agent, and the method can be applied in environments that require automation, optimization, and intelligent decision-making. Specifically, the task processing method can be applied in scenarios such as intelligent customer service, autonomous driving, intelligent manufacturing, intelligent medical care, smart home, smart grid, and robotic automation.

[0125] Fig. 9 An exemplary flowchart of the task processing method according to the present disclosure is shown.

[0126] Fig. 9 In the flowchart shown, taking the refund processing task of automatically processing customer refund requests as an example, the task processing process may include: Step S210, split the refund processing task into multiple subtasks.

[0127] In some embodiments of the present disclosure, the refund processing task is split through step S210 to obtain two subtasks: a "refund request verification" subtask (used to confirm whether the refund request complies with the refund policy and ensure that only reasonable and compliant refund requests are approved) and a "refund processing" subtask (used to calculate the refund amount and select the refund method for refund processing based on the refund request that has passed the verification).

[0128] Step S220: Obtain at least one execution action of each subtask.

[0129] In some embodiments of the present disclosure, the "refund request verification" subtask may include three execution actions: checking the order status (checking whether the order status of the customer's refund request meets the refund conditions), checking the refund reason (confirming whether the refund reason is reasonable) and judging whether the refund conditions are met (determining whether to approve the refund request); among them, checking the order status and checking the refund reason are usually a simple inspection process that does not require multi-step decision-making or complex processes, so the organization method of these two execution actions can be atomic actions; judging whether the refund conditions are met is an action of making a comprehensive decision based on multiple conditions such as order status, refund reason and customer history record, so the organization method of this execution action can be a decision tree.

[0130] The "Refund Processing" subtask can also include three execution actions: refund amount calculation, refund method determination and refund review; among them, refund amount calculation and refund method determination are usually simple processes that do not rely on multi-step decisions or complex processes, so these two execution actions can be organized as atomic actions; refund review needs to decide whether manual review is required or whether a specific refund channel should be used based on factors such as payment method, refund amount, and customer history, so the organization of this execution action can be a decision tree.

[0131] Step S230, executing multiple subtasks.

[0132] In some embodiments of the present disclosure, during the process of executing multiple subtasks through step S230, step S240 is executed in response to checking the order status, checking the refund reason, calculating the refund amount, or determining the refund method; step S250 is executed in response to determining whether the refund conditions are met or the refund review is started.

[0133] The execution modes of the multiple subtasks in step S230 may include sequential execution, parallel execution, batch execution, etc. The execution mode to be used depends on factors such as the specific application scenario, resource availability, dependencies between tasks, and expected performance goals.

[0134] Step S240, check the order status, check the refund reason, calculate the refund amount or determine the refund method.

[0135] Step S250, making a decision based on the decision tree and guiding the execution of judging whether the refund conditions are met or the refund review.

[0136] The task processing method provided by the present disclosure supports multiple organizational methods such as atomic actions, linear processes, tree structures other than decision trees, and decision trees in the task processing process, and can flexibly respond to different types of task requirements. The tree structure can be used to execute tasks in an orderly and structured manner, and the decision tree structure provides the ability to make dynamic decisions during the task execution process, thereby adapting to the ever-changing task conditions, ensuring flexible processing of tasks and optimization of execution paths. This combination enables the task processing software to operate more efficiently in a variety of task scenarios.

[0137] This task processing method executes the operation as a sub-node in a whole execution action, rather than simply splitting it into multiple independent operations, which can improve the controllability of task processing and avoid execution risks caused by unpredictability. This method is particularly suitable for tasks that require dynamic decision-making and multi-step process control, such as software development, document writing and other business scenarios.

[0138] Based on any of the above implementations, the present disclosure also provides a task processing device.

[0139] Fig.10 It is a schematic block diagram of the structure of a task processing device according to an embodiment of the present disclosure.

[0140] like Fig.10 As shown, the task processing device includes: The task splitting module 110 is used to split the task to be processed into multiple subtasks.

[0141] The action acquisition module 120 is used to respectively acquire at least one execution action of each subtask.

[0142] The action execution module 130 is used to make a decision based on the decision tree and guide the execution of the first execution action in response to the start of execution of the first execution action organized as a decision tree in at least one execution action during the execution of multiple subtasks.

[0143] The task processing device may be in the form of computer software, and each module of the task processing device may be implemented by a computer software module.

[0144] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.

[0145] The execution subject of the task processing method in the specific implementation manner of the present disclosure may be a mobile phone, a computer or other electronic device.

[0146] Therefore, based on any one of the above embodiments, the present disclosure further provides an electronic device, which can execute the task processing method of any one of the above embodiments of the present disclosure.

[0147] Fig.11 1 is a schematic block diagram of the structure of an electronic device 1000 according to an embodiment of the present disclosure.

[0148] The hardware structure of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnected buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300 and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.

[0149] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.

[0150] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.

[0151] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part.

[0152] The computer program or instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.

[0153] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0154] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0155] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0156] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0157] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.

[0158] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0159] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.

Claims

1. A task processing method, characterized in that: include: Split the pending tasks into multiple subtasks; Obtain at least one execution action of each subtask respectively; In the process of executing the multiple subtasks, in response to the start of execution of a first execution action organized in a decision tree among the at least one execution action, a decision is made based on the decision tree and execution of the first execution action is guided.

2. The task processing method according to claim 1, characterized in that: The execution action is organized in one of an atomic action, a linear process, a tree structure other than a decision tree, and a decision tree.

3. The task processing method according to claim 1 or 2, characterized in that: Before making a decision based on the decision tree and guiding the execution of the first execution action, the method further includes: Respectively obtain at least one attribute of each execution action of each subtask; An organization mode analysis is performed according to at least one attribute of each execution action of each subtask to obtain an organization mode of each execution action of each subtask.

4. The task processing method according to claim 1 or 2, characterized in that: If the execution of the second execution action organized as an atomic action in the at least one execution action starts, the method further includes: Call the action execution function to execute the atomic action.

5. The task processing method according to claim 1 or 2, characterized in that: If the third execution action organized in a linear process in the at least one execution action starts to be executed, the method further includes: Acquire multiple operations included in the linear process and the operation order of the multiple operations; The multiple operations are performed according to an operation order.

6. The task processing method according to claim 1 or 2, characterized in that: The splitting of the tasks to be processed includes: Preprocessing the tasks to be processed to obtain processed tasks; The post-processing tasks are split.

7. The task processing method according to claim 6, characterized in that: The splitting of the processed tasks includes: Acquire multiple decomposition decision parameters of the processed task; The processed tasks are split according to the multiple decomposition decision parameters.

8. The task processing method according to claim 1 or 2, characterized in that: The making a decision based on the decision tree and guiding the execution of the first execution action includes: Splitting from a root node of the decision tree based on the first execution action; After each split, recursively execute along the branches of the decision tree until a leaf node is reached; Execute the task of the leaf node and obtain the leaf execution result; When the decision tree is traversed, the execution result of the first execution action is obtained according to the leaf execution results of the leaf nodes in the decision tree; Optionally, in the process of executing the multiple subtasks, the method further includes: Monitoring whether the at least one execution action is executed successfully; If any execution action of the at least one execution action fails, a failure processing operation is performed on the execution action.

9. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instruction stored in the memory, so that the processor executes the task processing method according to any one of claims 1 to 8.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the task processing method according to any one of claims 1 to 8 is implemented.