Method for determining the pose of an optical master hand, surgical robot system
By constructing a target quaternion dataset and using a GRU model and a feedforward neural network model to determine the pose of the optical master hand, the singularity problem in the pose determination of the optical master hand is solved, and the accuracy of the surgical robot system is improved.
Patent Information
- Application Number
- CN202411047421.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-08-01
AI Technical Summary
In surgical robot systems, singular problems exist in the posture determination process of the optical master hand, such as gimbal lock-up, dead zone, and multiple correspondences between quaternions and Euler angles, which affect the accuracy of surgery.
By acquiring current and historical quaternion data of the optical master hand, a target quaternion dataset is constructed, embedded in a high-dimensional space for position encoding, and the target quaternion matrix is determined using a GRU model and a feedforward neural network model. Time and dependencies are injected to finally obtain accurate target Euler angles.
This effectively avoids unusual problems, improves the accuracy of optical master hand posture, and thus enhances the precision of the surgery.
Smart Images

Figure CN118806445B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of surgical robots, and particularly relates to a method for determining the pose of an optical master hand and a surgical robot system. BACKGROUND
[0002] The optical master hand generally refers to the interface or device at the end operated by the doctor in the surgical robot system. The doctor can remotely control the slave operating hand of the surgical robot to perform surgery or other medical operations by using the optical master hand. The wireless optical master hand reduces the complexity of wiring and facilitates the doctor to flexibly operate the optical master hand. The wireless optical master hand promotes the intelligentization and man-machine cooperation development of the surgical robot system.
[0003] However, in the process of determining the pose of the optical master hand, many singular problems may occur, such as gimbal lock, dead zone, and multi-value correspondence of quaternions and Euler angles, thereby affecting the precision of surgery. SUMMARY
[0004] Therefore, the present application provides a method for determining the pose of an optical master hand, comprising: acquiring current quaternion data of the optical master hand at a current time; determining a target quaternion data set based on the current quaternion data and historical quaternion data of the optical master hand at a plurality of historical time points before the current time; determining a first quaternion matrix based on the target quaternion data set, wherein the first quaternion matrix comprises the target quaternion data set, a target velocity set of the target quaternion data set, and a target acceleration set of the target quaternion data set, the target velocity set comprises velocity data of the current quaternion data and velocity data of each of the plurality of historical quaternion data, and the target acceleration set comprises acceleration data of the current quaternion data and acceleration data of each of the plurality of historical quaternion data; embedding the first quaternion matrix into a high-dimensional space to obtain a second quaternion matrix; performing position encoding on the second quaternion matrix to obtain a third quaternion matrix; determining a target quaternion matrix with a dependency relationship by using a network model based on the third quaternion matrix; and obtaining a target Euler angle based on the target quaternion matrix, wherein the target Euler angle represents the pose of the optical master hand at the current time.
[0005] Optionally, the network model comprises a GRU model and a feedforward neural network model, and the determining the target quaternion matrix based on the third quaternion matrix by using the network model comprises: determining an attention weight of the third quaternion matrix; performing first normalization on the third quaternion matrix and the attention weight to obtain a first intermediate matrix; processing the first intermediate matrix by using the feedforward neural network model to obtain a second intermediate matrix; performing second normalization on the first intermediate matrix and the second intermediate matrix to obtain a third intermediate matrix; and inputting the third intermediate matrix into the GRU model to obtain the target quaternion matrix.
[0006] Optionally, the determining the attention weight of the third quaternion matrix comprises: determining a query tensor matrix of the third quaternion matrix, a key tensor matrix of the third quaternion matrix, and a value tensor matrix of the third quaternion matrix based on the third quaternion matrix; and determining the attention weight of the target quaternion matrix based on the query tensor matrix, the key tensor matrix, and the value tensor matrix.
[0007] Optionally, the position encoding of the second quaternion matrix to obtain a third quaternion matrix comprises: obtaining a position encoding vector corresponding to the second quaternion matrix; and adding the second quaternion matrix and the position encoding vector to obtain the third quaternion matrix.
[0008] Optionally, the determining method further comprises: determining the current predicted quaternion data based on the target Euler angle; estimating a prediction error by using a joint loss function based on the current quaternion data and the current predicted quaternion data; and updating the feedforward neural network model based on a result of the estimation.
[0009] Optionally, the joint loss function is constituted based on a first loss function, a second loss function, a third loss function, and a fourth loss function; wherein the first loss function represents a function suitable for mean square error calculation of the prediction error; the second loss function represents a function suitable for regularization term calculation of the prediction error; the third loss function represents a function suitable for velocity error calculation of the prediction error; and the fourth loss function represents a function suitable for acceleration error calculation of the prediction error.
[0010] Optionally, the target Euler angle comprises a yaw angle, a pitch angle, and a roll angle.
[0011] Optionally, the target quaternion matrix is converted into the target Euler angle by using a decoder.
[0012] The present disclosure also provides a surgical robot system, comprising: an optical master hand provided with a plurality of infrared reflection devices; a surgical robot provided with a slave hand; an infrared optical master hand tracking device configured to calculate current quaternion data based on signals emitted by the emission devices when an operator operates the optical master hand; and a host computer configured to determine target Euler angles using the determination method described above based on the current quaternion data, and control the slave hand to work based on the target Euler angles.
[0013] Optionally, the optical master hand is also provided with an opening and closing part, which is connected with the host computer, and the operator opens or closes the opening and closing part by operation, and the host computer controls the slave hand to work based on the angle of opening or closing of the opening and closing part.
[0014] According to the embodiments of the present disclosure, the target quaternion data set is determined by using the current quaternion data and the historical quaternion data at a plurality of historical time points before the current time point, and the first quaternion matrix is determined based on the target quaternion data set, so that the first quaternion matrix includes more abundant data, and the data are time-related. Through position encoding, time information can be injected, and through a network model, dependency relationship can be injected, so that the target quaternion matrix has both time information and dependency relationship. Therefore, the target Euler angles determined based on the target quaternion matrix are more accurate, which can avoid singular problems such as gimbal lock, dead zone, and multi-value correspondence between quaternions and Euler angles, improve the accuracy of obtaining the pose of the optical master hand, and thus improve the accuracy of surgery. BRIEF DESCRIPTION OF DRAWINGS
[0015] The above and other objects, features and advantages of the present application will become more apparent from the following description of embodiments of the present application taken in conjunction with the accompanying drawings, in which:
[0016] Figure 1 A flowchart of a method for determining the pose of an optical master hand according to an embodiment of the present application is schematically shown.
[0017] Figure 2 An application scenario diagram of an optical master hand according to an embodiment of the present application is schematically shown.
[0018] Figure 3 A side view of an optical master hand according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0019] Embodiments of the present application will be described below with reference to the accompanying drawings. It should be understood, however, that the description that follows is merely exemplary and is not intended to limit the scope of the application. In the following detailed description of embodiments of the present application, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, it will be apparent to one skilled in the art that one or more embodiments of the present application can be practiced without these specific details. In other instances, well-known structures and functions have not been described in detail in order to avoid obscuring aspects of the present application.
[0020] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used herein, the term "includes" and tautological expressions thereof, such as "including," "includes," "include," "contains," "containing," "contain," "contains," etc., shall not be construed as
[0021] All terms used herein including technical and scientific terms have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined herein. It should be noted that the terms used herein are defined as having a meaning that is consistent with the context of the specification unless otherwise defined explicitly herein.
[0022] In the case where expressions such as "at least one of A, B, and C, etc." are used, it generally should be interpreted to include any of one, all, or a combination thereof unless otherwise defined herein. For example, "a system having at least one of A, B, and C" should be interpreted to include a system having A alone, a system having B alone, a system having C alone, a system having A and B together, a system having A and C together, a system having B and C together, and / or a system having A, B, and C together, etc.
[0023] In the related art, the quaternion data of the optical master hand can be obtained through the position information between the optical markers on the optical master hand. The Euler angles of the optical master hand can be directly calculated through the quaternion data. However, in the process of determining the pose of the optical master hand, many singular problems may occur, such as gimbal lock, dead zone, multi-value correspondence of quaternions and Euler angles-8, etc., thereby affecting the accuracy of the surgery.
[0024] To solve the above problems, an embodiment of the present application provides a method for determining the pose of an optical master hand, comprising: obtaining current quaternion data of the optical master hand at a current time; determining a target quaternion data set based on the current quaternion data and historical quaternion data of the optical master hand at a plurality of historical times before the current time; determining a first quaternion matrix based on the target quaternion data set, wherein the first quaternion matrix comprises the target quaternion data set, a target velocity set of the target quaternion data set, and a target acceleration set of the target quaternion data set, the target velocity set comprises velocity data of the current quaternion data and velocity data of each of the plurality of historical quaternion data, and the target acceleration set comprises acceleration data of the current quaternion data and acceleration data of each of the plurality of historical quaternion data; embedding the first quaternion matrix in a high-dimensional space to obtain a second quaternion matrix; performing position coding on the second quaternion matrix to obtain a third quaternion matrix; determining a target quaternion matrix with a dependency relationship based on the third quaternion matrix by using a network model; and obtaining a target Euler angle based on the target quaternion matrix, wherein the target Euler angle represents the pose of the optical master hand at the current time.
[0025] The following will be described through Figures 1-3 The method for determining the pose of the optical master hand according to the embodiment of the present application will be described in detail.
[0026] It should be noted that the serial numbers of the various operations in the following method are only used to represent the operations for description, and should not be regarded as representing the execution sequence of the various operations. Unless explicitly indicated, the method does not need to be executed in the order shown.
[0027] Figure 1 A flowchart of the method for determining the pose of the optical master hand according to the embodiment of the present application is schematically shown. Figure 2 An application scenario diagram of the optical master hand according to the embodiment of the present application is schematically shown. Figure 3 A side view of the optical master hand according to the embodiment of the present application is schematically shown.
[0028] As Figures 2-3As shown, an embodiment of the present invention also provides a surgical robot system. The surgical robot system includes an optical master hand 210, a surgical robot (not shown), a host computer 220, and an infrared optical master hand tracking device. The surgical robot can be located away from the host computer 220 and the optical master hand 210. The optical master hand 210 is equipped with multiple infrared reflective devices 211. These infrared reflective devices can be reflective spheres. A slave manipulator is provided on the surgical robot. The infrared reflective devices 211 can be located on optical markers on the optical master hand. When the operator operates the optical master hand 210, the infrared optical master hand tracking device can calculate the positional information between the optical markers based on the signal emitted by the transmitting device, thereby calculating the current quaternion data. The host computer 220 can determine the target Euler angle based on the current quaternion data using the aforementioned determination method, and control the slave manipulator to operate based on the target Euler angle.
[0029] In some embodiments, the optical master hand 210 is further provided with an opening and closing part. The opening and closing part is connected to the host computer 220. The operator can open or close the opening and closing part by operation. The host computer 220 controls the operation of the master hand based on the opening or closing angle of the opening and closing part.
[0030] Furthermore, the optical master hand 210 may be equipped with a microcontroller unit (MCU) connected to the host computer 220. The optical master hand 210 may also be equipped with a displacement potentiometer. The displacement potentiometer can be used to detect the opening or closing angle of the opening / closing part and transmit the data to the host computer via the first microcontroller unit. Based on the microcontroller unit, the optical master hand 210 can wirelessly communicate with the host computer 220.
[0031] like Figure 1 As shown, the method 100 for determining the posture of the optical master hand in this embodiment includes operations S110 to S170.
[0032] In operation S110, the current quaternion data of the optical master hand at the current moment is obtained.
[0033] According to embodiments of this disclosure, the current quaternion data It can be represented by the following formula (1).
[0034] (1).
[0035] in, , , and It can be a real number of quaternions, which can be obtained by an infrared optical master hand tracking device. , and It can be the imaginary unit of a quaternion. It can indicate time. It can be greater than 0.
[0036] In operation S120, the target quaternion dataset is determined based on the current quaternion data and the historical quaternion data of the optical master at multiple historical moments before the current moment.
[0037] According to embodiments of this disclosure, historical quaternion data at multiple historical moments may include , ... .in, , ... These can be the historical quaternion data at the first time step, the historical quaternion data at the second time step, and so on. Historical quaternion data for each moment. The time interval between adjacent moments can be set as needed. For example, the time interval between adjacent moments can be 0.1 seconds, 1 second, or 1 minute, that is, the time interval between the first moment and the second moment can be 0.1 seconds, 1 second, or 1 minute. , ... It can have the same expression as the above formula (1), which will not be repeated here.
[0038] According to embodiments of this disclosure, the target quaternion dataset It can be represented by the following formula (2).
[0039] q=[ q 1 , q 2 , …… , q t - 1 , q t ] (2).
[0040] In operation S130, the first quaternion matrix is determined based on the target quaternion dataset.
[0041] According to embodiments of this disclosure, the first quaternion matrix includes a target quaternion dataset, a target velocity set of the target quaternion dataset, and a target acceleration set of the target quaternion dataset. The target velocity set may include velocity data of the current quaternion dataset and velocity data of each of multiple historical quaternion datasets. The target acceleration set may include acceleration data of the current quaternion dataset and acceleration data of each of multiple historical quaternion datasets.
[0042] According to an embodiment of this disclosure, the first quaternion matrix can be represented by the following formula (3).
[0043] X 1 =[ q , q ̇ , q ̈ ] (3).
[0044] in, It can be the target velocity set. This can be a target acceleration set. This is achieved through a target quaternion dataset. By taking the derivative, the target velocity set can be obtained. By analyzing the target acceleration set By taking the derivative, we can obtain the target acceleration set. That is, each current quaternion data point corresponds to one velocity data point and one acceleration data point. Each historical quaternion data point also corresponds to one velocity data point and one acceleration data point.
[0045] In operation S140, the first quaternion matrix is embedded into a high-dimensional space to obtain the second quaternion matrix.
[0046] According to embodiments of this disclosure, a first quaternion can be input into a Transformer model. After the first quaternion is input into the Transformer model, the first quaternion matrix is embedded into a high-dimensional space to obtain a second quaternion matrix. It can be represented by the following formula (4).
[0047] (4).
[0048] in, It can be an embedding matrix, which can be updated as the Transformer model is trained. The dimension can be . The dimension can be 12. It can be a bias term for the Transformer model. and The dimension can be dimension.
[0049] In operation S150, the second quaternion matrix is positionally encoded to obtain the third quaternion matrix.
[0050] According to embodiments of this disclosure, the Transformer model can be used to positionally encode the second quaternion matrix so that the third quaternion matrix has temporal information.
[0051] In operation S160, based on the third quaternion matrix, the target quaternion matrix with the dependency relationship is determined by using the network model. According to an embodiment of the present disclosure, by adding the dependency relationship, the target quaternion matrix has both the time information and the dependency relationship.
[0052] In operation S170, based on the target quaternion matrix, the target Euler angle is obtained, which represents the pose of the optical master hand at the current time.
[0053] According to an embodiment of the present disclosure, the target quaternion data set is determined by using the current quaternion data and the historical quaternion data at the plurality of historical time points before the current time, and the first quaternion matrix is determined based on the target quaternion data set, so that the first quaternion matrix includes more abundant data and the data has a time correlation. By position coding, the time information can be injected, and by the network model, the dependency relationship can be injected, so that the target quaternion matrix has both the time information and the dependency relationship. Therefore, the target Euler angle determined based on the target quaternion matrix is more accurate, which can avoid the singular problems such as gimbal lock, dead zone, and multi-value correspondence of quaternion and Euler angle, and improve the accuracy of obtaining the pose of the optical master hand, thereby improving the accuracy of the surgery.
[0054] In some embodiments, the network model includes a GRU model and a feedforward neural network model. Operation S160 includes operations S161-S165.
[0055] In operation S161, the attention weight of the third quaternion matrix is determined.
[0056] According to an embodiment of the present disclosure, by determining the attention weight of the third quaternion matrix, the dependency relationship of the data in the third quaternion matrix can be determined.
[0057] In operation S162, the third quaternion matrix and the attention weight are first normalized to obtain a first intermediate matrix.
[0058] In operation S163, the first intermediate matrix is processed by using the feedforward neural network model to obtain a second intermediate matrix.
[0059] According to an embodiment of the present disclosure, the first intermediate matrix is processed by using the feedforward neural network model, which can perform nonlinear transformation and mapping on the data corresponding to each time point in the first intermediate matrix, so that the second intermediate matrix has better stability. In operation S164, the first intermediate matrix and the second intermediate matrix are second normalized to obtain a third intermediate matrix.
[0060] According to an embodiment of the present disclosure, by first normalization and second normalization, the accuracy of obtaining the pose of the optical master hand can be avoided due to the data characteristics.
[0061] In operation S165, the third intermediate matrix is input into the GRU model to obtain the target quaternion matrix.
[0062] According to an embodiment of the present disclosure, by inputting the third intermediate matrix into the GRU model, the dynamic characteristics and the timing information caused by adding the time information can be processed, and the long-term dependence problem between data can be reduced.
[0063] In some embodiments, operation S161 includes determining, based on the third quaternion matrix, a query tensor matrix of the third quaternion matrix, a key tensor matrix of the third quaternion matrix, and a value tensor matrix of the third quaternion matrix. Based on the query tensor matrix, the key tensor matrix, and the value tensor matrix, the attention weight of the target quaternion matrix is determined.
[0064] According to an embodiment of the present disclosure, the query tensor matrix Q of the third quaternion matrix can be determined by the following formula (5).
[0065] (5).
[0066] wherein, The weight of the query tensor matrix can be.
[0067] According to an embodiment of the present disclosure, the key tensor matrix K of the third quaternion matrix can be determined by the following formula (6).
[0068] (6).
[0069] wherein, The weight of the key tensor matrix can be.
[0070] According to an embodiment of the present disclosure, the value tensor matrix V of the third quaternion matrix can be determined by the following formula (7).
[0071] (7).
[0072] wherein, The weight of the value tensor matrix can be. 、 and The dimension of the query tensor matrix, the key tensor matrix, and the value tensor matrix can be dimensions.
[0073] According to an embodiment of the present disclosure, the attention weight A of the target quaternion matrix can be determined by the following formula (8).
[0074] (8).
[0075] wherein, denotes a transpose symbol. It can characterize the Attention mechanism.
[0076] In some embodiments, operation S150 includes: obtaining a position encoding vector corresponding to the second quaternion matrix; and adding the second quaternion matrix and the position encoding vector to obtain a third quaternion matrix.
[0077] According to embodiments of this disclosure, the position encoding vector It can be represented by the following formula (9).
[0078] (9).
[0079] in, It can be a position encoding vector The Middle The value of the dimension.
[0080] According to an embodiment of this disclosure, the third quaternion matrix can be represented by the following formula (10).
[0081] (10).
[0082] According to an embodiment of this disclosure, the first intermediate matrix It can be represented by the following formula (11).
[0083] (11).
[0084] in, It can be a layer normalization function.
[0085] According to embodiments of this disclosure, the second intermediate matrix It can be represented by the following formula (12).
[0086] (12).
[0087] in, It can be a feedforward neural network model. It can be a ReLU activation function. and It can be the weight matrix of a feedforward neural network model, and it can be continuously updated as the model is trained. and It can be a bias term.
[0088] According to embodiments of this disclosure, the third intermediate matrix It can be represented by the following formula (13).
[0089] (13).
[0090] Furthermore, the process of obtaining the third quaternion matrix from the first quaternion matrix can be implemented using the Transformer model.
[0091] In some embodiments, the GRU model may include an update gate, a reset gate, candidate hidden states, and hidden states.
[0092] According to an embodiment of this disclosure, the update gate Zt can be represented by the following formula (14).
[0093] Z t = σ ( W z [ h t - 1 , Z 3 ]+ b z ) (14).
[0094] Here, σ can represent the activation function. You can update the weights of the gates. This can be used to update the gate's bias. It can represent the first The hidden state at a given moment is the hidden state of the previous moment.
[0095] According to an embodiment of this disclosure, the door is reset. It can be represented by the following formula (15).
[0096] r t = σ ( W r [ h t - 1 , Z 3 ]+ b r ) (15).
[0097] in, You can reset the weight of the door. This can be used to reset the door's offset.
[0098] According to embodiments of this disclosure, candidate hidden state It can be represented by the following formula (16).
[0099] h ̃ t =tanh( W h [ r t h t - 1 , Z 3 ]+ b h ̃ ) (16).
[0100] wherein, may represent a hyperbolic tangent function. may be a weight of the candidate hidden state . may be a bias of the candidate hidden state .
[0101] According to an embodiment of the present disclosure, the hidden state may be represented by the following formula (17).
[0102] (17).
[0103] wherein, the output of the hidden state may be a target quaternion matrix. The GRU model can better capture the long-term dependence of data in the third intermediate matrix, and after the third intermediate matrix is processed by the GRU model, each data contains more context information, and the target quaternion matrix can more accurately reflect the change characteristics of the quaternion over time. Thus, the target quaternion matrix can include information in the first quaternion matrix and dynamic information after time series processing.
[0104] In some embodiments, the determining method can further include determining current predicted quaternion data based on the target Euler angle. Based on the current quaternion data and the current predicted quaternion data, a prediction error is estimated using a joint loss function. Based on the estimation result, the feedforward neural network model is updated. The determination of the target Euler angle can be real-time, and the current predicted quaternion data corresponds to the current quaternion data at the current moment. Further, the quaternion data at the previous moment can correspond to the predicted quaternion data at the previous moment.
[0105] According to an embodiment of the present disclosure, the target Euler angle can include a yaw angle , a pitch angle and a roll angle . The current predicted quaternion data may be represented by the following formula (18).
[0106] (18).
[0107] wherein, , , and The following formula (19) can be used to represent the first loss function.
[0108] (19).
[0109] wherein, The following formula (20) can be used to represent the second loss function.
[0110] (20).
[0111] In some embodiments, the joint loss function is constituted based on the first loss function, the second loss function, the third loss function, and the fourth loss function.
[0112] According to an embodiment of the present disclosure, the first loss function represents a function suitable for performing mean square error calculation on the prediction error. The first loss function The following formula (21) can be used to represent the first loss function.
[0113] (21).
[0114] wherein, N can be the number of samples.
[0115] According to an embodiment of the present disclosure, the second loss function represents a function suitable for performing regularization term calculation on the prediction error. By performing mean square error calculation on the prediction error, the influence of singularity can be reduced, and the second loss function The following formula (22) can be used to represent the second loss function.
[0116] (22).
[0117] wherein, The error gradient between the following formula (23) and the following formula (24) can be represented. and wherein, λ can represent a regularization weight.
[0118] According to an embodiment of the present disclosure, the third loss function represents a function suitable for performing velocity error calculation on the prediction error. By performing velocity error calculation on the prediction error, the dynamic change of the quaternion can be reflected. The third loss function The following formula (23) can be used to represent the third loss function.
[0119] (23).
[0120] According to an embodiment of the present disclosure, the fourth loss function represents a function suitable for performing acceleration error calculation on the prediction error. By performing acceleration error calculation on the prediction error, the dynamic change of the quaternion can be reflected. The fourth loss function The following formula (24) can be used to represent the fourth loss function.
[0121] (24).
[0122] According to the embodiments of the present disclosure, the joint loss function may be represented by the following formula (25).
[0123] (25).
[0124] wherein a, b, g and d can represent weight coefficients. a, b, g and d can balance the influence of each loss function.
[0125] In some embodiments, the target quaternion matrix is converted into target Euler angles by using a decoder. The decoder can be composed of a multi-layer fully connected network, and each layer can contain a self-attention mechanism to handle the dynamics and complexity of the input
[0126] Those skilled in the art can understand that the features described in various embodiments and / or claims of the present application can be combined or / and integrated, even if such combination or integration is not explicitly described in the present application. In particular, the features described in various embodiments and / or claims of the present application can be combined and / or integrated in various combinations, without departing from the spirit and teachings of the present application. All these combinations and / or integrations fall within the scope of the present application.
[0127] The embodiments of the present application are described above. However, these embodiments are only for illustrative purposes, and are not intended to limit the scope of the present application. Although each embodiment is described above separately, this does not mean that the measures in each embodiment cannot be used advantageously in combination. The scope of the present application is defined by the appended claims and their equivalents. Without departing from the scope of the present application, those skilled in the art can make various substitutions and modifications, which all fall within the scope of the present application.
Claims
1. A method for determining the posture of an optical master hand, characterized in that, include: Obtain the current quaternion data of the optical master hand at the current moment; Based on the current quaternion data and the historical quaternion data of the optical master hand at multiple historical moments before the current moment, the target quaternion dataset is determined. Based on the target quaternion dataset, a first quaternion matrix is determined, wherein the first quaternion matrix includes the target quaternion dataset, the target velocity set of the target quaternion dataset, and the target acceleration set of the target quaternion dataset. The target velocity set includes the velocity data of the current quaternion data and the velocity data of each of multiple historical quaternion data. The target acceleration set includes the acceleration data of the current quaternion data and the acceleration data of each of multiple historical quaternion data. After inputting the first quaternion matrix into the Transformer model, the first quaternion matrix is embedded into a high-dimensional space to obtain the second quaternion matrix; The third quaternion matrix is obtained by using the Transformer model to perform positional encoding on the second quaternion matrix; Based on the aforementioned third quaternion matrix, a network model is used to determine the target quaternion matrix with dependencies; and Based on the target quaternion matrix, the target Euler angles are obtained, which represent the attitude of the optical master hand at the current moment. The network model includes a GRU model and a feedforward neural network model. The step of determining the target quaternion matrix based on the third quaternion matrix using the network model includes: Determine the attention weights of the third quaternion matrix; The third quaternion matrix and the attention weights are normalized for the first time to obtain the first intermediate matrix; The first intermediate matrix is processed using a feedforward neural network model to obtain the second intermediate matrix; A second normalization is performed on the first and second intermediate matrices to obtain the third intermediate matrix; and The third intermediate matrix is input into the GRU model to obtain the target quaternion matrix.
2. The determination method according to claim 1, characterized in that, Determining the attention weights of the third quaternion matrix includes: Based on the third quaternion matrix, determine the query tensor matrix of the third quaternion matrix, the key tensor matrix of the third quaternion matrix, and the value tensor matrix of the third quaternion matrix; and The attention weights of the target quaternion matrix are determined based on the query tensor matrix, the key tensor matrix, and the value tensor matrix.
3. The determination method according to claim 1, characterized in that, The step of performing positional encoding on the second quaternion matrix to obtain the third quaternion matrix includes: Obtain the position encoding vector corresponding to the second quaternion matrix; and The second quaternion matrix is added to the position encoding vector to obtain the third quaternion matrix.
4. The determination method according to claim 1, characterized in that, Also includes; Based on the target Euler angles, determine the current predicted quaternion data; Based on the current quaternion data and the current predicted quaternion data, the prediction error is estimated using a joint loss function; as well as Based on the estimation results, the feedforward neural network model is updated.
5. The determination method according to claim 4, characterized in that, The joint loss function is constructed based on the first loss function, the second loss function, the third loss function, and the fourth loss function; Wherein, the first loss function is a function applicable to calculating the mean square error of the prediction error; The second loss function characterizes a function applicable to the calculation of a regularization term for the prediction error; The third loss function characterizes a function applicable to calculating the velocity error of the prediction error; and The fourth loss function is a function applicable to calculating the acceleration error of the prediction error.
6. The determination method according to claim 1, characterized in that, The target Euler angles include yaw angle, pitch angle, and roll angle.
7. The determination method according to claim 1, characterized in that, The target quaternion matrix is converted into target Euler angles using a decoder.
8. A surgical robot system, comprising: The optical main hand is equipped with multiple infrared reflective devices; Surgical robots are equipped with operating hands; An infrared optical master hand tracking device is configured to calculate the current quaternion data based on the signal emitted by the infrared reflector when the operator operates the optical master hand; as well as The host computer is configured to determine the target Euler angle based on the current quaternion data using the determination method described in any one of claims 1 to 7, and to control the slave operator to work based on the target Euler angle.
9. The surgical robot system according to claim 8, characterized in that, The optical master hand is also provided with an opening and closing part, which is connected to the host computer. The operator opens or closes the opening and closing part by operation, and the host computer controls the operation of the slave hand based on the opening or closing angle of the opening and closing part.
Citation Information
Patent Citations
Neural network model training method based on self-attention mechanism
CN113516232A
Hand-eye calibration method of surgical robot based on optical positioning system
CN114343847A