A hierarchical domain randomization method and system for robot training scene construction
Patent Information
- Application Number
- CN202611280721.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-23
- Publication Date
- 2026-10-16
AI Technical Summary
[0012]具体而言,本发明所要解决的技术问题包括:其一,如何在显著扩大随机化范围以提升多样性的同时,保证所生成场景在几何、物理与语义三个层面的自洽性,从根本上降低无效样本比例;其二,如何在引入生成式模型这一不可控组件的前提下,仍然获得对场景的参数级描述能力,实现场景的精确复现、回放、课程组织与消融分析;其三,如何使随机化的作用维度与作用强度不再依赖人工试错,而是依据其对策略泛化性能的实际贡献自动分配,把有限的生成与仿真算力投入到真正有效的维度上;其四,如何在场景校验不通过时避免整场景重新生成,将修复与重采样的代价限制在最小范围内,提高单位算力的有效场景产出率
[0033] First, it significantly reduces the proportion of invalid scenarios. Inter-layer hard constraint propagation eliminates cross-layer contradictions during the sampling phase, feasible region projection pulls back infeasible samples instead of discarding them, and the three-level gate performs a final check. The combination of these three factors greatly reduces the proportion of scenarios that are geometrically or semantically invalid, and significantly improves the signal-to-noise ratio of the training data.
Smart Images

Figure CN122927063A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot simulation and embodied intelligence training technology, specifically to a method and system for constructing robot training scenarios using hierarchical domain randomization. More particularly, it relates to a method, system, electronic device, and computer-readable storage medium for constructing simulation training scenarios that collaboratively schedules rule constraints and generative models within a hierarchical parameter space and is driven by a closed-loop training utility mechanism. This invention can be applied to the strategy training and simulation for real-world transfer in embodied intelligence tasks such as robot grasping and manipulation, mobile robot navigation, industrial sorting, and home service robots. Background Technology
[0002] In large-scale training of robot strategies, directly collecting training data in real-world environments presents inherent challenges, including high acquisition costs, significant hardware degradation, the inability to reproduce hazardous conditions, and a scarcity of long-tail scenario samples. Therefore, the industry generally adopts a technical approach of large-scale training in simulations followed by deployment in real-world environments. The core obstacle facing this approach is the systematic difference between simulators and the real world in terms of geometry, visual appearance, physical properties, and sensor characteristics—the so-called "reality gap."
[0003] To bridge the gap between reality and the real world, domain randomization has become a mainstream technique. This involves applying random perturbations to parameters such as texture, lighting, object pose, and friction coefficient during simulation, causing these parameters to fall within the distribution range seen during training. This forces the policy to learn representations insensitive to these perturbations. Based on this approach, existing technologies can be broadly categorized into three types.
[0004] One existing technique is flat domain randomization, also known as unstructured domain randomization. This type of approach organizes all randomizable variables in the simulator into a flat parameter vector, with each dimension being randomly sampled independently within a predefined interval. Typically, upper and lower limits are set for texture maps, light source positions, initial poses of objects, mass, and friction coefficients, and then uniformly sampled.
[0005] This type of approach has the following drawbacks. First, it disrupts the coupling relationships within the scene. Variables in real-world scenes have strong dependencies: the height of an object on a table depends on the height of the table; the functional category of a room determines the types of objects that may appear within it; and the mass of an object is constrained by its density relationship with its volume and material. Independent sampling of each dimension will generate numerous scenarios that are physically or semantically invalid, such as a suspended water glass, a toilet in the kitchen, or objects with severely mismatched volume and mass. Second, the proportion of invalid samples is high, resulting in a low training signal-to-noise ratio. Once these invalid scenarios enter the training data, they not only waste generation and simulation computing power but also induce the policy to learn incorrect causal relationships, thus harming its performance in real-world environments. Third, the randomization range can only be manually tuned through trial and error; if the range is too narrow, the policy generalization is insufficient; if the range is too wide, training is difficult to converge. Finding the balance between these two requires repeated parameter tuning for each task and each dimension, resulting in extremely high human costs and making it impossible to transfer and reuse. Fourth, the allocation of computing power lacks a basis; applying equal intensity randomization to all dimensions means that a large amount of computing power is consumed on dimensions that contribute very little to the generalization of the strategy, while the key dimensions that truly affect the success or failure of the migration are not sufficiently randomized.
[0006] The second existing technology is rule-driven procedural scene generation. This type of solution relies on manually written layout syntax, scene rules, or constraint satisfaction solvers to generate scenes. For example, furniture is placed according to room type rules, tabletop objects are arranged according to support relationship rules, and collision detection is used to ensure that the placement is legal.
[0007] This type of approach has the following drawbacks. First, diversity is limited by the coverage of the rule base; rules are essentially explicit enumerations of known situations, resulting in highly templated outputs that struggle to cover the long-tail distribution of the real world. The trained strategy experiences a sharp performance drop when encountering scenarios outside the rule base. Second, the marginal cost of expansion is high; each new scenario, object, or task introduced requires manually writing and debugging new rules. As the scenario library grows, conflicts between rules create additional maintenance burdens. Third, the appearance dimension is difficult to express with rules; subtle changes in material, texture, and lighting are difficult to characterize with symbolic rules, typically requiring combinations and replacements from a limited resource library, resulting in insufficient visual diversity.
[0008] The third existing technology is generative model-driven scene generation. This type of solution uses large language models to generate scene descriptions or scene graphs, uses diffusion models to generate textures and materials, and uses 3D generative models to directly generate object assets, thereby achieving far greater diversity than rule-based solutions.
[0009] This type of approach has the following drawbacks. First, it does not guarantee physical feasibility; the generated results commonly exhibit problems such as objects penetrating each other, objects suspending in mid-air, unstable support relationships, non-watertight triangular meshes, missing or geometrically inconsistent mass and inertia tensors. When these scenarios are incorporated into physical simulations, they can cause clipping and jitter, and in severe cases, lead to solver numerical divergence. Second, it is uncontrollable, untraceable, and unreproducible; the two generated results for the same prompt are different, and no deterministic parameter description of the scenario can be provided. The direct consequence is the inability to organize course-style training according to difficulty, the inability to reproduce the specific scenarios that lead to policy failure, and the inability to conduct rigorous ablation experiments. Third, the generation process is decoupled from the training process; the generator does not know which regions the current policy is still incapable of, and can only blindly pursue diversity. The unit sample cost of generative models is significantly higher than that of rule-based solutions, and the computational waste caused by blind generation is particularly considerable. Fourth, it introduces the distribution bias of the generative model itself; the preferences formed by the generative model on its training data will be injected into the robot's training data without discrimination, which may introduce systematic biases that are inconsistent with the real physical world, and due to the lack of parameter-level description, such biases are difficult to detect and correct.
[0010] In summary, the three types of solutions mentioned above each focus on different aspects of physical reliability, scenario diversity, and process controllability, and no solution can simultaneously satisfy all three. In general, existing technologies face the following three unresolved technical problems. First, there is the coupling problem: existing solutions lack explicit modeling of the hierarchical dependencies between randomization variables, leading to semantic or physical contradictions in the scenarios generated by randomization. Second, there is the feasibility problem: existing solutions lack a deterministic mechanism to bring infeasible generated results back into the feasible domain, relying solely on post-hoc discarding (rejecting sampling), resulting in a complete waste of the invested generation computational power, and the discard rate increases sharply as the randomization range expands. Third, there is the effectiveness problem: the distribution and intensity of randomization in existing solutions are static and pre-set manually, lacking a closed-loop feedback loop with the actual benefits of policy training, and failing to answer the core question of which dimension and intensity of randomization should be applied to determine training efficiency. Summary of the Invention
[0011] To address the shortcomings of the existing technologies, the present invention aims to provide a method and system for constructing robot training scenarios with hierarchical domain randomization, which simultaneously achieves high diversity, strong physical self-consistency, and complete controllability and reproducibility within the same framework, and allows the intensity and distribution of randomization to evolve automatically with the training process.
[0012] Specifically, the technical problems to be solved by this invention include: First, how to ensure the self-consistency of the generated scenes at the geometric, physical, and semantic levels while significantly expanding the range of randomization to improve diversity, thereby fundamentally reducing the proportion of invalid samples; Second, how to still obtain the ability to describe the scene at the parametric level under the premise of introducing the uncontrollable component of generative models, so as to achieve accurate reproduction, playback, course organization, and ablation analysis of the scene; Third, how to make the effect dimension and effect strength of randomization no longer depend on manual trial and error, but automatically allocated according to its actual contribution to the generalization performance of the strategy, so as to invest the limited generation and simulation computing power into the truly effective dimensions; Fourth, how to avoid regenerating the entire scene when the scene verification fails, limit the cost of repair and resampling to a minimum, and improve the effective scene output rate per unit of computing power.
[0013] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows.
[0014] In a first aspect, the present invention provides a method for constructing a robot training scenario using hierarchical domain randomization, comprising the following steps: S1. Obtain task description and real-world calibration data. The task description includes language instructions and skill objectives. The real-world calibration data includes color-depth scan data of the real scene, measured values of the physical properties of the target object, and response data recorded by the robot's trajectory in the real environment.
[0015] S2. Construct a hierarchical randomized parameter space and a directed acyclic graph with inter-layer constraints: Divide the randomizable variables in the simulation training scenario into L layers from top to bottom according to the abstract level, where L is an integer not less than 3. The parameter set of the l-th layer is denoted as Θ(l). The hierarchical randomized parameter space is Θ=Θ(1)×Θ(2)×…×Θ(L). Use a directed acyclic graph G=(V,E) to describe the inter-layer dependencies, where the nodes are parameter dimensions and the directed edges represent the range of feasible values of the target dimension constrained by the value of the source dimension.
[0016] S3. Initialize the distribution center, envelope broadening factor σ, and randomization budget b of each layer of randomized distribution.
[0017] S4. Execute dual-channel generation and gated fusion layer by layer from top to bottom: For the l-th layer, the fixed parameters θ(1:l-1) from the l-1-th layer and the task condition c are encoded into a condition vector and provided to both the rule channel and the generation channel. The rule channel performs constraint reasoning and constraint satisfaction solving based on the task ontology and constraint knowledge base, outputting the feasible domain F(l) of this layer and the rule solution θ_rule that satisfies all constraints. The generation channel outputs the candidate solution θ_aigc and confidence conf(l) of this layer based on the generative model. θ_rule and θ_aigc are weighted and fused according to the fusion weight α(l) to obtain the fusion result θ_mix. The fusion weight α(l) is calculated online by the coverage of the rule base of this layer to the current context cov(l), the confidence conf(l), and the diversity gap gap(l) of the current batch in this layer.
[0018] S5. Feasibility Projection and Physical Self-Consistent Repair: Project the fusion result θ_mix onto the feasible region F(l) of this layer, and take the point in F(l) that is closest to θ_mix as the fixed parameter θ(l) of this layer, that is, θ(l)=Π_F(l)(θ_mix)=argmin‖z-θ_mix‖_W, z∈F(l), and perform physical self-consistent repair on the projection result; where F(l)={θ∈Θ(l)|g_j(θ;θ(1:l-1))≤0, j=1,2,…,m}, g_j is the constraint function instantiated from the directed edge pointing to this layer in the directed acyclic graph, and ‖·‖_W is the weighted L2 norm normalized according to the dimensions of each dimension.
[0019] S6. Three-level consistency check and minimum backtracking: For the candidate scenarios obtained after executing steps S4 and S5 layer by layer, perform geometric level check, physical level check and semantic level check in sequence; when any level check fails, read the violated constraint and trace the cause of the constraint back along the incoming edge of the directed acyclic graph to locate the lowest level l* that caused the conflict. Only for the l* level and the layers below it, re-execute steps S4 to S6, and retain the parameters that have passed the check from the 1st level to the l*-1st level.
[0020] S7. Perform simulation on the scene that has passed all three levels of verification, advance physics and rendering in parallel, and produce mutually aligned multimodal training samples. Use the multimodal training samples to train the robot strategy.
[0021] Preferably, in step S2, L is an integer between 3 and 7; when L is 5, the first layer is the semantic-task layer, the second layer is the structure-layout layer, the third layer is the instance-asset layer, the fourth layer is the appearance-rendering layer, and the fifth layer is the physical-dynamic layer.
[0022] Preferably, in step S3, an anchored initialization with real measurements as anchor points is adopted. That is, the real distribution anchor points μ* of each parameter dimension are obtained from the real domain calibration data through parameter identification, and a truncated normal distribution is constructed in the feasible region with μ* as the center and the product of the envelope broadening factor σ and the dimension normalized scale s of that dimension as the standard deviation. The initial value of the envelope broadening factor σ is taken as 0.2 to 0.4.
[0023] Preferably, the fusion weights in step S4 are calculated online according to α(l)=sigmoid[w1·(1-cov(l))+w2·conf(l)+w3·gap(l)+b0]; continuous parameters are fused by convex combination, and discrete and structural parameters are interpreted as selection probabilities and selected according to Bernoulli distribution; and upper or lower limits are set for α(l) of each layer, wherein the upper limit of α(l) for the structure-layout layer and the physical-dynamic layer is 0.4, and the lower limit of α(l) for the semantic-task layer and the appearance-rendering layer is 0.5.
[0024] Preferably, the physical self-consistent repair in step S5 includes at least one of penetration resolution, support stabilization, gravity settlement pre-simulation, mesh watertightening and inertial recalculation, and legal interval truncation.
[0025] Preferably, the geometric level verification metrics in step S6 include residual penetration depth and overlap volume, connectivity and reachability of the navigation map, and the existence of inverse kinematics solutions; the physical level verification metrics include pose drift after gravity settling, whether joints exceed limits, whether self-collisions occur, and the numerical stability of the physical solver's propulsion; the semantic level verification involves calling a visual language model to score the consistency between the rendering results and the task description, and determining failure when the score is below a threshold; and the thresholds for the three levels of verification are dynamically adjusted as the training process progresses.
[0026] Preferably, the method further includes a randomization scheduling step driven by training utility feedback, that is, defining the utility gain U(l,k)=ΔJ(l,k) / C(l,k) and reallocating the randomization budget of each dimension according to b(l,k)←softmax[U(l,k) / τ], and subject to upper and lower budget constraints.
[0027] Preferably, the method further includes a success rate-driven course-based envelope broadening step, that is, when the verification success rate is greater than the upper threshold, the envelope broadening factor is expanded, and when it is less than the lower threshold, the envelope broadening factor is contracted, and a minimum interval round is set between two adjacent adjustments.
[0028] Preferably, the method further includes a scene fingerprint and a failure-driven directional resampling step, that is, using the cryptographic hash of the random seed, the parameter vector of each layer, the asset library version number and the generation model version number concatenated as the globally unique fingerprint of the scene, and constructing a new sampling distribution according to p_new(θ)∝p_base(θ)^(1-β)·p_fail(θ)^β.
[0029] Secondly, the present invention provides a hierarchical domain randomization robot training scene construction system, including a task ontology and constraint knowledge base module, a real domain calibration and anchor point estimation module, a hierarchical randomization parameter space management module, a rule constraint generation channel module, a generative content generation channel module, a dual-channel fusion gating module, a feasibility projection and physical self-consistency repair module, a three-level consistency verification and minimum backtracking module, a simulation execution and multimodal data output module, a training utility evaluation and randomization scheduling module, and a scene fingerprint and version management module. The functions and connections of each module correspond to the steps of the method described in the first aspect.
[0030] Thirdly, the present invention 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 steps of the method described in the first aspect.
[0031] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.
[0032] Compared with the prior art, the present invention has the following beneficial effects.
[0033] First, it significantly reduces the proportion of invalid scenarios. Inter-layer hard constraint propagation eliminates cross-layer contradictions during the sampling phase, feasible region projection pulls back infeasible samples instead of discarding them, and the three-level gate performs a final check. The combination of these three factors greatly reduces the proportion of scenarios that are geometrically or semantically invalid, and significantly improves the signal-to-noise ratio of the training data.
[0034] Secondly, it improves the output rate of effective scenes under the same computing power. Minimum backtracking avoids the regeneration of the entire scene, and projection repair allows the already invested generation computing power to be reused. Together, they reduce the generation cost per unit of effective scene.
[0035] Third, it achieves both diversity and physical reliability. The rule-based channel guarantees the physical and semantic baseline, while the generation channel provides novelty in the long-tail dimension not covered by the rules. The fusion gating allows the two to be matched as needed, breaking through the dilemma of existing solutions between diversity and reliability.
[0036] Fourth, the randomization range no longer relies on manual trial and error. Utility feedback and curriculum-based broadening transform the tuning of randomization strength into online optimization, significantly reducing the human cost of parameter tuning for new tasks and improving the framework's portability across different tasks.
[0037] Fifth, computing power allocation is significantly optimized. Budget reallocation automatically concentrates computing power on the most efficient dimensions, avoiding unnecessary randomization in dimensions unrelated to the task.
[0038] Sixth, it possesses complete reproducibility and auditability. Layered scenario fingerprints enable any scenario to be reproduced bit by bit, supporting failure replay, strict ablation, and dataset version management, thus solving the inherent defect of untraceability in generative schemes, while also providing a basis for compliance auditing of training data.
[0039] Seventh, targeted enhancement of weak links. Failure-driven importance resampling concentrates new samples in areas where the strategy is weak, while retaining the support set of the basic distribution to maintain overall coverage and avoid catastrophic forgetting.
[0040] Eighth, it has good scalability. The layered structure is not strongly coupled with the number of layers or the algorithms within each layer. The rule engine and the generative model can be replaced as a whole without affecting the rest of the framework, which facilitates continuous upgrades as the capabilities of the generative model evolve. Attached Figure Description
[0041] Figure 1 A block diagram of the overall architecture of the hierarchical domain randomized robot training scenario construction system provided in this embodiment of the invention; Figure 2 This is a schematic diagram of the hierarchical randomization parameter space and inter-layer constraint propagation in an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the principle of collaborative and fusion gating between the rule channel and the generation channel in an embodiment of the present invention. Figure 4 This is a schematic diagram illustrating the principle of feasible projection and physical self-consistent repair in an embodiment of the present invention; Figure 5 This is a flowchart of the three-level consistency verification gate and minimum backtracking at the geometric, physical, and semantic levels in an embodiment of the present invention; Figure 6 This is a closed-loop diagram of randomized budget adaptive scheduling driven by training utility feedback in an embodiment of the present invention; Figure 7 This is a schematic diagram of scene fingerprint encoding and failure-driven directional resampling in an embodiment of the present invention; Figure 8 This is a flowchart illustrating the overall process of constructing a hierarchical domain randomized robot training scenario, as provided in an embodiment of the present invention.
[0042] The following are the annotations in the attached figures: 10—Task ontology and constraint knowledge base module; 20—Real domain calibration and anchor point estimation module; 30—Hierarchical randomization parameter space management module; 40—Rule constraint generation channel module; 50—Generative content generation channel module; 60—Dual-channel fusion gating module; 70—Feasibility projection and physical self-consistency repair module; 80—Level 3 consistency verification and minimum backtracking module; 90—Simulation execution and multimodal data output module; 100—Policy training module; 110—Training utility evaluation and randomization scheduling module; 120—Scene fingerprint and version management module. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention. Where there is no conflict, the features of the various embodiments of the present invention can be combined with each other.
[0044] I. Overview of the Invention Concept. The core concept of this invention is to reconstruct domain randomization from a flat random sampling problem into a hierarchical, constrained, projective, and controlled generation problem driven by a closed loop of training utility. This concept is realized through four mutually supporting mechanisms. Mechanism 1 is hierarchical parameterization and inter-layer hard constraint propagation: all randomizable variables in the scene are split into L layers from top to bottom according to the abstract hierarchy, forming a hierarchical parameter space. The dependencies between layers are described by a directed acyclic constraint graph. The decisions already determined in the upper layer are no longer used as variables that can be randomized again, but are used to shrink the feasible domain of the lower layer in the form of hard constraints. Thus, cross-layer contradictions are eliminated in the sampling stage, rather than being discovered only during post-verification. Mechanism 2 is the collaborative operation of rule and generation channels and online fusion gating: two parallel channels, a rule engine and a generative model, are set up in each layer. The rule channel is responsible for providing the feasible domain of the layer and a conservative and reliable rule solution, while the generation channel is responsible for providing more diverse candidate solutions. The relative power of the two is determined by an online calculable fusion weight. Mechanism three involves feasibility projection and a three-level consistency verification gate: the fusion result is first projected onto a rule-induced feasible domain, i.e., finding the point closest to the fusion result in the set satisfying all hard constraints, thus pulling back infeasible samples instead of discarding them. Subsequently, three verification gates—geometric, physical, and semantic—are connected in series. Mechanism four involves training utility feedback-driven randomized scheduling and failure-driven directional resampling: the performance gain on the validation set per unit generation cost is used as the utility metric for each layer and each parameter dimension, and the randomization budget and envelope broadening factor of each layer are reallocated online. The overall architecture of the above four mechanisms is as follows: Figure 1 As shown.
[0045] II. Hierarchical randomized parameter space and inter-layer constraint propagation. See also Figure 2 Let the hierarchical randomization parameter space be the Cartesian product of the parameter sets of each layer, i.e., Θ=Θ(1)×Θ(2)×…×Θ(L), where the parameter set Θ(l) of the l-th layer can be further subdivided into three categories: discrete semantic parameters, continuous physical parameters, and structured relational parameters. The dependency relationship between layers is described by a directed acyclic graph G=(V,E), where nodes are parameter dimensions, and directed edges indicate that the value of the source dimension will constrain the feasible value range of the target dimension.
[0046] In the preferred embodiment, L=5, and the division of each layer and its dominant channel are as follows: Figure 2 As shown, specifically: The first layer is the semantic-task layer, whose parameters include scene function categories, task instructions and skill objectives, object category composition and quantity distribution, and functional zoning. This layer is dominated by the generation channel, with the rule channel providing feasibility verification. The second layer is the structure-layout layer, whose parameters include room topology, wall and door / window openings, furniture-level object poses and orientations, support and occlusion relationships. This layer is dominated by the rule channel, with the generation channel providing layout proposals. The third layer is the instance-asset layer, whose parameters include the retrieval or 3D generation of specific instances, geometric deformation, and scale. The first layer, which focuses on scaling, articulated structures and joint constraints, surface subdivision and chamfering, is dominated by a hybrid approach of retrieval and generation. The second layer, the appearance-rendering layer, includes parameters such as physically based material parameters, texture mapping, light source direction, color temperature and intensity, ambient lighting mapping, and sensor noise models involving both internal and external cameras. This layer is primarily driven by the generation channel and constrained by physically valid interval projections. The third layer, the physics-dynamics layer, includes parameters such as mass, center of mass, inertia tensor, coefficient of friction, coefficient of restitution, damping, joint stiffness and actuator delay. This layer is mainly based on statistical sampling anchored by measured priors.
[0047] Inter-layer constraints propagate as follows: Once the parameters of layer l are determined, the system retrieves all directed edges originating from that layer based on the constraint graph, instantiating the corresponding constraints into inequalities or set constraints for the next layer. This shrinks the feasible region of layer l+1 to F(l+1)={θ∈Θ(l+1)|g_j(θ;θ(1:l))≤0, j=1,2,…,m}, where θ(1:l) represents all determined parameters from layer 1 to layer l, and g_j is the constraint function instantiated from the constraint knowledge base. Conversely, when an unsatisfiable conflict occurs at a lower layer, tracing back along the incoming edges of the constraint graph locates the lowest layer that caused the conflict, providing a basis for minimum backtracking.
[0048] III. Anchored Randomization Initialization. Unlike the approach of directly sampling uniformly over a preset interval, this invention first uses the real domain calibration and anchor point estimation module 20 to provide the real distribution anchor points for key parameters of the physical and appearance layers. Then, a randomized distribution is constructed centered on these anchor points, i.e., p(θ|μ*,σ)=Trunc-N(μ*,(σ·s)^2), θ∈F, where μ* is the anchor point identified by real measurements, s is the dimensionally normalized scale of this dimension, σ is the envelope broadening factor, whose initial value is preferably between 0.2 and 0.4, and Trunc-N represents a truncated normal distribution over the feasible region. This design allows randomization to unfold around the real values, avoiding wasting computational power in parameter regions far removed from the real world, while providing a clear starting point for subsequent course-based broadening.
[0049] IV. Layer-by-layer dual-channel generation and fusion gating. See also Figure 3 For layer l, the system executes the following sub-steps. First, conditional encoding: the determined parameters θ(1:l-1) from the upper layer and the task condition c are encoded into a condition vector, which is simultaneously provided to both the rule channel and the generation channel, ensuring that both channels operate within the same context. Second, parallel output from both channels: the rule engine outputs the feasible region F(l) and the rule solution θ_rule for this layer, while the generation model outputs candidate solutions θ_aigc and their confidence scores conf(l). The two channels execute in parallel without blocking each other.
[0050] Next is the online calculation of the fusion weights. The fusion weights are determined by three factors: the coverage of the current rule base to the current context, cov(l), the higher the coverage, the more the rules should be followed; the confidence of the generated result, conf(l); and the diversity gap (gap(l)) of the current training batch in this layer, the larger the gap, the more novelty the generative model needs to provide. The calculation formula is α(l)=sigmoid[w1·(1-cov(l))+w2·conf(l)+w3·gap(l)+b0], where w1, w2, w3 and b0 are adjustable coefficients. To ensure the reliability of the key layers, upper and lower limits can be set for α of each layer. Preferably, the upper limit of α for the structure-layout layer and the physical-dynamic layer is 0.4, and the lower limit of α for the semantic-task layer and the appearance-rendering layer is 0.5.
[0051] Finally, there is the fusion and projection. The weighted fusion is performed according to parameter type: for continuous parameters, convex combination fusion is used, i.e., θ_mix = α(l)·θ_aigc + (1-α(l))·θ_rule; for discrete and structural parameters, α(l) is interpreted as a selection probability, and is selected between the generated candidate solution θ_aigc and the regular solution θ_rule according to the Bernoulli distribution, thus ensuring that the fusion result itself is still a valid discrete value. The fusion result is then projected onto the feasible region, resulting in θ(l) = Π_F(l)(θ_mix) = argmin‖z - θ_mix‖_W, z∈F(l), where ‖·‖_W is the weighted L2 norm normalized according to the dimensions of each dimension. This fusion method achieves the effect that the rules cover the areas covered by the rule base, and the long-tail dimensions not covered by the rule base automatically give way to the generative model.
[0052] V. Feasibility Projection and Physically Self-Consistent Repair. See also Figure 4 The projection operator is not a single algorithm, but a group of operators assigned layer by layer. In the preferred embodiment, the following five types of repair operators are included.
[0053] One method is penetration resolution: For detected pairs of objects that penetrate each other, calculate the minimum translation vector required for their separation, and translate the lighter or later-placed object along this direction until the penetration depth is less than a threshold, which is preferably 0.5 to 2 mm; for cases that cannot be resolved by translation, instead scale the object size or fall back to the asset layer for reselection.
[0054] The second is support stabilization: calculate the projection point of the object's center of mass on the support surface. If the point falls outside the support polygon, then use quadratic programming to fine-tune the position and orientation of the object so that the projection point of the center of mass falls into the support polygon and retains a certain safety margin. This margin is preferably 20% to 40% of the radius of the inscribed circle of the support polygon.
[0055] Thirdly, gravity settling pre-simulation: Before formal training and rendering, the simulation is first performed in pure physics mode for a period of time, preferably 0.3 to 2.0 seconds, so that all objects converge to a stable pose under the action of gravity, and the converged pose is used as the initial state of the scene; if the object pose drift is still greater than the threshold within this time, preferably the translation threshold is 1 to 5 mm and the rotation threshold is 1 to 3 degrees, then the placement is determined to be unstable and backtracking is triggered.
[0056] Fourthly, mesh watertightening and inertia recalculation: hole filling, self-intersection elimination, normal unification and convex decomposition are performed on the triangular mesh generated by the generative model. Then, the mass and inertia tensor are recalculated based on the mesh volume and material density to ensure the consistency of geometry and physical properties, that is, the mass, volume and density satisfy the density relationship and the density falls within the prior interval of the material category.
[0057] Fifthly, the legal interval truncation: each physical quantity and material quality is truncated to a physically permissible range. Preferably, the coefficient of friction is 0.02 to 1.6, the coefficient of restitution is 0 to 0.95, the albedo based on physical rendering is 0.04 to 0.90, and the color temperature of the light source is 2000 to 10000 Kelvin. Metallicity and roughness are jointly constrained according to material type to avoid material combinations that do not exist in nature.
[0058] It is important to emphasize that the projection repair of this invention is fundamentally different from the rejection sampling commonly used in the prior art: rejection sampling discards infeasible samples directly after detection, wasting all the previously invested generation computing power; while projection repair pulls the samples back into the feasible region while maintaining the closest distance to the original candidate solution, which not only preserves the diversity brought by the generation model, but also ensures physical consistency, and at the same time allows the generation computing power to be reused.
[0059] VI. Level 3 Consistency Verification Gate and Minimum Backtracking. See also Figure 5 After projection restoration, the candidate scenes sequentially pass through three verification gates. The geometric gate checks the residual penetration depth and overlap volume, the connectivity and reachability of the navigation map to ensure the robot can reach the required position, and whether the robotic arm has an inverse kinematic solution for the target pose without self-collision. The physics gate checks the pose drift after gravity settling, whether joints exceed limits, whether self-collision occurs, and the numerical stability of the physics solver over several steps. The semantic gate calls the visual language model to score the consistency between the rendering results and the task description, evaluates the matching degree between the scene and the task, the rationality of common sense and the functional matching, and determines whether the language instructions are indeed executable in the scene. If the score is below a threshold, it is judged as failing. This threshold is preferably between 0.6 and 0.8.
[0060] When any gate fails to pass, the system performs conflict attribution: it reads the specific constraint that was violated, traces the cause of the constraint backward along the incoming edges of the inter-layer constraint graph, locates the lowest layer l* where the conflict occurred, and then resamples only the l* layer and below, while all decisions that have passed verification from the first layer to the l*-1 layer are retained. Compared with regenerating the entire scene, minimum backtracking significantly reduces the generation cost per unit of effective scene, and because the upper-layer semantic decisions are retained, resampling has a clear direction rather than blind retries. In addition, the thresholds of the three gates are dynamically adjusted as the training progresses: the semantic-level thresholds are appropriately relaxed in the early stage of training to ensure sample throughput, and gradually tightened in the middle and later stages of training, so that the policy converges on high-quality scenes that are increasingly close to the real distribution.
[0061] VII. Randomized scheduling driven by training utility feedback. See also Figure 6This invention allows the intensity and distribution of randomization to be determined by the training results, forming a closed loop. For the k-th parameter dimension of the l-th layer, its utility gain is defined as the ratio of the validation set performance gain brought by randomization in that dimension to its generation cost, i.e., U(l,k)=ΔJ(l,k) / C(l,k), where ΔJ(l,k) is the improvement of the policy performance index relative to the baseline on the reserved validation set and the near-realistic scene set. The policy performance index is a weighted sum of task success rate, trajectory tracking error, and disturbance tolerance margin, etc., and C(l,k) is the scene generation and simulation cost introduced by applying randomization in that dimension. ΔJ can be obtained by controlled comparisons between several parallel training branches, or by online estimation through regression fitting of historical training records.
[0062] The randomized budgets for each dimension are then redistributed according to utility gain, automatically concentrating computing power on the most efficient dimensions, i.e., b(l,k)←softmax[U(l,k) / τ], and constrained by b_min≤b(l,k)≤b_max, where τ is a temperature coefficient controlling the aggressiveness of the redistribution. The budget lower bound b_min is used to prevent a certain dimension from being completely abandoned, thus creating a blind spot in the later stages; it is preferably taken as 20% to 40% of the globally uniform budget. The solver can employ a contextual multi-armed gambler or Gaussian process Bayesian optimization, both of which can be updated online without retraining.
[0063] The envelope broadening factor is adjusted in a stepwise manner according to the validation success rate, forming a progressively more difficult course: when the validation success rate SR is greater than the upper threshold τ_hi, σ←min[σ·(1+ρ), σ_max]; when SR is less than the lower threshold τ_lo, σ←max[σ / (1+ρ), σ_min]. The upper threshold τ_hi is preferably set to 0.60 to 0.80, the lower threshold τ_lo is preferably set to 0.30 to 0.45, and the step size ρ is preferably set to 0.05 to 0.25. A minimum interval is set between two adjacent adjustments to avoid frequent jitter caused by evaluation noise.
[0064] 8. Scene fingerprinting and failure-driven targeted resampling. See also Figure 7 For each generated scenario, the random seed, parameter vectors of each layer, asset library version number, and generation model version number are concatenated in a fixed order and then cryptographically hashed to obtain the globally unique fingerprint FP=H[seed‖θ(1)‖θ(2)‖…‖θ(L)‖v_asset‖v_model]. Since all randomness in the generation process is completely determined by this seed and parameter vector, the same scenario can be reproduced bit by bit given the fingerprint. This characteristic allows the present invention to retain the reproducibility of traditional procedural generation schemes while introducing a generative model, thereby supporting the accurate replay of failed scenarios, rigorous comparison of ablation experiments, and versioned management of training datasets.
[0065] When a strategy fails during validation or training, the system records the fingerprint of the failure scenario, the failure type, and associated parameters. Kernel density estimation is performed centered on the position of the failed sample in the parameter subspace to obtain the failure density p_fail. Subsequently, a new sampling distribution is constructed according to p_new(θ)∝p_base(θ)^(1-β)·p_fail(θ)^β, where p_base is the current base sampling distribution, and the exponent β controls the intensity of targeting, preferably between 0.2 and 0.6, and can be tuned online by the recent failure rate; the higher the failure rate, the larger β becomes. This power-law mixing form serves two purposes: it concentrates new samples in the failure neighborhood, enabling targeted retraining of weak areas of the strategy, while preserving the support set of the base distribution to prevent sampling from collapsing to a few failure modes and losing overall coverage, thus preventing catastrophic forgetting during training.
[0066] IX. Overall Methodology and Flow. For a summary of the above mechanisms, please refer to... Figure 8 The complete process of the method described in this invention includes the following steps: S1: Input task description and real domain calibration data, including language instructions, skill objectives, real scene scanning, and measured physical properties. S2: Construct a hierarchical randomized parameter space and a directed graph with inter-layer constraints, defining the parameter set of each layer and its hard constraint dependencies. S3: Initialize the randomized distribution of each layer using real measurements as anchor points, and set the initial envelope broadening factor and the randomization budget for each layer. S4: Perform dual-channel generation layer by layer from top to bottom, produced in parallel by the rule engine and the generative model, and fused according to the fusion weight. S5: Project the fusion result onto the feasible domain and perform physical self-consistent repairs such as penetration resolution, support stabilization, mesh watertightening, and legal interval truncation. S6: Perform geometric, physical, and semantic level verification in sequence; if it fails, locate the minimum conflict layer and locally resample the layer and all layers below it before returning to step S4. S7: After verification, enter simulation execution, advance physics and rendering in parallel, and produce mutually aligned multimodal training samples and scene metadata. S8: Train the strategy using the output data, evaluate its performance on the hold-out validation set, calculate the utility gain for each layer and dimension, and collect fingerprints of failure samples. S9: Determine if the strategy performance meets the target; if not, update the randomization budget, envelope broadening factor, and failure-driven resampling weights for each layer, then return to step S3. S10: If the target is met, output the trained generalization strategy, a library of reproducible scenarios, and the final randomization configuration.
[0067] 10. System Implementation Examples. See also... Figure 1 The hierarchical domain randomized robot training scenario construction system provided in this embodiment of the invention includes the following functional modules, and the connection relationship between the modules is as follows: Figure 1 As shown.
[0068] The Task Ontology and Constraint Knowledge Base Module 10 stores prior knowledge such as scene category ontology, object category ontology, availability annotations, support and containment relationship rules, clearance rules, robot kinematics, and workspace constraints. It provides query and reasoning interfaces externally in machine-readable predicate form. This module is the knowledge source for the rule channel and the basis for defining each feasible region.
[0069] The real domain calibration and anchor point estimation module 20 receives a small amount of real domain measurement data, including color-depth scans of the real scene, measured values of the target object's physical properties such as mass, friction coefficient, and surface albedo, as well as response data recorded by the robot when executing a small number of trajectories in the real environment. This module estimates the real distribution anchor points of the physical layer and appearance layer parameters through parameter identification, providing a central location for subsequent anchor-based randomization.
[0070] The hierarchical randomization parameter space management module 30 defines and maintains the hierarchical parameter space and the inter-layer constraint directed graph, manages the sampling distribution family, distribution center, envelope broadening factor and randomization budget of each layer, and provides a query interface to the downstream to return the feasible domain of the current layer when given the parameters of the upper layer have been determined.
[0071] The rule constraint generation channel module 40 performs constraint reasoning and constraint satisfaction solving on the current layer based on the task ontology and constraint knowledge base module 10, and outputs a feasible domain description of the current layer and a rule solution that satisfies all constraints. This module adopts a deterministic algorithm, and the physical and semantic reliability of its output is strictly guaranteed.
[0072] The generative content generation channel module 50 includes a language model subunit for generating scene semantics and scene graphs, a diffusion model subunit for generating material textures and lighting configurations, and a 3D generation subunit for generating or deforming object assets. This module takes the parameters and task conditions determined by the upper layer as input conditions and outputs the candidate parameters and their confidence levels of this layer.
[0073] The dual-channel fusion gating module 60 calculates the fusion weight of this layer online and fuses the rule solution and the generated candidate solution according to the weight. For continuous parameters, convex combination fusion is used. For discrete and structural parameters, the fusion weight is interpreted as a selection probability and selected between the outputs of the two channels according to the Bernoulli distribution, so as to ensure that the fusion result itself is still a valid discrete value.
[0074] The Feasibility Projection and Physical Self-Consistency Repair Module 70 projects the fusion result onto the feasible domain of this layer and performs corresponding physical self-consistency repairs for different layers: it performs penetration resolution and support stabilization on the layout layer; it performs mesh watertightening, normal unification, convex decomposition and inertia tensor recalculation on the asset layer; and it performs parameter legal interval truncation and dimensional consistency correction on the appearance layer and physical layer.
[0075] The Level 3 Consistency Check and Minimum Backtracking Module 80 performs geometric, physical, and semantic level checks in series; it performs conflict attribution for failed scenarios, locates the minimum conflict layer, and triggers local resampling; this module is also responsible for dynamically adjusting the thresholds of each level of check according to the training process.
[0076] The simulation execution and multimodal data output module 90 advances physics and rendering in a parallel simulation environment, outputting mutually aligned multimodal training samples such as color images, depth maps, instance segmentation, object poses, contact points, availability annotations, and language instructions, and writes the scene's hierarchical parameters and fingerprints into the metadata.
[0077] The strategy training module 100 uses the multimodal training samples produced by module 90 to train the robot's strategy through reinforcement learning, imitation learning, or a vision-language-action model.
[0078] The training utility evaluation and randomization scheduling module 110 evaluates policy performance on the reserved validation set and the near-realistic scenario set, calculates the utility gain of each layer and dimension, and solves the redistribution of the randomization budget and the update of the envelope broadening factor online; at the same time, it maintains the fingerprint database of failed samples and drives directional resampling.
[0079] The scene fingerprint and version management module 120 calculates and stores the scene fingerprint for each generated scene, which is obtained by hashing the random seed, parameters of each layer, asset library version number and generated model version number. It supports reproducing the same scene bit by bit according to the fingerprint.
[0080] XI. Application Example 1: Desktop Grabbing Task of a Home Service Robot. This example illustrates the complete implementation process of the invention using the task of a robot grabbing a designated cup from the dining table and placing it in the sink. The input language command is to place the blue cup on the table into the sink, along with color-depth scan data of a real kitchen, the measured mass and coefficient of friction of the target cup, and a small amount of teleoperation trajectory performed by the robot in the real kitchen. Based on this, the system identifies a friction coefficient anchor point of approximately 0.55 and a desktop albedo anchor point of approximately 0.42. Using these as the center, a truncated normal distribution is constructed with an initial envelope broadening factor of 0.3, and the initial randomization budget for each layer is uniformly distributed.
[0081] In the first layer, the semantic-task layer, the rule channel determines the task based on the task ontology: to complete the task, there must be a graspable cup-shaped container, a placeable sink, and a platform surface supporting the cup, and all three must be within the robot's reachable workspace. Under this constraint, the generation channel generates scene semantics from the language model, such as an open kitchen, a dining table with three cups, a fruit plate, two books, and a sink located 1.2 meters to the right front. Because the rule base coverage in this layer is low while the generation model has high confidence, the fusion weight is approximately 0.78, meaning the generated result is prioritized, and the rules are only used for feasibility verification.
[0082] In the second layer, the structure-layout layer, the rule-based channel enforces constraints to ensure no collisions between furniture, a clearance of at least 0.6 meters, a connected navigation path between the sink and the dining table, and that the target cup is located within the robotic arm's workspace. The generation channel provides more natural layout proposals, such as random deflections and slight outward pulls of the dining chair relative to the table. Due to the high rule coverage in this layer, the fusion weight is limited to an upper limit of 0.4, meaning the rule-based solution is dominant. After projection, the fused result shows a dining chair that initially slightly penetrated the table leg being pushed away along the minimum translation vector, reducing the penetration depth to below the threshold.
[0083] In the third layer, the instance-asset layer, based on the categories defined in the first layer, instances of cups, fruit plates, and books are retrieved from the asset library. For the narrow-mouthed cup with a curved handle that is missing from the asset library, a new asset is generated by calling the 3D generation sub-unit. After the generated mesh is watertightened and convex decomposition processed, the mass and inertia tensor are recalculated based on the prior density of the ceramic material, so that the mass, volume, and density are self-consistent.
[0084] In the fourth layer, the appearance-rendering layer, material maps for the desktop wood grain, cup glaze, and wall paint are generated using a diffusion model, and the direction, color temperature, intensity, and ambient light map of the main light source are randomized. In the generated results, the albedo of one glaze material reached 0.97, exceeding the physically valid upper limit, and was truncated to 0.90; another combination of metallicity and roughness did not conform to the joint constraints of ceramic materials and was projected to the nearest valid combination. Noise from both internal and external camera sensors is scrambled according to the calibrated real camera model. In the fifth layer, the physics-dynamics layer, the mass, coefficient of friction, coefficient of restitution, and damping of each object are sampled centered on the anchor point, and perturbations are applied to the robot actuator delay and joint stiffness.
[0085] The system then proceeded to the verification and repair phase. The geometric level gate detected a cup suspended approximately three millimeters above the tabletop, which automatically stabilized after triggering a gravity settlement pre-simulation. The physical level gate detected another cup continuing to slide after settling, attributed to an unreasonable tabletop tilt angle setting on the second layer. Based on this, the system identified the second layer as the least conflict layer and resampled only the parameters of the second layer and below, completely preserving the semantic composition of the first layer. After resampling, the scene passed all three levels of gates, achieving a semantic level score of 0.86.
[0086] The scene enters parallel simulation, producing training samples aligned with images, depth, segmentation, pose, contact points, and language commands, and writing them into the scene fingerprint. After several rounds of policy training, utility evaluation shows that the utility gain of the appearance layer and physical layer is significantly higher than that of the structure layer. Based on this, the system reduces the budget for the structure layer from 0.20 to 0.17 and increases the budget for the physical layer from 0.20 to 0.34. After the success rate exceeds the upper threshold of 0.62, the envelope broadening factor is expanded stepwise from 0.30 to 0.50. Failure sample statistics show that the grasping slippage rate is high under the combination of low friction and strong specular reflection. Based on this, the system performs importance resampling within the neighborhood of this parameter with β set to 0.4. In subsequent batches, the frequency of this combination increases significantly, and the corresponding failure rate decreases.
[0087] XII. Application Example 2: Navigation and Obstacle Avoidance Tasks for Warehouse Mobile Robots. In this example, the first layer randomizes the functional zoning of the warehouse and the types of goods; the second layer randomizes the shelf layout, aisle width, location of temporary storage items, and movement patterns of dynamic obstacles, with regular aisles ensuring a continuous path between any two work points and that the aisle clearance meets the robot's external dimensions; the third layer randomizes the instances and dimensions of boxes and pallets; the fourth layer randomizes the arrangement of factory ceiling lights, ground reflection, and camera exposure; and the fifth layer randomizes the ground friction coefficient, robot load distribution, and wheel slippage characteristics. In this example, the geometrical gate uses navigation map connectivity as the core indicator, while the physical gate focuses on checking the kinematic feasibility of dynamic obstacle trajectories.
[0088] Thirteen, Application Example 3: Multi-object stacking scenario in industrial sorting. This example addresses sorting tasks involving multiple objects randomly stacked within a bin. The second layer randomizes the bin size and placement; the third layer randomizes the part instances and their quantity; and the fifth layer randomizes the friction and recovery coefficients between parts. Gravity settling pre-simulation plays a crucial role here: after parts are placed in random initial poses, they settle and form a natural stack. Their contact relationships are entirely determined by the physics solver, not manually specified, thus obtaining the complex stacking patterns unique to real sorting scenarios. Scenarios where the pose drift exceeds a threshold after settling are considered unstable and trigger backtracking.
[0089] XIV. Alternative Implementation Methods. To facilitate understanding of the scope of this invention by those skilled in the art, alternative implementation methods for each aspect of this invention are listed below, all of which fall within the protection scope of this invention.
[0090] Regarding the number of layers and layer division: The number of layers L can be any integer between 3 and 7; the instance-asset layer and the appearance-rendering layer can be merged into three implementation layers, or the physical layer can be further subdivided into a rigid body dynamics layer and a sensor model layer. Regarding the determination of fusion weights: In addition to the above three-factor weighted sigmoid, a lookup table method can be used to obtain fixed values according to the layer and scene category, or a small neural network can directly regress the output with the context vector as input, or a reinforcement learning method can be used to learn the gating policy online. Regarding the implementation of the projection operator: In addition to nearest-point projection, soft constraint optimization with a penalty term can be used, alternating projection method can be used to handle the intersection of multiple constraints, or it can degenerate into dimension-wise interval truncation when the number of constraints is small. Regarding the handling of infeasible samples: In scenarios with extremely low generation overhead, projection repair can degenerate into rejection sampling and retry; in scenarios with extremely high generation overhead, a surrogate model can be introduced to predict feasibility for early pruning.
[0091] Regarding the implementation of semantic-level validation: In addition to visual language model scoring, specially trained discriminative consistency networks can be used, as can symbolic validation based on scene graph matching. Alternatively, in cost-sensitive situations, semantic-level validation can be performed only on sampled batches. Regarding the estimation of utility gain: In addition to parallel branch controlled comparison, regression fitting to historical training records can be used, influence function estimation can be employed, or leave-one-out method can be used for direct measurement on a small validation set. Regarding the selection of the scheduling optimizer: Contextual multi-armed gamblers, Gaussian process Bayesian optimization, evolutionary strategies, and population-based training can all be used as solvers for budget reallocation. Regarding the triggering metric for course broadening: In addition to validation success rate, policy entropy, value function estimation error, or performance variance on the validation set can be used as the triggering metric. Regarding the modeling of failure density: In addition to kernel density estimation, Gaussian mixture models, normalized flow, or histogram statistics can be used directly when the dimensionality is low. Regarding the construction of fingerprints: the hash function can use any cryptographic hash algorithm; in cases where tamper-proofing is not required, it can degenerate into a fixed-length serialization encoding of the parameter vector.
[0092] Regarding the extension of application areas: The hierarchical randomization framework of this invention is not limited to robot training, but can also be used in technical fields that require the large-scale generation of physically consistent and highly diverse virtual scenes, such as autonomous driving simulation scene generation, augmented reality and virtual reality content generation, and synthetic data generation of computer vision models.
[0093] XV. Embodiments of Electronic Devices and Computer-Readable Storage Media. This invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the hierarchical domain randomization robot training scene construction method described in any of the above embodiments. The electronic device may further include a communication interface and a bus, through which the memory, processor, and communication interface communicate with each other. The processor may be a central processing unit, a graphics processing unit, an application-specific integrated circuit (ASIC), or a field-programmable gate array (FPGA). The electronic device may be a standalone workstation, a cluster of multiple computing nodes, or a cloud server.
[0094] This invention also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, this computer program implements the steps of the hierarchical domain randomization robot training scene construction method described in any of the above embodiments. The computer-readable storage medium may be a read-only memory, random access memory, magnetic disk, optical disk, or any medium capable of storing program code. Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by hardware related to computer program instructions. The computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the above method embodiments.
[0095] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements 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 method for constructing robot training scenarios using hierarchical domain randomization, characterized in that, Includes the following steps: S1. Obtain task description and real-world calibration data. The task description includes language instructions and skill objectives. The real-world calibration data includes color-depth scan data of the real scene, measured values of the physical properties of the target object, and response data recorded by the robot's trajectory in the real environment. S2. Construct a hierarchical randomized parameter space and a directed acyclic graph with inter-layer constraints: Divide the randomizable variables in the simulation training scenario into L layers from top to bottom according to the abstract level, where L is an integer not less than 3. The parameter set of the l-th layer is denoted as Θ(l). The hierarchical randomized parameter space is Θ=Θ(1)×Θ(2)×…×Θ(L). Use a directed acyclic graph G=(V,E) to describe the inter-layer dependencies, where the nodes are parameter dimensions and the directed edges represent the value range of the source dimension that constrains the feasible value range of the target dimension. S3. Initialize the distribution center, envelope broadening factor σ, and randomization budget b of each layer of randomized distribution; S4. Execute dual-channel generation and gated fusion layer by layer from top to bottom: For the l-th layer, the fixed parameters θ(1:l-1) from the 1st to the (l-1)th layer and the task condition c are encoded into a condition vector and provided to both the rule channel and the generation channel. The rule channel performs constraint reasoning and constraint satisfaction solving based on the task ontology and constraint knowledge base, outputting the feasible domain F(l) of this layer and the rule solution θ_rule that satisfies all constraints. The generation channel outputs the candidate solution θ_aigc and the confidence level conf(l) of this layer based on the generative model. θ_rule and θ_aigc are weighted and fused according to the fusion weight α(l) to obtain the fusion result θ_mix. The fusion weight α(l) is calculated online by the coverage of the rule base of this layer to the current context cov(l), the confidence level conf(l), and the diversity gap gap(l) of the current batch in this layer. S5. Feasibility Projection and Physical Self-Consistent Repair: Project the fusion result θ_mix onto the feasible region F(l) of this layer, and take the point in F(l) that is closest to θ_mix as the fixed parameter θ(l) of this layer, that is, θ(l)=Π_F(l)(θ_mix)=argmin‖z-θ_mix‖_W, z∈F(l), and perform physical self-consistent repair on the projection result; where F(l)={θ∈Θ(l)|g_j(θ;θ(1:l-1))≤0,j=1,2,…,m}, g_j is the constraint function instantiated from the directed edge pointing to this layer in the directed acyclic graph, and ‖·‖_W is the weighted L2 norm normalized according to the dimensions of each dimension; S6. Three-level consistency check and minimum backtracking: For the candidate scenarios obtained after executing steps S4 and S5 layer by layer, perform geometric level check, physical level check and semantic level check in sequence; when any level check fails, read the violated constraint and trace the cause of the constraint back along the incoming edge of the directed acyclic graph to locate the lowest level l* that caused the conflict. Only for the l* level and the layers below it, re-execute steps S4 to S6, and retain the parameters that have passed the check from the 1st level to the l*-1st level. S7. Perform simulation on the scene that has passed all three levels of verification, advance physics and rendering in parallel, and produce mutually aligned multimodal training samples. Use the multimodal training samples to train the robot strategy.
2. The method for constructing a robot training scenario using hierarchical domain randomization according to claim 1, characterized in that, In step S2, L takes an integer between 3 and 7; when L is 5, the layers are divided as follows: The first layer is the semantic-task layer, whose parameters include scene function categories, task instructions and skill objectives, object category composition and quantity distribution, and functional partitioning. The second layer is the structure-layout layer, whose parameters include room topology, wall and door / window openings, the pose and orientation of furniture-level objects, and support and occlusion relationships. The third layer is the instance-asset layer, whose parameters include object instance retrieval or 3D generation, geometric deformation and scaling, articulated structure and joint constraint, surface subdivision and chamfering. The fourth layer is the appearance-rendering layer, whose parameters include physically based material parameters, texture mapping, light source direction, color temperature and intensity, ambient lighting mapping, and sensor noise model involving both inside and outside the camera. The fifth layer is the physics-dynamics layer, whose parameters include mass, center of mass, inertia tensor, coefficient of friction, coefficient of restitution, damping, joint stiffness, and actuator delay.
3. The method for constructing a robot training scenario using hierarchical domain randomization according to claim 1, characterized in that, In step S3, an anchored initialization method using real measurements as anchor points is adopted: the real distribution anchor points μ* of each parameter dimension are obtained from the real domain calibration data through parameter identification, and a truncated normal distribution p(θ|μ*,σ)=Trunc-N(μ*,(σ·s)^2), θ∈F is constructed on the feasible region with μ* as the center and the product of the envelope broadening factor σ and the dimension normalized scale s of that dimension as the standard deviation; the initial value of the envelope broadening factor σ is taken as 0.2 to 0.
4.
4. The method for constructing a robot training scenario using hierarchical domain randomization according to claim 1, characterized in that, In step S4, the fusion weights are calculated online using the following formula: α(l)=sigmoid[w1·(1-cov(l))+w2·conf(l)+w3·gap(l)+b0], Where w1, w2, w3 and b0 are adjustable coefficients; The weighted fusion is performed according to parameter type: continuous parameters are fused by convex combination, i.e., θ_mix=α(l)·θ_aigc+(1-α(l))·θ_rule; for discrete and structural parameters, α(l) is interpreted as a selection probability and selected between θ_aigc and θ_rule according to Bernoulli distribution, so that the fusion result remains a valid discrete value; Furthermore, an upper or lower limit is set for α(l) of each layer. The upper limit of α(l) for the structure-layout layer and the physical-dynamic layer is 0.4, and the lower limit of α(l) for the semantic-task layer and the appearance-rendering layer is 0.
5.
5. The method for constructing a robot training scenario using hierarchical domain randomization according to claim 1, characterized in that, The physical self-consistent repair described in step S5 includes at least one of the following repair operators assigned by layer: Penetration resolution: For a pair of objects that are detected to penetrate each other, calculate the minimum translation vector required to separate them, and translate the object with smaller mass or later placement order along the vector until the penetration depth is less than a threshold, which is 0.5 to 2 mm. Support stabilization: Calculate the projection point of the object's centroid on the support surface. When the projection point falls outside the support polygon, use quadratic programming to fine-tune the object's position and orientation so that the centroid projection point falls into the support polygon while maintaining a safety margin. The safety margin is taken as 20% to 40% of the radius of the inscribed circle of the support polygon. Gravity settling pre-simulation: Before rendering, the simulation is held statically in pure physics mode for 0.3 to 2.0 seconds, allowing the object to converge to a stable pose under the action of gravity, and the converged pose is used as the initial state of the scene. If the pose drift is greater than the threshold within this time, the placement is determined to be unstable and the minimum backtracking described in step S6 is triggered. Mesh watertightening and inertia recalculation: Perform hole filling, self-intersection elimination, normal unification and convex decomposition on the triangular mesh generated by the generative model, and recalculate the mass and inertia tensor based on the mesh volume and material density, so that the mass, volume and density satisfy the density relationship and the density falls within the prior interval of the material category. Legal range truncation: Physical quantities and material properties are truncated to a physically permissible range, where the coefficient of friction is 0.02 to 1.6, the coefficient of restitution is 0 to 0.95, the albedo based on physical rendering is 0.04 to 0.90, the light source color temperature is 2000 to 10000 Kelvin, and joint constraints are applied to metallicity and roughness according to material type.
6. The method for constructing a robot training scenario using hierarchical domain randomization according to claim 1, characterized in that, In step S6: The geometric level verification metrics include residual penetration depth and overlap volume, connectivity and reachability of the navigation map, and whether the robotic arm has an inverse kinematic solution for the target pose without self-collision. The physical-level verification metrics include pose drift after gravity settling, whether joints exceed limits, whether self-collisions occur, and the numerical stability of the physical solver within a preset number of steps. The semantic-level verification involves calling a visual language model to score the consistency between the rendering result and the task description, evaluating the matching degree between the scene and the task, the rationality of common sense and the functional matching, and determining whether the language instructions are executable in the scene. If the score is lower than the threshold, it is deemed unsuccessful. The threshold is between 0.6 and 0.
8. Furthermore, the thresholds for the three-level verification are dynamically adjusted as the training process progresses, with the semantic-level thresholds being relaxed in the early stages of training and gradually tightened in the later stages.
7. The method for constructing a robot training scenario using hierarchical domain randomization according to claim 1, characterized in that, It also includes a randomized scheduling step driven by training utility feedback: For the k-th parameter dimension of the l-th layer, the utility gain is defined as the ratio of the validation set performance gain brought about by randomization in this dimension to its generation cost, i.e., U(l,k)=ΔJ(l,k) / C(l,k), where ΔJ(l,k) is the improvement of the policy performance index relative to the baseline on the reserved validation set and the near-real scene set, and C(l,k) is the scene generation and simulation cost introduced by applying randomization in this dimension; The randomized budget for each dimension is redistributed as follows: b(l,k)←softmax[U(l,k) / τ], and is subject to the constraint b_min≤b(l,k)≤b_max, where τ is the temperature coefficient, and the lower limit of the budget b_min is taken as 20% to 40% of the global uniform budget; The updated randomization budget is then returned to step S3 for use in the next round of stratified randomization sampling.
8. The method for constructing a robot training scenario using hierarchical domain randomization according to claim 7, characterized in that, It also includes a success rate-driven course-based envelope broadening step: using the validation success rate SR on the reserved validation set as the trigger indicator, when SR is greater than the upper threshold τ_hi, the envelope broadening factor is expanded by σ←min[σ·(1+ρ), σ_max], and when SR is less than the lower threshold τ_lo, the envelope broadening factor is contracted by σ←max[σ / (1+ρ), σ_min]. The upper threshold τ_hi is 0.60 to 0.80, the lower threshold τ_lo is 0.30 to 0.45, the step size ρ is 0.05 to 0.25, and a minimum interval round is set between two adjacent adjustments.
9. The method for constructing a robot training scenario using hierarchical domain randomization according to claim 1, characterized in that, It also includes scene fingerprinting and failure-driven targeted resampling steps: For each generated scenario, the random seed, the parameter vectors θ(1) to θ(L) of each layer, the asset library version number v_asset and the generated model version number v_model are concatenated in a fixed order and then cryptographically hashed to obtain the globally unique fingerprint FP=H[seed‖θ(1)‖θ(2)‖…‖θ(L)‖v_asset‖v_model], and the same scenario is reproduced bit by bit based on this fingerprint; When the policy fails during validation or training, the fingerprint of the failure scenario, the failure type, and the associated parameters are recorded. The failure density p_fail is obtained by estimating the kernel density centered on the position of the failed sample in the parameter subspace, and a new sampling distribution is constructed using the following formula: p_new(θ)∝p_base(θ)^(1-β)·p_fail(θ)^β, Where p_base is the current base sampling distribution, and the exponent β is between 0.2 and 0.6 and is tuned online by the recent failure rate. The higher the failure rate, the larger the value of β.
10. A hierarchical domain randomization robot training scenario construction system, characterized in that, include: The task ontology and constraint knowledge base module is used to store scene category ontology, object category ontology, availability annotation, support and containment relationship rules, passage clearance rules, and robot kinematics and workspace constraints, and provides query and reasoning interfaces in machine-readable predicate form; The real domain calibration and anchor point estimation module is used to receive real domain calibration data and estimate the real distribution anchor points of each parameter dimension by identifying parameters. The hierarchical randomization parameter space management module is used to divide randomizable variables into L layers according to the abstract level to form a hierarchical randomization parameter space Θ=Θ(1)×Θ(2)×…×Θ(L), construct a directed acyclic graph G=(V,E) describing the inter-layer dependencies, maintain the distribution center, envelope broadening factor and randomization budget of each layer, and provide a query interface to return the feasible domain of the current layer when given the fixed parameters of the upper layer. The rule constraint generation channel module is used to perform constraint reasoning and constraint satisfaction solving on the current layer based on the task ontology and constraint knowledge base, and output the feasible region F(l) and rule solution θ_rule of the current layer; The generative content generation channel module includes a language model subunit, a diffusion model subunit, and a 3D generation subunit. It is used to output the candidate solution θ_aigc and confidence conf(l) of this layer based on the given parameters of the upper layer and the task conditions. The dual-channel fusion gating module is used to calculate the fusion weight α(l) online based on the rule base coverage cov(l), confidence conf(l) and diversity gap (l), and then perform weighted fusion of θ_rule and θ_aigc according to the weight to obtain θ_mix; The Feasibility Projection and Physical Self-Consistent Repair Module is used to project θ_mix onto the feasible domain F(l) of this layer, take its nearest point as the fixed parameter θ(l) of this layer, and perform penetration elimination, support stabilization, gravity settlement pre-simulation, mesh watertightening and inertia recalculation, and legal interval truncation on the projection results. The three-level consistency check and minimum backtracking module is used to perform geometric level check, physical level check and semantic level check in sequence, and when any level check fails, backtrack along the incoming edge of the directed acyclic graph to locate the minimum conflict layer l*, triggering local resampling of the l* layer and the layers below it. The simulation execution and multimodal data output module is used to advance physics and rendering in a parallel simulation environment and output mutually aligned multimodal training samples and scene metadata. The training utility evaluation and randomization scheduling module is used to evaluate policy performance, calculate the utility gain of each layer and dimension, and update the randomization budget and envelope broadening factor of each layer online. The scene fingerprint and version management module is used to calculate and store the scene fingerprint for each generated scene. The fingerprint is obtained by hashing the random seed, parameters of each layer, asset library version number and generated model version number, so as to support the bit-by-bit reproduction of the same scene by fingerprint.