Trajectory augmentation method and system for humanoid robot facing multi-stage continuous task
By using frequency domain modeling and distributed control for trajectory enhancement, the problems of insufficient high-frequency detail modeling and unstable training in multi-stage continuous tasks are solved, enabling humanoid robots to achieve high-precision trajectory prediction and stable execution in complex scenarios.
Patent Information
- Application Number
- CN202511631464.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-11-10
AI Technical Summary
Existing technologies struggle to effectively model high-frequency trajectory details in multi-stage continuous tasks, resulting in a lack of accuracy in action execution and unstable training. Furthermore, the loss function structure deviates from the actual task characteristics, making it difficult to form an effective closed-loop optimization path.
A trajectory enhancement method based on frequency domain modeling and distribution regulation is adopted. Key features are extracted through Fourier encoding, combined with an improved conditional variational autoencoder model, and attention mechanism and joint regularization term are introduced to construct a hierarchical latent space. The loss function is optimized to improve trajectory prediction accuracy and training stability.
It significantly improves the trajectory modeling accuracy and execution stability of humanoid robots in multi-stage continuous tasks, enhances the perception and expression of high-frequency disturbances and micro-movements, and improves the stability of training and modal alignment.
Smart Images

Figure CN121061910B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of robot intelligent control and imitation learning modeling, specifically involving a method and system for enhancing the trajectory of humanoid robots for multi-stage continuous tasks. Background Technology
[0002] In real-world scenarios where humanoid robots perform industrial tasks or complex imitation learning tasks, there are widespread multi-stage continuous trajectory execution tasks that require the continuous execution of multiple micro-movements, rely on image guidance, and maintain motion stability. For example, in tasks such as assembly line work, sorting and handling, and precise pose adjustment, robots typically need to execute stable and coherent trajectories within tens of seconds to several minutes, while continuously perceiving the external image environment to complete operations such as continuous assembly, picking and placing, or interference avoidance. Such tasks involve dense trajectory information, often including frequent detailed adjustments, high-frequency perturbations (such as gait switching and joint fine-tuning), and dynamic coupling between images and spatial positions, possessing the following three engineering characteristics: long motion span, dense dynamic changes, and strong modal correlation.
[0003] Current humanoid robot imitation learning systems face two significant bottlenecks when dealing with multi-stage continuous tasks: (1) High-frequency details of the trajectory cannot be modeled, resulting in a lack of accuracy in action execution. Most traditional trajectory prediction methods are based on multi-layer perceptrons (MLP) or temporal networks (such as LSTM, Long Short-Term Memory), which model the trajectory with time as the main axis. These methods are suitable for low-frequency, trend-based actions (such as robotic arm movement, temperature control, etc.), but they are weak in responding to complex actions with high-frequency disturbances (such as continuous steps, sudden changes in motors, etc.), and are prone to problems such as trajectory blurring and loss of micro-actions. (2) The loss function structure design is detached from the actual task characteristics, and training is prone to instability in multi-stage continuous tasks. Current mainstream architectures in imitation learning, such as Conditional Variational Autoencoders (CVAE), usually use KL divergence as a regularization term to constrain the distribution of latent variables. However, in scenarios with multimodal inputs (such as image-trajectory pairs) and long time spans, traditional KL terms, based on static prior modeling, cannot truly reflect the complex distribution changes between images and trajectories. Especially in multi-stage continuous tasks, where model capacity is large and training cycles are long, KL terms are prone to failure, leading to instability in the model training process and degradation of feature representation.
[0004] Furthermore, since trajectory training in multi-stage continuous tasks often requires preserving rich spatial details and dynamic patterns, existing methods lack a joint processing mechanism for loss functions and feature modeling, making it difficult to form an effective closed-loop optimization path. This causes robots to exhibit execution failures such as trajectory distortion, loss of micro-motions, or interruption of actions in long tasks, severely restricting the deployment capability of humanoid robots in complex scenarios.
[0005] Therefore, in the specific scenario of multi-stage continuous tasks, there is currently a lack of a systematic solution that can simultaneously take into account both the high-frequency detail representation of the trajectory and the alignment of the distribution structure between modes. This problem is not only a real pain point in engineering deployment, but also a technical barrier that existing methods are difficult to overcome. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention proposes a trajectory enhancement method and system for humanoid robots performing multi-stage continuous tasks. Specifically, it proposes a trajectory enhancement method that combines frequency domain modeling and distribution control for multi-stage continuous task scenarios. This serves as a practical solution for humanoid robot task implementation, aiming to solve problems such as insufficient trajectory prediction accuracy, unstable training, and lack of key detail representation in complex continuous motion scenarios. This method is applicable to humanoid robots performing long-duration, multi-stage, and highly dynamic imitation learning tasks, addressing the need for improved trajectory modeling and representation capabilities.
[0007] In a first aspect, the present invention provides a method for enhancing the trajectory of a humanoid robot for multi-stage continuous tasks, including:
[0008] Step S1: Acquire the real-time trajectory and real-time image sequence of the humanoid robot for a multi-stage continuous task;
[0009] Step S2: Extract key features from the real-time trajectory, perform Fourier encoding on the key features, and concatenate the encoded key features with the original trajectory to obtain the concatenated trajectory.
[0010] Step S3: Input the stitched trajectory and real-time image sequence into the pre-trained improved conditional variational autoencoder model to obtain the predicted trajectory of the humanoid robot. The construction process of the pre-trained improved conditional variational autoencoder model includes: constructing an encoder with an attention mechanism; dividing the latent space of the conditional variational autoencoder into multiple levels to obtain a hierarchical latent space; each level of the hierarchical latent space has latent variables encoded with image features and latent variables encoded with frequency domain trajectory; using the mean and variance of the image latent variables to characterize the features of each level of the hierarchical latent space; and constructing a loss function using reconstruction error and joint regularization term. The loss function is used to optimize the mean and variance of the image latent variables of each level.
[0011] The construction of an encoder with an attention mechanism involves dividing the latent space of the conditional variational autoencoder into multiple levels to obtain a hierarchical latent space, including:
[0012] The encoded image features and the spliced trajectory are encoded separately to obtain image feature encoding and frequency domain trajectory encoding;
[0013] An attention mechanism is used to add dynamic weights to image feature encoding and frequency domain trajectory encoding, resulting in the output of an encoder with an attention mechanism. The output of the encoder with an attention mechanism is then used as the input to the latent space of a conditional variational autoencoder.
[0014] The attention mechanism is used to add dynamic weights to image feature encoding and frequency domain trajectory encoding, resulting in the output of the encoder with the attention mechanism. The calculation formula is as follows:
[0015] ;
[0016] Where z is the output of the encoder with attention mechanism. For the dynamic weights of the self-attention mechanism, Encoding image features This is for frequency domain trajectory coding.
[0017] The process of determining the dynamic weights of the self-attention mechanism includes: inputting image feature encoding and frequency domain trajectory encoding into the attention module, calculating the attention weights, and using the attention weights as the dynamic weights of the self-attention mechanism.
[0018] The hierarchical latent space is calculated as follows:
[0019] ;
[0020] Among them, h encoder It is a hierarchical encoder. The latent variables after encoding image features For latent variables after frequency domain trajectory encoding, It is a hierarchical potential space.
[0021] The loss function is the sum of the reconstruction error and the joint regularization term;
[0022] The reconstruction error is the difference between the initial predicted trajectory and the actual trajectory of the humanoid robot;
[0023] The joint regularization term, used to constrain the distribution of latent variables, is calculated as follows:
[0024] ;
[0025] in, For joint regularization terms, It follows a standard normal distribution. Kullback-Leibler divergence is used to measure the difference between the joint distribution and the standard normal distribution. It is a joint distribution.
[0026] The joint distribution is calculated as follows:
[0027] ;
[0028] in, The distribution is joint, and N() is a Gaussian distribution. The latent variables after encoding image features, the encoding of image features in the latent space. Latent variables after frequency domain trajectory encoding The mean of the latent variables in the image. The variance of the latent variables in the image. The difference between the initial predicted trajectory and the actual trajectory of a humanoid robot. Let V be the variance of the differences between frequency domain trajectories. The parameters are learned, and the scale of the joint distribution is adjusted through training.
[0029] Secondly, the present invention also provides a trajectory enhancement system for humanoid robots performing multi-stage continuous tasks, comprising:
[0030] The data acquisition module is used to acquire the real-time trajectory and real-time image sequence of the humanoid robot for multi-stage continuous tasks;
[0031] The data conversion module is used to extract key features from the real-time trajectory, perform Fourier encoding on the key features, and concatenate the encoded key features with the original trajectory to obtain the concatenated trajectory.
[0032] The data prediction module is used to input the stitched trajectory and real-time image sequence into a pre-trained improved conditional variational autoencoder model to obtain the predicted trajectory of the humanoid robot. The construction process of the pre-trained improved conditional variational autoencoder model includes: constructing an encoder with an attention mechanism; dividing the latent space of the conditional variational autoencoder into multiple levels to obtain a hierarchical latent space; each level of the hierarchical latent space has an independent mean and variance of the image latent variables; and constructing a loss function using reconstruction error and a joint regularization term. The loss function is used to optimize the mean and variance of the image latent variables in each level.
[0033] Thirdly, this application proposes an electronic device comprising: one or more processors, and a memory for storing instructions that, when executed by the one or more processors, cause the one or more processors to perform the humanoid robot trajectory enhancement method for multi-stage continuous tasks.
[0034] Fourthly, this application proposes a computer-readable storage medium storing executable instructions that, when executed, cause a processor to perform the humanoid robot trajectory enhancement method for multi-stage continuous tasks.
[0035] Fifthly, this application proposes a computer program product, including a computer program or instructions that, when executed by a processor, implement the described humanoid robot trajectory enhancement method for multi-stage continuous tasks.
[0036] Beneficial effects:
[0037] This application proposes a method and system for enhancing the trajectory of humanoid robots for multi-stage continuous tasks. Addressing the difficulty of traditional neural networks in modeling high-frequency trajectory perturbations, this application introduces Fourier feature mapping at the input stage to encode key variables in the trajectory data (such as end-effector position, joint angles, and current) in the frequency domain and concatenate them with the original trajectory. This significantly improves the model's ability to perceive and represent complex trajectory patterns (such as micro-movements and high-speed changes). To address the issue that the KL divergence term in the CVAE structure cannot accurately represent the true distribution relationship between the image and trajectory, this application models the image encoding and trajectory difference as Gaussian distributions respectively, and constructs a joint distribution through multiplication as a new latent variable regularization term to replace the original KL term. This mechanism further introduces a scale adjustment factor to control the expression intensity of the joint distribution, effectively improving training stability and multimodal alignment. Attached Figure Description
[0038] Figure 1 Flowchart of a humanoid robot trajectory enhancement method for multi-stage continuous tasks according to an embodiment of the present invention;
[0039] Figure 2 A schematic diagram of the training of the pre-trained improved conditional variational autoencoder model according to an embodiment of the present invention;
[0040] Figure 3 Flowchart of a humanoid robot trajectory enhancement system for multi-stage continuous tasks according to an embodiment of the present invention. Detailed Implementation
[0041] The specific implementation methods of this application will be further described in detail below with reference to the accompanying drawings and embodiments.
[0042] Example 1:
[0043] This embodiment provides a trajectory enhancement method for humanoid robots performing multi-stage continuous tasks, such as... Figure 1 As shown, it includes:
[0044] Step S1: Acquire the real-time trajectory and real-time image sequence of the humanoid robot for a multi-stage continuous task;
[0045] In this embodiment, the real-time trajectory and real-time image sequence of the humanoid robot performing a multi-stage continuous task are acquired, and the real-time trajectory and real-time image sequence are normalized, time-aligned, and paired.
[0046] In this embodiment, real-time trajectories and real-time image sequences are acquired from tasks characterized by long action spans, dense dynamic changes, and strong modal correlations. Long action spans refer to a time interval from the first action to the last action exceeding a preset time threshold, typically ranging from 30 seconds to 5 minutes, adjustable depending on the task type. Dense dynamic changes mean that the robot performs actions with a high frequency of changes per unit time, but the number of changes per unit time is less than a preset threshold, for example, 2 to 10 times per second, depending on task complexity. Strong modal correlations mean that any two adjacent actions are highly correlated, with interdependent state changes between actions, and a correlation degree ranging from 80% to 95%.
[0047] The real-time image sequence can be derived from visual sensors, RGB-D cameras, etc., and the real-time trajectory includes: joint angles, motor current, low-frequency signals or high-frequency signals of position changes.
[0048] Step S2: Extract key features from the real-time trajectory, perform Fourier encoding on the key features, and concatenate the encoded key features with the original trajectory to obtain the concatenated trajectory.
[0049] In this embodiment, key features are extracted from the real-time trajectory processed in step S1. These key features include: end-effector position, joint angle, and current. Fourier encoding is performed on these key features, mapping them from a time-domain representation to a frequency-domain representation. This mapping is then concatenated with the original trajectory to form an enhanced input, improving the model's ability to express high-frequency disturbances and micro-motion features.
[0050] To address the limitations of traditional trajectory modeling methods in terms of expressive power and prediction accuracy when handling high-frequency disturbance data (such as current fluctuations and micro-motion adjustments), this embodiment introduces Fourier transform to map the original trajectory sequence from the time domain to the frequency domain. This method preserves the dominant frequency component and high-frequency detail components in the frequency domain and concatenates them with the original trajectory vector as input to the pre-trained model. This enhances the neural network's ability to model rapidly changing trajectory patterns, and through the frequency domain feature enhancement mechanism, improves the model's prediction accuracy for details.
[0051] Step S3: Input the stitched trajectory and real-time image sequence into the pre-trained improved conditional variational autoencoder model to obtain the predicted trajectory of the humanoid robot. The construction process of the pre-trained improved conditional variational autoencoder model includes: constructing an encoder with an attention mechanism, each layer of the hierarchical latent space having an independent mean and variance of the image latent variables, dividing the latent space of the conditional variational autoencoder into multiple layers to obtain a hierarchical latent space, and constructing a loss function using reconstruction error and joint regularization term. The loss function is used to optimize the mean and variance of the image latent variables in each layer.
[0052] First, before training the improved conditional variational autoencoder model, it is necessary to obtain the historical trajectory and historical image sequence of the humanoid robot for multi-stage continuous tasks according to steps S1-S2, thereby obtaining training samples. The training process is as follows: Figure 2 As shown in the figure, this embodiment will not be described in detail.
[0053] In this embodiment, the core training yields an accurate improved conditional variational autoencoder model. The model is based on a conditional variational autoencoder (CVAE), using image features as conditional input to construct a latent space and generate trajectories, thus completing the modeling process of action sequences under complex task conditions.
[0054] Traditional conditional variational autoencoder (CDAE) architectures include an encoder, a latent variable extractor, and a decoder. In this embodiment, the encoder employs an attention-based mechanism, and the latent variable extractor uses a hierarchical latent space. Image features are extracted by the image encoder and used as conditional inputs, while trajectory features are enhanced in the frequency domain and processed by the trajectory encoder. Both jointly participate in trajectory prediction modeling within the latent space. Specifically, image features are represented as 512-dimensional vectors extracted by a ResNet network, and trajectory features are multi-dimensional sequences containing position, velocity, and current channels, with each input segment being 100 frames long. Finally, these two types of features are concatenated at the input of a pre-trained improved CDAE model in a [image condition | frequency domain trajectory] structure. This embodiment further generates a predicted output for future trajectory point sequences through joint training using reconstruction error and latent variable constraints.
[0055] Specifically, traditional Conditional Variational Autoencoder (CVAE) models map image and trajectory features to a latent space for modeling. This embodiment proposes a hierarchical latent space, dividing the latent space into multiple levels. In this embodiment, the latent space output by the encoder is divided according to different levels of abstraction. For example, low-level latent variables mainly represent local and high-frequency details (position, velocity, current perturbation, etc.), while high-level latent variables represent overall task trends and long-term dependencies (overall trajectory shape, staged action intentions). The latent variables at each level are generated and learned recursively to capture multi-level features in the task. The latent space structure is improved by setting multiple hierarchical latent variables, each with its own mean and variance of image latent variables to characterize the feature distribution of that level. The latent variables at each level can be gradually adjusted during model training, providing a more refined expression for high-dimensional data. The distribution parameters of each layer's latent variables are obtained through end-to-end training. The distribution parameters of each layer's latent variables are obtained through joint optimization iterative learning of reconstruction error and regularization term (joint distribution KL loss).
[0056] In traditional conditional variational autoencoder (CVAE) models, the latent variable z is derived from the conditional distribution. The sampling is done in the middle. The hierarchical encoder generates latent variables recursively, and the latent variables of each layer affect the generation of subsequent layers.
[0057] The hierarchical latent space is calculated as follows:
[0058] ;
[0059] Among them, h encoder It is a hierarchical encoder. The latent variables after encoding image features These are the latent variables after frequency domain trajectory encoding.
[0060] In traditional Conditional Variational Autoencoder (CVAE) models, image features and trajectory features are mapped through an encoder. This embodiment introduces a self-attention mechanism, which dynamically adjusts the weights of different input features, enabling the model to focus more on key features during task modeling and enhancing its performance in complex tasks. The self-attention mechanism can effectively identify and capture subtle changes in images and trajectories, improving the modeling ability for high-frequency perturbations and micro-motions.
[0061] To enhance the model's attention to input features, the self-attention mechanism dynamically adjusts the weights based on the importance of each feature.
[0062] The attention mechanism is used to add dynamic weights to image feature encoding and frequency domain trajectory encoding, resulting in the output of the encoder with the attention mechanism. The calculation formula is as follows:
[0063] ;
[0064] Where z is the output of the encoder with attention mechanism. For the dynamic weights of the self-attention mechanism, Encoding image features For frequency domain trajectory encoding, the determination of the dynamic weights includes: inputting the image feature encoding and frequency domain trajectory encoding into the attention module, calculating the attention weights as the dynamic weights of the self-attention mechanism, and then weighting and fusing the corresponding encodings accordingly to obtain the encoder output with the attention mechanism.
[0065] This embodiment constructs a loss function using reconstruction error and a joint regularization term. The specific process includes: modeling the historical image encoding and historical trajectory encoding as two Gaussian distributions, where the historical trajectory encoding corresponds to the difference distribution between the model-predicted trajectory and the actual trajectory, equivalent to the latent variable error distribution expressed by the original KL term. In this embodiment, after flattening the image encoding to a consistent dimension, a distribution product operation is performed with the trajectory difference distribution to obtain a joint normal distribution, which replaces the traditional KL divergence term. This joint distribution is further multiplied by a regulation factor to constrain the scale variation of the joint distribution, preventing it from deviating from the task feature space, thereby enhancing the stability of the distribution constraint and the modality fusion capability. Specifically, the following steps are included:
[0066] 1. Gaussian distribution modeling for historical image coding and historical trajectory coding:
[0067] First, there is historical image encoding. and historical trajectory encoding Where x is the image feature input and y is the trajectory feature input. and These are the latent variables of the image and trajectory (i.e., the encoding of the latent space). ( ) represents the encoding of historical images. ( ) represents the historical trajectory encoding.
[0068] Historical image encoding q image (z img |x) and historical trajectory encoding q traj (z traj |y) all follow a Gaussian distribution:
[0069] ;
[0070] ;
[0071] in, , Represents the mean and variance of the latent variables in the image. , This represents the mean and variance of the latent variables of the trajectory.
[0072] 2. Trajectory Difference Distribution:
[0073] Secondly, the difference distribution of the trajectory is modeled by calculating the difference between the trajectory code and the predicted trajectory. Assume the trajectory predicted by the model is... Then the differential distribution This can be expressed as:
[0074] ;
[0075] in, This represents the difference between the model-predicted trajectory and the actual trajectory. The variance representing the differences in trajectories. ( ) represents a differential distribution.
[0076] 3. Joint distribution structure:
[0077] Next, a joint distribution is constructed from the image encoding and trajectory difference distribution through distribution product. The joint distribution can be expressed as:
[0078] ;
[0079] The specific form is as follows:
[0080] ;
[0081] 4. Regulatory factors and scale constraints:
[0082] To prevent changes in the scale of the joint distribution, the regulatory factor This factor is introduced to adjust the scale of the joint distribution to ensure it does not deviate from the task feature space. The final joint distribution has a regulating factor. :
[0083] ;
[0084] in, It is a learnable parameter that adjusts the scale of the joint distribution through training.
[0085] 5. Regularization term to replace KL divergence:
[0086] Traditional CVAE uses KL divergence as a regularization term for latent variables. This invention replaces the original KL divergence with the KL divergence of the joint distribution. The new regularization term (joint regularization term) is then introduced. The calculation is as follows:
[0087] ;
[0088] in, It is a standard normal distribution. This represents the Kullback-Leibler divergence, which measures the difference between the joint distribution and the standard normal distribution.
[0089] 6. Final loss function:
[0090] Final loss function It combines reconstruction error and joint regularization term:
[0091] ;
[0092] in, It is the reconstruction error, representing the difference between the trajectory generated by the model and the actual trajectory. It is a joint regularization term used to constrain the distribution of latent variables.
[0093] In terms of loss construction, this embodiment does not use the traditional KL divergence as a latent variable constraint method. Instead, it constructs image feature distribution and trajectory feature distribution, modeling both as normal distributions. The system calculates the product of the two distributions to form a new joint distribution expression, and reconstructs the loss term based on this joint distribution to measure the distributional difference between the predicted trajectory and the target trajectory. Specifically, the image distribution and trajectory difference distribution are projected as Gaussian distributions by the image encoder and trajectory encoder, respectively, and are represented by the mean μ and variance σ². This embodiment flattens the image distribution to the same dimension as the trajectory distribution, constructs a joint distribution through dimension-wise multiplication, and uses it as a new regularization term to replace the original KL divergence structure in CVAE, further guiding the semantic alignment and modality fusion of latent variables.
[0094] The image distribution is flattened to the same dimension as the trajectory distribution, and the calculation formula is as follows:
[0095] ;
[0096] in, The image is after the distribution has been flattened. For the distribution flattening operation, d represents the image before flattening, and d represents the length of the image after flattening. =The original three-dimensional dimensions of the image features (height × width × number of channels), after being flattened, are a one-dimensional vector with length... .
[0097] Compared to the static KL divergence term, this method more closely resembles the distributional coupling between images and actions in imitation learning, which helps enhance training stability and feature representation continuity. To improve constraint flexibility, the system introduces a scale adjustment parameter to dynamically adjust the joint distribution, preventing loss overfitting or feature imbalance, making it suitable for training needs with large model capacity in long-term tasks.
[0098] Joint optimization based on reconstruction loss and joint distribution loss term supports end-to-end training process. Finally, the improved conditional variational autoencoder model is deployed. The real-time trajectory and real-time image sequence of the humanoid robot for multi-stage continuous tasks are processed in steps S1-S2 and then input into the improved conditional variational autoencoder model to quickly infer and generate complete trajectory, achieving robust execution of multi-stage continuous tasks.
[0099] It is understood that this embodiment employs an end-to-end training strategy, incorporating frequency domain feature enhancement and distribution reconstruction mechanisms into a unified modeling framework. During training, the reconstruction error and distribution difference term are jointly optimized to ensure that the system can capture local dynamic details while possessing long-term sequence modeling capabilities. After model training is complete, it can be deployed on a humanoid robot platform, supporting real-time trajectory reasoning and motion generation guided by images.
[0100] In specific task applications, the system has been applied to typical industrial and semi-structured tasks such as long sequence assembly, partitioned material handling, and multi-stage motion generation, demonstrating robust adaptability to complex task states.
[0101] Compared to traditional methods, the trajectory enhancement method proposed in this embodiment effectively alleviates the problem of traditional neural networks' insensitivity to high-frequency trajectories, significantly improving the trajectory modeling accuracy and execution stability of humanoid robots in multi-stage continuous complex tasks. In the experimental evaluation, five typical imitation learning task scenarios were selected, covering various types of multi-stage continuous tasks such as assembly, walking, and grasping. The performance of the proposed method and traditional baseline methods in terms of execution success rate was compared and evaluated. Experimental results show that the proposed method achieves significant performance improvements in all tasks, as shown in Table 1:
[0102] Table 1: Comparison of Experimental Evaluations;
[0103] ;
[0104] The task success rate in Table 1 is the average of three independent repeated trials, 100 trials per round (300 trials per task in total). Each of the three rounds used an independent random initialization sequence (e.g., initial pose, perturbation, and noise sampling), and the results are rounded to one decimal place. The baseline method is standard CVAE without frequency domain enhancement and distributed modulation mechanisms.
[0105] To verify the modeling effectiveness of this embodiment in multi-stage continuous tasks, a complete experimental process covering task modeling, trajectory acquisition, Fourier feature encoding, model training, and performance evaluation was designed and conducted, targeting three indicators: trajectory continuity, high-frequency feature preservation, and cross-modal distribution alignment capability. The results show that the proposed method outperforms the baseline model without enhancement mechanisms in multiple task scenarios, demonstrating significant advantages in trajectory prediction accuracy, motion reconstruction stability, and training convergence efficiency. This verifies the feasibility and widespread application value of this invention in robot trajectory enhancement tasks.
[0106] Example 2:
[0107] This embodiment also provides a trajectory enhancement system for humanoid robots performing multi-stage continuous tasks, such as... Figure 3 As shown, it includes: a data acquisition module, a data conversion module, a data encoding module, and a data prediction module;
[0108] The data acquisition module, data conversion module, data encoding module, and data prediction module are connected in sequence.
[0109] The data acquisition module is used to acquire the real-time trajectory and real-time image sequence of the humanoid robot for multi-stage continuous tasks;
[0110] The data conversion module is used to extract key features from the real-time trajectory, perform Fourier encoding on the key features, and concatenate the encoded key features with the original trajectory to obtain the concatenated trajectory.
[0111] The data prediction module is used to input the stitched trajectory and real-time image sequence into a pre-trained improved conditional variational autoencoder model to obtain the predicted trajectory of the humanoid robot. The construction process of the pre-trained improved conditional variational autoencoder model includes: constructing an encoder with an attention mechanism, dividing the latent space of the conditional variational autoencoder into multiple levels to obtain a hierarchical latent space, and constructing a loss function using reconstruction error and joint regularization term.
[0112] The training process of the pre-trained improved conditional variational autoencoder model includes:
[0113] The input processing module is used to acquire the historical trajectory and historical image sequence of the humanoid robot for multi-stage continuous tasks;
[0114] The frequency domain feature transformation module is used to extract key features from historical trajectories, perform Fourier encoding on the key features, and concatenate the encoded key features with the historical trajectories to obtain the concatenated trajectory.
[0115] The imitation learning modeling module is used to extract image features from historical image sequences. It uses an encoder with an attention mechanism to encode the image features and the splicing trajectory. The encoded result is used as the input to the hierarchical latent space, and the input of the hierarchical latent space is used as the input to the decoder. The output of the decoder is the output of the imitation learning modeling module. The hierarchical latent space construction process includes: dividing the latent space of the conditional variational autoencoder into multiple levels to obtain the hierarchical latent space.
[0116] The joint distributed reconstruction and loss optimization module takes the output of the decoder as its input, constructs a loss function using the reconstruction error and joint regularization term, and optimizes the input of the joint distributed reconstruction and loss optimization module. After optimization, a pre-trained improved conditional variational autoencoder model is obtained.
[0117] The training and deployment module is used to deploy pre-trained improved conditional variational autoencoder models.
[0118] Example 3:
[0119] This embodiment proposes an electronic device, including: one or more processors, and a memory for storing instructions, which, when executed by the one or more processors, cause the one or more processors to perform the humanoid robot trajectory enhancement method for multi-stage continuous tasks.
[0120] The electronic device may be a mobile phone, computer, or tablet computer, etc., and includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements the humanoid robot trajectory enhancement method for multi-stage continuous tasks as described in the embodiments. It is understood that the electronic device may also include an input / output (I / O) interface and communication components.
[0121] The processor is used to execute all or part of the steps in the humanoid robot trajectory enhancement method for multi-stage continuous tasks as described in the above embodiments. The memory is used to store various types of data, which may include, for example, instructions for any application or method in an electronic device, as well as application-related data.
[0122] The processor can be implemented as an Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor, or other electronic components, and is used to execute the humanoid robot trajectory enhancement method for multi-stage continuous tasks described in the above embodiments.
[0123] Example 4:
[0124] This embodiment proposes a computer-readable storage medium that stores executable instructions. When these instructions are executed, if they are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
[0125] The computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the humanoid robot trajectory enhancement method for multi-stage continuous tasks described in the various embodiments of this application.
[0126] The aforementioned storage media include: flash memory, hard disk, multimedia card, card-type memory (e.g., SD (Secure Digital Memory Card) or DX (Memory Data Register, MDR) memory), random access memory (RAM), static random-access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, disk, optical disk, server, APP (Application) application store, and other media capable of storing program verification codes. These media store computer programs, which, when executed by a processor, can implement the various steps of the humanoid robot trajectory enhancement method for multi-stage continuous tasks described above.
[0127] Example 5:
[0128] This embodiment proposes a computer program product, including a computer program or instructions, which, when executed by a processor, implements the aforementioned humanoid robot trajectory enhancement method for multi-stage continuous tasks.
[0129] Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a computer program product.
[0130] The various embodiments in this application are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0131] The scope of protection of this application is not limited to the embodiments described above. Obviously, those skilled in the art can make various modifications and variations to this disclosure without departing from the scope and spirit of this disclosure. If such modifications and variations fall within the scope of equivalent technology of this disclosure, then the intent of this disclosure also includes such modifications and variations.
Claims
1. A method for enhancing the trajectory of a humanoid robot for multi-stage continuous tasks, characterized in that, include: Step S1: Acquire the real-time trajectory and real-time image sequence of the humanoid robot for a multi-stage continuous task; Step S2: Extract key features from the real-time trajectory, perform Fourier encoding on the key features, and concatenate the encoded key features with the original trajectory to obtain the concatenated trajectory. Step S3: Input the stitched trajectory and real-time image sequence into the pre-trained improved conditional variational autoencoder model to obtain the predicted trajectory of the humanoid robot. The construction process of the pre-trained improved conditional variational autoencoder model includes: constructing an encoder with an attention mechanism; dividing the latent space of the conditional variational autoencoder into multiple levels to obtain a hierarchical latent space; each level of the hierarchical latent space has latent variables encoded by image features and latent variables encoded by frequency domain trajectory; using the mean and variance of the image latent variables to characterize the features of each level of the hierarchical latent space; and constructing a loss function using reconstruction error and joint regularization term. The loss function is used to optimize the mean and variance of the image latent variables of each level. The loss function is the sum of the reconstruction error and the joint regularization term; the reconstruction error is the difference between the initial predicted trajectory and the actual trajectory of the humanoid robot. The joint regularization term, used to constrain the distribution of latent variables, is calculated as follows: ; in, For joint regularization terms, It follows a standard normal distribution. Kullback-Leibler divergence is used to measure the difference between the joint distribution and the standard normal distribution. It is a joint distribution; The joint distribution is calculated as follows: ; in, The distribution is joint, and N() is a Gaussian distribution. The latent variables after encoding image features, the encoding of image features in the latent space. Latent variables after frequency domain trajectory encoding The mean of the latent variables in the image. The variance of the latent variables in the image. The difference between the initial predicted trajectory and the actual trajectory of a humanoid robot. Let V be the variance of the differences between frequency domain trajectories. The parameters are learned, and the scale of the joint distribution is adjusted through training.
2. The trajectory enhancement method for humanoid robots for multi-stage continuous tasks according to claim 1, characterized in that, The construction of an encoder with an attention mechanism involves dividing the latent space of the conditional variational autoencoder into multiple levels to obtain a hierarchical latent space, including: The encoded image features and the spliced trajectory are encoded separately to obtain image feature encoding and frequency domain trajectory encoding; An attention mechanism is used to add dynamic weights to image feature encoding and frequency domain trajectory encoding, resulting in the output of an encoder with an attention mechanism. The output of the encoder with an attention mechanism is then used as the input to the latent space of a conditional variational autoencoder.
3. The trajectory enhancement method for humanoid robots for multi-stage continuous tasks according to claim 2, characterized in that, The attention mechanism is used to add dynamic weights to image feature encoding and frequency domain trajectory encoding, resulting in the output of the encoder with the attention mechanism. The calculation formula is as follows: ; Where z is the output of the encoder with attention mechanism. For the dynamic weights of the self-attention mechanism, Encoding image features This is for frequency domain trajectory coding.
4. The trajectory enhancement method for humanoid robots for multi-stage continuous tasks according to claim 3, characterized in that, The process of determining the dynamic weights of the self-attention mechanism includes: inputting image feature encoding and frequency domain trajectory encoding into the attention module, calculating the attention weights, and using the attention weights as the dynamic weights of the self-attention mechanism.
5. The trajectory enhancement method for humanoid robots for multi-stage continuous tasks according to claim 1, characterized in that, The hierarchical latent space is calculated as follows: ; Among them, h encoder It is a hierarchical encoder. The latent variables after encoding image features For latent variables after frequency domain trajectory encoding, It is a hierarchical potential space.
6. A trajectory enhancement system for humanoid robots performing multi-stage continuous tasks, characterized in that: include: The data acquisition module is used to acquire the real-time trajectory and real-time image sequence of the humanoid robot for multi-stage continuous tasks; The data conversion module is used to extract key features from the real-time trajectory, perform Fourier encoding on the key features, and concatenate the encoded key features with the original trajectory to obtain the concatenated trajectory. The data prediction module is used to input the stitched trajectory and real-time image sequence into a pre-trained improved conditional variational autoencoder model to obtain the predicted trajectory of the humanoid robot. The construction process of the pre-trained improved conditional variational autoencoder model includes: constructing an encoder with an attention mechanism; dividing the latent space of the conditional variational autoencoder into multiple levels to obtain a hierarchical latent space; each level of the hierarchical latent space has an independent mean and variance of the image latent variables; and constructing a loss function using reconstruction error and joint regularization term. The loss function is used to optimize the mean and variance of the image latent variables of each level. The loss function is the sum of the reconstruction error and the joint regularization term; the reconstruction error is the difference between the initial predicted trajectory and the actual trajectory of the humanoid robot. The joint regularization term, used to constrain the distribution of latent variables, is calculated as follows: ; in, For joint regularization terms, It follows a standard normal distribution. Kullback-Leibler divergence is used to measure the difference between the joint distribution and the standard normal distribution. It is a joint distribution; The joint distribution is calculated as follows: ; in, The distribution is joint, and N() is a Gaussian distribution. The latent variables after encoding image features, the encoding of image features in the latent space. Latent variables after frequency domain trajectory encoding The mean of the latent variables in the image. The variance of the latent variables in the image. The difference between the initial predicted trajectory and the actual trajectory of a humanoid robot. Let V be the variance of the differences between frequency domain trajectories. The parameters are learned, and the scale of the joint distribution is adjusted through training.
7. An electronic device, characterized in that, include: One or more processors, and a memory for storing instructions that, when executed by the one or more processors, cause the one or more processors to perform the humanoid robot trajectory enhancement method for multi-stage continuous tasks as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, It stores executable instructions that, when executed, cause the processor to perform the humanoid robot trajectory enhancement method for multi-stage continuous tasks as described in any one of claims 1 to 5.
9. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the humanoid robot trajectory enhancement method for multi-stage continuous tasks as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Humanoid robot adaptive control method and system, electronic equipment and storage medium
CN119820582A
Conditional variation auto-encoder generative adversarial network fault diagnosis method
CN120030280A