A robot general motion control method and system, device and medium based on flow matching generation type motion prior

CN122593067APending Publication Date: 2026-08-18SICHUAN EMBODIED HUMANOID ROBOT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610850923.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-12
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

然而,目前业界尚缺乏一种能够将流匹配生成式运动先验与通用运动跟踪策略有机结合,并同时适配人形机器人与四足机器人的统一运动控制方法

Benefits of technology

采用本发明所提供的方法,主要包括构建条件式流匹配生成模型,对条件式流匹配生成模型进行训练,得到训练好的条件式流匹配生成模型;基于训练好的条件式流匹配生成模型在条件向量下,从条件向量出发,通过常微分方程数值积分生成参考运动轨迹;通过训练好的通用运动跟踪策略将参考运动轨迹映射为底层关节动作或力矩,输出至执行端。通过上述方法,利用条件流匹配生成模型从多源机器人运动数据集中学习速度场,可以在用户高层指令下实时生成丰富、自然且多样的参考运动轨迹,相比基于扩散模型的方法采样更稳定、推理步数更少。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122593067A_ABST
    Figure CN122593067A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of robot control, in particular to a robot general motion control method and system based on flow matching generation type motion prior, equipment and medium, mainly including constructing conditional flow matching generation model, training the conditional flow matching generation model to obtain the trained conditional flow matching generation model; based on the trained conditional flow matching generation model under the condition vector, starting from the condition vector, generating the reference motion trajectory through the ordinary differential equation numerical integration; mapping the reference motion trajectory into the bottom joint action or torque through the trained general motion tracking strategy and outputting to the execution end. Through the above method, the velocity field is learned from the multi-source robot motion data set by using the conditional flow matching generation model, the rich, natural and various reference motion trajectories can be generated in real time under the user high-level instruction, and the sampling is more stable and the reasoning step number is less compared with the method based on the diffusion model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robot control technology, and more specifically, to a general motion control method, system, device, and medium for robots based on flow matching generative motion priors. Background Technology

[0002] With the rapid development of humanoid and quadruped robot technologies, robots are gradually entering various complex scenarios such as homes, industries, inspections, rescue operations, and fieldwork. These scenarios place three demands on robots: First, they must be able to maintain stable movement on diverse terrains such as flat ground, steps, slopes, gravel, and snow; second, they must be able to support multimodal and multi-skill motion control, such as walking, turning, running, jumping, obstacle crossing, and climbing; and third, the control framework should have cross-body versatility, enabling the same algorithm to support both humanoid and quadruped robots simultaneously.

[0003] Existing robot motion control methods are mainly divided into the following categories: (1) Model-based trajectory optimization methods, such as model predictive control (MPC) and whole-body trajectory optimization (WBC / TO), which rely on accurate dynamic models, have high solution costs, and are limited in robustness under complex terrain; (2) Reinforcement learning-based motion control methods, which train special strategies for each skill or each type of terrain, making it difficult to achieve multimodal and multi-entity sharing within a unified framework; (3) Motion imitation-based methods, such as general motion tracking frameworks, can track given reference motion trajectories in physical simulations, but they still rely on a large amount of manually designed or offline recorded reference motion data, and cannot generate new reference trajectories online according to the user's high-level instructions, thus limiting the system's real-time performance and generalization ability.

[0004] On the other hand, in recent years, generative modeling techniques, especially diffusion models and flow matching models, have demonstrated powerful data distribution modeling capabilities in image generation, video generation, and motion capture synthesis. Compared to diffusion models, flow matching explicitly fits the probability path velocity field from noise distribution to data distribution, offering advantages such as clearer training objectives, more stable sampling processes, and fewer inference steps, making it more suitable for robot control scenarios with high real-time requirements. However, the industry currently lacks a unified motion control method that can organically combine flow matching generative motion priors with general motion tracking strategies, while simultaneously adapting to both humanoid and quadrupedal robots. Summary of the Invention

[0005] The purpose of this invention is to provide a general motion control method, system, device, and medium for robots based on flow matching generative motion priors, in order to solve the above-mentioned problems in the prior art.

[0006] This invention is achieved through the following technical solution: A general motion control method for robots based on flow matching generative motion priors includes: Obtain a multi-source robot motion dataset, preprocess the motion dataset to obtain training samples and conditional vectors corresponding to each sample; A conditional flow matching generation model is constructed. The linear interpolation probability path from the noise distribution to the data distribution is used as supervision. The flow matching loss is minimized, and the conditional flow matching generation model is trained to obtain the trained conditional flow matching generation model. Based on the trained conditional flow matching generation model, a reference motion trajectory is generated by numerical integration of ordinary differential equations starting from the conditional vector. A general motion tracking training framework is constructed, a general motion tracking strategy is set, and the strategy parameters in the general motion tracking strategy are updated using reinforcement learning objectives based on the reference motion trajectory and the general motion tracking training framework to obtain the trained general motion tracking strategy. The reference motion trajectory is mapped to the underlying joint motion or torque through a well-trained general motion tracking strategy and output to the execution end.

[0007] Preferably, the preprocessing of the motion dataset includes: Perform time alignment and resampling, coordinate system and orientation unification, state and action normalization, and outlier filtering on multi-source data in the motion dataset; Each trajectory is sliced ​​using a sliding window of length L to obtain training samples; a conditional vector is labeled for each sample.

[0008] Preferably, training the conditional flow matching generation model includes: Set the sampling time and initial sampling noise, and sample target trajectory segments from the training samples; Construct a probability path and a target velocity field, feed the probability path, sampling time, and condition vector into the velocity field network, and minimize the flow matching loss, which is:

[0009] In the formula, For stream matching loss, For about , , With the mathematical expectation of the corresponding sampling distribution, The second norm of a vector; Indicates by parameters Representation of a velocity field neural network; Represents a condition vector. For probability paths, Sampling time, For the actual motion trajectory segments in the training data, This is the initial noise.

[0010] Preferably, the total loss is constructed based on the flow matching loss, including:

[0011] In the formula, For the total loss, For endpoint consistency loss, For trajectory smoothness loss, This is due to the loss of physical feasibility such as joint positioning and speed. For multimodal diversity loss; , , , These are the weighting coefficients.

[0012] Preferably, the step of generating the reference motion trajectory through numerical integration of ordinary differential equations includes: Initial noise is sampled under the conditional vector, in order to For ordinary differential equations, numerical integration is performed in... Solving on [0,1] yields the generated trajectory; The generated trajectory is denormalized and decoded into several reference quantities according to preset semantics to form a reference motion trajectory.

[0013] Preferably, the step of updating the policy parameters in the general motion tracking policy using reinforcement learning objectives based on the general motion tracking training framework includes: The strategy parameters serve as strategy inputs and include reference motion trajectory, current robot body perception state, tracking error, historical observations, and codes used to distinguish different robot bodies. The strategy output includes the underlying joint motions or torques, which, after being applied to the physical simulation environment, yield the state and tracking error at the next moment. The policy is updated by maximizing the following objectives using a reinforcement learning algorithm:

[0014] In the formula, Loss due to strategy update For reference trajectory tracking rewards or losses, For loss of motion smoothness, To mitigate consistency loss, This refers to energy consumption constraint losses.

[0015] Preferably, the method further includes introducing training enhancements when training a general motion tracking strategy, said training enhancements including at least one or more of the following: Random noise is injected into the reference trajectory to simulate the prediction error of the generative model; A random tracking delay is introduced between policy inputs and actions to simulate communication and control delays; Randomize the terrain, including flat land, steps, slopes, gravel, and complex terrain; Randomize user commands to broaden command distribution; Add observation noise to the body sensing sensor; External forces are applied to the robot in the simulator.

[0016] Secondly, the present invention also provides a general motion control system for robots based on flow matching generative motion priors, for executing the aforementioned general motion control method for robots based on flow matching generative motion priors, comprising: The data processing module is configured to acquire multi-source robot motion datasets, and perform preprocessing, condition labeling and slicing, and output training samples and corresponding condition vectors. The motion prior generation module is configured to carry a trained conditional flow matching generation model and generate reference motion trajectories online according to instructions. The general motion tracking module is configured to carry the general motion tracking strategy obtained from training, and to map the reference motion trajectory, current state, and tracking error together into the underlying joint motion or torque. The execution module is configured to output the obtained joint movements or torques to the robot control interface to drive the robot to complete the corresponding motion tasks.

[0017] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described general motion control method for robots based on flow matching generative motion priors.

[0018] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described general motion control method for robots based on flow matching generative motion priors.

[0019] The technical solution of the present invention has at least the following advantages and beneficial effects: The method provided by this invention mainly includes constructing a conditional flow matching generation model, training the conditional flow matching generation model to obtain a trained conditional flow matching generation model; based on the trained conditional flow matching generation model, generating a reference motion trajectory from the conditional vector through numerical integration of ordinary differential equations; and mapping the reference motion trajectory to low-level joint movements or torques using a trained general motion tracking strategy, and outputting it to the execution end. Through this method, the velocity field is learned from a multi-source robot motion dataset using the conditional flow matching generation model, enabling the real-time generation of rich, natural, and diverse reference motion trajectories under high-level user commands. Compared to methods based on diffusion models, this method offers more stable sampling and requires fewer inference steps.

[0020] This invention introduces auxiliary losses such as endpoint consistency, trajectory smoothness, physical feasibility, and multimodal diversity, which significantly improves the trackability of the generated trajectory and avoids problems such as high-frequency jitter, joint over-limit, or gait collapse in trajectories generated by simple flow matching models.

[0021] This invention combines a flow matching generation model with a general motion tracking strategy to form a two-layer architecture of upper-layer generation and lower-layer tracking. This allows the generation model to focus only on motion priors, and the tracking strategy to focus only on high-fidelity reproduction, thereby greatly reducing the complexity of multi-skill joint training.

[0022] The universal motion tracking strategy proposed in this invention distinguishes different robot forms through robot ontology encoding m, enabling the same training framework to be adapted to both humanoid and quadruped robots, and has significant cross-ontology universality. This invention introduces multiple training enhancements during the tracking strategy training phase, including reference noise, tracking error delay, terrain randomization, external force disturbance, and sensor noise, to make the strategy robust and capable of generalizing to unseen terrain and disturbances.

[0023] The method and system provided by this invention can operate in a closed loop: the entire process from high-level instructions to reference trajectories to low-level actions is real-time, which is convenient for deployment to real robots and supports complex scenario applications with multiple modalities, multiple skills, and multiple bodies. Attached Figure Description

[0024] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a schematic diagram of the overall algorithm framework of the method described in this invention (Chinese algorithm flowchart overview); Figure 2 This is a schematic diagram of the training process of the conditional flow matching generation model described in this invention; Figure 3 This is a schematic diagram of the training framework of the universal motion tracker described in this invention; Figure 4 This is a schematic diagram of the overall algorithm framework when the present invention is applied to a humanoid robot; Figure 5 This is a training diagram illustrating the two-layer framework of upper-layer generation and lower-layer tracking when the present invention is applied to a humanoid robot; Figure 6 This is a schematic diagram of the overall algorithm framework when the present invention is applied to a quadruped robot; Figure 7 This is a training diagram illustrating the two-layer framework of upper-layer generation and lower-layer tracking when the present invention is applied to a quadruped robot; Figure 8 This is a schematic diagram of the process of the present invention. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0027] The independently described modules or sub-modules may or may not be physically separated; they may be implemented in software or hardware, and some modules or sub-modules may be implemented in software, with the processor calling the software to implement the function of these modules or sub-modules, while other modules or sub-modules may be implemented in hardware, such as through hardware circuits. Furthermore, some or all of the modules can be selected to achieve the purpose of this application's solution according to actual needs.

[0028] Please refer to Figure 8 This invention provides a general motion control method for robots based on flow matching generative motion priors, comprising: S1 acquires a multi-source robot motion dataset, preprocesses the motion dataset, and obtains training samples and conditional vectors corresponding to each sample. Acquire a multi-source robot motion dataset, which includes motion data of humanoid robots and / or quadruped robots on complex terrain; preprocess the dataset to obtain training samples with a unified representation and a condition vector corresponding to each sample. ; S2: Construct a conditional flow matching generation model, using the linear interpolation probability path from noise distribution to data distribution as supervision, minimize the flow matching loss, train the conditional flow matching generation model, and obtain the trained conditional flow matching generation model. A conditional flow matching generation model is constructed, which includes a conditional encoder and a velocity field network. The flow matching loss is minimized by using a linear interpolation probability path from noise distribution to data distribution as supervision to obtain a trained conditional flow matching generation model.

[0029] S3: Based on the trained conditional flow matching generation model, the reference motion trajectory is generated by numerical integration of ordinary differential equations starting from the conditional vector. S4: Construct a general motion tracking training framework, set a general motion tracking strategy, and update the strategy parameters in the general motion tracking strategy based on the reference motion trajectory and the general motion tracking training framework using reinforcement learning objectives to obtain a trained general motion tracking strategy. The constructed general motion tracking training framework will use the reference motion trajectory Current robot body perception state Tracking error Together with the robot body code m, a general motion tracking strategy is input. Output joint motion or torque It interacts in a closed loop with the physical simulation environment and updates policy parameters using reinforcement learning objectives. A well-trained general motion tracking strategy is obtained.

[0030] S5: The reference motion trajectory is mapped to the underlying joint motion or torque through a trained general motion tracking strategy and output to the execution end.

[0031] The method provided by this invention mainly includes constructing a conditional flow matching generation model, training the conditional flow matching generation model to obtain a trained conditional flow matching generation model; based on the trained conditional flow matching generation model, generating a reference motion trajectory from the conditional vector through numerical integration of ordinary differential equations; and mapping the reference motion trajectory to low-level joint movements or torques using a trained general motion tracking strategy, and outputting it to the execution end. Through this method, the velocity field is learned from a multi-source robot motion dataset using the conditional flow matching generation model, enabling the real-time generation of rich, natural, and diverse reference motion trajectories under high-level user commands. Compared to methods based on diffusion models, this method offers more stable sampling and requires fewer inference steps. In one exemplary embodiment of the present invention, the preprocessing of the motion dataset includes: Perform time alignment and resampling, coordinate system and orientation unification, state and action normalization, and outlier filtering on multi-source data in the motion dataset; Each trajectory is sliced ​​using a sliding window of length L to obtain training samples. ; Label the condition vector for each sample .

[0032] in, For high-level movement instructions, For gait labeling, As a topographic feature, This refers to the robot body type.

[0033] In one exemplary embodiment of the present invention, training the conditional flow matching generation model includes: Set sampling time and initial sampling noise Sample target trajectory segments from training samples , This represents the probability distribution of real motion data. In other words, it's the statistical distribution followed by all motion trajectory segments in the training dataset. Constructing the probabilistic path and target velocity field The probability path, sampling time, and condition vector are fed into the velocity field network, and the flow matching loss is minimized. The flow matching loss is:

[0034] In the formula, For stream matching loss, For about , , With the mathematical expectation of the corresponding sampling distribution, The second norm of a vector; Indicates by parameters Representation of a velocity field neural network; Represents a condition vector. For probability paths, Sampling time, For the actual motion trajectory segments in the training data, This is the initial noise.

[0035] Specifically, the total loss is constructed based on the flow matching loss, including:

[0036] In the formula, For the total loss, For endpoint consistency loss, For trajectory smoothness loss, This is due to the loss of physical feasibility such as joint positioning and speed. For multimodal diversity loss; , , , These are the weighting coefficients.

[0037] In one exemplary embodiment of the present invention, generating the reference motion trajectory through numerical integration of ordinary differential equations includes: Initial noise sampled under conditional vector ,by For ordinary differential equations, numerical integration methods such as Euler or Runge-Kutta are used. Solving on [0,1] yields the generated trajectory; The generated trajectory is denormalized and decoded according to preset semantics into reference quantities such as joint position, joint velocity, and base state, thus forming a reference motion trajectory. ;in The reference trajectory segment of length T starting from time t can be denoted as: .

[0038] In one exemplary embodiment of the present invention, updating the policy parameters in the general motion tracking policy using a reinforcement learning objective based on a general motion tracking training framework includes: The strategy parameters serve as strategy inputs and include reference motion trajectory, current robot body perception state, tracking error, historical observations, and codes used to distinguish different robot bodies. The strategy output includes the underlying joint motions or torques, which, after being applied to the physical simulation environment, yield the state and tracking error at the next moment. Using PPO or Actor-Critic type reinforcement learning algorithms, policy updates are performed by maximizing the following objectives:

[0039] In the formula, Loss due to strategy update For reference trajectory tracking rewards or losses, For loss of motion smoothness, To mitigate consistency loss, This refers to energy consumption constraint losses.

[0040] It also includes introducing training enhancements when training a general motion tracking strategy, said training enhancements including at least one or more of the following: Random noise is injected into the reference trajectory to simulate the prediction error of the generative model; A random tracking delay is introduced between policy inputs and actions to simulate communication and control delays; Randomize the terrain, including flat land, steps, slopes, gravel, and complex terrain; Randomize user commands to broaden command distribution; Add observation noise to the body sensing sensor; External forces are applied to the robot in the simulator.

[0041] Secondly, the present invention also provides a general motion control system for robots based on flow matching generative motion priors, for executing the aforementioned general motion control method for robots based on flow matching generative motion priors, comprising: The data processing module is configured to acquire multi-source robot motion datasets, and perform preprocessing, condition labeling and slicing, and output training samples and corresponding condition vectors. The motion prior generation module is configured to carry a trained conditional flow matching generation model and generate reference motion trajectories online according to instructions. The general motion tracking module is configured to carry the trained general motion tracking strategy, referencing the motion trajectory, current state, and tracking error. The common mapping is to the underlying joint motion or torque; The execution module is configured to output the obtained joint movements or torques to the robot control interface to drive the robot to complete the corresponding motion tasks.

[0042] In a specific way, such as Figure 1 As shown, Figure 1 Logically, it can be summarized into five interconnected functional blocks (for consistency with the labeling in the attached diagram, the following will use the names of blocks A to E; the specific division is subject to the attached diagram): Block A (Offline Data Preparation): Used to construct the training dataset D. Data sources include, but are not limited to: motion logs and motion capture data collected from humanoid and quadruped robots in simulations or actual operation, as well as trajectory segments covering diverse terrains such as flat ground, steps, and gravel. Preprocessing and annotation steps transform the raw sequences into a unified representation that can be used for learning, typically including: state / action extraction, contact annotation, terrain encoding, gait / phase annotation, and command (cmd) annotation. A single training sample is denoted as trajectory segment x, which can represent task-related quantities such as joint position, joint velocity, base pose and velocity, and foot contact; the dataset is denoted as... ,in This is the condition information corresponding to this sample.

[0043] Block B (Higher Level: Flow Matching Motion Prior / Trajectory Generation): This block implements "conditional generative motion prior". The conditional input is often denoted as... in the attached diagram. Its components may include, but are not limited to: instructions (e.g., desired base speed) With yaw rate (etc.), terrain (e.g., height maps, accessibility maps, or terrain feature vectors), proprioception (Joint and base status), history (Past states / actions) and phases / skills (Gait phase or skill embedding). Flow matching model learns conditional velocity field. (Also referred to in some documents or figures) In the context of this invention, both represent the vector field that evolves the trajectory variable x with normalized time t, and the open-loop trajectory is generated by numerically solving the ordinary differential equation (ODE). Let the original open-loop trajectory output by the generator be denoted as . or Subsequently, a trackable reference trajectory can be obtained through trajectory regularization (e.g., projection or penalty of constraints such as dynamic feasibility, contact consistency, smoothness, velocity continuity, and foot / gait consistency). Where T or L represents the prediction time domain length or discrete sequence length, and the specific value is determined by the implementation example.

[0044] ,

[0045] Block C (Lower Layer: General Motion Tracker / Policy): This block implements the mapping from reference trajectory to executable action. The general motion tracking policy is denoted as... Its input includes at least a reference trajectory. Current ontology state and tracking error The output is the underlying action. (Joint torque, target position, or normalized control variables). During the training phase, enhancement techniques such as reference noise, tracking error delay, terrain randomization, and disturbance injection can be introduced to improve robustness.

[0046]

[0047] Block D (Closed-Loop Control and Deployment): During online operation, users provide high-level commands via handheld devices, keyboards, or voice commands; within each control cycle, Block B generates / refreshes the reference trajectory, and Block C outputs the underlying actions to drive the robot's interaction with the environment; the environment then returns to the state for the next moment. And new tracking errors This forms a closed loop. State feedback is used both for the closed-loop control of the lower-level tracker and as part of the conditional input for the next cycle (e.g., updating in cond). and This enables the system to have the ability to "re-plan".

[0048] Block E (Training Objective: Coupled Learning): This invention can couple and optimize the generative model and the tracker during the training phase. On one hand, the flow matching term learns the data distribution and forms motion priors; on the other hand, a trackability-related objective is introduced, enabling the generated trajectory to be recognized in physical simulations. Stable reproduction. An exemplary overall goal can be written as:

[0049] Where L_FM is the flow matching loss (see below) Figure 2 Implementation method); L_track represents the reference trajectory and strategy The expected tracking error under combined effects, for example, for norm penalty Or a negative sign form opposite to the tracking reward; The trajectory quality regularization term can be decomposed into a weighted sum of dynamics, contact, and smoothing terms.

[0050] , as well as The internal weight coefficients are determined by hyperparameter search or validation set performance. It is important to emphasize that block E represents the target decomposition method at the training level and does not require simultaneous optimization of the target during a single backpropagation. and Update: In engineering implementation, a phased training approach can also be adopted: first train the flow matching model, then fix or fine-tune the generator and train it. .

[0051] In addition to the above five block divisions, Figure 1 It can also be understood from the perspective of a "three-stage pipeline" to align with the engineering implementation process: (i) Data-driven motion generation model learning (Flow Matching): After preprocessing the multi-source dataset, a conditional velocity field network is trained, enabling the model to generate a reference trajectory from noise through ODE integration under instruction conditions; (ii) General motion tracker training: Using the generated trajectory as a reference supervision source, the system is trained in simulation. This enables high-fidelity tracking across multiple entities and terrains; (III) Real-time reasoning and closed-loop execution: online generation And by The process involves three interconnected steps: multi-source dataset → stream matching generation model → training a general motion tracker → online generation of reference trajectories + tracking execution → robot completing the generalized motion task.

[0052] Please refer to Figure 2 . Figure 2 The offline training pipeline of the motion prior model of this invention is shown in the form of a "Conditional Flow Matching Model Training Block Diagram". To facilitate the examiner's matching of the figures with the text, Figure 2 The sections are typically divided from left to right and top to bottom: left side "Data Preparation", middle section "Conditional Flow Matching Model Training", top right section "Model Output (ODE Integral Generation)", and bottom section "Training Objectives and Loss". The bottom of the accompanying diagram may also include supplementary explanation boxes for training strategies, evaluation metrics, and model storage and deployment. The following sections... Figure 2 The mathematical symbols, probability path construction, loss function, and single-step training process involved are explained in detail.

[0053] Figure 2 The main symbols and their meanings are as follows (consistent with the annotations in the attached figures, and equivalent notations are allowed without changing the technical essence): x represents a trajectory segment of length L, each of which may contain task-related components such as joint position, joint velocity, base state, and foot contact at each time step; This indicates the starting point for sampling from the Gaussian noise distribution. Indicates the distribution of real data Or target trajectory segments sampled from empirical datasets; This represents the normalized continuous time of the flow matching process (unlike the discrete time step index in the robot control cycle). This represents the interpolated state corresponding to time t on the probability path; or Indicated by neural network parameters Parameterized conditional velocity field; This represents a conditional encoder that maps discrete / continuous conditions (cmd, gait_id, terrain, robot_type, etc.) to conditional vectors. ; Represents the weighting coefficients of each auxiliary loss term; This represents the model parameters after training or a copy of its exponential moving average (EMA).

[0054] Figure 2 The training process in a single iteration can be summarized as follows (the example can be implemented using mini-batch stochastic gradient descent): Step (1) Extract a batch of real trajectory segments from the dataset and sample the corresponding conditions, and then... The conditional encoder uses a neural network to map discrete / continuous conditional information into a unified conditional vector, obtaining c; step (2) sampling. , and with Constructing for real fragments relative to target speed Step (3) Forward computation And calculate the total loss L according to L_FM and its auxiliary terms; step (4) for (and optionally for) (Parameters) Backpropagation and parameter update; step (5) Updates EMA weights according to the exponential moving average rule for stable inference. The inference phase is fixed. From noise Departure to ODE Numerical integration yields .

[0055] Algorithm 1: Conditional Flow Matching Generation Model - Single Training Iteration Input: Training dataset Velocity field network Conditional encoder Learning rate ; Output: Updated parameters.

[0056] Step 1: Sample a batch of training samples from the dataset; Step 2: Conditional Encoding — Mapping discrete / continuous conditions to a unified conditional vector; Step 3: Sample normalization time ; Step 4: Sample initial noise ; Step 5: Construct intermediate states on the linear interpolation probability path ; when hour It is pure noise. The data at the beginning is real data, and the middle part is a linear transition.

[0057] Step 6: Differentiate from the linear interpolation path to obtain the target velocity field. (Closed-form solution, key to stable training) .

[0058] #The physical meaning of this velocity field: the "straight line direction" from the current position to the target data; Step 7: Forward propagation of the velocity field network. ; Step 8: Calculate the flow matching loss (core supervision signal—matching the predicted velocity field with the target velocity field);

[0059] # That is, for each sample, calculate the mean square error between the predicted speed and the actual speed; Step 9: Obtain the predicted endpoint by integrating the ODE (used to assist loss). ) ; # In actual training, a 2-5 step Euler integral approximation can be used to reduce computational overhead. #

[0060] Step 10: Calculate the four auxiliary losses

[0061] # Endpoint Consistency: The integral endpoint should be as close as possible to the actual data.

[0062]

[0063] # Trajectory smoothness: For the second-order difference operator along the time dimension

[0064] # Suppress high-frequency jitter in the generated trajectory to make it smooth and trackable.

[0065]

[0066] # Physical feasibility: Hinge penalty for joint limit + joint velocity limit

[0067] # Diversity: Under the same conditions Below, different initial noise The generated trajectory # Differences should be maintained ( For distance metrics between trajectories, such as mean Euclidean distance or MMD. # Taking negative values ​​encourages diversity and prevents pattern collapse. Step 11: Calculate the total loss (weighted summation)

[0068] # Typical weight values:

[0069] Step 12: Backpropagate and update parameters

[0070]

[0071] Step 13: (Optional) Update the exponential moving average (EMA) parameters for stable inference. #

[0072] Step 14: Return the updated parameters

[0073] Key Mechanism Explanation: Step 6 Target Velocity Field It is the core supervisory signal for the entire training process—it explicitly tells the neural network: at the current moment... and current location What speed and direction should one move in to reach the real data along the probability path? .

[0074] Due to the simplicity of the linear interpolation path, the target velocity field is constant (not changing with...). (Change), which is the fundamental reason why flow matching training is more stable than diffusion models.

[0075] Approximate processing of ODE integration in step 9: If the gradient is calculated for the complete ODE integration process during training, the computational cost is large.

[0076] In engineering practice, a coarser-grained Euler integral can be used. (Step) to approximate It can provide effective endpoint consistency supervision while ensuring training efficiency.

[0077] The reasoning phase uses a more refined number of integration steps ( To obtain high-quality trajectories.

[0078] ① Data Preparation Stage. There are N robot datasets (e.g., robot datasets A, B, ..., N), each covering motion sequences on complex terrain. The following processing is performed on each original trajectory r: (a) Time alignment and resampling: all data are resampled according to a unified control period Δt; (b) Coordinate system consistency and orientation alignment: the base coordinate system is aligned to a unified world or machine coordinate system; (c) State / motion standardization: normalization is performed by removing the mean and dividing the variance of each component's statistics; (d) Outlier filtering: abnormal segments such as joint overruns and falls are removed; (e) Each trajectory is divided into trajectory segments of length L using a sliding window method to obtain training samples. At the same time, a condition vector is labeled for each sample. Where cmd represents the motion command (such as linear velocity). and yaw rate ), gait_id represents the gait label (trot, pace, bound, walk, etc.), terrain represents the terrain features (elevation map or accessibility, etc.), and robot_type represents the robot type.

[0079] ② Conditional flow matching model training phase. Let the conditional encoder be... , the above conditional components The conditional vector is obtained by concatenating the data and passing it through several fully connected / convolutional layers. Simultaneously perform three types of sampling: time sampling Initial noise sampling Data sampling (That is, sampling trajectory segments from the training samples). Based on the linear interpolation probability path, the intermediate state at time t is defined. for:

[0080] The corresponding target velocity field is:

[0081] Conditional Flow Matching Network That is, velocity field network Its input is The output is a velocity field / direction field, denoted as This network typically employs a 1D temporal convolution or Transformer backbone, encoding time t as sine and cosine time embeddings, concatenating them with condition c, and then feeding them into the network. The training objective is to make the network output approximate the true velocity field as closely as possible. .

[0082] In the reasoning phase, given condition c and starting point... ,Will Treat it as an ordinary differential equation and use an ODE solver such as Euler or Runge-Kutta. Integrating the curves, we obtain the predicted trajectory. .Should That is, corresponding Figure 2 The predicted trajectory shown in the "Model Output" module in the upper right corner can be used as a reference motion trajectory for the lower-level tracker after inverse normalization and semantic decoding. .

[0083] [Algorithm 2: Flow Matching Model Inference - ODE Integral Generation of Reference Motion Trajectory] Input: Conditional information , Velocity Field Network (Using EMA parameters) ), Conditional encoder Integral steps (suggestion ), Numerical methods

[0084] Output: Reference motion trajectory

[0085] Step 1: Encode the condition vector

[0086] Step 2: Sample initial noise # Sampling from a standard Gaussian distribution Step 3: Set the integration step size

[0087] Step 4: Solving ODE numerical integration

[0088] Euler's method – First-order accuracy, minimal computational cost. for step = 1 to : # Current normalized time # Network forward propagation # Step along the velocity direction end for [Runge-Kutta 4th Order Method - Fourth Order Precision, Requires 4 Network Forward Passes per Step] for step = 1 to :

[0089]

[0090]

[0091]

[0092]

[0093]

[0094] end for

Dopri5 Adaptive Method—Variable Step Size, Automatic Error Control

[0095] # When the points are finished, That is, the generating trajectory in the normalized space.

[0096] Step 5: Denormalization — Restore the trajectory in the normalized space to the physical space. right Each feature dimension :

[0097] # For the training data Standard deviation and mean of dimension (calculated and saved during data preprocessing). Step 6: Semantic Decoding—Splitting Physical Quantities According to Preset Feature Dimensions ← # Joint position ( (one joint) ← # Joint speed ← # Base pose (position 3D + pose 4-ary) ← # Base velocity (linear velocity 3D + angular velocity 3D) ← # Foot contact ( (each foot end) Step 7: Assemble the reference motion trajectory ,return Real-time trajectory refresh strategy: In closed-loop control, it is not necessary to regenerate the complete trajectory every control cycle. Typically, every [per cycle]... Control cycle (like (Approximately 200 ms) Regenerating a length of... The reference trajectory.

[0098] Between two generation cycles, the tracking strategy continues to use the remaining trajectory fragments from the previous generation.

[0099] This "lazy refresh" strategy significantly reduces the average computational cost of online inference while maintaining the timeliness of the trajectory.

[0100] ③ Training Objectives and Loss. The total loss for conditional flow matching training consists of several parts, specifically including: (i) Flow matching loss (velocity matching): This loss makes the predicted velocity field match the actual velocity field, defined as...

[0101] (ii) Endpoint consistency loss:

[0102] The endpoint obtained by constrained integration With the true endpoint Consistent.

[0103] (iii) Trajectory smoothness loss:

[0104] Where Δ² represents the second-order difference operator, used to suppress high-frequency jitter in the generated trajectory.

[0105] (iv) Loss of physical legitimacy This includes penalty terms such as joint limit constraints, joint velocity upper limit constraints, and feasible region constraints related to the robot model.

[0106] (v) Multimodal diversity loss By analyzing different noise levels under the same condition c Multiple samplings at the start are used to measure diversity (e.g., in-batch cosine distance or MMD) to encourage the model to learn diverse motion patterns.

[0107] (vi) Total loss is defined as:

[0108] in These are the weighting coefficients.

[0109] In terms of training strategy, this invention employs large-scale data hybrid training (co-training of humanoid and quadrupedal models), supplemented by curriculum learning (gradually introducing complex terrain from easy to difficult), data augmentation (noise / temporal / mirror), EMA, and learning rate scheduling techniques. Evaluation metrics include trajectory reconstruction error (ADE / FDE), velocity / acceleration error, energy consumption / smoothness metrics, and diversity metrics (coverage / MMD). The model saving and deployment section includes saving the optimal model parameters. It can export inference models (EMA models) and support CPU / GPU inference acceleration.

[0110] It should be noted that the symbol x represents a state / action sequence (joint position, velocity, root state, etc.). is the normalized time variable; c is the condition vector (command, gait, terrain, robot type, etc.). Flow matching learns the data distribution by matching the velocity field, thus requiring fewer ODE integration steps to generate high-quality trajectories during inference.

[0111] Furthermore, Figure 2 The linear interpolation probability path in the model is a specific implementation of conditional flow matching: its advantage lies in the target velocity field. It has a closed-form expression and is stable during training; in a more general embodiment, other probabilistic paths that satisfy the boundary conditions can also be used, as long as the target velocity field is modified accordingly and matched in the loss.

[0112] Please refer to Figure 3 . Figure 3 The diagram shows the "bottom layer: General MotionTracker training framework." To help reviewers understand the types of arrows in the accompanying figures, Figure 3 The following diagram is typically used: solid black arrows represent data flow (e.g., the transfer of reference trajectories, states, and actions between modules); dashed black arrows represent training enhancement signals or closed-loop feedback flow (e.g., disturbance injection, state / error feedback); solid purple (or highlighted) arrows represent the online deployment process (user command → online generation of reference trajectory → real-time tracking → robot execution). The above diagrams are for interpreting the accompanying drawings and do not constitute a limitation on the connections.

[0113] This embodiment further presents a training framework for a low-level universal motion tracker. This framework is applicable to low-level motion tracking of humanoid robots and quadruped robots, supporting stable and robust tracking in different shapes and diverse terrains. The framework consists of four sub-parts: A, B, C, and D. The mathematical symbols, formulas, and processes of each part are described in detail below.

[0114] A. Upper-level reference trajectory input: Upper-level flow matching trajectory generator (i.e.) Figure 2 The trained conditional flow matching model outputs a reference motion trajectory segment of length T after time t. Its form can include humanoid robot walking sequences or quadruped robot trotting sequences. The conditional information cmd (instruction), terrain, gait (gait / skill), and robot_type (robot type) work together in the upper-level generator and enter the lower-level tracker along with the reference trajectory.

[0115] B. Motion tracker training: This includes three sub-steps.

[0116] B-1) Input Observation: General Motion Tracking Strategy The input consists of the following parts: reference trajectory Current robot status ,in These represent joint position and joint velocity, respectively; ω is the angular velocity of the base; and v is the linear velocity of the base. Foot contact state; tracking error (Position error / velocity error / foot contact error); Historical observations (used to overcome observation latency and partial observability); and robot morphology encoding m (e.g., robot type one-hot or learned embedding, used to distinguish entities in multi-entity sharing strategies).

[0117] B-2) General motion tracking strategy : with parameters The Actor-Critic class network (which can be implemented) receives the above inputs and outputs the underlying actions. Its strategy can be formalized as follows: (11) B-3) Action Output: These are the underlying joint movements or torques that act on the humanoid or quadruped robot body in the physical simulator.

[0118] In the training enhancement (robustness improvement) part, this invention introduces reference noise (towards) during the tracking policy training phase. These training enhancements include: injecting random perturbations to simulate generative model prediction errors; tracking error latency (introducing random latency between policy output and execution to simulate communication and control latency); terrain randomization (including flat ground, steps, slopes, and gravel / complex terrain); command randomization (randomizing the direction, amplitude, and switching of the command line); external force perturbations (applying random thrust to the robot in the simulator); and sensor noise (superimposing Gaussian noise on the proprioception sensors). These training enhancements improve the trained policy... It exhibits good robustness during testing.

[0119] Algorithm 3: General Motion Tracking Strategy - Single PPO Training and Update Iteration Input: Stream matching generation model (Trained and with fixed parameters) Tracking strategy (To be trained, including an Actor network) and Critic Network ), Physical simulation environment (Covering multiple terrains and multiple robot bodies) PPO hyperparameter: clipping threshold GAE parameters Number of training rounds

[0120] Output: Updated policy parameters

[0121] Step 1: Randomly sample training conditions (enhancing condition diversity) # Random speed command # Random Terrain Type # Random Gait # Random robot body

[0122] Step 2: Invoke the flow matching model to generate a reference trajectory

[0123] # Use fewer integration steps (8 steps) during the training phase to speed up data generation. Step 3: Initialize the simulation environment

[0124] Obtain initial observations:

[0125] in: This is the initial state of the entity. This represents the initial tracking error (the error is zero at the initial moment). A historical observation buffer initialized to zero. Robot morphology encoding Step 4: Gather rollout experience (closed-loop interaction with the simulation environment) for step = 1 to : # 4a) Strategic Reasoning—From Observation to Action

[0126] # 4b) Apply training enhancements (six types to improve policy robustness) # Random Delay

[0127] # Adding noise to the reference trajectory

[0128] # Sensor noise (range) ) # Random External Forces

[0129] # 4c) Simulate execution of actions

[0130] # 4d) Calculate tracking error and update history

[0131] # Slide window to update history # 4e) Construct the next observation and store the transfer

[0132] Store and transfer tuples

[0133] end for Step 5: Calculate the Generalized Advantage Estimation (GAE) For each time step ,calculate: # TD Error # GAE Advantage Function # Typical values: (Discount factor) (GAE attenuation parameter) Step 6: PPO Multiple Rounds of Updates (Reusing the Same Batch of Rollout Data) for epoch = 1 to (generally ): for each mini-batch: # Calculate the probability ratio of the strategy

[0134] # PPO clipped agent target (limiting policy update range)

[0135] # To set a pruning threshold and prevent policy mutations. # Value function loss

[0136] # Accumulate rewards for discounts # Auxiliary penalty items

[0137] # Motion smoothness: Penalize abrupt changes in motion between adjacent time steps

[0138] # Contact Consistency: Foot contact pattern consistent with reference

[0139] # Energy Constraints: Penalizing Excessive Joint Torque # Overall Optimization Goal

[0140] # Parameter Update

[0141] end for Step 7: Synchronize old strategy parameters

[0142] Please refer to the training enhancement parameter summary table: Table 1 Summary of Training Enhancement Parameters

[0143] C. Simulation Environment and Closed-Loop Tracking: The physical simulator (Robot) covers both humanoid and quadrupedal robots; the environment includes flat ground, steps, slopes, and gravel / complex terrain. The robot performs actions. Then, the simulator returns to the state of the next moment. With tracking error This forms a closed-loop feedback loop, flowing back to the policy input. The tracking target / reward includes posture tracking, velocity tracking, contact consistency, energy constraints, and stability. Specifically, the overall training objective can be expressed as:

[0144] The optimization and algorithm adopt PPO and Actor-Critic, and supports joint optimization of model + reinforcement learning.

[0145] D. Deployment and Real-time Operation: During the real-time deployment phase, the user inputs commands (forward / turn / accelerate / jump, etc.); the upper-level Flow Matching model generates a reference trajectory online. The lower-level General Motion Tracker (i.e., the trained general motion tracking strategy) Real-time tracking And output the underlying actions The robot performs actions and generates new state feedback. The entire process is real-time and robust with closed-loop characteristics, and can be generalized to different robot bodies and terrains.

[0146] Algorithm 4: Real-time Closed-Loop Control Main Loop Input: Flow matching model (EMA version), tracking strategy , User command interface (gamepad / keyboard / voice), robot hardware interface Output: Drive the robot to complete the specified multimodal motion task. initialization: Current robot type Track refresh cycle (Number of control cycles) Control cycle

[0147] Initial reference trajectory (generated by calling Algorithm 2) Main loop (executed once per control cycle): 1. Read high-level user commands:

[0148] Current gait selection (or automatic switching based on cmd) Current terrain estimate (from the perception module or specified by the user) 2. Is it necessary to refresh the reference trajectory? if :

[0149] # GPU inference time approximately

[0150]

[0151] 3. Obtain the current perception state of the robot:

[0152] 4. Calculate the tracking error:

[0153] # Includes: Base seat pose error Base speed error , #Joint position error Joint speed error , #Foot contact error

[0154] 5. Construction Strategy Observation:

[0155] 6. Strategy reasoning, output action: # GPU inference time approximately

[0156] 7. Decode the action and send it to the actuator: # Convert to joint torque command

[0157] 8. Update the historical observation buffer:

[0158] 9. Wait for the next control cycle to be triggered. Real-time performance analysis (typical embedded GPU platforms, such as NVIDIA Jetson Orin): — Flow matching model inference (8-step Euler integral): approximately

[0159] — Tracking strategy reasoning (single forward pass): approximately

[0160] — Total AI inference time: (far below typical control cycle) ) It meets the time delay requirements for real-time closed-loop control.

[0161] If CPU inference is used (ONNX Runtime optimization), the total time is approximately Still available Completed within the control cycle.

[0162] Combination Figure 3 The key quantities in the underlying framework are summarized below to help examiners quickly grasp the symbology: This represents a reference trajectory window of length T starting from time t, which can be refreshed online by the upper-layer flow matching model; Let be the entity observation vector at time t; The tracking error between the reference and the actual measurement (which may include base pose error, linear velocity / angular velocity error, foot contact timing error, etc.); m is the robot morphology code, used to distinguish different bodies such as humanoids and quadrupeds in the same policy network. The control quantity (torque or target angle) applied to the joint; The tracking accuracy, motion smoothness, contact consistency, and energy consumption constraints are characterized separately, and their specific weighting forms can be implemented one by one with the reward items in the system.

[0163] Evaluation metrics include tracking error (position / attitude / velocity / contact), success rate (task completion rate), robustness (disturbance / unseen terrain), and generalization (generalization to different robots and terrains).

[0164] It should be noted that the dual-layer control architecture proposed in this invention has significant scalability: when new robot body or new terrain data is acquired, only the condition vector c and robot morphology code m can be extended, and the flow matching model and general motion tracking strategy can be incrementally trained without redesigning the entire control framework.

[0165] Please refer to Figure 4 and Figure 5 The method described in this invention can be specifically applied to humanoid robots. Wherein, Figure 4 This paper illustrates the overall algorithm framework for applying the present invention to humanoid robots, including offline data preparation (human motion capture datasets, such as AMASS, HumanML3D; humanoid robot simulation data; various skills: walking, manipulating, jumping, turning, etc.), high-level flow matching motion priors (trajectory generation), low-level general motion tracking strategies, and closed-loop control and deployment. Figure 5 This further illustrates the two-layer training framework in this application scenario: an upper-layer flow matching motion prior (trajectory generator) and a lower-layer general motion tracker (controller). The upper layer is responsible for training based on conditional inputs (instructions). ,terrain Proprioception ,history Stage / Skill The lower layer generates a reference trajectory, and the lower layer is responsible for mapping the reference trajectory to the joint motions or torques of the lower layer. And it acts on the humanoid robot body.

[0166] Please refer to Figure 6 and Figure 7 The method described in this invention can also be specifically applied to quadruped robots. Figure 6 This paper illustrates the overall algorithm framework for applying the present invention to quadruped robots, including offline data preparation (such as logs and simulation data of quadruped robots like Cornell Dog MoCap and UnitreeGo1, as well as various skills such as trotting, running, jumping, climbing, and turning), high-level flow matching motion priors (trajectory generation), low-level general motion tracking strategies, and closed-loop control and deployment. Figure 7 This further illustrates the two-layer training framework, consisting of the upper and lower layers, in this application scenario.

[0167] The two types of application instances mentioned above share the same algorithm framework (i.e. Figure 1 — Figure 3As shown in the figure, the differences lie only in the data source, the robot ontology encoding m, and some network dimensions. This indicates that the proposed two-layer architecture of "stream matching generative motion prior + universal motion tracker" has cross-ontology versatility.

[0168] Furthermore, the functional units in the various embodiments of the present invention 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.

[0169] 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. This computer software product, stored in a storage medium, includes several 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 the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0170] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A general motion control method for robots based on flow matching generative motion priors, characterized in that, include: Obtain a multi-source robot motion dataset, preprocess the motion dataset to obtain training samples and conditional vectors corresponding to each sample; A conditional flow matching generation model is constructed. The linear interpolation probability path from the noise distribution to the data distribution is used as supervision. The flow matching loss is minimized, and the conditional flow matching generation model is trained to obtain the trained conditional flow matching generation model. Based on the trained conditional flow matching generation model, a reference motion trajectory is generated by numerical integration of ordinary differential equations starting from the conditional vector. A general motion tracking training framework is constructed, a general motion tracking strategy is set, and the strategy parameters in the general motion tracking strategy are updated using reinforcement learning objectives based on the reference motion trajectory and the general motion tracking training framework to obtain the trained general motion tracking strategy. The reference motion trajectory is mapped to the underlying joint motion or torque through a well-trained general motion tracking strategy and output to the execution end.

2. The general motion control method for robots based on flow matching generative motion priors according to claim 1, characterized in that, The preprocessing of the motion dataset includes: Perform time alignment and resampling, coordinate system and orientation unification, state and action normalization, and outlier filtering on multi-source data in the motion dataset; Each trajectory is sliced ​​using a sliding window of length L to obtain training samples; a conditional vector is labeled for each sample.

3. The general motion control method for robots based on flow matching generative motion priors according to claim 1, characterized in that, The training of the conditional flow matching generation model includes: By setting the sampling time and initial sampling noise, target trajectory segments are sampled from the training samples to construct a conditional flow matching generation model. ; Construct a probability path and a target velocity field, feed the probability path, sampling time, and condition vector into the velocity field network, and minimize the flow matching loss, which is: In the formula, For stream matching loss, For about , , With the mathematical expectation of the corresponding sampling distribution, The second norm of a vector; Indicates by parameters Representation of a velocity field neural network; Represents a condition vector. For probability paths, Sampling time, For the actual motion trajectory segments in the training data, This is the initial noise.

4. The general motion control method for robots based on flow matching generative motion priors according to claim 3, characterized in that, The total loss is constructed based on the flow matching loss, including: In the formula, For the total loss, For endpoint consistency loss, For trajectory smoothness loss, This is due to the loss of physical feasibility such as joint positioning and speed. For multimodal diversity loss; , , , These are the weighting coefficients.

5. A general motion control method for robots based on flow matching generative motion priors according to claim 4, characterized in that, The process of generating the reference motion trajectory through numerical integration of ordinary differential equations includes: Initial noise is sampled under the conditional vector, in order to For ordinary differential equations, numerical integration is performed in... Solving on [0,1] yields the generated trajectory; The generated trajectory is denormalized and decoded into several reference quantities according to preset semantics to form a reference motion trajectory.

6. The general motion control method for robots based on flow matching generative motion priors according to claim 5, characterized in that, The method of updating the policy parameters in the general motion tracking policy using reinforcement learning objectives based on the general motion tracking training framework includes: The strategy parameters serve as strategy inputs and include reference motion trajectory, current robot body perception state, tracking error, historical observations, and codes used to distinguish different robot bodies. The strategy output includes the underlying joint motions or torques, which, after being applied to the physical simulation environment, yield the state and tracking error at the next moment. The policy is updated by maximizing the following objectives using a reinforcement learning algorithm: In the formula, Loss due to strategy update For reference trajectory tracking rewards or losses, For loss of motion smoothness, To mitigate consistency loss, This refers to energy consumption constraint losses.

7. A general motion control method for robots based on flow matching generative motion priors according to claim 1, characterized in that, It also includes introducing training enhancements when training a general motion tracking strategy, said training enhancements including at least one or more of the following: Random noise is injected into the reference trajectory to simulate the prediction error of the generative model; A random tracking delay is introduced between policy inputs and actions to simulate communication and control delays; Randomize the terrain, including flat land, steps, slopes, gravel, and complex terrain; Randomize user commands to broaden command distribution; Add observation noise to the body sensing sensor; External forces are applied to the robot in the simulator.

8. A general motion control system for robots based on flow-matching generative motion priors, characterized in that, A general motion control method for robots based on flow matching generative motion priors as described in any one of claims 1-7, comprising: The data processing module is configured to acquire multi-source robot motion datasets, and perform preprocessing, condition labeling and slicing, and output training samples and corresponding condition vectors. The motion prior generation module is configured to carry a trained conditional flow matching generation model and generate reference motion trajectories online according to instructions. The general motion tracking module is configured to carry the general motion tracking strategy obtained from training, and to map the reference motion trajectory, current state, and tracking error together into the underlying joint motion or torque. The execution module is configured to output the obtained joint movements or torques to the robot control interface to drive the robot to complete the corresponding motion tasks.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the general motion control method for robots based on flow matching generative motion priors as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements a general motion control method for robots based on flow matching generative motion priors as described in any one of claims 1-7.