Surgical instrument positioning method, device and storage medium for breast endoscopy

CN122894052APending Publication Date: 2026-10-13AFFILIATED HOSPITAL OF JIANGSU UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611189343.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-06
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0005]本发明的主要目的在于提供一种用于乳腺腔镜手术的手术器械定位方法、装置及存储介质,旨在解决现有胸壁超声引导手术位姿定位技术存在参考架依赖、定位精度低、位姿不同步、稳定性差、适配性不足等技术问题

Benefits of technology

[0024]本发明提供的一种用于乳腺腔镜手术的手术器械定位方法、装置及存储介质,具备以下有益效果:无需部署外部参考架,超声探头与手术器械末端的定位过程不占用手术操作空间,且不影响超声扫描视野;通过双翼板永磁阵列构建的静磁梯度场在预设有效工作体积内满足近线性关系,结合六点标定法获得的梯度系数,可实现三维位置的高精度解算;采用磁阻传感器与IMU复合的定位架构,通过姿态四元数迭代算法对加速度与角速度数据进行融合,有效抑制了单一IMU长时间工作产生的姿态漂移;装置结构由永磁阵列、双复合传感器及位姿处理模块构成,各模块功能明确、部署灵活,能够适配胸壁手术的狭小操作环境,满足临床对定位精度与实时性的要求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122894052A_ABST
    Figure CN122894052A_ABST
Patent Text Reader

Abstract

The application provides a surgical instrument positioning device for breast endoscopic surgery, and belongs to the technical field of ultrasonic pose positioning. It aims to solve the problems of low precision and different pose in chest wall ultrasonic guided surgery positioning. The method constructs a near-linear static magnetic gradient field through a double-wing plate permanent magnet array, defines a unified world coordinate system, obtains parameters through six-point calibration, synchronously collects data through a double-composite sensor, and realizes six-degree-of-freedom synchronous positioning of the ultrasonic probe and the end of the surgical instrument without a reference frame through a special algorithm. The device includes a double-wing plate permanent magnet array, a double-composite sensor and a pose processing module, and also contains a computer readable storage medium storing the positioning method. The application does not require a reference frame, is accurate and stable in real time, has a simple structure and is convenient to deploy, is suitable for chest wall surgery scenes, can simplify the surgical process and reduce positioning deviation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of ultrasound positioning technology, specifically relating to a surgical instrument positioning method, device, and storage medium for breast endoscopic surgery. Background Technology

[0002] In ultrasound-guided endoscopic breast surgery, precise synchronous positioning of the ultrasound probe and the end of the surgical instrument with six degrees of freedom is a prerequisite for ensuring the safety and effectiveness of the surgery. It determines the accuracy of surgical procedures such as puncture and ablation, and thus affects the surgical efficacy and patient prognosis.

[0003] Currently, the pose positioning methods for ultrasound-guided chest wall surgery face the following technical challenges that urgently need to be addressed: In confined spaces such as ultrasound-guided chest wall surgery, traditional electromagnetic positioning systems often require the deployment of large-volume transmitting reference frames (i.e., reference devices fixed outside the patient or beside the operating table for transmitting positioning signals to establish spatial coordinate transformation relationships, including but not limited to electromagnetic field generators, optical marker sphere arrays, etc.). This not only occupies surgical space, but also causes severe nonlinear distortion of the magnetic field it generates near the chest wall, leading to decreased positioning accuracy; a single inertial sensor (Inertial Measurement)... Imaging unit (IMU) positioning technology is prone to cumulative attitude errors, which amplify over long periods of operation, making stable positioning impossible. The pose positioning of the ultrasound probe and the surgical instrument tip is often performed independently, lacking a unified spatial coordinate system. This leads to asynchronous poses, making it difficult to match the spatial relationship between the ultrasound image and the surgical instrument, resulting in positioning deviations. Existing positioning devices suffer from unreasonable sensor deployment, insufficient real-time data acquisition accuracy, complex structure, inconvenient deployment, and poor adaptability, failing to flexibly adapt to the diverse scenarios of ultrasound-guided chest wall surgery. Furthermore, the algorithm design of existing positioning methods is inadequate, with insufficient correlation between position and pose solutions, further impacting the accuracy and real-time performance of pose positioning.

[0004] In summary, in the confined surgical space of the chest wall, external reference frames cannot be deployed due to spatial conflicts with the ultrasound scanning window. Furthermore, the lack of a reference frame results in the ultrasound probe and surgical instrument tip losing a unified spatial reference, making real-time synchronous and precise six-degree-of-freedom pose positioning impossible. Specifically, this manifests as follows: traditional electromagnetic positioning reference frames occupy space and cause severe magnetic field distortion; the cumulative attitude error of a single IMU cannot be suppressed; the lack of a unified spatial reference between the ultrasound probe and surgical instrument leads to pose asynchrony; and existing devices have complex structures and poor adaptability. These problems make it difficult for current technologies to meet the clinical surgical requirements for precise, real-time, and interference-free synchronous six-degree-of-freedom pose positioning of the ultrasound probe and surgical instrument tip, necessitating a novel positioning technology to address these issues. Summary of the Invention

[0005] The main objective of this invention is to provide a surgical instrument positioning method, device, and storage medium for laparoscopic breast surgery, aiming to solve the technical problems of existing ultrasound-guided chest wall surgery positioning technology, such as reference frame dependence, low positioning accuracy, asynchronous positioning, poor stability, and insufficient adaptability.

[0006] To achieve the above objectives, the present invention provides a surgical instrument positioning device for endoscopic breast surgery, comprising: A dual-wing permanent magnet array is used to deploy in the target area of ​​the patient's chest wall surgery and to construct a triaxial near-linear static magnetic gradient field in the target area, providing a spatial reference for the world coordinate system; The composite sensor module integrates a magnetoresistive sensor, an inertial measurement unit (IMU), and a computing unit. It is deployed on the non-scanning working surface of the ultrasound probe and the end of the surgical instrument. The composite sensor is used to measure the magnetic induction intensity at six selected calibration points within the effective working volume of the static magnetic gradient field, and the computing unit calculates the gradient coefficient and zero drift term of the static magnetic gradient field. The data acquisition module is used to collect real-time data on magnetic induction intensity, acceleration, and angular velocity from composite sensors deployed on the non-scanning working surface of the ultrasound probe and the end of the surgical instrument. The position calculation module is used to calculate the three-dimensional position data of the ultrasound probe and the end of the surgical instrument based on the gradient coefficient and the zero drift term using a position solving algorithm. The attitude correction module is used to predict the attitude based on angular velocity data through attitude quaternion iteration and to perform attitude correction using acceleration data, thereby obtaining three-dimensional attitude data of the ultrasound probe and the end of the surgical instrument. The attitude output module is used to obtain the six-degree-of-freedom pose of the ultrasound probe and the end effector of the surgical instrument in the world coordinate system based on the three-dimensional position data and the three-dimensional attitude data.

[0007] The device constructs a near-linear static magnetic gradient field using a dual-wing permanent magnet array. Dual composite sensors simultaneously acquire three types of data: magnetic induction intensity, acceleration, and angular velocity. Without the need for an external reference frame, it achieves six-degree-of-freedom synchronous positioning of the ultrasound probe and the surgical instrument tip, meeting the accuracy and real-time requirements of chest wall ultrasound-guided surgery for posture positioning. Specifically: Gradient coefficients and zero-drift terms are obtained through a six-point calibration method, and the calibration parameters are solidified into reusable constants. Compared to solutions requiring on-site measurements for each positioning, preoperative calibration allows intraoperative positioning to utilize only stored parameters, effectively shortening surgical preparation time. By transforming the magnetic induction intensity to a unified world coordinate system via an attitude rotation matrix, the conversion deviation between the composite sensor's local coordinate system and the world coordinate system is eliminated, ensuring the accuracy of three-dimensional position calculation. An attitude quaternion iterative solution algorithm fuses acceleration and angular velocity data, continuously correcting the gyroscope's integral prediction value with acceleration observations, effectively suppressing attitude drift caused by long-term operation of a single IMU and achieving long-term stable attitude estimation.

[0008] Based on the surgical instrument positioning device for endoscopic breast surgery, the present invention also provides a positioning method, comprising: Within the effective working volume of the triaxial near-linear static magnetic gradient field constructed by the double-wing permanent magnet array, the gradient coefficients and zero-drift terms of the static magnetic gradient field are obtained through calibration operations. The data acquisition module acquires real-time magnetic induction intensity, acceleration, and angular velocity data from the composite sensor. The position calculation module calculates the three-dimensional position data of the ultrasound probe and the end of the surgical instrument based on the gradient coefficient and the zero drift term, and uses the position solving algorithm. The attitude correction module uses angular velocity data to predict the attitude using attitude quaternions iteratively, and uses acceleration data to correct the attitude, thus obtaining the three-dimensional attitude data of the ultrasound probe and the end of the surgical instrument. Based on the three-dimensional position data and three-dimensional posture data, the pose output module obtains the six-degree-of-freedom pose of the ultrasound probe and the surgical instrument tip in the world coordinate system.

[0009] In a specific feasible implementation, the origin of the world coordinate system is the geometric center of the metal-free scanning window of the dual-wing permanent magnet array, which, when deployed, coincides with the center point of the skin surface at the ultrasound-guided surgical target area on the patient's chest wall during skin-to-skin scanning. The direction is horizontal, parallel to the surface of the patient's chest wall skin, pointing towards the outer side of the patient's chest wall. The direction is parallel to the patient's chest wall skin surface and is in harmony with The cephalothorax, perpendicular to the axis, points towards the patient's head. The direction is along the normal to the surface of the patient's chest wall skin, pointing towards the inside of the patient's chest cavity. Direction along The direction points outward from the patient's body. A unified world coordinate system adapted to the patient's chest wall anatomy is defined. The origin of this coordinate system is located at the center point of the skin surface in the ultrasound-guided scanning area, and its three axes are aligned with the horizontal direction of the human body, the head-to-foot direction, and the chest wall normal direction, respectively. By establishing this coordinate system, the conversion error caused by pose fusion of the ultrasound probe and surgical instruments under different spatial references is eliminated, thus improving the accuracy of pose calculation.

[0010] In a specific feasible implementation, the approximate linear relationship of the triaxial near-linear magnetostatic gradient field in the world coordinate system is as follows: , , ,in , , These are the gradient coefficients. , , For zero drift items, , , These are the coordinates of the spatial point on the corresponding coordinate axes in the world coordinate system.

[0011] In a specific feasible implementation, the calibration module uses six calibration points as follows: , , , , , , in, This refers to the distance between two relative calibration points on the same coordinate axis. The thickness of the wing plate in the dual-wing permanent magnet array; Gradient coefficients , , The calculation formulas are as follows:

[0012] Zero drift item , , The calculation formula is:

[0013] in, , Points , The magnetic flux density along the X-axis. , Points , The magnetic flux density along the Y-axis , Points , The magnetic flux density along the Z-axis. For point The three-axis magnetic induction intensity vector is obtained; after calibration, the gradient coefficients and zero-drift terms are stored for calculating the six-degree-of-freedom pose. The distribution of calibration points is adapted to the gradient field structure and is within the effective working range. The calculation formulas for the gradient coefficients and zero-drift terms are simple and operable. The obtained calibration parameters are accurate and can be repeatedly called, which can shorten the surgical preparation time and provide accurate and reliable parameter support for subsequent pose solving.

[0014] In a specific feasible implementation, the effective working volume of the magnetostatic gradient is within ±5% of the linearity error. :

[0015] All calibration points are located within the effective working volume. The effective working volume of the static magnetic gradient field is quantitatively defined within ±5% of the linearity error, and all six calibration points are within this range. This ensures that the target area of ​​the chest wall surgery is within the precise positioning range throughout the entire procedure, taking into account both the comprehensiveness and reliability of the pose positioning, and avoiding positioning deviations caused by the composite sensor exceeding its effective range.

[0016] In one specific feasible implementation, the magnetic induction intensity collected in real time by the data acquisition module is: acceleration is and angular velocity ; magnetic induction intensity via attitude rotation matrix Transform to world coordinate system to obtain attitude rotation matrix From the optimal pose quaternion Obtained through conversion; Three-dimensional position data is a three-dimensional position vector. The calculation formula is:

[0017] in, The gradient coefficient matrix, for The inverse matrix, The vector of zero-drift terms; The three-dimensional attitude data is obtained by iteratively solving the attitude quaternion. Optimal pose quaternion at time step Based on predictive quaternions The predicted quaternion is obtained from acceleration correction and is calculated using the following formula:

[0018] in, For the first Time based on the first Predicting quaternions at time points For the first The optimal quaternion at time 1. Represents quaternion multiplication. For the first Angular velocity vector at time t, for The length of the mold, The sampling time interval; based on the predicted quaternion. By combining acceleration information for attitude calibration fusion, the first result is obtained. Optimal pose quaternion at time step The magnetic field strength collected by the composite sensor is transformed to a unified world coordinate system using an attitude rotation matrix to ensure the accuracy of the position solution. The attitude quaternion iterative solution algorithm avoids the Euler angle singularity problem. Combined with acceleration data for attitude fusion calibration, it can effectively offset the cumulative attitude error of the IMU sensor and achieve synchronous and accurate position and pose solution of the ultrasound probe and the end effector of the surgical instrument.

[0019] In a specific feasible implementation, the attitude quaternion output by the attitude correction module With attitude rotation matrix The correspondences include: attitude quaternions The attitude rotation matrix obtained by transformation according to general mathematical rules And the attitude rotation matrix From roll angle Pitch angle , heading angle Represented as:

[0020] in, , , These are rotation matrices representing the angles of rotation around the X, Y, and Z axes, respectively. The attitude rotation matrices provide a direct visual representation of the attitude state of the ultrasound probe and the surgical instrument tip. By clearly defining the correspondence between attitude quaternions and attitude rotation matrices, abstract attitude quaternions and rotation matrices can be converted into roll, pitch, and yaw angles that are easily understood by medical personnel. This not only meets the needs of subsequent processing such as ultrasound image fusion and surgical path planning but also facilitates medical personnel in judging the appropriateness of the ultrasound probe and surgical instrument's attitude.

[0021] The six-degree-of-freedom poses of the surgical instrument positioning ultrasound probe and the distal end of the surgical instrument relative to the world coordinate system for endoscopic breast surgery are represented by pose matrices as follows:

[0022] in, Let be the pose matrix of the ultrasonic probe relative to the world coordinate system. This is the attitude rotation matrix of the ultrasonic probe. This represents the three-dimensional position vector of the ultrasonic probe. Let be the pose matrix of the surgical instrument tip relative to the world coordinate system. This is the attitude rotation matrix of the surgical instrument tip. This represents the three-dimensional position vector of the surgical instrument's tip; Let be the pose matrix of the surgical instrument tip relative to the world coordinate system. This is the attitude rotation matrix of the surgical instrument tip. This represents the three-dimensional position vector of the surgical instrument's end effector. By integrating the posture rotation matrix with the position vector through the pose matrix, the output format of the pose data is standardized. This clearly reflects the spatial relative relationship between the ultrasound probe and the surgical instrument's end effector relative to the world coordinate system, providing standardized data support for real-time surgical navigation and thus improving surgical efficiency.

[0023] In one specific implementation, the device also includes heading assistance correction: During the static initialization phase, the direction of the magnetic flux density measured by the magnetoresistive sensor is related to the theoretical direction vector of the static magnetic gradient field. Align the parts and obtain the initial heading angle; During the dynamic positioning phase, when the rate of change of magnetic induction intensity is detected to be lower than the threshold for multiple consecutive frames, the direction of magnetic induction intensity is used as the heading observation constraint to suppress yaw angle drift. Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set. This instruction, program, code set, or instruction set is loaded and executed by a processor to control the surgical instrument positioning device to perform positioning operations. Storing the aforementioned positioning method in the form of instructions or programs on a computer-readable storage medium allows it to be loaded and executed by a processor, adapting to different types of processors and positioning devices. It can also be flexibly updated and optimized according to clinical needs without modifying the device's hardware structure, thus reducing the research and development and production costs of the positioning device.

[0024] This invention provides a surgical instrument positioning method, device, and storage medium for laparoscopic breast surgery, which has the following advantages: No external reference frame is required; the positioning process between the ultrasound probe and the end of the surgical instrument does not occupy the surgical operating space and does not affect the ultrasound scanning field of view; the static magnetic gradient field constructed by the dual-wing permanent magnet array satisfies a near-linear relationship within a preset effective working volume; combined with the gradient coefficient obtained by the six-point calibration method, high-precision calculation of three-dimensional position can be achieved; a positioning architecture combining a magnetoresistive sensor and an IMU is adopted, and the acceleration and angular velocity data are fused through an attitude quaternion iterative algorithm, effectively suppressing attitude drift caused by long-term operation of a single IMU; the device structure consists of a permanent magnet array, dual composite sensors, and a pose processing module. Each module has a clear function and flexible deployment, adaptable to the confined operating environment of chest wall surgery, and meets clinical requirements for positioning accuracy and real-time performance. Attached Figure Description

[0025] Figure 1 This illustration shows a flowchart of a surgical instrument positioning method for laparoscopic breast surgery provided by an exemplary embodiment of this application; Figure 2 This illustration shows a schematic diagram of a surgical instrument positioning device for laparoscopic breast surgery provided in an exemplary embodiment of this application; Figure 3 This illustration shows a structural block diagram of a computer device provided in an exemplary embodiment of this application. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0027] In this article, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0028] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0029] Example 1, see Figure 1 As shown, the working process and positioning method of the surgical instrument positioning device for endoscopic breast surgery provided in this application are as follows: The S100 dual-wing permanent magnet array is deployed in the target area of ​​the patient's chest wall surgery. The dual-wing permanent magnet array constructs a three-axis near-linear static magnetic gradient field and establishes a world coordinate system based on it. Six calibration points are selected within the effective working volume of the static magnetic gradient field. The magnetic induction intensity of each calibration point is measured by a composite sensor, and the gradient coefficient and zero drift term of the static magnetic gradient field are calculated. The composite sensor is an integration of a magnetoresistive sensor and an inertial measurement unit (IMU). First, a preoperative ultrasound scan is performed on the target area of ​​the patient's chest wall ultrasound-guided surgery to clarify the range and location of the target area. Then, the dual-wing permanent magnet array is deployed in this area. The array consists of two symmetrical and parallel wings made of neodymium iron boron permanent magnet material. The distance between the two wings is preferably 50-80 mm to match the width of the target area of ​​the chest wall surgery. A metal-free scanning window is set in the middle of the wings to ensure that it does not interfere with the scanning field of view of the ultrasound probe.

[0030] Before constructing the triaxial near-linear static magnetic gradient field, a world coordinate system is defined as a unified spatial reference for adapting to the target area of ​​ultrasound-guided chest wall surgery, addressing the pose deviation problem caused by the lack of a unified spatial reference in existing technologies. The world coordinate system serves as a unified spatial reference for adapting to the target area of ​​ultrasound-guided chest wall surgery. Its origin is the geometric center of the metal-free scanning window of the dual-wing permanent magnet array. This center, during deployment, coincides with the center point of the skin surface at the ultrasound-guided skin-to-skin scanning location of the target area in the patient's ultrasound-guided chest wall surgery. The direction is horizontal, parallel to the surface of the patient's chest wall skin, pointing towards the outer side of the patient's chest wall. The direction is parallel to the patient's chest wall skin surface and is in harmony with The cephalothorax, perpendicular to the axis, points towards the patient's head. The direction is along the normal to the surface of the patient's chest wall skin, pointing towards the inside of the patient's chest cavity. Direction along The direction points outward from the patient's body. A unified world coordinate system adapted to the patient's chest wall anatomy is defined. The origin of this coordinate system is located at the center point of the skin surface in the ultrasound-guided scanning area, and its three axes are aligned with the horizontal direction of the human body, the head-to-foot direction, and the chest wall normal direction, respectively. By establishing this coordinate system, the conversion error caused by pose fusion of the ultrasound probe and surgical instruments under different spatial references is eliminated, thus improving the accuracy of pose calculation.

[0031] The S200 and multiple composite sensors are respectively fixed to the non-scanning working surface of the ultrasound probe and the end of the surgical instrument. The data acquisition module acquires the real-time magnetic induction intensity, acceleration, and angular velocity data collected by each composite sensor, and calculates the gradient coefficient and zero drift term of the static magnetic gradient field through the calculation unit. Two composite sensors are started synchronously to collect the magnetic induction intensity in real time. acceleration and angular velocity acceleration Used to assist in attitude fusion calibration and offset the accumulated errors in the attitude solution process, the acquisition frequency is set to 110Hz to ensure the real-time nature of data acquisition and meet the real-time requirements of surgical positioning; through synchronous acquisition by dual composite sensors, it makes up for the shortcomings of existing single sensor positioning that lacks attitude information or is prone to error accumulation, and provides comprehensive data support for subsequent synchronous pose solution.

[0032] Coverage verification of the constructed triaxial near-linear static magnetic gradient field: 10-15 detection points were uniformly selected in the target area of ​​ultrasound-guided surgery on the chest wall using magnetoresistive sensors, and magnetic induction intensity data of each detection point were collected to verify whether the magnetic field completely covered the target area of ​​the surgery, and whether the linearity error of the magnetic field was controlled within ±5%, so as to ensure that the coverage of the gradient field matched the surgical requirements.

[0033] A six-point calibration operation was performed on the verified triaxial near-linear magnetic static gradient field to obtain the gradient coefficients. and zero drift items The near-linear triaxial magnetic gradient field satisfies the following approximate linear relationship in the world coordinate system: , , ,in These are the coordinates of a point in space on the corresponding coordinate axes in the world coordinate system. This linear relationship establishes a direct correspondence between magnetic induction intensity and spatial coordinates, simplifying the subsequent position calculation process and clarifying the calibration target.

[0034] Six calibration points were selected within the effective working volume of the gradient field for six-point calibration. The six calibration points are as follows: , , , , , ,in A value of 40mm can be selected (i.e., the distance between two relative calibration points on the same coordinate axis is 40mm), but it is not limited to this. The thickness of the wing plate of the dual-wing permanent magnet array is preferably 10 mm; the six calibration points are respectively distributed at... The three-axis direction clarifies the linear relationship of the three-axis static magnetic gradient field in the world coordinate system and establishes a direct correspondence between magnetic induction intensity and spatial coordinates. This not only simplifies the calculation process for subsequent position determination but also clarifies the calibration targets for gradient coefficients and zero drift terms. It can reduce positioning deviations caused by nonlinear magnetic fields and ensure the accuracy of pose positioning.

[0035] In this embodiment, the effective working volume of the magnetic static gradient is within ±5% of the linearity error. satisfy: The effective working volume of the static magnetic gradient field within ±5% of the linear error is quantitatively defined, and the calibration points of the six-point calibration are all within this range. This ensures that the target area of ​​the chest wall surgery is within the precise positioning range throughout the entire process, taking into account the comprehensiveness and reliability of the pose positioning, and avoiding positioning deviations caused by the composite sensor exceeding the effective range.

[0036] During calibration, the composite sensor is placed sequentially at six calibration points. After the composite sensor data stabilizes, the magnetic flux density data at each point is collected. Based on the six calibration points and their corresponding magnetic flux densities, the gradient coefficient is calculated. , , and zero drift item , , , where gradient coefficients , , The calculation formulas are as follows:

[0037] The formula for calculating the zero drift term is:

[0038] in, , Points , The magnetic flux density along the X-axis. , Points , The magnetic flux density along the Y-axis , Points , The magnetic flux density along the Z-axis. For point The three-axis magnetic induction intensity vector is obtained; after calibration, the gradient coefficients and zero-drift terms are stored for calculating the six-degree-of-freedom pose. The distribution of calibration points is adapted to the gradient field structure and is within the effective working range. The calculation formulas for the gradient coefficients and zero-drift terms are simple and operable. The obtained calibration parameters are accurate and can be repeatedly called, which can shorten the surgical preparation time and provide accurate and reliable parameter support for subsequent pose solving.

[0039] S300, the position calculation module calculates the three-dimensional position data of the ultrasound probe and the end of the surgical instrument based on the gradient coefficient and the zero drift term through the position solving algorithm; The S400 posture correction module uses angular velocity data to predict posture through posture quaternions and uses acceleration data to correct posture, thus obtaining three-dimensional posture data of the ultrasound probe and the end of the surgical instrument. The S500 pose output module obtains the six-degree-of-freedom pose of the ultrasound probe and the surgical instrument tip in the world coordinate system based on three-dimensional position data and three-dimensional posture data, realizing synchronous positioning of the two without a reference frame.

[0040] The obtained gradient coefficients , , and zero drift items , , The pose processing module is imported, and combined with the three types of real-time data collected, a dedicated algorithm is used to solve the six-degree-of-freedom pose of the ultrasound probe and the surgical instrument tip. The specific process is as follows: The magnetic induction intensity collected by the two composite sensors via attitude rotation matrix Transform to world coordinate system to obtain To ensure that the magnetic induction intensity data is consistent with the unified coordinate system reference, and to avoid position calculation errors caused by coordinate system mismatch; subsequently, a gradient coefficient matrix is ​​constructed based on the gradient coefficients. Calculate its inverse matrix Combined with zero drift term vector Solve for the three-dimensional position vector 3D position vector The calculation formula is:

[0041] in, The gradient coefficient matrix, for The inverse matrix, This is a zero-drift term vector; the calculation process is simple and can quickly and accurately obtain spatial location data, ensuring the accuracy of location positioning.

[0042] An iterative algorithm based on attitude quaternions, combined with acceleration and angular velocity data acquired by a composite sensor, is used to solve for the three-dimensional attitude data. Specifically, the attitude quaternions are first initialized, and then the 3D attitude data is calculated. Time based on the first Predicting quaternions at time Based on predicted quaternions By combining acceleration data for attitude calibration fusion, the accumulated errors in the IMU sensor attitude solution process are offset, and the first result is obtained. Optimal pose quaternion at time step . No. Optimal pose quaternion at time step The calculation formula is:

[0043] in, For the first Time based on the first Predicting quaternions at time points For the first The optimal quaternion at time 1. Represents quaternion multiplication. For the first The angular velocity vector output by the composite sensor at any given time. for The length of the mold, The sampling time interval for the composite sensor; based on predicted quaternions. By combining acceleration information for attitude calibration fusion, the first result is obtained. Optimal pose quaternion at time step The magnetic field strength collected by the composite sensor is transformed to a unified world coordinate system using an attitude rotation matrix to ensure the accuracy of the position solution. The attitude quaternion iterative solution algorithm avoids the Euler angle singularity problem. Combined with acceleration data for attitude fusion calibration, it can effectively offset the cumulative attitude error of the IMU sensor and achieve synchronous and accurate position and pose solution of the ultrasound probe and the end effector of the surgical instrument.

[0044] In obtaining the predicted quaternion Subsequently, this embodiment employs an attitude fusion algorithm based on gradient descent for calibration. First, the predicted quaternion is transformed to obtain the predicted gravity vector in the carrier coordinate system. And compared with the normalized gravity vector measured by the accelerometer. Compare and construct the error function Then, the gradient of the error function is calculated. The predicted quaternions are corrected along the negative gradient direction. The formula for calculating the correction of the predicted quaternions is as follows:

[0045] in is the step size factor. The corrected quaternion is the th... The optimal attitude quaternion at any given time. This algorithm effectively suppresses gyroscope integral drift and has low computational cost, making it suitable for real-time positioning. In other embodiments, an extended Kalman filter (EKF) or an unscented Kalman filter (UKF) can also be used to fuse acceleration and angular velocity data. The specific implementation of these methods is common knowledge in the field and will not be elaborated here.

[0046] In an alternative implementation of this embodiment, attitude fusion calibration can also employ the extended Kalman filter algorithm. Specifically, a system state vector is defined, where is the attitude quaternion and is the gyroscope zero bias. The system state prediction equation is:

[0047] Where f is the quaternion propagation function based on angular velocity. Using the normalized gravity vector of the accelerometer in the carrier coordinate system as the observation value, the observation equation is:

[0048] in This is the gravity vector in the world coordinate system. To account for observation noise, the prediction-update loop of the standard EKF is used to obtain the first... The optimal attitude estimation at any given time. The EKF scheme has better convergence accuracy in scenarios where the noise statistics of composite sensors are known, and is suitable for complex surgical scenarios with higher positioning accuracy requirements.

[0049] In another alternative implementation, unscented Kalman filtering (UKF) can also be used for attitude fusion. UKF approximates the state distribution through Sigma point sampling, avoiding the linearization error of the Jacobian matrix in EKF, and exhibits better estimation consistency when handling strongly nonlinear systems. Its system state definition and prediction equations are the same as EKF; the difference lies in the use of unscented transformation instead of linearization operations in the state propagation and update steps. Those skilled in the art can choose the appropriate attitude fusion scheme from gradient descent, EKF, and UKF based on the real-time and accuracy requirements of the surgical scenario.

[0050] Posture Quaternion There is a fixed correspondence with the attitude rotation matrix R, which can be used to calculate the optimal attitude quaternion. Convert to an attitude rotation matrix R, and simultaneously this rotation matrix... It can be determined by the roll angle Pitch angle , heading angle The formula for calculating the rotation matrix is:

[0051] in, These are rotation matrices representing the angles of rotation around the X, Y, and Z axes, respectively. The attitude rotation matrices provide a direct visual representation of the attitude state of the ultrasound probe and the surgical instrument tip. Clarifying the correspondence between attitude quaternions and attitude rotation matrices allows for the conversion of abstract attitude quaternions and rotation matrices into roll, pitch, and yaw angles that are easily understood by medical personnel. This adapts to subsequent processing needs such as ultrasound image fusion and surgical path planning, and also facilitates medical personnel in determining the appropriateness of the ultrasound probe and surgical instrument's attitude. This aligns with subsequent surgical path planning requirements.

[0052] Three-dimensional position vector With attitude rotation matrix By integrating the data, we obtain the six-degree-of-freedom pose matrix of the ultrasound probe and the surgical instrument tip relative to the world coordinate system: the pose matrix of the ultrasound probe. The pose matrix of the surgical instrument tip The six-degree-of-freedom poses of the ultrasound probe and the surgical instrument tip relative to the world coordinate system are represented by pose matrices as follows:

[0053] in, Let be the pose matrix of the ultrasonic probe relative to the world coordinate system. This is the attitude rotation matrix of the ultrasonic probe. This represents the three-dimensional position vector of the ultrasonic probe. Let be the pose matrix of the surgical instrument tip relative to the world coordinate system. This is the attitude rotation matrix of the surgical instrument tip. This represents the three-dimensional position vector of the surgical instrument's end effector. By integrating the posture rotation matrix with the position vector through a pose matrix, the output format of the pose data is standardized. This clearly reflects the spatial relative relationship between the ultrasound probe and the surgical instrument's end effector relative to the world coordinate system, providing standardized data support for real-time surgical navigation and thus improving surgical efficiency. This pose matrix standardizes the output format of the pose data, clearly reflecting the spatial relative relationship between the two, providing standardized data support for real-time surgical navigation, and enabling reference-free synchronous positioning of the ultrasound probe and surgical instrument's end effector. It eliminates the need for an external reference frame, simplifying surgical procedures and improving operational flexibility. Furthermore, by storing the aforementioned positioning method as instructions on a computer-readable storage medium, it can be loaded and executed by different types of processors. The positioning algorithm can be updated without modifying the device hardware, reducing the upgrade and deployment costs of this positioning technology.

[0054] In one specific feasible implementation, the surgical instrument positioning method for endoscopic breast surgery further includes heading-assisted correction: during the static initialization phase, the direction of the magnetic induction intensity measured by a magnetoresistive sensor is aligned with the theoretical direction vector of the static magnetic gradient field. Alignment is performed to obtain the initial heading angle; during the dynamic positioning phase, when the rate of change of magnetic induction intensity is detected to be lower than the threshold for multiple consecutive frames, the direction of magnetic induction intensity is used as the heading observation constraint to suppress yaw angle drift.

[0055] By constructing a near-linear static magnetic gradient field using a dual-wing permanent magnet array, and simultaneously acquiring three types of data—magnetic induction intensity, acceleration, and angular velocity—without the need for an external reference frame, six-degree-of-freedom synchronous positioning of the ultrasound probe and the end of the surgical instrument can be achieved, meeting the accuracy and real-time requirements of chest wall ultrasound-guided surgery for posture positioning. This invention provides a surgical instrument positioning method, device, and storage medium for laparoscopic breast surgery, which has the following advantages: No external reference frame is required; the positioning process between the ultrasound probe and the end of the surgical instrument does not occupy the surgical operating space and does not affect the ultrasound scanning field of view; the static magnetic gradient field constructed by the dual-wing permanent magnet array satisfies a near-linear relationship within a preset effective working volume; combined with the gradient coefficient obtained by the six-point calibration method, high-precision calculation of three-dimensional position can be achieved; a positioning architecture combining a magnetoresistive sensor and an IMU is adopted, and the acceleration and angular velocity data are fused through an attitude quaternion iterative algorithm, effectively suppressing attitude drift caused by long-term operation of a single IMU; the device structure consists of a permanent magnet array, dual composite sensors, and a pose processing module. Each module has a clear function and flexible deployment, adaptable to the confined operating environment of chest wall surgery, and meets clinical requirements for positioning accuracy and real-time performance.

[0056] Example 2. Furthermore, to achieve the above objectives, see [link to example]. Figure 2 As shown, the present invention also provides a surgical instrument positioning device for endoscopic breast surgery, the device comprising: The dual-wing permanent magnet array 610 is used to deploy in the target area of ​​the patient's chest wall surgery, and to build a three-axis near-linear static magnetic gradient field in the target area and provide a spatial reference for the world coordinate system. The composite sensor module 620 integrates a magnetoresistive sensor, an inertial measurement unit (IMU), and a computing unit. It is deployed on the non-scanning working surface of the ultrasound probe and the end of the surgical instrument. The composite sensor is used to measure the magnetic induction intensity at six selected calibration points within the effective working volume of the static magnetic gradient field, and the computing unit calculates the gradient coefficient and zero drift term of the static magnetic gradient field. The data acquisition module 630 is used to acquire real-time magnetic induction intensity, acceleration and angular velocity data from composite sensors deployed on the non-scanning working surface of the ultrasound probe and the end of the surgical instrument. The position calculation module 640 is used to calculate the three-dimensional position data of the ultrasound probe and the end of the surgical instrument based on the gradient coefficient and the zero drift term through the position solving algorithm; The attitude correction module 650 is used to predict the attitude based on angular velocity data through attitude quaternion iteration and to perform attitude correction using acceleration data, so as to obtain the three-dimensional attitude data of the ultrasound probe and the end of the surgical instrument. The attitude output module 660 is used to obtain the six-degree-of-freedom pose of the ultrasound probe and the end effector of the surgical instrument in the world coordinate system based on the three-dimensional position data and the three-dimensional attitude data.

[0057] The device consists of a dual-wing permanent magnet array 610, a composite sensor 620, a data acquisition module 630, a position calculation module 640, an attitude correction module 650, and an attitude output module 660. Each module has a clear division of functions and a simple overall structure, making it suitable for the confined operating environment of chest wall surgery. The deployment position of the composite sensor does not affect ultrasound scanning and surgical operations. It has a high degree of integration and can stably achieve the aforementioned positioning method.

[0058] Example 3: Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set. This instruction, program, code set, or instruction set is loaded and executed by a processor to implement a surgical instrument positioning method for breast endoscopic surgery. Storing the aforementioned positioning method in the form of instructions or programs on a computer-readable storage medium allows it to be loaded and executed by a processor, adapting to different types of processors and positioning devices. It can also be flexibly updated and optimized according to clinical needs without modifying the device's hardware structure, thus reducing the research and development and production costs of the positioning device.

[0059] The computer-readable storage medium provided in this embodiment is a USB flash drive, hard disk, or ROM read-only memory. The storage medium stores at least one instruction, at least one program, code set, or instruction set. The instruction, program, code set, or instruction set is loaded and executed by a processor (such as the STM32H743 microprocessor in Embodiment 2) to implement the surgical instrument positioning method for breast endoscopic surgery in Embodiment 1.

[0060] Specifically, the programs stored in the storage medium include: a gradient field calibration program (used to control the composite sensor to complete six-point calibration, calculate and store gradient coefficients and zero-drift terms), a data acquisition program (used to control the two composite sensors to synchronously acquire three types of data), a pose solving program (used to execute position solving algorithms and pose quaternion iterative solving algorithms), and a data output program (used to output pose data to a display device). This storage medium is highly versatile and adaptable to different types of processors and positioning devices. The positioning method can be loaded and executed without modifying the hardware structure of the positioning device. Furthermore, the stored programs can be flexibly updated and optimized according to clinical needs, reducing the research and development and production costs of the positioning device and facilitating the clinical promotion and reuse of this positioning technology.

[0061] When the positioning method needs to be updated, the optimized program only needs to be written to the storage medium, and the processor can load the updated program. The operation is convenient, effectively improving the scalability of positioning technology and further promoting the application of the technology.

[0062] It should be noted that the surgical instrument positioning device for breast endoscopic surgery provided in this embodiment is only an example illustrating the division of the above-mentioned functional modules / units. In practical applications, the above functions can be assigned to different functional modules / units as needed, that is, the internal structure of the surgical instrument positioning device for breast endoscopic surgery can be divided into different functional modules / units to complete all or part of the functions described above. Furthermore, the implementation method of the surgical instrument positioning method for breast endoscopic surgery provided in the above method embodiment and the implementation method of the IMU-composite six-degree-of-freedom pose positioning device provided in this embodiment belong to the same concept. The specific implementation process of the surgical instrument positioning device for breast endoscopic surgery provided in this embodiment is detailed in the above method embodiment and will not be repeated here.

[0063] Figure 3 This illustration shows a structural block diagram of a computer device provided in an exemplary embodiment of this application. The computer device can be a desktop computer, a laptop computer, a handheld computer, or a cloud server, etc. The computer device may include, but is not limited to, a processor and memory. The processor and memory can be connected via a bus or other means. The processor can be a Central Processing Unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, graphics processing units (GPUs), embedded neural network processing units (NPUs) or other dedicated deep learning coprocessors, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.

[0064] The processor may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor may also include a main processor and coprocessors. The main processor, also known as the CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, the processor may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0065] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods in the above embodiments of this application. The processor executes various functional applications and data processing by running the non-transitory software programs, instructions, and modules stored in the memory, thereby implementing the methods in the above embodiments. The memory may include a program storage area and a data storage area, wherein the program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created by the processor, etc. Furthermore, the memory may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0066] In some embodiments, the computer device may also optionally include: a peripheral device interface and at least one peripheral device. The processor, memory, and peripheral device interface can be connected via a bus or signal lines. Each peripheral device can be connected to the peripheral device interface via a bus, signal lines, or a circuit board. Specifically, the peripheral device includes at least one of: a radio frequency circuit, a display screen, and a keyboard.

[0067] Peripheral device interfaces can be used to connect at least one I / O (Input / Output) related peripheral device to the processor and memory. In some embodiments, the processor, memory, and peripheral device interface are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor, memory, and peripheral device interface can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0068] The display screen is used to display the UI (User Interface). This UI can include graphics, text, icons, videos, and any combination thereof. When the display screen is a touch screen, it also has the ability to collect touch signals on or above the surface of the display. These touch signals can be input as control signals to a processor for processing. In this case, the display screen can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen, located on the front panel of the computer device; in other embodiments, there may be at least two display screens, respectively located on different surfaces of the computer device or in a folded design; in still other embodiments, the display screen may be a flexible display screen, located on a curved or folded surface of the computer device. Furthermore, the display screen can be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0069] A power supply is used to power the various components in a computer device. The power supply can be alternating current (AC), direct current (DC), a disposable battery, or a rechargeable battery. When the power supply includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is charged via a wired connection, while a wireless rechargeable battery is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0070] Those skilled in the art will understand that the structure shown in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0071] This application also discloses a computer-readable storage medium. Specifically, the computer-readable storage medium is used to store a computer program, which, when executed by a processor, implements the methods described in the above-described method embodiments. Those skilled in the art will understand that implementing all or part of the processes in the methods described above can be accomplished by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium can also include combinations of the above types of memory.

[0072] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A surgical instrument positioning device for endoscopic breast surgery, characterized in that, The device includes: A dual-wing permanent magnet array is used to be deployed in the target area of ​​the patient's chest wall surgery, and to construct a triaxial near-linear static magnetic gradient field in the target area, and to provide a spatial reference for the world coordinate system; The composite sensor module integrates a magnetoresistive sensor, an inertial measurement unit (IMU), and a computing unit, and is deployed on the non-scanning working surface of the ultrasound probe and the end of the surgical instrument. The composite sensor is used to measure the magnetic induction intensity at six selected calibration points within the effective working volume of the static magnetic gradient field, and the computing unit calculates the gradient coefficient and zero drift term of the static magnetic gradient field. The data acquisition module is used to collect real-time data on magnetic induction intensity, acceleration, and angular velocity from the composite sensors deployed on the non-scanning working surface of the ultrasound probe and the end of the surgical instrument. The position calculation module is used to calculate the three-dimensional position data of the ultrasound probe and the end of the surgical instrument based on the gradient coefficient and the zero drift term using a position solving algorithm. The attitude correction module is used to predict the attitude using attitude quaternions based on the angular velocity data and to perform attitude correction using the acceleration data, so as to obtain the three-dimensional attitude data of the ultrasound probe and the end of the surgical instrument. The attitude output module is used to obtain the six-degree-of-freedom pose of the ultrasound probe and the surgical instrument tip in the world coordinate system based on the three-dimensional position data and the three-dimensional attitude data.

2. The surgical instrument positioning device for endoscopic breast surgery according to claim 1, characterized in that, The dual-wing permanent magnet array includes two wing plates symmetrically arranged on both sides of the metal-free scanning window. Permanent magnet groups are arranged on each wing plate along the X, Y, and Z axes to construct the three-axis near-linear static magnetic gradient field. The world coordinate system is constructed based on the spatial reference of the world coordinate system. The origin of the world coordinate system is the geometric center of the metal-free scanning window of the dual-wing permanent magnet array. This center, when deployed, coincides with the center point of the skin surface at the ultrasound-guided surgical target area on the patient's chest wall during ultrasound-guided surgery. The direction is horizontal, parallel to the surface of the patient's chest wall skin, pointing towards the outer side of the patient's chest wall. The direction is parallel to the patient's chest wall skin surface and is in harmony with... The cephalothorax, perpendicular to the axis, points towards the patient's head. The direction is along the normal to the surface of the patient's chest wall skin, pointing towards the inside of the patient's chest cavity. Direction along Pointing in the opposite direction outwards from the patient's body.

3. The surgical instrument positioning device for endoscopic breast surgery according to claim 2, characterized in that, It also includes a calibration module, which is configured to: select six calibration points within the effective working volume of the static magnetic gradient field, measure the magnetic induction intensity of each calibration point through the composite sensor, and calculate the gradient coefficient and zero drift term of the static magnetic gradient field. The approximate linear relationship of the triaxial near-linear magnetostatic gradient field in the world coordinate system is as follows: , , ,in , , The gradient coefficients are... , , For the zero-drift term, , , These are the coordinate values ​​of the spatial point on the corresponding coordinate axis in the world coordinate system; The six calibration points are as follows: , , , , , , in, The distance between two relative calibration points on the same coordinate axis. The thickness of the wingplate of the dual-wingplate permanent magnet array; The gradient coefficients , , The calculation formulas are as follows: The zero-drift item , , The calculation formula is: in, , Points , The magnetic flux density along the X-axis. , Points , The magnetic flux density along the Y-axis , Points , The magnetic flux density along the Z-axis. For point The three-axis magnetic induction intensity vector; after calibration, the gradient coefficient and the zero drift term are stored for calculating the six-degree-of-freedom pose.

4. The surgical instrument positioning device for endoscopic breast surgery according to claim 3, characterized in that, The effective working volume of the magnetic static gradient within a linear error of ±5% : All calibration points are located within the effective working volume.

5. The surgical instrument positioning device for endoscopic breast surgery according to claim 3, characterized in that, The real-time acquired magnetic induction intensity is acceleration is and angular velocity ; The position calculation module is configured to: calculate the magnetic induction intensity via attitude rotation matrix Transform to world coordinate system to obtain The attitude rotation matrix The optimal pose quaternion Obtained through conversion; The three-dimensional position data is a three-dimensional position vector. The calculation formula is: in, The gradient coefficient matrix, for The inverse matrix, The vector of zero-drift terms; The three-dimensional attitude data is obtained by iteratively solving the attitude quaternion, the first... Optimal pose quaternion at time step Based on predictive quaternions The predicted quaternion is obtained from acceleration correction and is calculated using the following formula: in, For the first Time based on the first Predicting quaternions at time points For the first The optimal quaternion at time 1. Represents quaternion multiplication. For the first Angular velocity vector at time t, for The length of the mold, This represents the sampling time interval.

6. The surgical instrument positioning device for endoscopic breast surgery according to claim 5, characterized in that, The attitude correction module is configured to obtain the three-dimensional attitude data through iterative solving of attitude quaternions. With attitude rotation matrix The correspondence includes: the attitude quaternions The attitude rotation matrix obtained by transformation according to general mathematical rules And the attitude rotation matrix From roll angle Pitch angle , heading angle Represented as: in, , , These are rotation matrices representing the angles of rotation around the X, Y, and Z axes, respectively; the posture rotation matrices can intuitively represent the posture state of the ultrasound probe and the end of the surgical instrument.

7. The surgical instrument positioning device for endoscopic breast surgery according to claim 6, characterized in that, It also includes a heading assist correction module, which is configured to: During the static initialization phase, the direction of the magnetic flux density measured by the magnetoresistive sensor is compared with the theoretical direction vector of the static magnetic gradient field. Align the parts and obtain the initial heading angle; During the dynamic positioning phase, when the rate of change of magnetic induction intensity is detected to be lower than the threshold for multiple consecutive frames, the direction of magnetic induction intensity is used as a heading observation constraint.

8. The surgical instrument positioning device for endoscopic breast surgery according to claim 6, characterized in that, The pose output module is configured to represent the six-degree-of-freedom poses of the ultrasound probe and the surgical instrument tip relative to the world coordinate system using pose matrices, wherein the formulas for calculating the pose matrices are as follows: in, Let be the pose matrix of the ultrasonic probe relative to the world coordinate system. This is the attitude rotation matrix of the ultrasonic probe. This represents the three-dimensional position vector of the ultrasonic probe. Let be the pose matrix of the surgical instrument tip relative to the world coordinate system. This is the attitude rotation matrix of the surgical instrument tip. is the three-dimensional position vector of the surgical instrument tip.

9. A method for positioning surgical instruments in endoscopic breast surgery, based on the surgical instrument positioning device for endoscopic breast surgery according to any one of claims 1-8, characterized in that, include: Within the effective working volume of the triaxial near-linear static magnetic gradient field constructed by the double-wing permanent magnet array, the gradient coefficients and zero-drift terms of the static magnetic gradient field are obtained through calibration operations. The data acquisition module acquires the real-time magnetic induction intensity, acceleration, and angular velocity data collected by the composite sensor. The position calculation module calculates the three-dimensional position data of the ultrasound probe and the end of the surgical instrument based on the gradient coefficient and the zero drift term using a position solving algorithm. The posture correction module uses the angular velocity data to predict the posture using posture quaternions iteratively, and uses the acceleration data to correct the posture, thereby obtaining the three-dimensional posture data of the ultrasound probe and the end of the surgical instrument. Based on the three-dimensional position data and the three-dimensional posture data, the pose output module obtains the six-degree-of-freedom pose of the ultrasound probe and the surgical instrument tip in the world coordinate system.

10. A computer-readable storage medium, characterized in that, The readable storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or instruction set is loaded and executed by a processor to cause the processor to control the surgical instrument positioning device to perform the positioning method as described in claim 9.