Trajectory generation methods, smart devices, and storage media

By generating intelligent device trajectories through iterative processing of trust domain parameters and diffusion models, the problems of trajectory uniformity and non-compliance with constraints in existing technologies are solved, thereby improving diversity and feasibility.

CN123113884APending Publication Date: 2026-11-17YOUDI ROBOT (WUXI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611452426.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-17
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies struggle to generate motion trajectories for intelligent devices that balance diversity, physical feasibility, and adaptability, resulting in trajectories that are either too simplistic or fail to meet motion constraints and safety requirements.

Method used

By determining the conditional information and trajectory constraint information of the diffusion model based on the trust domain parameters, multiple initial noise trajectories are obtained, and candidate trajectories are generated through iterative processing. The target trajectory is selected by combining the trust domain parameters and evaluation information to ensure that the trajectory is within the constraint range and meets the task requirements.

Benefits of technology

It enhances the diversity and physical feasibility of generated trajectories, ensuring that the trajectories meet the motion constraints and safety requirements of intelligent devices, and adapt to different task needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123113884A_ABST
    Figure CN123113884A_ABST
Patent Text Reader

Abstract

This application provides a trajectory generation method, a smart device, and a storage medium. The method includes: determining condition information of a diffusion model and trajectory constraint information for constraining the trajectory state range based on trust domain parameters corresponding to the current task; acquiring multiple initial noise trajectories; performing multiple iterative processes on each initial noise trajectory to obtain candidate trajectories corresponding to each initial noise trajectory; determining evaluation information for each candidate trajectory based on the trust domain parameters and each candidate trajectory; and determining a target trajectory from the multiple candidate trajectories based on the evaluation information of each candidate trajectory. Using embodiments of this application can improve the diversity of generated trajectories, as well as enhance the physical feasibility and security of the generated trajectories.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent device technology, and in particular to trajectory generation methods, intelligent devices, and storage media. Background Technology

[0002] With the development of intelligent device technology, intelligent devices such as robotic arms and robots are widely used in industrial production, logistics and transportation, and service operations. When intelligent devices perform tasks such as movement, grasping, or obstacle avoidance, it is usually necessary to generate corresponding motion trajectories based on task requirements, environmental conditions, and the intelligent device's own state in order to control the intelligent device to complete the target task.

[0003] However, the environments and task requirements of smart devices are often complex, and multiple feasible motion trajectories may exist simultaneously. When generating motion trajectories for smart devices, related technologies struggle to balance trajectory diversity, physical feasibility, and adaptability to different task requirements, easily resulting in overly simplistic candidate trajectories or trajectories that do not meet the motion constraints or safety requirements of smart devices. Summary of the Invention

[0004] This application provides a trajectory generation method, a smart device, and a storage medium, aiming to improve the diversity of generated trajectories, as well as the physical feasibility and security of the generated trajectories.

[0005] Firstly, a trajectory generation method is provided, including: Based on the trust domain parameters corresponding to the current task, determine the condition information of the diffusion model and the trajectory constraint information used to constrain the trajectory state range; Obtain multiple initial noise trajectories; Each initial noise trajectory is iteratively processed multiple times to obtain a candidate trajectory corresponding to each initial noise trajectory; wherein, the iterative processing includes: using the diffusion model, performing reverse denoising processing on the trajectory to be processed based on the conditional information to obtain an intermediate trajectory, and performing constraint processing on the intermediate trajectory based on the trajectory constraint information to obtain a constrained trajectory; in the first iteration, the trajectory to be processed is the initial noise trajectory; in subsequent iterations, the trajectory to be processed is the constrained trajectory obtained in the previous iteration; the candidate trajectory is the constrained trajectory obtained in the last iteration. Based on the trust domain parameters and each candidate trajectory, the evaluation information for each candidate trajectory is determined; The target trajectory is determined from the multiple candidate trajectories based on the evaluation information of each candidate trajectory.

[0006] In this technical solution, multiple initial noise trajectories are obtained and reverse denoising iteration based on diffusion model is performed on each of them to obtain multiple candidate trajectories with differences. This avoids the problem of the generated candidate trajectories being too homogeneous and improves the diversity of the generated trajectories.

[0007] In addition, during each iteration, the intermediate trajectories are constrained based on the trajectory constraint information, so that the generated trajectory is limited to the state range represented by the trajectory constraint information. This ensures that the candidate trajectory conforms to the motion constraints of the smart device, avoids the problem that the generated trajectory does not meet the motion constraints or safety requirements, and improves the physical feasibility and safety of the generated trajectory.

[0008] Furthermore, the conditional information of the diffusion model is determined based on the trust domain parameters corresponding to the current task, so that the generation of candidate trajectories can be guided by the trust domain parameters; and the evaluation information is determined based on the trust domain parameters and candidate trajectories to select the target trajectory, thereby ensuring that the target trajectory takes into account diversity, physical feasibility and adapts to different task requirements.

[0009] Secondly, a trajectory generation device is provided, comprising: The determination module is used to determine the condition information of the diffusion model and the trajectory constraint information used to constrain the trajectory state range based on the trust domain parameters corresponding to the current task. The acquisition module is used to acquire multiple initial noise trajectories; An iterative processing module is used to perform multiple iterative processing on each initial noise trajectory to obtain a candidate trajectory corresponding to each initial noise trajectory; wherein, the iterative processing includes: using the diffusion model, performing reverse denoising processing on the trajectory to be processed based on the condition information to obtain an intermediate trajectory, and performing constraint processing on the intermediate trajectory based on the trajectory constraint information to obtain a constrained trajectory; in the first iteration processing, the trajectory to be processed is the initial noise trajectory; in subsequent iteration processing, the trajectory to be processed is the constrained trajectory obtained in the previous iteration processing; the candidate trajectory is the constrained trajectory obtained in the last iteration processing; The determining module is further configured to determine the evaluation information of each candidate trajectory based on the trust domain parameter and each candidate trajectory; The determining module is further configured to determine the target trajectory from multiple candidate trajectories based on the evaluation information of each candidate trajectory.

[0010] Thirdly, a smart device is provided, including a memory and a processor, the memory being connected to the processor, the processor being configured to execute one or more computer programs stored in the memory, wherein when the processor executes the one or more computer programs, the smart device enables the trajectory generation method of the first aspect described above.

[0011] Fourthly, a computer-readable storage medium is provided, which stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the trajectory generation method of the first aspect.

[0012] Fifthly, a computer program product is provided that, when run on a smart device, causes any of the methods provided in the first aspect to be executed. Attached Figure Description

[0013] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 A schematic flowchart illustrating a trajectory generation method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a trajectory generation device provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a smart device provided in an embodiment of this application. Detailed Implementation

[0015] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0016] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. Moreover, the terms "first," "second," and "third" used in this application do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.

[0017] The technical solution of this application is described in detail below. This technical solution can be applied to intelligent devices, which are devices capable of performing corresponding actions based on generated motion trajectories to complete tasks such as movement, grasping, or obstacle avoidance. For example, an intelligent device can be a robotic arm, a robot, or other intelligent devices capable of executing motion trajectories. This application does not limit the specific type of intelligent device.

[0018] See Figure 1 , Figure 1 This is a flowchart illustrating a trajectory generation method provided in an embodiment of this application, as shown below. Figure 1 As shown, the method includes the following steps: S101, based on the trust domain parameters corresponding to the current task, determine the condition information of the diffusion model and the trajectory constraint information used to constrain the trajectory state range.

[0019] In one embodiment, before step S101, the method further includes: obtaining the trust domain parameter corresponding to the current task.

[0020] Here, the current task refers to the task that the intelligent device needs to perform within the current control cycle. For example, the current task can be a movement task, a grasping task, or an obstacle avoidance task, etc.

[0021] Trust domain parameters are parameters used to constrain the distribution range of trajectory states and trajectory evaluation preferences during trajectory generation. Trust domain parameters include the center coordinates of the trust domain, the radius of the trust domain, the state deviation penalty weight, and the control energy consumption penalty weight. The center coordinates of the trust domain characterize the central location of the trajectory state distribution. The radius of the trust domain characterizes the extent of the trajectory state distribution. The state deviation penalty weight characterizes the penalty preference for the degree to which the trajectory deviates from the center of the trust domain. The control energy consumption penalty weight characterizes the penalty preference for the magnitude of the control variable corresponding to the trajectory.

[0022] In a specific implementation, obtaining the trust domain parameters corresponding to the current task includes: inputting the task description information corresponding to the current task into a visual language action model, and performing semantic parsing processing on the task description information through the semantic decoder of the visual language action model to obtain the trust domain parameters corresponding to the current task; wherein, the semantic decoder processes the task description information based on the word embedding layer to obtain the trust domain center coordinates, trust domain radius, state deviation penalty weight, and control energy consumption penalty weight that match the current task.

[0023] The task description information corresponding to the current task refers to the information used to describe the current task. Specifically, it may include text information describing the task objectives, task requirements, etc. For example, the task description information may be natural language text describing the task content that the smart device needs to perform, such as a movement task, a grasping task, or an obstacle avoidance task.

[0024] In one implementation, the trust domain parameters include the trust domain center coordinates, the trust domain radius, the state deviation penalty weight, and the control energy consumption penalty weight; The step of determining the conditional information of the diffusion model and the trajectory constraint information for constraining the trajectory state range based on the trust domain parameters includes: The center bias vector is determined based on the center coordinates of the trust domain, the distribution spread control coefficient is determined based on the radius of the trust domain, and the center bias vector and the distribution spread control coefficient are determined as the condition information. The trust domain boundary is determined based on the center coordinates of the trust domain and the radius of the trust domain, and the trust domain boundary is determined as the trajectory constraint information.

[0025] In one embodiment, determining the center bias vector based on the center coordinates of the trust domain includes: acquiring multiple dimensions contained in the trajectory state; normalizing the center coordinates of the trust domain according to the multiple dimensions to obtain normalized coordinate values ​​corresponding to the multiple dimensions respectively; determining the normalized coordinate values ​​as the values ​​of the center bias vector in the corresponding dimensions to obtain the center bias vector; wherein, the center bias vector is used to adjust the distribution center of the denoising result to the position indicated by the center coordinates of the trust domain during the reverse denoising process.

[0026] For example, suppose the trajectory state contains two dimensions: the horizontal coordinate dimension and the vertical coordinate dimension. The center coordinates of the trust domain corresponding to the current task are c=(5,8), and the preset coordinate normalization baseline value is 10. Normalizing the center coordinates (5,8) of the trust domain according to these two dimensions yields a normalized coordinate value of 5 / 10=0.5 for the horizontal coordinate dimension and 8 / 10=0.8 for the vertical coordinate dimension. These normalized coordinate values ​​of 0.5 and 0.8 are then used as the values ​​of the center bias vector in the horizontal and vertical coordinate dimensions, respectively, resulting in a center bias vector of (0.5,0.8). In the subsequent reverse denoising process, this center bias vector (0.5,0.8) is used to adjust the distribution center of the denoising result to the position indicated by the center coordinates (5,8) of the trust domain.

[0027] In one embodiment, determining the distribution expansion control coefficient based on the trust domain radius includes: obtaining a preset reference radius; calculating the ratio between the trust domain radius and the preset reference radius, and determining the ratio as the distribution expansion control coefficient; wherein the preset reference radius is a pre-set reference value for normalizing the trust domain radius, and the distribution expansion control coefficient is used to control the expansion range of the denoising result relative to the distribution center during the reverse denoising process.

[0028] For example, continuing the previous example, assume the trust domain radius corresponding to the current task is (2,3), and the preset baseline radius is 5. Calculate the ratio between the trust domain radius (2,3) and the preset baseline radius 5. The ratio for the horizontal coordinate dimension is 2 / 5 = 0.4, and the ratio for the vertical coordinate dimension is 3 / 5 = 0.6. Determine the values ​​of 0.4 and 0.6 as the distribution spread control coefficients in the horizontal and vertical coordinate dimensions, respectively, resulting in distribution spread control coefficients of (0.4, 0.6). In the subsequent reverse denoising process, these distribution spread control coefficients (0.4, 0.6) are used to control the extent of the denoising result's spread relative to the distribution center in the horizontal and vertical coordinate dimensions.

[0029] In one embodiment, determining the trust domain boundary based on the trust domain center coordinates and the trust domain radius includes: defining a closed region centered on the trust domain center coordinates and with the trust domain radius as the radius; and defining the boundary of the closed region as the trust domain boundary. Specifically, the trust domain boundary satisfies the following relationship: ; Where x is the trajectory state point, c is the coordinate of the center of the trust domain, and R is a diagonal matrix composed of the radii of the trust domain.

[0030] For example, continuing the previous example, the center coordinates of the trust domain corresponding to the current task are c=(5,8), the radius of the trust domain is (2,3), and the diagonal matrix formed by the radius of the trust domain is R=diag(2,3). An elliptical closed region is defined with the center coordinates (5,8) of the trust domain and the radius (2,3) of the trust domain, satisfying the relation... The elliptical boundary formed by all trajectory state points x is centered at (5,8), with a major semi-axis of 2 and a minor semi-axis of 3. The boundary of this elliptical closed region is determined as the trust domain boundary and used as trajectory constraint information to constrain the state points of the intermediate trajectory obtained by the reverse denoising process to fall within the range of this elliptical region.

[0031] S102, acquire multiple initial noise trajectories.

[0032] Among them, multiple initial noise trajectories refer to multiple random trajectories that follow a preset noise distribution and are used as the initial input for the reverse denoising iteration of the diffusion model. Each initial noise trajectory can be converted into a candidate trajectory after the reverse denoising iteration. Since there are random differences between the multiple initial noise trajectories, there are also differences between the multiple candidate trajectories converted from them, thus ensuring the diversity of generated trajectories.

[0033] In one embodiment, multiple initial noise trajectories are acquired, including: Obtain a preset number of trajectories and multiple dimensions included in the trajectory states; according to the preset number of trajectories and the multiple dimensions, randomly sample from a preset noise distribution to obtain the multiple initial noise trajectories; wherein, the value of each trajectory state point in each dimension in each initial noise trajectory is a random value that conforms to the preset noise distribution, and the preset noise distribution is a standard normal distribution.

[0034] S103, perform multiple iterations on each of the initial noise trajectories to obtain the candidate trajectory corresponding to each initial noise trajectory.

[0035] In one implementation, the iterative process includes: Using the diffusion model, the trajectory to be processed is subjected to reverse denoising based on the conditional information to obtain the intermediate trajectory; The intermediate trajectory is constrained based on the trajectory constraint information to obtain the constrained trajectory. Specifically, during the first iteration, the trajectory to be processed is the initial noise trajectory; during subsequent iterations, the trajectory to be processed is the constrained trajectory obtained from the previous iteration; and the candidate trajectory is the constrained trajectory obtained from the last iteration.

[0036] In one implementation, the step of performing reverse denoising processing on the trajectory to be processed based on the condition information to obtain an intermediate trajectory includes: Feature extraction is performed on the trajectory to be processed to obtain trajectory features; The center bias vector and the distribution expansion control coefficient are fused with the trajectory features to obtain conditional trajectory features; Based on the aforementioned conditional trajectory features, noise in the trajectory to be processed is predicted to obtain predicted noise; The intermediate trajectory is obtained by denoising the trajectory to be processed based on the predicted noise.

[0037] In one embodiment, feature extraction is performed on the trajectory to be processed to obtain trajectory features, including: inputting the trajectory to be processed into the feature extraction network of the diffusion model, and encoding each trajectory state point in the trajectory to be processed through the feature extraction network to obtain trajectory features corresponding to the trajectory to be processed; wherein, the feature extraction network includes convolutional layers or fully connected layers, and the trajectory features are used to characterize the correlation information between each trajectory state point in the trajectory to be processed.

[0038] In one embodiment, fusing the center bias vector and the distribution expansion control coefficient with the trajectory features to obtain conditional trajectory features includes: concatenating the center bias vector and the distribution expansion control coefficient to obtain a conditional vector; inputting the conditional vector into a conditional coding network and encoding the conditional vector through the conditional coding network to obtain conditional coding features; and fusing the conditional coding features with the trajectory features to obtain the conditional trajectory features; wherein the fusion process includes at least one of concatenating, adding, or performing cross-attention calculation on the conditional coding features and the trajectory features.

[0039] In one embodiment, predicting noise in the trajectory to be processed based on the conditional trajectory features to obtain predicted noise includes: inputting the conditional trajectory features into the noise prediction network of the diffusion model, processing the conditional trajectory features through the noise prediction network to obtain predicted noise corresponding to the trajectory to be processed; wherein, the predicted noise is used to characterize the deviation between the trajectory to be processed and the corresponding noise-free trajectory.

[0040] In one embodiment, denoising the trajectory to be processed based on the predicted noise to obtain the intermediate trajectory includes: performing calculations on the trajectory to be processed and the predicted noise based on a preset denoising formula to obtain the intermediate trajectory; wherein the denoising formula is the inverse denoising iterative formula corresponding to the diffusion model, used to calculate the intermediate trajectory after removing part of the noise based on the current iteration number, the trajectory to be processed, and the predicted noise.

[0041] For example, suppose the current iteration is the t-th iteration in the reverse denoising process, and the trajectory to be processed is a two-dimensional trajectory containing 5 trajectory state points, denoted as X. t The conditional information identified in the aforementioned example includes the center bias vector (0.5, 0.8) and the distribution spread control coefficient (0.4, 0.6).

[0042] First, the trajectory X to be processed t The feature extraction network of the input diffusion model is used to process X through convolutional layers. tEach trajectory state point is encoded to obtain a trajectory feature F with a dimension of 5×64. t This is used to characterize the association information between the trajectory state points in the trajectory to be processed.

[0043] Next, the center bias vector (0.5, 0.8) and the distribution spread control coefficient (0.4, 0.6) are concatenated to obtain the condition vector (0.5, 0.8, 0.4, 0.6). This condition vector is then input into a conditional coding network for encoding, resulting in a 64-dimensional conditional coding feature E. The conditional coding feature E is then combined with the trajectory feature F. t After splicing and fusion, the conditional trajectory feature F with a dimension of 5×128 is obtained. t' .

[0044] Then, the conditional trajectory feature F t' The noise prediction network of the input diffusion model is processed to obtain the predicted noise ε corresponding to the trajectory Xt to be processed. t The predicted noise ε t Used to characterize the trajectory X to be processed t The deviation relative to the corresponding noise-free trajectory.

[0045] Finally, based on the preset denoising formula, the current iteration number t and the trajectory to be processed X are... t and prediction noise ε t Substitute the values ​​into the formula for processing, for example, calculate using the following denoising formula:

[0046] Where, α t and t Using the preset parameters corresponding to the diffusion model, the intermediate trajectory X after removing some noise is obtained through the above calculations. (t-1) This means completing the process of reverse denoising of the trajectory to be processed based on conditional information.

[0047] In one implementation, the intermediate trajectory includes multiple trajectory state points; The step of constraining the intermediate trajectory based on the trajectory constraint information to obtain the constrained trajectory includes: Determine the weighted distance of each trajectory state point relative to the coordinates of the center of the trust domain; From the plurality of trajectory state points, the trajectory state points with a weighted distance greater than a preset distance are determined as the target trajectory state points; For each target trajectory state point, based on the corresponding weighted distance, the offset vector between the target trajectory state point and the center coordinates of the trust domain is scaled, and the scaled offset vector is added to the center coordinates of the trust domain to obtain the projected state point located at the boundary of the trust domain. The target trajectory state points in the intermediate trajectory are updated based on the projected state points to obtain the constrained trajectory.

[0048] In one embodiment, determining the weighted distance of each trajectory state point relative to the center coordinates of the trust domain includes: obtaining a diagonal matrix composed of the radius of the trust domain; calculating the product of the inverse of the diagonal matrix and the difference between the trajectory state point and the center coordinates of the trust domain, and calculating the L2 norm of the product, and determining the L2 norm as the weighted distance of the trajectory state point relative to the center coordinates of the trust domain; wherein the weighted distance satisfies the following relationship:

[0049] Where d is the weighted distance, x is the trajectory state point, c is the coordinate of the center of the trust domain, and R is a diagonal matrix composed of the radii of the trust domain.

[0050] In one embodiment, determining the trajectory state point with a weighted distance greater than a preset distance from the plurality of trajectory state points as the target trajectory state point includes: A preset distance is obtained, which is a reference value used to determine whether a trajectory state point is located outside the trust domain boundary; the weighted distances of the plurality of trajectory state points are compared with the preset distance respectively; trajectory state points with a weighted distance greater than the preset distance are determined as target trajectory state points, and trajectory state points with a weighted distance less than or equal to the preset distance are determined as non-target trajectory state points; wherein, the preset distance is 1, and the target trajectory state point is used to characterize trajectory state points in the intermediate trajectory that exceed the trust domain boundary.

[0051] In one embodiment, based on the corresponding weighted distance, the offset vector between the target trajectory state point and the center coordinates of the trust domain is scaled, and the scaled offset vector is added to the center coordinates of the trust domain to obtain the projected state point located at the boundary of the trust domain. This includes: calculating the difference between the target trajectory state point and the center coordinates of the trust domain to obtain the offset vector; calculating the ratio between the preset distance and the corresponding weighted distance to obtain a scaling factor; multiplying the offset vector by the scaling factor to obtain the scaled offset vector; and adding the scaled offset vector to the center coordinates of the trust domain to obtain the projected state point; wherein the projected state point satisfies the following relationship:

[0052] Where x' is the projection state point, c is the center coordinate of the trust domain, r is the preset distance, d is the corresponding weighted distance, and x is the target trajectory state point.

[0053] In one embodiment, updating the target trajectory state points in the intermediate trajectory based on the projected state points to obtain the constrained trajectory includes: Each target trajectory state point in the intermediate trajectory is replaced with the corresponding projected state point, while keeping the non-target trajectory state points in the intermediate trajectory unchanged, to obtain the constrained trajectory; wherein, the weighted distance of each trajectory state point in the constrained trajectory relative to the center coordinate of the trust domain is less than or equal to the preset distance, that is, each trajectory state point in the constrained trajectory is located within the closed area defined by the boundary of the trust domain.

[0054] For example, continuing the previous example, the center coordinates of the trust domain corresponding to the current task are c=(5,8), the radius of the trust domain is (2,3), the diagonal matrix formed by the radius of the trust domain is R=diag(2,3), and the preset distance is r=1. Assume that the intermediate trajectory obtained after reverse denoising processing contains 3 trajectory state points, denoted as x_1=(6,9), x_2=(9,14), and x_3=(5,8).

[0055] First, for each trajectory state point, calculate its weighted distance relative to the center coordinates c=(5,8) of the trust domain: For x1=(6,9), the difference is (x1-c)=(1,1), which becomes (0.5,0.333) after the operation of the inverse matrix R^(-1)=diag(0.5,1 / 3). Its second norm is d1=√(0.5²+0.333²)≈0.601; For x2=(9,14), the difference is (x2-c)=(4,6), which becomes (2,2) after R^(-1) operation. Its 2 norm is d2=√(2²+2²)≈2.828; For x3=(5,8), the difference is (x3-c)=(0,0), and its weighted distance d3=0.

[0056] Secondly, the weighted distances are compared with the preset distance r=1: d1≈0.601 is less than 1, d3=0 is less than 1, so x1 and x3 are both determined to be non-target trajectory state points; d2≈2.828 is greater than 1, so x2 is determined to be the target trajectory state point.

[0057] Then, for the target trajectory state point x2=(9,14), based on its corresponding weighted distance d2≈2.828, the offset vector is calculated as (x2-c)=(4,6); the scaling factor is calculated as r / d2=1 / 2.828≈0.354; multiplying the offset vector by the scaling factor, the scaled offset vector is obtained as (4×0.354,6×0.354)≈(1.414,2.121); the scaled offset vector is added to the center coordinates of the trust domain c=(5,8) to obtain the projected state point x. 2' =(5+1.414,8+2.121)≈(6.414,10.121), and the projected state point is located above the boundary of the trust domain.

[0058] Finally, replace the target trajectory state point x2=(9,14) in the intermediate trajectory with the corresponding projected state point x. 2' ≈(6.414,10.121), and keep the non-target trajectory state points x1=(6,9) and x3=(5,8) unchanged, and obtain the constrained trajectory as {(6,9), (6.414,10.121), (5,8)}; the weighted distance of each trajectory state point in the constrained trajectory relative to the center coordinate (5,8) of the trust domain is less than or equal to the preset distance 1, that is, they are all located within the elliptical closed area defined by the boundary of the trust domain.

[0059] S104, Based on the trust domain parameters and each candidate trajectory, determine the evaluation information for each candidate trajectory.

[0060] In one implementation, the evaluation information includes a safety score, a fidelity score, an energy consumption score, and a smoothness score; the method further includes: obtaining obstacle information corresponding to the current task; For each candidate trajectory, based on the trust domain parameter and the candidate trajectory, evaluation information for the candidate trajectory is determined, including: The safety score of the candidate trajectory is determined based on the distance between the trajectory status points in the candidate trajectory and the obstacles indicated by the obstacle information. The fidelity score of the candidate trajectory is determined based on the state deviation penalty weight and the deviation of the candidate trajectory from the center coordinates of the trust domain. Based on the control energy consumption penalty weight and the control quantity corresponding to the candidate trajectory, the energy consumption score of the candidate trajectory is determined; The smoothness score of the candidate trajectory is determined based on the differences between adjacent trajectory state points in the candidate trajectory.

[0061] The safety score is used to characterize the safety level between the candidate trajectory and the obstacle. The higher the safety score, the lower the risk of a collision between the candidate trajectory and the obstacle.

[0062] The fidelity score is used to characterize the degree of deviation of the candidate trajectory from the position indicated by the center coordinates of the trust domain. The higher the fidelity score, the closer the candidate trajectory is to the position indicated by the center coordinates of the trust domain, that is, the higher the consistency of the candidate trajectory with the historical experience trajectory of the current task.

[0063] The energy consumption score is used to characterize the magnitude of the control quantity corresponding to the candidate trajectory. The higher the energy consumption score, the less control energy is required to generate the candidate trajectory.

[0064] The smoothness score is used to characterize the continuity between adjacent trajectory state points in the candidate trajectory. The higher the smoothness score, the smoother the change between adjacent trajectory state points in the candidate trajectory.

[0065] In one embodiment, the obstacle information is used to indicate obstacles present in the environment corresponding to the current task, and the obstacle information includes the location of the obstacles, which is used as a basis for determining the safety score of the candidate trajectory.

[0066] Obtaining obstacle information corresponding to the current task includes: Obtain environmental perception data corresponding to the current task; perform identification processing on the environmental perception data to determine the obstacles present in the environment and determine the position of each obstacle to obtain obstacle information; or, obtain pre-stored obstacle information corresponding to the current task, wherein the pre-stored obstacle information is the position of the obstacles obtained based on the pre-calibrated environment corresponding to the current task.

[0067] In one embodiment, determining the safety score of the candidate trajectory based on the distance between trajectory state points in the candidate trajectory and the obstacles indicated by the obstacle information includes: The location of each obstacle indicated by the obstacle information is obtained; for each trajectory state point in the candidate trajectory, the distance between the trajectory state point and the location of each obstacle is calculated, and the minimum distance is determined as the minimum obstacle distance corresponding to the trajectory state point; based on the minimum obstacle distance corresponding to each trajectory state point in the candidate trajectory, the safety score of the candidate trajectory is determined; wherein, the smaller the minimum obstacle distance corresponding to the trajectory state point, the lower the safety score of the candidate trajectory, and the larger the minimum obstacle distance corresponding to the trajectory state point, the higher the safety score of the candidate trajectory.

[0068] In one embodiment, determining the fidelity score of the candidate trajectory based on the state deviation penalty weight and the deviation of the candidate trajectory relative to the center coordinates of the trust domain includes: For each trajectory state point in the candidate trajectory, the difference between the trajectory state point and the coordinates of the center of the trust domain is calculated to obtain the state deviation. The state deviation corresponding to each trajectory state point in the candidate trajectory is weighted based on the state deviation penalty weight to obtain the weighted state deviation. Based on the weighted state deviation corresponding to each trajectory state point in the candidate trajectory, the fidelity score of the candidate trajectory is determined. Wherein, the larger the weighted state deviation, the lower the fidelity score of the candidate trajectory; the smaller the weighted state deviation, the higher the fidelity score of the candidate trajectory.

[0069] In one embodiment, determining the energy consumption score of the candidate trajectory based on the control energy consumption penalty weight and the control quantity corresponding to the candidate trajectory includes: Obtain the control amount required for the transition between adjacent trajectory state points in the candidate trajectory; perform weighted processing on the control amount corresponding to the candidate trajectory based on the control energy consumption penalty weight to obtain a weighted control amount; determine the energy consumption score of the candidate trajectory based on the weighted control amount corresponding to the candidate trajectory; wherein, the larger the weighted control amount, the lower the energy consumption score of the candidate trajectory, and the smaller the weighted control amount, the higher the energy consumption score of the candidate trajectory.

[0070] In one embodiment, determining the smoothness score of the candidate trajectory based on the differences between adjacent trajectory state points in the candidate trajectory includes: For every two adjacent trajectory state points in the candidate trajectory, the difference between them is calculated to obtain the state difference; based on the state difference corresponding to every two adjacent trajectory state points in the candidate trajectory, the smoothness score of the candidate trajectory is determined; wherein, the larger the state difference, the lower the smoothness score of the candidate trajectory, and the smaller the state difference, the higher the smoothness score of the candidate trajectory.

[0071] For example, continuing the previous example, suppose we obtain obstacle information corresponding to the current task. This obstacle information indicates that there is one obstacle in the environment, located at (7,9); the center coordinates of the trust domain in the trust domain parameters are (5,8), the state deviation penalty weight is 0.5, and the control energy consumption penalty weight is 0.3; the candidate trajectory to be evaluated is the constrained trajectory obtained by the aforementioned constraint processing, that is, the candidate trajectory containing three trajectory state points {x1=(6,9), x2=(6.414,10.121), x3=(5,8)}.

[0072] Determining the safety score: For each trajectory state point in the candidate trajectory, calculate the distance between it and the obstacle position (7,9): the distance between x1=(6,9) and the obstacle is √((7-6)²+(9-9)²)=1; the distance between x2=(6.414,10.121) and the obstacle is √((7-6.414)²+(9-10.121)²)≈1.264; the distance between x3=(5,8) and the obstacle is √((7-5)²+(9-8)²)≈2.236. Since there is only one obstacle in this candidate trajectory, the minimum obstacle distance corresponding to each trajectory state point is the distance calculated above. The minimum obstacle distance corresponding to x1 is 1, which is relatively small. Therefore, based on the minimum obstacle distance corresponding to each trajectory state point in this candidate trajectory, the safety score of this candidate trajectory is determined to be 60 points (the lower the value, the higher the risk of collision between the candidate trajectory and the obstacle).

[0073] Determining the fidelity score: For each trajectory state point in the candidate trajectory, calculate the difference between it and the center coordinates (5,8) of the trust domain to obtain the state deviation: the state deviation corresponding to x1=(6,9) is (1,1); the state deviation corresponding to x2=(6.414,10.121) is (1.414,2.121); and the state deviation corresponding to x3=(5,8) is (0,0). Based on the state deviation penalty weight of 0.5, the state deviations corresponding to the above trajectory state points are weighted, and the weighted state deviations are (0.5,0.5), (0.707,1.061), and (0,0), respectively. Based on the weighted state deviations corresponding to the candidate trajectory, the fidelity score of the candidate trajectory is determined to be 85 points.

[0074] Determine the energy consumption score: Obtain the control input required for the transition between adjacent trajectory state points in the candidate trajectory. For example, the control input required for the transition from x1 to x2 is 0.8, and the control input required for the transition from x2 to x3 is 0.6. Based on the control energy consumption penalty weight of 0.3, the above control inputs are weighted to obtain weighted control inputs of 0.24 and 0.18, respectively. Based on the weighted control inputs corresponding to the candidate trajectory, the energy consumption score of the candidate trajectory is determined to be 90 points.

[0075] Determine the smoothness score: For every two adjacent trajectory state points in the candidate trajectory, calculate the difference between them to obtain the state difference: the state difference between x1 and x2 is (0.414, 1.121); the state difference between x2 and x3 is (-1.414, -2.121). Based on the state differences corresponding to every two adjacent trajectory state points in the candidate trajectory, the smoothness score of the candidate trajectory is determined to be 75 points.

[0076] In summary, through the above processing, the final evaluation information corresponding to the candidate trajectory is determined as follows: safety score 60 points, fidelity score 85 points, energy consumption score 90 points, and smoothness score 75 points.

[0077] In one implementation, the evaluation information further includes a time consistency score; For each candidate trajectory, based on the trust domain parameter and the candidate trajectory, evaluation information for the candidate trajectory is determined, including: When the current control period is a control period other than the first control period, the time consistency score of the candidate trajectory corresponding to the current control period is determined based on the difference between the candidate trajectory corresponding to the current control period and the target trajectory corresponding to the previous control period; when the current control period is the first control period, a preset time consistency score is set for the candidate trajectory corresponding to the current control period.

[0078] The time consistency score is used to characterize the degree of continuity in trajectory shape between the candidate trajectory and the target trajectory determined in the adjacent control cycle. The higher the time consistency score, the closer the candidate trajectory is to the target trajectory in the adjacent control cycle.

[0079] In one embodiment, determining the temporal consistency score of the candidate trajectory corresponding to the current control cycle based on the difference between the candidate trajectory corresponding to the current control cycle and the target trajectory corresponding to the previous control cycle includes: The positional deviation between the candidate trajectory corresponding to the current control cycle and the target trajectory corresponding to the previous control cycle at the corresponding time point is obtained, and the difference value is calculated based on the positional deviation. The larger the difference value, the lower the time consistency score of the candidate trajectory corresponding to the current control cycle; the smaller the difference value, the higher the time consistency score of the candidate trajectory corresponding to the current control cycle.

[0080] In one embodiment, setting a preset time consistency score for the candidate trajectory corresponding to the current control cycle includes: Since there is no target trajectory corresponding to the previous control cycle when the current control cycle is the first control cycle, the same preset time consistency score is set for each candidate trajectory corresponding to the current control cycle.

[0081] In one embodiment, if the change in the trust domain parameter does not meet the preset change condition and no new obstacle is detected, the time consistency score has an initial evaluation weight in the target trajectory selection process; if the change in the trust domain parameter meets the preset change condition, or if a new obstacle is detected, the evaluation weight corresponding to the time consistency score is reduced from the initial evaluation weight to an evaluation weight less than the initial evaluation weight.

[0082] S105, Based on the evaluation information of each candidate trajectory, determine the target trajectory from the multiple candidate trajectories.

[0083] In one implementation, determining the target trajectory from multiple candidate trajectories based on the evaluation information of each candidate trajectory includes: Based on the security score of each candidate trajectory, a safe candidate trajectory that meets the preset security conditions is selected from multiple candidate trajectories; If there is one safe candidate trajectory, then the safe candidate trajectory is determined as the target trajectory; If there are multiple safe candidate trajectories, the target trajectory is determined from the multiple safe candidate trajectories based on the fidelity score, energy consumption score, and smoothness score of the safe candidate trajectories. If no safe candidate trajectory is found among the multiple candidate trajectories, then the candidate trajectory with the highest safety score among the multiple candidate trajectories is determined as the target trajectory.

[0084] The preset safety condition is used to characterize the judgment condition that the safety level between the candidate trajectory and the obstacle must meet. The preset safety condition is that the safety score is not less than a preset safety score threshold, which is used as the basis for judging whether the candidate trajectory can be used as a safe candidate trajectory.

[0085] In one embodiment, based on the security score of each candidate trajectory, a safe candidate trajectory that meets a preset security condition is selected from multiple candidate trajectories, including: obtaining a preset security score threshold; comparing the security score of each candidate trajectory with the preset security score threshold; determining candidate trajectories with a security score not less than the preset security score threshold as safe candidate trajectories, and determining candidate trajectories with a security score less than the preset security score threshold as unsafe candidate trajectories.

[0086] In one embodiment, determining the target trajectory from multiple safe candidate trajectories based on the fidelity score, energy consumption score, and smoothness score of the safe candidate trajectory includes: for each safe candidate trajectory, performing a weighted summation of the fidelity score, energy consumption score, and smoothness score of the safe candidate trajectory based on a preset weight coefficient to obtain a comprehensive score corresponding to the safe candidate trajectory; and determining the safe candidate trajectory with the highest comprehensive score among the multiple safe candidate trajectories as the target trajectory.

[0087] For example, continuing the previous example, let's assume the preset safety score threshold is 70 points, meaning the preset safety condition is a safety score of no less than 70 points. After determining the evaluation information, assuming the multiple candidate trajectories corresponding to the current task are candidate trajectory 1 to candidate trajectory 4, their evaluation information is as follows: Candidate trajectory 1: Safety score 60, fidelity score 85, energy consumption score 90, smoothness score 75; Candidate trajectory 2: Safety score 75, fidelity score 70, energy consumption score 80, smoothness score 85; Candidate trajectory 3: Safety score 82, fidelity score 65, energy consumption score 75, smoothness score 70; Candidate trajectory 4: Safety score 50, fidelity score 90, energy consumption score 95, smoothness score 80.

[0088] Scenario 1 (Multiple Safe Candidate Trajectories): The safety scores of the four candidate trajectories are compared with the preset safety score threshold of 70. Candidate trajectory 2 (75 points) and candidate trajectory 3 (82 points) are both not less than 70, therefore candidate trajectory 2 and candidate trajectory 3 are determined as safe candidate trajectories. Candidate trajectory 1 (60 points) and candidate trajectory 4 (50 points) are both less than 70, therefore they are both determined as unsafe candidate trajectories. Since there are two safe candidate trajectories, the target trajectory is determined based on the fidelity score, energy consumption score, and smoothness score of safe candidate trajectory 2 and safe candidate trajectory 3. Assuming the weight of the fidelity score is 0.4, the weight of the energy consumption score is 0.3, and the weight of the smoothness score is 0.3 in the preset weighting coefficients, then the comprehensive score for candidate trajectory 2 is 70×0.4+80×0.3+85×0.3=28+24+25.5=77.5 points; the comprehensive score for candidate trajectory 3 is 65×0.4+75×0.3+70×0.3=26+22.5+21=69.5 points. Since the comprehensive score of candidate trajectory 2 (77.5 points) is higher than the comprehensive score of candidate trajectory 3 (69.5 points), candidate trajectory 2 is determined as the target trajectory.

[0089] Scenario 2 (Only one safe candidate trajectory): Assuming that after comparison, only candidate trajectory 2 has a safety score of 75 points which is not less than the preset safety score threshold of 70 points, and the safety scores of the other candidate trajectories are all less than 70 points, then there is only one safe candidate trajectory, candidate trajectory 2. Therefore, candidate trajectory 2 is directly determined as the target trajectory, without the need for further screening based on fidelity score, energy consumption score and smoothness score.

[0090] Scenario 3 (No safe candidate trajectory): Suppose that after comparison, the safety scores of candidate trajectories 1 to 4 (60 points, 75 points become 65 points, 82 points become 68 points, and 50 points respectively; for ease of illustration, it is assumed that the safety scores of the four candidate trajectories are all adjusted to be less than 70 points, for example, 60 points, 65 points, 68 points, and 50 points respectively) are all less than the preset safety score threshold of 70 points. In this case, there is no safe candidate trajectory among the multiple candidate trajectories. Therefore, candidate trajectory 3 (safety score of 68 points) with the highest safety score among the multiple candidate trajectories is determined as the target trajectory.

[0091] In another implementation, determining the target trajectory from multiple candidate trajectories based on the evaluation information of each candidate trajectory includes: Determine the comprehensive score for each candidate trajectory, and determine the candidate trajectory with the highest comprehensive score as the target trajectory; For each candidate trajectory, a comprehensive score is determined, including: Based on the current security status, determine the evaluation weight corresponding to the security score; The comprehensive score of the candidate trajectory is determined based on the security score and its corresponding evaluation weight, the fidelity score, the energy consumption score, and the smoothness score.

[0092] The current safety status is used to characterize the safety level of the environment corresponding to the current task. The current safety status is determined based on the distance between the trajectory state points in the candidate trajectory and the obstacles indicated by the obstacle information, and is used as the basis for dynamically adjusting the evaluation weight corresponding to the safety score.

[0093] In one embodiment, determining the evaluation weight corresponding to the security score based on the current security status includes: The distance between the trajectory state point in the candidate trajectory and the obstacle indicated by the obstacle information is obtained, and the current safety status is determined based on the distance; it is determined whether the distance indicated by the current safety status is less than a preset distance threshold; if the distance indicated by the current safety status is less than the preset distance threshold, the evaluation weight corresponding to the safety score is determined as a first evaluation weight; if the distance indicated by the current safety status is not less than the preset distance threshold, the evaluation weight corresponding to the safety score is determined as a second evaluation weight, wherein the first evaluation weight is greater than the second evaluation weight.

[0094] In one embodiment, the comprehensive score of the candidate trajectory is determined based on the security score and its corresponding evaluation weight, the fidelity score, the energy consumption score, and the smoothness score, including: The safety score is multiplied by its corresponding evaluation weight to obtain a weighted safety score; preset weight coefficients are obtained for the fidelity score, energy consumption score, and smoothness score, respectively, and the fidelity score, energy consumption score, and smoothness score are weighted based on the preset weight coefficients to obtain a weighted fidelity score, a weighted energy consumption score, and a weighted smoothness score; the weighted safety score, the weighted fidelity score, the weighted energy consumption score, and the weighted smoothness score are summed to obtain a comprehensive score for the candidate trajectory.

[0095] For example, continuing the previous example, suppose the multiple candidate trajectories corresponding to the current task are candidate trajectory 1 to candidate trajectory 4. After determining the evaluation information, the safety score, fidelity score, energy consumption score, smoothness score, and minimum obstacle distance between the trajectory state point and the obstacle in the candidate trajectory are as follows: Candidate trajectory 1: Safety score 60, minimum obstacle distance is 1; fidelity score 88, energy consumption score 90, smoothness score 75; Candidate trajectory 2: Safety score 75, minimum obstacle distance is 2; fidelity score 70, energy consumption score 80, smoothness score 85; Candidate trajectory 3: Safety score 82, minimum obstacle distance 2.5; fidelity score 65, energy consumption score 75, smoothness score 70; Candidate trajectory 4: Safety score 50, minimum obstacle distance is 0.8; fidelity score 90, energy consumption score 95, smoothness score 80.

[0096] The preset distance threshold is set to 1.5, the first evaluation weight is 0.5, and the second evaluation weight is 0.2; the preset weight coefficients for loyalty score, energy consumption score, and smoothness score are 0.3, 0.2, and 0.2, respectively.

[0097] Determine the current safety status and the corresponding evaluation weights for the safety score: For each candidate trajectory, based on the distance between the trajectory status point and the obstacle, determine the current safety status and compare the distance indicated by the current safety status with a preset distance threshold of 1.5. The distance indicated by the current safety status of candidate trajectory 1 is 1, which is less than the preset distance threshold of 1.5. Therefore, the evaluation weight corresponding to the safety score of candidate trajectory 1 is determined to be the first evaluation weight of 0.5. The distance indicated by the current safety status of candidate trajectory 4 is 0.8, which is also less than the preset distance threshold of 1.5. Therefore, the evaluation weight corresponding to the safety score of candidate trajectory 4 is determined to be the first evaluation weight of 0.5. The distance indicated by the current safety status of candidate trajectory 2 is 2, and the distance indicated by the current safety status of candidate trajectory 3 is 2.5. Both are not less than the preset distance threshold of 1.5. Therefore, the evaluation weight corresponding to the safety scores of candidate trajectory 2 and candidate trajectory 3 is determined to be the second evaluation weight of 0.2.

[0098] Determine the overall score for each candidate trajectory: For candidate trajectory 1, its safety score of 60 is multiplied by the corresponding evaluation weight of 0.5 to obtain a weighted safety score of 30. Based on the preset weight coefficients, the fidelity score of 88, the energy consumption score of 90, and the smoothness score of 75 are weighted to obtain a weighted fidelity score of 26.4, a weighted energy consumption score of 18, and a weighted smoothness score of 15. The above weighted safety score, weighted fidelity score, weighted energy consumption score, and weighted smoothness score are summed to obtain the comprehensive score of candidate trajectory 1 as 30 + 26.4 + 18 + 15 = 89.4.

[0099] For candidate trajectory 2, the weighted safety score is 75×0.2=15 points, the weighted fidelity score is 70×0.3=21 points, the weighted energy consumption score is 80×0.2=16 points, and the weighted smoothness score is 85×0.2=17 points. The summation gives the comprehensive score of candidate trajectory 2 as 15+21+16+17=69 points.

[0100] For candidate trajectory 3, the weighted safety score is 82×0.2=16.4 points, the weighted fidelity score is 65×0.3=19.5 points, the weighted energy consumption score is 75×0.2=15 points, and the weighted smoothness score is 70×0.2=14 points. The sum of these scores gives the overall score of candidate trajectory 3 as 16.4+19.5+15+14=64.9 points.

[0101] For candidate trajectory 4, the weighted safety score is 50 × 0.5 = 25 points, the weighted fidelity score is 90 × 0.3 = 27 points, the weighted energy consumption score is 95 × 0.2 = 19 points, and the weighted smoothness score is 80 × 0.2 = 16 points. The sum of these scores gives the overall score of candidate trajectory 4 as 25 + 27 + 19 + 16 = 87 points.

[0102] Determine the target trajectory: Compare the comprehensive scores of the above 4 candidate trajectories. Candidate trajectory 1 has the highest comprehensive score of 89.4 points. Therefore, candidate trajectory 1 is determined as the target trajectory.

[0103] In one implementation, the method further includes: Control commands for the intelligent device are generated based on the target trajectory; The control command is sent to the actuator of the smart device to control the smart device to perform the current task according to the target trajectory.

[0104] In one embodiment, generating control commands for the smart device based on the target trajectory includes: Obtain the control quantities corresponding to each trajectory state point in the target trajectory; based on the control quantities and the instruction format corresponding to the actuator of the intelligent device, generate control instructions for the intelligent device, which are used to instruct the actuator of the intelligent device to perform actions at various times, so that the intelligent device moves according to the target trajectory.

[0105] In one embodiment, sending the control command to the actuator of the smart device to control the smart device to execute the current task according to the target trajectory includes: The control command is sent to the execution mechanism of the smart device through the communication interface; the execution mechanism performs corresponding actions according to the control command to drive the smart device to move according to each trajectory state point in the target trajectory and complete the current task.

[0106] For example, continuing the previous example, suppose that candidate trajectory 1 is determined to be the target trajectory, and the intelligent device is a mobile robot whose actuator includes a drive motor and a steering motor. The target trajectory 1 consists of multiple trajectory state points, each corresponding to a specific control quantity, including linear velocity and steering angle, as shown in the following example: The control variables corresponding to trajectory state point 1 are: linear velocity 0.5 m / s and steering angle 0 degrees; The control variables corresponding to trajectory state point 2 are: linear velocity 0.6 m / s and steering angle 5 degrees; The control variables corresponding to trajectory state point 3 are: linear velocity 0.55 m / s, steering angle -3 degrees; The control variables corresponding to trajectory state point 4 are: linear velocity 0.5 m / s and steering angle 0 degrees.

[0107] Generate control commands: Obtain the control quantities corresponding to each trajectory state point in the target trajectory 1, and based on the command format that the drive motor and steering motor of the mobile robot can recognize, convert the control quantities into corresponding control commands. For example, convert the control quantity corresponding to trajectory state point 1 into the drive motor control command "speed corresponds to 0.5 m / s" and the steering motor control command "turning angle corresponds to 0 degrees"; convert the control quantity corresponding to trajectory state point 2 into the drive motor control command "speed corresponds to 0.6 m / s" and the steering motor control command "turning angle corresponds to 5 degrees"; and so on, to obtain the drive motor control commands and steering motor control commands corresponding to trajectory state points 3 and 4 respectively.

[0108] Sending and executing control commands: The drive motor control commands and steering motor control commands generated above, corresponding to trajectory state points 1 to 4 respectively, are sent sequentially to the drive motors and steering motors of the mobile robot through the communication interface of the mobile robot, in the order of trajectory state points 1 to 4. The drive motors and steering motors execute corresponding actions sequentially according to the received control commands. For example, first, according to the control command corresponding to trajectory state point 1, they move at a linear speed of 0.5 m / s and a turning angle of 0 degrees, then according to the control command corresponding to trajectory state point 2, they move at a linear speed of 0.6 m / s and a turning angle of 5 degrees, and so on, until the actions corresponding to all trajectory state points are completed, thereby enabling the mobile robot to move according to the target trajectory 1 and complete the current task.

[0109] In this embodiment, by acquiring multiple initial noise trajectories and performing reverse denoising iteration processing based on the diffusion model, multiple candidate trajectories with differences are obtained, which avoids the problem of the generated candidate trajectories being relatively homogeneous and improves the diversity of the generated trajectories.

[0110] In addition, during each iteration, the intermediate trajectories are constrained based on the trajectory constraint information, so that the generated trajectory is limited to the state range represented by the trajectory constraint information. This ensures that the candidate trajectory conforms to the motion constraints of the smart device, avoids the problem that the generated trajectory does not meet the motion constraints or safety requirements, and improves the physical feasibility and safety of the generated trajectory.

[0111] Furthermore, the conditional information of the diffusion model is determined based on the trust domain parameters corresponding to the current task, so that the generation of candidate trajectories can be guided by the trust domain parameters; and the evaluation information is determined based on the trust domain parameters and candidate trajectories to select the target trajectory, thereby ensuring that the target trajectory takes into account diversity, physical feasibility and adapts to different task requirements.

[0112] In one implementation, the method further includes: Obtain the calculation time budget corresponding to the current control cycle; Based on the computation time budget, the number of initial noise trajectories and the number of iterations are determined.

[0113] The computation time budget corresponding to the current control cycle is used to characterize the upper limit of the time available for generating the initial noise trajectory and performing the iterative processing within the current control cycle. The computation time budget is determined based on the control cycle duration of the smart device and is used as the basis for determining the number of initial noise trajectories and the number of iterative processes.

[0114] In one embodiment, obtaining the computation time budget corresponding to the current control cycle includes: obtaining the control cycle duration of the smart device; obtaining the duration consumed by other processing steps within the current control cycle, excluding generating the initial noise trajectory and performing the iterative processing; and determining the difference between the control cycle duration and the duration consumed by the other processing steps as the computation time budget corresponding to the current control cycle.

[0115] In one embodiment, determining the number of initial noise trajectories and the number of iterations based on the computation time budget includes: obtaining a preset generation time for a single initial noise trajectory and a processing time for a single iteration; determining the number of initial noise trajectories and the number of iterations based on the computation time budget, the generation time, and the processing time, such that the sum of the time consumed in generating the initial noise trajectories based on the number of initial noise trajectories and the time consumed in performing the iterations based on the number of iterations does not exceed the computation time budget.

[0116] For example, continuing the previous example, suppose the control cycle of the intelligent device is 100 milliseconds, meaning that the target trajectory needs to be determined and the corresponding control command generated every 100 milliseconds. Statistically, within the current control cycle, the total time consumed by other processing steps besides generating the initial noise trajectory and performing the iterative processing (such as acquiring task information, obstacle information, determining evaluation information, generating and sending control commands, etc.) is 20 milliseconds. Therefore, the difference between the control cycle length of 100 milliseconds and the time consumed by the other processing steps (20 milliseconds) is determined as the computation time budget corresponding to the current control cycle, i.e., the computation time budget is 80 milliseconds.

[0117] Furthermore, the preset generation time for a single initial noise trajectory is 0.3 milliseconds, and the preset processing time for each candidate trajectory in a single iteration is 0.1 milliseconds. Assuming the preset number of initial noise trajectories is 100, the time consumed to generate 100 initial noise trajectories is 100 × 0.3 milliseconds = 30 milliseconds. The difference between the estimated computation time of 80 milliseconds and the time consumed to generate the initial noise trajectories of 30 milliseconds is determined as the available time for the iterative processing, i.e., 50 milliseconds. Since each candidate trajectory needs to be processed separately in a single iteration, the processing time for a single iteration is 100 × 0.1 milliseconds = 10 milliseconds. Based on the available time of 50 milliseconds for iterative processing and the processing time of 10 milliseconds for a single iteration, the number of iterations is determined to be 50 ÷ 10 = 5.

[0118] Therefore, the number of initial noise trajectories is determined to be 100, and the number of iterations is 5. At this time, the sum of the time consumed in generating the initial noise trajectories and performing the iterations is 30 milliseconds + 50 milliseconds = 80 milliseconds, which does not exceed the calculation time budget of 80 milliseconds, thus ensuring that all processing steps can be completed within the current control cycle of 100 milliseconds.

[0119] If, in another control cycle, the time consumed by other processing steps increases to 40 milliseconds, the computation time budget is reduced accordingly to 100 milliseconds - 40 milliseconds = 60 milliseconds. Based on this, the number of initial noise trajectories or the number of iterations can be reduced accordingly (for example, the number of initial noise trajectories can be adjusted to 80, and the number of iterations can be adjusted to 3), so that the sum of the time consumed in generating the initial noise trajectories and performing the iterations does not exceed the adjusted computation time budget of 60 milliseconds, thereby ensuring that the processing can still be completed within the duration of the control cycle.

[0120] In this embodiment, by obtaining the computation time budget corresponding to the current control cycle and determining the number of initial noise trajectories and the number of iterations based on the computation time budget, the resources used for generating initial noise trajectories and performing iterations can be dynamically adjusted according to the available computation time within the current control cycle. This avoids the processing time exceeding the current control cycle duration due to an excessive number of initial noise trajectories or an excessive number of iterations, thereby ensuring that the determination of the target trajectory and the generation and transmission of control commands can be completed in a timely manner within each control cycle, meeting the needs of the intelligent device to execute the current task in real time. At the same time, under the premise of meeting the computation time budget, making full use of the available time for generating initial noise trajectories and performing iterations helps to improve the quality of the determined target trajectory.

[0121] In one implementation, the method further includes: If the safety score of the target trajectory is lower than the safety score threshold, the comprehensive score of each candidate trajectory is subjected to exponential normalization to obtain the trajectory fusion weight corresponding to each candidate trajectory. A fused trajectory is obtained by weighted fusion of multiple candidate trajectories and their corresponding trajectory fusion weights. The safety residual is determined based on the distance between the trajectory state points in the fused trajectory and the obstacle, as well as the preset safety distance; Based on the security residual, gradient backpropagation is performed via the generation process of the fused trajectory and each candidate trajectory to obtain security guidance information; the security guidance information is used to guide the generation of trust domain parameters in the next control cycle.

[0122] The security score threshold is used to determine whether the security of the target trajectory meets the preset security requirements. When the security score of the target trajectory is lower than the security score threshold, it is determined that the target trajectory has a security risk. Then, based on multiple candidate trajectories, security guidance information is determined to guide the generation of trust domain parameters in the next control cycle.

[0123] In one embodiment, the comprehensive score of each candidate trajectory is subjected to exponential normalization to obtain the trajectory fusion weight corresponding to each candidate trajectory, including: For each candidate trajectory, the index value corresponding to the candidate trajectory is calculated based on the ratio of the comprehensive score of the candidate trajectory to the preset temperature coefficient, with the natural constant as the base. The ratio of the index value corresponding to each candidate trajectory to the sum of the index values ​​corresponding to all candidate trajectories is determined as the trajectory fusion weight corresponding to the candidate trajectory.

[0124] In one embodiment, a weighted fusion is performed based on multiple candidate trajectories and their corresponding trajectory fusion weights to obtain a fused trajectory, including: For trajectory state points at the same time among multiple candidate trajectories, the trajectory state point corresponding to each candidate trajectory at that time is multiplied by the trajectory fusion weight corresponding to that candidate trajectory, and the result of the multiplication is summed to obtain the fused trajectory state point corresponding to that time; based on the fused trajectory state points corresponding to each time, the fused trajectory is generated in time order.

[0125] In one embodiment, determining the safety residual based on the distance between the trajectory state points in the fused trajectory and the obstacle, and a preset safety distance, includes: For each trajectory state point in the fused trajectory, the distance between the trajectory state point and the obstacle is obtained; based on the difference between the preset safe distance and the distance, the safety residual component corresponding to the trajectory state point is determined; the safety residual components corresponding to all trajectory state points in the fused trajectory are summed to obtain the safety residual.

[0126] In one embodiment, based on the security residual, gradient backpropagation is performed via the generation process of the fused trajectory and each of the candidate trajectories to obtain security guidance information, including: Using the safety residual as the starting gradient, the weighted fusion process along the fusion trajectory is backpropagated to each of the candidate trajectories; the generation process of the candidate trajectory is obtained by iterative processing based on the corresponding initial noise trajectory along each candidate trajectory; the gradient is further backpropagated to the initial noise trajectory and the relevant parameters used in the iterative processing to obtain the corresponding gradient information; the gradient information is determined as the safety guidance information, which is used to guide the generation of the trust domain parameters in the next control cycle.

[0127] For example, continuing with the previous example, suppose the preset safety score threshold is 0.6. It is determined that the safety score of the target trajectory (i.e., candidate trajectory 1) is 0.5, which is lower than the safety score threshold of 0.6, thus triggering the processing described in this implementation.

[0128] Assume that after generation and iterative processing, three candidate trajectories are obtained: candidate trajectory 1, candidate trajectory 2, and candidate trajectory 3, with corresponding comprehensive scores of 0.8, 0.75, and 0.7, respectively, and the preset temperature coefficient is 1.

[0129] Using the natural constant e as the base and the ratio of the comprehensive score of each candidate trajectory to the temperature coefficient 1 as the exponent, the exponent values ​​for candidate trajectory 1, e^0.8 ≈ 2.2255, candidate trajectory 2, e^0.75 ≈ 2.1170, and candidate trajectory 3, e^0.7 ≈ 2.0138 are calculated; the sum of these three is approximately 6.3563. Based on this, the trajectory fusion weights for candidate trajectory 1 are 2.2255 / 6.3563 ≈ 0.350, for candidate trajectory 2, 2.1170 / 6.3563 ≈ 0.333, and for candidate trajectory 3, 2.0138 / 6.3563 ≈ 0.317.

[0130] Taking the trajectory state points at a certain time among three candidate trajectories as an example, assuming the coordinates of the trajectory state point corresponding to candidate trajectory 1 at that time are (5.0, 2.0), the coordinates of the trajectory state point corresponding to candidate trajectory 2 are (5.2, 2.3), and the coordinates of the trajectory state point corresponding to candidate trajectory 3 are (5.4, 2.5). Multiplying the coordinates of the trajectory state points of the three candidate trajectories at that time by their respective trajectory fusion weights and summing the results, we obtain the coordinates of the fused trajectory state point at that time: x = 0.350×5.0 + 0.333×5.2 + 0.317×5.4 ≈ 5.194 y = 0.350×2.0 + 0.333×2.3 + 0.317×2.5 ≈ 2.259 That is, the coordinates of the fused trajectory state point at this moment are approximately (5.194, 2.259). Following the above method, the trajectory state points corresponding to the remaining moments are weighted and fused respectively, and then the fused trajectories are formed in the order of the moments.

[0131] Assuming the obstacle location coordinates indicated by the obstacle information are (5.3, 2.3), and the preset safety distance is 0.5 meters, the distance between the fused trajectory state point (5.194, 2.259) and the obstacle is calculated as follows: √[(5.3-5.194)² + (2.3-2.259)²] = √(0.0112+0.0017) ≈ 0.114 meters Since this distance of 0.114 meters is less than the preset safety distance of 0.5 meters, the difference between the preset safety distance and this distance is determined as the safety residual component corresponding to this trajectory state point, i.e., 0.5 - 0.114 ≈ 0.386. In the same way, the safety residual components corresponding to the remaining trajectory state points in the fused trajectory are calculated (if the distance between a trajectory state point and the obstacle is greater than or equal to the preset safety distance, then the safety residual component corresponding to that trajectory state point is zero), and all safety residual components are summed. Assuming the final safety residual is 0.42, it indicates that the fused trajectory has a risk of being too close to the obstacle.

[0132] Using the aforementioned safety residual of 0.42 as the starting gradient for backpropagation, the gradient is backpropagated along the weighted fusion process of the fusion trajectory (i.e., the aforementioned weighted summation operation) to the trajectory state points corresponding to candidate trajectory 1, candidate trajectory 2, and candidate trajectory 3, respectively, to obtain the gradient of the safety residual relative to the trajectory state points of each candidate trajectory at the corresponding time. Then, the generation process of the candidate trajectory is obtained by iterative processing based on the corresponding initial noise trajectory along each candidate trajectory. The gradient is then backpropagated to the initial noise trajectory corresponding to the candidate trajectory and the trust domain related parameters (such as the mean and covariance of the control quantity distribution) used in the iterative processing to obtain the gradient information of the safety residual relative to the trust domain related parameters. This gradient information is determined as the safety guidance information.

[0133] In this embodiment, when the safety score of the target trajectory is lower than the safety score threshold, the comprehensive score of each candidate trajectory is exponentially normalized to obtain the trajectory fusion weight. Then, a weighted fusion is performed based on multiple candidate trajectories and their corresponding trajectory fusion weights to obtain a fused trajectory. This integrates information from multiple candidate trajectories, allowing the safety residual determined based on the fused trajectory to more comprehensively reflect the safety status of the multiple candidate trajectories relative to the obstacle, avoiding the bias caused by relying solely on a single target trajectory for safety assessment. The safety residual is determined based on the distance between the trajectory state points in the fused trajectory and the obstacle, as well as a preset safety distance. The safety residual can quantitatively characterize the safety margin of the fused trajectory relative to the obstacle. By backpropagating the gradient based on the safety residual through the generation process of the fused trajectory and each candidate trajectory, safety guidance information for generating trust domain parameters for the next control cycle is obtained. This allows the safety risks of the target trajectory to be backpropagated to the trust domain parameters along the trajectory generation process, so that the candidate trajectory and target trajectory generated in the next control cycle based on the adjusted trust domain parameters tend to move away from the obstacle. This establishes a safety feedback mechanism between multiple control cycles and improves the overall safety of the intelligent device in the process of executing the current task.

[0134] In one implementation, the trust domain parameter is generated by a parameter generation model based on at least one of the task information, environment information, and state information of the smart device corresponding to the current task; The method further includes: Based on the safety guidance information corresponding to the historical control cycle, the safety guidance information corresponding to the current control cycle is subjected to momentum smoothing, and then adaptive intensity mapping, dimension sparsification and vector normalization are performed in sequence to obtain the processed safety guidance information. The processed safety guidance information is injected into the embedding features output by the embedding layer of the parameter generation model to obtain the injected embedding features. The model is generated using the parameters, and with the model parameters remaining unchanged, the trust domain parameters corresponding to the next control cycle are generated based on the injected embedded features.

[0135] The network structure of the parameter generation model includes an embedding layer, a feature extraction layer, and an output layer following the embedding layer. The embedding layer is used to embed and encode at least one of the input task information, environmental information, and state information of the smart device, and output the corresponding embedding features. The feature extraction layer and the output layer are used to generate the trust domain parameters based on the embedding features.

[0136] The task information includes at least one of target location, target orientation, task type, and task priority; the environmental information includes at least one of obstacle location, size, type, and motion status, and map information; the smart device's status information includes at least one of the smart device's current position, speed, acceleration, and attitude angle.

[0137] In one embodiment, the safety guidance information corresponding to the current control cycle is subjected to momentum smoothing based on the safety guidance information corresponding to the historical control cycle, and then adaptive intensity mapping, dimensional sparsity reduction, and vector normalization are performed sequentially to obtain the processed safety guidance information, including: According to the preset momentum coefficient, the safety guidance information corresponding to the current control cycle and the safety guidance information corresponding to the historical control cycle are weighted and accumulated to obtain the safety guidance information after momentum smoothing. Based on the magnitude of the safety residual, a corresponding intensity mapping coefficient is determined, and the intensity mapping coefficient is multiplied by the momentum smoothing-processed safety guidance information to obtain the adaptive intensity mapping-processed safety guidance information; wherein, the larger the safety residual, the larger the intensity mapping coefficient; According to a preset ratio or a preset threshold, retain the dimension components whose values ​​in the safety guidance information after the adaptive intensity mapping process meet the preset conditions, and set the remaining dimension components to zero to obtain the safety guidance information after dimension sparsification. Calculate the vector norm of the security guidance information after the dimension sparsification process, and normalize the security guidance information after the dimension sparsification process based on the vector norm to obtain the processed security guidance information.

[0138] In one embodiment, injecting the processed security guidance information into the embedding features output by the embedding layer of the parameter generation model to obtain the injected embedding features includes: The processed security guidance information is fused with the embedded features output by the embedding layer after embedding and encoding at least one of the task information, environment information and the state information of the smart device, to obtain the injected embedded features.

[0139] In one embodiment, the step of generating a model using the parameters, while keeping the model parameters unchanged, and generating trust domain parameters corresponding to the next control cycle based on the injected embedding features, includes: While keeping the model parameters of each network layer in the parameter generation model unchanged, the injected embedded features are input to the feature extraction layer and the output layer. After processing by the feature extraction layer and the output layer, the trust domain parameters corresponding to the next control cycle are output.

[0140] In this embodiment of the application, the trust domain parameter is generated by the parameter generation model based on at least one of the task information, environment information and state information of the smart device corresponding to the current task. This enables the generated trust domain parameter to be adapted to the current task, the environment and the state of the smart device itself, thereby improving the rationality of the trust domain parameter.

[0141] By applying momentum smoothing to the safety guidance information corresponding to the current control cycle based on the safety guidance information corresponding to the historical control cycle, and then performing adaptive intensity mapping, dimension sparsification, and vector normalization in sequence, it is possible to suppress drastic fluctuations in the safety guidance information, highlight the dimension components that have a greater impact on safety, and constrain their numerical range within a reasonable range, thereby improving the stability and effectiveness of the safety guidance information.

[0142] By injecting the processed safety guidance information into the embedding features output by the embedding layer of the parameter generation model, and generating the trust domain parameters corresponding to the next control cycle based on the injected embedding features while keeping the model parameters of the parameter generation model unchanged, the safety guidance information can be integrated into the generation process of the trust domain parameters without retraining the parameter generation model, thus balancing the stability of model deployment and the security of trajectory generation.

[0143] The method of this application has been described above; the apparatus of this application will be described below.

[0144] See Figure 2 , Figure 2 This is a schematic diagram of the structure of a trajectory generation device provided in an embodiment of this application, as shown below. Figure 2 As shown, the trajectory generation device 20 includes: The determination module 201 is used to determine the condition information of the diffusion model and the trajectory constraint information for constraining the trajectory state range based on the trust domain parameters corresponding to the current task. The acquisition module 202 is used to acquire multiple initial noise trajectories; The iterative processing module 203 is used to perform multiple iterative processing on each initial noise trajectory to obtain a candidate trajectory corresponding to each initial noise trajectory; wherein, the iterative processing includes: using the diffusion model, performing reverse denoising processing on the trajectory to be processed based on the condition information to obtain an intermediate trajectory, and performing constraint processing on the intermediate trajectory based on the trajectory constraint information to obtain a constrained trajectory; in the first iteration processing, the trajectory to be processed is the initial noise trajectory; in subsequent iteration processing, the trajectory to be processed is the constrained trajectory obtained in the previous iteration processing; the candidate trajectory is the constrained trajectory obtained in the last iteration processing; The determining module 201 is further configured to determine the evaluation information of each candidate trajectory based on the trust domain parameter and each candidate trajectory; The determining module 201 is further configured to determine a target trajectory from multiple candidate trajectories based on the evaluation information of each candidate trajectory. It should be noted that the trajectory generation device 20 described above can execute the trajectory generation method provided in the embodiments of this application, and possesses the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in the embodiments can be found in the trajectory generation method provided in the embodiments of this application.

[0145] See Figure 3 , Figure 3 This is a schematic diagram of the structure of a smart device provided in an embodiment of this application. The smart device 30 includes a processor 301 and a memory 302. The memory 302 is connected to the processor 301, for example, via a bus.

[0146] Processor 301 is configured to support the smart device 30 in performing the corresponding functions in the methods described in the above method embodiments. Processor 301 may be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The aforementioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0147] Memory 302 is used to store program code, etc. Memory 302 may include volatile memory (VM), such as random access memory (RAM); memory 302 may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); memory 302 may also include combinations of the above types of memory.

[0148] The memory 302 is used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the trajectory generation method in the embodiments of this application. The processor executes various functional applications and data processing of the trajectory generation method by running the non-volatile software programs, instructions, and modules stored in the memory, thereby realizing the function of the trajectory generation method provided in the above method embodiments.

[0149] The memory 302 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and application programs required for at least one function. The data storage area may store data created based on the use of the trajectory generation device. In some embodiments, the memory may include memory remotely located relative to the processor, which can be connected to the trajectory generation device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0150] The one or more modules are stored in the memory. When executed by the one or more processors, they perform the trajectory generation method in any of the above method embodiments. For example, they perform the method steps described in the above method embodiments to realize the functions of the modules described in the above device embodiments.

[0151] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method described in the foregoing embodiments.

[0152] This application also provides a computer program product that, when run on a smart device, causes any of the above methods to be executed.

[0153] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0154] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.

Claims

1. A trajectory generation method, characterized in that, The method includes: Based on the trust domain parameters corresponding to the current task, determine the condition information of the diffusion model and the trajectory constraint information used to constrain the trajectory state range; Obtain multiple initial noise trajectories; Each initial noise trajectory is iteratively processed multiple times to obtain a candidate trajectory corresponding to each initial noise trajectory; wherein, the iterative processing includes: using the diffusion model, performing reverse denoising processing on the trajectory to be processed based on the conditional information to obtain an intermediate trajectory, and performing constraint processing on the intermediate trajectory based on the trajectory constraint information to obtain a constrained trajectory; in the first iteration, the trajectory to be processed is the initial noise trajectory; in subsequent iterations, the trajectory to be processed is the constrained trajectory obtained in the previous iteration; the candidate trajectory is the constrained trajectory obtained in the last iteration. Based on the trust domain parameters and each candidate trajectory, the evaluation information for each candidate trajectory is determined; The target trajectory is determined from the multiple candidate trajectories based on the evaluation information of each candidate trajectory.

2. The method according to claim 1, characterized in that, The trust domain parameters include the trust domain center coordinates, trust domain radius, state deviation penalty weight, and control energy consumption penalty weight. The step of determining the conditional information of the diffusion model and the trajectory constraint information for constraining the trajectory state range based on the trust domain parameters includes: The center bias vector is determined based on the center coordinates of the trust domain, the distribution spread control coefficient is determined based on the radius of the trust domain, and the center bias vector and the distribution spread control coefficient are determined as the condition information. The trust domain boundary is determined based on the center coordinates of the trust domain and the radius of the trust domain, and the trust domain boundary is determined as the trajectory constraint information.

3. The method according to claim 2, characterized in that, The process of performing reverse denoising on the trajectory to be processed based on the conditional information to obtain an intermediate trajectory includes: Feature extraction is performed on the trajectory to be processed to obtain trajectory features; The center bias vector and the distribution expansion control coefficient are fused with the trajectory features to obtain conditional trajectory features; Based on the aforementioned conditional trajectory features, noise in the trajectory to be processed is predicted to obtain predicted noise; The intermediate trajectory is obtained by denoising the trajectory to be processed based on the predicted noise.

4. The method according to claim 3, characterized in that, The intermediate trajectory includes multiple trajectory status points; The step of constraining the intermediate trajectory based on the trajectory constraint information to obtain the constrained trajectory includes: Determine the weighted distance of each trajectory state point relative to the coordinates of the center of the trust domain; From the plurality of trajectory state points, the trajectory state points with a weighted distance greater than a preset distance are determined as the target trajectory state points; For each target trajectory state point, based on the corresponding weighted distance, the offset vector between the target trajectory state point and the center coordinates of the trust domain is scaled, and the scaled offset vector is added to the center coordinates of the trust domain to obtain the projected state point located at the boundary of the trust domain. The target trajectory state points in the intermediate trajectory are updated based on the projected state points to obtain the constrained trajectory.

5. The method according to claim 2, characterized in that, The evaluation information includes a safety score, a loyalty score, an energy consumption score, and a smoothness score; the method further includes: obtaining obstacle information corresponding to the current task; For each candidate trajectory, based on the trust domain parameter and the candidate trajectory, evaluation information for the candidate trajectory is determined, including: The safety score of the candidate trajectory is determined based on the distance between the trajectory status points in the candidate trajectory and the obstacles indicated by the obstacle information. The fidelity score of the candidate trajectory is determined based on the state deviation penalty weight and the deviation of the candidate trajectory from the center coordinates of the trust domain. Based on the control energy consumption penalty weight and the control quantity corresponding to the candidate trajectory, the energy consumption score of the candidate trajectory is determined; The smoothness score of the candidate trajectory is determined based on the differences between adjacent trajectory state points in the candidate trajectory.

6. The method according to claim 5, characterized in that, The step of determining the target trajectory from multiple candidate trajectories based on the evaluation information of each candidate trajectory includes: Based on the security score of each candidate trajectory, a safe candidate trajectory that meets the preset security conditions is selected from multiple candidate trajectories; If there is one safe candidate trajectory, then the safe candidate trajectory is determined as the target trajectory; If there are multiple safe candidate trajectories, the target trajectory is determined from the multiple safe candidate trajectories based on the fidelity score, energy consumption score, and smoothness score of the safe candidate trajectories. If no safe candidate trajectory is found among the multiple candidate trajectories, then the candidate trajectory with the highest safety score among the multiple candidate trajectories is determined as the target trajectory.

7. The method according to claim 5, characterized in that, The step of determining the target trajectory from multiple candidate trajectories based on the evaluation information of each candidate trajectory includes: Determine the comprehensive score for each candidate trajectory, and determine the candidate trajectory with the highest comprehensive score as the target trajectory; For each candidate trajectory, a comprehensive score is determined, including: Based on the current security status, determine the evaluation weight corresponding to the security score; The comprehensive score of the candidate trajectory is determined based on the security score and its corresponding evaluation weight, the fidelity score, the energy consumption score, and the smoothness score.

8. The method according to claim 7, characterized in that, The method further includes: If the safety score of the target trajectory is lower than the safety score threshold, the comprehensive score of each candidate trajectory is subjected to exponential normalization to obtain the trajectory fusion weight corresponding to each candidate trajectory. A fused trajectory is obtained by weighted fusion of multiple candidate trajectories and their corresponding trajectory fusion weights. The safety residual is determined based on the distance between the trajectory state points in the fused trajectory and the obstacle, as well as the preset safety distance; Based on the security residual, gradient backpropagation is performed via the generation process of the fused trajectory and each candidate trajectory to obtain security guidance information; the security guidance information is used to guide the generation of trust domain parameters in the next control cycle.

9. A smart device, characterized in that, The device includes a memory and a processor, the memory being connected to the processor, the processor being configured to execute one or more computer programs stored in the memory, the processor causing the smart device to implement the method as described in any one of claims 1-8 when executing the one or more computer programs.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1-8.