Bending parameter prediction method and device, computer equipment and readable storage medium

By constructing a prediction model based on time node sequences, the bending parameters of the rope drive part of the flexible robotic arm and the motor operation parameters are obtained. The prediction model is optimized by using a preset time window length, which solves the problem of inaccurate prediction of bending parameters of the flexible robotic arm in complex environments and improves the operation accuracy.

CN118927243APending Publication Date: 2024-11-12INNERMEDICAL CO LTD

Patent Information

Application Number
CN202411026420.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

Existing flexible robotic arm control methods cannot accurately predict the bending parameters of the cable-driven part in narrow and complex environments, resulting in insufficient operational accuracy.

Method used

By constructing a prediction model based on time node sequences, the bending parameters of the rope drive part of the flexible robotic arm and the motor operating parameters are obtained. The prediction model is then optimized using a preset time window length to improve prediction accuracy.

Benefits of technology

It significantly improves the accuracy of predicting bending parameters of the cable-driven part during motion, thereby enhancing the operational precision of the flexible robotic arm in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118927243A_ABST
    Figure CN118927243A_ABST
Patent Text Reader

Abstract

The invention relates to a bending parameter prediction method and device, computer equipment and a readable storage medium. The method comprises the steps that according to a time node sequence format, a first bending parameter of a rope driving part in the flexible mechanical arm and a first operation parameter of a motor are obtained; the motor is used for controlling the operation of the flexible mechanical arm; determining a second operation parameter of the motor from the first operation parameters based on a preset time window length; inputting the second operation parameter into the first prediction model to obtain a second bending parameter; the second bending parameter is a bending parameter of the rope driving part at the next time node of the preset time window length; optimizing the first prediction model based on the first bending parameter and the second bending parameter to obtain a second prediction model; and predicting a third bending parameter of the rope driving part based on the second prediction model. By adopting the method, the prediction accuracy of the bending parameter can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of parameter prediction, and in particular to a bending parameter prediction method, device, computer equipment and readable storage medium. Background Art

[0002] Flexible robotic arms are usually moved by rope drive, thereby controlling the movement of flexible endoscopes in narrow and complex environments to achieve a variety of medical functions.

[0003] However, narrow and complex environments are not only narrow but also changeable in shape, which brings considerable trouble to the operators of flexible manipulators. At present, traditional flexible manipulator control methods often ignore the physical limitations of these special models, resulting in the actual bending parameters of the rope-driven part of the flexible manipulator often deviating from the expected bending parameters in actual operation. This deviation is mainly caused by the irregularity and variability of the environment. Obviously, in order to improve the safety of the flexible manipulator in control, it is necessary to improve the operating accuracy of the flexible manipulator in complex environments. Summary of the invention

[0004] Based on this, it is necessary to provide a bending parameter method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the prediction accuracy of bending parameters in order to solve the above technical problems.

[0005] In a first aspect, the present application provides a bending parameter prediction method, comprising:

[0006] Acquire a first bending parameter of a rope driving part in the flexible manipulator and a first operating parameter of a motor in accordance with a time node sequence format; the motor is used to control the operation of the flexible manipulator;

[0007] Determining a second operating parameter of the motor from the first operating parameter based on a preset time window length;

[0008] Inputting the second operating parameter into the first prediction model to obtain a second bending parameter; the second bending parameter is a bending parameter of the rope drive part at the next time node of the preset time window length;

[0009] Optimizing the first prediction model based on the first bending parameter and the second bending parameter to obtain a second prediction model;

[0010] A third bending parameter of the rope drive portion is predicted based on the second prediction model.

[0011] In a second aspect, the present application also provides a bending parameter prediction device, comprising:

[0012] An acquisition module is used to acquire a first bending parameter of a rope driving part in the flexible manipulator and a first operating parameter of a motor in accordance with a time node sequence format; the motor is used to control the operation of the flexible manipulator;

[0013] A first determining module, configured to determine a second operating parameter of the motor from the first operating parameter based on a preset time window length;

[0014] An input module, used for inputting the second operating parameter into the first prediction model to obtain a second bending parameter; the second bending parameter is a bending parameter of the rope driving part at a next time node of a preset time window length;

[0015] An optimization module, configured to optimize the first prediction model based on the first bending parameter and the second bending parameter to obtain a second prediction model;

[0016] The prediction module is used to predict a third bending parameter of the rope driving part based on the second prediction model.

[0017] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements some or all of the steps described in any method of the first aspect of the present application.

[0018] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements some or all of the steps described in any method of the first aspect of the present application.

[0019] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements part or all of the steps described in any method of the first aspect of the embodiment of the present application.

[0020] The above-mentioned bending parameter prediction method, device, computer equipment, computer-readable storage medium and computer program product obtain the first bending parameter of the rope-driven part and the first operating parameter of the motor in the flexible manipulator in a time node sequence format; the motor is used to control the operation of the flexible manipulator; based on a preset time window length, the second operating parameter of the motor is determined from the first operating parameter; the second operating parameter is input into the first prediction model to obtain the second bending parameter; the second bending parameter is the bending parameter of the rope-driven part at the next time node of the preset time window length; the first prediction model is optimized based on the first bending parameter and the second bending parameter to obtain the second prediction model; the third bending parameter of the rope-driven part is predicted based on the second prediction model. The bending parameter prediction method provided by the present application predicts the third bending parameter of the rope-driven part based on the second prediction model constructed by the time node sequence, which can significantly improve the prediction accuracy of the bending parameter of the rope-driven part during the movement. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 A diagram showing an application environment of a bending parameter prediction method in an embodiment;

[0023] Figure 2 A schematic diagram of a process flow of a bending parameter prediction method in one embodiment;

[0024] Figure 3 is a schematic structural diagram of a flexible robotic arm in one embodiment;

[0025] Figure 4 is a structural block diagram of a bending parameter prediction device in another embodiment;

[0026] Figure 5 is an internal structure diagram of a computer device in one embodiment;

[0027] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0029] The bending parameter prediction method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. The terminal 102 communicates with the motor controller 104 via a network. The data storage system can store data that the motor controller 104 needs to process. The data storage system can be integrated on the motor controller 104, or placed on the cloud or other network servers. The terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, and tablet computers.

[0030] In an exemplary embodiment, Figure 2 As shown, a bending parameter prediction method is provided, which is applied to Figure 1 The terminal in is taken as an example to illustrate, including the following steps 202 to 210. Among them:

[0031] Step 202, obtaining the first bending parameter of the rope driving part in the flexible manipulator and the first operating parameter of the motor in accordance with the time node sequence format; the motor is used to control the operation of the flexible manipulator.

[0032] The time node sequence format refers to a data organization method. Each data point in the data set arranged in the time node sequence format has a time sequence, and each data point corresponds to each time node. The data set arranged in the time node sequence format is usually used to represent values ​​or events that change over time.

[0033] The first bending parameter is a bending parameter set arranged in a time node sequence format, and the first bending parameter is a bending parameter of the rope drive part in the historical time. It is easy to understand that the first bending parameter is an actual bending parameter of the rope drive part in the historical time. Optionally, the first bending parameter may include the curvature and torsion angle of the rope drive part.

[0034] The first operating parameter is an operating parameter set arranged in a time node sequence format, and the first operating parameter is an operating parameter of the motor in a historical time. It is easy to understand that the first operating parameter is an actual operating parameter of the motor in a historical time. Optionally, the first operating parameter may include an angular position sequence and a current sequence of the motor.

[0035] In an exemplary embodiment, the first operating parameter of the motor is obtained, including: reading the first operating parameter of the motor in a motor controller. In another exemplary embodiment, the first operating parameter of the motor is obtained, including: the motor controller reads the first operating parameter of the motor in a motor hardware system.

[0036] Among them, the motor hardware system refers to the physical components of the motor, including the motor's rotor, stator, bearings, casing and other mechanical parts, and may also include the motor's electrical components, such as windings, terminals, etc.; the motor controller refers to the motor's control unit, which is responsible for receiving control signals (such as start, stop, speed, direction and other instructions) and adjusting the motor's operating state according to these control signals.

[0037] A flexible robotic arm is an automated device used to perform precise operations in narrow and complex environments. It usually adopts a rope drive method, which has the characteristics of a small diameter (generally 3 to 5 mm), so that the motor used to drive the flexible robotic arm can be installed on the outside of the flexible robotic arm, and the power is transmitted to each joint of the flexible robotic arm through the rope. The structure of the flexible robotic arm can move flexibly in complex environments such as uneven curvature and unpredictable physical contact points. The flexible robotic arm includes an uncontrollable flexible part and a rope-driven part, and the flexible robotic arm is connected to the motor through the uncontrollable flexible part, and the rope-driven part is the part used for motion control. Specifically, the flexible robotic arm is connected to the motor controller of the motor through the uncontrollable flexible part.

[0038] For example, Figure 3 As shown, the flexible robotic arm is connected to the motor controller, and the flexible robotic arm includes an uncontrollable flexible part and a rope-driven part that are connected, and the uncontrollable flexible part is located between the motor controller and the rope-driven part.

[0039] Step 204 : determining a second operating parameter of the motor from the first operating parameter based on a preset time window length.

[0040] The preset time window length is the length of a certain historical time node or a certain historical time period; the preset time window length is used to capture the dynamic characteristics of some historical bending parameters and some historical operating parameters of the rope drive part changing over time, so as to predict the parameters of the future bending parameters of the rope drive part. The longer the preset time window length is, the more historical data is used to capture the dynamic characteristics of the rope drive part changing over time, and the second prediction model completed by subsequent optimization has a higher prediction accuracy for the bending parameters of the rope drive part during movement.

[0041] The second operating parameter can be a set of operating parameters arranged in a time node sequence format under a preset time window length, or it can be an operating parameter of a time node specified by a preset time window length. The specific operating parameter type in the second operating parameter corresponds to the first operating parameter. For example, when the first operating parameter includes the angular position sequence and the current sequence of the motor, the second operating parameter also includes the angular position sequence and the current sequence of the motor. It is easy to understand that since the first operating parameter is the actual operating parameter of the motor in the historical time, correspondingly, the second operating parameter is the actual operating parameter of the motor within the preset time window length.

[0042] Exemplarily, the preset time window length is the past 5 time nodes relative to the current time, and the second operating parameter is a set of operating parameters arranged in the time node sequence format within the past 5 time nodes, that is, the operating parameters of the past 5th time node, the operating parameters of the past 4th time node... the operating parameters of the past 1st time node. In a specific implementation, the preset time window length can also be the past 10th time node to the past 5th time node, and the preset time window length is not limited here.

[0043] In an exemplary embodiment, if the first operating parameter is read from the motor hardware system, it can also be understood that the second operating parameter of the motor is determined from the motor hardware system.

[0044] Step 206: input the second operating parameter into the first prediction model to obtain a second bending parameter; the second bending parameter is a bending parameter of the rope drive part at the next time node of the preset time window length.

[0045] Among them, the first prediction model is a prediction model constructed based on a time series algorithm; illustratively, the time series algorithm can be a long short-term memory network (Long Short-Term Memory, LSTM) algorithm, a recurrent neural network (Recurrent Neural Network, RNN) algorithm or other algorithms.

[0046] The second bending parameter is a future bending parameter of the rope drive part relative to the preset time window length, and is a bending parameter in the historical time relative to the current time node. It is easy to understand that the second bending parameter is the predicted bending parameter of the rope drive part predicted by the first prediction model based on the second operating parameter, that is, the second bending parameter is a future, predicted bending parameter of the rope drive part relative to the preset time window length. The specific bending parameter type in the second bending parameter corresponds to the specific bending parameter type in the first bending parameter. For example, when the first bending parameter includes the curvature and torsion angle of the rope drive part, the second bending parameter also includes the curvature and torsion angle of the rope drive part. For example, if the preset time window length is from the 10th time node in the past to the 5th time node in the past, the second bending parameter is the bending parameter of the rope drive part at the 4th time node in the past.

[0047] Step 208: Optimize the first prediction model based on the first bending parameter and the second bending parameter to obtain a second prediction model.

[0048] The second prediction model is the optimized first prediction model. It is easy to understand that the first prediction model is the prediction model before optimization, and the second prediction model is the prediction model after optimization.

[0049] Optionally, the first prediction model is optimized based on the first bending parameter and the second bending parameter. The actual bending parameter in the first bending parameter that is located at the same time node as the second bending parameter is first determined, and then the model structure and / or model parameters of the first prediction model are adjusted according to the mean square error between the actual bending parameter and the second bending parameter and / or other mathematical operation results; the generalization ability of the first prediction model can be optimized by trying different network configurations of the first prediction model and / or adding regularization methods; more complex feature engineering can also be explored in the first prediction model, such as adding more operating parameters that describe the motor behavior to the first prediction model or introducing other external data to further improve the prediction performance of the first prediction model for the bending parameters.

[0050] Step 210: predicting a third bending parameter of the rope drive portion based on the second prediction model.

[0051] The third bending parameter is a future bending parameter relative to the current time node, that is, the third bending parameter is the bending parameter of the rope drive part at the next time node of the current time node, and the third bending parameter may also be the bending parameter of the rope drive part at the next time node of a certain future time node. The specific bending parameter type in the third bending parameter corresponds to the specific bending parameter type in the first bending parameter (or the second bending parameter). For example, when the first bending parameter (or the second bending parameter) includes the curvature and torsion angle of the rope drive part, the third bending parameter also includes the curvature and torsion angle of the rope drive part.

[0052] Further, after the third bending parameter of the rope driving part is predicted based on the second prediction model to obtain the third bending parameter, the user can control the motion of the rope driving part based on the third bending parameter on the terminal.

[0053] In an exemplary embodiment, predicting the third bending parameter of the rope drive part based on the second prediction model includes: predicting the third bending parameter of the rope drive part based on the second prediction model and the third operating parameter of the rope drive part.

[0054] The third operating parameter is the operating parameter of the rope drive part at the current time node. That is, the third operating parameter of the rope drive part is input into the second prediction model, so that the second prediction model predicts the third bending parameter of the rope drive part based on the third operating parameter and outputs the third bending parameter.

[0055] It is easy to understand that the third bending parameter is the predicted bending parameter of the rope drive part predicted by the second prediction model based on the third operating parameter, that is, the third bending parameter is the future predicted bending parameter of the rope drive part relative to the current time node.

[0056] In the above bending parameter prediction method, the first bending parameter of the rope drive part and the first operating parameter of the motor in the flexible manipulator are obtained in a time node sequence format; the motor is used to control the operation of the flexible manipulator; based on a preset time window length, the second operating parameter of the motor is determined from the first operating parameter; the second operating parameter is input into the first prediction model to obtain the second bending parameter; the second bending parameter is the bending parameter of the rope drive part at the next time node of the preset time window length; the first prediction model is optimized based on the first bending parameter and the second bending parameter to obtain the second prediction model; the third bending parameter of the rope drive part is predicted based on the second prediction model. The bending parameter prediction method provided in the present application predicts the third bending parameter of the rope drive part based on the second prediction model constructed by the time node sequence, which can significantly improve the prediction accuracy of the bending parameter of the rope drive part during the movement.

[0057] In an exemplary embodiment, the step of obtaining the first bending parameter of the rope-driven portion of the flexible manipulator in the time node sequence format includes:

[0058] Acquire a historical image sequence of the rope-driven part in a time node sequence format;

[0059] Based on the historical image sequence, a first bending parameter of the rope drive section is determined.

[0060] In an exemplary embodiment, the acquiring of the historical image sequence of the rope-driven part in a time node sequence format includes: acquiring the historical image sequence of the rope-driven part in a time node sequence format based on a camera device.

[0061] The camera device may be located in the terminal, so that the terminal can obtain a historical image sequence of the rope drive part based on the camera device. Exemplarily, the camera device may be a camera, a still camera or other device with a camera function.

[0062] The historical image sequence is a set of historical images of the flexible manipulator arranged in a time node sequence format within a historical time, and the historical image set includes a plurality of historical images. It can be understood that each historical image in the historical image sequence should include an image of the rope drive part.

[0063] In an exemplary embodiment, determining the first bending parameter of the rope-driven part based on the historical image sequence includes: extracting a historical image feature sequence of the rope-driven part based on the historical image sequence, and determining the first bending parameter of the rope-driven part based on the historical image feature sequence.

[0064] Optionally, the historical image feature sequence of the rope-driven part may be extracted by an image feature recognition algorithm. Exemplarily, the image feature recognition algorithm may include a scale-invariant feature transform (SIFT), a speeded up robust features algorithm (SURF), or other algorithms capable of extracting image features of the rope-driven part.

[0065] In this embodiment, a historical image sequence of the rope-driven part is acquired in a time node sequence format, and then a first bending parameter of the rope-driven part is determined based on the historical image sequence. Thus, the image features of the rope-driven part that change with time can be captured through the historical image sequence of the rope-driven part, and further, the first bending parameter of the rope-driven part can be accurately determined through the image features that change with time.

[0066] In an exemplary embodiment, the first bending parameter is a curvature sequence and a torsion angle sequence of the rope drive part arranged in a time node sequence format; the first operating parameter is an angle position sequence and a current sequence of the motor arranged in a time node sequence format.

[0067] In an exemplary embodiment, the second bending parameter is a curvature sequence and a torsion angle sequence of the rope drive part within a preset time window length arranged in a time node sequence format; the second operating parameter is an angle position sequence and a current sequence of the motor within a preset time window length arranged in a time node sequence format.

[0068] The curvature sequence includes a plurality of curvatures of the rope-driven part arranged in a time node sequence format, and the curvature refers to the degree of curvature of the shape or structure of the rope-driven part during movement.

[0069] The torsion angle sequence includes a plurality of torsion angles of the rope-driven part arranged in a time node sequence format. The torsion angle refers to the degree of rotation of the rope-driven part relative to the long axis of the flexible manipulator during movement. The torsion angle is used to characterize the rotation state of the rope-driven part in three-dimensional space.

[0070] The angular position sequence includes multiple angular positions of the motor arranged in a time node sequence format. The angular position of the motor is represented by the angular offset of the motor's rotating shaft relative to a certain position reference point (usually the motor's initial position). Therefore, the angular position of the motor can characterize the rotation state of the motor and the current position of the rope drive part.

[0071] The current sequence includes multiple currents of the motor arranged in a time node sequence format. The motor current refers to the current flowing through the motor coil.

[0072] In this embodiment, the first bending parameter is the curvature sequence and torsion angle sequence of the rope drive part arranged in the time node sequence format, and the first operating parameter is the angle position sequence and current sequence of the motor arranged in the time node sequence format. During the operation of the motor, the angle position of the motor can pay attention to the current position of the rope drive part, and there is a direct correlation between the current of the motor and the torque output of the motor; and during the movement of the rope drive part, the torsion angle can pay attention to the rotation relationship between the rope drive part and the long axis of the flexible manipulator, and the curvature can pay attention to the degree of bending of the rope drive part at a certain point in space. Therefore, the second operating parameter of the motor can be determined from the first operating parameter, and then the second operating parameter can be input into the first prediction model to obtain the second bending parameter to optimize the first prediction model in the subsequent step, so as to obtain a second prediction model with a high prediction accuracy for the bending parameter of the rope drive part during the movement process.

[0073] In an exemplary embodiment, the historical image sequence includes a plurality of historical images; and the determining the first bending parameter of the rope driving portion based on the historical image sequence includes:

[0074] Based on the historical image sequence, determining the gradient strength and gradient direction of each historical image;

[0075] Determine the contour of the rope drive part in each historical image based on the gradient strength and gradient direction of each historical image;

[0076] Based on the contour lines in each historical image, determining a curvature sequence of the rope drive part arranged in a time node sequence format;

[0077] Based on the contour lines of the rope-driven part in the historical images at adjacent time nodes, a torsion angle sequence of the rope-driven part arranged in a time node sequence format is determined.

[0078] The multiple historical images included in the historical image sequence are arranged in a time node sequence format, and each of the multiple historical images includes an image of a rope drive part.

[0079] Gradient strength is a measure used to characterize the brightness change in the historical image. Gradient strength is usually expressed as the gradient change rate of the intensity of the pixel points in the historical image in the horizontal and vertical directions. The gradient strength can reflect the edge of the rope-driven part in the historical image or the degree of obviousness of the image texture. Optionally, the gradient strength of each historical image can be determined by a Sobel operator calculation method or other convolution operations.

[0080] The gradient direction is used to characterize the direction with the largest gradient strength in the historical image, that is, the direction with the largest rate of change in brightness of the historical image. At each pixel point in the historical image, the gradient direction can be used to characterize the edge direction information of the rope-driven part in the historical image. The gradient direction helps to identify the structure and / or shape of the rope-driven part in the historical image.

[0081] The contour line of the rope-driven part in each historical image refers to the outer edge line of the rope-driven part in each historical image. It can be understood that the contour line of the rope-driven part in each historical image is a dividing line that can be used to distinguish the rope-driven part from the surrounding environment. Therefore, based on the contour line of the rope-driven part in each historical image, the curvature sequence of the rope-driven part arranged in the time node sequence format can be determined.

[0082] The contour line of the rope-driven part in the historical image at adjacent time nodes refers to the contour line of the rope-driven part in the historical image at a certain time node and the contour line in the historical image at the previous time node or the next time node of the time node. Thus, the torsion angle sequence of the rope-driven part arranged in the time node sequence format can be determined through the contour line of the rope-driven part in the historical image at adjacent positions at two time nodes.

[0083] In the present embodiment, based on a historical image sequence including a plurality of historical images, the gradient strength and gradient direction of each historical image can be determined, and since the gradient strength and gradient direction can extract the structural information and / or morphological information of the rope-driven part in the historical image, and the structural information and / or morphological information can characterize the position and morphological changes of the rope-driven part in the historical image, based on this, the contour line of the rope-driven part in each historical image can be further determined, and thus, based on the contour line of the rope-driven part in each historical image, the curvature sequence and the torsion angle sequence of the rope-driven part can be further accurately determined, and further, subsequently, a second prediction model with higher accuracy in predicting the bending parameters of the rope-driven part can be trained through continuous iterative optimization.

[0084] In an exemplary embodiment, the first prediction model includes a gating structure corresponding to weights and biases; the second operating parameter is input into the first prediction model to obtain the second bending parameter, including:

[0085] Obtaining the unit state, candidate memory, and hidden state of the first prediction model;

[0086] The second operating parameter is input into the first prediction model, so that the first prediction model obtains the second bending parameter based on the second operating parameter, the weight of the gating structure, the bias of the gating structure, the cell state, the candidate memory and the hidden state.

[0087] The gating structure is a core component of the first prediction model and the second prediction model, and the gating structure is used to control the data flow and data update of the second operating parameter in the first prediction model.

[0088] Exemplarily, the second operating parameter is input into the first prediction model to obtain the second bending parameter of the target time node, wherein the target time node is the next time node of the preset time window length. Based on this, the unit state represents the short-term memory of the first prediction model at the target time node. The candidate memory is the memory vector newly generated by the first prediction model at each time node, and the candidate memory represents the state of the first operating parameter of the target time node after the change. The hidden state is the state output by the first prediction model at each time node, and the hidden state includes the information summary of the first operating parameter currently input.

[0089] Optionally, the cell state, candidate memory, and hidden state can each have their own weights and biases.

[0090] Exemplarily, when the first prediction model is a prediction model built based on the LSTM algorithm, the gate control structure may include an input gate, a forget gate, and an output gate, and in the first prediction model, the forget gate, the input gate, and the output gate are arranged in a sequential direction from input to output. The input gate, the forget gate, and the output gate each have their own weights and biases, and the unit state, the candidate memory, and the hidden state each have their own weights and biases. The input gate is used to cooperate with the candidate memory to jointly decide what new information to add to the unit state. The activation value of the input gate is determined by the threshold function, the weight of the input gate, the unit state of the previous time node of the target time node, the second operating parameter of the target time node, and the bias of the input gate. The candidate memory is determined by the weight of the candidate memory, the unit state of the previous time node of the target time node, the second operating parameter of the target time node, and the bias of the candidate memory; the forget gate is used to decide which information to discard from the unit state. The activation value of the forget gate is determined by the threshold function, the weight of the forget gate, the unit state of the previous time node of the target time node, the second operating parameter of the target time node, and the bias of the forget gate; the output gate is used to determine the hidden state of the next time node. The activation value of the output gate is determined by the threshold function, the weight of the output gate, the unit state of the previous time node of the target time node, the second operating parameter of the target time node, and the bias of the output gate. The activation value of the unit state is determined by the activation value of the forget gate, the unit memory of the previous time node of the target time node, the activation value of the input gate, and the candidate memory. Exemplarily, the threshold function may be a Sigmoid function for limiting the activation value between 0 and 1.

[0091] The weight of the gating structure is the coefficient of the connection between the neurons of the neural network in the first prediction model. The weight of the gating structure determines the influence of the second operating parameter input into the first prediction model on the neurons in the gating structure.

[0092] The bias of the gate structure is a constant value added before the neuron activation function in the first prediction model, so that the first prediction model can output the second bending parameter even when the second operating parameter is not input or the input second operating parameter is zero.

[0093] The input gate is used to cooperate with the candidate memory to decide what new information to add to the cell state; the forget gate is used to decide what information to discard from the cell state; the cell state update is determined by the output of the forget gate and the output of the input gate; the output gate and the cell output are both determined by the current cell state, and the output gate is used to determine the next hidden state.

[0094] In one embodiment, the first prediction model also includes a fully connected layer, and the fully connected layer corresponds to weights and biases; the above-mentioned inputting the second operating parameter into the first prediction model so that the first prediction model obtains the second bending parameter based on the second operating parameter, the weight of the gating structure, the bias of the gating structure, the unit state, the candidate memory, and the hidden state, includes: inputting the second operating parameter into the first prediction model so that the first prediction model obtains the second bending parameter based on the second operating parameter, the weight of the gating structure, the bias of the gating structure, the unit state, the candidate memory, the hidden state, the weight of the fully connected layer, and the bias of the fully connected layer.

[0095] In this embodiment, the second operating parameter is input into the first prediction model to obtain the second bending parameter by first acquiring the cell state, candidate memory and hidden state of the first prediction model, and then inputting the second operating parameter into the first prediction model, so that the first prediction model obtains the second bending parameter based on the second operating parameter, the weight of the gating structure, the bias of the gating structure, the cell state, the candidate memory and the hidden state. Thus, the embodiment of the present application can obtain a second bending parameter with higher prediction accuracy through the cooperation of the gating structure, the cell state, the candidate memory and the hidden state of the first prediction model.

[0096] In an exemplary embodiment, the first prediction model is optimized based on the first bending parameter and the second bending parameter to obtain the second prediction model, including:

[0097] Based on the first bending parameter, determining an actual bending parameter at the same time node as the second bending parameter;

[0098] Calculating a loss function value of the first prediction model based on the actual bending parameter and the second bending parameter;

[0099] Determining a bias update weight of the gating structure based on a loss function value of the first prediction model;

[0100] The first prediction model is optimized based on the deviation update weight of the gating structure to obtain a second prediction model.

[0101] The actual bending parameter is a bending parameter of a certain historical time node included in the first bending parameter.

[0102] Optionally, the loss function value of the first prediction model may be determined by a mean square error between the second bending parameter output by the first prediction model and the actual bending parameter.

[0103] The deviation update weight is used to adjust the parameters in the first prediction model, such as the weight and / or deviation of the gating structure, according to the loss function value calculated in the optimization process of the first prediction model. The purpose of this optimization process is to minimize the loss function value in an iterative manner, thereby improving the prediction accuracy of the first prediction model.

[0104] In one embodiment, the above-mentioned deviation updating weight based on the gating structure optimizes the first prediction model to obtain the second prediction model, including: optimizing the first prediction model based on the deviation updating weight of the gating structure, and determining to obtain the second prediction model when the loss function value of the first prediction model is less than or equal to the preset loss value.

[0105] In one embodiment, the method further includes: determining the mean square error and mean absolute error between the second bending parameter and the actual bending parameter; optimizing the first prediction model based on the deviation update weight of the gating structure to obtain the second prediction model, including: optimizing the first prediction model based on the deviation update weight of the gating structure, and determining to obtain the second prediction model when the mean square error is less than or equal to the preset mean square error and the mean absolute error is less than or equal to the preset absolute error.

[0106] In this embodiment, based on the second bending parameter and the actual bending parameter at the same time node as the second bending parameter, the loss function value of the rough first prediction model is calculated to determine the deviation update weight of the gating structure, thereby enabling the first prediction model to be optimized based on the deviation update weight of the gating structure to obtain the second prediction model, and further enabling the optimized second prediction model to have higher prediction accuracy for the rope drive part.

[0107] In an exemplary embodiment, the method further includes:

[0108] determining a mean and a standard deviation of a first operating parameter;

[0109] obtaining a standardized first operating parameter based on the first operating parameter, the average value of the first operating parameter, and the standard deviation of the first operating parameter;

[0110] Determining a second operating parameter of the motor from the first operating parameter based on a preset time window length includes:

[0111] Based on the preset time window length, a second operating parameter of the electric machine is determined from the standardized first operating parameter.

[0112] The average value of the first operating parameter represents the concentration trend of the values ​​of each operating parameter in the first operating parameter. The standard deviation of the first operating parameter represents the degree of dispersion of the values ​​of each operating parameter in the first operating parameter relative to the average value of each operating parameter in the first operating parameter. The larger the standard deviation of the first operating parameter, the greater the difference between the operating parameters in the first operating parameter. Conversely, if the standard deviation of the first operating parameter is smaller, it means that the operating parameters in the first operating parameter are closer to the average value.

[0113] Optionally, the standardized first operating parameter may be in the form of a standard normal distribution with a mean of 0 and a standard deviation of 1.

[0114] Specifically, the second operating parameter of the motor determined from the standardized first operating parameter is also a standardized operating parameter.

[0115] In this embodiment, by determining the mean value and standard deviation of the first operating parameter, and then obtaining the standardized first operating parameter based on the first operating parameter, the mean value of the first operating parameter and the standard deviation of the first operating parameter, and then determining the second operating parameter of the motor from the standardized first operating parameter based on the preset time window length, thereby eliminating the different dimensions and magnitudes of the first operating parameter through standardization, so that the first operating parameter can be compared and analyzed at the same data scale, which can improve the optimization efficiency and stability of the optimization results of the first prediction model in subsequent steps, and further, based on this, it can be trained through iterative optimization to obtain a second prediction model with higher prediction accuracy for the bending parameters of the rope drive part.

[0116] The application process of the above bending parameter prediction method is described below in conjunction with a detailed embodiment, as follows:

[0117] (1) The process of obtaining curvature sequence, torsion angle sequence, angle position sequence and current sequence

[0118] The terminal obtains a historical image sequence including a plurality of historical images of the rope drive part according to a time node sequence format;

[0119] The terminal determines the gradient strength and gradient direction of each historical image based on the historical image sequence; specifically, the pixel point of the target historical image in the historical image sequence is represented as (x, y), the gradient strength of each pixel point is represented as G, and the horizontal derivative and vertical derivative of the pixel point of the target historical image are represented as G respectively. x and G y , G x and G yThey correspond to the image brightness of the historical image in the x-axis direction and the image brightness in the y-axis direction, respectively. The x-axis direction and the y-axis direction are perpendicular to each other. Based on the Sobel operator calculation method, the gradient intensity of each pixel in the target historical image is determined as follows: The gradient direction of the pixel point can be determined based on the tangent function and the image brightness of the historical image in the x-axis direction and the image brightness in the y-axis direction. The gradient direction of the pixel point is represented as θ, and then it can be determined based on the formula θ=arctan2(G y , G x ) Determine θ for each pixel;

[0120] The terminal is based on the gradient strength of each historical image G and gradient direction θ, determine the contour line of the rope driving part in each historical image; specifically, the contour value at the pixel point (x, y) is represented as IsEdge(x, y), the preset contour threshold is represented as threshold, and when the gradient strength G is greater than the preset contour threshold threshold, the contour value of the pixel point is determined to be 1, otherwise the contour value of the pixel point is 0. The specific formula is as follows:

[0121]

[0122] Based on the contour lines in each historical image, the terminal determines the curvature sequence of the rope-driven part arranged in the time node sequence format; wherein the curvature sequence includes multiple curvatures arranged in the time node sequence format, and the curvature sequence is represented as κ(t), where t is the target time node; specifically, the pixel point with a contour value of 1 is represented as s, and the contour line in each historical image is represented as r(s). It can be understood that the contour line is a collection of multiple pixel points with a contour value of 1, and the coordinates of the points on the contour line in the x-axis direction are represented as x(s), and the coordinates of the points on the contour line in the y-axis direction are represented as y(s). Then the contour line in each historical image is represented as r(s)=(x(s), y(s)), and the curvature of the points on the contour line is represented as κ(s). Then, the curvature of the points on the contour line of the rope-driven part can be determined according to the first derivative x′(s) and the second derivative x″(s) of the points on the contour line in the x-axis direction, and the first derivative y′(s) and the second derivative y″(s) of the points on the contour line in the y-axis direction. The first derivative corresponds to the tangent line of the contour line at pixel point s, and the second derivative corresponds to the tangent line of the contour line at pixel point s The rate of change of curvature;

[0123] The terminal determines the torsion angle sequence of the rope driving part arranged in the time node sequence format based on the contour line of the rope driving part in the historical image at the adjacent time nodes; wherein the torsion angle sequence includes multiple torsion angles arranged in the time node sequence format, and the torsion angle sequence is expressed as κ(t); the torsion angle of the point on the contour line of the rope driving part at the target time node is determined based on the tangent function and the coordinate change between the coordinate of the pixel point and the coordinate of the previous time node of the target time node. Specifically, the determination formula of the torsion angle of the target time node is τ(t)=arctan2(Δy, Δx);

[0124] The motor controller reads the angular position sequence and current sequence of the motor arranged in the time node sequence format; the motor is used to control the operation of the flexible robotic arm; wherein the angular position sequence includes a plurality of angular positions arranged in the time node sequence format, and the angular position of the target time node is represented as P(t); similarly, the current sequence includes a plurality of currents arranged in the time node sequence format, and the current of the target time node is represented as I(t);

[0125] At this point, based on the curvature sequence κ(t) and the torsion angle sequence τ(t) arranged in the time node sequence format, the terminal determines the first bending parameter; based on the angle position sequence P(t) and the current sequence I(t) arranged in the time node sequence format, the terminal determines the first operating parameter; wherein the first operating parameter at the target time node is expressed as x(t), and the second bending parameter of the rope drive part predicted at the target time node is expressed as y(t).

[0126] (2) Determination process of the standardized first bending parameter and the standardized first operating parameter

[0127] The terminal determines the mean value and standard deviation of the first bending parameter, and determines the mean value and standard deviation of the first operating parameter; specifically, the mean value and standard deviation of the curvature sequence κ(t) are represented as μ κ and σ κ , the mean and standard deviation of the torsion angle sequence τ(t) are represented as μ τ and σ τ ; The mean and standard deviation of the angular position sequence P(t) are represented as μ P and σ P , the mean value and standard deviation of the current sequence I(t) are expressed as μ I and σ I ;

[0128] The terminal obtains a standardized first bending parameter based on the first bending parameter, the average value of the first bending parameter, and the standard deviation of the first bending parameter; specifically, the standardized curvature sequence is represented as κnorm (t), the normalized torsion angle sequence is represented as τ norm (t); Normalized curvature sequence κ norm The formula for determining (t) is Normalized torsion angle sequence τ norm The formula for determining (t) is The terminal obtains a standardized first operating parameter based on the first operating parameter, the average value of the first operating parameter, and the standard deviation of the first operating parameter; the standardized angular position sequence is represented as P norm (t), the standardized current series is expressed as I norm (t); Standardized angular position sequence P norm The formula for determining (t) is Standardized current series I norm The formula for determining (t) is

[0129] (3) Determination process of the second operating parameter

[0130] The terminal determines the second operating parameter of the motor from the standardized first operating parameter x(t) based on the preset time window length; specifically, the preset time window length is represented as T. In this embodiment, it is assumed that the second operating parameter is the operating parameter of the target time node in the preset time window length. Therefore, based on the universality of mathematical formulas for parameters at different time nodes and for the convenience of explaining the content of this embodiment, in this embodiment, x(t) is used to represent the second operating parameter. At the same time, since the second operating parameter is determined from the standardized first operating parameter, the second operating parameter is specifically x(t)=[P norm (t-T+1),...,P norm (t),I norm (t-T+1),...,I norm (t)]

[0131] At the same time, y(t) is used to represent the second bending parameter. Similarly, since the second bending parameter is determined from the standardized first bending parameter, the second bending parameter is specifically y(t)=[κ norm (t+1), τ norm (t+1)], and other parameters are similar and will not be described here.

[0132] (4) Determination process of the second bending parameter

[0133] The terminal obtains the unit state, candidate memory and hidden state of the first prediction model; specifically, the unit state is represented as C t , and represent the candidate memory as Denote the hidden state as ht ; The gate control structure in the first prediction model includes an input gate, a forget gate, and an output gate. The input gate is represented as i t , denote the forget gate as f t , denote the output gate as o t ; Further, the candidate memory The weight is denoted as W C , the bias is represented by b C ; Input gate i t The weight is denoted as W i , the bias is represented by b i ; Forget gate f t The weight is denoted as W f , the bias is represented by b f ; Output gate o t The weight is denoted as W o , the bias is represented by b o ; Meanwhile, the threshold function is represented as σ;

[0134] The terminal will run the second parameter x t Input to the first prediction model including the gate structure with corresponding weights and biases, so that the first prediction model is based on the second operating parameter x(t), the weight W of the input gate i and bias b i , the weight of the forget gate W f and bias b f , the weight of the output gate W o and bias b o , unit status C t , candidate memory And the hidden state h t Obtaining a second bending parameter y(t); the second bending parameter y(t) is a bending parameter of the rope driving part at the next time node of the preset time window length;

[0135] Specifically, first, the forget gate f t The activation value of is determined by the threshold function σ and the weight W of the forget gate f , the unit state h of the previous time node of the target time node t-1 , the second operating parameter x(t) of the target time node and the bias b of the forget gate f Therefore, the forget gate f t The activation value of is determined by the formula f t =σ(W f ·[h t-1 , x t ]+b f ); Then, input gate i t The activation value is determined by the threshold function σ, the weight W of the input gate i, the unit state h of the previous time node of the target time node t-1 , the second operating parameter x(t) of the target time node and the bias b of the input gate i Therefore, the input gate i t The activation value of is determined by t =σ(W i ·[h t-1 ,x t ]+b i ), and at the same time, the candidate memory The activation value is based on the hyperbolic tangent function, the weight W of the candidate memory C , the unit state h of the previous time node of the target time node t-1 , the second operating parameter x(t) of the target time node, the bias b of the candidate memory C To determine, therefore, the candidate memory The activation value is determined by At this time, based on the forget gate f t The activation value and input gate i t The activation value of the unit state is updated, and the unit state C t The activation value of is determined by the forget gate f t The activation value of the target time node, the unit state C of the previous time node t-1 , input gate i t The activation value and candidate memory The activation value is determined, so the cell state C t The activation value is determined by Furthermore, the output gate o t The activation value is determined by the threshold function σ and the weight W of the output gate o , the unit state h of the previous time node of the target time node t-1 , the second operating parameter x(t) of the target time node, the bias b of the output gate o Make a determination, therefore, the output gate o t The activation value is determined by the formula o t =σ(W o ·[h t-1 , x t ]+b o ), at this time, based on the hyperbolic tangent function, the output gate o t The activation value and cell state C t The activation value of the hidden state h t The activation value is determined, and the hidden state h t The activation value is determined by the formula h t =o t *tanh(C t );

[0136] The first prediction model also includes a fully connected layer, and the fully connected layer corresponds to a weight W y and bias b y , based on the weight W of the fully connected layer y , hidden state h t The activation value and the bias b of the fully connected layer y The second bending parameter y(t) is determined. The formula for determining the second bending parameter y(t) is y(t)=W y ·h t +b y .

[0137] (5) Optimization process of the first prediction model

[0138] The optimization process of the first prediction model is to perform back propagation and parameter update based on the updated gradient of the gating structure. The parameter update refers to updating the weight and bias of the gating structure to optimize the first prediction model. The terminal determines the actual bending parameter at the same time node as the second bending parameter based on the standardized first bending parameter. The actual bending parameter is expressed as

[0139] Terminals based on actual bending parameters and the second bending parameter y(t), calculate the loss function value of the first prediction model; specifically, the actual bending parameter The mean square error between the first prediction model and the second bending parameter y(t) is taken as the loss function value of the first prediction model. The loss function value is represented as Loss, and the number of historical time nodes is represented as N. Then the formula for determining the loss function value of the first prediction model is:

[0140] The terminal determines the bias update weight of the gate structure based on the loss function value Loss of the first prediction model; specifically, first, the update gradient of the second bending parameter y(t) is calculated, and the update gradient of the second bending parameter y(t) is expressed as Then calculate the updated gradient of the gate control structure and the hidden state h t Update gradient, candidate memory The updated gradient and cell state C t The updated gradient of t The updated gradient is expressed as The input gate i t The updated gradient is expressed as The output gate o t The updated gradient is expressed as The hidden state h t The updated gradient is expressed as The candidate memory The updated gradient is expressed as And the unit state C t The updated gradient is expressed as

[0141] Hidden state h t The updated gradient Determined by the updated gradient of the second warping parameter y(t), the hidden state h t The updated gradient The formula for determining

[0142] Output gate o t The updated gradient Through the tangent function, the hidden state h t The updated gradient And the cell state C t Make a determination and output gate o t The updated gradient The formula for determining

[0143] Candidate Memory The updated gradient Based on the hyperbolic tangent function, the hidden state h t The updated gradient Output gate o t The activation value and cell state C t The activation value of the candidate memory is determined The updated gradient The formula for determining

[0144] Forget Gate t The updated gradient By unit status C t The updated gradient And the unit state C of the previous time node of the target time node t-1 To determine, forget gate f t The updated gradient The formula for determining

[0145] Input Gate i t The updated gradient By unit status C t The updated gradient and candidate memory The activation value of the input gate i is determined t The updated gradient The formula for determining

[0146] Further, after obtaining the input gate i t The updated gradient In the case of The updated gradient Able to pass cell status C t The updated gradient And the input gate i t The activation value is determined;

[0147] Furthermore, the forget gate f t The bias update weight is expressed as The input gate i t The bias update weight is expressed as The output gate o t The bias update weight is expressed as Set the cell status C t The bias update weight is expressed as

[0148] The terminal can use the forget gate f t The updated gradient And the unit state h of the previous time node of the target time node t-1 Forget gate f t The bias update weights To determine, forget gate f t The bias update weights The formula for determining

[0149] The terminal can be based on the input gate i t The updated gradient And the unit state h of the previous time node of the target time node t-1 For input gate i t The bias update weights To confirm, input gate i t The bias update weights The formula for determining

[0150] The terminal can output gate o t The updated gradient And the unit state h of the previous time node of the target time node t-1 For output gate o t The bias update weights Determine and output gate o t The bias update weights The formula for determining

[0151] The terminal can be based on the unit state C tThe updated gradient And the unit state h of the previous time node of the target time node t-1 For unit status C t The bias update weights Determine, unit status C t The bias update weights The formula for determining

[0152] Thus, the terminal determines the forget gate f based on t The bias update weights Input Gate i t The bias update weights Output gate o t The bias update weights And the cell state C t The bias update weights The first prediction model is optimized to obtain an initial second prediction model.

[0153] (6) Evaluation process of the second prediction model

[0154] The terminal determines the second bending parameter y(t) and the actual bending parameter The mean square error and mean absolute error between , the mean square error is expressed as MSE, the mean absolute error is expressed as MAE, and the actual curvature is expressed as The actual torsion angle is expressed as The formula for determining the mean square error MSE is: The formula for determining the mean absolute error MAE is:

[0155] When the mean square error MSE is less than or equal to the preset mean square error and the mean absolute error MAE is less than or equal to the preset absolute error, it is determined that the second prediction model is obtained.

[0156] (6) Prediction process of the third bending parameter

[0157] The terminal predicts a third bending parameter of the rope driving portion based on the second prediction model.

[0158] In this embodiment, the curvature sequence and torsion angle sequence of the rope drive part are determined by the historical image sequence corresponding to the time node sequence format, and the angle position sequence and current sequence of the motor arranged in the time node sequence format are read in the motor controller, thereby inputting the second operating parameter of the preset time window length into the first prediction model to obtain the second bending parameter, and then determining the actual bending parameter at the same time node as the second bending parameter, and optimizing the first prediction model based on the actual bending parameter and the second bending parameter to obtain the second prediction model, and finally obtaining the second prediction model capable of predicting the third bending parameter of the rope drive part at the next time node equivalent to the current time node. It can be seen that the second prediction model finally optimized by the embodiment of the present application is a prediction model constructed based on a time series algorithm capable of capturing dynamic characteristics that change over time, and therefore, the third bending parameter of the rope drive part predicted by the second prediction model can have a higher accuracy.

[0159] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0160] Based on the same inventive concept, the embodiment of the present application also provides a bending parameter prediction device for implementing the bending parameter prediction method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more bending parameter prediction device embodiments provided below can refer to the limitations of the bending parameter prediction method above, and will not be repeated here.

[0161] In an exemplary embodiment, Figure 4 As shown, a bending parameter prediction device is provided, comprising: an acquisition module 402, a first determination module 404, an input module 406, an optimization module 408 and a prediction module 410, wherein:

[0162] The acquisition module 402 is used to acquire the first bending parameter of the rope driving part in the flexible manipulator and the first operating parameter of the motor in accordance with the time node sequence format; the motor is used to control the operation of the flexible manipulator.

[0163] The first determination module 404 is configured to determine a second operating parameter of the motor from the first operating parameter based on a preset time window length.

[0164] The input module 406 is used to input the second operating parameter into the first prediction model to obtain a second bending parameter; the second bending parameter is the bending parameter of the rope driving part at the next time node of the preset time window length.

[0165] The optimization module 408 is used to optimize the first prediction model based on the first bending parameter and the second bending parameter to obtain a second prediction model.

[0166] The prediction module 410 is used to predict the third bending parameter of the rope driving part based on the second prediction model.

[0167] In an exemplary embodiment, the acquisition module 402 is further configured to acquire a historical image sequence of the rope-driven part in a time node sequence format; and determine a first bending parameter of the rope-driven part based on the historical image sequence.

[0168] In an exemplary embodiment, the first bending parameter is a curvature sequence and a torsion angle sequence of the rope drive part arranged in a time node sequence format; the first operating parameter is an angle position sequence and a current sequence of the motor arranged in a time node sequence format.

[0169] In an exemplary embodiment, the historical image sequence includes multiple historical images; the acquisition module 402 is also used to determine the gradient strength and gradient direction of each historical image based on the historical image sequence; determine the contour line of the rope-driven part in each historical image based on the gradient strength and gradient direction of each historical image; determine the curvature sequence of the rope-driven part arranged in a time node sequence format based on the contour line in each historical image; determine the torsion angle sequence of the rope-driven part arranged in a time node sequence format based on the contour line of the rope-driven part in the historical images at adjacent time nodes.

[0170] In an exemplary embodiment, the first prediction model includes a gating structure with corresponding weights and biases; the input module 406 is also used to obtain the unit state, candidate memory and hidden state of the first prediction model; the second operating parameter is input into the first prediction model so that the first prediction model obtains the second bending parameter based on the second operating parameter, the weight of the gating structure, the bias of the gating structure, the unit state, the candidate memory and the hidden state.

[0171] In an exemplary embodiment, the above-mentioned optimization module 408 is also used to determine the actual bending parameter at the same time node as the second bending parameter based on the first bending parameter; calculate the loss function value of the first prediction model based on the actual bending parameter and the second bending parameter; determine the deviation update weight of the gating structure based on the loss function value of the first prediction model; optimize the first prediction model based on the deviation update weight of the gating structure to obtain the second prediction model.

[0172] As shown in FIG. X, in an exemplary embodiment, the apparatus further includes a second determining module 410, and the second determining module 410 is used to:

[0173] determining a mean and a standard deviation of a first operating parameter;

[0174] obtaining a standardized first operating parameter based on the first operating parameter, the average value of the first operating parameter, and the standard deviation of the first operating parameter;

[0175] Determining a second operating parameter of the motor from the first operating parameter based on a preset time window length includes:

[0176] Based on the preset time window length, a second operating parameter of the electric machine is determined from the standardized first operating parameter.

[0177] Each module in the bending parameter prediction device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0178] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store bending parameter data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a bending parameter prediction method is implemented.

[0179] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a bending parameter prediction method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0180] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0181] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0182] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0183] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0184] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0185] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0186] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0187] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A bending parameter prediction method, characterized in that: The method comprises: Acquire a first bending parameter of a rope driving part in a flexible manipulator and a first operating parameter of a motor in a time node sequence format; the motor is used to control the operation of the flexible manipulator; Determining a second operating parameter of the motor from the first operating parameter based on a preset time window length; Inputting the second operating parameter into the first prediction model to obtain a second bending parameter; the second bending parameter is a bending parameter of the rope drive part at the next time node of the preset time window length; Optimizing the first prediction model based on the first bending parameter and the second bending parameter to obtain a second prediction model; A third bending parameter of the rope drive portion is predicted based on the second prediction model.

2. The method according to claim 1, characterized in that The step of obtaining the first bending parameter of the rope driving part of the flexible manipulator according to the time node sequence format includes: Acquire a historical image sequence of the rope-driven part in a time node sequence format; Based on the historical image sequence, a first bending parameter of the rope drive section is determined.

3. The method according to claim 2, characterized in that The first bending parameter is a curvature sequence and a torsion angle sequence of the rope drive part arranged in a time node sequence format; the first operating parameter is an angle position sequence and a current sequence of the motor arranged in a time node sequence format.

4. The method according to claim 3, characterized in that The historical image sequence includes a plurality of historical images; and determining the first bending parameter of the rope drive portion based on the historical image sequence includes: Based on the historical image sequence, determining the gradient strength and gradient direction of each of the historical images; Determining the contour of the rope drive part in each of the historical images based on the gradient strength and gradient direction of each of the historical images; Determining, based on the contour lines in each of the historical images, a curvature sequence of the rope-driven portion arranged in a time node sequence format; Based on the contour lines of the rope-driven part in the historical images at adjacent time nodes, a torsion angle sequence of the rope-driven part arranged in a time node sequence format is determined.

5. The method according to claim 1, characterized in that The first prediction model includes a gating structure corresponding to a weight and a bias; the second operating parameter is input into the first prediction model to obtain a second bending parameter, including: Obtaining a unit state, a candidate memory, and a hidden state of the first prediction model; The second operating parameter is input into the first prediction model so that the first prediction model obtains the second bending parameter based on the second operating parameter, the weight of the gating structure, the bias of the gating structure, the cell state, the candidate memory and the hidden state.

6. The method according to claim 5, characterized in that The optimizing the first prediction model based on the first bending parameter and the second bending parameter to obtain a second prediction model includes: Determining, based on the first bending parameter, an actual bending parameter at the same time node as the second bending parameter; Calculating a loss function value of the first prediction model based on the actual bending parameter and the second bending parameter; Determining a bias update weight of the gating structure based on a loss function value of the first prediction model; The first prediction model is optimized based on the deviation update weight of the gating structure to obtain a second prediction model.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: determining a mean and a standard deviation of the first operating parameter; obtaining a standardized first operating parameter based on the first operating parameter, an average value of the first operating parameter, and a standard deviation of the first operating parameter; The determining the second operating parameter of the motor from the first operating parameter based on a preset time window length includes: Based on a preset time window length, a second operating parameter of the electric machine is determined from the standardized first operating parameter.

8. A bending parameter prediction device, characterized in that: The device comprises: An acquisition module, used for acquiring a first bending parameter of a rope driving part in a flexible manipulator and a first operating parameter of a motor in a time node sequence format; the motor is used for controlling the operation of the flexible manipulator; A first determining module, configured to determine a second operating parameter of the motor from the first operating parameter based on a preset time window length; An input module, used for inputting the second operating parameter into the first prediction model to obtain a second bending parameter; the second bending parameter is a bending parameter of the rope driving part at a next time node of the preset time window length; an optimization module, configured to optimize the first prediction model based on the first bending parameter and the second bending parameter to obtain a second prediction model; A prediction module is used to predict a third bending parameter of the rope drive portion based on the second prediction model.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Snakelike robot climbing control method, system and device and storage medium

    CN112731810A

  • Surgical tool

    CN114390916A

  • Continuous body robot, control method therefor, and program

    CN115916025A

  • Rope force control method capable of being used for time-varying configuration

    CN116038692A

  • Method and device for determining tail end position of flexible arm and flexible arm mechanical equipment

    CN116728395A

Cited By

  • Flat wire motor hairpin structure bending forming parameter prediction method based on machine learning

    CN120561894A

  • Rope-driven soft body actuator platform for driving soft body base body to move and control method of rope-driven soft body actuator platform

    CN121552324A

  • A rope-driven soft actuator platform for driving the movement of a soft body and a control method thereof

    CN121552324B