Trajectory tracking method and device, robot equipment and computer readable storage medium

By establishing a world model and automatically adjusting the initial decision model, the cumbersome parameter adjustment problem caused by changes in hardware parameters in robot trajectory tracking is solved, and the accuracy and efficiency of trajectory tracking are improved.

CN118896604APending Publication Date: 2024-11-05NETEASE LINGDONG (HANGZHOU) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410405691.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-03
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

In robot tracking, when hardware parameters change, PID control parameters need to be manually adjusted to ensure the accuracy of tracking, which is cumbersome and inefficient.

Method used

By obtaining the historical action data and state parameters of the robot equipment, establishing a world model, automatically adjusting the initial decision model to adapt to changes in the equipment parameters, and achieving automatic parameter adjustment.

Benefits of technology

Improve the efficiency of parameter adjustment, reduce manual intervention, and improve the accuracy and efficiency of trajectory tracking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118896604A_ABST
    Figure CN118896604A_ABST
Patent Text Reader

Abstract

The invention discloses a trajectory tracking method and device, robot equipment and a computer readable storage medium, and the method comprises the steps: carrying out the model training according to a plurality of actions, pre-execution state parameters corresponding to each action, and post-execution state parameters corresponding to each action, so as to obtain a world model representing the operation law of the robot equipment; the initial decision model is used for predicting a to-be-executed action needing to be executed by the robot equipment according to each piece of input trajectory data and a first state parameter, and the first state parameter is a state parameter before the robot equipment executes the to-be-executed action; inputting the first state parameter and the action to be executed into a world model to obtain a second state parameter; and training the initial decision model according to the second state parameter and the target trajectory, so that the trained initial decision model can output a to-be-executed action conforming to the operation rule of the robot equipment. According to the invention, the efficiency of model parameter adjustment in the trajectory tracking model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a trajectory tracking method, apparatus, robot equipment and computer-readable storage medium. Background Art

[0002] With the development of science and technology, the application fields of robots are becoming more and more extensive. For example, robots are used in the field of trajectory tracking.

[0003] When a robot is used for trajectory tracking, the robot is usually controlled by the Proportional Integral Derivative (PID) method to track the trajectory. However, when the hardware parameters on the robot change, the parameters in the PID method need to be manually readjusted to ensure the accuracy of trajectory tracking. The manual readjustment method is cumbersome and inefficient. Summary of the invention

[0004] The embodiments of the present application provide a trajectory tracking method, apparatus, robot device, and computer-readable storage medium. When the device parameters of the robot device change, the model parameters of the trajectory tracking model in the robot device can be automatically adjusted to improve the efficiency of parameter adjustment.

[0005] In a first aspect, an embodiment of the present application provides a trajectory tracking method, which is applied to a robot device. The method includes:

[0006] Acquire historical action data and historical state parameters corresponding to the robot device, wherein the historical action data includes multiple actions performed by the robot device, and the historical state parameters include pre-execution state parameters and post-execution state parameters corresponding to the robot device in the process of performing the multiple actions;

[0007] The plurality of actions and the pre-execution state parameters corresponding to each action are used as model inputs, and the post-execution state parameters corresponding to each action are used as model outputs for model training to obtain a world model representing the operation law of the robot device;

[0008] Obtaining a target trajectory and an initial decision model, wherein the target trajectory includes a plurality of trajectory data, and the initial decision model is used to predict the to-be-executed action required to be performed by the robot device according to each input trajectory data and a first state parameter, wherein the first state parameter is a state parameter of the robot device before performing the to-be-executed action;

[0009] Inputting the first state parameter and the action to be performed into the world model to obtain a second state parameter that complies with the operation rule of the robot device after performing the action to be performed;

[0010] The initial decision model is trained according to the second state parameter and the target trajectory, so that the trained initial decision model can output actions to be executed that conform to the operating rules of the robot device.

[0011] In a second aspect, an embodiment of the present application further provides a trajectory tracking device, which is applied to a robot device, and the device includes:

[0012] A first acquisition module is used to acquire historical action data and historical state parameters corresponding to the robot device, wherein the historical action data includes multiple actions performed by the robot device, and the historical state parameters include pre-execution state parameters and post-execution state parameters corresponding to the robot device in the process of performing the multiple actions;

[0013] A first training module is used to perform model training using the above-mentioned multiple actions and the pre-execution state parameters corresponding to each action as model inputs and the post-execution state parameters corresponding to each action as model outputs, so as to obtain a world model representing the operation law of the above-mentioned robot device;

[0014] A second acquisition module is used to acquire a target trajectory and an initial decision model, wherein the target trajectory includes a plurality of trajectory data, and the initial decision model is used to predict the to-be-executed action to be performed by the robot device according to each input trajectory data and a first state parameter, wherein the first state parameter is a state parameter of the robot device before performing the to-be-executed action;

[0015] A parameter prediction module, used for inputting the first state parameter and the action to be performed into the world model to obtain a second state parameter that meets the operation law of the robot device after performing the action to be performed;

[0016] The second training module trains the initial decision model according to the second state parameter and the target trajectory, so that the trained initial decision model can output actions to be executed that conform to the operating rules of the robot device.

[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for loading by a processor to execute any trajectory tracking method provided in an embodiment of the present application.

[0018] In an embodiment of the present application, historical action data and historical state parameters corresponding to the robot device are obtained, wherein the historical action data include multiple actions executed by the robot device, and the historical state parameters include pre-execution state parameters and post-execution state parameters corresponding to the robot device in the process of executing multiple actions; multiple actions and the pre-execution state parameters corresponding to each action are used as model input, and the post-execution state parameters corresponding to each action are used as model output for model training to obtain a world model that characterizes the operating rules of the robot device; a target trajectory and an initial decision model are obtained, wherein the target trajectory includes multiple trajectory data, and the initial decision model is used to predict the action to be executed by the robot device based on each input trajectory data and the first state parameter, wherein the first state parameter is the robot device The state parameters before executing the action to be executed; the first state parameters and the action to be executed are input into the world model to obtain the second state parameters that conform to the operation law of the robot device after executing the action to be executed; the initial decision model is trained according to the second state parameters and the target trajectory, so that the trained initial decision model can output the action to be executed that conforms to the operation law of the robot device, and the operation law of the robot device under the current device parameters is learned through the world model, and then the initial decision model is trained through the world model, so that when the device parameters change, the initial decision model can be automatically trained to obtain a decision model that conforms to the operation law of the robot device under the current device parameters, without manually participating in the adjustment of the model parameters in the initial decision, thereby improving the efficiency of parameter adjustment. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 This is a schematic diagram of an embodiment of the trajectory tracking method provided by the embodiment of the present application;

[0021] Figure 2 is a schematic flow chart of another embodiment of the trajectory tracking method provided in the embodiments of the present application;

[0022] Figure 3 is a schematic diagram of a robot provided in an embodiment of the present application;

[0023] Figure 4 It is a flow chart of the model application method provided in the embodiments of the present application;

[0024] Figure 5is a schematic diagram of a motion trajectory and a trajectory to be tracked provided in an embodiment of the present application;

[0025] Figure 6 is a schematic diagram of the structure of a trajectory tracking device provided in an embodiment of the present application;

[0026] Figure 7 It is a schematic diagram of the structure of the robot device provided in the embodiment of the present application. DETAILED DESCRIPTION

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

[0028] Before explaining the embodiments of the present application in detail, some terms involved in the embodiments of the present application are first explained.

[0029] Wherein, in the description of the embodiment of the present application, the term "first", "second" etc. can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment including a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment. "Multiple" in the embodiment of the present application refers to two or more.

[0030] The embodiments of the present application provide a trajectory tracking method, apparatus, robot device, and computer-readable storage medium. Specifically, the trajectory tracking method of the embodiments of the present application can be performed by a robot device, wherein the robot device is a device that can move autonomously, for example, the robot device can be a device that can move the entire robot device, or the robot device can be a device that can autonomously move a certain part of its body, for example, the robot device is a device with a mechanical arm, and the robot device can control the movement of the mechanical arm.

[0031] The following is a detailed description of the embodiments in conjunction with the accompanying drawings. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments. Although the logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different from that shown in the accompanying drawings.

[0032] In this embodiment, a terminal is taken as an example for explanation. This embodiment provides a trajectory tracking method, such as Figure 1 As shown, the specific process of the trajectory tracking method can be as follows:

[0033] 101. Obtain historical action data and historical state parameters corresponding to the robot device, wherein the historical action data includes multiple actions executed by the robot device, and the historical state parameters include pre-execution state parameters and post-execution state parameters corresponding to the robot device in the process of executing multiple actions.

[0034] Among them, the historical action data includes multiple actions performed by the robot device when it is in the current device parameters, and the historical state parameters are the corresponding pre-execution state parameters and post-execution state parameters of the robot device when it is in the current device parameters while executing multiple actions.

[0035] The current equipment parameters refer to parameters that describe the current characteristics of the robot equipment. For example, the current equipment parameters may refer to at least one of the hydraulic parameters and part parameters in the robot equipment, which is not limited in the embodiments of the present application.

[0036] The pre-execution state parameter refers to the position state and / or speed state of the robot device before performing a certain action, or the pre-execution state parameter refers to the position state and / or speed state of a certain part of the robot device before performing a certain action. For example, the pre-execution state parameter may refer to the position state and / or speed state of each joint in the robot device before performing a certain action.

[0037] The post-execution state parameter refers to the position state and / or speed state of the robot device after performing a certain action, or the post-execution state parameter refers to the position state and / or speed state of a certain part of the robot device after performing a certain action. For example, the post-execution state parameter may refer to the position state and / or speed state of each joint in the robot device after performing a certain action.

[0038] The historical action data and historical state parameters can be stored in a data tuple. A data tuple refers to a sequence that can store multiple data. For example, a data tuple can be (s, a, n_s), where s represents the state parameter before execution, a represents each action in multiple actions, and n_s represents the state parameter after execution.

[0039] For example, the pre-execution state parameter s1 and the initial trajectory data t1 are input into the initial decision model for prediction processing to obtain the predicted action a1. The robot device executes the predicted action a1 to obtain the post-execution state parameter s2. According to the pre-execution state parameter s1, the predicted action a1 and the post-execution state parameter s2, the data tuple g1 (s1, a1, s2) is obtained. Then, the post-execution state parameter s2 is used as the pre-execution state parameter s2. The pre-execution state parameter s2 and the initial trajectory data t2 are input into the initial decision model for prediction processing to obtain the predicted action a2. The robot device executes the predicted action a2 to obtain the post-execution state parameter s3. According to the pre-execution state parameter s2, the predicted action a2 and the post-execution state parameter s3, the data tuple g2 (s2, a2, s3) is obtained.

[0040] Optionally, the pre-execution state parameter may also include the temperature condition of the environment that the robot device is currently in. The post-execution state parameter may also include the temperature condition of the environment that the robot device is currently in.

[0041] Optionally, the pre-execution state parameters may include the current pre-execution state parameters of the robot device before performing a certain action. In this case, the pre-execution state parameters may include the current position status and / or current speed status of the robot device before performing a certain action. Alternatively, the pre-execution state parameters may also include the current pre-execution state parameters and historical pre-execution state parameters of the robot device before performing a certain action. In this case, the pre-execution state parameters may include the historical position status of the robot device before performing a certain action and the current position status of the robot device before performing a certain action, and / or the historical speed status of the robot device before performing a certain action and the current speed status of the robot device before performing a certain action.

[0042] When the pre-execution state parameters include the current pre-execution state parameters of the robot device before executing a certain action, for example, the initial trajectory includes initial trajectory data t1 and initial trajectory data t2, the current pre-execution state data of the robot device is s1, the current pre-execution state data s1 is used as the pre-execution state parameters, the pre-execution state data and the initial trajectory data t1 are input into the initial decision model for decision processing to obtain predicted action a1, the robot device executes the predicted action a1 to obtain post-execution state data s2, then the post-execution state parameter s2 is used as the current pre-execution state parameter s2, the current pre-execution state data s2 is used as the pre-execution state parameter, the pre-execution state data and the initial trajectory data t2 are input into the initial decision model for prediction processing to obtain predicted action a2, and the robot device executes the predicted action a2 to obtain post-execution state parameter s3.

[0043] When the pre-execution state parameter includes the current pre-execution state parameter and the historical pre-execution state parameter of the robot device before executing a certain action, obtaining the historical action data and the historical state parameter corresponding to the robot device includes:

[0044] Acquire an initial trajectory, where the initial trajectory includes multiple initial trajectory data;

[0045] Obtain the current pre-execution state parameter and the historical pre-execution state parameter before the current pre-execution state parameter;

[0046] The current pre-execution state parameter and the historical pre-execution state parameter are concatenated to obtain the pre-execution state parameter;

[0047] A plurality of initial trajectory data and pre-execution state parameters are input into an initial decision model to obtain a predicted action, and the predicted action is executed to obtain a post-execution state parameter.

[0048] Among them, the initial trajectory is the moving path of the object to be tracked by the robot device and / or the moving speed of the object to be tracked by the robot device, which may include at least one moving position and / or at least one moving speed of the object to be tracked. A moving position and / or a moving speed can be called an initial trajectory i data.

[0049] The predicted action is a plurality of actions. The pre-execution state parameters corresponding to each initial trajectory data are different. For example, the initial trajectory includes initial trajectory data t3 and initial trajectory data t4. The current pre-execution state data of the robot device is s3, and the historical pre-execution state parameters include s1 and s2. S1, s2 and s3 are spliced ​​to obtain the pre-execution state parameter s123. The pre-execution state data s123 and the initial trajectory data t3 are input into the initial decision model for decision processing to obtain the predicted action a3. The robot device executes the predicted action a3 to obtain the post-execution state data s4. Then, the post-execution state parameter s4 is used as the current pre-execution state parameter s4. At this time, the historical pre-execution state parameters include s1, s2 and s3. S1, s2, s3 and s4 are spliced ​​to obtain the pre-execution state parameter s1234. The pre-execution state data s1234 and the initial trajectory data t4 are input into the initial decision model for prediction processing to obtain the predicted action a4. The robot device executes the predicted action a4 to obtain the post-execution state parameter s5.

[0050] Optionally, the number of state parameters included in the pre-execution state parameters may be a first preset number, and the first preset number may be set according to actual conditions. For example, the first preset number may be 20 or 10, which is not limited in the embodiment of the present application.

[0051] Optionally, the process of obtaining the historical pre-execution state parameter before the current pre-execution state parameter may be:

[0052] According to a first preset number, obtaining historical pre-execution state parameters before the current pre-execution state parameters;

[0053] The process of concatenating the current pre-execution state parameters and the historical pre-execution state parameters to obtain the pre-execution state parameters can be as follows:

[0054] If the sum of the number of historical pre-execution state parameters and the number of current pre-execution state parameters is equal to a first preset number, the current pre-execution state parameters and the historical pre-execution state parameters are concatenated to obtain the pre-execution state parameters;

[0055] If the sum of the number of historical pre-execution state parameters and the number of current pre-execution state parameters is less than a first preset number, performing a state supplement operation according to the first historical pre-execution state parameter so that the sum of the number of historical pre-execution state parameters and the number of the first current state is equal to the first preset number;

[0056] The current pre-execution state parameters and the historical pre-execution state parameters are concatenated to obtain the pre-execution state parameters.

[0057] For example, the first preset number is 5, and 4 historical pre-execution state parameters are obtained. The current pre-execution state parameter is s7. All historical state parameters of s7 include s1, s2, s3, s4, s5 and s6. The historical pre-execution state parameters are s3, s4, s5 and s6. The number of s3, s4, s5, s6 and s7 is 5. Then s3, s4, s5, s6 and s7 are concatenated, and the obtained pre-execution state parameters can be (s3, s4, s5, s6, s7).

[0058] For another example, the first preset number is equal to 7, 6 historical pre-execution state parameters are obtained, the current pre-execution state parameter is s6, all historical state parameters of s6 include s1, s2, s3, s4 and s5, the first historical pre-execution state parameter is s1, the historical pre-execution state parameters are s1, s2, s3, s4 and s5, the number of s1, s2, s3, s4, s5 and s6 is less than 7, then the state supplement operation is performed according to the first historical pre-execution state parameter, so that the historical pre-execution state parameters are s1, s1, s2, s3, s4 and s5, so that the number of s1, s1, s2, s3, s4, s5 and s6 is equal to 7, s1, s1, s2, s3, s4, s5 and s6 are spliced, and the obtained pre-execution state parameters can be (s1, s1, s2, s3, s4, s5, s6).

[0059] In an embodiment of the present application, an initial trajectory is obtained, the initial trajectory includes multiple initial trajectory data, a current pre-execution state parameter and a historical pre-execution state parameter before the current pre-execution state parameter are obtained, the current pre-execution state parameter and the historical pre-execution state parameter are concatenated to obtain the pre-execution state parameter, the multiple initial trajectory data and the pre-execution state parameter are input into an initial decision model to obtain a predicted action, and the predicted action is executed to obtain a post-execution state parameter, so as to implement model training according to the historical pre-execution state parameter, and improve the accuracy of state prediction of the world model obtained through model training.

[0060] In some embodiments, obtaining historical motion data and historical state parameters corresponding to the robot device includes:

[0061] Acquire an initial trajectory, where the initial trajectory includes multiple initial trajectory data;

[0062] Extracting first initial trajectory data and second initial trajectory data following the first initial trajectory data in the initial trajectory from the plurality of initial trajectory data;

[0063] Splicing the first initial trajectory data and the second initial trajectory data to obtain spliced ​​trajectory data;

[0064] The trajectory is tracked according to the spliced ​​trajectory data to obtain the historical motion data and historical state parameters corresponding to the robot device.

[0065] The spliced ​​trajectory data and the pre-execution state parameters before executing the first initial trajectory data can be input into the initial decision model for decision processing to obtain a predicted action, and the predicted action is executed to obtain the post-execution state parameters after executing the first initial trajectory data. The predicted action is the multiple actions in the historical action data.

[0066] For example, the initial trajectory includes initial trajectory data t1 , initial trajectory data t2 , initial trajectory data t3 and initial trajectory data t4 . The pre-execution state data of the robot device is s1. When the first initial trajectory data is the initial trajectory data t1, the second initial trajectory data is the initial trajectory data t2 and the initial trajectory data t3. t1, t2 and t3 are spliced ​​to obtain the spliced ​​trajectory data t123. The pre-execution state data s1 and the spliced ​​trajectory data t123 are input into the initial decision model for decision processing to obtain the predicted action a1. The robot device executes the predicted action a1 to obtain the post-execution state data s2. Then, the post-execution state parameter s2 is used as the pre-execution state parameter s2. When the first initial trajectory data is the initial trajectory data t2, the second initial trajectory data is the initial trajectory data t3 and the initial trajectory data t4. t1, t2, t3 and t4 are spliced ​​to obtain the spliced ​​trajectory data t1234. The pre-execution state data s2 and the spliced ​​trajectory data t1234 are input into the initial decision model for decision processing to obtain the predicted action a2. The robot device executes the predicted action a2 to obtain the post-execution state data s3.

[0067] Optionally, the number of trajectory data included in the spliced ​​trajectory data may be a second preset number, and the second preset number may be the same as or different from the first preset number. For example, the second preset number may be 20 or 15, which is not limited in the embodiment of the present application.

[0068] Optionally, the process of extracting the first initial trajectory data and the second initial trajectory data following the first initial trajectory data in the initial trajectory from the plurality of initial trajectory data may be:

[0069] Extracting first initial trajectory data from a plurality of initial trajectory data;

[0070] extracting second initial trajectory data subsequent to the first initial trajectory data from the plurality of initial trajectory data according to a second preset number;

[0071] The process of splicing the first initial trajectory data and the second initial trajectory data to obtain the spliced ​​trajectory data may be:

[0072] If the sum of the number of the second initial trajectory data and the number of the first initial trajectory data is equal to the second preset number, the second initial trajectory data and the first initial trajectory data are spliced ​​to obtain spliced ​​trajectory data;

[0073] If the sum of the number of the second initial trajectory data and the number of the first initial trajectory data is less than the second preset number, performing a trajectory supplement operation according to the last initial trajectory data so that the sum of the number of the second initial trajectory data and the number of the first initial trajectory data is equal to the second preset number;

[0074] The second initial trajectory data and the first initial trajectory data are spliced ​​to obtain spliced ​​trajectory data.

[0075] The last initial trajectory data is the last initial trajectory data in the initial trajectory.

[0076] For example, the initial trajectory includes initial trajectory data t1, initial trajectory data t2, initial trajectory data t3, initial trajectory data t4, initial trajectory data t5, initial trajectory data t6, initial trajectory data t7, initial trajectory data t8, initial trajectory data t9 and initial trajectory data t10, the second preset number is 5, and 4 second initial trajectory data are obtained. When the first initial trajectory data is t2, the second initial trajectory data are t3, t4, t5 and t6, and the number of t2, t3, t4, t5 and t6 is 5. The second initial trajectory data and the first initial trajectory data are spliced, and the spliced ​​trajectory data obtained can be (t2, t3, t4, t5, t6).

[0077] For another example, the initial trajectory includes initial trajectory data t1, initial trajectory data t2, initial trajectory data t3, initial trajectory data t4, initial trajectory data t5, initial trajectory data t6, initial trajectory data t7, initial trajectory data t8, initial trajectory data t9 and initial trajectory data t10, the second preset number is equal to 7, and 6 second initial trajectory data are obtained. When the first initial trajectory data is t5, the second initial trajectory data includes t6, t7, t8, t9 and t10, t5, t6, t7 , t8, t9 and t10 is 6, which is less than 7, then a trajectory supplement operation is performed according to the last initial trajectory data, so that the second initial trajectory data obtained is t6, t7, t8, t9, t10 and t10, so that the number of t5, t6, t7, t8, t9, t10 and t10 is equal to 7, and the second initial trajectory data and the first initial trajectory data are spliced, and the spliced ​​trajectory data obtained can be (t5, t6, t7, t8, t9, t10, t10).

[0078] In an embodiment of the present application, an initial trajectory is obtained, the initial trajectory including a plurality of initial trajectory data; first initial trajectory data and second initial trajectory data following the first initial trajectory data in the initial trajectory are extracted from the plurality of initial trajectory data; the first initial trajectory data and the second initial trajectory data are spliced ​​to obtain spliced ​​trajectory data; trajectory tracking is performed according to the spliced ​​trajectory data to obtain historical motion data and historical state parameters corresponding to the robot device, and model training is performed according to the spliced ​​trajectory data, thereby improving the accuracy of state prediction of the world model obtained through model training.

[0079] In some embodiments, obtaining historical motion data and historical state parameters corresponding to the robot device includes:

[0080] Acquire an initial trajectory, where the initial trajectory includes multiple initial trajectory data;

[0081] Obtain the current pre-execution state parameter and the historical pre-execution state parameter before the current pre-execution state parameter;

[0082] The current pre-execution state parameter and the historical pre-execution state parameter are concatenated to obtain the pre-execution state parameter;

[0083] Extracting first initial trajectory data and second initial trajectory data following the first initial trajectory data in the initial trajectory from the plurality of initial trajectory data;

[0084] Splicing the first initial trajectory data and the second initial trajectory data to obtain spliced ​​trajectory data;

[0085] The spliced ​​trajectory data and the state parameters before execution are input into the initial decision model to obtain the predicted action, and the predicted action is executed to obtain the state parameters after execution.

[0086] In an embodiment of the present application, model training is implemented based on historical pre-execution state parameters and spliced ​​trajectory data to improve the accuracy of state prediction of the world model obtained through model training.

[0087] In some embodiments, obtaining historical action data and historical state parameters corresponding to the robot device includes:

[0088] Get training instructions;

[0089] According to the training instructions, the historical action data and historical state parameters corresponding to the robot device are obtained.

[0090] Among them, the training instruction can be an instruction generated in response to a user's triggering operation, or the training instruction can also be an instruction automatically generated by the robot device, which is not limited in the embodiments of the present application.

[0091] When the training instruction is an instruction generated in response to a trigger operation of a user, obtaining historical action data and historical state parameters corresponding to the robot device according to the training instruction includes:

[0092] When the robot device is under the current device parameters, judging whether there is historical action data and historical state parameters of the robot device for the current device parameters in the storage space according to the training instructions;

[0093] If it exists, the historical action data and historical state parameters of the robot device for the current device parameters are obtained from the storage space;

[0094] If it does not exist, the initial trajectory is tracked to obtain the historical action data and historical state parameters of the robot device for the current device parameters.

[0095] Among them, multiple initial trajectory data and pre-execution state parameters in the initial trajectory can be input into the initial decision model for decision processing to obtain predicted actions. The robot device executes the predicted actions to obtain post-execution state parameters. The predicted actions are multiple actions in the historical action data, thereby obtaining the historical action data and historical state parameters of the robot device for the current device parameters.

[0096] The modality of the initial trajectory can be set according to actual conditions. For example, the modality of the initial trajectory can be a visual modality. In this case, the video or image containing the initial trajectory can be input into the initial decision model, and the trajectory of the video or image can be identified through the initial decision model to obtain the initial trajectory. Then, the initial decision model is used to perform prediction processing based on the initial trajectory and pre-execution state parameters to obtain a predicted action. Alternatively, the modality of the initial trajectory can also be a text modality. In this case, the initial decision model can be used to directly perform prediction processing based on the initial trajectory and pre-execution state parameters to obtain a predicted action.

[0097] Optionally, the training instruction may include an initial trajectory. After the robot device executes all initial trajectory data in the initial trajectory in the training instruction, it stops acquiring historical motion data and historical state parameters. Alternatively, the robot device may stop acquiring historical motion data and historical state parameters when it receives a stop acquisition instruction. This is not limited to the embodiments of the present application.

[0098] When the user manually triggers the training of the initial decision model, the robot device may have collected historical action data and historical state parameters for the current device parameters under the current device parameters. At this time, there is no need to collect historical action data and historical state parameters for the current device parameters, and the historical action data and historical state parameters for the current device parameters can be directly obtained from the storage space. Therefore, after obtaining the training instructions, it is possible to determine whether there are historical action data and historical state parameters for the current device parameters in the storage space according to the training instructions; if so, the historical action data and historical state parameters of the robot device for the current device parameters are obtained from the storage space; if not, the robot device is controlled to track the initial trajectory to obtain the historical action data and historical state parameters of the robot device for the current device parameters, thereby saving the number of data collection times.

[0099] When the training instruction is an instruction automatically generated by the robot device, the training instruction is obtained, and according to the training instruction, historical action data and historical state parameters corresponding to the robot device are obtained, including:

[0100] Determine whether the device parameters of the robot device have changed;

[0101] If the device parameters of the robot device change, a training instruction is generated;

[0102] According to the training instructions, the initial trajectory is tracked to obtain the historical action data and historical state parameters of the robot device for the current device parameters.

[0103] Among them, the robot device can periodically detect the equipment parameters of the robot device, and compare the detected equipment parameters with the equipment parameters stored in itself. If the detected equipment parameters are different from the equipment parameters stored in itself, it indicates that the parts of the robot device have been replaced or repaired, or that the hydraulic parameters of the robot device have changed, then it is determined that the equipment parameters of the robot device have changed; if the detected equipment parameters are the same as the equipment parameters stored in itself, then it is determined that the equipment parameters of the robot device have not changed.

[0104] Alternatively, the robot device may also periodically obtain the maintenance record of the robot device. If the maintenance record includes new records, it is determined that the device parameters of the robot device have changed. If the maintenance record does not include new records, it is determined that the device parameters of the robot device have not changed.

[0105] In an embodiment of the present application, it is determined whether the device parameters of the robot device have changed; if the device parameters of the robot device have changed, a training instruction is generated; according to the training instruction, the initial trajectory is tracked to obtain the historical action data and historical state parameters of the robot device for the current device parameters, so as to automatically start the collection of the historical action data and historical state parameters for the current device parameters, and train the initial decision model according to the historical action data and historical state parameters for the current device parameters, thereby further improving the efficiency of model training.

[0106] When the training instruction is an instruction automatically generated by the robot device, obtaining the training instruction includes:

[0107] Get the preset trajectory;

[0108] Through the initial decision model, the action of the robot device to track the preset trajectory under the current device parameters is predicted, and the predicted trajectory is determined based on the action;

[0109] If the difference between the predicted trajectory and the preset trajectory does not meet the preset difference condition, a training instruction is generated.

[0110] The preset trajectory is a pre-set trajectory. The preset trajectory may include at least one moving position and / or at least one moving speed. The preset trajectory may be stored in the robot device.

[0111] The robot device can periodically obtain a preset trajectory (the preset trajectory obtained each time may be the same or different), and then use the initial decision model to make a prediction based on the preset trajectory to obtain a predicted trajectory. If the difference between the predicted trajectory and the preset trajectory does not meet the preset difference condition, it indicates that the accuracy of the trajectory predicted by the initial decision model is low. At this time, a training instruction can be generated to track the initial trajectory according to the training instruction, obtain the historical action data and historical state parameters of the robot device for the current device parameters, and train the initial decision model based on the historical action data and historical state parameters for the current device parameters.

[0112] 102. A plurality of actions and the pre-execution state parameters corresponding to each action are used as model inputs, and the post-execution state parameters corresponding to each action are used as model outputs for model training to obtain a world model that characterizes the operating rules of the robot device.

[0113] Among them, the post-execution state parameters corresponding to each action are used as the model output, which can be understood as indicating that the output of the model is the predicted post-execution state parameters corresponding to each action, so that the model training can be performed based on the predicted post-execution state parameters and the post-execution state parameters corresponding to each action.

[0114] The world model that characterizes the operating rules of the robot device refers to the world model that characterizes the operating rules of the robot device under the current device parameters.

[0115] The world model that characterizes the operating rules of the robot device under the current device parameters can be understood as a world model that has learned the state transition of the robot device under the current device parameters.

[0116] The initial world model refers to a network formed by interconnected neurons and used for learning state transition. The type of the initial world model can be set according to actual conditions. For example, the initial world model can be a convolutional neural network model or a long short-term memory network model (LSTM, Long Short-Term Memory, LSTM), which is not limited in the embodiments of the present application.

[0117] The initial world model refers to the current device parameters. When referring to the historical device parameters of the robot device, the initial world model can also be called the world model for the historical device parameters.

[0118] Optionally, the robot device can input the pre-execution state parameters and actions corresponding to each action into the initial world model for prediction processing to obtain predicted post-execution state parameters, and then determine the state loss function value based on the post-execution state parameters and the predicted post-execution state parameters, and judge whether the initial world model converges based on the state loss function value. If the initial world model converges, the initial world model is determined as a world model that characterizes the operating laws of the robot device under the current device parameters. If the initial world model does not converge, the model parameters of the initial world model are updated based on the state loss function value, and return to the step of inputting the pre-execution state parameters and actions corresponding to each action into the initial world model for prediction processing.

[0119] For example, multiple actions include predicted action a1, predicted action a2, predicted action a3, predicted action a4, predicted action a5 and predicted action a6. The pre-execution state parameter corresponding to the predicted action a1 is s1, the post-execution state parameter corresponding to the predicted action a1 is s2, the pre-execution state parameter corresponding to the predicted action a2 is s2, the post-execution state parameter corresponding to the predicted action a2 is s3, the pre-execution state parameter corresponding to the predicted action a3 is s3, the post-execution state parameter corresponding to the predicted action a3 is s4, the pre-execution state parameter corresponding to the predicted action a4 is s4, the post-execution state parameter corresponding to the predicted action a4 is s5, the pre-execution state parameter corresponding to the predicted action a5 is s5, the post-execution state parameter corresponding to the predicted action a5 is s6, the pre-execution state parameter corresponding to the predicted action a6 is s6, and the post-execution state parameter corresponding to the predicted action a6 is s7.

[0120] The pre-execution state parameter s1 and the predicted action a1 are input into the initial world model for prediction processing to obtain the predicted post-execution state parameter s2'; the pre-execution state parameter s2 and the predicted action a2 are input into the initial world model for prediction processing to obtain the predicted post-execution state parameter s3'; the pre-execution state parameter s3 and the predicted action a3 are input into the initial world model for prediction processing to obtain the predicted post-execution state parameter s4'; the state loss function value is determined according to the predicted post-execution state parameter s2', the post-execution state parameter s2, the predicted post-execution state parameter s3', the post-execution state parameter s3 and the predicted post-execution state parameter s4' and the post-execution state parameter s4; the initial world model is judged to be non-convergent according to the state loss function value; the model parameters of the initial world model are updated according to the state loss function value to obtain the updated world model.

[0121] The pre-execution state parameter s4 and the predicted action a4 are input into the updated world model for prediction processing to obtain the predicted post-execution state parameter s5'. The pre-execution state parameter s5 and the predicted action a5 are input into the updated world model for prediction processing to obtain the predicted post-execution state parameter s6'. The pre-execution state parameter s6 and the predicted action a6 are input into the updated world model for prediction processing to obtain the predicted post-execution state parameter s7'. The state loss function value is determined according to the predicted post-execution state parameter s5', post-execution state parameter s5, predicted post-execution state parameter s6', post-execution state parameter s6, predicted post-execution state parameter s7' and post-execution state parameter s7. The convergence of the updated world model is judged according to the state loss function value, and the updated world model is used as the world model.

[0122] Optionally, the method of determining the state loss function value based on the predicted post-execution state parameters and the post-execution state parameters can be set according to actual conditions. For example, the state loss function value can be determined based on the predicted post-execution state parameters and the post-execution state parameters through a square loss function or a logarithmic loss function. The embodiments of the present application are not limited here.

[0123] 103. Obtain a target trajectory and an initial decision model, wherein the target trajectory includes multiple trajectory data, and the initial decision model is used to predict the pending action to be performed by the robot device based on each input trajectory data and a first state parameter, wherein the first state parameter is a state parameter of the robot device before performing the pending action.

[0124] The target trajectory may be the initial trajectory mentioned above, or the target trajectory may be different from the initial trajectory mentioned above. When the target trajectory is the initial trajectory mentioned above, the first state parameter may be the pre-execution state parameter mentioned above.

[0125] The initial decision model refers to a network formed by interconnected neurons and used for trajectory tracking, and neurons can be understood as computing units. The type of the initial decision model can be set according to actual conditions. For example, the initial decision model can be a convolutional neural network model (CNN) or a recurrent neural network model (RNN), which is not limited in the embodiments of the present application.

[0126] The initial decision model is for current device parameters. When it is for historical device parameters of the robot device, the initial decision model can also be called the initial decision model after training for the historical device parameters.

[0127] 104. Input the first state parameter and the action to be executed into the world model to obtain the second state parameter that complies with the operation law of the robot device after the action to be executed is executed.

[0128] Since the world model has learned the operating rules of the robot device under the current device parameters, the accuracy of the action to be performed can be measured according to the second state parameter obtained through the world model. When the action to be performed is more accurate, the difference between the second state parameter and the target trajectory is smaller, and when the action to be performed is less accurate, the difference between the second state parameter and the target trajectory is larger.

[0129] In some embodiments, the process of predicting the to-be-executed action that the robot device needs to perform according to each input trajectory data and the first state parameter may be:

[0130] Extracting first trajectory data and a first state parameter corresponding to the first trajectory data from the plurality of trajectory data;

[0131] Inputting the first trajectory data and the first state parameter into the initial decision model for decision processing to obtain the pending action to be performed by the robot device;

[0132] After inputting the first state parameter and the action to be performed into the world model to obtain the second state parameter that meets the operation law of the robot device after performing the action to be performed, the method further includes:

[0133] taking second trajectory data adjacent to the first trajectory data and following the first trajectory data among the plurality of trajectory data as the first trajectory data, and taking the second state parameter as the first state data corresponding to the first trajectory data;

[0134] Return to execute the step of inputting the first trajectory data and the first state parameter into the initial decision model for decision processing to obtain the steps of the to-be-executed action that the robot device needs to execute until the multiple trajectory data are all input.

[0135] For example, the first state data is Si, and the first trajectory data is Ti+1. The first trajectory data Ti+1 and the first state parameter Si are input into the initial decision model for decision processing to obtain the action Ai to be executed that the robot device needs to execute. The first state parameter Si and the action Ai to be executed are input into the world model to obtain the second state parameter Pi+1. The second state parameter Pi+1 and the first trajectory data Ti+2 are input into the initial decision model for decision processing to obtain the action Ai+1 to be executed that the robot device needs to execute. The second state parameter Pi+1 and the action Ai+1 to be executed are input into the world model to obtain the second state parameter Pi+2. The process is stopped until multiple trajectory data are input into the initial decision model for decision processing.

[0136] 105. Train the initial decision model according to the second state parameter and the target trajectory, so that the trained initial decision model can output actions to be executed that conform to the operating rules of the robot device.

[0137] When the device parameters of the robot device change, after performing the same action for the same state parameters and the same trajectory data, the robot device is in a different state, resulting in a low accuracy of the trajectory tracking result of the robot device.

[0138] For example, when the device parameters of the robot device are d1, after executing action a1 for the state parameters s1 and trajectory data t1, the state parameters of the robot device are s2, and the accuracy of s2 is relatively high. When the device parameters of the robot device change from d1 to d2, after executing action a1 for the state parameters s1 and trajectory data t1, the state parameters of the robot device are s3. s3 and s2 are different, and the accuracy of s3 is relatively low.

[0139] Therefore, when the device parameters of the robot device change from historical device parameters to current device parameters, if the initial decision model is directly used to determine the action for a certain state parameter and a certain trajectory data, the accuracy of the obtained action is low, resulting in low trajectory tracking accuracy.

[0140] In the embodiment of the present application, since the world model has learned the operating rules of the robot device under the current device parameters, if the action to be executed is accurate, the difference between the second state parameter and the target trajectory is small; if the action to be executed is wrong, the difference between the second state parameter and the target trajectory is large. Therefore, when the device parameters of the robot device change from historical device parameters to current device parameters, the initial decision model is trained according to the second state parameter and the target trajectory. The trained initial decision model can output actions to be executed that conform to the operating rules of the robot device, thereby improving the accuracy of trajectory tracking of the robot device.

[0141] For example, the first state data is Si, and the first trajectory data is Ti+1. The first trajectory data Ti+1 and the first state parameter Si are input into the initial decision model for decision processing to obtain the action to be executed Ai that the robot device needs to execute. The first state parameter Si and the action to be executed Ai are input into the world model to obtain the second state parameter Pi+1. The second state parameter Pi+1 and the first trajectory data Ti+2 are input into the initial decision model for decision processing to obtain the action to be executed Ai+1 that the robot device needs to execute. The second state parameter Pi+1 and the action to be executed Ai+1 are input into the world model to obtain the second state parameter Pi+2. The initial decision model is trained according to the second state parameter Pi+1, the first trajectory data Ti+1, the second state parameter Pi+2 and the first trajectory data Ti+2.

[0142] In some embodiments, the process of training the initial decision model according to the second state parameter and the target trajectory may be:

[0143] Determine a loss function value according to the second state parameter and the target trajectory;

[0144] According to the loss function value, determine whether the initial decision model meets the convergence condition;

[0145] If the initial decision model meets the convergence condition, the initial decision model is determined as the trained initial decision model, so that the trained initial decision model can output the action to be executed that conforms to the operation law of the robot device;

[0146] If the initial decision model does not meet the convergence condition, the model parameters of the initial decision model are updated according to the loss function value, and the steps of the process of predicting the action to be performed by the robot device according to each input trajectory data and the first state parameter are returned.

[0147] For example, the first state data is Si, and the first trajectory data is Ti+1. The first trajectory data Ti+1 and the first state parameter Si are input into the initial decision model for decision processing to obtain the action to be executed Ai that the robot device needs to execute. The first state parameter Si and the action to be executed Ai are input into the world model to obtain the second state parameter Pi+1. The loss function value is determined according to the second state parameter Pi+1 and the first trajectory data Ti+1. According to the loss function value, it is judged that the initial decision model does not meet the convergence conditions. The model parameters of the initial decision model are updated according to the loss function value to obtain the updated decision model.

[0148] The second state parameter Pi+1 and the first trajectory data Ti+2 are input into the initial decision model for decision processing to obtain the action to be executed Ai+1 required by the robot device, and the second state parameter Pi+1 and the action to be executed Ai+1 are input into the world model to obtain the second state parameter Pi+2. The loss function value is determined according to the second state parameter Pi+2 and the first trajectory data Ti+2. According to the loss function value, it is judged that the updated decision model meets the convergence condition, and the updated decision model is determined as the initial decision model after training.

[0149] Optionally, the method of determining the loss function value according to the second state parameter and the target trajectory can be set according to actual conditions. For example, the loss function value can be determined according to the second state parameter and the target trajectory through a cross-entropy loss function or a mean square error loss function. This embodiment of the present application is not limited here.

[0150] In an embodiment of the present application, if the initial decision model does not meet the convergence conditions, what is returned for execution is the step of the process of predicting the action to be performed by the robot device based on each input trajectory data and the first state parameter. When the action to be performed by the robot device is predicted based on each input trajectory data and the first state parameter, including extracting the first trajectory data and the first state parameter corresponding to the first trajectory data from multiple trajectory data, what is returned for execution is the step of extracting the first trajectory data and the first state parameter corresponding to the first trajectory data from multiple trajectory data. Therefore, at this time, in the process of training the initial decision model, the world model is not retrained.

[0151] In some embodiments, the process of training the initial decision model according to the second state parameter and the target trajectory may be:

[0152] Determine a loss function value according to the second state parameter and the target trajectory;

[0153] According to the loss function value, determine whether the initial decision model meets the convergence condition;

[0154] If the initial decision model meets the convergence condition, the initial decision model is determined as the trained initial decision model, so that the trained initial decision model can output the action to be executed that conforms to the operation law of the robot device;

[0155] If the initial decision model does not meet the convergence condition, the model parameters of the initial decision model are updated according to the loss function value, and the step of obtaining the historical action data and historical state parameters corresponding to the robot device is returned.

[0156] Among them, since the returned execution is the step of obtaining the historical action data and historical state parameters corresponding to the robot device, the world model is also retrained during the training of the initial decision model.

[0157] In some embodiments, the process of determining the loss function value according to the second state parameter and the target trajectory may be:

[0158] Determining whether the quantity of the second state parameters meets a preset quantity condition;

[0159] If the quantity does not meet the preset quantity condition, returning to the step of extracting the first trajectory data and the first state parameter corresponding to the first trajectory data from the plurality of trajectory data;

[0160] If the quantity meets the preset quantity condition, the initial decision model is trained according to the second state parameter and the target trajectory.

[0161] The number of the second state parameters refers to the number of times the world model performs prediction processing based on the first state parameters and the action to be performed, which also refers to the number of cycles of decision processing based on the trajectory data and the first state parameters by the initial decision model.

[0162] For example, the first state parameter s1 and the trajectory data t1 are input into the initial decision model for decision processing to obtain the action to be executed a1, the first state parameter s1 and the action to be executed a1 are input into the world model for prediction processing to obtain the second state parameter s2'. At this time, the number of cycles is 1, which does not meet the preset quantity condition, the second state parameter s2' is input into the initial decision model as the first state parameter and the trajectory data t2 for prediction processing to obtain the action to be executed a2, the second state parameter s2' and the action to be executed a2 are input into the world model for prediction processing to obtain the second state parameter s3'. At this time, the number of cycles of the prediction processing is 2, which meets the preset quantity condition, and the initial decision model is trained according to the second state parameter s2', the trajectory data t1, the second state parameter s3' and the trajectory data t2 to obtain the trained initial decision model.

[0163] From the above content, it can be seen that in the embodiment of the present application, historical action data and historical state parameters corresponding to the robot device are obtained, wherein the historical action data include multiple actions executed by the robot device, and the historical state parameters include pre-execution state parameters and post-execution state parameters corresponding to the robot device in the process of executing multiple actions; multiple actions and the pre-execution state parameters corresponding to each action are used as model input, and the post-execution state parameters corresponding to each action are used as model output for model training to obtain a world model that characterizes the operating law of the robot device; a target trajectory and an initial decision model are obtained, wherein the target trajectory includes multiple trajectory data, and the initial decision model is used to predict the action to be executed by the robot device according to each input trajectory data and the first state parameter, wherein the first state parameter is The state parameters of the robot device before executing the action to be executed; the first state parameters and the action to be executed are input into the world model to obtain the second state parameters that conform to the operation law of the robot device after executing the action to be executed; the initial decision model is trained according to the second state parameters and the target trajectory, so that the trained initial decision model can output the action to be executed that conforms to the operation law of the robot device, and the operation law of the robot device under the current device parameters is learned through the world model, and then the initial decision model is trained through the world model, so that when the device parameters change, the initial decision model can be automatically trained to obtain a decision model that conforms to the operation law of the robot device under the current device parameters, without manually participating in the adjustment of the model parameters in the initial decision, thereby improving the efficiency of parameter adjustment.

[0164] According to the following Figure 2 , the trajectory tracking method provided by the present application is further described. In this embodiment, the initial trajectory is the same as the target trajectory, and the pre-execution state parameter is the same as the first state parameter.

[0165] 201. The robot device obtains a training instruction, and obtains a target trajectory according to the training instruction.

[0166] 202. When the robot device is under the current device parameters, the robot device inputs the pre-execution state parameters and the target trajectory into the initial decision model for decision processing, obtains multiple actions, and executes the multiple actions to obtain the post-execution state parameters.

[0167] The robot device may store multiple trajectory data, pre-execution state parameters, multiple actions and post-execution states in the target trajectory in the form of data tuples in a training data set, and the training data set may be called a replaybuffer module. Figure 3As shown, the initial decision model can be deployed in the policy module of the robot device. The pre-execution state parameter s, multiple trajectory data t, the second target state n_s and the target action a are collected through the policy module, and the pre-execution state parameter s, multiple trajectory data t, the post-execution state n_s and multiple actions a are sent to the replay buffer module. Through the replay buffer module, a data tuple (s, a, t, n_s) is generated according to the pre-execution state parameter s, multiple trajectory data t, the post-execution state n_s and multiple actions a.

[0168] 203. The robot device uses multiple actions and pre-execution state parameters corresponding to each action as model input, and post-execution state parameters corresponding to each action as model output to perform model training, so as to obtain a world model that characterizes the operation law of the robot device.

[0169] For example, Figure 3 As shown, the initial world model can be deployed in the world-model module of the robot device. Through the world-model module, the post-execution state parameters are predicted according to the pre-execution state parameters s and multiple actions t, and the initial world model is trained according to the predicted post-execution state parameters and the post-execution state parameter n_s.

[0170] 204. The robot device extracts first trajectory data and pre-execution state parameters corresponding to the first trajectory data from multiple trajectory data of the target trajectory, and inputs the first trajectory data and the first state parameters into the initial decision model for decision processing to obtain the to-be-executed action that the robot device needs to execute.

[0171] 205. The robot device inputs the pre-execution state parameters and the action to be executed into the world model, obtains the second state parameters that meet the operation rules of the robot device after executing the action to be executed, and determines whether the number of the second state parameters meets the preset number condition.

[0172] 206. If the quantity does not meet the preset quantity condition, the robot device uses the second trajectory data adjacent to the first trajectory data and after the first trajectory data among the multiple trajectory data as the first trajectory data, and uses the second state parameter as the pre-execution state parameter corresponding to the first trajectory data, and returns to execute the step of inputting the first trajectory data and the first state parameter into the initial decision model for decision processing to obtain the step of the action to be executed that the robot device needs to execute.

[0173] When the data is stored in the form of a data tuple, the second trajectory data following the first trajectory data can be obtained from the data tuple where the post-execution state parameter is used as the pre-execution state data.

[0174] For example, the first trajectory data is t1, the second trajectory data is t2, the state parameter before execution is s1, the multiple trajectory data are the first trajectory data t1, the multiple actions are a1, and the state parameter after execution is s2. When s1 is the state parameter before execution, the data tuple in which s1 is located is (s1, a1, t1, s2). At this time, s2 is the state parameter after execution. When s2 is the state parameter before execution, the multiple trajectory data are the second trajectory data t2, the multiple actions are a2, and the state parameter after execution is s3. When s2 is the state parameter before execution, the data tuple in which s2 is located is (s2, a2, t2, s3). If the quantity does not meet the preset quantity condition, the second trajectory data t2 can be obtained from (s2, a2, t2, s3).

[0175] When the quantity does not meet the preset quantity conditions, e.g. Figure 3 As shown, through the policy module, the pre-execution state parameter s and multiple trajectory data t are obtained from the replaybuffer module, and the action a' of the robot device is predicted based on the pre-execution state parameter s and the multiple trajectory data t. The pre-execution state parameter s and the predicted action a' are input into the world model for prediction processing to obtain the post-execution state parameter n_s', and the post-execution state parameter n_s' is returned to the policy module as the pre-execution state parameter, so that the policy module can continue to perform prediction processing based on the pre-execution state parameter n_s' and the multiple trajectory data.

[0176] 207. If the quantity meets the preset quantity condition, determine the loss function value according to the second state parameter and the target trajectory, and judge whether the initial decision model meets the convergence condition according to the loss function value.

[0177] 208. If the initial decision model meets the convergence condition, the initial decision model is determined as the trained initial decision model, so that the trained initial decision model can output the to-be-executed action that complies with the operation rules of the robot device.

[0178] 209. If the initial decision model does not meet the convergence condition, the model parameters of the initial decision model are updated according to the loss function value, and the process returns to step 202.

[0179] In an embodiment of the present application, the operating rules of the robot under the current device parameters are learned through the world model, and then the initial decision model is trained through the world model to obtain the trained initial decision model for the current device parameters, thereby automatically adjusting the model parameters in the initial decision model and improving the accuracy of trajectory tracking based on the trained initial decision model.

[0180] The specific implementation method and corresponding beneficial effects of this embodiment can be specifically referred to the above trajectory tracking method embodiment, and this embodiment will not be described in detail here.

[0181] According to the following Figure 4 , the application method of the model provided in this application is explained.

[0182] 401. The robot device obtains a target state and a trajectory to be tracked, and inputs the target state and the trajectory to be tracked into a trained initial decision model for prediction processing to obtain a first target action.

[0183] 402. The robot device executes a first target action to track a trajectory to be tracked.

[0184] For example, the target state includes the position state and the speed state. The robot device controls the arm, forearm and cabin of the robot device to track the trajectory. The motion trajectory of the arm, forearm and cabin of the robot device (the motion trajectory can be obtained according to the first target action) and the trajectory to be tracked can be as follows: Figure 5 As shown, Figure 5 The horizontal axis in the table indicates the number of times the robot device performs the first target action. Figure 5 The vertical coordinate of a represents the position of the upper arm, expressed in degrees. Figure 5 The vertical coordinate of b represents the position of the forearm, expressed in degrees. Figure 5 The vertical coordinate c represents the position of the cockpit, expressed in degrees. Figure 5 Where d represents the error between the motion trajectory and the trajectory to be tracked. Figure 5 The vertical axis of d in the equation represents the error value. Figure 5 It can be seen that the error between the motion trajectory of the robot's arm, forearm and cabin and the trajectory to be tracked is small, indicating that the first target action obtained by the trained initial decision model has a high accuracy.

[0185] In this embodiment, the operating rules of the robot device under the current device parameters are learned through the world model, and then the initial decision model is trained through the world model to obtain the trained initial decision model for the current device parameters, so as to automatically adjust the model parameters in the initial decision model and improve the accuracy of trajectory tracking according to the trained initial decision model.

[0186] In order to better implement the above method, the present application embodiment also provides a trajectory tracking device, which can be integrated into a robot device, such as Figure 6 As shown, the trajectory tracking device may include:

[0187] The first acquisition module 601 is used to obtain historical action data and historical state parameters corresponding to the robot device, wherein the historical action data includes multiple actions performed by the robot device, and the historical state parameters include pre-execution state parameters and post-execution state parameters corresponding to the robot device during the execution of multiple actions.

[0188] The first training module 602 is used to perform model training using multiple actions and pre-execution state parameters corresponding to each action as model input and post-execution state parameters corresponding to each action as model output to obtain a world model that characterizes the operating rules of the robot device.

[0189] The second acquisition module 603 is used to obtain the target trajectory and the initial decision model, wherein the target trajectory includes multiple trajectory data, and the initial decision model is used to predict the action to be performed by the robot device based on each input trajectory data and the first state parameter, wherein the first state parameter is the state parameter of the robot device before performing the action to be performed.

[0190] The parameter prediction module 604 is used to input the first state parameter and the action to be executed into the world model to obtain the second state parameter that meets the operation law of the robot device after executing the action to be executed.

[0191] The second training module 605 trains the initial decision model according to the second state parameter and the target trajectory, so that the trained initial decision model can output actions to be executed that conform to the operating rules of the robot device.

[0192] In some embodiments, the second acquisition module 603 is further configured to execute:

[0193] Extracting first trajectory data and a first state parameter corresponding to the first trajectory data from the plurality of trajectory data;

[0194] Inputting the first trajectory data and the first state parameter into the initial decision model for decision processing to obtain the pending action to be performed by the robot device;

[0195] taking second trajectory data adjacent to the first trajectory data and following the first trajectory data among the plurality of trajectory data as the first trajectory data, and taking the second state parameter as the first state data corresponding to the first trajectory data;

[0196] Return to execute the step of inputting the first trajectory data and the first state parameter into the initial decision model for decision processing to obtain the steps of the to-be-executed action that the robot device needs to execute until the multiple trajectory data are all input.

[0197] In some embodiments, the second training module 605 is specifically configured to perform:

[0198] Determine a loss function value according to the second state parameter and the target trajectory;

[0199] According to the loss function value, determine whether the initial decision model meets the convergence condition;

[0200] If the initial decision model meets the convergence condition, the initial decision model is determined as the trained initial decision model, so that the trained initial decision model can output the action to be executed that conforms to the operation law of the robot device;

[0201] If the initial decision model does not meet the convergence condition, the model parameters of the initial decision model are updated according to the loss function value, and the step of obtaining the historical action data and historical state parameters corresponding to the robot device is returned.

[0202] In some embodiments, the first acquisition module 601 is specifically used for:

[0203] Acquire an initial trajectory, where the initial trajectory includes multiple initial trajectory data;

[0204] Extracting first initial trajectory data and second initial trajectory data following the first initial trajectory data in the initial trajectory from the plurality of initial trajectory data;

[0205] Splicing the first initial trajectory data and the second initial trajectory data to obtain spliced ​​trajectory data;

[0206] The trajectory is tracked according to the spliced ​​trajectory data to obtain the historical motion data and historical state parameters corresponding to the robot device.

[0207] In some embodiments, the first acquisition module 601 is specifically used for:

[0208] Get training instructions;

[0209] According to the training instructions, the historical action data and historical state parameters corresponding to the robot device are obtained.

[0210] In some embodiments, the first acquisition module 601 is specifically used for:

[0211] Determine whether the device parameters of the robot device have changed;

[0212] If the device parameters of the robot device change, a training instruction is generated;

[0213] According to the training instructions, the initial trajectory is tracked to obtain the historical action data and historical state parameters of the robot device for the current device parameters.

[0214] In some embodiments, the first acquisition module 601 is specifically used for:

[0215] Get the preset trajectory;

[0216] The action of the robot device to track the preset trajectory is predicted through the initial decision model, and the predicted trajectory is determined based on the action;

[0217] If the difference between the predicted trajectory and the preset trajectory does not meet the preset difference condition, a training instruction is generated.

[0218] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation methods and corresponding beneficial effects of the above modules can be found in the previous method embodiments, which will not be repeated here.

[0219] Accordingly, the embodiment of the present application also provides a robot device, which can be a terminal, and the terminal can be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and other terminal devices. Figure 7 As shown, Figure 7 A schematic diagram of the structure of a robot device provided in an embodiment of the present application. The robot device 700 includes a processor 701 having one or more processing cores, a memory 702 having one or more computer-readable storage media, and a computer program stored in the memory 702 and executable on the processor. The processor 701 is electrically connected to the memory 702. Those skilled in the art will appreciate that the robot device structure shown in the figure does not constitute a limitation on the robot device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0220] Processor 701 is the control center of the robot device 700. It uses various interfaces and lines to connect various parts of the entire robot device 700, executes various functions of the robot device 700 and processes data by running or loading software programs and / or modules stored in the memory 702, and calling data stored in the memory 702, thereby monitoring the robot device 700 as a whole.

[0221] In the embodiment of the present application, the processor 701 in the robot device 700 will load instructions corresponding to the processes of one or more application programs into the memory 702 according to the following steps, and the processor 701 will run the application programs stored in the memory 702 to implement various functions, such as:

[0222] Acquire historical action data and historical state parameters corresponding to the robot device, wherein the historical action data includes multiple actions performed by the robot device, and the historical state parameters include pre-execution state parameters and post-execution state parameters corresponding to the robot device in the process of performing the multiple actions;

[0223] The model is trained by taking multiple actions and the pre-execution state parameters corresponding to each action as model input and the post-execution state parameters corresponding to each action as model output, so as to obtain a world model representing the operation law of the robot device;

[0224] Obtaining a target trajectory and an initial decision model, wherein the target trajectory includes a plurality of trajectory data, and the initial decision model is used to predict the to-be-executed action that the robot device needs to perform according to each input trajectory data and a first state parameter, wherein the first state parameter is a state parameter of the robot device before performing the to-be-executed action;

[0225] Inputting the first state parameter and the action to be performed into the world model, and obtaining the second state parameter that conforms to the operation law of the robot device after performing the action to be performed;

[0226] The initial decision model is trained according to the second state parameter and the target trajectory, so that the trained initial decision model can output actions to be executed that conform to the operating rules of the robot device.

[0227] The specific implementation methods and corresponding beneficial effects of the above operations can be found in the detailed description of the trajectory tracking method above, which will not be elaborated here.

[0228] Optional, such as Figure 7 As shown, the robot device 700 also includes: a touch screen 703, a radio frequency circuit 704, an audio circuit 705, an input unit 706 and a power supply 707. Among them, the processor 701 is electrically connected to the touch screen 703, the radio frequency circuit 704, the audio circuit 705, the input unit 706 and the power supply 707 respectively. Those skilled in the art can understand that Figure 7 The robot device structure shown in the figure does not constitute a limitation of the robot device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0229] The touch display screen 703 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 703 may include a display panel and a touch panel. Among them, the display panel may be used to display information input by the user or information provided to the user and various graphical user interfaces of the robot device, and these graphical user interfaces may be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel may be used to collect the user's touch operation on or near it (such as the user using any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 701, and can receive the command sent by the processor 701 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 701 to determine the type of touch event, and then the processor 701 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 703 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 703 can also be used as a part of the input unit 706 to realize the input function.

[0230] The radio frequency circuit 704 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other robotic devices through wireless communication, and to send and receive signals between the network device or other robotic devices.

[0231] The audio circuit 705 can be used to provide an audio interface between the user and the robot device through a speaker and a microphone. The audio circuit 705 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 705 and converted into audio data, and then the audio data is output to the processor 701 for processing, and then sent to another robot device through the radio frequency circuit 704, or the audio data is output to the memory 702 for further processing. The audio circuit 705 may also include an earplug jack to provide communication between an external headset and the robot device.

[0232] The input unit 706 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0233] The power supply 707 is used to supply power to various components of the robot device 700. Optionally, the power supply 707 can be logically connected to the processor 701 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 707 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0234] although Figure 7 Not shown, the robot device 700 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0235] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0236] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0237] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer program can be loaded by a processor to execute any trajectory tracking method provided in the embodiment of the present application. For example, the computer program can execute the following steps:

[0238] Acquire historical action data and historical state parameters corresponding to the robot device, wherein the historical action data includes multiple actions performed by the robot device, and the historical state parameters include pre-execution state parameters and post-execution state parameters corresponding to the robot device in the process of performing the multiple actions;

[0239] The model is trained by taking multiple actions and the pre-execution state parameters corresponding to each action as model input and the post-execution state parameters corresponding to each action as model output, so as to obtain a world model representing the operation law of the robot device;

[0240] Obtaining a target trajectory and an initial decision model, wherein the target trajectory includes a plurality of trajectory data, and the initial decision model is used to predict the to-be-executed action that the robot device needs to perform according to each input trajectory data and a first state parameter, wherein the first state parameter is a state parameter of the robot device before performing the to-be-executed action;

[0241] Inputting the first state parameter and the action to be performed into the world model, and obtaining the second state parameter that conforms to the operation law of the robot device after performing the action to be performed;

[0242] The initial decision model is trained according to the second state parameter and the target trajectory, so that the trained initial decision model can output actions to be executed that conform to the operating rules of the robot device.

[0243] The specific implementation methods and corresponding beneficial effects of the above operations can be found in the detailed description of the trajectory tracking method above, which will not be elaborated here.

[0244] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0245] Since the computer program stored in the computer-readable storage medium can execute any trajectory tracking method provided in the embodiments of the present application, the beneficial effects that can be achieved by any trajectory tracking method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0246] The above is a detailed introduction to a trajectory tracking method, device, robot equipment and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A trajectory tracking method, characterized in that: Applied to a robotic device, the method comprises: Acquire historical action data and historical state parameters corresponding to the robot device, wherein the historical action data includes multiple actions performed by the robot device, and the historical state parameters include pre-execution state parameters and post-execution state parameters corresponding to the robot device in the process of performing the multiple actions; The plurality of actions and the pre-execution state parameters corresponding to each action are used as model inputs, and the post-execution state parameters corresponding to each action are used as model outputs to perform model training, so as to obtain a world model representing the operation law of the robot device; Acquire a target trajectory and an initial decision model, wherein the target trajectory includes a plurality of trajectory data, and the initial decision model is used to predict the to-be-executed action to be performed by the robot device according to each input trajectory data and a first state parameter, wherein the first state parameter is a state parameter of the robot device before performing the to-be-executed action; Inputting the first state parameter and the action to be performed into the world model to obtain a second state parameter that complies with the operation law of the robot device after performing the action to be performed; The initial decision model is trained according to the second state parameter and the target trajectory, so that the trained initial decision model can output actions to be executed that conform to the operating rules of the robot device.

2. The trajectory tracking method according to claim 1, characterized in that: The method further comprises: Extracting first trajectory data and a first state parameter corresponding to the first trajectory data from the plurality of trajectory data; Inputting the first trajectory data and the first state parameter into the initial decision model for decision processing to obtain the pending action to be performed by the robot device; After inputting the first state parameter and the action to be performed into the world model to obtain a second state parameter that complies with the operation law of the robot device after performing the action to be performed, the method further includes: taking second trajectory data adjacent to the first trajectory data and subsequent to the first trajectory data among the plurality of trajectory data as the first trajectory data, and taking the second state parameter as the first state data corresponding to the first trajectory data; Return to the step of inputting the first trajectory data and the first state parameter into the initial decision model for decision processing to obtain the action to be executed by the robot device until the plurality of trajectory data are all input.

3. The trajectory tracking method according to claim 1, characterized in that: The training of the initial decision model according to the second state parameter and the target trajectory includes: Determining a loss function value according to the second state parameter and the target trajectory; According to the loss function value, determining whether the initial decision model meets the convergence condition; If the initial decision model satisfies the convergence condition, the initial decision model is determined as the trained initial decision model, so that the trained initial decision model can output an action to be executed that complies with the operation law of the robot device; If the initial decision model does not meet the convergence condition, the model parameters of the initial decision model are updated according to the loss function value, and the step of obtaining the historical action data and historical state parameters corresponding to the robot device is returned.

4. The trajectory tracking method according to claim 1, characterized in that: The obtaining of historical action data and historical state parameters corresponding to the robot device includes: Acquire an initial trajectory, wherein the initial trajectory includes a plurality of initial trajectory data; Extracting first initial trajectory data and second initial trajectory data following the first initial trajectory data in the initial trajectory from the plurality of initial trajectory data; Splicing the first initial trajectory data and the second initial trajectory data to obtain spliced ​​trajectory data; Trajectory tracking is performed according to the spliced ​​trajectory data to obtain historical action data and historical state parameters corresponding to the robot device.

5. The trajectory tracking method according to claim 1, characterized in that: The obtaining of historical action data and historical state parameters corresponding to the robot device includes: Get training instructions; According to the training instruction, historical action data and historical state parameters corresponding to the robot device are obtained.

6. The trajectory tracking method according to claim 5, characterized in that: The step of obtaining the training instruction and obtaining the historical action data and historical state parameters corresponding to the robot device according to the training instruction includes: Determining whether a device parameter of the robot device has changed; If the device parameters of the robot device change, generating a training instruction; According to the training instructions, the initial trajectory is tracked to obtain the historical action data and historical state parameters of the robot device for the current device parameters.

7. The trajectory tracking method according to claim 5, characterized in that: The obtaining of the training instruction comprises: Get the preset trajectory; Predicting the action of the robot device to track the preset trajectory through an initial decision model, and determining the predicted trajectory based on the action; If the difference between the predicted trajectory and the preset trajectory does not meet a preset difference condition, a training instruction is generated.

8. A trajectory tracking device, characterized in that: Applied to a robot device, the device comprises: A first acquisition module is used to acquire historical action data and historical state parameters corresponding to the robot device, wherein the historical action data includes multiple actions executed by the robot device, and the historical state parameters include pre-execution state parameters and post-execution state parameters corresponding to the robot device in the process of executing the multiple actions; A first training module is used to perform model training by using the plurality of actions and the pre-execution state parameters corresponding to each action as model input and the post-execution state parameters corresponding to each action as model output, so as to obtain a world model representing the operation law of the robot device; a second acquisition module, configured to acquire a target trajectory and an initial decision model, wherein the target trajectory includes a plurality of trajectory data, and the initial decision model is configured to predict the to-be-executed action to be performed by the robot device according to each input trajectory data and a first state parameter, wherein the first state parameter is a state parameter of the robot device before performing the to-be-executed action; A parameter prediction module, used for inputting the first state parameter and the action to be performed into the world model to obtain a second state parameter that meets the operation law of the robot device after performing the action to be performed; The second training module trains the initial decision model according to the second state parameter and the target trajectory, so that the trained initial decision model can output actions to be executed that conform to the operating rules of the robot device.

9. A robot device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the trajectory tracking method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the trajectory tracking method according to any one of claims 1 to 7.