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

By introducing long-range context management module and structured task representation (TES) deep collaboration, the limitations of LLM's context understanding and long-range dependence in complex sequence tasks are solved, and reliable, intelligent and controllable task execution is achieved.

CN120494115AActive Publication Date: 2025-08-15BEIJING CHAITIN TECH CO LTD

Patent Information

Application Number
CN202510978858.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-16
Publication Date
2025-08-15
Estimated Expiration
2045-07-16

AI Technical Summary

Technical Problem

The prior art is difficult to effectively overcome the limitations of large language models (LLMs) in context understanding, long-range dependency processing, etc., resulting in the execution of complex sequence tasks being unreliable, unintelligent and difficult to control.

Method used

By introducing a long-range context management module, deep collaboration between LLM and structured task representation (TES), real-time collection of execution feedback information, and optimization and adjustment of task description based on the feedback information to form closed-loop management.

Benefits of technology

It realizes the reliable, intelligent and controllable execution of large language models in complex sequence tasks, and can effectively utilize task history information and domain knowledge spanning multiple execution steps to complete highly complex and dynamic sequence tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120494115A_ABST
    Figure CN120494115A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for executing complex sequence tasks driven by a large language model, and relates to the technical field of artificial intelligence large models. The method comprises the following steps: a task planning step for outputting structured task description; a task execution step: driving and executing the structured task object, and collecting execution feedback information in real time; a long-range context updating and obtaining step: updating key information in the obtained execution feedback information to a long-range context management module, and obtaining context information of a cross-large language model interaction window; a task planning adjustment step for modifying the structured task description or generating a brand new structured task description; and repeatedly executing the task execution step, the long-range context updating and obtaining step and the task planning and adjusting step until the complex sequence task is completed or a preset termination condition is met. The method can reliably, intelligently and controllably complete sequence tasks with high complexity and dynamics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence large model technology, and in particular to a method and device for executing complex sequence tasks driven by a large language model. Background Art

[0002] There are currently two main technical solutions for using large language models (LLMs) to handle complex sequence tasks: (1) Solutions that directly generate task steps or simple workflows based on LLM This approach either directly relies on the LLM to output a series of task steps for subsequent execution, or embeds the LLM as a processing node within a predefined, relatively simple linear or branching workflow. However, this technical solution has significant drawbacks: First, the LLM's limited context window makes it difficult to maintain a comprehensive and consistent understanding of the entire task history for complex sequential tasks requiring long-range dependencies (i.e., where current decisions depend on the status or results of earlier steps), leading to short-sighted planning, logical discontinuities, or the omission of critical information. Second, when generating long-sequence plans or decisions, the LLM may still produce "illusions" of output that are inconsistent with reality or logic, and the determinism and repeatability of its output are sometimes difficult to guarantee, directly impacting the reliability of task execution. Third, traditional workflows struggle to effectively describe and manage complex tasks that involve numerous dynamic conditions, concurrent operations, complex dependencies, flexible backtracking, and the need for fine-grained policy adjustments based on real-time feedback. Fourth, the interaction between the LLM and the execution mechanism is typically one-way or shallow (e.g., LLM outputs text, the executor executes), lacking in-depth, multi-dimensional feedback from the execution process to guide the LLM in intelligent, global, and even proactive adjustments and optimizations. The execution process is often open-loop or weakly closed-loop. Fifth, the control logic for task execution is relatively fixed, making it difficult to dynamically reshape based on the LLM's in-depth understanding. Furthermore, the LLM's internal decision-making process is black-boxed, making the execution path and decision-making basis of the entire complex task difficult to explain and audit.

[0003] (2) LLM generates a specific structure or adjusts the structure LLM is used to generate behavior trees based on input commands and scenario information. However, current technical solutions focus on the initial generation of behavior trees. They lack mature solutions for the continuous evolution of behavior trees in complex dynamic environments, deep bidirectional intelligent collaboration with LLM, and how to integrate external mechanisms to overcome LLM limitations (such as context length) to guide the entire lifecycle of long-sequence tasks. These solutions remain limited to generating a relatively static structure. Some technical solutions can dynamically adjust behavior trees. However, these adjustments rely more on pre-set rules within the behavior tree or local adjustment logic based on simple sensor feedback, lacking the advanced cognitive intelligence and global planning capabilities of large-scale language models to guide such adjustments.

[0004] Even combining these two existing technologies fails to address the core challenges faced by LLMs in driving complex tasks with long sequences, high dynamics, and requiring complex reasoning and multi-source information fusion. For example, LLMs cannot fully leverage task history information spanning their own context window when adjusting behavior trees. Furthermore, LLMs struggle to implement efficient, intelligent, and multi-dimensional information exchange protocols with the execution structure to support complex collaborative decision-making.

[0005] Therefore, how to enable the large language model (LLM) to effectively overcome its own limitations in context understanding and long-range dependency processing, and deeply collaborate with a structured execution mechanism to reliably, intelligently, and controllably complete highly complex and dynamic sequential tasks has become a technical problem that needs to be solved urgently. Summary of the Invention

[0006] In view of the above-mentioned defects or deficiencies in the prior art, the present invention provides a method and device for executing complex sequence tasks driven by a large language model, which can effectively solve the technical problems mentioned in the background technology.

[0007] One aspect of the present invention provides a method for executing complex sequence tasks driven by a large language model, which is used in a large language model server and includes the following steps: Task planning step: semantically parse the input complex sequence task instructions, query the long-range context management module to obtain background knowledge related to the complex sequence task, and output a structured task description based on the semantic understanding of the complex sequence task and the acquired background knowledge; Task execution step: instantiating the structured task description into an executable structured task object, driving the execution of the structured task object, and collecting execution feedback information generated by the structured task object during this execution in real time; Long-range context updating and acquisition step: updating key information in the acquired execution feedback information to the long-range context management module, and querying the long-range context management module based on the execution feedback information to obtain context information across the large language model interaction window; Task planning adjustment step: judging whether the structured task description needs to be optimized and adjusted based on the execution feedback information, the context information of the cross-large language model interaction window, and the prediction results; if so, modifying the structured task description or generating a new structured task description, and substituting the modified structured task description or the new structured task description into the task execution step again; The above-mentioned task execution steps, long-term context updating and acquisition steps, and task planning adjustment steps are repeatedly performed until the complex sequence task is completed or a preset termination condition is reached.

[0008] Another aspect of the present invention provides an execution device for complex sequence tasks driven by a large language model, which is used in a large language model server and includes: The task planning module is used to perform semantic parsing on the input complex sequence task instructions, query the long-range context management module to obtain background knowledge related to the complex sequence task, and output a structured task description based on the semantic understanding of the complex sequence task and the acquired background knowledge; A task execution module is used to instantiate the structured task description into an executable structured task object, drive the execution of the structured task object, and collect execution feedback information generated by the structured task object during this execution in real time; A long-range context update and acquisition module, configured to update key information in the acquired execution feedback information to the long-range context management module, and query the long-range context management module based on the execution feedback information to obtain context information across the large language model interaction window; A task planning adjustment module is used to determine whether the structured task description needs to be optimized and adjusted based on the execution feedback information, the context information of the cross-large language model interaction window, and the prediction results. If so, the structured task description is modified or a new structured task description is generated, and the modified structured task description or the new structured task description is again substituted into the task execution module; The repeated execution module is used to repeatedly drive the execution of the above-mentioned task execution module, long-range context update and acquisition module, and task planning adjustment module until the complex sequence task is completed or the preset termination condition is reached.

[0009] The present invention provides a method and device for executing complex sequence tasks driven by a large language model. These methods enable the large language model to execute complex sequence tasks in an end-to-end, structured, and controllable manner. Furthermore, they provide a long-range context management mechanism that enables the large language model to effectively break through the limitations of its own context window, acquire and utilize task history information and domain knowledge spanning multiple execution steps, and use this information to guide the generation and dynamic adjustment of structured task representations, thereby reliably, intelligently, and controllably completing highly complex and dynamic sequence tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Other features, objects and advantages of the present application will become more apparent upon reading the detailed description of non-limiting embodiments made with reference to the following drawings: Figure 1 This is a flowchart of a method for executing a complex sequence task driven by a large language model provided by an embodiment of the present application; Figure 2 This is a schematic diagram of the structure of an execution device for complex sequence tasks driven by a large language model provided by one embodiment of the present application; Figure 3 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0011] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0012] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the embodiments of the present invention are also intended to include plural forms, unless the context clearly indicates other meanings.

[0013] It should be understood that although the terms first, second, third, etc. may be used to describe the acquisition modules in the embodiments of the present invention, the acquisition modules should not be limited to these terms. These terms are only used to distinguish the acquisition modules from each other.

[0014] The word "if," as used herein, may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to the determination" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.

[0015] It should be noted that the directional terms such as "upper," "lower," "left," and "right" described in the embodiments of the present invention are described from the perspectives shown in the accompanying drawings and should not be construed as limiting the embodiments of the present invention. Furthermore, in the context, it should be understood that when an element is referred to as being formed "on" or "under" another element, it can be formed not only directly "on" or "under" the other element, but also indirectly "on" or "under" the other element through an intermediate element.

[0016] See also Figure 1 One embodiment of the present application provides a method for executing a complex sequence task driven by a large language model, comprising the following steps: Step S101 , semantically parse the input complex sequence task instruction, query the long-range context management module to obtain background knowledge related to the complex sequence task, and output a structured task description based on the semantic understanding of the complex sequence task and the acquired background knowledge.

[0017] Specifically, users enter complex sequential task instructions through the task input interface, such as natural language descriptions like "harden application X and deploy it to production," or, in AI-assisted programming, "refactor module Y to improve its performance and fix known bug Z." The LLM cognitive and planning core performs deep semantic parsing on these complex sequential task instructions to identify the task objectives, main phases, implicit constraints, and potential dependencies. It also preliminarily queries the long-term context management module to acquire historical experience or domain knowledge related to the task. Based on this task understanding and acquired historical experience or domain knowledge (a type of contextual information in a broad sense), the LLM cognitive and planning core plans an initial execution strategy and control flow, and outputs a structured description of a structured task representation (TES). This description, referred to in this embodiment as a "structured task description or TES description," describes, for example, the node types, hierarchical relationships, connectivity, and initial parameters of key nodes in a behavior tree. If the structured task representation (TES) uses a behavior tree, the LLM plans a behavior tree structure consisting of sequence nodes, selection nodes, parallel nodes, decorator nodes, behavior nodes, and conditional nodes to handle the complex logic of the task.

[0018] Step S102: instantiate the structured task description into an executable structured task object, drive the execution of the structured task object, and collect execution feedback information generated by the structured task object during the current execution in real time.

[0019] Specifically, the structured execution and control module instantiates an executable TES object, such as a behavior tree instance, based on the TES description output by the LLM. The execution engine within the structured execution and control module then drives TES execution, interacting with the external environment or system through the underlying action interface. During TES execution, the execution feedback and monitoring module, embedded in the dynamic collaboration interface, collects in real time the execution status (success, failure, running, etc.) of each TES component, performance metrics (time consumption, resource usage, etc.), quality assessment results of intermediate products, and any important events or error messages from the underlying interfaces. This execution feedback information is organized into structured, multi-dimensional data packets.

[0020] Step S103 : updating key information in the obtained execution feedback information to the long-range context management module, and querying the long-range context management module according to the execution feedback information to obtain context information across the large language model interaction window.

[0021] Specifically, structured execution feedback information is continuously or periodically provided to the LLM cognitive and planning core through a dynamic collaborative interface, and the key execution history and status information in the execution feedback information is sent to the long-term context management module for recording and indexing. The LLM cognitive and planning core analyzes the received execution feedback information, performs semantic similarity retrieval in the vector database based on the execution feedback information, uses the knowledge graph to perform relational reasoning, and obtains context information across the large language model interaction window through index information, thereby overcoming the limitation of relying solely on the current interaction window information. Among them, the context information across the large language model interaction window includes one or more of the complete task history execution record, the intermediate data generated during the task execution process, the background knowledge related to the task, the user preferences, and the task constraints. Among them, the execution feedback information includes one or more of the execution history, the execution status, the system resource consumption of the execution, the execution time, and the quality assessment indicators of the intermediate data generated during the execution of the task.

[0022] Step S104: Based on the execution feedback information, the context information across the large language model interaction window, and the prediction results, determine whether the structured task description needs to be optimized and adjusted. If so, modify the structured task description or generate a new structured task description, and substitute the modified structured task description or the new structured task description into step S102 again.

[0023] Specifically, LLM comprehensively executes feedback information, the contextual information and prediction results across the large language model interaction window, performs deep reasoning and intelligent decision-making, and determines whether and how to adjust or optimize the TES. The decision-making goals include: improving the success rate, improving efficiency, reducing risks, meeting new constraints that emerge dynamically, etc. If the LLM decision needs to be adjusted, it will generate modification instructions for the TES, such as: modifying the nodes, parameters, connections of the behavior tree, or replacing the entire subtree, and send it to the structured execution and control module through the dynamic collaborative interface. The structured execution and control module updates the TES in real time according to the instructions. In some extreme cases, such as when the original plan proves to be completely unfeasible, LLM can perform global re-planning to generate a completely new TES description. The modified structured task description or the completely new structured task description will be substituted into step S102 again for execution in subsequent steps.

[0024] Repeat steps S102 through S104, forming a continuous "execution-monitoring-feedback-analysis-decision-adjustment" cycle until the TES indicates successful task completion. If the goal cannot be achieved after multiple attempts and optimizations, the task terminates when a preset termination condition is met, such as the maximum number of attempts or the maximum total time limit. A detailed execution summary and failure analysis are output via the LLM.

[0025] This embodiment achieves intelligent management of the entire lifecycle of complex sequential tasks, from planning, execution, monitoring, to dynamic optimization, through deep, bidirectional interaction and collaboration between the LLM and a structured task representation (TES, preferably behavior trees). This effectively overcomes the inherent limitations of the LLM in handling long-range dependencies, context window limitations, and robust execution. Furthermore, by introducing an external long-range context management module to persist and retrieve task history and domain knowledge across LLM interaction windows and establishing a multi-dimensional structured feedback mechanism, this approach enables reliable, intelligent, and controllable completion of highly complex and dynamic sequential tasks.

[0026] In another embodiment, the entire process of applying the above method to network security automated incident response (taking APT attack scenarios as an example) is introduced in detail.

[0027] The system detected early indicators of a suspected advanced persistent threat (APT) attack involving multiple stages and multiple assets, requiring a complex and dynamic response.

[0028] Specific system implementation: (1) Task input and LLM understanding Initial alert information, including suspicious process behavior detected by the EEDR and malicious IOCs matched by the threat intelligence platform, is fed into the system. The LLM Cognition and Planning Core analyzes the alerts and queries the Long-Term Context Management module for information on the TTPs (Tactics, Techniques, and Procedures) of this APT group, historical records of similar incidents, and the current criticality rating of enterprise assets and business impact assessment criteria. The LLM understands the mission objectives as in-depth analysis, confirming the threat level, containing lateral movement, eliminating malicious activity, tracing the attack path, remediating vulnerabilities, and preventing recurrence.

[0029] (2) Initial TES (Behavior Tree) Planning Based on this information, the LLM plans a multi-stage, highly structured incident response (TES), implemented in this example as a behavior tree. The root node of this behavior tree can be a sequential node, containing subtrees for key phases, such as "Initial Assessment and Information Enrichment," "In-depth Analysis and Threat Confirmation," "Containment and Isolation," "Cleanup and Recovery," and "Source Tracing and Hardening." Each subtree contains more detailed selection nodes (for trying different analysis methods or containment strategies), parallel nodes (for concurrently executing certain investigative actions), and behavior nodes that call specific security tool APIs. The LLM sets initial parameters for each node, such as query statements, IP lists, and isolation levels.

[0030] (3) TES implementation and multi-dimensional feedback The behavior tree begins execution. During the "deep analysis" phase, after a behavior node executes, it returns multi-dimensional feedback, including not only success / failure but also a detailed JSON report from the sandbox (including file behavior, network connections, extracted IOCs), analysis time, and the sandbox's maliciousness score. A conditional node determines whether the affected asset is critical by querying the configuration management database (CMDB) (via a low-level interface; the results may also be interpreted and fed back by LLM).

[0031] (4) LLM intelligent analysis and TES dynamic adjustment: Scenario A (Containment Strategy Optimization): When the behavior tree reaches the "Containment and Isolation" stage and prepares to perform network isolation on a host, the LLM receives feedback: the host is a critical business server, and isolation will cause significant business disruption. This judgment may be based on a combination of CMDB information and pre-stored business impact rules in the long-term context management module. The execution effect prediction engine, based on historical data, predicts that complete isolation will result in significant losses. After analysis, the LLM dynamically modifies the behavior tree. Rather than executing the complete isolation behavior node, it replaces it with a new sequential subtree containing actions such as "Apply more granular access control policies (for example, blocking only specific ports or protocols)", "Initiate enhanced real-time monitoring of the host", and "Immediately notify the security officer for manual intervention". The LLM also updates the long-term context module, recording the specific handling strategy for this critical asset.

[0032] Scenario B (New TTP Response): During the "Attribution and Hardening" phase, if all known mitigation measures are successfully executed, but monitoring feedback still indicates minor anomalous activity, the LLM receives this inconsistent, multi-dimensional feedback (i.e., successful mitigation vs. still experiencing anomalies). LLM queries the Long-Term Context Management module for the latest threat intelligence and zero-day vulnerability information, and integrates all previously collected IOCs and host behavior data from the incident for comprehensive reasoning. LLM determines this is an undocumented TTP. It dynamically generates a new behavior tree subsection containing more advanced threat hunting actions and instructs it to be inserted into the attribution portion of the current behavior tree, or as a parallel investigation branch.

[0033] (5) Mission Completed After the threat is effectively controlled and eliminated, the system is restored, and LLM automatically generates and submits a complete incident analysis report based on the execution process and long-term context records.

[0034] See also Figure 2 Another embodiment of the present invention provides a device 200 for executing complex sequence tasks driven by a large language model, comprising a task planning module 201, a task execution module 202, a long-range context update and acquisition module 203, a task planning adjustment module 204, and a repeated execution module 205. Device 200 is capable of executing the method for executing complex sequence tasks driven by a large language model described in the method embodiment.

[0035] Specifically, the apparatus 200 includes: The task planning module 201 is used to perform semantic parsing on the input complex sequence task instructions, query the long-range context management module to obtain background knowledge related to the complex sequence task, and output a structured task description based on the semantic understanding of the complex sequence task and the acquired background knowledge; The task execution module 202 is used to instantiate the structured task description into an executable structured task object, drive the execution of the structured task object, and collect execution feedback information generated by the structured task object during the execution process in real time; A long-range context updating and acquisition module 203 is configured to update key information in the acquired execution feedback information to a long-range context management module, and query the long-range context management module based on the acquired execution feedback information to acquire context information across the large language model interaction window; The task planning adjustment module 204 is used to determine whether the structured task description needs to be optimized and adjusted based on the execution feedback information, the context information of the cross-large language model interaction window, and the prediction results. If so, the structured task description is modified or a new structured task description is generated, and the modified structured task description or the new structured task description is again substituted into the task execution step of the task execution module 202; The repetitive execution module 205 is used to repeatedly drive the execution of the task execution module, the long-range context update and acquisition module, and the task planning adjustment module until the complex sequence task is completed or a preset termination condition is reached.

[0036] It should be noted that the execution device 200 for complex sequence tasks driven by a large language model provided in this embodiment corresponds to a technical solution that can be used to execute various method embodiments. Its implementation principle and technical effects are similar to those of the method and will not be repeated here.

[0037] Figure 3 This is a schematic diagram of the structure of an electronic device 300 provided in another embodiment of the present invention. This electronic device 300 is used to implement the method for executing complex sequence tasks driven by a large language model in a method embodiment. The electronic device 300 in this embodiment of the present invention may include, but is not limited to, a PC, a laptop computer, a smartphone, a PDA, a tablet computer, and the like. Figure 3 The electronic device 300 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present invention.

[0038] like Figure 3As shown, electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes to implement the methods of the embodiments of the present invention according to programs stored in read-only memory (ROM) 302 or programs loaded from storage device 308 into random access memory (RAM) 303. RAM 303 also stores various programs and data required for the operation of electronic device 300. Processing device 301, ROM 302, and RAM 303 are interconnected via bus 305. Input / output (I / O) interface 304 is also connected to bus 305.

[0039] Typically, the following devices may be connected to the I / O interface 304: an input device 306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0040] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention also provides a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart, thereby realizing the execution method of the complex sequence task driven by the large language model as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of the embodiment of the present invention are performed.

[0041] The above description is merely a preferred embodiment of the present invention. Those skilled in the art should understand that the scope of the present invention is not limited to technical solutions formed by specific combinations of the above-mentioned technical features. It also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents, without departing from the above-mentioned disclosure. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this invention.

Claims

1. A method for executing complex sequence tasks driven by a large language model, used in a large language model server, characterized in that: The steps include: Task planning step: semantically parse the input complex sequence task instructions, query the long-range context management module to obtain background knowledge related to the complex sequence task, and output a structured task description based on the semantic understanding of the complex sequence task and the acquired background knowledge; Task execution step: instantiating the structured task description into an executable structured task object, driving the execution of the structured task object, and collecting execution feedback information generated by the structured task object during this execution in real time; Long-range context updating and acquisition step: updating key information in the acquired execution feedback information to the long-range context management module, and querying the long-range context management module based on the execution feedback information to obtain context information across the large language model interaction window; Task planning adjustment step: judging whether the structured task description needs to be optimized and adjusted based on the execution feedback information, the context information of the cross-large language model interaction window, and the prediction results; if so, modifying the structured task description or generating a new structured task description, and substituting the modified structured task description or the new structured task description into the task execution step again; The above-mentioned task execution steps, long-term context updating and acquisition steps, and task planning adjustment steps are repeatedly performed until the complex sequence task is completed or a preset termination condition is reached.

2. The method for executing complex sequence tasks driven by a large language model according to claim 1, characterized in that: The step of updating the key information in the acquired execution feedback information to the long-range context management module includes: The execution history information and execution status information in the obtained execution feedback information are sent to the long-range context management module for recording and indexing.

3. The method for executing complex sequence tasks driven by a large language model according to claim 1, characterized in that: The step of querying the long-range context management module according to the execution feedback information to obtain context information across the large language model interaction window includes: According to the execution feedback information, semantic similarity retrieval is performed in the vector database, relational reasoning is performed using the knowledge graph, and context information across the large language model interaction window is obtained through index information.

4. The method for executing complex sequence tasks driven by a large language model according to claim 1, characterized in that: The context information across the large language model interaction window includes: complete task history execution records, intermediate data generated during task execution, background knowledge related to the task, user preferences, and one or more of task constraints.

5. The method for executing complex sequence tasks driven by a large language model according to claim 1, characterized in that: The execution feedback information generated by the structured task object during this execution process includes: this execution history, this execution status, this execution system resource consumption, this execution time, and one or more quality assessment indicators of intermediate data generated during this task execution.

6. A device for executing complex sequence tasks driven by a large language model, used in a large language model server, characterized in that: include: The task planning module is used to perform semantic parsing on the input complex sequence task instructions, query the long-range context management module to obtain background knowledge related to the complex sequence task, and output a structured task description based on the semantic understanding of the complex sequence task and the acquired background knowledge; A task execution module is used to instantiate the structured task description into an executable structured task object, drive the execution of the structured task object, and collect execution feedback information generated by the structured task object during this execution in real time; A long-range context update and acquisition module, configured to update key information in the acquired execution feedback information to the long-range context management module, and query the long-range context management module based on the execution feedback information to obtain context information across the large language model interaction window; A task planning adjustment module is used to determine whether the structured task description needs to be optimized and adjusted based on the execution feedback information, the context information of the cross-large language model interaction window, and the prediction results. If so, the structured task description is modified or a new structured task description is generated, and the modified structured task description or the new structured task description is again substituted into the task execution module; The repeated execution module is used to repeatedly drive the execution of the above-mentioned task execution module, long-range context update and acquisition module, and task planning adjustment module until the complex sequence task is completed or the preset termination condition is reached.

7. The device for executing complex sequence tasks driven by a large language model according to claim 6, characterized in that: The long-range context updating and acquisition module is further used to: The execution history information and execution status information in the obtained execution feedback information are sent to the long-range context management module for recording and indexing.

8. The device for executing complex sequence tasks driven by a large language model according to claim 6, characterized in that: The long-range context updating and acquisition module is further used to: According to the execution feedback information, semantic similarity retrieval is performed in the vector database, relational reasoning is performed using the knowledge graph, and context information across the large language model interaction window is obtained through index information.

9. The device for executing complex sequence tasks driven by a large language model according to claim 6, characterized in that: The context information across the large language model interaction window includes: One or more of the following: complete historical task execution records, intermediate data generated during task execution, task-related background knowledge, user preferences, and task constraints.

10. The device for executing complex sequence tasks driven by a large language model according to claim 6, characterized in that: The execution feedback information generated by the structured task object during this execution process includes: One or more of the following quality assessment indicators: the execution history, the execution status, the system resource consumption, the execution time, and the intermediate data generated during the execution of this task.

Citation Information

Patent Citations

  • Control method and device for intelligent agent with body and readable storage medium

    CN119416881A

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

    CN119883549A

  • Multi-agent cooperative task planning method, system and device and storage medium

    CN119917319A

  • All-shot training of large language models

    US20250148276A1

Cited By

  • Task generation and execution method and system applied to network security system

    CN121071163A