Robot task planning method, device and equipment
The two-stage robot task planning method using LLMs and loop-tolerant reduction techniques addresses the inefficiencies of LLM-ASP combinations by generating backbone plans and excluding irrelevant constants, enhancing computational efficiency and execution success in complex environments.
Patent Information
- Application Number
- CN202411457977.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-10-18
AI Technical Summary
Existing robot task planning schemes based on Large Language Models (LLMs) combined with Answer Set Programming (ASP) face significant computational inefficiencies due to slow calculation times, especially in complex scenarios involving multiple objects and environmental constraints, which hinder the generation of executable task plans.
A two-stage robot task planning method that uses a Large Language Model to generate a backbone task plan, followed by answer set encoding with loop-tolerant reduction techniques to identify and exclude irrelevant constants, thereby accelerating the ASP solution process.
Significantly reduces computational burden and accelerates the generation of executable robot task plans, ensuring integrity and efficiency in complex environments, with improved execution success rates and reduced reasoning times.
Smart Images

Figure CN119188758A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robotics technology, and in particular to a robot task planning method, device and equipment. Background Art
[0002] Robot task planning relies on combining task descriptions with objects in the scene to generate executable action sequences. Large language models (LLMs) are often used for task planning because of their common sense reasoning capabilities. However, when dealing with long-term tasks, LLMs have difficulty maintaining the consistency of key information, especially when environmental constraints need to be considered, resulting in the lack of executable nature of the generated task plans. Answer set programming (ASP), as a symbolic planning method, can provide comprehensive and interpretable planning results. Therefore, combining LLM with ASP to generate executable task plans for long-term tasks has become a research hotspot in the field of task planning.
[0003] However, the solution process of ASP in complex task scenarios usually requires a lot of computing time, especially when multiple objects and environmental constraints are involved. The solution speed is too slow to meet the actual application needs. Summary of the invention
[0004] The disclosed embodiment proposes a robot task planning scheme based on LLM combined with ASP, which solves the problem that the existing robot task planning scheme based on LLM combined with ASP has too long calculation time.
[0005] A first aspect of an embodiment of the present disclosure provides a robot task planning method, comprising:
[0006] Using a large language model to generate a backbone task plan of a target scenario based on constraints for an abstract task description, wherein the backbone task plan is a preliminary step for executing a task corresponding to the abstract task description, the preliminary step includes a series of combinations formed by operations, objects of the operations, and relationships between the objects, and the constraints include scenario constraints and operation constraints;
[0007] Perform answer set encoding based on the backbone task plan, and when instantiating the generated first answer set program, only instantiate the objects directly related to the operations in the backbone task plan, generate loop-tolerant reduction constants, and generate a second answer set program based on the loop-tolerant reduction constants;
[0008] Based on the second answer set, the program generates a task plan executable by the robot.
[0009] In some embodiments, the use of a large language model to describe an abstract task based on constraints to generate a backbone task plan for a target scenario includes:
[0010] Use a large language model to describe the abstract task and generate an initial plan for the target scenario based on constraints;
[0011] Performing grammar checking on the initial plan using a rule-based grammar checker and correcting grammatical errors;
[0012] The backbone task plan is generated by ensuring the accuracy of the operations and the objects in the initial plan based on semantic similarity analysis.
[0013] In some embodiments, encoding the answer set based on the backbone task plan includes:
[0014] Determining answer set encoding rules based on the operation constraints;
[0015] The operations, objects of the operations, and relationships between the objects in the backbone task plan are converted into answer set codes.
[0016] In some embodiments, instantiating only the objects directly related to the operations in the backbone task plan and generating loop-tolerant reduction constants comprises:
[0017] Extracting a second set of constants directly related to the operation from the backbone task plan;
[0018] Verify whether the second constant set is the loop-tolerant reduction constant; if the second constant set is not the loop-tolerant reduction constant, repeat the above steps.
[0019] In some embodiments, after generating the loop-adjustable reduction constant, the method further includes:
[0020] Based on the computational completeness, the loop-admissible reduction constants are expanded to generate a third constant set;
[0021] The second answer set program is generated based on the third set of constants.
[0022] In some embodiments, the expanding the loop-admissible reduction constant based on computational completeness includes:
[0023] identifying a loop rule in the task;
[0024] Based on the loop rule, the loop is expanded to allow the reduction of constants.
[0025] In some embodiments, extracting a second set of constants directly related to the operation from the backbone task plan includes:
[0026] A first constant set is formed by the objects of the operations in the backbone task plan;
[0027] For each of the operations in the backbone task plan, determine the impact scope of the operation, delete constants that do not belong to the impact scope in the first constant set, generate a second constant set, and use the second constant set as the loop-admissible reduction constants.
[0028] In some embodiments, the verifying whether the second set of constants are the loop-tolerant reduction constants comprises:
[0029] If a third answer set of a third answer set program generated based on the second constant set has a corresponding first answer set in the first answer set program and satisfies that the third answer set is a subset of the first answer set; and
[0030] If for each first answer set of the first answer set program there exists a corresponding third answer set in the third answer set program and the third answer set is a subset of the first answer set;
[0031] then confirming that the second constant set is the loop-tolerant reduction constant;
[0032] Otherwise, the second set of constants is not the loop-tolerant reduction constants.
[0033] A second aspect of an embodiment of the present disclosure provides a robot task planning device, comprising:
[0034] A backbone task plan generation module, used to generate a backbone task plan of a target scenario based on constraints for an abstract task description using a large language model, wherein the backbone task plan is a preliminary step for executing a task corresponding to the abstract task description, the preliminary step includes a series of combinations formed by operations, objects of the operations, and relationships between the objects, and the constraints include scenario constraints and operation constraints;
[0035] An answer set encoding module is used to perform answer set encoding based on the backbone task plan, and when instantiating the generated first answer set program, only instantiate the objects directly related to the operations in the backbone task plan, generate loop-tolerant reduction constants, and generate a second answer set program based on the loop-tolerant reduction constants;
[0036] A task planning module is used to generate a robot-executable task plan based on the second answer set program.
[0037] A third aspect of the embodiments of the present disclosure provides a robot task planning device, including a memory and a processor:
[0038] The memory is used to store computer programs;
[0039] The processor is used to implement the method described in any one of the first aspects of the present disclosure when executing the computer program.
[0040] In summary, the robot task planning method, apparatus and device provided by each embodiment of the present disclosure firstly uses LLM to generate a backbone task plan to accelerate the process of answer set programming, and uses the backbone task plan as the input of ASP, which reduces the search space and thus accelerates the solution process; then, based on the loop-admissible reduction technology, the constant subsets that do not affect the solution set in the ASP program are identified, because the large amount of ASP solution calculation is mainly due to the excessive definition of the variable domain, so by identifying those constant subsets that can be omitted without affecting the overall solution set of the program, the calculation burden in the instantiation process of the ASP program can be greatly reduced. Thus, the generation of executable plans is significantly accelerated while ensuring the integrity of the calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The features and advantages of the present disclosure will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present disclosure in any way. In the accompanying drawings:
[0042] Figure 1 is a schematic diagram of a computer system to which the present disclosure is applicable;
[0043] Figure 2 This is an ASP code that uses the actions wash and find to illustrate robot task planning;
[0044] Figure 3 is a system framework diagram of a two-stage robot task planning method according to some embodiments of the present disclosure;
[0045] Figure 4 is a flowchart of a robot task planning method according to some embodiments of the present disclosure;
[0046] Figure 5 is based on Figure 4 The method of S410-S430 in the task planning schedule in a complex task environment;
[0047] Figure 6 It is a comparison table of the executability and goal condition recall rate (GCR) of various task planning algorithms;
[0048] Figure 7 is a schematic diagram of a robot task planning device according to some embodiments of the present disclosure;
[0049] Figure 8 It is a schematic diagram of a robot task planning device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0050] In the detailed description below, many specific details of the present disclosure are set forth by way of example in order to provide a thorough understanding of the relevant disclosure. However, it will be apparent to one of ordinary skill in the art that the present disclosure can be implemented without these details. It should be understood that the use of the terms "system," "device," "unit," and / or "module" in the present disclosure is a method for distinguishing different parts, elements, parts, or assemblies at different levels in a sequential arrangement. However, these terms may be replaced by other expressions if other expressions can achieve the same purpose.
[0051] It should be understood that when a device, unit or module is referred to as being "on," "connected to," or "coupled to" another device, unit or module, it may be directly on, connected to, coupled to, or communicating with other devices, units or modules, or there may be intermediate devices, units or modules, unless the context clearly indicates an exception. For example, the term "and / or" as used in this disclosure includes any and all combinations of one or more of the relevant listed items.
[0052] The terms used in this disclosure are only for describing specific embodiments and are not intended to limit the scope of this disclosure. As shown in the specification and claims of this disclosure, unless the context clearly indicates an exception, the words "one", "a kind" and / or "the" do not specifically refer to the singular, but may also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of clearly identified features, wholes, steps, operations, elements and / or components, and such expressions do not constitute an exclusive list, and other features, wholes, steps, operations, elements and / or components may also be included.
[0053] These and other features and characteristics, methods of operation, functions of related elements of the structure, combinations of parts, and economies of manufacture of the present disclosure may be better understood with reference to the following description and drawings, which form a part of the specification. However, it is to be clearly understood that the drawings are for illustration and description purposes only and are not intended to limit the scope of protection of the present disclosure. It is to be understood that the drawings are not drawn to scale.
[0054] Various structural diagrams are used in this disclosure to illustrate various variations of the embodiments of the present disclosure. It should be understood that the above or below structures are not intended to limit the present disclosure. The scope of protection of the present disclosure shall be subject to the claims.
[0055] Figure 1 is a schematic diagram of a computer system to which the present disclosure is applicable. Figure 1The system shown includes a task planning server connected to robot data of a target scene, and the task planning server generates a task plan for the robot in the target scene based on an abstract task description, operation constraints and scene constraints.
[0056] Robot task planning refers to the sequence of operations that can be performed by the robot based on the task description. The task planning server can be any of a stand-alone, cluster or distributed server. The task planning server is deployed with a large language model (LLM). LLM is a large-scale deep learning model mainly used for natural language understanding, with common sense reasoning ability.
[0057] The common sense reasoning ability of LLM enables it to form preliminary steps for the corresponding task based on its understanding of the task description. However, when dealing with long-term tasks, especially when environmental constraints need to be considered, LLM has difficulty maintaining the consistency of key information, resulting in the lack of executableness of the generated task plan. To solve this problem, researchers have tried to integrate external tools, such as feedback based on knowledge bases, local checker feedback, or feedback from physical environment interactions, to influence the subsequent planning output of LLM through prompts. However, this text-based feedback lacks convergence guarantees and cannot ensure that LLM can ultimately generate an executable plan.
[0058] Answer Set Programming (ASP), as a symbolic planning method, has become a possible answer to the problem of lack of executability of LLM-based task planning methods because it can provide comprehensive and explainable planning results.
[0059] A simple ASP program consists of three parts: facts, rules, and output. Facts and rules are used to describe problems; output is used to view results. Facts are used to describe the state of the real world; rules are used to make inferences.
[0060] ASP programs include constants (such as various operation objects), predicates (such as various operations), and variables. Essentially, ASP programs do not support variables. The variables in coding are only for the convenience of writing. In actual solutions, these variables will be replaced by all constants that appear in the program, which is called instantiation.
[0061] An atomic formula without variables is called an "instantiated atomic formula", i.e., a basic atom. A common logic program (i.e., an ASP program with variables) is a finite set of rules in the form of:
[0062] A0←A1,…,A m ,not A m+1 ,...,not An .
[0063] where Ai(0≤i≤n) is an atom, and n≥1. We can also write the rule r in the above form as head(r)←body(r), Where body(r) includes positive and negative conditions, that is, body + (r) = {A1, ..., A m} and body - (r) = {A m+1 , ..., A n}. The ASP program Π is "instantiated", meaning that all the rules in it have been concretized and no longer contain any variables. Π is "safe", meaning that every variable that appears in a rule also appears in the body of the positive condition. + The security of ASP programs is achieved through the use of domain predicates, which are unary predicates that are given as facts and are true for all constants covered by variables in the program.
[0064] The Herbrand universe of the ASP program Π, denoted by HU(Π), is the set of all constants, namely Given a set Variable and a set Constant, the instantiation result of rule r is represents the set of all possible constant replacement combinations. The instantiation result of ASP program Π is Π| HU(Π) =∪ r∈Π r| HU(Π) Given an interpretation I, i.e., I is a set of instantiated atomic formulas, I satisfies a field rule r if head(r)∈I if and only if and Explanation I is a model of Π if and only if I satisfies Π| HU(Π) If there is no other model J such that Then model I is the smallest.
[0065] Next, we define the answer set for ASP programs with variables. Given an ASP program Π and an explanation I, the Gelfond-Lifschitz reduction I is on I, denoted as: Π I , which is used to delete the rules that do not meet the conditions from the instantiation results of Π. After reduction, Π I has a unique minimal model. Explain that I is a set of answers to Π if and only if I is the minimal model Π of Π I . An ASP program may have zero, one, or many answer sets as solutions.
[0066] Positive dependency graph G of ASP program ΠΠ , is a directed graph whose vertices are Π|| HU(Π) Atomic formulas in . If the head of rule r contains A and the positive condition of the body contains B, that is, A∈head(r) and B∈body + (r), then there is an arc from A to B. A set of strongly connected instantiated atomic formulas L is called a cycle of Π. For each cycle L, the instantiation rule r∈Π| HU(Π) is the external support of L, where the external support rules of L constitute R - (L, Π), and is defined by the loop formula LF(L, Π) as:
[0067]
[0068] The robot task planning problem can be encoded as an ASP program, where each answer set corresponds to a plan, i.e., a sequence of executable operations for the problem. The present disclosure uses clingo (an efficient ASP solver) to solve the planning task in an incremental manner. By defining the action and state transition specifications, it is gradually verified whether the target state is satisfied, and finally an execution sequence is generated.
[0069] Here we take the actions wash and find as examples to illustrate the coding of robot actions. The code is as follows: Figure 2 shown. Figure 2 In the example above, line 1 activates clingo's incremental computation model, while lines 2, 9, and 20 divide the encoding into a static part, a state transition specification, and a part that checks the target situation. Lines 3 and 4 define the domain predicates for the corresponding constants. Lines 5 and 6 define the names of the possible actions. Line 7 defines the initial state, and line 8 specifies the task that should be completed. Line 10 selects the action to be performed at time t. Lines 11 to 13 define the effects and preconditions of the action wash, and lines 14 and 15 define the action find. Lines 16-18 establish inertia rules for the predicates hand_empty(C), same_loc(C,O), and clean(O). Line 19 defines the target state constraint for the task. Line 21 checks whether the target condition is satisfied at time t. Finally, line 22 allows clingo to only display the results of the form occur(A,t) in the answer set it computes. Clingo can compute this encoded answer set and return “occurs(find(2),1).occurs(wash(2),2).” as the schedule for the task.
[0070] According to the above coding scheme, we can introduce more actions and more predicates to specify real-world robot task planning problems. In robot indoor task planning, dealing with a large number of constants and actions usually leads to inefficient coding. The definition of the variable domain is too large, which makes the ASP program too slow to solve and difficult to meet the actual application requirements of robot task planning.
[0071] In order to solve the problem of slow ASP solution speed when performing robot task planning based on LLM combined with ASP, this paper proposes a two-stage robot task planning method, and its system framework is as follows: Figure 3 Specifically, LLM is first used to generate a backbone task plan as the input of ASP; then, based on the loop-admissible reduction technology, the constant subset that does not affect the solution set in the ASP program is identified to generate a task plan that can be executed by the robot.
[0072] Figure 4 is a flow chart of a robot task planning method according to some embodiments of the present disclosure. In some embodiments, the robot task planning method is composed of Figure 1 The task planning server shown is executed, and the robot task planning method includes the following steps:
[0073] S410, using a large language model to generate a backbone task plan of a target scenario based on constraints for an abstract task description, wherein the backbone task plan is a preliminary step for executing the task corresponding to the abstract task description, the preliminary step includes a series of combinations formed by operations, objects of the operations, and relationships between the objects, and the constraints include scenario constraints and operation constraints.
[0074] The goal of robot task planning is to generate an executable robot operation sequence based on the tasks specified in the abstract task description. The abstract task description often describes a "vision". Only by concretizing it to the target scenario can we obtain the real task that needs to be performed. For example, the abstract task description "take a banana" needs to be concretized to "open the refrigerator door", "take out the fruit basket containing bananas", "take a banana from the fruit basket" and other specific tasks based on the specific scenario, so that an executable operation sequence can be generated.
[0075] Specifically, LLM first generates an initial plan based on the task description and environment information
[0076] Re-planning Perform syntax evaluation, using a rule-based syntax checker to identify illogical or malformed operational information. Based on this error feedback, LLM iteratively regenerates new mission plans This review process continues until the planned All syntactic criteria are met or the maximum number of iterations k is reached max .
[0077] Finally, semantic similarity analysis is used to ensure the accuracy of operations and objects, and the cosine similarity method is used to evaluate the terms. The actions and objects in τ are semantically related to the corresponding entities in the environment. Finally, the skeleton plan τ is generated. s Specifically, this module calculates The semantic relevance of terms is evaluated by comparing the embedding vectors of actions and objects in the scene with the embedding vectors of actions and objects in the actual scene: in and The embedding vectors representing the actions and objects in the “plan” and “environment” respectively. For example, the plan instruction “Open TV” should be “Switch on TV” because “Open” is not suitable for describing the action of operating a TV. Similarly, “walk kitchencounter” should be corrected to “walk tokitchen” because there is no place called “kitchencounter” in the environment. The skeleton plan generated at this stage is τ s It will serve as input to ASP to further optimize the mission plan.
[0078] The plan s As a rough solution, it contains the preliminary steps of task execution (such as actions and target states), which reduces the search space for ASP solution.
[0079] In the backbone task plans "open the refrigerator door", "take out the fruit basket containing bananas", and "take a banana from the fruit basket" generated based on the abstract task description of "take a banana to eat", each task includes an operation (open, take out, take), an operation object (refrigerator door, banana, fruit basket), and the relationship between multiple operation objects (such as the position relationship between bananas and fruit basket, and the position relationship between fruit basket and refrigerator).
[0080] LLM visualizes abstract task descriptions based on various constraints. Common constraints include operation constraints, such as the timing constraints of various operations, and scene constraints, such as the location constraints of various operation objects.
[0081] S420, perform answer set encoding based on the backbone task plan, and when instantiating the generated first answer set program, only instantiate the objects directly related to the operations in the backbone task plan, generate loop-tolerant reduction constants, and generate a second answer set program based on the loop-tolerant reduction constants.
[0082] Specifically, first perform ASP coding based on the backbone task plan:
[0083] Encode the robot action model (such as operation constraints) into ASP rules; convert the skeleton task plan and scene constraints into ASP code.
[0084] Then, the loop-admissible reduction technique is used to reduce the amount of calculation in the ASP instantiation process and speed up the solution. Specifically, the variable domain reduction technique is used to instantiate only the variables related to the task and exclude unnecessary calculations. This method can effectively filter out objects that are not related to the task and narrow the search space. For example, when executing the task of "placing a chair next to the table", the pen on the table is irrelevant, so the state and constraints related to the pen can be ignored.
[0085] In order to ensure that the complete solution is consistent when certain objects or conditions are ignored, the present disclosure adopts loop tolerance reduction technology. This technology reduces the constant size by identifying the constant set that can be ignored in the ASP code, while ensuring the integrity of the potential solution set. The core idea is that even if some minor objects or conditions are ignored, the result can still be guaranteed to be consistent with the complete solution. This process is achieved by identifying and deleting the set of objects that have no effect on the execution of the task, thereby greatly reducing the amount of calculation during the solution and accelerating the generation of executable plans. Finally, based on the optimized code, ASP outputs a complete and executable task plan τ f .
[0086] Specifically, a set of constants D related to the operation is extracted from the skeleton task plan. For each operation in the skeleton task plan, based on the influence range of the operation, constants that are not within the influence range of the operation are removed from D, and finally a constant set D is generated.
[0087] This disclosure is based on the following rules verification Is it a loop-admissible reduction constant of D?
[0088] Given an ASP program Π (with variables), a set of constant The loop of ∏ can be reduced if
[0089] 1. There exists an answer set I of the original program ∏ such that , where I D is an answer set of Π|D.
[0090] 2. For each answer set I in Π, there exists an answer set ID in Π|D such that
[0091] Intuitively speaking, the requirement The rules in and the newly introduced loop formula can be expanded by And I′ to satisfy.
[0092] If verified, If it is not a loop-adjustable constant of D, then continue to filter objects not related to the task in D based on the scope of the operation, and repeatedly generate Until verified is the loop-admissible reduction constant of D.
[0093] Finally, based on the loop, the constant can be reduced Generate answer set program Π * .
[0094] In some embodiments of the present disclosure, after obtaining the loop-admissible reduction constant Finally, based on the completeness of the solution, it may be necessary to HU(P) The additional constants in the loop L atoms are added To expand loop-tolerant reduction constants. Expansion of constants occurs depending on whether these constants appear in binary predicates related to constants in D. For example, binary predicates like on(o1,o2), in(o1,o2), and close(o1,o2).
[0095] An embodiment of the present disclosure provides an example of loop reduction based on the task of "setting up a table":
[0096] Example Task: Setting Up the Table
[0097] 1. Define the original ASP program
[0098] Suppose we have an ASP program Π that describes all possible rules for the task of setting a table (but this example program may also have rules for washing, walking, etc.):
[0099] 1.has_object(table1).
[0100] 2.has_object(chair1).
[0101] 3.has_object(chair2).
[0102] 4.place(chair1,table1).
[0103] 5.place(chair2,table1).
[0104] 6.←place(chair1,X),place(chair2,X),X≠table1.
[0105] % Rules related to the "wash" task
[0106] 7. has_object(broom1).
[0107] 8.clean(broom1,room1).
[0108] 9.dirty(room1).
[0109] 10.←clean(broom1,X), dirty(X).
[0110] % Rules related to the "Move" task
[0111] move(robot1,location1).
[0112] 12.at(robot1,location1).
[0113] 13.←move(robot1,X),at(robot1,X).
[0114] % Other irrelevant variables such as rooms and items
[0115] has_object(pen1).
[0116] on(pen1,table2).
[0117] in(room2,house1).
[0118] 17.at(chair3,room2).
[0119] 2. Preliminary explanation
[0120] The initial solution provided by the large model is "set the table", which means that we need to make sure that the chairs are correctly placed next to the table. Based on this solution, we select the constant set D associated with it for reduction: Related constant set D = {table1, chair1, chair2}
[0121] 3. Generate a simplified ASP program
[0122] We generate a simplified ASP program Π based on the constant set D | D :
[0123] 1.has_object(table1).
[0124] 2.has_object(chair1).
[0125] 3.has_object(chair2).
[0126] 4.place(chair1,table1).
[0127] 5.place(chair2,table1).
[0128] 6.←place(chair1,X),place(chair2,X),X≠table1.
[0129] This appΠ| D It is a simplified version of the original program Π, containing only elements in the constant set D.
[0130] Note that in this example, the simplified program is structurally identical to the original program because D already includes all of the program's key constants.
[0131] 4. Application cycle can be reduced
[0132] To verify whether D = {table1, chair1, chair2} is cycle-admissible, we need to check
[0133] Check the following two conditions:
[0134] There exists an answer set I of the original program Π such that Where ID is Π| D A collection of answers.
[0135] For every answer set I in Π, there exists Π| D One of the answers in I D , so that
[0136] Verification process:
[0137] 1. Check Π| D Answer set:
[0138] The possible answer set includes placing chair1 and chair2 next to table1.
[0139] These answer sets must satisfy the constraints in Π, such as ←place(chair1,X),place(chair2,X),X≠table1.
[0140] 2. Verify the answer set of the original program Π:
[0141] ●We check whether the set of answers in Π contains Π| D All answer sets in .
[0142] For example, if one of the answer sets in π is to place chair1 and chair2 next to table1,
[0143] Then this solution set is in Π| D It should also exist.
[0144] Example: Assume that a valid answer set I in Π is:
[0145] place(chair1,table1).
[0146] place(chair2,table1).inΠ| D In, we can find I D ,For example:
[0147] place(chair1,table1).
[0148] place(chair2,table1). Obviously, Therefore, D satisfies the first condition. For each answer set I in Π, as mentioned above, I D In Π| D It can also be found in , satisfying the second condition.
[0149] 5. Determine whether the cycle can be reduced
[0150] Since D satisfies the above two conditions, D = {table1, chair1, chair2} is a cycle-admissible reduction of Π. This means that we can omit constants that are not in D in the calculation, thereby reducing the computational complexity while maintaining the validity of the solution.
[0151] Summarize
[0152] In practical applications, by selecting the relevant constant set D and simplifying the ASP program Π| D , we can exploit cycle-admissible reduction to reduce the computational burden. The verification process consists of ensuring that the answer set of the simplified program can be mapped to the answer set of the original program, and ensuring that for each answer set of the original program there is a corresponding answer set of the simplified program.
[0153] S430: Generate a robot-executable task plan based on the second answer set program.
[0154] Specifically, by calculating The solution obtained from the answer set reflects the task planning result after optimization through skeleton planning.
[0155] One embodiment of the present disclosure uses Virtual Home (VH) simulator v2.3.0 to simulate robot activities in a home environment. Figure 4 The method described in S410-S430 was verified.
[0156] A total of three LLMs are used: GPT-3.5, GPT-4, and Llama3-8b, all of which are called through their API interfaces. The semantic inspection module uses the all-MiniLM-L6-v2 model to embed actions and objects. The logic program processing uses the clingo v5.6.2ASP solver.
[0157] The evaluation of task planning is based on two key indicators: Executability (Exec) and Goal Condition Recall (GCR). Exec checks the execution ability of the plan in the simulator, especially the adaptability of actions to objects (focusing on syntax checking and basic behavioral logic). GCR compares the degree of match between the state before and after the plan is executed and the target state, and the calculation method is as follows:
[0158]
[0159] where |·| represents the number of state and relationship changes. gt :Represents the ideal state after the plan is executed. This state defines the objects and the relationships between them, also known as the reference answer. It is the standard answer that the plan should achieve. initial : The initial state, which indicates the state before the plan is executed, includes all objects in the environment and their relationships. It is the starting point of the environment state for the plan execution. c′ indicates the final state after the plan is executed, which reflects the actual impact of the plan on the environment, including the changes in objects and their relationships. This state is the result of the plan of the present invention after execution.
[0160] In addition, the average length of action sequences and the running time of ASP planning before and after the introduction of the efficiency strategy are evaluated.
[0161] The verification results show that:
[0162] Efficiency improvement:
[0163] like Figure 5 As shown, LMWITHFASTASP (LMWITHFASTASP is Figure 4 The method described in S410-S430 in the above greatly improves the efficiency of ASP reasoning when processing complex task environments, and shortens the reasoning time from more than 2 hours to less than 20 seconds.
[0164] Improved execution and goal achievement:
[0165] like Figure 6As shown, the LMWITHFASTASP framework significantly outperforms other existing methods in both executableness and goal condition recall (GCR), especially in terms of executableness, achieving an execution success rate of over 90%, which indicates that it not only accelerates task planning, but also effectively generates executable plans that meet the robot's specific constraints.
[0166] Specifically, Figure 6 In this paper, we compared the proposed method with two representative mission planning methods (Zero-shot Planner and ProgPrompt) in detail. These two methods represent different paths that LLM attempts to improve the execution of mission planning by integrating external tools: Zero-shot Planner uses knowledge base feedback and local checker to feedback error information, while ProgPrompt optimizes the mission plan through information feedback from physical environment interactions. However, these methods still have the problem of poor mission planning execution when dealing with complex environments. As Figure 6 As shown, LMWITHFASTASP significantly outperforms these baseline methods in terms of performance and goal achievement.
[0167] It can be seen that the present disclosure ensures the integrity of calculations by reducing the calculation burden in the instantiation process, while significantly accelerating the generation of executable plans.
[0168] Figure 7 is a schematic diagram of a robot task planning device according to some embodiments of the present disclosure. Figure 7 As shown, the robot task planning device 700 includes a backbone task plan generation module 710, an answer set encoding module 720, and a task planning module 730. In some embodiments of the present disclosure, the robot task planning function is Figure 1 The task planning server is executed as shown.
[0169] A backbone task plan generation module 710 is used to generate a backbone task plan of a target scenario based on constraints for an abstract task description using a large language model, wherein the backbone task plan is a preliminary step for executing a task corresponding to the abstract task description, the preliminary step includes a series of combinations formed by operations, objects of the operations, and relationships between the objects, and the constraints include scenario constraints and operation constraints;
[0170] An answer set encoding module 720 is used to perform answer set encoding based on the backbone task plan, and when instantiating the generated first answer set program, only instantiate the objects directly related to the operations in the backbone task plan, generate loop-tolerant reduction constants, and generate a second answer set program based on the loop-tolerant reduction constants;
[0171] The task planning module 730 is used to generate a task plan executable by the robot based on the second answer set program.
[0172] One embodiment of the present disclosure provides a robot task planning device. Figure 8 As shown, the robot task planning device 800 includes a memory 820 and a processor 810, wherein the memory 820 is used to store a computer program; and the processor 810 is used to implement when executing the computer program. Figure 4 The method described in S410-S430.
[0173] In summary, the robot task planning method, apparatus and device provided by each embodiment of the present disclosure firstly uses LLM to generate a backbone task plan to accelerate the process of answer set programming, and uses the backbone task plan as the input of ASP, which reduces the search space and thus accelerates the solution process; then, based on the loop-admissible reduction technology, the constant subsets that do not affect the solution set in the ASP program are identified, because the large amount of ASP solution calculation is mainly due to the excessive definition of the variable domain, so by identifying those constant subsets that can be omitted without affecting the overall solution set of the program, the calculation burden in the instantiation process of the ASP program can be greatly reduced. Thus, the generation of executable plans is significantly accelerated while ensuring the integrity of the calculation.
[0174] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding descriptions in the aforementioned device embodiments and will not be repeated here.
[0175] Although the subject matter described herein is provided in the general context of being executed in conjunction with the execution of operating systems and application programs on computer systems, it will be appreciated by those skilled in the art that other implementations may also be performed in conjunction with other types of program modules. In general, program modules include routines, programs, components, data structures, and other types of structures that perform specific tasks or implement specific abstract data types. It will be appreciated by those skilled in the art that the subject matter described herein may be practiced using other computer system configurations, including handheld devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframe computers, etc., and may also be used in a distributed computing environment in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.
[0176] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.
[0177] It should be understood that the above specific embodiments of the present disclosure are only used to illustrate or explain the principles of the present disclosure, and do not constitute a limitation of the present disclosure. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present disclosure should be included in the protection scope of the present disclosure. In addition, the claims attached to the present disclosure are intended to cover all changes and modifications that fall within the scope and boundaries of the attached claims, or the equivalent forms of such scope and boundaries.
Claims
1. A robot task planning method, characterized in that: include: Using a large language model to generate a backbone task plan of a target scenario based on constraints for an abstract task description, wherein the backbone task plan is a preliminary step for executing a task corresponding to the abstract task description, the preliminary step includes a series of combinations formed by operations, objects of the operations, and relationships between the objects, and the constraints include scenario constraints and operation constraints; Perform answer set encoding based on the backbone task plan, and when instantiating the generated first answer set program, only instantiate the objects directly related to the operations in the backbone task plan, generate loop-tolerant reduction constants, and generate a second answer set program based on the loop-tolerant reduction constants; Based on the second answer set, the program generates a task plan executable by the robot.
2. The method according to claim 1, characterized in that: The backbone task plan of generating target scenarios based on constraint conditions using a large language model to describe abstract tasks includes: Use a large language model to describe the abstract task and generate an initial plan for the target scenario based on constraints; Performing grammar checking on the initial plan using a rule-based grammar checker and correcting grammatical errors; The backbone task plan is generated by ensuring the accuracy of the operations and the objects in the initial plan based on semantic similarity analysis.
3. The method according to claim 1, characterized in that: The answer set encoding based on the backbone task plan includes: Determining answer set encoding rules based on the operation constraints; The operations, objects of the operations, and relationships between the objects in the backbone task plan are converted into answer set codes.
4. The method according to claim 3, characterized in that: The instantiation of only the objects directly related to the operations in the backbone task plan and the generation of loop-tolerant reduction constants comprises: Extracting a second set of constants directly related to the operation from the backbone task plan; Verify whether the second constant set is the loop-tolerant reduction constant; if the second constant set is not the loop-tolerant reduction constant, repeat the above steps.
5. The method according to claim 4, characterized in that: The generation loop may further include: Based on the computational completeness, the loop-admissible reduction constants are expanded to generate a third constant set; The second answer set program is generated based on the third set of constants.
6. The method according to claim 5, characterized in that: The expanding the loop-admissible reduction constant based on computational integrity includes: identifying a loop rule in the task; Based on the loop rule, the loop is expanded to allow the reduction of constants.
7. The method according to claim 4, characterized in that: The step of extracting a second constant set directly related to the operation from the backbone task plan includes: A first constant set is formed by the objects of the operations in the backbone task plan; For each of the operations in the backbone task plan, determine the impact scope of the operation, delete constants that do not belong to the impact scope in the first constant set, generate a second constant set, and use the second constant set as the loop-admissible reduction constants.
8. The method according to claim 4, characterized in that: The verifying whether the second constant set is the loop-tolerant reduction constant comprises: If a third answer set of a third answer set program generated based on the second constant set has a corresponding first answer set in the first answer set program and satisfies that the third answer set is a subset of the first answer set; For each first answer set of the first answer set program, there exists a corresponding third answer set in the third answer set program and the third answer set is a subset of the first answer set; then confirming that the second constant set is the loop-tolerant reduction constant; Otherwise, the second set of constants is not the loop-tolerant reduction constants.
9. A robot task planning device, characterized in that: include: A backbone task plan generation module, used to generate a backbone task plan of a target scenario based on constraints for an abstract task description using a large language model, wherein the backbone task plan is a preliminary step for executing a task corresponding to the abstract task description, the preliminary step includes a series of combinations formed by operations, objects of the operations, and relationships between the objects, and the constraints include scenario constraints and operation constraints; An answer set encoding module is used to perform answer set encoding based on the backbone task plan, and when instantiating the generated first answer set program, only instantiate the objects directly related to the operations in the backbone task plan, generate loop-tolerant reduction constants, and generate a second answer set program based on the loop-tolerant reduction constants; A task planning module is used to generate a robot-executable task plan based on the second answer set program.
10. A robot task planning device, characterized in that: Including memory and processor: The memory is used to store computer programs; The processor is configured to implement the method according to any one of claims 1-8 when executing the computer program.
Citation Information
Patent Citations
Large language model and answer set programmed understanding architecture model for robots
CN116757199A
Real-time trajectory planning method, device and equipment
CN117141520A
Control method and device of intelligent robot
CN118520072A
Generative Artificial Intelligence as a Personal Task Generator to Complete Objectives
US20240330654A1
