Complex task decomposition and dynamic optimization method and device based on large language model

By decomposing complex tasks into multiple subtasks and introducing feedback loops and dynamic programming mechanisms into the large language model, the problem of high failure rate in complex tasks is solved in the existing large language model, real-time adjustment and optimization in the task execution process is achieved, and task success rate and overall efficiency are improved.

CN119883549APending Publication Date: 2025-04-25启元实验室
View PDF 0 Cites 11 Cited by

Patent Information

Application Number
CN202411943033.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

Existing large language models have high failure rates when performing complex multi-step tasks, lack the ability to respond to task failure feedback, and cannot automatically adjust task flow.

Method used

By using a pre-trained large language model, the task to be executed is broken down into multiple subtasks and a task instruction queue is generated. Execute subtasks in turn, record information during execution, generate execution status feedback information based on task execution data, and adjust the task decomposition strategy based on feedback information to achieve dynamic optimization.

Benefits of technology

It reduces the failure rate of the model's task execution, improves the adaptability and efficiency of task processing, enables the model to flexibly respond to changes in complex environments, and enhances the success rate of task completion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883549A_ABST
    Figure CN119883549A_ABST
Patent Text Reader

Abstract

The invention provides a complex task decomposition and dynamic optimization method and device based on a large language model, and relates to the technical field of artificial intelligence. A complex task decomposition and dynamic optimization method based on a large language model comprises the following steps: based on a pre-trained large language model, decomposing a to-be-executed task into a plurality of sub-tasks, and generating a task instruction queue for executing the plurality of sub-tasks; sequentially executing the subtasks in the task instruction queue, and recording information in the execution process to obtain task execution data; generating execution state feedback information according to the task execution data and a preset normal range; and generating a task decomposition strategy adjustment instruction according to the execution state feedback information, wherein the task decomposition strategy adjustment instruction is used for adjusting the task instruction queue and / or the execution main body of the subtask. According to the technical scheme of the embodiment of the invention, the task process is adjusted in real time in the task execution process, the task processing adaptability is enhanced, the change of a complex environment can be flexibly coped with, and the task completion success rate and the overall efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a complex task decomposition and dynamic optimization device and method based on a large language model. Background Art

[0002] At present, the application scope of large language models has been greatly expanded, covering not only text generation, but also more complex decision-making tasks. For example, some large language models can already be used to perform tasks in interactive environments, including navigation in game environments, completing task instructions, and searching and filtering in complex environments. These capabilities enable large language models to show certain advantages in the execution of multi-step, long-chain tasks, and are suitable for a variety of tasks ranging from complex text reasoning to interactive decision-making.

[0003] However, despite the great potential shown by large language models, they still have many limitations in performing complex multi-step tasks. These limitations are particularly evident in the case of task failure. Existing large language models lack the ability to respond to feedback from task failures and cannot automatically adjust when task failures occur, resulting in a high failure rate for the model to perform tasks. Summary of the invention

[0004] Based on this, the present application provides a complex task decomposition and dynamic optimization device and method based on a large language model, which can reduce the failure rate of the model executing tasks.

[0005] According to one aspect of the present application, a complex task decomposition and dynamic optimization method based on a large language model is proposed, including: based on a pre-trained large language model, decomposing the task to be executed into multiple sub-tasks, and generating a task instruction queue for executing the multiple sub-tasks; executing the sub-tasks in the task instruction queue in sequence, and recording information during the execution process to obtain task execution data; generating execution status feedback information based on the task execution data and a preset normal range; generating a task decomposition strategy adjustment instruction based on the execution status feedback information, and the task decomposition strategy adjustment instruction is used to adjust the execution subject of the task instruction queue and / or the sub-task.

[0006] According to some embodiments, based on a pre-trained large language model, a task to be executed is decomposed into multiple subtasks, and a task instruction queue for executing multiple subtasks is generated, including: based on the large language model, the task to be executed is decomposed into multiple subtasks, and the logical dependencies between the multiple subtasks are extracted to obtain an initial subtask list; according to the time requirements, resource constraints and logical dependencies of the subtasks, execution priorities are set for the multiple subtasks based on the large language model; based on the large language model, the multiple subtasks are refined to obtain a refined processing result for each subtask; wherein the refined processing result includes a subtask description of the subtask, the resources required for execution, and a post-execution feedback path; based on the refined processing result, the logical dependencies and the execution priority, the initial subtask list is adjusted based on the large language model to generate a task instruction queue.

[0007] According to some embodiments, it also includes: when an abnormality occurs in the task execution process, decomposing multiple subtasks; or when an abnormality occurs in the task execution process, searching for the abnormal situation based on a pre-built task processing database, and processing the abnormal situation according to the search results.

[0008] According to some embodiments, execution status feedback information is generated based on task execution data and a preset normal range, including: using a preset abnormality detection algorithm and a preset normal range to perform abnormal state detection on the task execution data to obtain an abnormal state detection result; and generating execution status feedback information based on the abnormal state detection result.

[0009] According to some embodiments, the method further includes: performing a historical trend analysis on the task execution data in the task history data set to obtain a trend analysis result, wherein the task history data set includes task execution data of a current execution process and a historical execution process.

[0010] According to some embodiments, task decomposition strategy adjustment instructions are generated based on execution status feedback information, including: generating a target adjustment plan based on trend analysis results and execution status feedback information using a preset adaptive optimization algorithm; wherein the target adjustment plan is the adjustment required for the subtasks involved in the execution status feedback information, including at least one of priority adjustment, resource allocation adjustment, logical dependency adjustment, execution order adjustment and execution subject adjustment; and generating a task decomposition strategy adjustment instruction based on the target adjustment plan.

[0011] According to some embodiments, a target adjustment plan is generated using a preset adaptive optimization algorithm based on trend analysis results and execution status feedback information, including: matching historical task features in a task history data set with current task features to determine a target historical task, wherein the target historical task is a historical task to be executed corresponding to a historical task feature having the greatest similarity to the current task feature; obtaining a task allocation strategy corresponding to the target historical task as an initial allocation plan; and determining a target adjustment plan based on the initial allocation plan and trend analysis results.

[0012] According to some embodiments, a historical trend analysis is performed on the task execution data in the task history data set to obtain trend analysis results, including: classifying and aggregating the task execution data to calculate key indicators; extracting categories with key indicators greater than preset thresholds to obtain common execution patterns; identifying bottlenecks and high-risk areas in the task execution data according to a preset anomaly analysis algorithm; wherein the key indicators, common execution patterns, bottlenecks and high-risk areas are used as trend analysis results.

[0013] According to one aspect of the present application, a complex task decomposition and dynamic optimization device based on a large language model includes: a decomposition module, which is used to decompose a task to be executed into multiple subtasks based on a pre-trained large language model, and generate a task instruction queue for executing multiple subtasks; an execution module, which is used to execute the subtasks in the task instruction queue in sequence, and record information during the execution process to obtain task execution data; a monitoring module, which is used to generate execution status feedback information based on the task execution data and a preset normal range; a control module, which is used to generate a task decomposition strategy adjustment instruction based on the execution status feedback information, and the task decomposition strategy adjustment instruction is used to adjust the execution subject of the task instruction queue and / or subtask.

[0014] According to one aspect of the present application, an electronic device is proposed, which includes: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.

[0015] According to one aspect of the present application, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described above is implemented.

[0016] Through the above-mentioned embodiments provided by the present application, the task description is intelligently analyzed through a large language model, and a complex task is automatically decomposed into multiple subtasks, thereby ensuring the executability of each subtask; the subtasks are executed in sequence, and the task execution data is recorded during the task execution process. Based on the task execution data, a feedback loop and a dynamic programming mechanism are introduced, and execution status feedback is performed according to the task execution data. The task decomposition strategy is adjusted according to the status feedback information, thereby realizing real-time adjustment of the task flow during task execution, enhancing the adaptability of task processing, and enabling it to flexibly respond to changes in complex environments, thereby improving the success rate of task completion and the overall efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without exceeding the scope of protection required by the present application.

[0018] Figure 1 A flowchart of a complex task decomposition and dynamic optimization method based on a large language model provided in an embodiment of the present application;

[0019] Figure 2 A flowchart of decomposing a task to be executed into multiple subtasks based on a pre-trained large language model provided in an embodiment of the present application, and generating a task instruction queue for executing multiple subtasks;

[0020] Figure 3 A flowchart for generating execution status feedback information based on task execution data and a preset normal range provided in an embodiment of the present application;

[0021] Figure 4 A flowchart of generating a task decomposition strategy adjustment instruction according to execution status feedback information provided in an embodiment of the present application;

[0022] Figure 5 A flowchart of generating a target adjustment scheme using a preset adaptive optimization algorithm according to trend analysis results and execution status feedback information provided in an embodiment of the present application;

[0023] Figure 6 A flowchart of performing historical trend analysis on task execution data in a task history data set to obtain trend analysis results provided in an embodiment of the present application;

[0024] Figure 7 A block diagram of a complex task decomposition and dynamic optimization device based on a large language model provided in an embodiment of the present application;

[0025] Figure 8A schematic diagram of module interaction of a complex task decomposition and dynamic optimization device based on a large language model provided in an embodiment of the present application;

[0026] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0028] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0029] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0030] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0031] It should be understood that although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another component. Therefore, the first component discussed below can be referred to as the second component without departing from the teachings of the concepts of the present application. As used herein, the term "and / or" includes any one of the associated listed items and all combinations of one or more.

[0032] For specific implementation methods, please refer to the following embodiments.

[0033] Figure 1Flowchart of a complex task decomposition and dynamic optimization method based on a large language model provided in an embodiment of the present application. Figure 1 As shown, the method includes steps S110 to S140.

[0034] In step S110 , based on the pre-trained large language model, the task to be executed is decomposed into multiple subtasks, and a task instruction queue for executing the multiple subtasks is generated.

[0035] The pre-trained big language model can be a closed-source big language model or an open-source big language model that has been trained, or a big language model that has been fine-tuned using a specific knowledge base. The specific knowledge base includes a historical task decomposition database and an expert experience database.

[0036] The tasks to be executed mainly include descriptions of the tasks to be executed input by the user, which may be task descriptions input via a task input interface. In addition, the present application does not limit the format of the task description, which may be directly described in natural language.

[0037] In the process of using a large language model to decompose the tasks to be executed, a series of subtasks are dynamically generated according to the task description, and a task instruction queue for executing multiple subtasks is generated.

[0038] In the actual decomposition process, tasks are gradually refined through recursive decomposition, a large task is decomposed into subtasks at multiple levels, all decomposed subtasks are listed, and a clear description is provided for each task. The analysis capability of the large language model is used to generate a task instruction queue for executing multiple subtasks.

[0039] Furthermore, in order to speed up execution efficiency, the task instructions in the task instruction queue can be structured execution instructions, such as including sub-task descriptions, priorities, dependency conditions and execution paths, to ensure that information such as task descriptions, priorities, dependencies and feedback paths are clear and executable.

[0040] Furthermore, each subtask can be further broken down into smaller execution units.

[0041] In step S120, the subtasks in the task instruction queue are executed in sequence, and information during the execution process is recorded to obtain task execution data.

[0042] It should be noted that large language models often show limited task combination and organization capabilities when dealing with multi-step tasks, especially when recursive thinking or complex task decomposition is required. For example, when performing complex decision-making tasks (such as navigation, handling multiple interactive operations, etc.), large language models often cannot cover all sub-steps in a single generation. Existing models lack the ability to dynamically decompose tasks, especially when task execution fails, they cannot automatically adjust or re-decompose tasks, resulting in overall task failure. This problem stems from the fact that traditional large language models lack feedback mechanisms and the ability to self-correct tasks. Therefore, when faced with complex tasks, their execution efficiency and success rate are low.

[0043] It is understandable that the existing task execution methods of large language models can generally be divided into two categories: one is the "Plan-and-Execute" strategy that generates the task structure through planning, and the other is the "Iterative Execution" based on the step-by-step generation strategy.

[0044] Specifically, the plan-execution strategy generates a high-level task plan at the beginning of the task, decomposes the complex task into multiple subtasks and completes each part step by step, so as to facilitate task management and execution. Although this method can help the model plan the task process in advance, due to the lack of dynamic adaptation mechanism, once an unfinished subtask is encountered, the overall task may fail, and the task plan cannot be flexibly adjusted or corrected.

[0045] In the iterative execution strategy, the model determines the next action based on the historical actions and environmental feedback of each step of the task execution, and gradually advances the completion of the task. This approach has strong flexibility and is suitable for handling tasks that require dynamic adjustment. However, due to the lack of planning for the global task structure, when the task chain is long or the task requires a complex combination of steps, the model may find it difficult to maintain overall consistency, thereby reducing the generation effect, and it is easy to cause the ultimate failure of the entire task due to the failure of a certain intermediate step.

[0046] Both traditional strategies lack the ability to dynamically adapt when a task fails, and are difficult to adjust based on task difficulty or feedback during execution, so their application is limited when dealing with complex and highly uncertain tasks. In particular, when performing highly complex or nonlinear tasks, the model has a high failure rate and lacks a mechanism to re-decompose and adjust failed subtasks, making it difficult to effectively deal with the uncertainty in complex tasks.

[0047] On this basis, this application adds feedback loops and dynamic planning mechanisms to cope with uncertainties in complex tasks and automatically perform task self-correction when task execution fails.

[0048] Specifically, during the implementation process, the subtasks in the task instruction queue are executed in sequence, and the execution information is recorded during the execution process to obtain the task execution data. Subsequent feedback and dynamic planning mechanisms are carried out based on the task execution data.

[0049] According to an exemplary embodiment, the task instructions of the subtasks in the task instruction queue are converted into specific operations, and the execution status of the tasks is tracked in real time. The contents in the task instruction queue are parsed and executed step by step in sequence or logical conditions.

[0050] During the execution process, the execution subject is called through the task instructions in the task instruction queue to complete the corresponding operations and interact with the external environment at the same time.

[0051] The task execution data includes progress, resource usage, and success / failure status, and may also include task execution time, exception occurrence frequency, etc.

[0052] This application adds a feedback loop based on the traditional strategy, enabling the model to monitor the progress of subtasks in real time during execution, supporting the execution and status tracking of complex logical tasks, and providing basic data support for dynamic adjustment and optimization of tasks.

[0053] In step S130, execution status feedback information is generated according to the task execution data and a preset normal range.

[0054] Collect task execution data in real time, identify potential problems in task execution based on task execution data and preset normal range, and generate execution status feedback information.

[0055] The execution status feedback information may include early warning signals.

[0056] In step S140, a task decomposition strategy adjustment instruction is generated according to the execution state feedback information, and the task decomposition strategy adjustment instruction is used to adjust the execution subject of the task instruction queue and / or the subtask.

[0057] It should be noted that current large language models usually rely on one-time generation strategies, lack effective integration with external control mechanisms during task execution, and cannot be dynamically adjusted according to changes in execution. Because these models generate answers or steps based on global context at one time, they lack the ability to respond to feedback from task failures, making it difficult to make necessary adjustments, and unable to optimize the task execution process in real time. When it comes to multiple steps and interdependent subtasks, the models lack effective control logic to manage the complex correlations between steps, making them difficult to handle complex interactive tasks or recursive problems.

[0058] This application generates task decomposition strategy adjustment instructions based on execution status feedback information, and uses task decomposition strategy adjustment instructions to adjust the task instruction queue and / or the execution subject of the subtask. Through the dynamic programming mechanism, the model can be optimized in real time based on the feedback during task execution. After each subtask is completed, periodic feedback is generated and the next operation is adjusted based on the feedback.

[0059] During the task execution process, if the environment or task status changes, the task decomposition strategy adjustment instruction will be generated accordingly. At this time, the task decomposition plan will be adjusted according to the task decomposition strategy adjustment instruction to ensure the rationality, executability and efficiency of the task.

[0060] Specifically, after receiving the task decomposition strategy adjustment instruction, LLM can be called to dynamically decompose or adjust the task, such as regenerating subtasks, decomposing subtasks, optimizing the current task structure (such as priority, resource allocation, task execution path, etc.) or optimizing the execution subject.

[0061] The present application intelligently analyzes task descriptions through a large language model, automatically decomposes complex tasks into multiple subtasks, thereby ensuring the executability of each subtask; executes subtasks in sequence, and records task execution data during task execution. Based on the task execution data, a feedback loop and a dynamic programming mechanism are introduced to provide execution status feedback based on the task execution data, and adjust the task decomposition strategy based on the status feedback information, thereby achieving real-time adjustment of the task flow during task execution, enhancing the adaptability of task processing, and enabling it to flexibly respond to changes in complex environments, thereby improving the success rate of task completion and overall efficiency.

[0062] According to some embodiments, reference Figure 2 In step S110, based on the pre-trained large language model, the task to be executed is decomposed into multiple subtasks, and a task instruction queue for executing the multiple subtasks is generated, which can be specifically implemented through steps S210-S240.

[0063] In step S210, based on the large language model, the task to be executed is decomposed into multiple subtasks, and the logical dependencies between the multiple subtasks are extracted to obtain an initial subtask list.

[0064] Step S110 is mainly responsible for splitting the received complex task into multiple executable subtasks and determining the priority and dependency relationship of each subtask.

[0065] In the specific implementation process, we first receive the tasks to be executed, call the large language model (LLM) to analyze the problem, and decompose the complex tasks into multiple smaller and manageable subtasks. On this basis, we further determine the dependencies between subtasks through LLM, including sequence constraints and logical operations (such as "AND" or "OR"), and clarify which subtasks need to rely on the completion results of other tasks to obtain the initial subtask list. Based on the decomposition results and dependencies, we generate the initial subtask list to provide a basis for the next step of priority setting.

[0066] In step S220 , execution priorities are set for the multiple subtasks based on the large language model according to the time requirements, resource constraints, and logical dependencies of the subtasks.

[0067] According to the time requirements, resource constraints and logical dependencies of subtasks, the analytical capabilities of LLM are used to set priorities (such as high, medium, and low) for subtasks to ensure that the execution order of tasks is reasonable and efficient.

[0068] In step S230, multiple subtasks are refined based on the large language model to obtain a refined processing result for each subtask; wherein the refined processing result includes a subtask description, resources required for execution, and a feedback path after execution of the subtask.

[0069] Call LLM to refine each subtask, adjust the subtask from a coarse-grained problem to a more clear and executable form, eliminate ambiguity and enhance solvability. It can also combine refined prompts (such as context or existing answers) to generate optimized subtask descriptions, and obtain the resources required for execution of each subtask and the feedback path after execution. Among them, the subtask descriptions, resources required for execution, and feedback paths after execution of all subtasks can be recorded as the refined processing results.

[0070] In step S240, according to the refined processing results, logical dependencies and execution priorities, based on the large language model, the initial subtask list is adjusted to generate a task instruction queue.

[0071] Based on the initial subtask list, the LLM recursively generates an instruction queue based on the priority, logical dependency, and refined processing results, which is recorded as the task instruction queue. The task instruction queue structuredly includes the description of each subtask, the execution conditions (such as AND / OR operators, i.e., logical dependencies), the required resources, and the subsequent feedback path.

[0072] Based on the above embodiment, step S120 is described.

[0073] In step S120, specific subtask operations are performed according to the task instruction queue, and the execution status is recorded in real time. Specifically, the task instructions in the task instruction queue are parsed to extract the description, dependency and priority information of the subtasks; according to the logical requirements of the task, the subtasks are organized into the execution queue according to the priority and logical operators ("AND" and "OR" operators), and the initial status of the task is marked as "to be executed".

[0074] Based on the dependencies and logical operators of each subtask, ensure that tasks are executed in order or conditionally. Specifically, when using the "AND" operator, they are strictly executed in order; when using the "OR" operator, conditional checks are performed, and if any subtask succeeds, the remaining subtasks are immediately skipped.

[0075] Furthermore, in some embodiments, when executing each subtask, a self-generated success heuristic method is used to determine whether the task has been completed or whether it needs to be further decomposed. If the executor can determine that the task is completed without relying on environmental feedback, it outputs "task completed (success)"; otherwise, it outputs "task failed" and records the execution status and resource consumption of the task in real time to ensure progress.

[0076] Generates task execution data based on execution progress, resource usage, and success / failure status during execution.

[0077] According to some embodiments, after step S120, step S121 and step S122 are further included.

[0078] In step S121, when an abnormality occurs during the task execution, multiple subtasks are decomposed; or

[0079] In step S122, when an abnormality occurs in the task execution process, the abnormality is searched based on a pre-built task processing database, and the abnormality is processed according to the search results.

[0080] Specifically, based on the operation of executing the subtask in step S120, if a task fails to be processed, it needs to be dynamically adjusted.

[0081] Dynamic adjustment includes further decomposing multiple subtasks, or searching for abnormal situations based on the task processing database, and processing the abnormal situations according to the search results.

[0082] The multiple subtasks are further decomposed, that is, step S121 includes:

[0083] Based on the large language model, the subtask is further decomposed into smaller parts to perform subtask operations (such as calculations and resource calls), and the status is updated to "in progress" or "completed". This processing method is suitable for situations where the decomposed subtasks are still too complex.

[0084] Searching for abnormal situations based on the task processing database and processing the abnormal situations according to the search results, that is, step S122 includes:

[0085] Based on a large language model or a search algorithm, a search is performed on abnormal situations to obtain historical tasks similar to the currently failed task. The currently failed task is processed with reference to the processing methods of the historical tasks.

[0086] The process of searching for abnormal situations is implemented based on the task processing database. The task processing database can be the aforementioned specific knowledge base or an externally introduced expert experience base, which is not limited in this application.

[0087] According to some embodiments, reference Figure 3 In step S130, execution status feedback information is generated according to the task execution data and the preset normal range, which can be specifically implemented through steps S310-S320.

[0088] In step S310, an abnormal state detection is performed on the task execution data using a preset abnormal state detection algorithm and a preset normal range to obtain an abnormal state detection result.

[0089] Specifically, firstly, a preset normal range (or abnormal threshold) is set, such as timeout, resource usage upper limit, etc.

[0090] Based on the preset normal range, a preset anomaly detection algorithm (such as conditional judgment or machine learning model) is used to identify abnormal situations in task execution (such as execution delays, resource exhaustion, etc.) to obtain abnormal state detection results.

[0091] The abnormal state detection result includes the identified abnormal situation; if there is no abnormality, the abnormal state detection result is no abnormality.

[0092] In step S320, execution status feedback information is generated according to the abnormal state detection result.

[0093] When an abnormality is detected, an early warning signal is immediately generated and combined with the task execution data under the abnormal state as execution status feedback information.

[0094] According to some embodiments, after step S120, the method further includes:

[0095] Step S123: performing a historical trend analysis on the task execution data in the task history data set to obtain a trend analysis result, wherein the task history data set includes the task execution data of the current execution process and the historical execution process.

[0096] The task execution data in the current and historical execution processes, including the execution feedback and exception information of the tasks, are stored to form a complete historical execution record and stored in the task history data set; historical data in the task history data set are analyzed for historical trends to obtain trend analysis results.

[0097] Through the recording and trend analysis of historical data, data support is provided for task optimization. Based on the real-time data collection and the accuracy of anomaly detection, a reliable basis is provided for the adaptive optimization and task adjustment of the system.

[0098] According to some embodiments, reference Figure 4 In step S140, a task decomposition strategy adjustment instruction is generated according to the execution status feedback information, which can be specifically implemented through steps S410-S420.

[0099] In step S410, a target adjustment plan is generated based on the trend analysis results and the execution status feedback information using a preset adaptive optimization algorithm; wherein the target adjustment plan is the adjustment required for the subtasks involved in the execution status feedback information, including at least one of priority adjustment, resource allocation adjustment, logical dependency adjustment, execution order adjustment and execution subject adjustment.

[0100] Receive feedback data from tasks with abnormal status in real time. Analyze this data to evaluate the effectiveness of the current task execution and identify bottlenecks or abnormal situations.

[0101] Specifically, by calling the adaptive optimization algorithm, the received feedback of task execution status, resource consumption and abnormal warning data is analyzed and processed, and with reference to the trend analysis of historical data, the optimal task allocation plan or adjustment strategy is generated in real time as the target adjustment plan.

[0102] The adjustments include but are not limited to priority adjustment, resource allocation adjustment, logical dependency adjustment, execution order adjustment and execution subject adjustment.

[0103] During the implementation process, the allocation strategy is optimized based on the trend analysis of historical data, so that the system can adaptively select the best allocation plan under similar tasks.

[0104] Further, according to the example embodiment, the process of generating the target adjustment scheme using the preset adaptive optimization algorithm can be implemented by a pre-trained decision model based on a neural network. The present application does not limit the training steps of the decision model, and the existing training method of the prediction model can be adopted.

[0105] At the same time, during the application process, the decision-making model is continuously optimized through feedback learning to improve the accuracy of task allocation and priority adjustment.

[0106] In step S410, it is necessary to dynamically adjust the priorities of subtasks according to the urgency of tasks, resource availability and logical dependencies between tasks, and give priority to key tasks to ensure efficient execution of the overall task flow.

[0107] In step S420, a task decomposition strategy adjustment instruction is generated according to the target adjustment plan.

[0108] Convert the adjusted target adjustment plan into task decomposition strategy adjustment instructions and implement them immediately.

[0109] This application can dynamically adjust the task decomposition plan according to real-time feedback, adapt to environmental changes, and significantly improve the flexibility of task processing and the execution success rate.

[0110] Furthermore, in order to improve execution efficiency, the task decomposition strategy adjustment instructions can eventually be converted into structured execution instructions to facilitate the large language model or execution subject to continue execution, such as subtask descriptions, priorities, dependency conditions, and execution paths.

[0111] Furthermore, in some embodiments, the adjusted records are also stored in the task history data set to obtain complete historical data. That is, the task history data set includes task execution feedback, adjustment records and optimization effects.

[0112] In order to speed up the calling of task history data sets, the data therein can be stored in a structured form.

[0113] According to some embodiments, reference Figure 5 In step S410, a target adjustment plan is generated by using a preset adaptive optimization algorithm according to trend analysis results and execution status feedback information, which can be specifically implemented through steps S510 to S530.

[0114] In step S510, the historical task features in the task history data set are matched with the current task features to determine a target historical task, wherein the target historical task is a historical task to be executed corresponding to the historical task feature having the greatest similarity to the current task feature.

[0115] Using the feedback learning mechanism, the task features in the historical data are matched with the current task features. Specifically, the historical task features and the current task features are extracted through feature analysis, and the case with the greatest similarity to the current task is found from the historical records as the target historical task.

[0116] Among them, task characteristics include task description, dependencies, resource requirements, etc.

[0117] In step S520, a task allocation strategy corresponding to the target historical task is obtained as an initial allocation plan.

[0118] After finding the case with the greatest similarity to the current task, obtain its corresponding task allocation strategy. The task allocation strategy is decomposed into the task instruction queue and the strategy assigned to the execution subject during the execution process.

[0119] In step S530, a target adjustment plan is determined according to the initial allocation plan and the trend analysis result.

[0120] Based on the historical execution results of similar tasks and referring to the trend analysis results, the allocation plan with the best performance is selected as the target adjustment plan.

[0121] In the process of determining the target adjustment plan, the aforementioned decision model can be used for strategy prediction, or a dynamic adjustment method can be adopted with reference to the initial allocation plan.

[0122] Dynamic adjustment methods, for example, adjust the priority of tasks in real time based on historical trend information. For example, assign lower priorities to tasks with lower historical completion success rates; assign higher weights to subtasks that consume more resources or are high-risk to ensure priority completion; optimize task resource allocation based on historical resource consumption patterns. For example, predict that a certain type of task requires more computing resources and allocate them to the task in advance; redefine the dependencies and execution order between subtasks through trend analysis data. For example, if a task is often blocked due to the failure of a dependent subtask, optimize its dependent path. It should be pointed out that the adjustment priority, weight, specific magnitude of resource allocation, and specific content of the adjustment dependent path can be set according to the initial allocation plan.

[0123] According to some embodiments, reference Figure 6 In step S123, historical trend analysis is performed on the task execution data in the task history data set to obtain trend analysis results, which can be specifically implemented through steps S610 to S630.

[0124] In step S610, the task execution data is classified and aggregated, and key indicators are calculated.

[0125] Perform statistical analysis on the task execution data in the task history data set. Specifically, calculate key indicators by classifying and aggregating the task data. Among them, key indicators include but are not limited to average task completion time, failure rate, success rate, and resource consumption distribution.

[0126] In step S620, categories whose key indicators are greater than a preset threshold are extracted to obtain common execution modes.

[0127] Extract categories with key indicators greater than preset thresholds to identify common execution patterns.

[0128] In step S630, bottleneck points and high-risk areas in the task execution data are identified according to a preset abnormality analysis algorithm.

[0129] Anomaly detection and pattern mining are performed on the task execution data in the task history dataset. Specifically, the preset anomaly analysis algorithm is used to identify bottlenecks and high-risk areas in task execution.

[0130] In a specific embodiment, the anomaly analysis algorithm adopts the PPO (Proximal Policy Optimization) algorithm.

[0131] Trend key metrics, common execution patterns, bottlenecks, and high-risk areas for analytical purposes.

[0132] Furthermore, the historical trend analysis also includes: using the task execution data in the task history data set to train the prediction model to predict the future task distribution and execution resource requirements. The prediction model can be constructed based on ARIMA, LSTM, etc., and this application does not limit this.

[0133] The following describes an apparatus embodiment of the present application, which can be used to execute the method embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, reference can be made to the method embodiment of the present application.

[0134] Figure 7 A block diagram of a complex task decomposition and dynamic optimization apparatus based on a large language model according to an exemplary embodiment is shown.

[0135] Figure 7 The device shown can execute the aforementioned complex task decomposition and dynamic optimization method based on a large language model according to the embodiment of the present application.

[0136] like Figure 7 As shown, the complex task decomposition and dynamic optimization device based on the large language model may include:

[0137] See also Figure 7And referring to the above description, the decomposition module 710 is used to decompose the task to be executed into multiple subtasks based on the pre-trained large language model, and generate a task instruction queue for executing the multiple subtasks.

[0138] The execution module 720 is used to execute the subtasks in the task instruction queue in sequence, and record the information during the execution process to obtain task execution data.

[0139] The monitoring module 730 is used to generate execution status feedback information according to the task execution data and a preset normal range.

[0140] The control module 740 is used to generate a task decomposition strategy adjustment instruction according to the execution state feedback information, and the task decomposition strategy adjustment instruction is used to adjust the execution subject of the task instruction queue and / or the subtask.

[0141] According to some embodiments, Figure 8 As shown, it also includes a data storage module for storing task history data sets.

[0142] According to some embodiments, modules exchange data via standardized interfaces to achieve real-time updating and adjustment of task status.

[0143] The modular design of this application makes the system highly flexible and scalable. The decomposition module is responsible for task splitting, the execution module implements specific operations, the monitoring module performs state tracking and anomaly detection, and the control module improves the overall task flow efficiency through data-driven optimization, so that it can quickly adapt to task scenarios of different complexities. The close collaboration between the decomposition, execution, monitoring and control modules significantly improves the reliability and overall efficiency of the task processing process, ensures the flexibility, adaptability and efficiency of the system in handling complex tasks, and has broad application potential.

[0144] The device performs functions similar to the method provided above. For other functions, please refer to the previous description and will not be repeated here.

[0145] Fig. 9 An electronic device according to an exemplary embodiment of the present application is shown. Fig. 9 hereinafter describes an electronic device 900 according to this embodiment of the present application. Figure 7 The electronic device 900 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0146] like Fig. 9As shown, the electronic device 900 is in the form of a general computing device. The components of the electronic device 900 may include, but are not limited to: at least one processing unit 910, at least one storage unit 920, a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910), a display unit 940, etc.

[0147] The storage unit stores program codes, which can be executed by the processing unit 910, so that the processing unit 910 executes the methods described in this specification according to various exemplary embodiments of the present application. For example, the processing unit 910 can execute the method as described above.

[0148] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 9201 and / or a cache storage unit 9202 , and may further include a read-only storage unit (ROM) 9203 .

[0149] The storage unit 920 may also include a program / utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0150] Bus 930 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0151] The electronic device 900 may also communicate with one or more external devices 300 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 900, and / or communicate with any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 950. Furthermore, the electronic device 900 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 960. The network adapter 960 may communicate with other modules of the electronic device 900 via a bus 930. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0152] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. The technical solution according to the implementation method of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above method according to the implementation method of the present application.

[0153] The software product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0154] Computer readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program codes contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.

[0155] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0156] The computer-readable medium carries one or more programs. When the one or more programs are executed by a device, the computer-readable medium implements the aforementioned functions.

[0157] Those skilled in the art will appreciate that the above modules can be distributed in the device according to the description of the embodiment, or can be changed accordingly and only used in one or more devices different from the embodiment. The modules of the above embodiments can be combined into one module, or further divided into multiple sub-modules.

[0158] According to an embodiment of the present application, a computer program is provided, including a computer program or an instruction. When the computer program or the instruction is executed by a processor, the method described above can be executed.

[0159] Those skilled in the art will appreciate that the above modules can be distributed in the device according to the description of the embodiment, or can be changed accordingly and only used in one or more devices different from the embodiment. The modules of the above embodiments can be combined into one module, or further divided into multiple sub-modules.

[0160] The embodiments of the present application are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and its core idea of ​​the present application. At the same time, changes or deformations made by those skilled in the art based on the ideas of the present application, the specific implementation methods and the scope of application of the present application, all belong to the scope of protection of the present application. In summary, the content of this specification should not be construed as a limitation on the present application.

Claims

1. A complex task decomposition and dynamic optimization method based on a large language model, characterized in that: include: Based on the pre-trained large language model, decompose the task to be executed into multiple subtasks, and generate a task instruction queue for executing the multiple subtasks; Execute the subtasks in the task instruction queue in sequence, and record the information during the execution to obtain task execution data; Generate execution status feedback information according to the task execution data and a preset normal range; A task decomposition strategy adjustment instruction is generated according to the execution status feedback information, and the task decomposition strategy adjustment instruction is used to adjust the task instruction queue and / or the execution subject of the subtask.

2. The method according to claim 1, characterized in that The method of decomposing the task to be executed into multiple subtasks based on the pre-trained large language model and generating a task instruction queue for executing the multiple subtasks includes: Based on the large language model, decomposing the task to be performed into multiple subtasks, and extracting logical dependencies between the multiple subtasks to obtain an initial subtask list; According to the time requirements, resource constraints and logical dependencies of the subtasks, setting execution priorities for the multiple subtasks based on the large language model; Based on the large language model, the multiple subtasks are refined to obtain a refined processing result of each subtask; wherein the refined processing result includes a subtask description, resources required for execution, and a feedback path after execution of the subtask; According to the refined processing result, the logical dependency and the execution priority, based on the large language model, the initial subtask list is adjusted to generate the task instruction queue.

3. The method according to claim 1, characterized in that Also includes: When an exception occurs during the task execution process, the plurality of subtasks are decomposed; or When there are abnormalities in the task execution process, the abnormal situation is searched based on the pre-built task processing database, and the abnormal situation is processed according to the search results.

4. The method according to claim 1, characterized in that The generating of the execution status feedback information according to the task execution data and a preset normal range includes: Using a preset abnormality detection algorithm and the preset normal range, performing abnormal state detection on the task execution data to obtain an abnormal state detection result; The execution status feedback information is generated according to the abnormal state detection result.

5. The method according to claim 1, characterized in that Also includes: Performing historical trend analysis on the task execution data in the task history data set to obtain trend analysis results, wherein the task history data set includes task execution data of the current execution process and the historical execution process.

6. The method according to claim 5, characterized in that The step of generating a task decomposition strategy adjustment instruction according to the execution status feedback information includes: Generate a target adjustment plan using a preset adaptive optimization algorithm according to the trend analysis result and the execution status feedback information; wherein the target adjustment plan is the adjustment required for the subtask involved in the execution status feedback information, including at least one of priority adjustment, resource allocation adjustment, logical dependency adjustment, execution order adjustment and execution subject adjustment; Generate a task decomposition strategy adjustment instruction according to the target adjustment plan.

7. The method according to claim 6, characterized in that The generating a target adjustment scheme by using a preset adaptive optimization algorithm according to the trend analysis result and the execution status feedback information includes: Matching the historical task features in the task history data set with the current task features to determine a target historical task, wherein the target historical task is a historical task to be executed corresponding to the historical task feature having the greatest similarity to the current task feature; Obtaining a task allocation strategy corresponding to the target historical task as an initial allocation plan; A target adjustment plan is determined according to the initial allocation plan and the trend analysis result.

8. The method according to claim 5, characterized in that The historical trend analysis is performed on the task execution data in the task history data set to obtain trend analysis results, including: Classifying and aggregating the task execution data and calculating key indicators; Extracting categories where the key indicators are greater than a preset threshold and obtaining common execution modes; Identify bottleneck points and high-risk areas in the task execution data according to a preset anomaly analysis algorithm; The key indicators, common execution modes, bottleneck points and high-risk areas are used as the trend analysis results.

9. A complex task decomposition and dynamic optimization device based on a large language model, characterized in that: include: A decomposition module, used for decomposing the task to be executed into multiple subtasks based on a pre-trained large language model, and generating a task instruction queue for executing the multiple subtasks; An execution module, used to execute the subtasks in the task instruction queue in sequence, and record the information during the execution to obtain task execution data; A monitoring module, used to generate execution status feedback information according to the task execution data and a preset normal range; The control module is used to generate a task decomposition strategy adjustment instruction according to the execution status feedback information, and the task decomposition strategy adjustment instruction is used to adjust the execution subject of the task instruction queue and / or the subtask.

10. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Cited By

  • Cue word layered optimization method for complex problem decomposition

    CN120234399A

  • Execution method and device of complex sequence task driven by large language model

    CN120494115A

  • Instruction generation type collaborative robot decision processing method and system and health care robot

    CN120611739A

  • Automatic process execution method based on large language model

    CN120780437A

  • Multi-robot collaborative task planning method based on large language model

    CN120816487A