Task planning method and device, equipment, medium and program product
By combining large language models and traditional planners, natural language tasks are parsed and logically verified to generate executable task planning paths. This solves the problem of insufficient adaptability and reliability of existing task planning methods in complex and open environments, and achieves flexible and reliable task planning.
Patent Information
- Application Number
- CN202511665306.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-02-10
AI Technical Summary
Existing task planning methods suffer from insufficient adaptability and low reliability when facing open domains and complex tasks. Traditional planners lack common sense knowledge, resulting in rigid planning templates, while large language models lack logical verification, leading to unreliable generated planning content.
By parsing natural language tasks using a pre-set large language model, generating task execution steps, and performing formal compilation and logical verification, the rigor of traditional planners is utilized to ensure the logical completeness and executability of the planning results, thus achieving a complementary advantage of the two technologies.
It improves the flexibility and reliability of task planning, and the generated planning results are both creative and practically executable, solving the problem of insufficient adaptability and reliability of traditional methods in complex tasks.
Smart Images

Figure CN121504032A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of task planning, in particular to a task planning method, a task planning device, a task planning equipment, a storage medium and a computer program product. BACKGROUND
[0002] Traditional task planning methods mainly rely on strict algorithms in traditional planners to ensure the logical correctness and executability of the planned tasks. However, the traditional task planning method relying on the traditional planner cannot adapt to the complex and open real-world tasks when facing incomplete or ambiguous information described in natural language, because it lacks common sense cognition and semantic understanding ability of the real world, resulting in the generated task planning template being too stereotyped and poor in adaptability, and unable to adapt to the complex and changing actual scene requirements.
[0003] After the development of artificial intelligence, the existing task planning method tends to use a large language model. Although the large language model has powerful natural language understanding and generation capabilities, it can generate a seemingly reasonable task decomposition scheme based on massive knowledge. However, due to the lack of logical verification of the large language model, the generated planning content has factual errors or logical contradictions, resulting in the task planning template output according to the planning content being unreliable in the actual scene.
[0004] As can be seen, these two technical paths each have inherent defects that are difficult to overcome, so that the existing task planning method has the problems of insufficient adaptability and low reliability when dealing with complex and open tasks in real environments. SUMMARY
[0005] The main purpose of the present application is to provide a task planning method, a task planning device, a task planning equipment, a storage medium and a computer program product, which aims to solve the technical problems of insufficient adaptability and low reliability of the existing task planning method when dealing with complex and open tasks in real environments.
[0006] To achieve the above-mentioned purpose, the present application provides a task planning method, which comprises: receiving a natural language target task input by a user; analyzing the natural language target task by a preset large language model to determine at least one task execution link; formalizing and compiling each task execution link to obtain a formal planning description language file; if the logic verification of the formal planning description language file is passed, generating one or more executable paths of the natural language target task according to the formal planning description language file, wherein the natural language target task is implemented through the executable path.
[0007] In an embodiment, the step of determining at least one task execution link by parsing the natural language target task through a preset large language model comprises: task decomposition of the natural language target task through the preset large language model to obtain a plurality of subtasks; inference of the plurality of subtasks through the preset large language model to generate at least one task execution link.
[0008] In an embodiment, the task execution link includes a key action required to achieve the natural language target task, and before the step of generating one or more executable paths of the natural language target task according to the formal planning description language file when the logical verification of the formal planning description language file passes, comprising: verify whether the preconditions of the key action are met, the preconditions including the execution object of the key action and the logical relationship between the execution object and the corresponding key action; when the preconditions are met, the logical verification is passed; when the preconditions are not met, the logical verification fails.
[0009] In an embodiment, after the step of determining that the logical verification fails when the preconditions are not met, further comprising: obtain the specific reason for causing the logical verification to fail, wherein the specific reason includes a mismatch between the key action and the execution object, and / or a logical relationship error between the execution object and the corresponding key action; feed back the specific reason to the preset large language model to trigger the preset large language model to reparse and determine the task execution link based on the specific reason and the natural language target task.
[0010] In an embodiment, after the step of generating one or more executable paths of the natural language target task according to the formal planning description language file when the logical verification of the formal planning description language file passes, further comprising: determine the planning direction characteristics corresponding to each executable path; priority scoring of each executable path with different planning direction characteristics to obtain a scoring result; select the target executable path with the highest scoring result as the optimal executable path of the natural language target task.
[0011] In an embodiment, the task execution link includes a key action required to achieve the natural language target task, and after the step of parsing the natural language target task by the preset large language model to generate at least one task execution link, the method further comprises: identifying a plurality of repeated key actions at a target task execution link from each of the task execution links; based on the execution cost of one of the repeated key actions, filtering out the repeated key action with an execution cost higher than a preset cost threshold from each of the repeated key actions to obtain one or more remaining repeated key actions after action deduplication, and a new task execution link composed of the remaining repeated key actions; if the logical verification of the new formal planning description language file corresponding to the new task execution link passes, generating one or more new executable paths of the natural language target task according to the new formal planning description language file.
[0012] In addition, to achieve the above-mentioned purpose, the present application also provides a task planning device, which comprises: a receiving module configured to receive a natural language target task input by a user; a parsing module configured to parse the natural language target task by a preset large language model to determine at least one task execution link; a compiling module configured to compile each of the task execution links to obtain a formal planning description language file; a generating module configured to generate one or more executable paths of the natural language target task according to the formal planning description language file if the logical verification of the formal planning description language file passes, wherein the natural language target task is implemented through the executable path.
[0013] In addition, to achieve the above-mentioned purpose, the present application also provides a task planning device, which comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the task planning method as described above.
[0014] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, wherein the computer program is executed by a processor to implement the steps of the task planning method as described above.
[0015] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which comprises a computer program, wherein the computer program is executed by a processor to implement the steps of the task planning method as described above.
[0016] The one or more technical solutions proposed in the present application have at least the following technical effects: Because the method relying only on the traditional planner in the prior art is difficult to generate a reasonable planning strategy when facing open field and incomplete information natural language tasks due to the lack of common sense reasoning ability, and the method relying only on the large language model also leads to the existence of factual errors and logical contradictions in the generated planning content due to the lack of logical verification mechanism, and further the task planning result is either too rigid to deviate from the actual demand, lacking reliability.
[0017] After receiving the natural language target task input by the user, the present application first analyzes the natural language target task through the preset large language model, generates at least one task execution link using the semantic understanding and common sense reasoning ability of the preset large language model, which solves the limitation of the traditional planner in dealing with open field tasks due to the lack of world knowledge; then formalizes the compilation of each task execution link, converts each task execution link into a formal planning description language file, and converts the flexible output of the preset large language model into a structured expression that can be strictly verified; then ensures the logical completeness and execution feasibility of the formal planning description language file through logical verification, and uses the rigor of the traditional planner to make up for the deficiency of the large language model in logical verification; finally, when the verification is passed, one or more executable paths of the natural language target task are generated according to the formal planning description language file, which not only retains the creativity of the large language model, but also guarantees the actual executability of the planning result through logical verification, thereby realizing the complementary advantages of the two technologies, and effectively solving the problems of insufficient adaptability and low reliability of the existing task planning method when dealing with complex real tasks. BRIEF DESCRIPTION OF DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0020] Figure 1 The first flowchart provided for an embodiment of the task planning method of the present application; Figure 2 The second flowchart provided for an embodiment of the task planning method of the present application; Figure 3 The brief flowchart provided for an embodiment of the task planning method of the present application; Figure 4 A module structure diagram of a task planning device according to the present application; Figure 5 A device structure diagram of a hardware running environment related to a task planning method according to the present application.
[0021] The object implementation, functional features and advantages of the present application will be further explained with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0022] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.
[0023] In order to better understand the technical solutions of the present application, the following will be described in detail in conjunction with the drawings and specific embodiments.
[0024] It should be noted that the execution subject of the present embodiment can be a task planning device, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device or a processor capable of realizing the above functions. The present embodiment and the following embodiments will be described below taking the task planning device as an example.
[0025] Based on this, the present embodiment provides a task planning method, which will be described below with reference to Figure 1 , Figure 1 A flowchart of an embodiment of a task planning method according to the present application.
[0026] In the present embodiment, the task planning method comprises steps S10-S40: Step S10, receiving a natural language target task input by a user; It should be noted that the task planning device receives the natural language target task input by the user.
[0027] In the specific embodiment, "receiving" means that the task planning device acquires the task description expressed by the user in the form of voice or text through a user interface or a voice interface, for example, the user says "handle the opening procedures of a technology company".
[0028] Optionally, the natural language target task refers to the task intention or requirement expressed by the user in daily language, for example, "handle one-stop opening procedures for a newly established technology company".
[0029] It can be understood that the natural language target task usually contains ambiguous or polysemous expressions, which need to be analyzed in subsequent steps.
[0030] Exemplarily, the task planning device can capture the user input through a voice recognition or text input device.
[0031] At step S20, the natural language target task is parsed by a preset large language model to determine at least one task execution link. It should be noted that the task planning device parses the received natural language target task by a preset large language model to determine at least one task execution link.
[0032] Optionally, the large language model is an artificial intelligence model pre-trained by a large amount of text data, which has strong common sense reasoning and semantic understanding ability, and can use a rich world knowledge base to perform semantic understanding and logical reasoning on the natural language target task.
[0033] For example, for the task of "starting a technology company", the large language model can identify task execution links such as business registration, bank account opening, and tax registration.
[0034] It can be understood that the task execution link refers to a key action required to complete the natural language target task and an object of the key action. Optionally, this process generates multiple possible execution strategies and link combinations based on the deep understanding of the task context and domain knowledge by the large language model, rather than relying on pre-hard-coded fixed processes, thereby breaking the dependence of traditional planning methods on structured input and improving the flexibility of task planning.
[0035] At step S30, each task execution link is formalized and compiled to obtain a formal planning description language file. It should be noted that the task planning device formalizes and compiles each task execution link to obtain a formal planning description language file.
[0036] In the specific embodiment, formalization and compilation is a conversion process that uses pre-defined mapping rules and entity recognition capabilities to translate the semi-structured task execution links generated by the large language model into standardized formal planning description languages, such as PDDL (Planning Domain Definition Language, Planning Domain Definition Language).
[0037] Optionally, the process of formalization and compilation involves identifying key actions, execution objects of key actions, and logical relationships between them, and converting them into structured domain and problem files.
[0038] It can be understood that the formal planning description language file defines the preconditions and effects of the key actions, converts the ambiguity of natural language into precise descriptions that can be processed by machines, and provides a basis for logical verification by traditional planners.
[0039] Step S40, if the logical verification of the formal planning description language file passes, one or more executable paths of the natural language target task are generated according to the formal planning description language file, wherein the natural language target task is implemented through the executable path.
[0040] It should be noted that the task planning device generates one or more executable paths of the natural language target task according to the formal planning description language file after the logical verification of the formal planning description language file passes.
[0041] In the specific embodiment, the logical verification is performed by a built-in traditional planner (such as a heuristic search or SAT solver), which strictly checks the satisfaction of the preconditions of the key actions in the task execution link and the path reachability.
[0042] Optionally, the executable path is a series of steps, such as specific operations from “preparing materials” to “completing registration”, which ensures that the task is actually feasible.
[0043] Optionally, after the logical verification passes, the task planning device converts the formal description file into a natural language step output, which is one or more executable paths of the natural language target task.
[0044] The embodiment provides a task planning method. After receiving a natural language target task input by a user, the natural language target task is first parsed by a preset large language model, and at least one task execution link is generated by using the semantic understanding and common sense reasoning capability of the preset large language model, which solves the limitation that a traditional planner is difficult to cope with open field tasks due to lack of world knowledge; then each task execution link is formalized and compiled, and each task execution link is converted into a formal planning description language file, so that the flexible output of the preset large language model is converted into a structured expression that can be strictly verified; then the logical completeness and execution feasibility of the formal planning description language file are ensured through logical verification, and the rigor of the traditional planner is used to make up for the deficiency of the large language model in logical verification; finally, one or more executable paths of the natural language target task are generated according to the formal planning description language file when the verification passes, which not only retains the creativity of the large language model, but also guarantees the actual executability of the planning result through logical verification, so that the advantages of the two technologies are complementary, and the problems of insufficient adaptability and low reliability of the existing task planning method in coping with complex real tasks are effectively solved.
[0045] In a feasible implementation, step S20 can include steps S21-S22: Step S21, task decomposition is performed on the natural language target task by the preset large language model, and a plurality of subtasks are obtained; It should be noted that the task planning device decomposes the received natural language target task into multiple sub-tasks using a preset large language model.
[0046] In specific implementations, task decomposition refers to breaking down complex natural language target tasks into smaller, more specific sub-task units. For example, "handling the procedures for starting a technology company" may be decomposed into sub-tasks such as "business registration", "bank account opening", and "tax registration".
[0047] Understandably, a subtask refers to an intermediate step required to complete the natural language target task. The large language model derives subtasks based on common sense reasoning.
[0048] Step S22: Reason about multiple sub-tasks using a pre-set large language model to generate at least one task execution step.
[0049] It should be noted that the task planning device uses the same preset large language model to reason about the multiple sub-tasks obtained from the above decomposition in order to generate at least one task execution stage.
[0050] Optionally, the reasoning process involves analyzing the dependencies and execution order between subtasks, thereby forming more specific task execution steps.
[0051] In a specific implementation, the task execution phase is a sequence of tasks expressed in natural language or semi-structured form, which summarizes the possible paths and strategies for achieving the overall goal.
[0052] In a specific implementation, the reasoning process includes the large language model inferring the actual task execution steps based on the content of the sub-tasks. For example, from the sub-task of "business registration", steps such as "preparing materials", "submitting application", and "obtaining business license" can be inferred.
[0053] In another feasible implementation, the task execution phase includes key actions required to achieve the natural language target task, and steps S41 to S43 may be included before step S40: Step S41: Verify whether the prerequisites for the key action are met. The prerequisites include: the execution object of the key action, and the logical relationship between the execution object and the corresponding key action. It should be noted that before generating an executable path, the task planning device needs to perform logical verification on the formal planning description language file obtained after formal compilation.
[0054] In a specific implementation, the task planning device verifies whether the prerequisite conditions for each critical action are met. The "prerequisite conditions" refer to the prerequisite states that must be met to execute a critical action. They include the existence and readiness state of the "execution object" that executes the critical action, as well as the "logical relationship" that must be followed between the "execution object" and the corresponding "critical action".
[0055] In a specific implementation, the verification process can be that the task planning device checks the prerequisite dependencies through its built-in traditional planner. For example, for the key action of "submitting registration application", the prerequisite dependencies include that the execution object "business license application form" must be filled out, and logically, the form must be completed before it can enter the "submission" stage.
[0056] Understandably, this verification ensures that each step is initiated based on the correct state, avoiding logical breaks or resource conflicts.
[0057] Step S42: When the pre-existing dependency condition is met, the judgment logic verification passes; It should be noted that the task planning device makes a judgment based on the verification results. If all the pre-conditions are met, the logic verification of the entire plan is deemed to have passed.
[0058] In a specific implementation, the "determination" is performed by the traditional planner of the task planning device, ensuring that all prerequisites for the critical actions are met and that the entire sequence of critical actions is coherent and achievable from the initial state to the target state.
[0059] Understandably, passing the logic verification means that the file generated by the large language model and formally compiled is feasible and rigorous. For example, this is equivalent to confirming that there are no missing links or contradictions in the entire process "from preparing materials to obtaining a license", so that the task planning device can enter the executable path generation stage.
[0060] Step S43: If the pre-existing dependency condition is not met, the logic verification fails.
[0061] It should be noted that if the task planning device finds any prerequisite conditions that are not met during the verification process, it will determine that the logic verification has failed.
[0062] In specific implementations, the failure to meet the prerequisites may be due to the absence of the execution object (e.g., the "official seal" has not yet been engraved), an incorrect logical relationship (e.g., "tax declaration" is carried out before "bank account opening"), or the failure to meet both the execution object and the logical relationship.
[0063] In one embodiment, after step S43, steps S44-S45 may also be included: Step S44: Obtain the specific reasons for the failure of logic verification. The specific reasons include mismatch between key actions and execution objects, and / or, incorrect logical relationship between execution objects and corresponding key actions. It should be noted that after the task planning device determines that the logic verification has failed, the task planning device will obtain the specific reason for the failure.
[0064] In a specific implementation, the acquisition process includes the task planning device extracting and parsing structured error reports from its built-in conventional planner.
[0065] Optionally, the "specific reasons" include logical defects present in the formal planning description language file, such as a mismatch between the "key actions" and the required "execution objects", and / or an error in the "logical relationship" between the "execution objects" and the corresponding "key actions".
[0066] For example, a mismatch could be that the execution object of the critical action "submitting an application" is not generated by a prerequisite action; while a logical relationship error could be that "paying registered capital" is performed before "opening a bank account," which violates the basic business process.
[0067] Step S45: Feedback the specific reasons to the preset large language model, triggering the preset large language model to re-parse and determine the task execution stage based on the specific reasons and the natural language target task.
[0068] It should be noted that the task planning device feeds back the specific reasons obtained as strong constraints to the preset large language model.
[0069] In a specific implementation, the feedback process includes the task planning device transmitting structured error information to a preset large language model, enabling the large language model to understand the deficiencies in the previously generated task execution steps. It is understood that the specific process of parsing and determining the error can be the process described in steps S21-S22, and will not be elaborated further here.
[0070] Understandably, this step triggers the pre-defined large language model to regenerate prompt words based on the specific reasons for failure, and to re-infer the original natural language target task to generate new and more reasonable task execution steps.
[0071] For example, after receiving feedback such as "a business license must be obtained before the official seal can be made", the large language model will adjust the order of actions in the next round of generation to ensure a logical loop.
[0072] Understandably, this process constitutes an efficient iterative optimization loop, significantly improving the feasibility and accuracy of the executable path ultimately output by the task planning device.
[0073] Based on the above embodiments of this application, in another embodiment of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter. Furthermore, after step S40, the task planning method further includes steps D40~D60: Building upon the task planning device's generation of multiple executable paths, a further technical solution for path optimization and selection is proposed to address the technical challenge of automatically determining the optimal execution path among multiple feasible options. Understandably, while logical verification ensures the feasibility of each executable path, different paths differ in efficiency, resource consumption, or execution strategies. If manual selection by the user is still required, it would reduce decision-making efficiency.
[0074] Step D40: Determine the planning direction characteristics corresponding to each executable path; It should be noted that the task planning equipment determines the planning direction characteristics corresponding to each executable path.
[0075] In a specific implementation, the determination process includes the task planning device analyzing and extracting features from each executable path.
[0076] Optionally, planning direction characteristics refer to key indicators that can characterize the performance of an executable path. For example, planning direction characteristics may include the total execution time of the executable path, the estimated economic cost, the complexity of the operational steps involved, or the degree of dependence on specific resources (such as human resources or specific qualifications).
[0077] Step D50: Prioritize each executable path with different planning direction characteristics and obtain the scoring results; It should be noted that the task planning device prioritizes each executable path with different planning direction characteristics and obtains the corresponding score results.
[0078] In a specific implementation, priority scoring can be achieved by the task planning device comprehensively and quantitatively evaluating the various planning direction characteristics of each executable path based on a set of predefined weighting rules. For example, "execution efficiency" can be given a higher weight, and the executable path with a shorter total time will receive a higher score in this item; conversely, if the user is more concerned about "cost control", then the executable path with the lowest cost will receive a higher score.
[0079] In specific implementations, priority scoring can also be performed by the task planning device based on the path length of each executable path. Specifically, the path length can be directly measured by the number of key actions it contains. The fewer the key actions, the shorter the path and the higher the execution efficiency, and the higher its priority score will be. Alternatively, it can be evaluated based on the complexity of each executable path. Specifically, complexity can be calculated by analyzing comprehensive factors such as the logical dependencies between key actions, the types and quantities of required resources, and execution conditions. The clearer the overall logical chain of the path and the simpler the resource requirements, the lower its complexity and the higher its priority score.
[0080] Understandably, this step transforms the extracted planning direction features into a comparable score, thereby ranking all executable paths according to their merits.
[0081] Step D60: Select the executable path with the highest score as the optimal executable path for the natural language target task.
[0082] It should be noted that the task planning device selects the target executable path with the highest score and outputs it as the optimal solution for the natural language target task to the user.
[0083] In a specific implementation, the selection process is an automated decision-making behavior based on the scoring results. The task planning device will filter out the target executable path with the highest score from all executable paths.
[0084] Understandably, the target executable path represents the best solution after comprehensively considering multiple optimization dimensions, i.e., the optimal executable path.
[0085] This embodiment effectively solves the problem of automatic selection of the best path among multiple executable paths, which can reduce the decision-making burden and improve the quality of task planning and decision-making efficiency.
[0086] Based on the above embodiments of this application, in another embodiment of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 After step S20, the task planning method further includes steps D21 to D23: After the task planning device generates multiple task execution stages through a large language model, this embodiment further introduces a key action optimization and deduplication technical solution, which aims to solve the technical problem that the large language model outputs multiple semantically similar or functionally redundant key actions, resulting in unnecessary repetitive operations and low execution efficiency in the final planned path.
[0087] Step D21: Identify multiple repetitive key actions at the target task execution stage from each task execution stage; It should be noted that the task planning device identifies multiple repetitive key actions at the target task execution stage from multiple task execution stages.
[0088] In a specific implementation, the identification process includes the task planning device performing cross-comparison and semantic analysis on all task execution steps generated by the large language model to identify key actions that are functionally overlapping or have equivalent execution effects.
[0089] Understandably, this step is a prerequisite for optimization, as it identifies redundant parts in the plan that can be merged or deleted.
[0090] Step D22: Based on the execution cost of one of the key actions in each repetitive key action, filter out the repetitive key actions whose execution cost is higher than a preset cost threshold from each repetitive key action, and obtain one or more remaining repetitive key actions after action deduplication, and a new task execution link composed of the remaining repetitive key actions. It should be noted that the task planning device filters out repetitive key actions whose execution cost is higher than a preset cost threshold from the identified repetitive key actions based on the execution cost of one of the key actions in each repetitive key action. This results in one or more remaining repetitive key actions after action deduplication, and the remaining repetitive key actions constitute a new task execution link.
[0091] In a specific implementation, execution cost can be a comprehensive evaluation metric. This means it includes not only economic costs but also, for example, time costs, operational complexity, and resource consumption. The task planning device compares the execution cost of each repetitive critical action with a threshold for the corresponding evaluation metric. This threshold can be a default value or set by the user.
[0092] For example, if "going to Bureau A to obtain a certificate" and "going to Bureau B to obtain a similar certificate" are repetitive key actions, but the former has a much higher time cost than the latter, the task planning device may filter out the high-cost one and retain the optimal one, thereby obtaining a new task execution step.
[0093] Step D23: If the logic verification of the new formal programming description language file corresponding to the new task execution stage passes, then generate one or more new executable paths for the natural language target task based on the new formal programming description language file.
[0094] It should be noted that the task planning device performs formal compilation and logical verification on the new task execution stage. If the logical verification of the corresponding new formal planning description language file passes, one or more new executable paths for the natural language target task are generated based on the new formal planning description language file.
[0095] Understandably, the new task execution steps obtained after redundancy removal and cost filtering need to be rigorously verified again by formal compilation and logic planner to ensure that the optimization process does not compromise the logical correctness of the plan.
[0096] For example, the new executable path no longer involves costly repetitive work, providing a simpler, more efficient, and equally reliable execution path.
[0097] In this embodiment, by identifying repetitive key actions from multiple task execution stages, filtering out high-cost actions based on execution cost, and formally compiling and logically verifying new task execution stages, pre-optimization of task planning is achieved, solving the problem of high redundancy in initial planning, and achieving the technical effects of improving planning simplicity and execution efficiency, saving computing resources and execution costs.
[0098] In a preferred embodiment, the task planning method includes: a user inputting a natural language target task through the task planning device interface, such as: "I want to handle the one-stop opening procedures for a newly established technology company," and the task planning device receiving the instruction.
[0099] Subsequently, the large language model is activated. This model, pre-trained on massive amounts of text data, incorporates extensive global knowledge in areas such as business, law, and administrative approvals. It can understand the deeper meanings of concepts like "technology company" and "one-stop setup," and deduce the key steps required to complete this task, such as business registration, bank account opening, tax registration, and social security / housing fund account opening. Unlike traditional planning methods that can only operate according to fixed procedures, the large language model can generate multiple semi-structured candidate planning templates with different focuses and strategies based on its knowledge base; each candidate planning template includes at least one task execution step.
[0100] Next, the task planning device formally compiles each task execution stage using its predefined mapping rules and entity recognition capabilities. Specifically, the task planning device identifies key actions (such as "business registration" and "bank account opening"), objects (such as "business license" and "official seal"), and the logical relationships between them in each task execution stage. Then, it translates these into domain and problem files in the formal planning description language. The domain file defines all possible actions in the world, their preconditions, and their effects.
[0101] Then, a planner based on logical reasoning (such as a planner employing heuristic search algorithms like A* or FF, or a SAT solver) is used to perform detailed path solving and logical verification on the formal programming description language file. For each formal programming description language file, the planner starts from the defined initial state and attempts to find a sequence of key actions that leads to the final target state. During the search process, the planner rigorously checks each key action. Before executing a key action, it must ensure that all its pre-dependencies are satisfied. If any pre-dependency is not satisfied, the executable path containing that key action is considered invalid. This process effectively identifies and filters out logical fallacies that might arise from a lack of precise understanding of the specific operational details in a large language model.
[0102] Finally, the planner successfully finds one or more executable paths. The task planning device formats these paths and presents them to the user in clear, easy-to-understand natural language steps. If the planner finds that none of the task execution steps provided by the large language model can form a logically feasible path, it captures the specific reasons for the failure (e.g., which critical action's prerequisite condition was not met) and feeds this error information back to the large language model. This allows the large language model to regenerate the task execution steps based on the specific reasons and the natural language target task.
[0103] For example, to help understand the implementation flow of the task planning method obtained by combining the above embodiments, please refer to... Figure 3 , Figure 3 A simplified flowchart of a task planning method is provided, specifically: After receiving the natural language target task input by the user, the task planning device parses the natural language target task through a preset large language model to determine at least one task execution step. Specifically, the process includes first decomposing the natural language target task into multiple sub-tasks through the preset large language model; and then reasoning through the multiple sub-tasks through the preset large language model to generate at least one task execution step.
[0104] Next, each task execution stage is formally compiled to obtain a formal programming description language file. The task execution stage includes the key actions required to achieve the natural language target task. Then, it is verified whether the pre-dependencies of the key actions are met. The pre-dependencies include the execution object of the key action and the logical relationship between the execution object and the corresponding key action.
[0105] If the pre-existing dependency conditions are met, the logic verification is deemed successful. If the logic verification of the formal programming description language file is successful, one or more executable paths for the natural language target task are generated based on the formal programming description language file, and the natural language target task is achieved through the executable path.
[0106] If the aforementioned prerequisite conditions are not met, the logic verification is deemed to have failed. If the logic verification of the formal programming description language file fails, the specific reasons for the logic verification failure are obtained. These specific reasons include mismatch between key actions and execution objects, and / or, an error in the logical relationship between the execution object and the corresponding key action. The specific reasons are then fed back to the preset large language model, triggering the preset large language model to re-parse and determine the task execution steps based on the specific reasons and the natural language target task. Subsequently, the subsequent steps are executed based on the re-determined task execution steps until an executable path is generated.
[0107] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the task planning method of this application. Any simple variations based on this technical concept, such as the interaction and combination of the various embodiments, are all within the protection scope of this application.
[0108] This application also provides a task planning device, please refer to... Figure 4 The task planning device includes: The receiving module 10 is used to receive natural language target task input by the user; The parsing module 20 is used to parse the natural language target task through a preset large language model and determine at least one task execution step; Compilation module 30 is used to perform formal compilation on each of the task execution stages to obtain a formal planning description language file; The generation module 40 is used to generate one or more executable paths for the natural language target task based on the formal programming description language file if the logical verification of the formal programming description language file passes, wherein the natural language target task is implemented through the executable path.
[0109] Optionally, the parsing module 20 is also used to decompose the natural language target task into multiple sub-tasks by using a preset large language model; The preset large language model is used to reason about the multiple sub-tasks to generate at least one task execution step.
[0110] Optionally, the generation module 40 is further configured to verify whether the prerequisite dependency conditions of the key action are met, the prerequisite dependency conditions including: the execution object of the key action, and the logical relationship between the execution object and the corresponding key action; When the aforementioned prerequisite conditions are met, the judgment logic verification passes. The judgment logic verification fails when the aforementioned prerequisite dependency conditions are not met.
[0111] Optionally, the generation module 40 is further configured to obtain the specific reasons for the failure of the logic verification, wherein the specific reasons include a mismatch between the key action and the execution object, and / or an error in the logical relationship between the execution object and the corresponding key action; The specific reasons are fed back to the preset large language model, triggering the preset large language model to re-parse and determine the task execution stage based on the specific reasons and the natural language target task.
[0112] Optionally, the task planning device includes a selection module for determining the planning direction features corresponding to each of the executable paths; Priority scores are assigned to each executable path with different planning direction characteristics to obtain the score results; The executable path with the highest score is selected as the optimal executable path for the natural language target task.
[0113] Optionally, the task planning device includes a deduplication module for identifying multiple repetitive key actions at the target task execution stage from each of the task execution stages; Based on the execution cost of one of the key actions in each of the repetitive key actions, the repetitive key actions whose execution cost is higher than a preset cost threshold are filtered out from each of the repetitive key actions, resulting in one or more remaining repetitive key actions after action deduplication, and a new task execution link composed of the remaining repetitive key actions. If the logic verification of the new formal planning description language file corresponding to the new task execution stage passes, then one or more new executable paths for the natural language target task are generated based on the new formal planning description language file.
[0114] The task planning apparatus provided in this application, employing the task planning method described in the above embodiments, can solve the technical problems of insufficient adaptability and low reliability of existing task planning methods when dealing with complex and open tasks in real-world environments. Compared with the prior art, the beneficial effects of the task planning apparatus provided in this application are the same as those of the task planning method provided in the above embodiments, and other technical features in the task planning apparatus are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0115] This application provides a task planning device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the task planning method described in the first embodiment above.
[0116] The following is for reference. Figure 5 The diagram illustrates a structural schematic of a task planning device suitable for implementing embodiments of this application. The task planning device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The task planning device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0117] like Figure 5As shown, the task planning device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the task planning device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the mission planning device to communicate wirelessly or wiredly with other devices to exchange data. While the figure shows mission planning devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0118] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0119] The task planning device provided in this application, employing the task planning method described in the above embodiments, can solve the technical problems of insufficient adaptability and low reliability of existing task planning methods when dealing with complex and open tasks in real-world environments. Compared with the prior art, the beneficial effects of the task planning device provided in this application are the same as those of the task planning method provided in the above embodiments, and other technical features of this task planning device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0120] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0121] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0122] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the task planning method described in the above embodiments.
[0123] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0124] The aforementioned computer-readable storage medium may be included in the task planning device or may exist independently and not assembled into the task planning device.
[0125] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0126] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0127] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0128] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described task planning method. This addresses the technical problems of insufficient adaptability and low reliability in existing task planning methods when dealing with complex and open tasks in real-world environments. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the task planning method provided in the above embodiments, and will not be elaborated upon here.
[0129] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the task planning method described above.
[0130] The computer program product provided in this application can solve the technical problems of insufficient adaptability and low reliability of existing task planning methods when dealing with complex and open tasks in real-world environments. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the task planning methods provided in the above embodiments, and will not be repeated here.
[0131] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A task planning method, characterized in that, The task planning method includes: The natural language objective task is to receive user input. The natural language target task is analyzed by a pre-set large language model to determine at least one task execution step; Formal compilation is performed on each of the task execution stages to obtain a formal planning description language file; If the logic verification of the formal programming description language file passes, one or more executable paths for the natural language target task are generated based on the formal programming description language file, wherein the natural language target task is implemented through the executable path.
2. The method as described in claim 1, characterized in that, The step of parsing the natural language target task using a pre-set large language model to determine at least one task execution stage includes: The natural language target task is decomposed into multiple sub-tasks by using a pre-set large language model; The preset large language model is used to reason about the multiple sub-tasks to generate at least one task execution step.
3. The method as described in claim 1, characterized in that, The task execution phase includes key actions required to achieve the natural language target task. Before the step of generating one or more executable paths for the natural language target task based on the formal programming description language file, if the logic verification of the formal programming description language file passes, the following steps are included: Verify whether the prerequisites for the key action are met. The prerequisites include: the execution object of the key action, and the logical relationship between the execution object and the corresponding key action. When the aforementioned prerequisite conditions are met, the judgment logic verification passes. The judgment logic verification fails when the aforementioned prerequisite dependency conditions are not met.
4. The method as described in claim 3, characterized in that, After the step of determining that the logical verification has failed when the prerequisite dependency condition is not met, the method further includes: Obtain the specific reasons for the failure of logic verification, including mismatch between key actions and execution objects, and / or, incorrect logical relationship between execution objects and corresponding key actions; The specific reasons are fed back to the preset large language model, triggering the preset large language model to re-parse and determine the task execution stage based on the specific reasons and the natural language target task.
5. The method as described in claim 1, characterized in that, After the step of generating one or more executable paths for the natural language target task based on the formal programming description language file, if the logical verification of the formal programming description language file passes, the method further includes: Determine the planning direction characteristics corresponding to each of the executable paths; Priority scores are assigned to each executable path with different planning direction characteristics to obtain the score results; The executable path with the highest score is selected as the optimal executable path for the natural language target task.
6. The method as described in claim 1, characterized in that, The task execution phase includes key actions required to achieve the natural language target task. After the step of parsing the natural language target task using a preset large language model to determine at least one task execution phase, it further includes: Identify multiple repetitive key actions at the target task execution stage from each of the aforementioned task execution stages; Based on the execution cost of one of the key actions in each of the repetitive key actions, the repetitive key actions whose execution cost is higher than a preset cost threshold are filtered out from each of the repetitive key actions, resulting in one or more remaining repetitive key actions after action deduplication, and a new task execution link composed of the remaining repetitive key actions. If the logic verification of the new formal planning description language file corresponding to the new task execution stage passes, then one or more new executable paths for the natural language target task are generated based on the new formal planning description language file.
7. A task planning device, characterized in that, The task planning device includes: The receiving module is used to receive natural language target task input from the user; The parsing module is used to parse the natural language target task using a preset large language model and determine at least one task execution step. The compilation module is used to formally compile each of the task execution stages to obtain a formal planning description language file; The generation module is used to generate one or more executable paths for the natural language target task based on the formal programming description language file if the logical verification of the formal programming description language file passes, wherein the natural language target task is implemented through the executable path.
8. A task planning device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the task planning method as described in any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the task planning method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the task planning method as described in any one of claims 1 to 6.