Closed-loop human body activity program generation method and system

Through the task planning model and program correction model, the activity program is generated and modified, and the problem that closed-loop human activity programs in the existing technology cannot be automatically corrected, and the generation and modification of activity programs with high executability are achieved.

CN119473246AActive Publication Date: 2025-02-18SHENZHEN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411453347.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-18
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

The prior art cannot realize automatic error correction of closed-loop human activity programs, resulting in the program being unable to be changed once it is generated, and the execution cannot be continued once an error occurs during the execution process.

Method used

Generate the initial activity program through the task planning model and check the action's verification code. If the action is executable, it is sent to the simulator for execution; if it is not executable, the active program is modified using the verification code. After the action execution is successful or failed, the program correction model is used to modify it according to the feedback information of the simulated environment, and the modified active program is finally output.

Benefits of technology

It realizes dynamic correction of activity programs during execution, improves the executability of activity programs, and can automatically generate and modify activity programs based on the activity description entered by the user.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473246A_ABST
    Figure CN119473246A_ABST
Patent Text Reader

Abstract

The invention discloses a closed-loop human body activity program generation method and system, and the method comprises the steps: inputting initial scene information and activity description, and generating an initial activity program through a task planning model; checking a check code of an action corresponding to the activity program, if the current action is judged to be executable, sending the current action into the simulator for execution, and if the current action is judged to be non-executable, modifying the activity program by using the check code; the execution state of the activity program is checked, if the corresponding action can be successfully executed in the simulation environment, the executed state returned by the simulation environment is obtained, and if the corresponding action fails to be executed, according to error information returned by the simulation environment, the program correction model is used for modifying the activity program again; and outputting the finally modified activity program. The invention provides a method for automatically generating the activity program in a closed-loop mode according to the activity description input by the user, the activity program can be dynamically corrected in the execution process, and the executable performance of the activity program is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer graphics, and in particular to a closed-loop human activity program generation method and system. Background Art

[0002] With the popularity and development of the concepts of virtual universe and embodied intelligence, people are eager to build a virtual digital world that is similar to the real world. As a reflection of humans in the digital world, digital humans play an important role in interacting with the virtual environment. To achieve different interactive tasks, corresponding activity programs need to be designed for digital humans. At present, many game companies have designed various activity programs for different virtual characters in order to make the game more realistic and natural to enhance user immersion. However, designing the activities of these digital humans requires designers to have rich design experience and professional foundation, which brings huge economic and time costs. Therefore, how to reduce the cost of generating human activity programs and automatically generate activity programs in a user-friendly way has become an important issue.

[0003] Some recent work uses training models or large language models to generate human activity programs in an open-loop manner. However, the executable nature of these activity programs is not high. In addition, due to the open-loop form, once an instruction in the activity program fails to execute correctly, the activity ends and there is no way to perform subsequent error correction.

[0004] There are three main types of existing systems that generate activity programs in a closed loop. The first type is the work of human activity program generation tasks, the second type is related to the work of using a closed loop method to complete tasks, and the third type is related to the work of using code as memory. In the past, the work of human activity program generation tasks was mainly divided into two types. The first is to use a training model to generate activity programs and learn a large number of activity instruction-activity program pairs. The second method is to use a pre-trained large language model and rely on prompt engineering to directly generate activity programs. This method combines the advantages of the training model and the large language model by fine-tuning the large language model. However, these methods are all open-loop models. Once the program is generated, it cannot be changed. During the execution process, if an action fails to execute, the entire task will fail.

[0005] Therefore, the prior art needs to be improved. Summary of the invention

[0006] The technical problem to be solved by the present invention is that, in view of the defects of the prior art, the present invention provides a closed-loop human activity program generation method and system to solve the problem that the existing closed-loop method for generating activity programs cannot achieve automatic error correction.

[0007] The technical solution adopted by the present invention to solve the technical problem is as follows:

[0008] In a first aspect, the present invention provides a closed-loop human activity program generation method, comprising:

[0009] Input the initial scenario information and activity description, and generate the initial activity program through the task planning model;

[0010] Check the verification code of the action corresponding to the activity program, if the current action is judged to be executable, send it to the simulator for execution, if the current action is judged to be unexecutable, modify the activity program using the verification code; wherein the verification code is a code summarized according to the error correction experience of the corresponding action during the model training process;

[0011] Checking the execution status of the active program, if the corresponding action can be successfully executed in the simulation environment, obtaining the execution status returned by the simulation environment, if the corresponding action fails to be executed, modifying the active program again using the program correction model according to the error information returned by the simulation environment;

[0012] Output the final modified activity program.

[0013] In one implementation, the checking of the verification code of the action corresponding to the active program, if the current action is determined to be executable, sending it to the simulator for execution, and if the current action is determined to be unexecutable, modifying the active program using the verification code, includes:

[0014] Searching for a verification code corresponding to an action of the activity program from the procedural memory;

[0015] Based on the verification code found, it is determined whether the current action is executable. If it is determined that the current action is not executable, a code update plan is generated, and the active program is modified using the verification code; if the current action is determined to be executable, it is sent to the simulator for execution.

[0016] In one implementation, the checking of the execution status of the active program, if the corresponding action can be successfully executed in the simulation environment, obtaining the execution status returned by the simulation environment, and if the corresponding action fails to be executed, modifying the active program again using a program correction model according to the error information returned by the simulation environment, includes:

[0017] Checking the execution status of the activity program to determine whether the action corresponding to the activity program can be successfully executed in the simulation environment;

[0018] If the execution is successful in the simulation environment, obtaining state change information of the simulation environment;

[0019] If the execution fails in the simulation environment, error information of the active program executed in the simulation environment is obtained, and according to the error information, the active program is modified again using the program correction model.

[0020] In one implementation, the modifying the active program again using the program correction model according to the error information includes:

[0021] Within the range of the set maximum number of post-execution error corrections, according to the error information of the active program executed in the simulation environment, the program correction model is used to generate a correction plan, and the active program is corrected according to the correction plan to obtain an updated active program, and after the update, the corresponding action instruction is continued to be executed from the error position;

[0022] Determine whether the corrected action is executed successfully;

[0023] If the execution is successful, the next instruction in the active program will continue to be executed until all instructions in the active program are executed, or the number of post-execution error corrections reaches the upper limit.

[0024] In one implementation, the method further includes:

[0025] After each training session, the action verification code corresponding to the action instruction executed with error in the simulation environment is obtained to obtain the old action verification code with defects;

[0026] Obtain the experience information of successful error correction during the training process from the error correction history information;

[0027] Based on the old defective action verification code and the experience information of successful error correction, a new optimized action verification code is outputted using an experience summary model.

[0028] In one implementation, the acquiring, from the error correction history information, experience information of successful error correction in the reasoning process includes:

[0029] Execution information of the action instruction from execution error to successful re-execution or skipping is obtained to obtain the experience information of successful error correction.

[0030] In a second aspect, the present invention provides a closed-loop human activity program generation system, comprising:

[0031] The task planning module is used to input the initial scenario information and activity description, and generate the initial activity program through the task planning model;

[0032] A pre-execution error correction module is used to check the verification code of the corresponding action of the activity program. If the current action is judged to be executable, it is sent to the simulator for execution. If the current action is judged to be unexecutable, the activity program is modified using the verification code; wherein the verification code is a code summarized according to the error correction experience of the corresponding action during the model training process;

[0033] A post-execution error correction module is used to check the execution status of the active program. If the corresponding action can be successfully executed in the simulation environment, the post-execution status returned by the simulation environment is obtained. If the corresponding action fails to be executed, the active program is modified again using a program correction model according to the error information returned by the simulation environment.

[0034] The error correction experience summary module is used to summarize the experience of the corresponding action from execution error to successful re-execution during the training process, and generate the inspection code of the corresponding action for use in pre-execution error correction during the reasoning process.

[0035] In a third aspect, the present invention provides a terminal, comprising: a processor and a memory, wherein the memory stores a closed-loop human activity program generation program, and when the closed-loop human activity program generation program is executed by the processor, it is used to implement the operation of the closed-loop human activity program generation method described in the first aspect.

[0036] In a fourth aspect, the present invention further provides a medium, which is a computer-readable storage medium, and which stores a closed-loop human activity program generation program. When the closed-loop human activity program generation program is executed by a processor, it is used to implement the operation of the closed-loop human activity program generation method described in the first aspect.

[0037] The present invention adopts the above technical solution to achieve the following effects:

[0038] The present invention generates an initial activity program through a task planning model, and checks the verification code of the corresponding action of the activity program, and sends it to the simulator for execution when the current action is executable, or uses the verification code to modify the activity program when the current action is not executable; and when the corresponding action is successfully executed, the post-execution status returned by the simulation environment is obtained, or when the corresponding action fails to execute, according to the error information returned by the simulation environment, the program correction model is used to modify the activity program again, and the final modified activity program is output; the present invention provides a method for automatically generating an activity program in a closed-loop manner according to the activity description input by a user, which can dynamically correct the activity program during the execution process, and greatly improve the executableness of the activity program. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.

[0040] Figure 1 It is a flow chart of the closed-loop human activity program generation method in the present invention.

[0041] Figure 2 It is a schematic diagram of the closed-loop human activity program generation in the present invention.

[0042] Figure 3 It is a schematic diagram of the reasoning process in the present invention.

[0043] Figure 4 It is a schematic diagram of the learning process in the present invention.

[0044] Figure 5 It is a schematic diagram of the test results in the present invention.

[0045] Figure 6 It is a functional principle diagram of a terminal in one implementation of the present invention.

[0046] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0048] Exemplary Methods

[0049] There are three main types of existing systems that generate activity programs in a closed loop. The first type is the work of human activity program generation tasks, the second type is related work to complete tasks using a closed loop method, and the third type is related work using code as memory. In the past, there were two main types of work on human activity program generation tasks. The first type was to use a training model to generate activity programs and learn a large number of activity instruction-activity program pairs. The second method was to use a pre-trained large language model and rely on prompt engineering to directly generate activity programs. This method combines the advantages of the training model and the large language model by fine-tuning the large language model. Therefore, the existing human activity program generation methods all use an open loop method to generate activity programs, which means that once an instruction in the program fails to execute correctly, the activity ends and there is no self-correction capability.

[0050] In response to the above technical problems, an embodiment of the present invention provides a closed-loop human activity program generation method, which generates an initial activity program through a task planning model, checks the verification code of the corresponding action of the activity program, and sends it to the simulator for execution when the current action is executable, or uses the verification code to modify the activity program when the current action is not executable; and when the corresponding action is executed successfully, obtains the post-execution status returned by the simulation environment, or when the corresponding action fails to execute, uses the program correction model to modify the activity program again according to the error information returned by the simulation environment, and outputs the final modified activity program; an embodiment of the present invention provides a method for automatically generating an activity program in a closed-loop manner according to an activity description input by a user, which can dynamically correct the activity program during the execution process, greatly improving the executableness of the activity program.

[0051] like Figure 1 As shown, an embodiment of the present invention provides a closed-loop human activity program generation method, comprising the following steps:

[0052] Step S100, input initial scene information and activity description, and generate an initial activity program through a task planning model.

[0053] In this embodiment, the problem of generating human activity programs is solved. The task of this embodiment is to hope that digital humans (i.e., virtual humans) can generate reasonable and executable activity programs based on high-level descriptions given by humans (e.g., the activity description of "surfing the Internet") and the states of objects and characters in the scene; these activity programs can be composed of action instructions, which contain actions and objects to be operated, for example, [WALK] <chair>(Walk-Chair), [SIT] <chair>(Sit-Chair), [SWITCHON] <computer>(Open - Computer) and other action commands.

[0054] Based on the above task description, the method provided in this embodiment builds a system for inputting activity instructions to generate activity programs in a closed loop, and summarizes the experience of successful error correction in the form of code, thereby realizing the function of closed-loop automatic generation of activity programs.

[0055] The system in this embodiment provides a closed-loop framework based on a training model combined with a large language model, and uses this framework to solve the problem of generating human activity programs. The framework uses the training model to output an initial result with relatively good performance, and then uses the contextual capabilities of the large language model to correct the parts that have errors. From inputting an activity description to generate an initial activity program, to using the instructions in the activity program to execute one by one and self-correct, the system in this embodiment has designed a complete solution process. Therefore, the method in this embodiment, based on scene execution feedback information, uses a large language model to automatically correct activity program errors, and can summarize the error correction experience into a general, action-level code and store it for self-correction before execution.

[0056] In this embodiment, the human body activity program generation task requires inputting an initial scene S0 and an activity description D, and then outputting an activity program P = {I i |i∈N}. An active program contains N instructions, each of which has i =[A i ,O i1 ,O i2 ,K i ], containing action A i , object O, and a flag K that determines whether to skip the instruction i , if K i is 0, it means that the instruction will be executed. i If it is 1, it means that the instruction will be skipped.

[0057] Three models are used in this embodiment, namely, a task planning model, a program correction model and an experience summary model.

[0058] As an example, this embodiment uses a trained Scene aware APG (scene perception model) as a task planning model, which is responsible for generating the initial activity program based on the initial scene and activity description. And GPT3.5turbo is used as a program correction model, which is responsible for inputting error feedback and historical execution information, and outputting an activity program correction plan. And GPT4o is used as an experience summary model, which is responsible for inputting error correction history information and old defective action verification code, and outputting a new optimized action verification code.

[0059] like Figure 2 As shown, Figure 2 The overall process of closed-loop human activity program generation is shown in Figure 1. First, the scene information S0 and activity description D need to be input at the initial stage of the task, and an initial activity program P = Planner (S0, D) is generated using the task planning model; then, the instructions in the program are executed one by one in sequence. During this execution process, the contextual capabilities of the large language model are used to correct the execution errors, so as to achieve the process from inputting the activity description to generate an initial activity program, to using the instructions in the activity program to execute one by one and self-correct.

[0060] like Figure 1 As shown, an embodiment of the present invention provides a closed-loop human activity program generation method, comprising the following steps:

[0061] Step S200, checking the verification code of the corresponding action of the activity program, if it is judged that the current action is executable, it is sent to the simulator for execution, if it is judged that the current action is not executable, the activity program is modified using the verification code; wherein the verification code is a code summarized according to the error correction experience of the corresponding action during the model training process.

[0062] In this embodiment, after the initial activity program is generated by the task planning model, in order to ensure that the activity program can run in the preset virtual environment, it is necessary to perform error correction before execution, that is, first use the error correction code to check whether the instruction will be executed. If the execution fails, early error correction will be performed to avoid errors.

[0063] Specifically, in an implementation of this embodiment, step S200 includes the following steps:

[0064] Step S201, searching the procedural memory for the verification code of the action corresponding to the activity program;

[0065] Step S202, judging whether the current action is executable based on the verification code found, if the current action is not executable, generating a code update plan, and using the verification code to modify the active program; if the current action is executable, sending it to the simulator for execution.

[0066] In this embodiment, if Figure 3 As shown, Figure 3 An example of the detailed reasoning process of the method of this embodiment is shown in FIG. , which includes three key stages: initialization, pre-execution error correction, and post-execution error correction.

[0067] At the initial stage of the task, an initial activity program P = Planner (S0, D) is generated using the task planning model, and then the instructions in the program are executed one by one in sequence. Before each instruction is executed, a pre-execution error correction is performed, that is, according to the action A in the instruction, i , find the corresponding check code from the procedural memory to determine whether error correction is required. If error correction is required, the active program is updated according to the error correction logic of the check code, that is, the current action instruction is skipped; if error correction is not required, it is directly sent to the simulation environment for execution.

[0068] As an example, the process of pre-execution error correction in this embodiment is as follows:

[0069] If the verification code determines that the instruction will be executed incorrectly, a code update plan ΔP will be generated first i =V(S i ,I i ), use this update plan to update the active program, and then send it to the simulation environment for execution. Figure 2 As shown in the example, the action instruction of the activity program is to turn on the light. The digital human intends to turn on the light, but the verification code detects that the light is already on. Therefore, the instruction to turn on the light is corrected before execution, that is, the instruction to turn on the light is marked as skipped. The subsequent execution will skip the instruction and continue.

[0070] In this embodiment, during the error correction process before execution, if the verification code does not find any instruction error, the initial activity program is directly placed in the simulation environment for execution; wherein the simulation environment is a virtual environment simulated based on the initial scene information, for example, indoor scenes (bedroom scenes, living room scenes), outdoor scenes, and other work activity scenes.

[0071] In this embodiment, during the process of putting the active program into the simulation environment for execution, if the execution is successful in the simulation environment, the state change information of the simulation environment is obtained. If the instruction is executed incorrectly in the simulation environment, the simulation environment will provide an error feedback information F to facilitate the subsequent modification of the active program.

[0072] like Figure 1 As shown, an embodiment of the present invention provides a closed-loop human activity program generation method, comprising the following steps:

[0073] Step S300, checking the execution status of the active program, if the corresponding action can be successfully executed in the simulation environment, obtaining the execution status returned by the simulation environment, if the corresponding action fails to execute, modifying the active program again using the program correction model according to the error information returned by the simulation environment;

[0074] Step S400, outputting the final modified activity program.

[0075] Since the method provided in this embodiment uses a closed-loop approach to generate an active program, during the execution of the active program, if the execution is successful in the simulation environment, the state change information of the simulation environment is obtained. If an instruction is executed incorrectly, the large language model (i.e., the GPT3.5turbo program correction model) is used to update the active program to correct the error. In addition, this embodiment provides a code-based memory model. Once the error correction is successful, the error correction logic is recorded to facilitate the subsequent optimization of the active program based on the recorded error correction information.

[0076] Specifically, in an implementation of this embodiment, step S300 includes the following steps:

[0077] Step S301, checking the execution status of the activity program to determine whether the action corresponding to the activity program can be successfully executed in the simulation environment;

[0078] Step S302, if the execution in the simulation environment is successful, obtaining the state change information of the simulation environment;

[0079] Step S303: if the execution fails in the simulation environment, error information of the active program in the simulation environment is obtained, and according to the error information, the active program is modified again using the program correction model.

[0080] Specifically, in an implementation of this embodiment, the step S303 of modifying the active program again according to the error information using the program correction model includes:

[0081] Step S303a, within the range of the set maximum number of post-execution error corrections, according to the error information of the active program executed in the simulation environment, using the program correction model to generate a correction plan, and correcting the active program according to the correction plan to obtain an updated active program, and continuing to execute the corresponding action instruction from the error position after the update;

[0082] Step S303b, determining whether the corrected action is executed successfully;

[0083] Step S303c, if the execution is successful, continue to execute the next instruction in the active program until all instructions in the active program are executed, or the number of error corrections after execution reaches the upper limit.

[0084] In this embodiment, in the simulation environment, if the execution of the activity instruction fails, the large language model is used as a corrector based on the execution error information to output the correction plan of the activity program after execution, and the correction plan is used to update the activity program to correct the error. If the execution is successful, the next instruction in the program is executed. The activity ends until all the instructions in the activity program are executed, or the number of error corrections after execution reaches the upper limit.

[0085] In this embodiment, the main reason for the execution error is that the action does not match the scene state. For example, if the character is already in a standing state, if [STANDUP] is executed, an execution error will occur; for another example, if an apple is in a closed container and [GRAB] is executed, the character will not be able to perform the action. <apple>(grab - apple) will be executed incorrectly. The error correction method in this embodiment is to skip the current redundant instructions (for example, if the character is already in a standing state, the standing instruction should be skipped), or to insert some additional instructions before the wrong instruction so that the original wrong instruction can be successfully executed (for example, before the instruction of grabbing an object in a closed container, insert an instruction of opening the container).

[0086] As an example, the process of post-execution error correction in this embodiment is as follows:

[0087] If the verification code does not find any instruction errors, it is directly put into the simulation environment for execution. During the execution of the active program, the program correction model is used in this embodiment to input the historical execution information and output a modification plan ΔP for the active program. i =Corrector(S0,D,[I0,F0],...[I i ,F i ]), and then use the modification plan to update the active program, and then continue to execute from the error location. Figure 3 As shown, in Figure 3 In the example in , the digital human intends to grab a toy in a drawer, but the drawer is closed, so the execution fails. The program correction model then inserts an instruction to open the drawer, and the subsequent execution can continue successfully.

[0088] In an implementation of this embodiment, the embodiment of the present invention provides a closed-loop human activity program generation method, which also includes the following steps:

[0089] Step S501, after each training is completed, the action verification code corresponding to the action instruction executed with error in the simulation environment is obtained to obtain the old action verification code with defects;

[0090] Step S502, obtaining experience information of successful error correction during the training process from the error correction history information;

[0091] Specifically, in one implementation of the present embodiment, the experience information of successful error correction in the reasoning process is obtained from the error correction history information, including: obtaining the execution information of the action instruction from the execution error to the successful re-execution or skipping, and obtaining the experience information of successful error correction.

[0092] Step S503: outputting a new optimized action verification code by using an experience summary model according to the old defective action verification code and the experience information of successful error correction.

[0093] In this embodiment, if Figure 4 As shown, Figure 4 An example of the learning process of the method provided in this embodiment is shown in FIG.

[0094] After each training session, if an instruction fails to execute in the simulation environment, it means that the action verification code corresponding to the instruction is defective and the error has not been found and corrected. Initially, for each action, the experience of successful error correction during the training process is collected (error correction experience refers to the process from an action execution error to the action being successfully re-executed / skipped), and the experience summary model is used to optimize the action verification code V. new =Summarizer(S j ,D,[I j ,F j ],...[I i ,F i ],V old ). In this way, the method provided in this embodiment has the ability of autonomous learning, and can continuously optimize the verification code to update the program before the execution error occurs to avoid errors, thereby greatly improving the execution efficiency.

[0095] like Figure 3 As shown, Figure 3 The example provided in shows that the code for verifying the grasping action does not have the logic to verify whether the object to be grasped is placed in a closed container, so the execution fails. After the failure, the program corrects the reasoning of the model and inserts the instruction to open the container. The subsequent re-execution of the grasping instruction is successful. Figure 4 As shown, Figure 4 This error correction experience is input into the experience summary model, and the action verification code is optimized so that it has the logic to verify whether the object is placed in a closed container and has corresponding error correction methods.

[0096] The experiment in this embodiment is divided into a training phase and a testing phase. The training phase allows learning after inference, while the testing phase does not. In the training phase, 100 samples are randomly selected from the training set, and inference and learning are performed on the 100 samples.

[0097] The method in this embodiment was experimented on a virtual home simulation environment. The main evaluation indicators of the task were the rationality and executability of the activity program. Rationality refers to the relevance between the activity program and the activity description at the semantic level, while executability refers to whether the activity program can be successfully executed in the target scenario instance.

[0098] This example randomly selected 100 samples from the original training set for learning, and tested them on the complete 2415 samples in the test set. Figure 5 As shown, the test results prove that based on the current best method Scene aware APG, adding the method in this embodiment can improve the executability from 0.767 to 0.993, and the completion from 0.573 to 0.756, which has a significant improvement in the error correction capability.

[0099] It is worth mentioning that the task planning module in this embodiment can have different network implementations. In this embodiment, Scene aware APG is used as the network. In other implementations, it can be replaced with some other networks, such as RAG, or GPT4, etc. The program correction module and the experience summary module can also be replaced with other large language models, such as GPT3, GPT4 and other versions. These replacement solutions based on this embodiment should all fall within the protection scope of this embodiment.

[0100] This embodiment achieves the following technical effects through the above technical solution:

[0101] This embodiment generates an initial activity program through a task planning model, and checks the verification code of the corresponding action of the activity program, and sends it to the simulator for execution when the current action is executable, or uses the verification code to modify the activity program when the current action is not executable; and when the corresponding action is executed successfully, obtains the post-execution status returned by the simulation environment, or when the corresponding action fails to execute, uses the program correction model to modify the activity program again according to the error information returned by the simulation environment, and outputs the final modified activity program; this embodiment provides a method for automatically generating an activity program in a closed-loop manner according to the activity description input by the user, which can dynamically correct the activity program during the execution process, thereby greatly improving the executableness of the activity program.

[0102] Exemplary Devices

[0103] The task planning module is used to input the initial scenario information and activity description, and generate the initial activity program through the task planning model;

[0104] A pre-execution error correction module is used to check the verification code of the corresponding action of the activity program. If the current action is judged to be executable, it is sent to the simulator for execution. If the current action is judged to be unexecutable, the activity program is modified using the verification code; wherein the verification code is a code summarized according to the error correction experience of the corresponding action during the model training process;

[0105] A post-execution error correction module is used to check the execution status of the active program. If the corresponding action can be successfully executed in the simulation environment, the post-execution status returned by the simulation environment is obtained. If the corresponding action fails to be executed, the active program is modified again using a program correction model according to the error information returned by the simulation environment.

[0106] The error correction experience summary module is used to summarize the experience of the corresponding action from execution error to successful re-execution during the training process, and generate the inspection code of the corresponding action for use in pre-execution error correction during the reasoning process.

[0107] This embodiment achieves the following technical effects through the above technical solution:

[0108] This embodiment generates an initial activity program through a task planning model, and checks the verification code of the corresponding action of the activity program, and sends it to the simulator for execution when the current action is executable, or uses the verification code to modify the activity program when the current action is not executable; and when the corresponding action is executed successfully, obtains the post-execution status returned by the simulation environment, or when the corresponding action fails to execute, uses the program correction model to modify the activity program again according to the error information returned by the simulation environment, and outputs the final modified activity program; this embodiment provides a method for automatically generating an activity program in a closed-loop manner according to the activity description input by the user, which can dynamically correct the activity program during the execution process, thereby greatly improving the executableness of the activity program.

[0109] Based on the above embodiment, the present invention further provides a terminal, whose principle block diagram can be as follows: Figure 6 shown.

[0110] The terminal includes: a processor, a memory, an interface, a display screen and a communication module connected through a system bus; wherein the processor of the terminal is used to provide computing and control capabilities; the memory of the terminal includes a storage medium and an internal memory; the storage medium stores an operating system and a computer program; the internal memory provides an environment for the operation of the operating system and the computer program in the storage medium; the interface is used to connect to external devices; the display screen is used to display corresponding information; and the communication module is used to communicate with a cloud server or other devices.

[0111] When the computer program is executed by a processor, it is used to implement the operation of the closed-loop human activity program generation method.

[0112] It can be understood by those skilled in the art that Figure 6 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal to which the scheme of the present invention is applied. The specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0113] In one embodiment, a terminal is provided, which includes: a processor and a memory, wherein the memory stores a closed-loop human activity program generation program, and when the closed-loop human activity program generation program is executed by the processor, it is used to implement the operation of the closed-loop human activity program generation method as described above.

[0114] In one embodiment, a storage medium is provided, wherein the storage medium stores a closed-loop human activity program generation program, and when the closed-loop human activity program generation program is executed by a processor, it is used to implement the operations of the closed-loop human activity program generation method as described above.

[0115] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and volatile memory.

[0116] In summary, the present invention provides a closed-loop human activity program generation method and system, including: inputting initial scene information and activity description, generating an initial activity program through a task planning model; checking the verification code of the action corresponding to the activity program, if it is determined that the current action is executable, sending it to the simulator for execution, if it is determined that the current action is not executable, using the verification code to modify the activity program; checking the execution status of the activity program, if the corresponding action can be successfully executed in the simulation environment, obtaining the execution status returned by the simulation environment, if the corresponding action fails to execute, according to the error information returned by the simulation environment, using the program correction model to modify the activity program again; outputting the final modified activity program. The present invention provides a method for automatically generating an activity program in a closed-loop manner according to the activity description input by the user, which can dynamically correct the activity program during the execution process, greatly improving the executable nature of the activity program.

[0117] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.< / apple> < / computer> < / chair> < / chair>

Claims

1. A closed-loop human activity program generation method, characterized in that: include: Input the initial scenario information and activity description, and generate the initial activity program through the task planning model; Check the verification code of the action corresponding to the activity program, if the current action is judged to be executable, send it to the simulator for execution, if the current action is judged to be unexecutable, modify the activity program using the verification code; wherein the verification code is a code summarized according to the error correction experience of the corresponding action during the model training process; Checking the execution status of the active program, if the corresponding action can be successfully executed in the simulation environment, obtaining the execution status returned by the simulation environment, if the corresponding action fails to be executed, modifying the active program again using the program correction model according to the error information returned by the simulation environment; Output the final modified activity program.

2. The closed-loop human activity program generation method according to claim 1, characterized in that: The checking of the verification code of the corresponding action of the active program, if it is determined that the current action is executable, then sending it to the simulator for execution; if it is determined that the current action is not executable, then using the verification code to modify the active program, includes: Searching for a verification code corresponding to an action of the activity program from the procedural memory; Based on the verification code found, it is determined whether the current action is executable. If it is determined that the current action is not executable, a code update plan is generated, and the active program is modified using the verification code; if the current action is determined to be executable, it is sent to the simulator for execution.

3. The closed-loop human activity program generation method according to claim 1, characterized in that: The checking of the execution status of the active program, if the corresponding action can be successfully executed in the simulation environment, obtaining the execution status returned by the simulation environment, and if the corresponding action fails to be executed, modifying the active program again using a program correction model according to the error information returned by the simulation environment, includes: Checking the execution status of the activity program to determine whether the action corresponding to the activity program can be successfully executed in the simulation environment; If the execution is successful in the simulation environment, obtaining state change information of the simulation environment; If the execution fails in the simulation environment, error information of the active program executed in the simulation environment is obtained, and according to the error information, the active program is modified again using the program correction model.

4. The closed-loop human activity program generation method according to claim 3, characterized in that: The step of modifying the active program again using the program correction model according to the error information comprises: Within the range of the set maximum number of post-execution error corrections, according to the error information of the active program executed in the simulation environment, the program correction model is used to generate a correction plan, and the active program is corrected according to the correction plan to obtain an updated active program, and after the update, the corresponding action instruction is continued to be executed from the error position; Determine whether the corrected action is executed successfully; If the execution is successful, the next instruction in the active program will continue to be executed until all instructions in the active program are executed, or the number of post-execution error corrections reaches the upper limit.

5. The closed-loop human activity program generation method according to claim 1, characterized in that: The method further comprises: After each training session, the action verification code corresponding to the action instruction executed with error in the simulation environment is obtained to obtain the old action verification code with defects; Obtain the experience information of successful error correction during the training process from the error correction history information; Based on the old defective action verification code and the experience information of successful error correction, a new optimized action verification code is outputted using an experience summary model.

6. The closed-loop human activity program generation method according to claim 5, characterized in that: The step of acquiring the experience information of successful error correction in the reasoning process from the error correction history information includes: Execution information of the action instruction from execution error to successful re-execution or skipping is obtained to obtain the experience information of successful error correction.

7. A closed-loop human activity program generation system, characterized in that: include: The task planning module is used to input the initial scenario information and activity description, and generate the initial activity program through the task planning model; A pre-execution error correction module is used to check the verification code of the corresponding action of the activity program. If the current action is judged to be executable, it is sent to the simulator for execution. If the current action is judged to be unexecutable, the activity program is modified using the verification code; wherein the verification code is a code summarized according to the error correction experience of the corresponding action during the model training process; A post-execution error correction module is used to check the execution status of the active program. If the corresponding action can be successfully executed in the simulation environment, the post-execution status returned by the simulation environment is obtained. If the corresponding action fails to be executed, the active program is modified again using a program correction model according to the error information returned by the simulation environment. The error correction experience summary module is used to summarize the experience of the corresponding action from execution error to successful re-execution during the training process, and generate the inspection code of the corresponding action for use in pre-execution error correction during the reasoning process.

8. A terminal, characterized in that: include: A processor and a memory, wherein the memory stores a closed-loop human activity program generation program, and when the closed-loop human activity program generation program is executed by the processor, it is used to implement the operation of the closed-loop human activity program generation method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a closed-loop human activity program generation program, which, when executed by a processor, is used to implement the operation of the closed-loop human activity program generation method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Code testing method and device, all-in-one machine and computer program product

    CN117215962A

  • RPA process execution code generation method and device based on AI and AI Agent

    CN118444894A

  • Self-creating, self-improving, and self-simulating artificial intelligence

    US20230116482A1