Joint acting force prediction method and hinged body control method

By using a joint force prediction method and time series data of motion parameters and a training model, the problem of inaccurate prediction of joint forces in existing technologies has been solved, achieving precise control of joint forces and improving simulation accuracy.

CN121479211APending Publication Date: 2026-02-06LIGHT WHEEL INTELLIGENCE (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610016240.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-07
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Existing technologies cannot accurately simulate the complex mechanical behavior of joints in the real world, resulting in an inability to effectively predict joint forces.

Method used

A joint force prediction method is adopted. By acquiring time series data of joint motion parameters, a trained joint force prediction model is used for prediction. The model includes a local dynamic feature extraction module, a global dynamic feature capture module, and a fully connected layer. It combines a multi-scale convolutional network, a long short-term memory network, and an attention mechanism layer, and optimizes the model using a loss function.

Benefits of technology

It achieves accurate prediction of joint forces, improves simulation accuracy and control effect, and is suitable for simulating complex mechanical behaviors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121479211A_ABST
    Figure CN121479211A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of joint acting force prediction, particularly provides a joint acting force prediction method and a hinged body control method, and aims to solve the problem that the joint acting force cannot be effectively predicted in the prior art. In order to achieve the purpose, the joint acting force prediction method comprises the steps that motion parameter time sequence data of a joint are obtained, and motion parameters comprise the position and the speed; the motion parameter time sequence data is used as input, the trained joint acting force prediction model is used for obtaining the predicted acting force, the position and the speed of the joint are used as input, prediction is conducted in combination with the trained joint acting force prediction model, and the predicted acting force of the joint can be effectively and accurately obtained; and therefore, accurate and effective control on the joints can be realized, and the simulation precision can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of joint force prediction technology, specifically to a joint force prediction method and an articulated body control method. Background Technology

[0002] In existing technologies, it is often necessary to simulate complex mechanical behaviors in the real world to achieve better control. Joint motion typically exhibits complex mechanical behaviors, and to control articulated bodies with joints, it is usually necessary to simulate real-world joint motion. However, real-world joint motion often exhibits nonlinear characteristics, such as increased damping near joint limits or the generation of adsorption effects at specific locations.

[0003] However, in existing technologies, most physics engines and simulation systems use simple linear models, which cannot accurately simulate the complex mechanical behavior of joints in the real world and cannot effectively predict the forces acting on joints. Summary of the Invention

[0004] In order to overcome the above-mentioned deficiencies, this application is made to solve or at least partially solve the technical problem that the prior art cannot achieve effective prediction of joint forces.

[0005] In a first aspect, this application provides a method for predicting joint forces, comprising:

[0006] Acquire time-series data of joint motion parameters, including position and velocity;

[0007] Using the time series data of the motion parameters as input, the predicted force is obtained by using the trained joint force prediction model.

[0008] In some embodiments, the joint force prediction model includes a local dynamics feature extraction module, a global dynamics feature capture module, and a fully connected layer. The trained joint force prediction model is obtained through the following steps:

[0009] Acquire time-series training data of joint motion parameters, including position and velocity;

[0010] Using the time series training data of the motion parameters as input, the local dynamics feature extraction module is used to extract short-term local features;

[0011] Using the short-term local features as input, the global dynamics trend is obtained using the global dynamics feature capture module;

[0012] Based at least on the global dynamic trend, the predicted force is output using the fully connected layer;

[0013] Based on the predicted force, the joint force prediction model is optimized using a loss function until convergence, resulting in a trained joint force prediction model.

[0014] In some embodiments, acquiring the time-series training data of joint motion parameters includes:

[0015] Obtain time-series training data of motion parameters within a preset range of joint distance limit positions.

[0016] In some embodiments, when the motion parameter is position, acquiring the time series training data of the joint's motion parameters includes:

[0017] Obtain time-series training data of at least one of the spatial coordinates and joint angles of the joint, wherein the joint angle is characterized by the angle between the two connectors connected to the joint.

[0018] In some embodiments, using the time-series training data of the motion parameters as input, the local dynamics feature extraction module extracts short-time local features, including:

[0019] Using the time series training data of the motion parameters as input, a multi-scale convolutional network is used to extract short-term local features to obtain multi-scale features.

[0020] In some embodiments, the step of using the short-term local features as input and obtaining the global dynamic trend using the global dynamic feature capture module includes:

[0021] Using the aforementioned short-term local features as input, the global dynamic trend is obtained by utilizing a long short-term memory network or a gated recurrent unit.

[0022] In some embodiments, the joint force prediction model further includes at least one of a first attention mechanism layer and a second attention mechanism layer;

[0023] When a first attention mechanism layer is included, after extracting short-time local features using the local dynamics feature extraction module with the motion parameter time-series training data as input, the method further includes:

[0024] The first attention mechanism layer is used to assign weights to the short-term local features, so as to obtain the global dynamic trend based on the short-term local features after weight assignment;

[0025] When a second attention mechanism layer is included, the prediction of the force based at least on the global dynamic trend using the output of the fully connected layer includes:

[0026] The attention weights of the global dynamic trend are determined using the second attention mechanism layer;

[0027] Based on the attention weights and the global dynamic trend, the predicted force is output using the fully connected layer.

[0028] In some embodiments, the first attention mechanism layer includes at least one of a first inter-scale attention module and a first channel attention module;

[0029] When the first attention mechanism layer includes a first scale attention module, assigning weights to the short-term local features using the first attention mechanism layer includes: assigning first scale weights to different scale features in the short-term local features using the first scale attention module.

[0030] When the first attention mechanism layer includes a first channel attention module, assigning weights to the short-term local features using the first attention mechanism layer includes: assigning a first channel weight to each feature channel of the short-term local features using the first channel attention module.

[0031] In some embodiments, the second attention mechanism layer includes at least one of a second inter-scale attention module and a second channel attention module;

[0032] When the second attention mechanism layer includes a second scale attention module, the step of using the second attention mechanism layer to determine the attention weight of the global dynamic trend includes: using the second scale attention module to determine the second scale weight of the global dynamic trend;

[0033] When the second attention mechanism layer includes a second channel attention module, the step of using the second attention mechanism layer to determine the attention weights of the global dynamic trend includes: using the second channel attention module to determine the second channel weights of the global dynamic trend.

[0034] In some embodiments, the loss function includes at least one of a data loss function and a physical loss function; the physical loss function is constructed based on Newton's second law.

[0035] The optimization of the joint force prediction model based on the predicted force using a loss function includes:

[0036] When the loss function includes a data loss function, a first loss is calculated using the data loss function based on the predicted force and the measured force; and the joint force prediction model is optimized based on the first loss.

[0037] When the loss function includes a physical loss function, a second loss is calculated using the physical loss function based on the predicted force, the velocity, and the joint mass; and the joint force prediction model is optimized based on the second loss.

[0038] When the loss function includes a data loss function and a physical loss function, a first loss is calculated using the data loss function based on the predicted force and the measured force; a second loss is calculated using the physical loss function based on the predicted force, the velocity, and the joint mass; and the joint force prediction model is optimized based on the first loss and the second loss.

[0039] In some embodiments, the joint force prediction model is optimized based on the first loss and the second loss, including:

[0040] The joint force prediction model is optimized by combining the adaptive weighting factor and the first loss and the second loss.

[0041] In a second aspect, this application provides a method for controlling an articulated body, the articulated body including a joint, the method comprising:

[0042] The predicted force of the joint is obtained based on any of the joint force prediction methods described above;

[0043] The joint is controlled based on the predicted force to achieve control of the hinge body.

[0044] In some embodiments, the hinge includes a robotic arm.

[0045] In a third aspect, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the joint force prediction method or the articulated body control method described in any of the preceding claims.

[0046] Solution 1. A method for predicting joint forces, characterized in that it includes:

[0047] Acquire time-series data of joint motion parameters, including position and velocity;

[0048] Using the time series data of the motion parameters as input, the predicted force is obtained by using the trained joint force prediction model.

[0049] Solution 2. According to the method described in Solution 1, the joint force prediction model includes a local dynamic feature extraction module, a global dynamic feature capture module, and a fully connected layer. The trained joint force prediction model is obtained through the following steps:

[0050] Acquire time-series training data of joint motion parameters, including position and velocity;

[0051] Using the time series training data of the motion parameters as input, the local dynamics feature extraction module is used to extract short-term local features;

[0052] Using the short-term local features as input, the global dynamics trend is obtained using the global dynamics feature capture module;

[0053] Based at least on the global dynamic trend, the predicted force is output using the fully connected layer;

[0054] Based on the predicted force, the joint force prediction model is optimized using a loss function until convergence, resulting in a trained joint force prediction model.

[0055] Solution 3. The method according to Solution 2, characterized in that, acquiring the time series training data of joint motion parameters includes:

[0056] Obtain time-series training data of motion parameters within a preset range of joint distance limit positions.

[0057] Solution 4. The method according to Solution 3, characterized in that, when the motion parameter is position, the step of acquiring the time series training data of the joint motion parameters includes:

[0058] Obtain time-series training data of at least one of the spatial coordinates and joint angles of the joint, wherein the joint angle is characterized by the angle between the two connectors connected to the joint.

[0059] Solution 5. The method according to Solution 2, characterized in that, using the time series training data of the motion parameters as input, the local dynamic feature extraction module is used to extract short-time local features, including:

[0060] Using the time series training data of the motion parameters as input, a multi-scale convolutional network is used to extract short-term local features to obtain multi-scale features.

[0061] Solution 6. The method according to Solution 2, characterized in that, the step of using the short-term local features as input and obtaining the global dynamic trend using the global dynamic feature capture module includes:

[0062] Using the aforementioned short-term local features as input, the global dynamic trend is obtained by utilizing a long short-term memory network or a gated recurrent unit.

[0063] Scheme 7. The method according to any one of Schemes 2 to 6, characterized in that the joint force prediction model further includes at least one of a first attention mechanism layer and a second attention mechanism layer;

[0064] When a first attention mechanism layer is included, after extracting short-time local features using the local dynamics feature extraction module with the motion parameter time-series training data as input, the method further includes:

[0065] The first attention mechanism layer is used to assign weights to the short-term local features, so as to obtain the global dynamic trend based on the short-term local features after weight assignment;

[0066] When a second attention mechanism layer is included, the prediction of the force based at least on the global dynamic trend using the output of the fully connected layer includes:

[0067] The attention weights of the global dynamic trend are determined using the second attention mechanism layer;

[0068] Based on the attention weights and the global dynamic trend, the predicted force is output using the fully connected layer.

[0069] Scheme 8. The method according to Scheme 7, wherein the first attention mechanism layer includes at least one of a first inter-scale attention module and a first channel attention module;

[0070] When the first attention mechanism layer includes a first scale attention module, assigning weights to the short-term local features using the first attention mechanism layer includes: assigning first scale weights to different scale features in the short-term local features using the first scale attention module.

[0071] When the first attention mechanism layer includes a first channel attention module, assigning weights to the short-term local features using the first attention mechanism layer includes: assigning a first channel weight to each feature channel of the short-term local features using the first channel attention module.

[0072] Scheme 9. The method according to Scheme 7, wherein the second attention mechanism layer includes at least one of a second inter-scale attention module and a second channel attention module;

[0073] When the second attention mechanism layer includes a second scale attention module, the step of using the second attention mechanism layer to determine the attention weight of the global dynamic trend includes: using the second scale attention module to determine the second scale weight of the global dynamic trend;

[0074] When the second attention mechanism layer includes a second channel attention module, the step of using the second attention mechanism layer to determine the attention weights of the global dynamic trend includes: using the second channel attention module to determine the second channel weights of the global dynamic trend.

[0075] Option 10. The method according to any one of Options 2 to 6, characterized in that the loss function includes at least one of a data loss function and a physical loss function; the physical loss function is constructed based on Newton's second law;

[0076] The optimization of the joint force prediction model based on the predicted force using a loss function includes:

[0077] When the loss function includes a data loss function, a first loss is calculated using the data loss function based on the predicted force and the measured force; and the joint force prediction model is optimized based on the first loss.

[0078] When the loss function includes a physical loss function, a second loss is calculated using the physical loss function based on the predicted force, the velocity, and the joint mass; and the joint force prediction model is optimized based on the second loss.

[0079] When the loss function includes a data loss function and a physical loss function, a first loss is calculated using the data loss function based on the predicted force and the measured force; a second loss is calculated using the physical loss function based on the predicted force, the velocity, and the joint mass; and the joint force prediction model is optimized based on the first loss and the second loss.

[0080] Solution 11. The method according to Solution 10, characterized in that, optimizing the joint force prediction model based on the first loss and the second loss includes:

[0081] The joint force prediction model is optimized by combining the adaptive weighting factor and the first loss and the second loss.

[0082] Solution 12. A method for controlling an articulated body, characterized in that the articulated body includes a joint, and the method includes:

[0083] The predicted force of the joint is obtained based on the method of any one of schemes 1 to 11;

[0084] The joint is controlled based on the predicted force to achieve control of the hinge body.

[0085] Option 13. The method according to Option 12, wherein the articulated body comprises a robotic arm.

[0086] Scheme 14. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, which, when executed by a processor, implements the joint force prediction method of any one of Schemes 1 to 11 or the articulated body control method of any one of Schemes 12 to 13.

[0087] The above-described technical solutions of this application have at least one or more of the following beneficial effects:

[0088] In implementing the joint force prediction method provided in this application, time-series data of joint motion parameters, including position and velocity, are acquired. Using this time-series data as input, a trained joint force prediction model is used to obtain the predicted force. This method, by using the joint's position and velocity as input and combining it with a trained joint force prediction model, can effectively and accurately obtain the predicted force of the joint, thereby facilitating precise and effective joint control and improving simulation accuracy. Attached Figure Description

[0089] The disclosure of this application will become more readily understood with reference to the accompanying drawings. It will be readily understood by those skilled in the art that these drawings are for illustrative purposes only and are not intended to limit the scope of protection of this application. Wherein:

[0090] Figure 1 This is a flowchart illustrating a method for predicting joint forces provided in an embodiment of this application;

[0091] Figure 2 This is a flowchart illustrating a method for training a joint force prediction model according to an embodiment of this application.

[0092] Figure 3 This is a flowchart illustrating a joint force prediction model training method provided in another embodiment of this application;

[0093] Figure 4 This is a flowchart illustrating a hinge control method provided in an embodiment of this application. Detailed Implementation

[0094] Some embodiments of this application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of this application and are not intended to limit the scope of protection of this application.

[0095] In the description of this application, "module" and "processor" can include hardware, software, or a combination of both. A module can include hardware circuitry, various suitable sensors, communication ports, memory, and may also include software components, such as program code, or a combination of software and hardware. A processor can be a central processing unit, microprocessor, image processor, digital signal processor, or any other suitable processor. The processor has data and / or signal processing capabilities. The processor can be implemented in software, in hardware, or a combination of both. Computer-readable storage media includes any suitable medium capable of storing program code, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random access memory, etc. The term "A and / or B" means all possible combinations of A and B, such as only A, only B, or A and B.

[0096] See appendix Figure 1 , Figure 1 This is a flowchart illustrating a method for predicting joint forces provided in an embodiment of this application. Figure 1 As shown, the joint force prediction method in this application embodiment mainly includes the following steps S101 and S102.

[0097] Step S101: Obtain time series data of joint motion parameters, including position and velocity.

[0098] In this embodiment, step S101 can specifically be: acquiring the motion parameters of the joint at any position within its range of motion and presenting them in a time series manner.

[0099] In some embodiments, when the motion parameter is position, the position of a joint can be characterized by at least one of spatial coordinates and joint angles. The joint angle can be characterized by the angle between two connecting parts connected to the joint. Spatial coordinates can be coordinates in three-dimensional or two-dimensional space. Obtaining the time-series data of the joint position can specifically involve obtaining time-series data of at least one of the joint's spatial coordinates and joint angles.

[0100] In some embodiments, step S101 may specifically be: acquiring time series data of motion parameters within a preset range of joint distance limit position.

[0101] The limiting position refers to the boundary of the joint's range of motion. In some embodiments, the limiting position can be characterized by at least one of the limit value of the spatial position and the limit value of the joint angle.

[0102] The preset range can be flexibly set with the target near the limit position. In some embodiments, the preset range can be set as the distance from the limit position or the angle between the limit position and the limit position. As an example, the preset range can be set to the range corresponding to an angle of 0° to 5° between the limit position and the limit position.

[0103] Real-world joint motion typically exhibits nonlinear characteristics, such as increased damping near the joint's limit position. This application can effectively predict the forces acting on the joint near its limit position, which is beneficial for achieving precise motion control and user interaction.

[0104] Step S102: Using the time series data of motion parameters as input, the predicted force is obtained by using the trained joint force prediction model.

[0105] This method uses the position and velocity of the joint as input and combines them with a trained joint force prediction model to make predictions. It can effectively and accurately obtain the predicted forces of the joint at various positions, which is conducive to achieving precise and effective control of the joint and improving simulation accuracy.

[0106] The joint force prediction model may include a local dynamics feature extraction module, a global dynamics feature capture module, and fully connected layers. In some embodiments, the local dynamics feature extraction module may employ a multi-scale convolutional network, using convolutional kernels of different sizes, such as 3×1, 5×1, and 7×1, to process captured short-term, nonlinear local features of different scales in parallel. The global dynamics feature capture module may employ a long short-term memory network or a gated recurrent unit to learn the time dependency relationship between short-term local features, obtain global dynamic trends, and provide comprehensive contextual information for predicting the nonlinear mechanical behavior of the joint. In other embodiments, the modules in the joint force prediction model may also be implemented using other networks that can achieve the same function.

[0107] See Figure 2 As shown, Figure 2 This is a flowchart illustrating a joint force prediction model training method provided in an embodiment of this application. The trained joint force prediction model is obtained through steps S201 to S205.

[0108] Step S201: Obtain time-series training data of joint motion parameters, including position and velocity.

[0109] In the embodiments of this application, the time series training data of motion parameters may include multiple training sample subsets. These multiple training sample subsets may cover the motion parameters corresponding to any position of the joint within its range of motion, so as to facilitate a more comprehensive learning of the mechanical characteristics of the joint at various positions and achieve the effect of effectively simulating the mechanical behavior of the real world.

[0110] When the motion parameter is position, obtaining time-series training data for joint motion parameters can include:

[0111] Acquire time-series training data of at least one of the spatial coordinates and joint angles of a joint, wherein the joint angle is represented by the angle between the two connectors connected to the joint, and the spatial coordinates can be coordinates in three-dimensional space or two-dimensional space.

[0112] In some embodiments, obtaining the time-series training data of the joint's motion parameters in step S201 may include: obtaining the time-series training data of the joint's motion parameters within a preset range from the joint's distance limit position. This is beneficial for learning the mechanical characteristics of the joint near its extreme position, facilitating more accurate force prediction in subsequent steps.

[0113] The limiting position can be characterized by at least one of the limit values ​​of spatial position and the limit values ​​of joint angle.

[0114] The preset range can be flexibly set with the target near the limit position. In some embodiments, the preset range can be set as the distance from the limit position or the angle between the preset range and the limit position.

[0115] Step S202: Using the time series training data of motion parameters as input, extract short-term local features using the local dynamics feature extraction module.

[0116] In some embodiments, step S202 may specifically be: using time series training data of motion parameters as input, extracting short-term local features using a multi-scale convolutional network to obtain multi-scale features.

[0117] Step S203: Using short-term local features as input, obtain the global dynamic trend using the global dynamic feature capture module.

[0118] In some embodiments, step S203 may specifically involve using short-term local features as input and employing a long short-term memory network or a gated recurrent unit to obtain the global dynamic trend. When the local dynamic feature extraction module uses a multi-scale convolutional network, it may involve using multi-scale features as input and employing a long short-term memory network or a gated recurrent unit to obtain the correlation between multi-scale features and time, thereby obtaining the global dynamic trend.

[0119] Step S204: Based at least on the global dynamic trend, predict the force using the output of the fully connected layer.

[0120] Step S205: Optimize the joint force prediction model based on the predicted force using a loss function until convergence, thus obtaining a trained joint force prediction model.

[0121] In some embodiments, the loss function may include at least one of a data loss function and a physical loss function; the physical loss function is constructed based on Newton's second law. Step S205 may specifically involve: optimizing the joint force prediction model based on the predicted force using at least one of the data loss function and the physical loss function until convergence, thereby obtaining a trained joint force prediction model.

[0122] When the loss function includes a data loss function, step S205 can be specifically as follows: calculate the first loss using the data loss function based on the predicted force and the measured force; and optimize the joint force prediction model based on the first loss.

[0123] Among them, the data loss function can be the mean squared error loss, L1 norm loss, etc., and the data loss function is used for model optimization.

[0124] When the loss function includes a physical loss function, step S205 can be specifically as follows: calculate the second loss using the physical loss function based on the predicted force, velocity, and joint mass; and optimize the joint force prediction model based on the second loss.

[0125] The acceleration can be determined based on the change in velocity, and the reference joint force can be obtained using Newton's second law based on the acceleration and joint mass. Then, the second loss is calculated based on the reference joint force and the predicted force. Using a physical loss function can effectively capture the physical laws of the data and avoid overfitting.

[0126] When the loss function includes a data loss function and a physical loss function, step S205 can be specifically as follows: based on the predicted force and the measured force, calculate the first loss using the data loss function; based on the predicted force, velocity and joint mass, calculate the second loss using the physical loss function; and optimize the joint force prediction model based on the first loss and the second loss.

[0127] By combining data loss functions and physical loss functions, the model can learn from real-world observations and follow fundamental physical laws. This allows the model to better learn nonlinear mechanical properties and makes reasonable inferences based on inherent physical constraints when facing physical scenarios not fully represented in the training data or at the edges of data distribution. This improves the model's fitting accuracy for nonlinear joint mechanical behavior and its generalization ability. Simultaneously, physical constraints provide a stable benchmark, making the model less prone to drastic fluctuations when faced with noisy or anomalous data, thus enhancing its robustness.

[0128] In some embodiments, optimizing the joint force prediction model based on the first loss and the second loss may include: combining an adaptive weighting factor to optimize the joint force prediction model using the first loss and the second loss. By combining the adaptive weighting factor, the weights of the data loss function and the physical loss function can be dynamically adjusted, further optimizing the robustness and generalization ability of the model.

[0129] In other embodiments, to further improve the effectiveness of model training and the accuracy of model prediction, the joint force prediction model may further include at least one of a first attention mechanism layer and a second attention mechanism layer, as described below. Figure 3 As shown, Figure 3 This is a flowchart illustrating a joint force prediction model training method provided in another embodiment of this application. The trained joint force prediction model can also be obtained through steps S301 to S306.

[0130] Step S301: Obtain time-series training data of joint motion parameters, including position and velocity.

[0131] Step S302: Using the time series training data of motion parameters as input, extract short-term local features using the local dynamics feature extraction module.

[0132] Step S303: Assign weights to short-term local features using the first attention mechanism layer.

[0133] Step S304: Using the weighted short-term local features as input, the global dynamics trend is obtained by using the global dynamics feature capture module.

[0134] Step S305: Determine the attention weights for the global dynamic trend using the second attention mechanism layer.

[0135] Step S306: Based on attention weights and global dynamic trends, predict the force using the output of the fully connected layer.

[0136] Step S307: Optimize the joint force prediction model based on the predicted force using a loss function until convergence, and obtain the trained joint force prediction model.

[0137] Steps S301, S302, and S307 can be implemented in the same way as S201, S202, and S205. Step S304 can be implemented in the same way as S203 by replacing the input adaptability in S203 with short-term local features after weighting. For the sake of brevity, these details will not be elaborated here, but please refer to the description above.

[0138] In some embodiments, the first attention mechanism layer includes at least one of a first inter-scale attention module and a first channel attention module.

[0139] When the first attention mechanism layer includes a first scale attention module, step S303 can specifically be: using the first scale attention module to assign first scale weights to different scale features in short-term local features.

[0140] When the first attention mechanism layer includes a first channel attention module, step S303 can specifically be: using the first channel attention module to assign a first channel weight to each feature channel of the short-term local feature.

[0141] In some embodiments, the second attention mechanism layer includes at least one of a second inter-scale attention module and a second channel attention module.

[0142] When the second attention mechanism layer includes a second-scale attention module, step S305 can specifically be: using the second-scale attention module to determine the second-scale weights of the global dynamic trend.

[0143] When the second attention mechanism layer includes a second channel attention module, step S305 can specifically be: using the second channel attention module to determine the second channel weight of the global dynamic trend.

[0144] In the embodiments of this application, by setting a first inter-scale attention module and / or a second inter-scale attention module, the weights of features at different scales can be dynamically adjusted. By setting a first channel attention module and / or a second channel attention module, the weights of different feature channels can be dynamically adjusted, which is beneficial for extracting key features more accurately, significantly improving the model's generalization ability and robustness to complex input changes, thereby facilitating the effective prediction of joint forces.

[0145] Another aspect of this application provides a method for controlling an articulated body, the articulated body including a joint, see [link to relevant documentation]. Figure 4 As shown, Figure 4 This is a flowchart illustrating a hinge control method provided in an embodiment of this application. The method may include:

[0146] Step S401: Obtain the predicted force of the joint based on the joint force prediction method of any of the above embodiments.

[0147] Step S402: Control the joint based on predicted force to achieve control of the articulated body.

[0148] This method can achieve the same beneficial effects as any of the above-described method embodiments, and it is conducive to more effectively simulating the mechanical behavior of the real world, improving simulation accuracy and interactive experience.

[0149] In some embodiments, the articulated body may include a robotic arm, a robot, or a refrigerator, etc.

[0150] It should be noted that although the steps in the above embodiments are described in a specific order, those skilled in the art will understand that in order to achieve the effect of this application, different steps do not necessarily have to be executed in such an order. They can be executed simultaneously (in parallel) or in other orders. These adjusted solutions are equivalent to the technical solutions described in this application and therefore will also fall within the protection scope of this application.

[0151] Those skilled in the art will understand that all or part of the processes in the method of the above-described embodiment can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable storage medium can include any entity or device capable of carrying computer program code, a medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0152] Another aspect of this application provides a computer-readable storage medium.

[0153] In one embodiment of a computer-readable storage medium according to this application, the computer-readable storage medium may be configured to store a program for performing a joint force prediction method or an articulated body control method of the above-described method embodiments. This program may be loaded and run by a processor to implement the above-described methods. For ease of explanation, only the parts related to the embodiments of this application are shown; for specific technical details not disclosed, please refer to the method section of the embodiments of this application. The computer-readable storage medium may be a storage device comprising various electronic devices. Optionally, in the embodiments of this application, the computer-readable storage medium is a non-transitory computer-readable storage medium.

[0154] Another aspect of this application provides a smart device.

[0155] In one embodiment of a smart device according to this application, the smart device may include at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program, which, when executed by the at least one processor, implements the joint force prediction method or articulated body control method of any of the above embodiments. The smart device of this application may include devices such as robots.

[0156] In some embodiments of this application, the smart device may also include at least one sensor for sensing information, such as acquiring measured forces acting on a joint.

[0157] The technical solution of this application has been described above with reference to one embodiment shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of this application is obviously not limited to these specific embodiments. Without departing from the principles of this application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of this application.

Claims

1. A method for predicting joint forces, characterized in that, include: Acquire time-series data of joint motion parameters, including position and velocity; Using the time series data of the motion parameters as input, the predicted force is obtained by using the trained joint force prediction model.

2. The method according to claim 1, characterized in that, The joint force prediction model includes a local dynamics feature extraction module, a global dynamics feature capture module, and a fully connected layer. The trained joint force prediction model is obtained through the following steps: Acquire time-series training data of joint motion parameters, including position and velocity; Using the time series training data of the motion parameters as input, the local dynamics feature extraction module is used to extract short-term local features; Using the short-term local features as input, the global dynamics trend is obtained using the global dynamics feature capture module; Based at least on the global dynamic trend, the predicted force is output using the fully connected layer; Based on the predicted force, the joint force prediction model is optimized using a loss function until convergence, resulting in a trained joint force prediction model.

3. The method according to claim 2, characterized in that, The acquisition of time-series training data of joint motion parameters includes: Obtain time-series training data of motion parameters within a preset range of joint distance limit positions.

4. The method according to claim 3, characterized in that, When the motion parameter is position, the step of acquiring the time series training data of the joint's motion parameters includes: Obtain time-series training data of at least one of the spatial coordinates and joint angles of the joint, wherein the joint angle is characterized by the angle between the two connectors connected to the joint.

5. The method according to claim 2, characterized in that, Using the time-series training data of the motion parameters as input, the local dynamics feature extraction module extracts short-time local features, including: Using the time series training data of the motion parameters as input, a multi-scale convolutional network is used to extract short-term local features to obtain multi-scale features.

6. The method according to claim 2, characterized in that, The step of using the short-term local features as input and obtaining the global dynamic trend using the global dynamic feature capture module includes: Using the aforementioned short-term local features as input, the global dynamic trend is obtained by utilizing a long short-term memory network or a gated recurrent unit.

7. The method according to any one of claims 2 to 6, characterized in that, The joint force prediction model further includes at least one of a first attention mechanism layer and a second attention mechanism layer. When a first attention mechanism layer is included, after extracting short-time local features using the local dynamics feature extraction module with the motion parameter time-series training data as input, the method further includes: The first attention mechanism layer is used to assign weights to the short-term local features, so as to obtain the global dynamic trend based on the short-term local features after weight assignment; When a second attention mechanism layer is included, the prediction of the force based at least on the global dynamic trend using the output of the fully connected layer includes: The attention weights of the global dynamic trend are determined using the second attention mechanism layer; Based on the attention weights and the global dynamic trend, the predicted force is output using the fully connected layer.

8. The method according to claim 7, characterized in that, The first attention mechanism layer includes at least one of a first scale attention module and a first channel attention module; When the first attention mechanism layer includes a first scale attention module, assigning weights to the short-term local features using the first attention mechanism layer includes: assigning first scale weights to different scale features in the short-term local features using the first scale attention module. When the first attention mechanism layer includes a first channel attention module, assigning weights to the short-term local features using the first attention mechanism layer includes: assigning a first channel weight to each feature channel of the short-term local features using the first channel attention module.

9. The method according to claim 7, characterized in that, The second attention mechanism layer includes at least one of a second inter-scale attention module and a second channel attention module; When the second attention mechanism layer includes a second scale attention module, the step of using the second attention mechanism layer to determine the attention weight of the global dynamic trend includes: using the second scale attention module to determine the second scale weight of the global dynamic trend; When the second attention mechanism layer includes a second channel attention module, the step of using the second attention mechanism layer to determine the attention weights of the global dynamic trend includes: using the second channel attention module to determine the second channel weights of the global dynamic trend.

10. The method according to any one of claims 2 to 6, characterized in that, The loss function includes at least one of a data loss function and a physical loss function; the physical loss function is constructed based on Newton's second law. The optimization of the joint force prediction model based on the predicted force using a loss function includes: When the loss function includes a data loss function, a first loss is calculated using the data loss function based on the predicted force and the measured force; and the joint force prediction model is optimized based on the first loss. When the loss function includes a physical loss function, a second loss is calculated using the physical loss function based on the predicted force, the velocity, and the joint mass; and the joint force prediction model is optimized based on the second loss. When the loss function includes a data loss function and a physical loss function, a first loss is calculated using the data loss function based on the predicted force and the measured force; a second loss is calculated using the physical loss function based on the predicted force, the velocity, and the joint mass; and the joint force prediction model is optimized based on the first loss and the second loss.