Robot action diffusion method, electronic device, storage medium, and program product
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG GEELY HLDG GRP CO LTD
- Filing Date
- 2026-01-22
- Publication Date
- 2026-06-02
Smart Images

Figure CN121572329B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robot imitation learning technology, and in particular to a robot motion diffusion method, electronic device, storage medium, and program product. Background Technology
[0002] Diffusion Transformer (DiT) is one of the mainstream denoising network architectures. Thanks to the combined effect of its core attention mechanisms, Self-Attention and Cross-Attention, DiT outperforms the traditional U-Net architecture in global action sequence modeling, multimodal conditional control, and high-dimensional action space optimization, making it an important technical direction for diffusion strategy research.
[0003] In the field of robot imitation learning, although diffusion strategies based on the DiT architecture have many advantages, the traditional Transformer's Cross-Attention mechanism requires each query vector to be matched with all key vectors. This computational mode leads to a rapid increase in the computational load and memory consumption of the machine learning model when the input action sequence is long or the observation dimension is high. This not only generates a large amount of redundant information interaction, thus increasing hardware resource consumption, but also severely limits the deployment and implementation of the model in large-scale input scenarios and real-time application scenarios with stringent requirements for response speed. Summary of the Invention
[0004] The main purpose of this application is to propose a robot action diffusion method, electronic device, storage medium, and program product, which aims to reduce the computational complexity of action diffusion in robot imitation learning, thereby avoiding a large amount of redundant information interaction, reducing hardware resource consumption, and promoting the deployment and implementation of machine learning models.
[0005] To achieve the above objectives, the first aspect of this application proposes a robot motion diffusion method, the method comprising:
[0006] Obtain the robot's action query vector; the action query vector is a feature vector used in robot imitation learning to perform action diffusion processing on the robot.
[0007] Based on a preset diffusion converter, the motion query vector is predicted from some key sampling points in the robot's visual features.
[0008] The action query vector is matched with the partial key sampling points to perform action diffusion processing on the robot, thereby obtaining the robot's executable action sequence.
[0009] In some embodiments, the diffusion converter is a diffusion converter based on a deformable attention mechanism; the diffusion converter includes a first learning module and a second learning module;
[0010] The preset diffusion converter predicts a subset of key sampling points of the action query vector in the robot's visual features, including:
[0011] The first learning module predicts the reference sampling point and the position offset of the reference sampling point in the visual feature of the action query vector, and the second learning module predicts the sampling point attention weight corresponding to the position offset; the partial key sampling point includes the reference sampling point.
[0012] In some embodiments, the method further includes:
[0013] Obtain diffusion training sample data;
[0014] The diffusion training sample data is subjected to conditional encoding to obtain training action query vectors and training visual features;
[0015] The initial diffusion converter is subjected to forward prediction training based on the training action query vector and the training visual features to obtain the trained diffusion converter. During forward prediction training, the diffusion converter predicts some sampling points of the training action query vector in the training visual features based on the deformable attention mechanism, and optimizes the parameters based on minimizing the mean square error.
[0016] In some embodiments, obtaining the diffusion training sample data includes:
[0017] Obtain the robot's executable clean action sequence, as well as the random sampling diffusion parameters and noise scheduling parameters;
[0018] Based on a preset denoising diffusion probability model, the executable clean action sequence, the random sampling diffusion parameters, and the noise scheduling parameters are denoised to obtain diffusion training sample data.
[0019] In some embodiments, matching the action query vector with the partial key sampling points to perform action diffusion processing on the robot includes:
[0020] Predictive noise is generated based on the action query vector and the key sampling points.
[0021] The visual motion fusion features of the robot are denoised based on the predicted noise to generate an executable motion sequence of the robot; the visual motion fusion features are obtained by residual concatenation of the motion query vector and the key vectors corresponding to the partial key sampling points.
[0022] In some embodiments, obtaining the robot's action query vector includes:
[0023] Obtain the motion diffusion driving features of the robot; the driving features include at least the robot's first-dimensional ontological state features and the indication features for performing motion diffusion processing on the robot;
[0024] The ontology state features and the indicator features are respectively subjected to feature space transformation processing to obtain the target ontology state features and target indicator features of the second dimension; the second dimension is adapted to the input feature dimension of the deformable attention mechanism of the diffusion converter, and the second dimension is higher than the first dimension;
[0025] The target body state features and the target indication features are concatenated to obtain the robot's action query vector.
[0026] In some embodiments, the method further includes:
[0027] Acquire multi-view images of the robot;
[0028] Multi-scale visual features are extracted from the multi-view images, and a multi-scale feature pyramid is constructed to obtain the visual features of the robot.
[0029] To achieve the above objectives, a second aspect of this application provides a robot motion diffusion device, the device comprising:
[0030] The acquisition module is used to acquire the robot's action query vector; the action query vector is a feature vector of the robot's action diffusion processing in robot imitation learning.
[0031] The key sampling point prediction module is used to predict some key sampling points of the action query vector in the visual features of the robot based on a preset diffusion converter.
[0032] The action diffusion module is used to match the action query vector with the partial key sampling points to perform action diffusion processing on the robot and obtain the robot's executable action sequence.
[0033] To achieve the above objectives, a third aspect of this application provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the robot motion diffusion method described in the first aspect.
[0034] To achieve the above objectives, a fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the robot motion diffusion method described in the first aspect.
[0035] To achieve the above objectives, the fifth aspect of this application provides a computer program product comprising a computer program that, when executed by a processor, implements the robot motion diffusion method provided in the first aspect above.
[0036] The robot motion diffusion method, apparatus, electronic device, computer-readable storage medium, and computer program product proposed in this application obtain a robot motion query vector; the motion query vector is a feature vector for motion diffusion processing of the robot in robot imitation learning; a preset diffusion converter predicts some key sampling points of the motion query vector in the robot's visual features; the motion query vector is matched with the some key sampling points to perform motion diffusion processing on the robot to obtain an executable motion sequence of the robot.
[0037] Compared to the traditional method of matching each query vector with all key vectors to calculate robot action diffusion, this application's robot imitation learning process first predicts some key sampling points in the robot's visual features for the robot's action query vector. Then, it matches the action query vector with these key sampling points to perform action diffusion, thereby obtaining the robot's executable action sequence. This significantly reduces the number of computational points in the robot action diffusion process, resulting in substantial reductions in both time and space complexity. This effectively reduces computational and storage costs, making machine learning models more efficient and scalable when handling large-scale inputs or long-term tasks. In other words, this application reduces the computational complexity of action diffusion in robot imitation learning, thereby avoiding a large amount of redundant information interaction, reducing hardware resource consumption, and promoting the deployment and implementation of machine learning models. Attached Figure Description
[0038] Figure 1 A flowchart illustrating the steps of the robot motion diffusion method provided in this application in some embodiments;
[0039] Figure 2 for Figure 1 A detailed flowchart of step S101;
[0040] Figure 3 A flowchart illustrating the steps of the robot motion diffusion method provided in this application in some other embodiments;
[0041] Figure 4 for Figure 1 A detailed flowchart of step S102;
[0042] Figure 5 A flowchart illustrating the deformable attention module involved in some embodiments of the robot motion diffusion method provided in this application;
[0043] Figure 6 A flowchart illustrating the steps of the robot motion diffusion method provided in this application in some further embodiments;
[0044] Figure 7 for Figure 6 A detailed flowchart of step S601;
[0045] Figure 8 for Figure 1 A detailed flowchart of step S103;
[0046] Figure 9 A schematic diagram of the overall system flow of the robot motion diffusion method provided in this application in a complete embodiment;
[0047] Figure 10 A schematic diagram of the robot motion diffusion device provided in this application;
[0048] Figure 11 A schematic diagram of the hardware structure of the electronic device provided in this application. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0050] It should be noted that although functional modules are divided in the device / system schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device / system or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used herein is for descriptive purposes only and is not intended to limit the scope of this application.
[0052] First, the overall concept of the robot motion diffusion method provided in this application will be explained.
[0053] In recent years, the demand for high-precision, multimodal action generators has become increasingly urgent in the field of robot imitation learning. Diffusion policy (or Diffusion Model for Policy Generation) has become a popular research direction in this field due to its unique advantages. Unlike traditional methods such as Gaussian policies and behavior cloning, which are prone to "pattern collapse" (learning only a single most common action), diffusion models can accurately capture the distribution of multimodal and highly complex action results through a progressive denoising process, significantly improving the diversity and adaptability of action generation.
[0054] Currently, mainstream denoising network architectures are divided into two categories: U-Net and DiT. Among them, DiT, with the combined effect of Self-Attention and Cross-Attention core attention mechanisms, shows advantages over the traditional U-Net architecture in global action sequence modeling, multimodal condition control, and high-dimensional action space optimization, and has become an important technical direction for diffusion strategy research.
[0055] Despite the numerous advantages of the DiT architecture's diffusion strategy, its core attention mechanism still suffers from significant technical shortcomings, primarily in three dimensions: computational efficiency, local detail modeling, and multimodal alignment accuracy. Computational efficiency is particularly prominent: the traditional Transformer's Cross-Attention mechanism requires each query to be matched with all keys. This computational model leads to a rapid increase in computational and memory consumption when the input action sequence is long or the observation dimension is high, for example, by O(NM). This not only generates a large amount of redundant information interaction and increases hardware resource consumption, but also severely limits the deployment and implementation of the model in large-scale input scenarios and real-time applications with stringent response speed requirements.
[0056] In summary, the core problem of existing diffusion strategies based on the DiT architecture stems from the design flaws of the traditional Cross-Attention mechanism: the increasing computational and memory consumption patterns lead to low computational efficiency and excessive redundant information interaction, thus limiting the model's application in large-scale input and real-time scenarios. This problem not only hinders the further promotion of diffusion strategies in the field of robot imitation learning but also fails to meet the practical requirements of high-precision and high-efficiency action generation, necessitating optimization of the attention mechanism design to overcome these technical bottlenecks.
[0057] To address the aforementioned issues, this application proposes a robot action diffusion method, apparatus, electronic device, computer-readable storage medium, and computer program product, aiming to reduce the computational complexity of action diffusion in robot imitation learning, thereby avoiding a large amount of redundant information interaction, reducing hardware resource consumption, and promoting the deployment and implementation of machine learning models.
[0058] In this application, the robot's action query vector is obtained; the action query vector is a feature vector used for action diffusion processing of the robot in robot imitation learning; a preset diffusion converter predicts some key sampling points of the action query vector in the robot's visual features; the action query vector is matched with the some key sampling points to perform action diffusion processing on the robot, thereby obtaining the robot's executable action sequence.
[0059] Compared to the traditional method of matching each query vector with all key vectors to calculate robot action diffusion, this application's robot imitation learning process first predicts some key sampling points in the robot's visual features for the robot's action query vector. Then, it matches the action query vector with these key sampling points to perform action diffusion, thereby obtaining the robot's executable action sequence. This significantly reduces the number of computational points in the robot action diffusion process, resulting in substantial reductions in both time and space complexity. This effectively reduces computational and storage costs, making machine learning models more efficient and scalable when handling large-scale inputs or long-term tasks. In other words, this application reduces the computational complexity of action diffusion in robot imitation learning, thereby avoiding a large amount of redundant information interaction, reducing hardware resource consumption, and promoting the deployment and implementation of machine learning models.
[0060] Furthermore, this application predicts some key sampling points of the action query vector in the robot's visual features, so that when performing action diffusion processing on the robot, only these few reference points are weighted for sampling. This enables flexible aggregation of information in multi-level spatial features and fusion of context features extracted from different scales or locations according to attention weights. In this way, the computational complexity can be reduced from being quadratically related to the size of the feature map to being linearly related to the number of sampling points, which greatly reduces the computational complexity. At the same time, it can also significantly improve the semantic accuracy of aggregating robot action features and visual features.
[0061] Furthermore, this application predicts some key sampling points in the robot's visual features by predicting the robot's action query vector, and then matches the action query vector with these key sampling points to perform action diffusion processing on the robot. This allows the machine learning model to focus only on a small number of key and relevant input feature vector tokens, rather than processing all data indiscriminately. This significantly improves the model's tolerance to abnormal observations and noise, thereby enabling it to adaptively respond to environmental changes and maintain stable robot control performance.
[0062] Next, the robot motion diffusion method, apparatus, electronic device, computer-readable storage medium, and computer program product provided in this application will be specifically described through the following embodiments, and the various detailed embodiments of the robot motion diffusion method provided in this application will be described in detail first.
[0063] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.
[0064] It should be noted that the robot motion diffusion method provided in this application relates to the field of artificial intelligence technology. The robot motion diffusion method provided in this application can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be an intelligent agent such as a robotic arm, a container equipped with a manipulation device, or a robot, or it can be a terminal configured / associated with these intelligent agents, such as a smartphone, tablet, laptop, or desktop computer. These terminals can communicate and interact with the intelligent agents via a network. The server can be a backend server terminal device of the terminal, which can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The software can be an application implementing the robot motion diffusion method, a computer program, and a storage medium carrying the computer program. It should be understood that, based on different design needs of practical applications, the terminal, server, and software of the robot motion diffusion method provided in this application may also be other forms not listed here, depending on the different feasible embodiments. The robot motion diffusion method provided in this application does not specifically limit these.
[0065] Furthermore, this application can also be used in numerous general-purpose or special-purpose computer system environments or configurations. Examples include: robotic arms, robots, personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, personal computers (PCs), minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via communication networks. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0066] For ease of understanding and explanation, the following text will use the robot motion diffusion method provided in this application applied to a terminal device as an example to describe the various specific embodiments of this application in detail. The terminal device can use the robot motion diffusion method provided in this application to control the robot, or the terminal device can be integrated into or associated with the robot to manage the robot's task planning and execution processes. In some descriptions, the terminal device may be simply referred to as a terminal. The implementation of the robot motion diffusion method provided in this application in any of the above-described forms can refer to the process of applying the robot motion diffusion method to a terminal device described below.
[0067] Please refer to Figure 1 , Figure 1 The flowchart illustrates the steps of the robot motion diffusion method provided in this application in some embodiments. It should be understood that, although... Figure 1 The flowcharts illustrating subsequent steps show the execution order of some method steps. However, based on different design needs in practical applications, the robot motion diffusion method provided in this application can, of course, employ an execution order different from that shown in the figures. That is, Figure 1 The order of the method steps shown does not constitute a limitation on the execution logic order of the robot motion diffusion method provided in this application. Any other method based on... Figure 1 Reasonable changes to the sequence of steps shown should be included within the protection scope of the robot motion diffusion method provided in this application.
[0068] like Figure 1 As shown, in some embodiments, the robot motion diffusion method provided in this application may include steps S101 to S103 as shown below.
[0069] Step S101: Obtain the robot's action query vector; the action query vector is the feature vector of the robot's action diffusion processing in robot imitation learning.
[0070] When performing the task of motion diffusion for the robot in robot imitation learning, the terminal device can obtain the feature vector for motion diffusion processing of the robot, and then convert the feature vector into a motion query vector.
[0071] It should be noted that the robot's action query vector includes the action's temporal constraints, ontological constraints, and diffusion stage information. The dimension of this action query vector can be (N... token D model ), where N token D represents the number of tokens. model Adapting dimensions to attention mechanisms.
[0072] In some embodiments, the terminal device can fuse the robot's body input, noisy motion segments, diffusion execution frequency, diffusion step number, and other feature vectors through dimensionality upscaling and token transformation to obtain the robot's motion query vector.
[0073] Step S102: Based on a preset diffusion converter, predict some key sampling points of the action query vector in the robot's visual features.
[0074] It should be noted that the diffusion converter can be pre-trained using a diffusion converter DiT based on a deformable attention mechanism. Furthermore, the robot's visual features can be encoded from multi-camera images of the robot.
[0075] After obtaining the robot's action query vector, the terminal device predicts, based on a preset diffusion converter, some key sampling points of the query vector in the robot's visual features for each query vector in the action query vector.
[0076] In some embodiments, the terminal device can predict some key sampling points in the robot's visual features for each query vector in the action query vector based on the cross-attention mechanism of Deformable Transformer. In the cross-attention of Deformable Transformer, each query token does not establish a connection with all feature points in the visual features. Instead, a small learnable module first predicts several reference points and their position offsets. These offsets point to potential key regions on the feature map, such as the edge of the target object, near the gripper, or visually significant locations.
[0077] Step S103: Match the action query vector with the partial key sampling points to perform action diffusion processing on the robot and obtain the robot's executable action sequence.
[0078] After the terminal device predicts some key sampling points of the action query vector in the visual features based on the diffusion converter, it matches the action query vector with the key sampling points when performing action diffusion processing on the robot, thereby finally generating the robot's executable action sequence.
[0079] In some embodiments, when the terminal device matches the action query vector with some key sampling points to perform action diffusion processing on the robot, it can use a machine learning model to use these key sampling points as reference points, so that weighted sampling is performed only on these few reference points, and then residual connection is performed with the original action query vector token to obtain the visual action fusion feature token. Then, the visual action fusion feature token is denoised to finally generate the robot's executable action sequence.
[0080] In this application, when a terminal device performs the task of motion diffusion for a robot during robot imitation learning, it acquires a feature vector for motion diffusion processing and converts this feature vector into a motion query vector. Then, for each query vector in this motion query vector, the terminal device predicts some key sampling points in the robot's visual features based on a preset diffusion converter. Finally, when performing motion diffusion processing on the robot, the terminal device matches the motion query vector with the aforementioned key sampling points, thereby ultimately generating an executable sequence of robot actions.
[0081] Thus, compared to the traditional method of matching each query vector with all key vectors to calculate robot action diffusion, this application, in robot imitation learning, establishes sparse attention only between "key positions" corresponding to a subset of key sampling points dynamically selected by the machine learning model during action diffusion processing. This significantly reduces computational complexity and improves efficiency for high-frequency robot action sequences and high-dimensional multimodal observations. Furthermore, this application can dynamically select the region of interest through a deformable attention mechanism, effectively fusing local details with global semantics. This allows for better focus on key observation information during robot action generation, thereby enhancing the machine learning model's ability to model local details. Moreover, this application, through dynamic sampling and dynamic attention mechanisms, enables the machine learning model to more easily capture "key associations" when facing new tasks or environments, improving generalization performance. This makes it particularly suitable for complex scenarios such as long sequences, high-dimensional action spaces, and multimodal inputs. In short, it enables the machine learning model to have stronger scalability and generalization capabilities. Finally, in this application, since the robot does not pay equal attention to every position globally when performing motion diffusion processing, it can automatically filter out irrelevant variations and noise through deformable attention mechanism when there is redundant / noisy information in motion samples and multimodal data, thereby improving generation stability and effectively enhancing the robustness and anti-interference ability of the machine learning model.
[0082] Please refer to Figure 2 , Figure 2 for Figure 1 A detailed flowchart of step S101.
[0083] like Figure 2 As shown, in some embodiments, step S101 above: obtaining the robot's motion query vector may include steps S201 to S203 as shown below.
[0084] Step S201: Obtain the robot's motion diffusion driving features; the driving features include at least the robot's first-dimensional ontological state features and the indication features for performing motion diffusion processing on the robot.
[0085] It should be noted that the robot's first-dimensional ontological state features can include the robot's ontological inputs, such as joint positions / velocities, end-effector poses, etc., representing a low-dimensional ontological perception of the first dimension (typically 10-30). Furthermore, the indication features for the robot's action diffusion processing can include: action execution frequency, diffusion step number, etc. The frequency tells the network at what Hz the action will be executed, and the diffusion step number k∈[0,K] indicates which step in the K-step diffusion chain is currently in, used to inject scheduling priors.
[0086] When the terminal device performs action diffusion processing on the robot during machine imitation learning, it can acquire the robot's low-dimensional ontology perception and indication features such as the action execution frequency and diffusion step number that indicate the action diffusion processing of the robot. The low-dimensional ontology perception and the indication features are used together as the robot's action diffusion driving features.
[0087] In some embodiments, the terminal device may also acquire noisy motion segments of the robot and use these noisy motion segments, together with the aforementioned low-dimensional body perception and motion execution frequency, diffusion step number, and other indicative features, as motion diffusion driving features of the robot.
[0088] For example, the terminal device can collect the robot's body input q (low-dimensional body perception such as joint position / velocity, end-effector posture, etc., with dimensions typically 10~30) and noisy motion segments when collecting the raw input. (The "noisy action sequence" of the kth diffusion time step, with a length of T×A, where T = prediction time domain and A = action dimension, serves as the initial candidate for the denoising network. Together with the execution frequency f and the diffusion step number k, it serves as the robot's action diffusion driving feature.)
[0089] Step S202: Perform feature space transformation processing on the ontology state features and the indicator features respectively to obtain the target ontology state features and target indicator features of the second dimension; the second dimension is adapted to the input feature dimension of the deformable attention mechanism, and the second dimension is higher than the first dimension.
[0090] It should be noted that feature space transformation processing can include feature dimensionality enhancement and token transformation processing.
[0091] After acquiring the robot's motion diffusion-driven features, the terminal device performs feature upscaling and token transformation on the ontology state features and indication features within these features, thereby obtaining the second-dimensional target ontology state features and target indication features. This second dimension is adapted to the input feature dimension of the deformable attention mechanism upon which the diffusion converter is based, and it is higher than the first dimension.
[0092] In some embodiments, when the terminal device uses low-dimensional ontology perception, noisy action segments, action execution frequency, and diffusion step number together as the robot's action diffusion driving features, it can perform feature dimensionality upscaling and token transformation processing on the low-dimensional ontology perception and noisy action segments together to obtain the second-dimensional target ontology state features.
[0093] For example, when performing feature upscaling and token conversion, the terminal device can first project the low-dimensional ontology perception and noisy action segments together as an ontology / action multi-layer perceptron (MLP). That is, it performs MLP on the "ontology + action" part to obtain the second-dimensional target ontology state features. Then, the terminal device performs a modulated signal MLP projection on the action execution frequency f and the diffusion step number k, embedding the frequency f and the step number k separately (such as sin-pos encoding or learned embedding), and then... Mapping yields target indication features .
[0094] Step S203: Concatenate the target body state features and the target indication features to obtain the robot's action query vector.
[0095] After obtaining the target body state features and the target indication features, the terminal device further concatenates the target body state features and the target indication features to obtain the robot's action query vector.
[0096] For example, the terminal device can transmit the aforementioned target ontology state features and target indication features These are combined to form an action token, resulting in the final action token. Thus, the final action token This is the robot's action query vector.
[0097] Please refer to Figure 3 , Figure 3 The flowcharts of the robot motion diffusion method provided in this application are shown in some other embodiments.
[0098] like Figure 3 As shown, in some embodiments, the robot motion diffusion method provided in this application may further include steps S301 and S302 as shown below.
[0099] Step S301: Obtain multi-view images of the robot.
[0100] When performing motion diffusion processing on the robot, the terminal device can capture multi-view images of the robot's surrounding scene using a camera.
[0101] In some embodiments, the terminal device can also collect point cloud data of the robot's surrounding scene (such as the pose of the target object, the position of the obstacle, and the scene structure) through a camera, and use the point cloud data as a multi-view image of the robot.
[0102] Step S302: Extract multi-scale visual features from the multi-view images and construct a multi-scale feature pyramid to obtain the visual features of the robot.
[0103] After acquiring multi-view images of the robot, the terminal device can further extract multi-scale visual features from the multi-view images and construct a multi-scale feature pyramid to obtain the robot's visual features.
[0104] In some embodiments, the terminal device can perform multi-camera image encoding processing on the multi-view images of the robot to extract multi-scale visual features from the multi-view images and construct a multi-scale feature pyramid, thereby obtaining the visual features of the robot.
[0105] For example, the terminal device can construct multi-scale feature pyramids from each of the multi-view images (e.g., N views) using a ResNet residual network or a ViT-Adapter to obtain spatial grid features {F1, F2, F3} with spatial resolutions of 7×7, 14×14, and 28×28. Thus, these spatial grid features {F1, F2, F3} constitute the robot's visual features.
[0106] In some embodiments, the terminal device may further encode and convert the visual features into a token, such as using a convolutional neural network (CNN) or a visual transformer (ViT) to extract deep semantic information from the original visual features, and then mapping it to the same (D) as the action query vector token through a linear projection layer. model The final visual feature token is generated from the N dimension. v Dmodel ), N v This represents the number of visual tokens. In this way, feature alignment verification ensures that the dimensions of the action query vector token and the visual feature token are completely consistent, thus providing a foundation for subsequent attention matching.
[0107] In this embodiment, the robot's motion diffusion driving features (including at least the robot's first-dimensional ontological state features and the indication features for motion diffusion processing) are acquired through a terminal device. The ontological state features and the indication features are then subjected to feature space transformation processing to obtain second-dimensional target ontological state features and target indication features (the second dimension is adapted to the input feature dimension of the deformable attention mechanism of the diffusion converter, and the second dimension is higher than the first dimension). The target ontological state features and the target indication features are then concatenated to obtain the robot's motion query vector. Furthermore, multi-view images of the robot are acquired through the terminal device, and multi-scale visual features are extracted from these multi-view images to construct a multi-scale feature pyramid, thereby obtaining the robot's visual features.
[0108] In this way, during subsequent motion diffusion processing of the robot, the terminal device generates efficient sparse sampling attention points for the visual features, allowing each action token to flexibly focus on the region related to itself in the feature map. The terminal device then iteratively calls the diffusion converter according to the diffusion schedule for denoising, ultimately obtaining the robot's executable action sequence. For example, within its diffusion processing module DiT Block, the terminal device uses the action token in the action query vector as the Query and the visual features as the Key / Value, and then uses the DeformableAttention mechanism to attend only a small number (e.g., 32 / 64) spatial locations for each Query to avoid excessive resource overhead and ensure that each action token only "sees" the local visual region related to it (such as the grasping area, obstacle edges, etc.).
[0109] In some embodiments, the diffusion converter is a diffusion converter based on a deformable attention mechanism; the diffusion converter includes a first learning module and a second learning module.
[0110] It should be noted that the first and second learning modules in the diffusion converter can be small, learnable modules. For example, the first learning module can be an offset network such as an offset head of a deformable diffusion transformer (DiT), and the second learning module can be a diffusion-aware lightweight modulation head (DAMH), etc.
[0111] Please refer to Figure 4 , Figure 4 for Figure 1 A detailed flowchart of step S102.
[0112] like Figure 4 As shown, step S102 above: predicting some key sampling points of the action query vector in the robot's visual features based on a preset diffusion converter, may include step S401 as shown below.
[0113] Step S401: The first learning module predicts the reference sampling point and the position offset of the reference sampling point in the visual feature of the action query vector, and the second learning module predicts the sampling point attention weight corresponding to the position offset; the partial key sampling point includes the reference sampling point.
[0114] When the terminal device performs motion diffusion for the robot using a deformable attention mechanism based on a diffusion converter, it first uses the first learning module in the diffusion converter to predict several reference points and their offsets in the visual features for each query token in the motion query vector. These offsets point to potential key regions on the feature map (e.g., the edge of the target object, near the hand, or visually significant locations). The reference points predicted by the first learning module are then the aforementioned key sampling points.
[0115] Following this, the terminal device further uses a diffusion converter to predict the attention weight of each sampling point corresponding to each position offset for each query token in the action query vector through a second learning module. In this way, the terminal device can use a machine learning model to perform weighted sampling on only these few reference sampling points using the attention weights predicted by the second learning module, enabling flexible aggregation of information across multiple levels of spatial features and fusion of contextual features extracted from different scales or locations according to attention weights.
[0116] In some embodiments, the terminal device may also use its deformable attention module based on the DiT diffusion converter to predict partial key sampling points in visual features for each query vector in the action query vector.
[0117] Please refer to Figure 5 , Figure 5 The flowchart of the deformable attention module involved in some embodiments of the robot motion diffusion method provided in this application is shown.
[0118] like Figure 5 As shown, in some embodiments, when the terminal device predicts key sampling points of the query vector in visual features based on the DiT diffusion converter, the deformable attention module in the DiT diffusion converter can generate a spatial "reference anchor point" (the region near the robot's end-effector position) for each query vector (concatenated action token) through a learnable linear mapping. Then, for each query, multiple sampling offsets within each head are output through a linear layer and added to the reference point to generate sampling points. Furthermore, each query is processed through Linear+Softmax to obtain the normalized weights of each sampling point for each head. Finally, for each head, the values of all sampling points are aggregated according to their weights, and then multi-head concatenation is performed. After passing through a linear layer, the aggregated multi-head features (the action block for this round of "denoising") are output.
[0119] In some embodiments, the terminal device can also construct training samples to train the DiT forward prediction, thereby obtaining a trained diffusion converter, and then iteratively call the diffusion converter according to the diffusion scheduling to perform noise reduction, so as to perform motion diffusion processing on the robot.
[0120] Please refer to Figure 6 , Figure 6 A flowchart illustrating the steps of the robot motion diffusion method provided in this application in some other embodiments.
[0121] like Figure 6As shown, in some embodiments, the robot motion diffusion method provided in this application may further include steps S601 to S603 as shown below.
[0122] Step S601: Obtain diffusion training sample data.
[0123] When training the diffusion converter, the terminal device can first construct diffusion training sample data for the robot.
[0124] In some embodiments, the terminal device can obtain diffusion training sample data manually uploaded by the user through a preset human-computer interaction interface (such as a user graphical interface).
[0125] Alternatively, in other embodiments, the terminal device may also extract pre-constructed diffusion training sample data from local storage space.
[0126] Step S602: Perform conditional encoding on the diffusion training sample data to obtain the training action query vector and training visual features.
[0127] It should be noted that the conditional encoding process is the same as the process performed by the terminal device when acquiring the action query vector and visual features. The same content will not be elaborated upon here.
[0128] After acquiring the diffusion training sample data, the terminal device further performs conditional encoding on the data to obtain the training action query vector and training visual features. For example, the terminal device organizes the original robot input in the diffusion training sample data into a set of low-dimensional features, including the body input, diffusion noise action segments, action execution frequency, and diffusion step number. The body / action is then projected onto a unified action space using an MLP (Multi-Level Programming) algorithm. The modulated signals (such as frequency and diffusion steps) are also encoded using an MLP and concatenated to form the feature representation of the action token. For multi-camera images in the diffusion training sample data, visual features are obtained via ResNet. }
[0129] Step S603: Perform forward prediction training on the initial diffusion converter based on the training action query vector and the training visual features to obtain the trained diffusion converter; when the diffusion converter performs forward prediction training, it predicts some sampling points of the training action query vector in the training visual features based on the deformable attention mechanism, and optimizes the parameters based on minimizing the mean square error.
[0130] After the terminal device performs conditional encoding on the diffusion training sample data to obtain training action query vectors and training visual features, it inputs these two vectors together into an initial diffusion converter. This allows the diffusion converter to perform forward prediction training on the training action query vectors and training visual features, resulting in a trained diffusion converter. During forward prediction training, the diffusion converter uses a deformable attention mechanism to predict partial sampling points in the training visual features for each query vector in the training action query vector and optimizes its parameters based on minimizing the mean squared error.
[0131] For example, the forward prediction of the diffusion converter DiT can be used to... , { The input is a DiT diffusion converter based on the Deformable Attention mechanism, and the output is predicted noise. That is: each action token (i.e. Each vector in the vector will be in each feature map { Instead of calculating similarity with all spatial locations, the DiT diffuse converter predicts a small number of sampling points (e.g., 4-64) on the target area. These sampling points are learned through an offset network and normalized to the range [0,H]×[0,W]. Thus, the DiT diffuse converter extracts key / value features only on these sampling points, performs a weighted summation, and obtains the sparse attention output. .
[0132] Furthermore, the loss and gradient for the DiT diffusion converter during forward prediction training are minimized by the mean squared error (MSE), i.e., the loss... ,in, This is real noise.
[0133] Please refer to Figure 7 , Figure 7 for Figure 6 A detailed flowchart of step S601.
[0134] like Figure 7 As shown, in some embodiments, step S601 above: obtaining diffusion training sample data may include steps S701 and S702 as shown below.
[0135] Step S701: Obtain the robot's executable clean action sequence, as well as the random sampling diffusion parameters and noise scheduling parameters.
[0136] Step S702: Based on the preset denoising diffusion probability model, the executable clean action sequence, the random sampling diffusion parameters and the noise scheduling parameters are denoised to obtain diffusion training sample data.
[0137] When constructing the robot's diffusion training sample data, the terminal device can obtain the robot's executable clean action sequence, as well as the random sampling diffusion parameters and noise scheduling parameters. Then, the terminal device adds noise to the executable clean action sequence, the random sampling diffusion parameters, and the noise scheduling parameters based on a preset denoising diffusion probabilistic model (DDPM) to obtain the robot's diffusion training sample data.
[0138] In some embodiments, the terminal device can extract clean motion sequences (e.g., of length T) from the robot's demonstration data and randomly sample diffusion steps. With corresponding noise scheduling parameters Then, noise is added to the clean action sequence, the diffusion step k, and the noise scheduling parameters according to DDPM to construct the robot's diffusion training sample data.
[0139] In other embodiments, the terminal device can also perform online rollout processing on the robot to obtain a clean sequence of movements of the robot.
[0140] Please refer to Figure 8 , Figure 8 for Figure 1 A detailed flowchart of step S103.
[0141] like Figure 8 As shown, in some embodiments, step S103 above: matching the action query vector with the partial key sampling points to perform action diffusion processing on the robot may include steps S801 and S802 as shown below.
[0142] Step S801: Generate prediction noise based on the action query vector and the partial key sampling points.
[0143] When the terminal device matches the action query vector with a subset of key sampling points to perform action diffusion processing on the robot, it can first use a machine learning model to perform noise prediction based on the action query vector and the subset of key sampling points to generate predictive noise. That is, visual features are extracted only from the subset of key sampling points and weighted summed to obtain sparse attention output predictive noise.
[0144] For example, the terminal device can use a machine learning model to calculate the similarity score between each query vector Query in the action query vector and the visual feature Key on some key sampling points, initially generating an attention weight matrix. Then, based on a deformable attention offset prediction network, the initial attention window is dynamically adjusted (e.g., when the grasping point of the target object is detected in the visual features, the window shifts to that area), and the adjusted weight matrix is normalized to obtain spatiotemporal attention weights (which include both the temporal dependence of the action and the correlation in the visual space). Finally, the normalized attention weights are weighted and summed with the visual feature Key to obtain sparse attention output prediction noise.
[0145] Step S802: Denoise the visual motion fusion features of the robot based on the predicted noise to generate an executable motion sequence of the robot; the visual motion fusion features are obtained by residual concatenation of the motion query vector and the key vectors corresponding to the partial key sampling points.
[0146] After generating predictive noise, the terminal device can further denoise the robot's visual-action fusion features based on this predictive noise, ultimately generating an executable sequence of actions for the robot after the loop ends. Here, the visual-action fusion features can be visual-action fusion feature tokens obtained by the terminal device simultaneously generating predictive noise based on the action query vector and some key sampling points, and performing a residual concatenation between the action query vector (query) and the key vectors corresponding to some key sampling points. For example, the terminal device can, after weighting and summing the normalized attention weights and visual features (Key) using a reinforcement learning model, further perform a residual concatenation between the summed visual features and the action query vector (token) to obtain the visual-action fusion feature token.
[0147] For example, when the terminal device iteratively calls the diffusion converter to perform denoising for robot motion diffusion processing according to the diffusion schedule, it can start from pure noise and denoise step by step to finally obtain the robot's executable motion sequence. That is, the terminal device uses a reverse loop k = K → 1 to perform forward reasoning through the diffusion converter DiT to obtain the robot's motion query vector. And the action query vector in visual features Prediction noise is generated from some key sampling points. Subsequently, the terminal device uses the predicted noise through a Denoising Diffusion Probabilistic Model (DDPM) (stochastic) or a Denoising Diffusion Implicit Model (DDIM) (deterministic). The robot's visual-motion fusion feature tokens are denoised. After the loop completes, a clean, executable sequence of robot actions is obtained. The terminal device can then send T steps sequentially to the robot's controller at a frequency f. In the next control cycle, the process restarts from the previously acquired robot motion query vector, iteratively calling the diffusion converter in the rolling time domain using diffusion scheduling to perform denoising, thereby achieving motion diffusion processing and obtaining a new executable sequence of robot actions.
[0148] Next, a complete embodiment of the robot motion diffusion method provided in this application is presented for a terminal device.
[0149] Please refer to Figure 9 , Figure 9 A schematic diagram of the overall system flow of the robot motion diffusion method provided in this application in a complete embodiment.
[0150] like Figure 9 As shown, in some embodiments, applying the robot motion diffusion method provided in this application to a terminal device may include the following steps:
[0151] S1, the original robot input is organized into a set of low-dimensional features, including the ontology input, the spread noise action segments, the action execution frequency, and the spread step number.
[0152] The raw inputs collected by the terminal device include body inputs (low-dimensional body perception such as joint position / velocity, end-effector pose, etc., with dimensions typically 10~30) and noisy motion segments. (The "noisy action sequence" of the kth diffusion time step, with length T×A, where T=prediction time domain and A=action dimension, serving as the initial candidate for the denoising network), execution frequency f (telling the network at how many Hz this action will be executed), and diffusion step number k (k∈[0,K] indicating which step in the K-step diffusion chain is currently in, used for injecting scheduling priors).
[0153] S2, the subject / action is projected onto a unified action space through MLP, and the modulation signal (such as frequency and spread step) is also encoded through MLP and spliced to form the feature representation of the action token.
[0154] The terminal device performs feature upscaling and tokenization on the collected low-dimensional features to obtain the final action token. This includes:
[0155] Ontology / Action MLP Projection, which involves performing MLP on the "ontology + action" components. ;
[0156] The modulated signal is projected using an MLP, which involves first embedding the frequency f and the step number k separately (sin-pos or learned embedding), and then... get ;
[0157] Concatenate them into an action token, that is, the final action token is .
[0158] All subsequent DiT Block "conditional branches" are based on As input, it can be injected into the Cross-Attention mechanism.
[0159] S3: The robot acquires images from multiple camera perspectives and uses a ResNet network to generate multi-scale feature maps. In the DiT (DiffusionTransformer) module, efficient sparse sampling concerns are generated for the visual features, allowing each action token to flexibly focus on regions relevant to itself in the feature map. DiTBlock is iteratively called on a diffusion-scheduling basis to denoise the data, resulting in an executable action sequence.
[0160] The terminal device uses visual encoding and sparse attention processing to match each query with only a small number of learnable key sampling points for robot action diffusion. First, the terminal device encodes the robot's multi-camera images, constructing multi-scale feature pyramids ({F1, F2, F3}) for each of the N viewpoint images using ResNet or ViT-Adapter to obtain spatial grid features with resolutions such as 7×7, 14×14, and 28×28. Then, the terminal device generates efficient sparse sampling attention points from these spatial grid features. That is, within the DiT Block, action tokens... As queries, visual grid features are used as keys and values. Deformable Attention is employed, with each query only attending a small number of spatial locations (e.g., 32 / 64) to avoid O(log n) errors. The overhead ensures that each action token only "sees" the local visual region related to it (grabbing area, obstacle edges, etc.).
[0161] In some embodiments, the diffusion scheduling iteration during the training phase includes the following steps:
[0162] Constructing training samples means obtaining clean action sequences from the demo data or online rollout. (Length T), random sampling diffusion step With corresponding noise scheduling parameters Add noise using DDPM: (Real noise) (Synthesizing the noisy action in step k);
[0163] Conditional encoding, similar to S1-S2, yields the action token. Visual features are obtained from multi-camera images using ResNet. };
[0164] DiT forward prediction, , { The input is DiT based on a deformable attention mechanism, and the output is predicted noise. The specific process is as follows: each action token (i.e. Each vector in the vector will be in each feature map { Instead of calculating similarity with all spatial locations, a small number of sampled points (e.g., 4-64) are predicted on the sparse attention network. These sampled points are learned through an offset network and normalized to the range [0, H]×[0, W]. Key / Value features are extracted only from these sampled points, and a weighted sum is performed to obtain the sparse attention output. .
[0165] Loss and gradient, minimizing MSE: .
[0166] In some embodiments, the diffusion scheduling iteration starts from pure noise during the inference phase, gradually denoises it to obtain an executable action sequence, including the following steps:
[0167] Initial input, sampling (T×A dimension all-Gaussian noise), read the current ontology q, image, and frequency f.
[0168] Reverse the loop k = K → 1, including: a) Conditional encoding (same as the training phase) → b) Visual feature extraction (same as training) → { c) DiT forward reasoning → d) DDPM (random type) / DDIM (deterministic type) denoising.
[0169] Output, obtained after the loop ends (Clean motion sequence). T steps are sequentially sent to the robotic arm controller at frequency f. The next control cycle restarts from S1, executing in the rolling time domain.
[0170] In this embodiment, the Deformable cross-attention mechanism matches each query with only a small number of learnable key sampling points, reducing the number of computation points from M to a fixed K (usually much smaller than M), thereby reducing both time and space complexity to O(NK). This sparse attention mechanism effectively reduces computation and storage costs, making the model more efficient and scalable when handling large-scale inputs or long-term tasks. Furthermore, in the cross-attention mechanism of the Deformable Transformer, each query token does not establish connections with all feature points. Instead, a small learnable module first predicts several reference points and their offsets. These offsets point to potential key regions on the feature map, such as the edge of the target object, near the hand, or visually significant locations. Subsequently, the model can perform weighted sampling only on these few reference points, flexibly aggregating information across multiple levels of spatial features. It fuses contextual features extracted from different scales or locations according to attention weights. This reduces the computational complexity of cross-attention from a square relationship with the feature map size to a linear relationship with the number of sampling points, while significantly improving the semantic accuracy of feature aggregation. Furthermore, this deformable cross-attention design makes the model more selective and spatially adaptive in vision-action fusion; that is, it can automatically learn which regions to extract information from based on the task objective and is more robust to changes in the scale, pose, and background of visual input. Therefore, in the training and inference of the diffusion policy in machine learning models, deformable cross-attention can more effectively capture the key interaction regions between the manipulated object and the robotic arm, thereby improving the accuracy and stability of action generation. Moreover, by allowing the model to learn to focus only on a small number of key, relevant input tokens, rather than indiscriminately processing all data, deformable cross-attention significantly improves tolerance to anomalous observations and noise. Because the focus can be dynamically adjusted and concentrated on the most meaningful local information for the current task, the model is more likely to ignore interference such as occlusion and anomalies, achieving more robust decision-making. Furthermore, this selective mechanism can enhance the model's generalization performance to new out-of-sample scenarios or complex action distributions, enabling it to adaptively respond to environmental changes and maintain stable control performance.
[0171] Please refer to Figure 10 This application also provides a robot motion diffusion device. The robot motion diffusion device provided by this application can realize the above-described robot motion diffusion method.
[0172] like Figure 10 As shown, the robot motion diffusion device provided in this application may include:
[0173] The acquisition module is used to acquire the robot's action query vector; the action query vector is a feature vector of the robot's action diffusion processing in robot imitation learning.
[0174] The key sampling point prediction module is used to predict some key sampling points of the action query vector in the visual features of the robot based on a preset diffusion converter.
[0175] The action diffusion module is used to match the action query vector with the partial key sampling points to perform action diffusion processing on the robot and obtain the robot's executable action sequence.
[0176] In some embodiments, the diffusion converter is a diffusion converter based on a deformable attention mechanism; the diffusion converter includes a first learning module and a second learning module;
[0177] The key sampling point prediction module is further configured to predict, through the first learning module, a reference sampling point and the position offset of the reference sampling point in the visual feature of the action query vector, and, through the second learning module, predict the sampling point attention weight corresponding to the position offset; the partial key sampling points include the reference sampling point.
[0178] In some embodiments, the robot motion diffusion device provided in this application further includes:
[0179] The training module is used to acquire diffusion training sample data; perform conditional encoding processing on the diffusion training sample data to obtain training action query vectors and training visual features; perform forward prediction training on the initial diffusion converter based on the training action query vectors and training visual features to obtain the trained diffusion converter; when the diffusion converter performs forward prediction training, it predicts some sampling points of the training action query vector in the training visual features based on a deformable attention mechanism, and optimizes the parameters based on minimizing the mean square error.
[0180] In some embodiments, the training module is further configured to acquire the robot's executable clean action sequence, as well as random sampling diffusion parameters and noise scheduling parameters; and to add noise to the executable clean action sequence, the random sampling diffusion parameters and the noise scheduling parameters based on a preset denoising diffusion probability model to obtain diffusion training sample data.
[0181] In some embodiments, the action diffusion module is further configured to generate prediction noise based on the action query vector and the partial key sampling points; perform denoising processing on the visual action fusion features of the robot based on the prediction noise to generate an executable action sequence of the robot; the visual action fusion features are obtained by residual concatenation of the action query vector and the key vectors corresponding to the partial key sampling points.
[0182] In some embodiments, the acquisition module is further configured to acquire the robot's motion diffusion driving features; the driving features include at least a first-dimensional ontology state feature of the robot and an indication feature for performing motion diffusion processing on the robot; the ontology state feature and the indication feature are respectively subjected to feature space transformation processing to obtain a second-dimensional target ontology state feature and target indication feature; the second dimension is adapted to the input feature dimension of the deformable attention mechanism of the diffusion converter, and the second dimension is higher than the first dimension; the target ontology state feature and the target indication feature are concatenated to obtain the robot's motion query vector.
[0183] In some embodiments, the acquisition module is further configured to acquire multi-view images of the robot; extract multi-scale visual features from the multi-view images and construct a multi-scale feature pyramid to obtain the visual features of the robot.
[0184] It should be noted that the specific implementation of the robot motion diffusion device provided in this application is basically the same as the specific embodiment of the robot motion diffusion method described above, and will not be repeated here.
[0185] Please see Figure 11 This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described robot motion diffusion method.
[0186] In some embodiments, the electronic device may be an intelligent agent such as a robotic arm, a container equipped with a manipulation device, or a robot, or it may be a terminal configured / associated with these intelligent agents, such as any intelligent terminal such as a smartphone, tablet, laptop, desktop computer, in-vehicle hardware platform (e.g., in-vehicle computer), or wearable device.
[0187] like Figure 11As shown, the electronic device provided in this application may include:
[0188] The processor 1101 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to achieve the technical solution provided in this application.
[0189] The memory 1102 can be implemented in the form of read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1102 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1102 and is called and executed by the processor 1101 to execute the robot motion diffusion method of this application.
[0190] Input / output interface 1103 is used to implement information input and output;
[0191] The communication interface 1104 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0192] Bus 1105 transmits information between various components of the device (e.g., processor 1101, memory 1102, input / output interface 1103, and communication interface 1104);
[0193] The processor 1101, memory 1102, input / output interface 1103 and communication interface 1104 are connected to each other within the device via bus 1105.
[0194] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described robot motion diffusion method.
[0195] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0196] This application also provides a computer program product, including a computer program, the steps of which are implemented when the computer program is executed by a processor, and are basically the same as the specific embodiments of the robot motion diffusion method described above, and will not be repeated here.
[0197] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of this application, and do not constitute a limitation on the technical solutions provided in this application. Those skilled in the art will know that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in this application are also applicable to similar technical problems.
[0198] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0199] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0200] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0201] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0202] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0203] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, or other forms.
[0204] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0205] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0206] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0207] The preferred embodiments of this application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and spirit of this application shall be within the scope of the claims.
Claims
1. A method for robot motion diffusion, characterized in that, The method includes: Obtain the robot's action query vector; the action query vector is a feature vector used in robot imitation learning to perform action diffusion processing on the robot. The motion query vector is predicted based on a preset diffusion converter, which is used to predict some key sampling points in the robot's visual features; the diffusion converter is a diffusion converter based on a deformable attention mechanism. The action query vector is matched with the partial key sampling points to perform action diffusion processing on the robot, thereby obtaining the robot's executable action sequence.
2. The method according to claim 1, characterized in that, The diffusion converter includes a first learning module and a second learning module; The preset diffusion converter predicts a subset of key sampling points of the action query vector in the robot's visual features, including: The first learning module predicts the reference sampling point and the position offset of the reference sampling point in the visual feature of the action query vector, and the second learning module predicts the sampling point attention weight corresponding to the position offset; the partial key sampling point includes the reference sampling point.
3. The method according to claim 1, characterized in that, The method further includes: Obtain diffusion training sample data; The diffusion training sample data is subjected to conditional encoding to obtain training action query vectors and training visual features; The initial diffusion converter is subjected to forward prediction training based on the training action query vector and the training visual features to obtain the trained diffusion converter. During forward prediction training, the diffusion converter predicts some sampling points of the training action query vector in the training visual features based on the deformable attention mechanism, and optimizes the parameters based on minimizing the mean square error.
4. The method according to claim 3, characterized in that, The acquisition of diffusion training sample data includes: Obtain the robot's executable clean action sequence, as well as the random sampling diffusion parameters and noise scheduling parameters; Based on a preset denoising diffusion probability model, the executable clean action sequence, the random sampling diffusion parameters, and the noise scheduling parameters are denoised to obtain diffusion training sample data.
5. The method according to claim 1, characterized in that, The step of matching the action query vector with the partial key sampling points to perform action diffusion processing on the robot includes: Predictive noise is generated based on the action query vector and the key sampling points. The visual motion fusion features of the robot are denoised based on the predicted noise to generate an executable motion sequence of the robot; the visual motion fusion features are obtained by residual concatenation of the motion query vector and the key vectors corresponding to the partial key sampling points.
6. The method according to claim 1, characterized in that, The process of obtaining the robot's action query vector includes: Obtain the motion diffusion driving features of the robot; the driving features include at least the robot's first-dimensional ontological state features and the indication features for performing motion diffusion processing on the robot; The ontology state features and the indicator features are respectively subjected to feature space transformation processing to obtain the target ontology state features and target indicator features of the second dimension; the second dimension is adapted to the input feature dimension of the deformable attention mechanism of the diffusion converter, and the second dimension is higher than the first dimension; The target body state features and the target indication features are concatenated to obtain the robot's action query vector.
7. The method according to claim 1, characterized in that, The method further includes: Acquire multi-view images of the robot; Multi-scale visual features are extracted from the multi-view images, and a multi-scale feature pyramid is constructed to obtain the visual features of the robot.
8. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the robot motion diffusion method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the robot motion diffusion method as described in any one of claims 1 to 7.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the robot motion diffusion method as described in any one of claims 1 to 7.