Automatic control method of automatic mirror lifting frame for laparoscopic surgery

By acquiring device identification and support vector machine algorithms, combined with inverse kinematics algorithms, precise control of the automatic traction frame for laparoscopic surgery was achieved, solving the problem of difficulty in distinguishing the needs of different operators and improving surgical efficiency and surgical field stability.

CN123023830APending Publication Date: 2026-11-03THE SEVENTH MEDICAL CENTER OF PLA GENERAL HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611215355.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-12
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing automatic traction frames for laparoscopic surgery are unable to distinguish the control needs of different operators, causing the scope to deviate from the surgical field or affecting surgical efficiency. They also lack effective differentiation of the amplitude characteristics of motion commands, making it difficult to achieve precise and stable field of view adjustment.

Method used

By acquiring the device identification of the control equipment, determining the operator's role using an identity mapping table, and combining support vector machine algorithm and inverse kinematics algorithm, the motion type and precision constraints of different operators are distinguished, and dynamic response amplitude control signals are generated to achieve precise control of the traction frame for the eyepiece.

Benefits of technology

It improves the efficiency of multi-operator collaborative control and surgical field stability during laparoscopic surgery, reduces the risk of the scope deviating from the surgical field, and enhances the stability and safety of control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123023830A_ABST
    Figure CN123023830A_ABST
Patent Text Reader

Abstract

The application discloses an automatic control method of an automatic mirror holding and pulling frame for laparoscopic surgery, and relates to the technical field of automatic control of medical devices, which comprises the following steps: obtaining the device identity of an access control device, matching the device identity through a pre-established identity mapping table, determining the operator role corresponding to the control device, obtaining the corresponding initial movement amplitude limit range from a pre-set authority allocation library according to the operator role, and obtaining the operation precision constraint condition corresponding to the control device; the automatic control method of the automatic mirror holding and pulling frame for laparoscopic surgery improves the stability, accuracy and safety of the motion control of the mirror holding and pulling frame, and further improves the efficiency of multi-operator collaborative control and the stability of the operation field in the laparoscopic surgery process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automatic control technology for medical devices, specifically to an automatic control method for an automatic traction frame for laparoscopic surgery. Background Technology

[0002] Laparoscopic surgery is an important surgical procedure in modern minimally invasive surgery, which typically requires the use of a laparoscope to image and observe the surgical area inside the patient's body. During the operation, the position, angle, and advance / retreat distance of the laparoscope directly affect the stability and clarity of the surgical field. To reduce fatigue and tremors caused by manually holding the laparoscope, automated traction frames for laparoscopic surgery are increasingly being used to assist in supporting the laparoscope. These frames use robotic arms or traction mechanisms to move the laparoscope, perform displacement, deflection, or advance / retreat operations, and meet the needs of adjusting the surgical field.

[0003] Existing automated traction frames for laparoscopic surgery are typically equipped with a console, foot pedals, handles, or other control devices. The operator sends motion commands to the system via these devices, and the system then drives the robotic arm of the traction frame to change the laparoscope's observation position. Since laparoscopic surgery is usually performed collaboratively by the surgeon, assistants, and other medical staff, different operators have varying needs regarding the range of laparoscope displacement and control precision during the procedure. For example, the surgeon typically requires a larger range of motion and a faster response when switching surgical areas or re-establishing the field of view; while the assistant, when assisting with adjustments, usually only needs to make minor corrections near the current surgical field to maintain visual stability. However, existing automated traction frames often employ a uniform motion response mode, meaning that motion commands from different control devices are executed with the same range of motion, response speed, or control authority. This method makes it difficult to distinguish the operator role corresponding to the control device and to configure appropriate precision constraints based on the actual operational needs of different operators. When an assistant makes fine adjustments using foot pedals or auxiliary control devices, if the system still drives the traction frame with a large response amplitude, it can easily cause the laparoscope to deviate from the original surgical field, affecting the surgeon's continuous operation. Conversely, if the system uniformly reduces the motion response amplitude to avoid misoperation, it limits the surgeon's efficiency in quickly adjusting the laparoscope's observation position. Furthermore, existing control methods often lack effective differentiation of the amplitude characteristics of motion commands, failing to determine whether a motion command represents a fine adjustment or a large-amplitude field-of-view switch. Therefore, under the same control logic, small-amplitude fine-tuning commands and large-amplitude displacement commands may be executed with similar response strategies, making it difficult to coordinate the control precision and motion amplitude of the traction frame. Especially in laparoscopic surgery, even a slight deviation of the scope can cause a change in the center of the surgical field, while excessive displacement can affect the spatial relationship between surgical instruments and tissues. Therefore, differentiated control of different motion amplitudes is of great significance. Summary of the Invention

[0004] The purpose of this invention is to provide an automatic control method for an automatic traction frame for laparoscopic surgery, thereby solving the problems existing in the prior art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: an automatic control method for an automatic traction frame for laparoscopic surgery, comprising: S1, acquiring the device identity identifier of the access control device, matching the device identity identifier with a pre-established identity mapping table to determine the operator role corresponding to the control device; S2, based on the operator role, acquiring the corresponding initial movement range limit from a preset permission allocation library to obtain the operation precision constraint condition corresponding to the control device; S3, acquiring the initial motion command sent by the control device, classifying the displacement vectors contained in the initial motion command using a support vector machine algorithm, and comparing the magnitude of the displacement vector with a preset displacement threshold; S4, if the magnitude of the displacement vector is greater than the preset displacement threshold, then determining the operation precision constraint condition. S5. If the permission determination result is that the device contains movement permissions exceeding the preset displacement threshold, then a first response amplitude control signal is generated based on the initial motion command to obtain a first traction frame drive command; S6. If the magnitude of the displacement vector is not greater than the preset displacement threshold, or the permission determination result is that the device does not contain movement permissions exceeding the preset displacement threshold, then the displacement vector of the initial motion command is scaled using a preset fine-tuning mapping function to obtain a second response amplitude control signal to obtain a second traction frame drive command; S7. The first traction frame drive command or the second traction frame drive command is analyzed using an inverse kinematics algorithm to obtain an automatic traction frame robotic arm joint angle control sequence.

[0006] Preferably, step S1 includes extracting the initial device identifier carried in the access request, calculating a composite device fingerprint based on the initial device identifier; matching the composite device fingerprint with an identity mapping table to obtain an initial role label bound to the composite device fingerprint; detecting the record corresponding to the initial role label to obtain a trust score; if the trust score is lower than a preset threshold, downgrading the initial role label to obtain a restricted role label; and determining the operator role corresponding to the control device based on the restricted role label parsing instruction.

[0007] Preferably, step S2 includes obtaining the operator role, matching the operator role with the permission allocation library to obtain an initial movement range limit; generating a basic motion vector based on the initial movement range limit; determining whether the magnitude of the basic motion vector is greater than a preset displacement threshold; if the magnitude of the basic motion vector is greater than the preset displacement threshold, truncating it to obtain a target motion vector; and determining the operation accuracy constraints corresponding to the control device based on the target motion vector.

[0008] Preferably, step S3 includes acquiring an initial motion command sent by a control device, parsing the initial motion command to obtain an initial displacement vector, acquiring an initial vector magnitude value based on the initial displacement vector, mapping the initial displacement vector to obtain a target feature vector if the initial vector magnitude value is greater than a preset displacement threshold, classifying the target feature vector using a support vector machine algorithm to obtain a target motion trajectory category, and determining the motion type corresponding to the initial motion command based on the target motion trajectory category.

[0009] Preferably, step S4 includes obtaining the displacement vector corresponding to the motion type, and extracting the operation precision associated with the motion type when the magnitude of the displacement vector is greater than a preset displacement threshold; parsing the corresponding constraint conditions and extracting the constraint boundaries according to the operation precision; comparing and classifying the constraint boundaries with the preset displacement threshold to obtain boundary risk features, and determining the movement permission according to the boundary risk features; if the movement permission contains a permission matching degree exceeding the preset displacement threshold, then generating a permission determination result for the operation precision constraint conditions.

[0010] Preferably, step S5 includes: if the permission determination result contains a movement permission exceeding a preset displacement threshold, then extracting a motion trajectory vector based on the initial motion command; determining a first response amplitude by matching the motion trajectory vector with an amplitude mapping matrix, wherein the first response amplitude is used to generate a first response amplitude control signal; and adjusting the traction frame posture using the first response amplitude control signal to obtain a first traction frame drive command for the mirror.

[0011] Preferably, step S6 includes extracting a displacement vector from the acquired initial motion command and calculating the magnitude of the displacement vector; if the magnitude of the displacement vector is not greater than a preset displacement threshold or the permission determination result is that it does not contain movement permissions exceeding the preset displacement threshold, then a micro-motion feature matrix is ​​extracted based on the displacement vector; the micro-motion feature matrix is ​​used to call a fine-tuning mapping function to obtain scaled displacement data, the scaled displacement data being generated by scaling the displacement vector using the fine-tuning mapping function; a second response amplitude control signal is generated based on the scaled displacement data, the second response amplitude control signal being used to adjust the traction frame attitude to obtain a second traction frame drive command for the traction frame.

[0012] Preferably, step S7 includes acquiring a first or second traction frame drive command; parsing the first or second traction frame drive command using a coordinate system transformation algorithm to obtain the target spatial pose; and extracting the target coordinates and rotation matrix corresponding to the target spatial pose; performing algebraic elimination calculations on the target coordinates and rotation matrix using an inverse kinematics algorithm to obtain initial joint variables; if the initial joint variables are in a singular configuration, performing a cubic spline interpolation algorithm to smooth the initial joint variables and obtain the target joint variables; and discretizing and interpolating the target joint variables to obtain the joint angle control sequence of the automatic traction frame robotic arm.

[0013] Preferably, the method further includes S8: based on the joint angle control sequence of the automated traction frame robotic arm, and according to the operator's role and operational precision constraints, performing graded amplitude limiting reconstruction on each joint angle increment, controlling the automated traction frame for laparoscopic surgery to drive the laparoscope to perform corresponding displacement operations, and obtaining dynamic response amplitude adjustment results based on device identity. Specifically, this includes acquiring and parsing the joint angle control sequence of the automated traction frame robotic arm to obtain an initial set of joint angle increments; determining the graded amplitude limiting threshold matrix corresponding to the initial set of joint angle increments according to operational precision constraints; and reconstructing the initial set of joint angle increments and the graded amplitude limiting threshold matrix to obtain a reconstructed joint angle increment sequence.

[0014] Preferably, step S8 further includes filtering the reconstructed joint angle increment sequence to obtain a target joint angle increment sequence; controlling the automatic mirror traction frame to perform displacement operation according to the target joint angle increment sequence to obtain a dynamic response amplitude adjustment result based on device identity.

[0015] As can be seen from the above technical solution, the present invention has the following beneficial effects: The automatic control method for the laparoscopic surgery traction frame involves acquiring the device identification of the connected control device and determining the corresponding operator role based on an identification mapping table. This allows the traction frame to distinguish the source of operation from different control devices. By matching operation precision constraints according to the operator role and combining the support vector machine algorithm with the comparison results of the displacement vector magnitude and preset displacement threshold, the system determines the motion type, enabling it to associate operator permissions, motion amplitude, and control precision. When the motion command exceeds the preset displacement threshold and the corresponding movement permission is granted, the traction frame is allowed to perform a displacement operation with a larger response amplitude to meet the requirements. To meet the surgeon's need for rapid switching of observation fields, when the motion command does not exceed the preset displacement threshold or the corresponding movement permission is not available, the displacement vector is scaled by fine-tuning the mapping function, limiting the auxiliary operation to a smaller response range, thereby reducing the risk of the laparoscopy deviating from the surgical field due to assistant misoperation; at the same time, the joint angle control sequence of the robotic arm is generated by the inverse kinematics algorithm, and the increment of each joint angle is reconstructed by graded limiting according to the operator's role, motion type and operation accuracy constraints, which improves the stability, accuracy and safety of the motion control of the traction frame, thereby improving the efficiency of multi-operator collaborative control and the stability of the surgical field during laparoscopic surgery. Attached Figure Description

[0016] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a system diagram of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] like Figure 1 and Figure 2 As shown, the present invention provides a technical solution: an automatic control method for an automatic traction frame for laparoscopic surgery, comprising: S1. Obtain the device identity identifier of the access control device, and match the device identity identifier with a pre-established identity mapping table to determine the operator role corresponding to the control device; S2. Based on the operator's role, obtain the corresponding initial movement range limit from the preset permission allocation library to obtain the corresponding operation accuracy constraints of the control device. S3. Obtain the initial motion command sent by the control device, use the support vector machine algorithm to classify the displacement vectors contained in the initial motion command, and compare the magnitude of the displacement vector with the preset displacement threshold. S4. If the magnitude of the displacement vector is greater than the preset displacement threshold, determine whether the operation precision constraint includes movement permissions exceeding the preset displacement threshold, and obtain the permission determination result. S5. If the permission determination result is that the permission exceeds the preset displacement threshold, then generate the first response amplitude control signal according to the initial motion command and obtain the first mirror traction frame drive command. S6. If the magnitude of the displacement vector is not greater than the preset displacement threshold, or the permission determination result is that it does not contain movement permissions exceeding the preset displacement threshold, then the displacement vector of the initial motion command is scaled by the preset fine-tuning mapping function to obtain the second response amplitude control signal and obtain the second traction frame drive command. S7. The inverse kinematics algorithm is used to analyze the first or second traction frame drive command to obtain the joint angle control sequence of the automatic traction frame robotic arm. S8. Based on the joint angle control sequence of the robotic arm of the automatic traction frame, the incremental angle of each joint is reconstructed in a graded and limited manner according to the operator's role and operation accuracy constraints. The automatic traction frame for laparoscopic surgery is controlled to drive the laparoscope to perform the corresponding displacement operation, and the dynamic response amplitude adjustment result based on the device identity is obtained.

[0019] In the above embodiments, the automatic traction frame for laparoscopic surgery includes a controller, a control device, a robotic arm, a joint actuator, a joint encoder, and a laparoscope clamping mechanism; the control device is communicatively connected to the controller, the controller is communicatively connected to the joint actuator, the joint actuator is connected to each joint of the robotic arm, and the laparoscope clamping mechanism is installed at the end of the robotic arm and clamps the laparoscope; the controller performs identity recognition, permission determination, instruction processing, inverse kinematics solution, joint angle limiting, and drive command output in a control cycle of 20 milliseconds.

[0020] Each control device is configured with a 128-bit device identity identifier. After the control device is connected to the controller, it first sends its device identity identifier to the controller. The controller then compares the received device identity identifier with the device identity identifiers recorded in the identity mapping table one by one.

[0021] The identity mapping table records the device identity identifier, operator role, authorization status, and authorization expiration time. Operator roles are divided into chief surgeon, surgical assistant, and training operator. When the device identity identifier matches, the authorization status is valid, and the current time has not exceeded the authorization expiration time, the controller reads the operator role corresponding to the device identity identifier. When the device identity identifier does not match, the authorization status is invalid, or the current time has exceeded the authorization expiration time, the controller sets the displacement sent by the controlled device to 0 and does not output motion commands to the robotic arm.

[0022] After completing the operator role identification, the controller uses the operator role as the search condition to read the corresponding movement range limit, movement permission exceeding the preset displacement threshold, and the upper limit of joint angle increment for a single control cycle from the permission allocation library.

[0023] In this embodiment, the surgeon's single movement range is 0 mm to 10 mm, with a movement authority exceeding 5 mm, and the upper limit of the angle increment of each rotation joint within one control cycle is 0.5 degrees; the surgical assistant's single movement range is 0 mm to 5 mm, with no movement authority exceeding 5 mm, and the upper limit of the angle increment of each rotation joint within one control cycle is 0.25 degrees; the training operator's single movement range is 0 mm to 22 mm, with no movement authority exceeding 5 mm, and the upper limit of the angle increment of each rotation joint within one control cycle is 0.1 degrees.

[0024] The control device generates initial motion commands based on the operator's input. The initial motion commands include lateral displacement components, longitudinal displacement components, vertical displacement components, command sequence number, and sending time. The lateral displacement component represents the distance the laparoscope tip moves along the lateral coordinate axis, the longitudinal displacement component represents the distance the laparoscope tip moves along the longitudinal coordinate axis, and the vertical displacement component represents the distance the laparoscope tip moves along the vertical coordinate axis.

[0025] After receiving the initial motion command, the controller calculates the magnitude of the displacement vector. The specific calculation process is as follows: calculate the squares of the lateral displacement component, the longitudinal displacement component, and the vertical displacement component respectively, add the three squared values ​​together, and then perform a square root operation on the sum to obtain the magnitude of the displacement vector.

[0026] When the magnitude of the displacement vector is 0, the controller interprets the initial motion command as a stop command and maintains the target angles of each joint of the robotic arm at the current angles; when the magnitude of the displacement vector is not 0, the controller extracts the input features required for motion direction classification.

[0027] The input features include lateral direction features, longitudinal direction features, vertical direction features, and amplitude features. The lateral direction features are obtained by dividing the lateral displacement component by the magnitude of the displacement vector. The longitudinal direction features are obtained by dividing the longitudinal displacement component by the magnitude of the displacement vector. The vertical direction features are obtained by dividing the vertical displacement component by the magnitude of the displacement vector. The amplitude features are obtained by dividing the magnitude of the displacement vector by 5 millimeters.

[0028] The controller inputs the above four input features into the pre-trained support vector machine classification model. The support vector machine classification model uses a Gaussian radial basis kernel, with a penalty parameter set to 10 and a kernel parameter set to 0.5, and adopts a one-to-one classification method.

[0029] The support vector machine classification model outputs one of seven categories: left shift, right shift, forward shift, backward shift, up shift, down shift, and stop. When the classification result is left shift, the controller sets the target's motion direction to the negative direction of the horizontal coordinate axis; when the classification result is right shift, the target's motion direction is set to the positive direction of the horizontal coordinate axis; when the classification result is forward shift, the target's motion direction is set to the positive direction of the vertical coordinate axis; when the classification result is backward shift, the target's motion direction is set to the negative direction of the vertical coordinate axis; when the classification result is up shift, the target's motion direction is set to the positive direction of the vertical coordinate axis; when the classification result is down shift, the target's motion direction is set to the negative direction of the vertical coordinate axis; when the classification result is stop, the target displacement is set to 0.

[0030] After classifying the motion direction, the controller compares the magnitude of the displacement vector with 5 millimeters.

[0031] When the magnitude of the displacement vector exceeds 5 mm, the controller reads the movement permission corresponding to the current operator role; if the current operator role has a movement permission of more than 5 mm, the permission determination result is that the displacement operation exceeding 5 mm is allowed; if the current operator role does not have a movement permission of more than 5 mm, the permission determination result is that the displacement operation exceeding 5 mm is prohibited.

[0032] When the magnitude of the displacement vector exceeds 5 mm, and the authorization decision indicates that a displacement operation exceeding 5 mm is permitted, the controller generates a first response amplitude control signal.

[0033] When generating the first response amplitude control signal, the controller first compares the magnitude of the displacement vector with the upper limit of the single movement amplitude corresponding to the current operator role; when the magnitude of the displacement vector does not exceed the upper limit of the single movement amplitude, the controller retains the three directional displacement components in the initial motion command; when the magnitude of the displacement vector exceeds the upper limit of the single movement amplitude, the controller divides the upper limit of the single movement amplitude by the magnitude of the displacement vector to obtain the displacement scaling ratio, and then multiplies the lateral displacement component, longitudinal displacement component and vertical displacement component by the displacement scaling ratio respectively.

[0034] The three displacement components after scaling retain their original positive and negative directions, and the magnitude of the scaled displacement vector is equal to the upper limit of the single movement range corresponding to the current operator role.

[0035] The controller sets the motion speed of the first response amplitude control signal to 8 millimeters per second and the motion acceleration to 20 millimeters per square second. It then encapsulates the processed displacement components in three directions, the motion direction classification result, the motion speed, and the motion acceleration into a first traction frame drive command.

[0036] When the magnitude of the displacement vector is greater than 0 and does not exceed 5 mm, the controller performs fine-tuning mapping processing; when the magnitude of the displacement vector exceeds 5 mm, but the permission judgment result prohibits the execution of displacement operations exceeding 5 mm, the controller also performs fine-tuning mapping processing.

[0037] In this embodiment, the displacement dead zone is set to 0.1 mm. When the magnitude of the displacement vector does not exceed 0.1 mm, the controller sets the response displacement in all three directions to 0 to eliminate the motion command generated by the zero-point offset of the control device.

[0038] When the magnitude of the displacement vector exceeds 0.1 mm but does not exceed 5 mm, the controller calculates the scaled displacement magnitude according to the following process: First, subtract 0.1 mm from the displacement vector magnitude; then, divide the result by 4.9 mm; then, raise the result to the power of 1.5; subsequently, multiply the result by 5 mm; finally, multiply the result by the scaling factor corresponding to the current operator role to obtain the scaled displacement magnitude.

[0039] The scaling factor for the lead surgeon is set to 1, the scaling factor for the surgical assistant is set to 0.6, and the scaling factor for the trainee operator is set to 0.3.

[0040] When the magnitude of the displacement vector exceeds 5 mm, and the current operator role does not have a movement permission exceeding 5 mm, the controller compares the maximum single movement range corresponding to the current operator role with 5 mm, and determines the smaller of the two values ​​as the scaled displacement magnitude. The surgeon, who has a movement permission exceeding 5 mm, does not enter this process. The scaled displacement magnitude for the surgical assistant is 5 mm, and for the training operator, it is 2 mm.

[0041] After determining the scaled displacement magnitude, the controller divides the scaled displacement magnitude by the initial displacement vector magnitude to obtain the fine-tuning scaling ratio. The controller then multiplies the lateral displacement component, longitudinal displacement component, and vertical displacement component in the initial motion command by the fine-tuning scaling ratio to obtain the second response displacement components in the three directions.

[0042] The second response displacement component has the same positive and negative directions as the corresponding displacement component in the initial motion command, and the magnitude of the displacement vector composed of the three second response displacement components is equal to the scaled displacement magnitude.

[0043] The controller sets the motion speed of the second response amplitude control signal to 2 millimeters per second and the motion acceleration to 5 millimeters per square second. It also encapsulates the three second response displacement components, motion direction classification results, motion speed and motion acceleration into a second traction frame drive command.

[0044] After the controller receives the first or second laparoscopic traction frame drive command, it sets the lateral displacement component, longitudinal displacement component and vertical displacement component in the drive command as the target position increment of the end of the laparoscopic clamping mechanism; in this embodiment, the three attitude angles of the end of the laparoscopic clamping mechanism remain unchanged when performing the displacement operation.

[0045] The controller reads the current angle of each joint of the robotic arm and calculates the current position and attitude of the end of the laparoscopic clamping mechanism based on the length of each link of the robotic arm, the positional relationship between adjacent joints and the rotation axis direction of each joint.

[0046] The controller calculates the Jacobian matrix based on the current joint angles of the robotic arm. The Jacobian matrix represents the change in the end effector of the laparoscopic gripper in three positional and three orientation directions when each joint angle changes by one unit.

[0047] This embodiment uses the damped least squares inverse kinematics algorithm; the controller first multiplies the Jacobian matrix with its transpose matrix, and then adds a damping correction at the diagonal position of the multiplication result; the damping coefficient is set to 0.05, and the damping correction is obtained by squaring the damping coefficient.

[0048] The controller inverts the matrix after adding the damping correction, and then multiplies it sequentially with the transpose of the Jacobian matrix and the end-target pose increment to obtain the angle increment that each joint of the robotic arm needs to execute in the current control cycle.

[0049] The controller adds the corresponding joint angle increment to the current angle of each joint to obtain the target joint angle for the next control cycle. The controller repeatedly executes the inverse kinematics solution in a control cycle of 20 milliseconds to form a robotic arm joint angle control sequence composed of the target joint angles of each control cycle arranged in sequence.

[0050] After obtaining the joint angle control sequence of the robotic arm, the controller performs amplitude limiting reconstruction on the angle increment of each rotating joint according to the upper limit of the joint angle increment corresponding to the operator role.

[0051] When the surgeon operates the control device, if the absolute value of the angle increment of any rotating joint exceeds 0.5 degrees within a control cycle, the controller sets the absolute value of the angle increment of that joint to 0.5 degrees and maintains the original rotation direction of that angle increment.

[0052] When the surgical assistant operates the control device, if the absolute value of the angle increment of any rotating joint exceeds 0.25 degrees within a control cycle, the controller sets the absolute value of the angle increment of that joint to 0.25 degrees and maintains the original rotation direction of that angle increment.

[0053] When training operators to operate the control equipment, if the absolute value of the angle increment of any rotating joint exceeds 0.1 degrees within a control cycle, the controller sets the absolute value of the angle increment of that joint to 0.1 degrees and maintains the original rotation direction of that angle increment.

[0054] After the joint angle increment limit is completed, the controller compares the target angle of each joint with the allowable angle range of that joint; when the target angle is within the allowable angle range, the target angle is retained; when the target angle exceeds the upper limit of the allowable angle, the target angle is set to the upper limit of the allowable angle; when the target angle is less than the lower limit of the allowable angle, the target angle is set to the lower limit of the allowable angle.

[0055] The controller sends the robotic arm joint angle control sequence, after completing the angle increment limit and angle range limit, to each joint driver; the joint driver drives the corresponding joint to rotate according to a control cycle of 20 milliseconds, so that the laparoscopic clamping mechanism can drive the laparoscopic to perform the target displacement operation.

[0056] At the end of each control cycle, the joint encoder collects the actual angle of each joint and sends the actual angle to the controller; the controller uses the received actual joint angle as the current joint angle for the next control cycle and performs inverse kinematics solution and joint angle limiting reconstruction again.

[0057] In a specific operation, the control device issues an initial motion command to move 6 mm along the positive direction of the horizontal coordinate axis. The longitudinal displacement component and the vertical displacement component are both 0 mm, and the magnitude of the displacement vector is 6 mm.

[0058] When the operator role corresponding to the control device is the chief surgeon, the chief surgeon has a movement permission of more than 5 mm, and 6 mm does not exceed the single movement range limit of 10 mm. Therefore, the first response displacement is a movement of 6 mm along the positive direction of the horizontal coordinate axis.

[0059] When the operator role corresponding to the control device is a surgical assistant, the surgical assistant does not have a movement permission of more than 5 mm. Therefore, the controller limits the second response displacement to 5 mm along the positive direction of the lateral coordinate axis.

[0060] When the operator role corresponding to the control device is a training operator, the training operator does not have a movement permission of more than 5 mm. Therefore, the controller limits the second response displacement to 2 mm along the positive direction of the lateral coordinate axis.

[0061] Through the above process, the controller determines the operator's role based on the device identification, and performs amplitude processing and joint control on the initial motion command according to the operator's role, based on the upper limit of single movement amplitude, the movement permission of more than 5 mm, and the upper limit of joint angle increment, so as to realize dynamic response amplitude adjustment based on device identity.

[0062] The controller is the core control unit of the automatic traction frame. It is used to receive the device identification and initial motion commands sent by the control device, and to complete the identification, permission allocation, motion command analysis, response amplitude determination, inverse kinematics solution and joint drive control.

[0063] The controller includes a processor, memory, a communication interface, and a joint drive interface. The processor performs identity matching, permission determination, displacement calculation, motion trajectory classification, coordinate transformation, inverse kinematics, joint angle limiting, and filtering. The memory stores the identity mapping table, permission allocation library, support vector machine classification model, amplitude mapping matrix, fine-tuning mapping parameters, robotic arm structural parameters, and joint angle ranges. The communication interface establishes data connections with handheld controllers, foot controllers, or other control devices. The joint drive interface sends the target joint angle to the joint actuator 310.

[0064] S1 includes extracting the initial device identifier carried in the access request, calculating the composite device fingerprint based on the initial device identifier; matching the composite device fingerprint with an identity mapping table to obtain the initial role label bound to the composite device fingerprint; detecting the record corresponding to the initial role label to obtain a trust score; if the trust score is lower than a preset threshold, downgrading the initial role label to obtain a restricted role label; and determining the operator role corresponding to the control device based on the restricted role label parsing instruction.

[0065] In the above embodiment, the control device sends an access request to the controller of the automatic traction frame. The access request carries the hardware serial number, security chip identifier, communication module physical address, device certificate serial number, device integrity check value, access time, and operating room number. The controller reads the above data sequentially from the corresponding fields of the access request and uses the reading result as the initial device identifier.

[0066] The controller performs format standardization on the initial device identifiers. Specifically, it removes separators from the hardware serial number, security chip identifier, communication module physical address, and device certificate serial number, converts all alphanumeric characters to uppercase, and arranges them in the order of hardware serial number, security chip identifier, communication module physical address, and device certificate serial number. Each identifier is validated according to a preset field length; if the field length does not conform to the device registration record, the controller terminates the access and does not generate a composite device fingerprint.

[0067] After the field length verification passes, the controller adds a fixed separator character between two adjacent identifiers and appends the verification data written to the secure storage area during the device registration phase to the end of the sorted result. The controller performs a first 256-bit secure hash operation on all the concatenated data, then reconcatenates the 256-bit data obtained from the first operation with the verification data and performs a second 256-bit secure hash operation. The 256-bit data obtained from the second operation is the composite device fingerprint. When the initial device identifiers and verification data of the same control device remain unchanged, the two hash operations yield the same composite device fingerprint; if any initial device identifier changes, the result of the reoperation will be inconsistent with the original composite device fingerprint.

[0068] The identity mapping table is stored in the controller's non-volatile memory. Each record includes a composite device fingerprint, initial role label, authorization status, authorization start time, authorization end time, bound operating room number, device certificate public key, device integrity baseline value, and authentication failure record. The initial role label is divided into surgeon, surgical assistant, and training operator.

[0069] The controller uses the currently generated composite device fingerprint as the search condition and performs a bit-by-bit matching of the composite device fingerprint field in the identity mapping table. If all 256 bits of data match, the match is considered successful, and the initial role tag bound to that record is read. If no completely matching record exists in the identity mapping table, the controller refuses access. If two or more identical records appear in the identity mapping table, the controller marks the corresponding record as a configuration conflict, refuses access, and generates an abnormal record. Therefore, the controller only enters the trust score calculation process when a single matching record is obtained.

[0070] After obtaining the initial role tag, the controller checks the authorization information, certificate information, device integrity information, usage location, access time, and authentication records of the record containing the initial role tag. In this embodiment, the initial trust score is set to 100 points, and each detection item is calculated according to a preset deduction value.

[0071] When the authorization status is invalid, the trust score is directly recorded as 0. When the current time is earlier than the authorization start time or later than the authorization end time, the trust score is directly recorded as 0. The controller uses the device certificate public key stored in the identity mapping table to verify the digital signature in the access request; if the signature verification fails, the trust score is directly recorded as 0. All three of the above are necessary conditions for the establishment of access identity; if any one of them is not met, subsequent score deduction calculations will not be performed.

[0072] After the authorization status, authorization time, and digital signature all pass the checks, the controller continues to calculate the deduction values ​​for other detection items. 40 points are deducted if the device integrity verification value in the access request is inconsistent with the device integrity baseline value in the identity mapping table; 25 points are deducted if the operating room number in the access request is inconsistent with the bound operating room number; 20 points are deducted if the access time in the access request differs from the controller's current time by more than 3 seconds; and 20 points are deducted if the same composite device fingerprint experiences 3 authentication failures within 60 seconds.

[0073] The trust score is calculated as follows: starting with 100 points, the deductions for each detection item are subtracted sequentially. When the accumulated deductions reach or exceed 100 points, the trust score is recorded as 0 points, and negative numbers will no longer occur. The trust score is 100 points when the device integrity, operating room number, access time, and authentication records all match the information recorded in the identity mapping table.

[0074] In this embodiment, the trust score threshold is set to 80 points. This threshold is determined based on the risk level of each abnormal item. If the access time deviation exceeds 3 seconds or three authentication failures occur within 60 seconds, 20 points are deducted, resulting in a trust score of 80 points, and role downgrading is not triggered. If the operating room number is inconsistent, 25 points are deducted, resulting in a trust score of 75 points, triggering role downgrading. If the device integrity verification value is inconsistent, 40 points are deducted, resulting in a trust score of 60 points, triggering role downgrading. Therefore, 80 points is used to distinguish between time or verification record anomalies where the initial role tag can be retained and location or integrity anomalies that require restricted operation permissions.

[0075] When the trust score reaches 80 points, the controller retains the initial role label bound to the composite device fingerprint. When the trust score is less than 80 points, the controller generates a restricted role label according to a pre-stored role degradation table. If the initial role label is "Surgeon," the restricted role label is determined to be "Surgical Assistant"; if the initial role label is "Surgical Assistant," the restricted role label is determined to be "Training Operator"; if the initial role label is "Training Operator," the restricted role label is determined to be "Restricted Training Operator."

[0076] The maximum single movement range for operators under restricted training is set to 1 mm, with no movement exceeding 5 mm. The maximum angle increment for any rotating joint within a single control cycle is set to 0.05 degrees. This role is only allowed to send displacement, stop, and reset commands; it is not permitted to send permission modification commands, parameter modification commands, or continuous movement commands.

[0077] After role labeling is completed, the controller writes the composite device fingerprint, role label, and session identifier generated for this access into the session record. When the control device sends subsequent commands, the command carries the session identifier, command sequence number, command type, and command data. The controller first reads the corresponding role label based on the session identifier, and then parses the command type and command data according to the command permission table corresponding to that role label.

[0078] When the role label has not been downgraded, the controller will determine the initial role label as the operator role corresponding to the controlled device; when the role label has been downgraded, the controller will determine the restricted role label as the operator role corresponding to the controlled device. Subsequently, the controller will send the determined operator role to the permission allocation module, which will then read the movement range limit, movement permission, and joint angle increment limit corresponding to that operator role.

[0079] In one access process, the initial role label bound to the identity mapping table was "Surgeon," the device integrity check value was inconsistent with the baseline value, but all other tests passed. The controller deducted 40 points from 100, resulting in 60 points. Since 60 points is less than 80, the controller downgraded the "Surgeon" to "Surgical Assistant," and designated the "Surgical Assistant" as the operator role for this control device after this access.

[0080] In another access process, the initial role label bound to the identity mapping table was "surgical assistant." The access time differed from the controller's current time by 4 seconds, and all other detection items passed. The controller deducted 20 points from 100, resulting in 80 points. Since 80 points was not lower than the preset threshold, the controller retained the "surgical assistant" role label and used "surgical assistant" as the operator role for this control device after this access.

[0081] S2 includes obtaining the operator role, matching the operator role with the permission allocation library to obtain the initial movement range limit; generating a basic motion vector based on the initial movement range limit; determining whether the magnitude of the basic motion vector is greater than a preset displacement threshold; if the magnitude of the basic motion vector is greater than the preset displacement threshold, truncating it to obtain the target motion vector; and determining the corresponding operation accuracy constraints of the control device based on the target motion vector.

[0082] In the above implementation, after the controller completes device identification, it reads the operator role from the current communication session and uses the operator role as the retrieval field for the access permission allocation library. Each record in the access permission allocation library includes at least a role identifier, a lower limit of movement range, an upper limit of movement range, direction allocation parameters, and movement permissions exceeding the displacement threshold. The controller compares the operator role with the role identifier item by item. When only one record has a completely identical role identifier, the controller reads the initial movement range limit from that record. If no matching record is found, or if two or more matching records are found, the controller terminates the current access permission allocation and prohibits the output of robotic arm drive commands.

[0083] In this embodiment, the initial movement range is limited to 0 mm to 10 mm for the surgeon, 0 mm to 5 mm for the surgical assistant, 0 mm to 2 mm for the trainee operator, and 0 mm to 1 mm for the restricted trainee operator. The lower limit of movement range is used to filter out invalid displacement inputs, and the upper limit of movement range is used to limit the maximum displacement allowed to be generated in a single control operation.

[0084] After obtaining the initial movement range limit, the controller generates a basic motion vector based on the direction allocation parameters in the permission record. These parameters include lateral, longitudinal, and vertical components. The controller calculates the square of each of the three direction components, adds the three squares together, and then performs a square root operation on the sum to obtain the composite value of the direction components. Subsequently, each direction component is divided by this composite value to obtain three normalized direction components. These normalized direction components only represent the direction of movement.

[0085] The controller reads the upper limit of the initial movement range limit, multiplies the upper limit by three normalized directional components, and the resulting lateral displacement, longitudinal displacement and vertical displacement constitute the basic motion vector; the direction of the basic motion vector is determined by the direction allocation parameter, and its magnitude is equal to the upper limit of the movement range corresponding to the current operator role.

[0086] For example, if the horizontal, vertical, and angular components in the permission record are 3, 4, and 0 respectively, the controller calculates the squares of 3, 4, and 0, adds the results to get 25, and then performs a square root operation on 25 to get 5. Subsequently, the controller divides 3 by 5 to get the horizontal normalized component 0.6, divides 4 by 5 to get the vertical normalized component 0.8, and divides 0 by 5 to get the angular normalized component 0. When the current operator's role is the surgeon, the maximum movement range is 10 mm. The controller multiplies 10 mm by 0.6, 0.8, and 0 respectively to get a horizontal displacement of 6 mm, a vertical displacement of 8 mm, and a angular displacement of 0 mm, thus forming the basic motion vector.

[0087] After the basic motion vector is generated, the controller calculates its magnitude. The calculation process is as follows: the squares of the lateral, longitudinal, and vertical displacements are calculated separately, the three squared values ​​are added together, and then the square root operation is performed on the sum. For a basic motion vector with a lateral displacement of 6 mm, a longitudinal displacement of 8 mm, and a vertical displacement of 0 mm, the three squared values ​​are 36, 64, and 0 respectively, and the sum is 100. The square root operation on 100 yields 10 mm.

[0088] The preset displacement threshold is determined by the role permissions in the permission allocation library. During the parameter configuration phase, the controller reads all role records that do not have movement permissions exceeding the displacement threshold, extracts the upper limit of movement amplitude for each role, and determines the upper limit of movement amplitude with the largest value as the preset displacement threshold. In this embodiment, roles that do not have movement permissions exceeding the displacement threshold include surgical assistants, training operators, and restricted training operators, whose upper limits of movement amplitude are 5 mm, 2 mm, and 1 mm, respectively. Therefore, the preset displacement threshold is determined to be 5 mm.

[0089] The controller compares the magnitude of the basic motion vector with 5 mm. If the magnitude of the basic motion vector is not greater than 5 mm, the controller retains the lateral displacement, longitudinal displacement and vertical displacement in the basic motion vector and determines the basic motion vector as the target motion vector.

[0090] When the magnitude of the basic motion vector exceeds 5 mm, the controller performs proportional truncation on the basic motion vector. During truncation, 5 mm is divided by the magnitude of the basic motion vector to obtain the truncation ratio. Then, the lateral, longitudinal, and vertical displacements in the basic motion vector are multiplied by the truncation ratio. These three processed displacements form the target motion vector. This process maintains the sign of each displacement and ensures that the magnitude of the target motion vector is equal to 5 mm.

[0091] Taking the aforementioned basic motion vector with a module length of 10 mm as an example, the controller divides 5 mm by 10 mm to obtain a truncation ratio of 0.5, then multiplies the lateral displacement of 6 mm by 0.5 to obtain 3 mm, multiplies the longitudinal displacement of 8 mm by 0.5 to obtain 4 mm, and multiplies the vertical displacement of 0 mm by 0.5 to obtain 0 mm. The truncated target motion vector includes a lateral displacement of 3 mm, a longitudinal displacement of 4 mm, and a vertical displacement of 0 mm, with a module length of 5 mm.

[0092] Once the target motion vector is determined, the controller uses the three displacement values ​​in the target motion vector as single displacement limits in each coordinate direction, and the magnitude of the target motion vector as the single composite displacement limit. These, combined with movement permissions from the permission record, form operational precision constraints. When the lateral displacement is positive, movement in the positive lateral direction is permitted, and its absolute value serves as the upper limit of the positive lateral displacement. When the lateral displacement is negative, movement in the negative lateral direction is permitted, and its absolute value serves as the upper limit of the negative lateral displacement. Longitudinal and vertical displacements are processed in the same way.

[0093] For a target motion vector with a lateral displacement of 3 mm, a longitudinal displacement of 4 mm, and a vertical displacement of 0 mm after truncation, the resulting operational accuracy constraints are: a single displacement in the positive lateral direction does not exceed 3 mm, a single displacement in the positive longitudinal direction does not exceed 4 mm, a vertical displacement is 0 mm, and a single displacement after combining the three directions does not exceed 5 mm.

[0094] S3 includes acquiring the initial motion command sent by the control device, parsing the initial motion command to obtain the initial displacement vector; obtaining the initial vector magnitude value based on the initial displacement vector; if the initial vector magnitude value is greater than a preset displacement threshold, mapping the initial displacement vector to obtain the target feature vector; using a support vector machine algorithm to classify the target feature vector to obtain the target motion trajectory category, and determining the motion type corresponding to the initial motion command based on the target motion trajectory category.

[0095] In the above implementation, the control device sends an initial motion command to the controller at a transmission cycle of 20 milliseconds. The initial motion command includes a device session identifier, command number, transmission time, lateral displacement data, longitudinal displacement data, vertical displacement data, and cyclic redundancy check code. The lateral displacement data, longitudinal displacement data, and vertical displacement data are all represented by integers with positive and negative signs, and each integer unit corresponds to 0.01 millimeters.

[0096] After receiving the initial motion command, the controller first recalculates the cyclic redundancy check code based on the valid data in the command and compares it with the received cyclic redundancy check code. If the comparison result is inconsistent, the controller deletes the command. If the comparison result is consistent, the controller continues to check the device session identifier and command sequence number. If the device session identifier is consistent with the session record of the current controlled device and the command sequence number is greater than the command sequence number of the previous valid command, the controller reads 3 displacement data.

[0097] The controller multiplies the lateral, longitudinal, and vertical displacement data by 0.01 mm to obtain the lateral, longitudinal, and vertical displacement values, and then forms the initial displacement vector in the order of lateral, longitudinal, and vertical. For example, when the lateral displacement data is 600, the longitudinal displacement data is 800, and the vertical displacement data is 0, the obtained lateral displacement value is 6 mm, the longitudinal displacement value is 8 mm, and the vertical displacement value is 0 mm.

[0098] After the initial displacement vector is formed, the controller calculates the initial vector magnitude. The specific calculation process is as follows: calculate the square of the lateral displacement, the square of the longitudinal displacement, and the square of the vertical displacement respectively, add the three square values ​​together, and then perform a square root operation on the sum. Taking the aforementioned displacement as an example, the square of 6 mm is 36, the square of 8 mm is 64, and the square of 0 mm is 0. The sum of the three square values ​​is 100, and the square root operation on 100 is 10 mm. Therefore, the initial vector magnitude is 10 mm.

[0099] The preset displacement threshold is determined by the role movement permissions in the permission allocation library. During the permission parameter loading phase, the controller reads all operator roles that do not have movement permissions exceeding the threshold, extracts the upper limit of a single movement for each role, and determines the maximum value among them as the preset displacement threshold. In this embodiment, the upper limits of a single movement for the surgical assistant, the training operator, and the restricted training operator are 5 mm, 2 mm, and 1 mm, respectively, so the preset displacement threshold is determined to be 5 mm. When the upper limit of the movement range in the permission allocation library is modified, the controller recalculates the preset displacement threshold according to the same process.

[0100] The controller compares the initial vector magnitude with 5 mm. If the initial vector magnitude is no greater than 5 mm, the controller marks the initial motion command as a displacement command within the threshold and sends the initial displacement vector to the fine-tuning mapping processing stage. If the initial vector magnitude is greater than 5 mm, the controller performs feature mapping on the initial displacement vector.

[0101] Feature mapping includes directional feature calculation and amplitude feature calculation. When calculating the directional feature, the controller divides the lateral displacement, longitudinal displacement and vertical displacement by the initial vector magnitude to obtain the lateral directional feature, longitudinal directional feature and vertical directional feature respectively. When the lateral displacement is 6 mm, the longitudinal displacement is 8 mm, the vertical displacement is 0 mm and the initial vector magnitude is 10 mm, the three directional features are 0.6, 0.8 and 0 respectively.

[0102] When calculating the amplitude feature, the controller divides the initial vector magnitude by a preset displacement threshold; in this embodiment, 10 mm divided by 5 mm yields amplitude feature 2. To ensure that the input range of the support vector machine is consistent with the training samples, the upper limit of the amplitude feature is set to 2; when the calculated amplitude feature is greater than 2, the controller records it as 2; when the calculated amplitude feature is not greater than 2, the original calculation result is retained.

[0103] The controller arranges four features in a fixed order: lateral direction features, longitudinal direction features, vertical direction features, and amplitude features, to obtain the target feature vector. Taking the aforementioned initial displacement vector as an example, the target feature vector is composed of 0.6, 0.8, 0, and 2 in sequence. This target feature vector simultaneously retains the spatial direction of the initial motion command and the displacement amplitude relative to the 5 mm threshold.

[0104] The support vector machine classification model is trained before the controller is put into use. Training samples are obtained by the control equipment of the automatic mirror traction frame sending displacement commands in a preset direction. Each group of training samples forms a target feature vector according to the above-mentioned analysis, modulus calculation, and feature mapping process, and is labeled with the corresponding motion trajectory category. The motion trajectory categories include 6 single-axis trajectories, 12 dual-axis composite trajectories, and 8 triaxial composite trajectories. The 6 single-axis trajectories correspond to the positive horizontal direction, negative horizontal direction, positive vertical direction, negative vertical direction, positive vertical direction, and negative vertical direction, respectively; the 12 dual-axis composite trajectories are formed by combining the horizontal and vertical, horizontal and vertical, and vertical and vertical directions; the 8 triaxial composite trajectories are formed by combining the positive and negative directions of the three coordinate axes.

[0105] For each motion trajectory category, 200 samples were collected, with 160 sets used for training and 40 sets for validation. A radial basis function (RBF) kernel was used with a penalty parameter of 10 and a kernel parameter of 0.5, and a pairwise classification method was employed to build the classification model. After training, the classification model parameters were stored in the controller's non-volatile memory. The controller input the target feature vector into the SVM classification model. Each pairwise classifier outputs a class determination result. The controller counts the number of determinations for each motion trajectory category and identifies the category with the highest number of determinations as the target motion trajectory category. When two categories have the same number of determinations, the controller calculates the distance from the target feature vector to the two classification boundaries and identifies the category with the larger distance value as the target motion trajectory category.

[0106] After determining the target motion trajectory category, the controller reads the corresponding record of trajectory category and motion type. If the target motion trajectory category belongs to category 6 (single-axis trajectory), the motion type of the initial motion command is determined to be single-axis translation; if it belongs to category 12 (dual-axis composite trajectory), the motion type is determined to be dual-axis composite translation; if it belongs to category 8 (tri-axis composite trajectory), the motion type is determined to be tri-axis composite translation. Taking the aforementioned initial motion command with a lateral displacement of 6 mm, a longitudinal displacement of 8 mm, and a vertical displacement of 0 mm as an example, its target feature vector corresponds to a dual-axis composite trajectory in the positive lateral and longitudinal directions. Based on this, the controller determines the target motion trajectory category as a composite trajectory in the positive lateral and longitudinal directions, and determines the motion type of the initial motion command as dual-axis composite translation.

[0107] S4 includes obtaining the displacement vector corresponding to the motion type, and extracting the operation precision associated with the motion type when the magnitude of the displacement vector is greater than a preset displacement threshold; parsing the corresponding constraints based on the operation precision and extracting the constraint boundaries; comparing and classifying the constraint boundaries with the preset displacement threshold to obtain out-of-bounds risk features, and determining the movement permission based on the out-of-bounds risk features; if the movement permission contains a permission matching degree exceeding the preset displacement threshold, then generating a permission determination result for the operation precision constraints.

[0108] In the above implementation, the controller reads the determined motion type and extracts the lateral, longitudinal, and vertical displacements from the currently valid initial motion command. When the motion type is single-axis translation, only one displacement is not zero; when the motion type is dual-axis composite translation, two displacements are not zero; and when the motion type is tri-axis composite translation, all three displacements are not zero. The controller arranges the three displacements in the order of lateral, longitudinal, and vertical to obtain the displacement vector corresponding to the motion type. The controller calculates the square of each of the three displacements, adds the three squares together, and then performs a square root operation on the sum. The result is the magnitude of the displacement vector. For example, when the lateral displacement is 6 mm, the longitudinal displacement is 8 mm, and the vertical displacement is 0 mm, the three squares are 36, 64, and 0, respectively. The sum is 100. After performing a square root operation on 100, the magnitude of the displacement vector is 10 mm.

[0109] The preset displacement threshold is determined based on the permission allocation library. The controller reads all operator roles that do not have the permission to move beyond the threshold and extracts the maximum single-transaction composite displacement for each role. The maximum single-transaction composite displacement for surgical assistants, training operators, and restricted training operators are 5 mm, 2 mm, and 1 mm, respectively. The controller selects the maximum value of 5 mm as the preset displacement threshold. When the above parameters in the permission allocation library change, the controller rereads each maximum single-transaction composite displacement and updates the preset displacement threshold in the same way.

[0110] When the magnitude of the displacement vector is no greater than 5 mm, the controller does not perform the threshold movement permission judgment and transfers the displacement vector to fine-tuning mapping processing; when the magnitude of the displacement vector is greater than 5 mm, the controller reads the operation accuracy record according to the motion type and the current operator role; the operation accuracy record includes the upper limit of single composite displacement, the upper limit of lateral displacement, the upper limit of longitudinal displacement, the upper limit of vertical displacement, the upper limit of movement speed, and the upper limit of joint angle increment within a single control cycle; the controller extracts the displacement limit related to the current motion type from it and determines the constraint boundary accordingly; single-axis translation only extracts the upper limit of displacement of the corresponding coordinate axis and the upper limit of single composite displacement; dual-axis composite translation extracts the upper limit of displacement of two non-zero displacement directions and the upper limit of single composite displacement; three-axis composite translation extracts the upper limit of displacement of three directions and the upper limit of single composite displacement.

[0111] When determining the constraint boundary, the controller first calculates the directional proportion of each non-zero displacement component in the displacement vector. The calculation process is as follows: divide the absolute value of each non-zero displacement by the magnitude of the displacement vector. For a displacement vector with a lateral displacement of 6 mm, a longitudinal displacement of 8 mm, a vertical displacement of 0 mm, and a magnitude of 10 mm, the lateral proportion is 0.6 and the longitudinal proportion is 0.8.

[0112] The controller then divides the upper limit of displacement in each coordinate direction by the corresponding proportion of the direction to obtain the composite displacement boundary allowed by that coordinate direction when maintaining the current direction of movement. When the upper limit of the horizontal displacement of the current operator role is 8 mm and the upper limit of the vertical displacement is 8 mm, the allowed composite displacement boundary in the horizontal direction is 13.33 mm obtained by dividing 8 by 0.6, and the allowed composite displacement boundary in the vertical direction is 10 mm obtained by dividing 8 by 0.8.

[0113] The controller compares the permissible composite displacement boundaries in each direction with the upper limit of the single composite displacement in the operation accuracy record, and takes the smallest value as the constraint boundary of this motion. When the upper limit of the single composite displacement is 10 mm, the aforementioned three values ​​are 13.33 mm, 10 mm and 10 mm respectively, so the constraint boundary of this motion is 10 mm.

[0114] Using this processing method, when the displacement vector is amplified along the original motion direction to the constraint boundary, the displacement in each coordinate direction will not exceed the corresponding upper limit of displacement.

[0115] After obtaining the constraint boundary, the controller compares the constraint boundary with 5 mm and generates an out-of-bounds risk feature based on the actual magnitude of the displacement vector. If the constraint boundary is no greater than 5 mm, it indicates that the current operating precision does not allow for a displacement exceeding 5 mm, and the out-of-bounds risk feature is determined to be no threshold violation permission, and the movement permission is determined to be a movement permission that does not include a movement exceeding 5 mm. If the constraint boundary is greater than 5 mm and the magnitude of the displacement vector is no greater than the constraint boundary, it indicates that the current request is outside the preset displacement threshold but within the operating precision constraint boundary, and the out-of-bounds risk feature is determined to be threshold violation without exceeding the boundary, and the movement permission is determined to be a movement permission that includes a movement exceeding 5 mm.

[0116] If the constraint boundary is greater than 5 mm, but the magnitude of the displacement vector is greater than the constraint boundary, it indicates that the current operator has the permission to move beyond the threshold, but this request exceeds the operational precision constraint boundary. The risk characteristic of exceeding the threshold is determined to be both exceeding the limit and exceeding the boundary, and the movement permission is determined to be the permission not to fully execute this displacement. The controller further calculates the permission matching degree. In the calculation, the magnitude of the displacement vector is first subtracted by 5 mm to obtain the displacement amount that this request exceeds the preset displacement threshold; then, the constraint boundary is subtracted by 5 mm to obtain the displacement amount that the current operational precision allows to exceed the preset displacement threshold.

[0117] When the constraint boundary is no greater than 5 mm, the permission matching score is 0. When the allowable displacement exceeding the preset displacement threshold is not less than the requested displacement exceeding the preset displacement threshold, the permission matching score is 100. When the allowable displacement exceeding the preset displacement threshold is less than the requested displacement exceeding the preset displacement threshold, the allowable displacement exceeding the preset displacement threshold is divided by the requested displacement exceeding the preset displacement threshold, and then the result is multiplied by 100 to obtain the permission matching score.

[0118] Taking the aforementioned displacement vector as an example, its magnitude is 10 mm, the constraint boundary is 10 mm, the requested displacement exceeding the preset displacement threshold is 10 mm minus 5 mm, which is 5 mm, and the allowed displacement exceeding the preset displacement threshold is also 5 mm. Therefore, the permission matching degree is 100 points, and the movement permission includes the permission to fully execute this threshold-crossing displacement.

[0119] When the magnitude of the displacement vector is 10 mm and the constraint boundary is 8 mm, the requested displacement exceeding the preset displacement threshold is 5 mm, and the allowed displacement exceeding the preset displacement threshold is 3 mm. The controller divides 3 by 5 and then multiplies the result by 100 to obtain a permission matching score of 60. This result indicates that the current operation precision can only cover the 3 mm in this threshold-crossing request, and cannot cover the entire 5 mm threshold-crossing displacement. When the permission matching score is 100 and the boundary risk feature is threshold-crossing but not boundary-crossing, the controller generates a permission judgment result that includes the permission to move more than 5 mm. The permission judgment result records the operator role, motion type, displacement vector magnitude, preset displacement threshold, constraint boundary, boundary risk feature, and permission matching score, and sends the result to the first response amplitude control signal generation stage.

[0120] If the permission matching score is less than 100, or the risk feature of exceeding the boundary is no permission to exceed the threshold or exceeds the threshold and exceeds the boundary, the controller generates a permission judgment result that does not contain complete permission to exceed the threshold and sends the displacement vector to the fine-tuning mapping stage, where the fine-tuning mapping step performs scaling processing according to the operation precision constraints.

[0121] S5 includes extracting a motion trajectory vector based on the initial motion command if the permission determination result contains a movement permission exceeding a preset displacement threshold; determining a first response amplitude by matching the motion trajectory vector with an amplitude mapping matrix, wherein the first response amplitude is used to generate a first response amplitude control signal; and adjusting the traction frame posture using the first response amplitude control signal to obtain a first traction frame drive command for the traction frame.

[0122] In the above implementation, the controller receives the generated permission determination result and reads the boundary risk feature, permission matching degree and operation precision constraint boundary. When the boundary risk feature indicates that the displacement request is outside the preset displacement threshold and does not exceed the operation precision constraint boundary, and the permission matching degree is 100 points, the controller confirms that the current control device has the permission to perform this threshold displacement and starts the first response amplitude control process. If any condition is not met, the first response amplitude control signal is not generated.

[0123] In this embodiment, the preset displacement threshold is 5 mm. This value is determined according to the operator roles in the permission allocation library that do not have the permission to move beyond the threshold. The controller extracts the single-transaction composite displacement upper limit corresponding to the surgical assistant, training operator, and restricted training operator, which are 5 mm, 2 mm, and 1 mm respectively. The maximum value of 5 mm is then determined as the preset displacement threshold. After the role permission parameters in the permission allocation library change, the controller re-determines the threshold according to the same process. After confirming that the permission to move beyond the threshold is granted, the controller reads the lateral displacement, longitudinal displacement, and vertical displacement from the initial motion command and extracts the motion trajectory category determined in the previous step. The controller calculates the square of each of the three displacements, adds the three squares together, and then performs a square root operation on the sum to obtain the initial displacement modulus.

[0124] When the initial displacement magnitude is not zero, the controller divides the lateral displacement, longitudinal displacement, and vertical displacement by the initial displacement magnitude to obtain the proportions in three directions. The proportions in three directions, together with the initial displacement magnitude and the motion trajectory category, constitute the motion trajectory vector. The proportions in three directions are used to characterize the distribution of the current displacement in the three coordinate directions, the initial displacement magnitude is used to characterize the requested movement distance, and the motion trajectory category is used to determine the matching position in the amplitude mapping matrix.

[0125] For example, when the lateral displacement is 6 mm, the longitudinal displacement is 8 mm, and the vertical displacement is 0 mm, the squares of the three displacements are 36, 64, and 0, respectively. The sum of these three squares is 100, and the square root result is 10 mm. The lateral ratio is 0.6 (6 divided by 10), the longitudinal ratio is 0.8 (8 divided by 10), and the vertical ratio is 0. The previous step determined the instruction as a dual-axis composite translation consisting of the positive lateral and positive longitudinal directions. Therefore, the motion trajectory vector records the dual-axis composite translation category, the initial displacement magnitude of 10 mm, and the directional ratios of 0.6, 0.8, and 0.

[0126] The amplitude mapping matrix is ​​pre-stored in the controller. The rows of the matrix are set according to the motion trajectory category, including single-axis translation, dual-axis composite translation, and tri-axis composite translation. The columns of the matrix are set into three intervals according to the initial displacement magnitude: greater than 5 mm and not greater than 7 mm, greater than 7 mm and not greater than 9 mm, and greater than 9 mm and not greater than 10 mm. The upper limit of the response amplitude corresponding to the motion trajectory category and displacement interval is stored at the intersection of each row and column.

[0127] In this embodiment, the upper limits of the response amplitude corresponding to single-axis translation in the three displacement intervals are 7 mm, 9 mm, and 10 mm, respectively; the upper limits of the response amplitude corresponding to dual-axis composite translation are 6.5 mm, 8.5 mm, and 9.5 mm, respectively; and the upper limits of the response amplitude corresponding to tri-axis composite translation are 6 mm, 8 mm, and 9 mm, respectively. The upper limits of the response amplitude in the amplitude mapping matrix are determined during the traction frame calibration stage. During calibration, displacement tests are performed for single-axis translation, dual-axis composite translation, and tri-axis composite translation, starting from 5 mm and increasing in increments of 0.5 mm. Each test amplitude is performed 20 times consecutively. In the 20 tests, if the end position error of the laparoscopic clamping mechanism does not exceed 0.5 mm, the joint angles of each robotic arm are within the allowable range, and the joint actuators do not output overload signals, the test amplitude is recorded as the effective amplitude. The effective amplitude with the largest value in the corresponding displacement interval for each motion trajectory category is written into the amplitude mapping matrix.

[0128] The controller determines the rows of the amplitude mapping matrix based on the motion trajectory category in the motion trajectory vector, and then determines the columns of the matrix based on the interval where the initial displacement magnitude value is located, and reads the upper limit of the response amplitude stored at the corresponding position; the first response amplitude is jointly determined by the initial displacement magnitude value, the upper limit of the response amplitude in the amplitude mapping matrix, and the current operation accuracy constraint boundary; the controller compares the above three values ​​and takes the minimum value as the first response amplitude; this process ensures that the first response amplitude does not exceed the movement distance requested by the initial motion command, does not exceed the calibration amplitude of the traction frame under the corresponding motion trajectory, and does not exceed the constraint boundary corresponding to the current operator role.

[0129] Taking the aforementioned dual-axis composite translation as an example, the initial displacement modulus is 10 mm, corresponding to the interval greater than 9 mm and not greater than 10 mm; the upper limit of the response amplitude recorded at this position in the amplitude mapping matrix is ​​9.5 mm, and the current operation accuracy constraint boundary is 10 mm; after comparing 10 mm, 9.5 mm and 10 mm, the controller determines 9.5 mm as the first response amplitude.

[0130] After determining the first response amplitude, the controller multiplies the first response amplitude by the proportions of the three directions to obtain the lateral response displacement, longitudinal response displacement, and vertical response displacement. When the first response amplitude is 9.5 mm, the lateral response displacement is 5.7 mm (9.5 mm multiplied by 0.6), the longitudinal response displacement is 7.6 mm (9.5 mm multiplied by 0.8), and the vertical response displacement is 0 mm. The controller writes the three response displacements, motion trajectory type, target motion speed, target motion acceleration, and control cycle into the first response amplitude control signal. In this embodiment, the target motion speed is set to 8 mm per second, the target motion acceleration is set to 20 mm per second squared, and the control cycle is set to 20 milliseconds.

[0131] The controller reads the current position of the end of the laparoscopic clamping mechanism, superimposes the lateral response displacement onto the current lateral coordinate, superimposes the longitudinal response displacement onto the current longitudinal coordinate, and superimposes the vertical response displacement onto the current vertical coordinate to obtain the target position of the end of the traction frame. This control keeps the three attitude angles of the end of the laparoscopic clamping mechanism unchanged, so the target attitude angle follows the current attitude angle.

[0132] The controller encapsulates the current position of the end effector, the target position, the current attitude angle, the target attitude angle, the target motion speed, the target motion acceleration, the control cycle, and the permission determination result into a first guide mirror traction frame drive command; this drive command is sent to the inverse kinematics solution stage to calculate the target angle of each joint of the robotic arm within a continuous control cycle.

[0133] S6 includes extracting a displacement vector from the acquired initial motion command and calculating the magnitude of the displacement vector; if the magnitude of the displacement vector is not greater than a preset displacement threshold or the permission determination result is that it does not contain movement permissions exceeding the preset displacement threshold, then a micro-motion feature matrix is ​​extracted based on the displacement vector; the micro-motion feature matrix is ​​used to call a fine-tuning mapping function to obtain scaled displacement data, the scaled displacement data being generated by scaling the displacement vector using the fine-tuning mapping function; a second response amplitude control signal is generated based on the scaled displacement data, the second response amplitude control signal being used to adjust the traction frame attitude to obtain a second traction frame drive command.

[0134] In the above implementation, the controller receives the initial motion command sent by the control device and sequentially verifies the device session identifier, command sequence number, and cyclic redundancy check code. After the verification is successful, the controller reads the lateral displacement data, longitudinal displacement data, and vertical displacement data from the command data segment. All three displacement data are counted in units of 0.01 mm. The controller multiplies each displacement data by 0.01 mm to obtain the lateral displacement, longitudinal displacement, and vertical displacement, and then forms a displacement vector in the order of lateral, longitudinal, and vertical.

[0135] The magnitude of the displacement vector is calculated based on the combined distance of the three displacements. The controller first calculates the squares of the lateral, longitudinal, and vertical displacements, then adds the three squares together, and finally performs a square root operation on the sum. For example, when the lateral displacement is 3 mm, the longitudinal displacement is 4 mm, and the vertical displacement is 0 mm, the three squares are 9, 16, and 0, respectively. Adding them together gives 25. Performing a square root operation on 25 gives a displacement vector magnitude of 5 mm.

[0136] In this embodiment, the preset displacement threshold is 5 mm. This threshold is determined by the upper limit of the movement range of the role in the permission allocation library. The controller reads all operator roles that do not have the permission to move beyond the threshold and obtains the single composite displacement upper limit of the surgical assistant, the training operator, and the restricted training operator, which are 5 mm, 2 mm, and 1 mm, respectively. The maximum value of 5 mm is determined as the preset displacement threshold. When the single composite displacement upper limit in the permission allocation library is modified, the controller re-executes the above comparison process.

[0137] When the magnitude of the displacement vector is no greater than 5 mm, the controller directly enters the fine-tuning process. When the magnitude of the displacement vector is greater than 5 mm, but the permission judgment result indicates that the current control device does not have the full permission to execute the over-threshold displacement, the controller also enters the fine-tuning process. When the magnitude of the displacement vector is greater than 5 mm and the permission judgment result indicates that it has the full over-threshold movement permission, this step is not executed. After entering the fine-tuning process, the controller forms a 2-row, 4-column micro-motion feature matrix based on the displacement vector. The first row sequentially writes the lateral displacement, longitudinal displacement, vertical displacement, and displacement vector magnitude. The second row sequentially writes the lateral direction ratio, longitudinal direction ratio, vertical direction ratio, and amplitude ratio.

[0138] The proportions in the three directions are obtained by dividing the displacement in the corresponding direction by the magnitude of the displacement vector, and the amplitude proportion is obtained by dividing the magnitude of the displacement vector by 5 mm. When the magnitude of the displacement vector is 0 mm, the proportions in the three directions and the amplitude proportion are all recorded as 0. When the lateral displacement is 3 mm, the longitudinal displacement is 4 mm, and the vertical displacement is 0 mm, the magnitude of the displacement vector is 5 mm, the lateral proportion is 0.6, the longitudinal proportion is 0.8, the vertical proportion is 0, and the amplitude proportion is 1.

[0139] The fine-tuning mapping function has a displacement dead zone of 0.1 mm. The displacement dead zone is determined during the control equipment calibration stage. During calibration, the control equipment is kept in a non-operational state, and 500 sets of displacement data are continuously collected at a sampling period of 20 milliseconds. The magnitude of each set of displacement data is calculated. The maximum magnitude among the 500 sets of data is 0.08 mm. The minimum displacement resolution of the control equipment is 0.02 mm. The 0.08 mm and 0.02 mm are added together to obtain 0.1 mm, and this value is written into the displacement dead zone parameter.

[0140] When the magnitude of the displacement vector is no greater than 0.1 mm, the fine-tuning mapping function sets the scaling displacement in all three directions to 0 mm, and the controller does not change the position of the end of the traction frame. When the magnitude of the displacement vector is greater than 0.1 mm but no greater than 5 mm, the controller first subtracts 0.1 mm from the magnitude of the displacement vector, and then divides the difference by 4.9 mm to obtain the position value of the current displacement in the effective micro-motion range. Subsequently, the position value is multiplied by itself to obtain the amplitude mapping value.

[0141] The controller reads the upper limit of fine-tuning displacement according to the operator's role. The upper limit of fine-tuning displacement is 5 mm for the chief surgeon and surgical assistant, 2 mm for the trained operator, and 1 mm for the restricted trained operator. The amplitude mapping value is multiplied by the corresponding upper limit of fine-tuning displacement to obtain the scaled composite displacement.

[0142] For example, when the displacement vector magnitude is 2.55 mm, subtract 0.1 mm to get 2.45 mm, then divide by 4.9 mm to get 0.5; multiply 0.5 by 0.5 to get 0.25; when the current operator role is a training operator, the fine-tuning displacement limit is 2 mm, multiply 0.25 by 2 mm to get a scaled composite displacement of 0.5 mm; when the displacement vector magnitude is greater than 5 mm, and the permission judgment result does not include complete over-threshold movement permission, the controller does not use the initial displacement magnitude to calculate the scaled composite displacement, but directly reads the single composite displacement limit of the current operator role; the scaled composite displacements corresponding to surgical assistant, training operator, and restricted training operator are 5 mm, 2 mm, and 1 mm, respectively.

[0143] After the scaled composite displacement is determined, the controller multiplies the composite displacement by the horizontal, vertical, and lateral proportions in the micro-motion feature matrix to obtain the horizontal, vertical, and lateral scaled displacements. This process keeps the initial displacement vector's direction of motion unchanged. For commands with direction proportions of 0.6, 0.8, and 0, and a scaled composite displacement of 0.5 mm, the horizontal scaled displacement is 0.3 mm, the vertical scaled displacement is 0.4 mm, and the lateral scaled displacement is 0 mm. The composite distance of the three scaled displacements is 0.5 mm.

[0144] The controller also compares each scaling displacement with the corresponding directional displacement upper limit in the operation accuracy constraint. When the absolute value of any scaling displacement exceeds the corresponding directional displacement upper limit, the directional displacement upper limit is divided by the absolute value of the scaling displacement to obtain the directional limiting ratio. When the scaled composite displacement exceeds the single composite displacement upper limit, the single composite displacement upper limit is divided by the scaled composite displacement to obtain the composite limiting ratio. The controller selects the minimum value among all limiting ratios and value 1, and multiplies the three scaling displacements by the minimum value to form the final scaling displacement data.

[0145] The controller writes the final lateral scaling displacement, longitudinal scaling displacement, vertical scaling displacement, motion type, target motion speed of 2 mm / s, target motion acceleration of 5 mm / s², and control cycle of 20 ms into the second response amplitude control signal. When adjusting the attitude of the traction frame, the controller reads the current lateral, longitudinal, and vertical coordinates of the end of the laparoscopic clamping mechanism and adds the corresponding scaling displacement to obtain the target lateral, longitudinal, and vertical coordinates. This displacement operation does not change the attitude angle of the end of the laparoscopic clamping mechanism, and the target attitude angle adopts the current attitude angle.

[0146] The controller encapsulates the current position of the end effector, the target position, the current attitude angle, the target attitude angle, the target motion speed, the target motion acceleration, the control cycle, and the permission determination result into a second traction frame drive command, and sends the drive command to the inverse kinematics solution stage.

[0147] S7 includes acquiring the first or second traction frame drive command, parsing the first or second traction frame drive command using a coordinate system transformation algorithm to obtain the target spatial pose, and extracting the target coordinates and rotation matrix corresponding to the target spatial pose; performing algebraic elimination calculation on the target coordinates and rotation matrix using an inverse kinematics algorithm to obtain the initial joint variables; if the initial joint variables are in a singular configuration, performing a cubic spline interpolation algorithm to smooth the initial joint variables to obtain the target joint variables; and discretizing and interpolating the target joint variables to obtain the joint angle control sequence of the automatic traction frame robot arm.

[0148] In the above embodiment, the automatic endoscope traction frame adopts a series robotic arm with 6 rotating joints, and the laparoscopy clamping mechanism is fixed at the end of the 6th joint; the controller stores the length of each link of the robotic arm, the position of each joint axis, the joint angle range, the installation offset of the laparoscopy clamping mechanism, and the transformation parameters between the coordinate system of the control device and the coordinate system of the robotic arm base; after receiving the first endoscope traction frame drive command or the second endoscope traction frame drive command, the controller reads the lateral target displacement, longitudinal target displacement, vertical target displacement, and target posture data from the drive command; the first endoscope traction frame drive command and the second endoscope traction frame drive command use the same posture analysis method, the difference between the two is that the target displacement and the movement speed are different.

[0149] The displacement output by the control device is represented in the control device coordinate system, while the kinematics calculation of the robotic arm is represented in the robotic arm base coordinate system. Therefore, coordinate transformation is required. The controller calls a pre-calibrated 3x3 orientation transformation matrix, multiplies the lateral, longitudinal, and vertical target displacements by the values ​​in the corresponding columns of the orientation transformation matrix, and then adds the three products in the same row to obtain the lateral, longitudinal, and vertical position increments in the robotic arm base coordinate system.

[0150] The direction transformation matrix is ​​determined during the traction frame installation stage. During calibration, the laparoscopic clamping mechanism is moved by 10 mm in each of the three positive directions of the control equipment coordinate system. The position sensor at the end of the robotic arm records the three position changes generated in the coordinate system of the robotic arm base for each movement. Each recorded position change is divided by 10 mm to obtain the direction components of the control equipment coordinate axes in the coordinate system of the robotic arm base. These components are then written into the direction transformation matrix in the order of the horizontal axis, the longitudinal axis, and the vertical axis.

[0151] The controller reads the current coordinates of the end of the laparoscopic clamping mechanism and adds the three converted position increments to the current coordinates to obtain the target coordinates.

[0152] For example, if the current horizontal coordinate is 320 mm, the current vertical coordinate is 180 mm, and the current vertical coordinate is 260 mm, and the converted position increments are 5 mm, -3 mm, and 2 mm respectively, the target coordinates will be 325 mm, 177 mm, and 262 mm respectively.

[0153] The target attitude data includes rotation angles around three coordinate axes. The controller calculates the sine and cosine values ​​of each rotation angle in sequence to form a rotation relationship corresponding to the three coordinate axes. Then, it performs matrix multiplication in the order of first around the horizontal axis, then around the vertical axis, and finally around the vertical axis to obtain a rotation matrix composed of nine values. When the drive command does not include attitude change, the controller directly reads the current rotation matrix as the target rotation matrix. The target coordinates and the target rotation matrix together constitute the target spatial pose.

[0154] The laparoscopic clamping mechanism has a fixed installation offset relative to the end flange of the robotic arm. In this embodiment, the laparoscopic clamping mechanism extends 120 mm along the axial direction of the end flange. The controller reads the three directional components of the end flange axial direction in the coordinate system of the robotic arm base from the target rotation matrix, multiplies each directional component by 120 mm to obtain the installation offset in the three directions, and then subtracts the corresponding installation offset from the target coordinates to obtain the target coordinates of the end flange center.

[0155] After obtaining the target coordinates and target rotation matrix of the end flange center, the controller uses algebraic elimination to calculate the initial angles of the six joints. First, the rotation angle of the first joint is determined based on the transverse and longitudinal coordinates of the end flange center. During the calculation, the absolute value of the rotation angle is determined by the ratio obtained by dividing the longitudinal coordinate by the transverse coordinate, and the quadrant of the angle is determined based on the positive and negative states of the transverse and longitudinal coordinates.

[0156] After determining the angle of the first joint, the controller transforms the target coordinates of the end flange center to the motion plane where the second and third joints are located; the controller calculates the horizontal distance from the target point to the axis of the second joint, and then subtracts the structural offset between the first and second joints to obtain the effective horizontal distance in the plane; at the same time, the vertical distance between the target point and the axis of the second joint is calculated.

[0157] The controller calculates the squares of the effective horizontal distance and the vertical distance respectively, adds them together, and then performs a square root operation to obtain the straight-line distance from the axis of the second joint to the target point. Subsequently, a triangle is formed based on the lengths of the second and third links and this straight-line distance, and the included angle of the third joint is calculated using the lengths of the three sides. When there are two feasible angles for the third joint, two sets of candidate angles are obtained: elbow-up and elbow-down.

[0158] After obtaining the candidate angle of the third joint, the controller calculates the angle between the target line and the horizontal direction, and calculates the angle between the second link and the target line; the two angles are added or subtracted according to the installation direction of the robotic arm link to obtain the corresponding candidate angle of the second joint.

[0159] After the angles of the first three joints are determined, the controller calculates the rotation matrix formed by the first three joints based on the forward kinematics of the robotic arm. Then, the transpose of this rotation matrix is ​​multiplied by the target rotation matrix to obtain the remaining rotation matrix undertaken by the fourth, fifth, and sixth joints. The controller calculates the angles of the fifth, fourth, and sixth joints sequentially from the corresponding positions of the remaining rotation matrix, thus obtaining no more than eight sets of initial joint variables. The controller compares each set of initial joint variables with the allowable angle range of each joint. If any joint angle exceeds the upper limit or is less than the lower limit of the corresponding angle, the initial joint variable of that set is deleted. For each set of retained initial joint variables, the controller calculates the difference between the target angle and the current angle of each of the six joints, adds the absolute values ​​of the six differences, and determines the set with the smallest sum as the initial joint variables for this movement.

[0160] After the initial joint variables are determined, the controller performs singular configuration determination on them. The controller calculates a 6x6 Jacobian matrix based on the robotic arm link parameters and the initial joint variables, and then performs singular value decomposition on the Jacobian matrix to obtain the minimum singular value. The minimum singular value reflects the velocity amplification relationship between the end effector motion of the robotic arm and the joint rotation.

[0161] In this embodiment, the singularity threshold is set to 0.05. This threshold is determined during the robot arm calibration stage. During calibration, test postures are set at 5-degree intervals within the allowable angle range of each joint. The minimum singularity value of each test posture is calculated, and a test speed of 1 millimeter per second is input to the end of the robot arm. When the minimum singularity value is not less than 0.05, the rotation speed of any joint does not exceed 20 degrees per second; when the minimum singularity value is less than 0.05, the rotation speed of at least one joint exceeds 20 degrees per second. Therefore, 0.05 is determined as the boundary for the singular configuration.

[0162] When the minimum singular value is not less than 0.05, the controller directly uses the initial joint variable as the target joint variable. When the minimum singular value is less than 0.05, the controller performs cubic spline interpolation on the motion process between the current joint variable and the initial joint variable. When performing cubic spline interpolation, the controller sets 4 joint trajectory nodes. The first node uses the current angle of each joint, the fourth node uses the initial target angle of each joint, the second node uses the current angle plus 1 / 3 of the total angle change, and the third node uses the current angle plus 2 / 3 of the total angle change.

[0163] The controller calculates the minimum singular value corresponding to the second and third nodes respectively. When the minimum singular value of any node is less than 0.05, the angle of the fifth joint of that node is adjusted by 0.5 degrees in the direction away from 0 degrees, and the end pose and minimum singular value of that node are recalculated. When the distance between the adjusted end position and the original target position does not exceed 0.2 mm, the attitude angle difference does not exceed 0.1 degrees, and the minimum singular value is not less than 0.05, the adjusted node angle is adopted.

[0164] For each joint, the controller establishes three cubic curves based on the joint angles of the four nodes. The first segment connects the first node to the second node, the second segment connects the second node to the third node, and the third segment connects the third node to the fourth node. The controller uses the fact that adjacent curves have the same angle, the same angular velocity, and the same angular acceleration at the connecting node as calculation conditions to determine the four coefficients of each cubic curve segment.

[0165] Thus, all six joints maintain continuous angle, angular velocity, and angular acceleration when passing through the singular region.

[0166] After completing the cubic spline processing, the controller discretizes and interpolates the target joint variables. The controller calculates the difference between the target angle and the current angle of each of the six joints, and divides the absolute value of each difference by the allowable angular velocity of the corresponding joint to obtain the time required for each joint to complete this movement. The controller selects the maximum value among the six times as the duration of this trajectory.

[0167] In this embodiment, the joint control cycle is 20 milliseconds. This control cycle is determined by the operating frequency of the joint actuator receiving 50 angle commands per second. The controller divides the trajectory duration by 20 milliseconds, and rounds up the result if it has a decimal, to obtain the number of interpolation points. For example, the maximum required motion time for 6 joints is 0.6 seconds. Dividing 0.6 seconds by 20 milliseconds yields 30 interpolation points. The controller substitutes each interpolation moment into the cubic spline curve of the corresponding joint at 20 millisecond intervals to calculate the 6 joint angles at each interpolation moment.

[0168] The controller arranges the six joint angles corresponding to each interpolation moment in chronological order to form a joint angle control sequence for the automatic mirror traction frame robotic arm; each sequence unit in the control sequence includes the control moment, the six target joint angles, and the drive command number.

[0169] S8 includes acquiring and parsing the joint angle control sequence of the robotic arm of the automatic mirror traction frame to obtain an initial set of joint angle increments; determining the hierarchical limiting threshold matrix corresponding to the initial set of joint angle increments based on the operational accuracy constraints; reconstructing the initial set of joint angle increments and the hierarchical limiting threshold matrix to obtain a reconstructed joint angle increment sequence; filtering the reconstructed joint angle increment sequence to obtain a target joint angle increment sequence; and controlling the automatic mirror traction frame to perform displacement operations based on the target joint angle increment sequence to obtain a dynamic response amplitude adjustment result based on the device identity.

[0170] In the above embodiment, the controller receives the joint angle control sequence of the automatic mirror traction frame robotic arm. The robotic arm has 6 rotation joints, and the joint angle control sequence is arranged at a time interval of 20 milliseconds. Each sequence unit contains 6 target joint angles corresponding to the control time.

[0171] The controller parses the joint angle control sequence chronologically. For the first sequence unit, it subtracts the six current joint angles detected by the joint encoder from the six target joint angles to obtain the six initial joint angle increments for the first control cycle. For the second and subsequent sequence units, it subtracts the target joint angles from the previous sequence unit from the target joint angles in the current sequence unit to obtain the initial joint angle increments for the corresponding control cycle. The six initial joint angle increments for each control cycle are arranged in their original chronological order to form a set of initial joint angle increments.

[0172] For example, if the current angle of the first joint is 20 degrees, the first target angle is 20.4 degrees, and the second target angle is 20.9 degrees, then the initial joint angle increment of the first control cycle is 0.4 degrees, and the initial joint angle increment of the second control cycle is 0.5 degrees. A positive angle increment indicates that the joint is rotating in the positive direction, and a negative angle increment indicates that the joint is rotating in the negative direction.

[0173] After the initial set of joint angle increments is formed, the controller reads the operation accuracy constraints corresponding to the current control device. The operation accuracy constraints include at least the operator role, the upper limit of the basic angle increment for a single control cycle, the end displacement level, and the amplitude limiting coefficient corresponding to each joint.

[0174] In this embodiment, the upper limit of the basic angle increment for the chief surgeon is 0.5 degrees, for the surgical assistant it is 0.25 degrees, for the trained operator it is 0.1 degrees, and for the restricted trained operator it is 0.05 degrees. These values ​​are determined during the robotic arm calibration phase. During calibration, the robotic arm holds the laparoscope in a specified working posture. Starting from 0.01 degrees, the single-cycle joint angle increment is increased at 0.01-degree intervals. Each angle increment is executed 20 times consecutively. When the joint actuator does not output an overload signal during the 20 movements, the position error of the laparoscope end does not exceed 0.5 mm, and the change in the image center position does not exceed 10 pixels, the angle increment is recorded as a valid value. Based on the displacement permissions corresponding to the four types of operator roles, 0.5 degrees, 0.25 degrees, 0.1 degrees, and 0.05 degrees are selected from the valid values ​​as the upper limit of the basic angle increment, respectively.

[0175] Six joints were fitted with different joint limiting coefficients: the first and second joints had a coefficient of 1, the third and fourth joints had a coefficient of 0.8, and the fifth and sixth joints had a coefficient of 0.6. The joint limiting coefficients were obtained by joint-by-joint calibration. During calibration, only one joint was driven to rotate 0.1 degrees at a time, and the displacement generated at the end of the laparoscopy was recorded. The average displacement generated at the end of the laparoscopy by the first and second joints was used as the reference value. Based on the correspondence between the displacement generated at the end of the remaining joints and this reference value, limiting coefficients of 0.8 and 0.6 were determined.

[0176] The controller also determines the limiting level based on the end target displacement of the current control cycle. The end target displacement is calculated using the spatial coordinates of two adjacent targets. Specifically, the squares of the differences in the lateral, longitudinal, and vertical coordinates are calculated, the three squared values ​​are added together, and the square root of the sum is calculated. When the end target displacement is no more than 0.5 mm, Level 1 limiting is used, with a corresponding level coefficient of 0.4. When the end target displacement is greater than 0.5 mm but no more than 1.5 mm, Level 2 limiting is used, with a corresponding level coefficient of 0.7. When the end target displacement is greater than 1.5 mm, Level 3 limiting is used, with a corresponding level coefficient of 1.

[0177] The boundaries between the 0.5 mm and 1.5 mm levels were determined during the end-effector displacement calibration stage. During calibration, the end-effector single-cycle displacement was increased at 0.1 mm intervals, and the change in the center of the laparoscopic field of view was recorded. When the end-effector displacement did not exceed 0.5 mm, the change in the center of the field of view did not exceed 5 pixels; when the end-effector displacement was greater than 0.5 mm but not more than 1.5 mm, the change in the center of the field of view was 6 to 15 pixels; when the end-effector displacement exceeded 1.5 mm, the change in the center of the field of view exceeded 15 pixels. Based on this, 0.5 mm and 1.5 mm were used as the dividing values ​​for the three limiting levels.

[0178] The controller generates a 6-row, 3-column hierarchical limiting threshold matrix based on the upper limit of the base angle increment, the joint limiting coefficient, and the level coefficient. The 6 rows of the matrix correspond to the 6 joints, and the 3 columns correspond to the 3 limiting levels. The limiting threshold at each position is obtained by multiplying the upper limit of the base angle increment by the corresponding joint limiting coefficient and the corresponding level coefficient.

[0179] Taking the surgeon as an example, the upper limit of the basic angle increment is 0.5 degrees. The thresholds for the first and second joints under the three limiting levels are 0.2 degrees, 0.35 degrees, and 0.5 degrees, respectively; for the third and fourth joints, they are 0.16 degrees, 0.28 degrees, and 0.4 degrees, respectively; and for the fifth and sixth joints, they are 0.12 degrees, 0.21 degrees, and 0.3 degrees, respectively. The controller selects the corresponding column in the hierarchical limiting threshold matrix according to the end target displacement of the current control cycle, and compares the six limiting thresholds in that column with the six initial joint angle increments in the same control cycle.

[0180] If the absolute value of the initial joint angle increment does not exceed the corresponding limit threshold, the initial joint angle increment is retained. If the absolute value of the initial joint angle increment exceeds the corresponding limit threshold, its absolute value is truncated to the limit threshold, and the original rotation direction is retained. The difference between the absolute value before truncation and the limit threshold is used as the remaining angle increment and added to the initial joint angle increment of the next control cycle of the same joint.

[0181] For example, if the current limiting threshold for the 5th joint is 0.3 degrees and the initial joint angle increment is 0.45 degrees, the reconstructed joint angle increment for this control cycle is 0.3 degrees, and the remaining 0.15 degrees is added to the next control cycle for the 5th joint; if the original initial joint angle increment for the next control cycle is 0.2 degrees, then the merged angle increment to be processed is 0.35 degrees, and then reconstruction is performed according to the limiting threshold corresponding to that control cycle.

[0182] The controller also adds the currently measured joint angle to the reconstructed joint angle increment and compares the sum with the allowable angle range of the corresponding joint. If the sum exceeds the upper limit of the joint angle, the target angle for this control cycle is set as the upper limit of the joint angle; if the sum is less than the lower limit of the joint angle, the target angle is set as the lower limit of the joint angle. The remaining increments exceeding the allowable angle range are not carried over to the next control cycle. After each control cycle completes the above processing, a sequence of reconstructed joint angle increments is formed. The controller uses a 3-point weighted filtering method to process this sequence. For the angle increment located in the middle of the sequence, the reconstructed angle increment of the previous control cycle is multiplied by 0.25, the reconstructed angle increment of the current control cycle is multiplied by 0.5, and the reconstructed angle increment of the next control cycle is multiplied by 0.25. The three products are then added together to obtain the filtering result for the current control cycle.

[0183] For the first control cycle, multiply the first reconstructed angle increment by 0.75, multiply the second reconstructed angle increment by 0.25, and then add the two products together; for the last control cycle, multiply the second-to-last reconstructed angle increment by 0.25, multiply the last reconstructed angle increment by 0.75, and then add the two products together.

[0184] The above-mentioned filter coefficients are determined during the joint step calibration stage. During calibration, three sets of weighted coefficients are used to process the same joint angle sequence, and the joint angle overshoot and control delay are recorded. When the coefficient combination of 0.25, 0.5 and 0.25 is used, the joint angle overshoot does not exceed 0.1 degrees and the control delay is 1 control cycle. Therefore, this set of coefficients is written into the filter parameters.

[0185] After filtering, the controller compares the absolute value of each filtering result with the limiting threshold of the corresponding control cycle again. If the absolute value of the filtering result exceeds the limiting threshold, it is truncated to the limiting threshold; if it does not exceed the limiting threshold, the filtering result is retained. The joint angle increments after the second limiting are arranged according to the control time to form the target joint angle increment sequence. The controller uses the actual joint angle detected by the joint encoder as the starting value and accumulates the target joint angle increment item by item according to the 20-millisecond control cycle to obtain the target joint angle for each control cycle. The target joint angle is then sent to the corresponding joint driver. The six joints move according to the target joint angle, so that the laparoscopic clamping mechanism drives the laparoscope to complete the target displacement.

[0186] After each control cycle ends, the controller subtracts the actual joint angle detected by the joint encoder from the target joint angle to obtain the joint following error. When the following error of any joint exceeds 0.2 degrees, the controller pauses sending the target joint angle for the next control cycle and recalculates the remaining angle increment starting from the current actual joint angle. The following error threshold of 0.2 degrees is determined based on the repeatability accuracy of the joint actuator. The repeatability error of the joint actuator is 0.1 degrees. Twice of this error is taken as the following error threshold so that a single measurement error does not trigger recalculation, and correction is initiated when the continuous deviation reaches 0.2 degrees.

[0187] After the displacement operation is completed, the controller records the device identification, operator role, initial displacement, response amplitude, limiting level, actual angle increment of the six joints, and actual displacement of the laparoscopic end. This record serves as the result of dynamic response amplitude adjustment based on device identification, and is used to characterize the actual motion response of the current control device under its operational accuracy constraints.

[0188] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. An automatic control method for an automatic traction frame for laparoscopic surgery, characterized in that, include: S1. Obtain the device identity identifier of the access control device, and match the device identity identifier with a pre-established identity mapping table to determine the operator role corresponding to the control device; S2. Based on the operator's role, obtain the corresponding initial movement range limit from the preset permission allocation library to obtain the corresponding operation accuracy constraints of the control device. S3. Obtain the initial motion command sent by the control device, use the support vector machine algorithm to classify the displacement vectors contained in the initial motion command, and compare the magnitude of the displacement vector with the preset displacement threshold. S4. If the magnitude of the displacement vector is greater than the preset displacement threshold, determine whether the operation precision constraint includes movement permissions exceeding the preset displacement threshold, and obtain the permission determination result. S5. If the permission determination result is that the permission exceeds the preset displacement threshold, then generate the first response amplitude control signal according to the initial motion command and obtain the first mirror traction frame drive command. S6. If the magnitude of the displacement vector is not greater than the preset displacement threshold, or the permission determination result is that it does not contain movement permissions exceeding the preset displacement threshold, then the displacement vector of the initial motion command is scaled by the preset fine-tuning mapping function to obtain the second response amplitude control signal and obtain the second traction frame drive command. S7. The inverse kinematics algorithm is used to analyze the drive command of the first or second traction frame of the automatic traction frame to obtain the joint angle control sequence of the robotic arm of the automatic traction frame.

2. The automatic control method for an automatic traction frame for laparoscopic surgery according to claim 1, characterized in that: S1 includes: Extract the initial device identifier carried in the access request, and calculate the composite device fingerprint based on the initial device identifier; By matching the fingerprints of composite devices using an identity mapping table, the initial role label bound to the fingerprints of composite devices is obtained; Trust scores are obtained by examining the records corresponding to the initial role tags. If the trust score is lower than the preset threshold, the initial role label will be downgraded to a restricted role label; Based on the restricted role tag parsing instructions, determine the operator role corresponding to the control device.

3. The automatic control method for an automatic traction frame for laparoscopic surgery according to claim 1, characterized in that: S2 includes: Obtain the operator role and match the operator role with the permission allocation library to obtain the initial movement range limit; Generate basic motion vectors based on the initial movement range limit; Determine whether the magnitude of the basic motion vector is greater than a preset displacement threshold; If the magnitude of the base motion vector is greater than the preset displacement threshold, then the target motion vector is obtained by truncation. The operational accuracy constraints of the control equipment are determined based on the target motion vector.

4. The automatic control method for an automatic traction frame for laparoscopic surgery according to claim 1, characterized in that: S3 includes: Obtain the initial motion command sent by the control device, and parse the initial motion command to obtain the initial displacement vector; Obtain the initial vector magnitude based on the initial displacement vector; If the magnitude of the initial vector is greater than the preset displacement threshold, the initial displacement vector is mapped to obtain the target feature vector; The target motion trajectory category is obtained by classifying the target feature vector using the support vector machine algorithm, and the motion type corresponding to the initial motion command is determined based on the target motion trajectory category.

5. The automatic control method for an automatic traction frame for laparoscopic surgery according to claim 1, characterized in that: S4 includes: Obtain the displacement vector corresponding to the motion type, and extract the operation precision associated with the motion type when the magnitude of the displacement vector is greater than a preset displacement threshold; The corresponding constraints are analyzed based on the operational precision, and the constraint boundaries are extracted. The boundary crossing risk characteristics are obtained by comparing and classifying the constraint boundary with the preset displacement threshold, and the movement permission is determined based on the boundary crossing risk characteristics. If the movement permission contains a permission matching degree exceeding the preset displacement threshold, then a permission determination result based on the operation precision constraint is generated.

6. The automatic control method for an automatic traction frame for laparoscopic surgery according to claim 1, characterized in that: S5 includes: If the permission determination result includes movement permission exceeding the preset displacement threshold, then extract the motion trajectory vector based on the initial motion command; The first response amplitude is determined by matching the amplitude mapping matrix with the motion trajectory vector, and the first response amplitude is used to generate the first response amplitude control signal. The attitude of the traction frame is adjusted by the first response amplitude control signal to obtain the first guide mirror traction frame drive command.

7. The automatic control method for an automatic traction frame for laparoscopic surgery according to claim 1, characterized in that: S6 includes: Extract the displacement vector from the acquired initial motion command and calculate the magnitude of the displacement vector; If the magnitude of the displacement vector is not greater than the preset displacement threshold or the permission determination result is that it does not contain movement permissions exceeding the preset displacement threshold, then the micro-motion feature matrix is ​​extracted based on the displacement vector. The scaling displacement data is obtained by calling the fine-tuning mapping function using the micro-motion feature matrix. The scaling displacement data is generated by scaling the displacement vector using the fine-tuning mapping function. A second response amplitude control signal is generated based on the scaling displacement data. The second response amplitude control signal is used to adjust the attitude of the traction frame to obtain the second guide mirror traction frame drive command.

8. The automatic control method for an automatic traction frame for laparoscopic surgery according to claim 1, characterized in that: S7 includes: Obtain the first or second traction frame drive command, use a coordinate system transformation algorithm to parse the first or second traction frame drive command to obtain the target spatial pose, and extract the target coordinates and rotation matrix corresponding to the target spatial pose. The inverse kinematics algorithm is used to perform algebraic elimination calculations on the target coordinates and rotation matrix to obtain the initial joint variables; If the initial joint variables are in a singular configuration, a cubic spline interpolation algorithm is used to smooth the initial joint variables and obtain the target joint variables. Discretize and interpolate the target joint variables to obtain the joint angle control sequence of the automatic mirror traction frame robotic arm.

9. The automatic control method for an automatic traction frame for laparoscopic surgery according to claim 1, characterized in that, It also includes S8, which, based on the joint angle control sequence of the automated traction frame robotic arm, performs graded amplitude limiting reconstruction of the joint angle increments according to the operator's role and operational precision constraints, controls the automated traction frame for laparoscopic surgery to drive the laparoscope to perform corresponding displacement operations, and obtains dynamic response amplitude adjustment results based on device identity, specifically including: Obtain and parse the joint angle control sequence of the automatic mirror traction frame robotic arm to obtain the initial set of joint angle increments; Determine the hierarchical amplitude limiting threshold matrix corresponding to the initial set of joint angle increments based on the operational accuracy constraints; The initial set of joint angle increments and the graded amplitude limiting threshold matrix are reconstructed to obtain the reconstructed joint angle increment sequence.

10. The automatic control method for an automatic traction frame for laparoscopic surgery according to claim 9, characterized in that: S8 further includes: The reconstructed joint angle increment sequence is filtered to obtain the target joint angle increment sequence. The automatic traction frame is controlled to perform displacement operations based on the incremental sequence of the target joint angle, and the dynamic response amplitude adjustment result based on the device identity is obtained.