Tunnel path planning method and device for breast endoscopic surgery and storage medium
Patent Information
- Application Number
- CN202611189342.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-10-30
AI Technical Summary
[0008]本发明的主要目的在于提供一种用于乳腺腔镜手术的隧道路径规划方法、装置及存储介质,旨在解决现有技术中将血管、神经等视为简单的二值障碍物,忽略了概率信息和安全缓冲距离的连续影响,难以保证整条隧道的厚度均匀性,容易产生图像伪影和数据缺失的技术问题
[0041]本发明提供一种用于乳腺腔镜手术的隧道路径规划方法、装置及存储介质,具有以下有益效果:通过逆向扫描规划模块和数据获取模块,获取三维体素数据并结合深度分割网络进行多组织精细化分割,为路径规划提供了准确的三维解剖信息;在此基础上,同时将安全性(避开血管神经)和组织厚度稳定性(皮瓣厚度均匀)两大临床关切纳入多目标优化,构建安全距离场并动态维护厚度统计量,使规划路径在长度、风险和厚度均匀性之间达到最优平衡;采用双向搜索策略与加权和代价函数,可在复杂解剖结构中快速收敛至最优离散路径;经平滑处理后生成可直接适配手术导航系统的连续路径轨迹,显著提升乳腺隧道微创手术的自动化程度、安全性和临床实用性。
Smart Images

Figure CN122997829A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ultrasound scanning path planning technology, specifically to a tunnel path planning method, device, and storage medium for breast endoscopic surgery. Background Technology
[0002] Breast tumors are among the most common cancers threatening human health, and surgical removal remains the primary treatment. With advancements in medical imaging technology and minimally invasive surgery, breast tunneling surgery (or breast duct surgery) has gained increasing attention. This procedure involves making tiny incisions in the skin and guiding the tumor through a pre-planned tunnel to the lesion area, achieving precise tumor removal while preserving healthy tissue to the greatest extent possible, thus minimizing surgical trauma and postoperative scarring.
[0003] However, breast tunnel planning is a highly challenging multi-objective optimization problem. An ideal tunnel path must simultaneously meet several interdependent clinical requirements: it must effectively avoid dangerous areas rich in blood vessels and nerves to prevent massive intraoperative bleeding or nerve damage; it must maintain the skin flap (the tissue from the skin to the tunnel surface) as uniformly thick as possible—too thin may lead to skin necrosis or perforation, while too thick may damage excessive healthy tissue; and, while meeting these constraints, the tunnel length should be minimized to reduce surgical trauma and operational difficulty.
[0004] Currently, tunnel path planning in clinical practice mainly relies on the surgeon's preoperative image interpretation and intraoperative experience. This approach has significant limitations: the planning results heavily depend on the surgeon's personal experience and spatial imagination, making it difficult to guarantee consistency and repeatability; surgeons struggle to accurately quantify the distribution probability of blood vessels and nerves in three-dimensional space, and also find it difficult to dynamically assess the impact of path changes on flap thickness stability; when multiple optimization objectives such as safety, thickness, and length conflict, surgeons find it difficult to find the optimal compromise.
[0005] To address the aforementioned problems, several computer-aided path planning methods have been proposed. Some studies utilize 3D reconstructed images, employing Dijkstra's algorithm or the Fast Marching Method for path search. Dijkstra's algorithm searches for the shortest path on a discrete voxel map by expansion, while the Fast Marching Method extracts the optimal path by solving the arrival time field in continuous space based on the Eikonal equation. However, these methods often treat blood vessels, nerves, etc., as simple binary obstacles, resulting in planned paths that are too close to dangerous areas. Other methods attempt to consider flap thickness during the planning process, but these often employ static thickness constraints, making it difficult to ensure the uniformity of thickness throughout the tunnel.
[0006] Furthermore, the scanning methods used in the acquisition of three-dimensional voxel data in the existing technology cannot guarantee good contact between the ultrasound probe and the tissue when encountering curved chest walls or complex anatomical structures, which can easily lead to image artifacts and data loss, affecting the accuracy of subsequent segmentation and path planning.
[0007] Therefore, there is an urgent need for a multi-objective path planning method and system for breast tunnels that can comprehensively utilize three-dimensional imaging information, take into account both safety and tissue thickness stability, and achieve automated and intelligent planning, in order to assist doctors in making accurate surgical decisions and improve the success rate of surgery. Summary of the Invention
[0008] The main objective of this invention is to provide a tunnel path planning method, device, and storage medium for endoscopic breast surgery. This invention aims to solve the technical problems in the prior art that treat blood vessels, nerves, etc., as simple binary obstacles, ignore the continuous influence of probability information and safety buffer distance, make it difficult to ensure the thickness uniformity of the entire tunnel, and easily produce image artifacts and data loss.
[0009] To achieve the above objectives, the present invention provides a tunnel path planning device for endoscopic breast surgery, comprising: The reverse scan planning module is used to plan the virtual scan path of the ultrasound probe and make the ultrasound probe perform reverse ultrasound scans in the opposite direction of the virtual planned path. The data acquisition module is used to acquire three-dimensional voxel data located in a unified world coordinate system obtained by the ultrasound probe scanning along the scanning path. The data processing module is used to perform tissue segmentation on the three-dimensional voxel data to obtain the probability information of each voxel belonging to the skin, lesion, blood vessel and nerve respectively; The safe distance field construction module is used to construct a set of buffer barriers based on the probability information of blood vessels and nerves, and calculate the shortest distance from any point in three-dimensional space to the set of buffer barriers as the safe distance field; The path planning module is configured to use a bidirectional search strategy to search for a path from the incision center to the lesion center. During the search process, the flap thickness statistics of each planned point on the path are dynamically maintained. The path evaluation function is accumulated by weighting the path length cost, the risk penalty cost which is negatively correlated with the safety distance field, and the thickness stability penalty cost based on the flap thickness variance increment as the segment increment cost. The optimal discrete path from the incision to the lesion is planned. The risk penalty cost decreases exponentially with the increase of the safety distance. The post-processing module is used to smooth and make the optimal discrete path continuous. The navigation path output module is used to output a continuous path trajectory that can be used by the surgical navigation system.
[0010] By acquiring three-dimensional voxel data through reverse ultrasound scanning and performing tissue segmentation, the spatial distribution of various tissues such as skin, lesions, blood vessels, and nerves can be characterized in a refined manner. Based on this, a safe distance field and a dynamic maintenance flap thickness statistic are constructed, incorporating the two major clinical concerns of safety and tissue thickness stability into the path optimization objectives. A bidirectional search strategy is adopted, and a multi-cost weighted sum is used as the evaluation function, which can quickly converge to the optimal discrete path that takes into account length, safety, and thickness stability in complex anatomical environments. After smoothing, a continuous path trajectory is generated, which can be directly adapted to the surgical navigation system, making the planning results clinically practical.
[0011] Based on the aforementioned tunnel path planning device for endoscopic breast surgery, the present invention also provides a path planning method, comprising: The reverse scan planning module plans the virtual scan path of the ultrasound probe and makes the ultrasound probe perform reverse ultrasound scans in the opposite direction of the virtual planned path. The data acquisition module acquires three-dimensional voxel data obtained from reverse ultrasound scanning; The data processing module performs tissue segmentation on the three-dimensional voxel data to obtain the probability information of each voxel belonging to the skin, lesion, blood vessel and nerve respectively; The safe distance field construction module constructs a set of buffer barriers based on the probability information of blood vessels and nerves, and calculates the safe distance field. The path planning module uses a bidirectional search strategy to search for tunnel paths from the incision center to the lesion center, and plans the optimal discrete path. The optimal discrete path is smoothed and made continuous by the post-processing module; the continuous path trajectory that can be used by the surgical navigation system is output by the navigation path output module.
[0012] In a specific feasible implementation, the specific configuration of the reverse scan planning module, data acquisition module, and data processing module includes: Starting from the center of the incision and ending at the center of the lesion, a virtual scanning path is planned along the curved surface of the chest wall to generate a series of virtual scanning points from the center of the incision to the center of the lesion. Acquiring two-dimensional ultrasound images in the opposite direction of the virtual scanning path is called reverse ultrasound scanning. The two-dimensional ultrasound images are interpolated and mapped to a three-dimensional voxel grid with a preset resolution using the real-time six-degree-of-freedom pose of the ultrasound probe, thus obtaining three-dimensional voxel data in the world coordinate system. The 3D voxel data is input into a depth segmentation network, which outputs the probability that each voxel belongs to skin, lesion, blood vessel, or nerve. A reverse virtual scanning path is planned along the chest wall curvature, starting from the lesion center and ending at the incision center. This conforms to the anatomical shape of the chest wall and ensures good contact between the ultrasound probe and the tissue. Images are acquired in the opposite direction and mapped to a 3D voxel grid using probe pose interpolation, effectively reducing image artifacts and data loss, and obtaining high-precision 3D voxel data in the world coordinate system. The tissue probability information output by the subsequent segmentation network provides refined 3D data for path planning.
[0013] In a specific feasible implementation, the deep segmentation network used in the data processing module is DF-Net, which adopts an encoder-decoder structure and introduces an attention mechanism in the cross-layer connection between the encoder and decoder. The attention mechanism generates attention weights by concatenating the features of the current layer with the features of the previous layer and then applying the result to an activation function. The formula for calculating the attention weights is as follows:
[0014] in For attention weights, For attention learning weights, For attention learning bias, For the first Layer Characteristics of individual element location, For the first Layer Characteristics of individual elements for Activation function.
[0015] The deep segmentation network adopts the encoder-decoder structure of DF-Net and introduces an attention mechanism in the cross-layer connection. Attention weights are generated by concatenating the features of the current layer with the features of the previous layer, so that the network can adaptively enhance the feature response related to tissue boundaries and key structures during feature transmission. The calculation method of this attention weight can improve the segmentation network's ability to identify low-contrast tissues such as small blood vessels and nerve endings, and output more accurate voxel-level tissue probabilities.
[0016] In one specific implementation scheme, the safe distance field construction module is configured as follows: Integrate vascular probability information and neural probability information into a hazard probability field Therefore, the formula for calculating the hazard probability field is:
[0017] in , The weights for blood vessels and nerves are respectively. Let the coordinates be the center point of the voxel. , These represent the probabilities that voxels belong to blood vessels and nerves, respectively. For a probability value in a dangerous probability field that exceeds a preset threshold Voxel construction of initial obstacle set and with a preset safety radius For the initial set of obstacles Three-dimensional morphological dilation yields a set of buffer barriers. ; Calculate the center point of any voxel in three-dimensional space The shortest distance to the set of buffer barriers is used as the safe distance field. Safe distance field The calculation formula is:
[0018] in, For a set of buffer barriers Any point in it.
[0019] By constructing a hazard probability field through probability fusion of vascular and neural probability information, and reflecting the joint existence probability of the two types of dangerous tissues through the hazard probability field formula, the information loss caused by traditional binary obstacle classification can be avoided; this hazard probability field can characterize a continuous risk gradient.
[0020] By constructing an initial obstacle set from high-probability voxels in the hazard probability field and performing three-dimensional morphological expansion, an obstacle set with a safety buffer zone can be generated, avoiding the planned path from being too close to dangerous organizations. The safety distance field transforms discrete obstacle information into a continuous scalar field by calculating the shortest distance from any point in space to the buffer obstacle set, which facilitates quantifying the safety level of path points in the path search process using distance metrics.
[0021] In a specific feasible implementation, the dynamic maintenance method for the flap thickness statistics of the path planning module includes: Define flap thickness For any voxel center point on the path The shortest distance to the skin surface, i.e. ,in It is the closest point to the skin surface along the local external normal direction; During the path search process, the number of thickness samples n and the mean thickness μ are maintained for each candidate path. t The sum of squared differences, M2, updates the number of thickness samples n and the mean thickness μ when a new thickness sample x=t(p) is introduced at point p. t The cumulative sum of squared differences, M2, is updated using the following recursive formula:
[0022] in, For the updated flap thickness variance estimation, This is the updated average thickness.
[0023] The shortest distance from any point on the path to the skin surface is taken as the flap thickness, and the stability of tissue thickness is measured by statistically analyzing the flap thickness variance at each point on the path online. This can transform thickness uniformity into a quantifiable optimization indicator. Variance, as a statistical measure, can reflect the degree of thickness fluctuation along the entire path, guiding the path search algorithm to select a direction with gentle thickness changes.
[0024] In a specific feasible implementation, the path planning module uses segment incremental cost. The calculation formula is:
[0025] in, For the current node, Adjacent nodes The path segment length, The midpoint of the path segment. As the weight of each cost, The danger penalty function is based on the safety distance field. This is a stable penalty function based on the incremental variance of flap thickness; From the starting point Reach the current node The cumulative cost is The heuristic function is: ,in, For the target node, the priority key value is .
[0026] The path evaluation function is constructed using a segment incremental cost accumulation method, which weights and sums the path segment length, the exponential risk penalty based on the safety distance field, and the thickness stability penalty based on the flap thickness variance increment. This allows the path search process to simultaneously consider length optimization, risk avoidance, and thickness uniformity. By using the midpoint of the path segment as the calculation point for the risk penalty, risk assessment can be performed on the area traversed by the path segment in a continuous space, avoiding the inclusion of risk blind spots caused by discrete sampling in the surgical path.
[0027] In a specific feasible implementation, the path planning module employs a hazard penalty function. The formula for calculating the monotonically exponential mapping of the safety distance is:
[0028] in The preset scale parameters, Midpoint of the path segment The safe distance value at that location, This is for exponential operations.
[0029] The danger penalty function uses an exponential mapping. When a waypoint is close to a danger zone ( The penalty value approaches 1 when the path point is far from the danger zone; the penalty value decays exponentially to approach 0. This mapping method can form a steep cost gradient near the danger zone, effectively suppressing the path from entering the danger buffer, while also controlling the scale parameter. The impact range of the hazardous area can be adjusted to meet the safety needs of different clinical scenarios.
[0030] In a specific feasible implementation, the path planning module employs a flap thickness stabilization penalty function. The formula for calculating the increase in flap thickness variance before and after introducing the new pathway point is as follows:
[0031] in, and These represent the variance of flap thickness before and after the introduction of the new pathway points, respectively.
[0032] The thickness stability penalty function uses the increase in flap thickness variance before and after the introduction of a new path point as a penalty term. When the addition of a new path point causes the thickness variance of the entire path to increase, this term generates a positive penalty; when the variance does not increase, the penalty is zero. This design makes the path search process tend to maintain the thickness uniformity of the planned path segments and avoid disrupting the overall thickness stability due to local path adjustments.
[0033] In a specific feasible implementation, the adaptive weight adjustment method of the path planning module is as follows: weight Based on the recent average cost indicators of various path segments With preset threshold The comparison results are adaptively adjusted, and the formula for calculating the adjusted weights is as follows:
[0034] in, , , These represent the average length cost, average hazard penalty, and average thickness penalty of the recent path segment, respectively. , , For the corresponding preset threshold, It is a small constant; when , and At that time, the current weight remains unchanged.
[0035] Based on the comparison between the average values of the three cost indicators—path segment length, hazard penalty, and thickness penalty—and preset thresholds, the weights of these three indicators are dynamically adjusted. The allocation ratio; when the average value of a certain indicator exceeds the threshold, its corresponding weight is relatively increased in subsequent searches, so that path planning can adaptively strengthen the optimization of the current over-standard indicator and avoid the problem of insufficient adaptability of fixed weights in different anatomical regions or different patients.
[0036] In a specific feasible implementation, the process by which the path planning module executes a bidirectional search strategy includes: Establish node records at the start and end points respectively, and initialize the cumulative cost, heuristic function value and thickness statistics; Establish the forward candidate set, the backward candidate set, the forward visited table, and the backward visited table; In each iteration, the side with the smaller priority key value in either the forward candidate set or the backward candidate set is selected for expansion; Expand the three-dimensional neighborhood of the current node. If the safe distance value at the midpoint of the path segment is zero, it is determined to be infeasible and the neighbor is skipped. For neighbors that pass the feasibility check, update the thickness statistics, calculate the segment incremental cost, cumulative cost, and priority key value, and update the candidate set; Check if there are any meeting pairs in the visited tables on both sides whose geometric distance does not exceed the voxel side length. If they exist, calculate the connection cost and update the optimal connection cost. The iteration ends when the early stopping condition is met or when any candidate set is empty, and the optimal discrete path from the starting point to the ending point is obtained by backtracking along the parent pointer.
[0037] In a specific feasible implementation, the execution process of the post-processing module includes: smoothing and continuous processing of the optimal discrete path, including: The optimal discrete path is resampled at equal intervals according to a preset arc length interval, and the continuous path is initialized with a spline curve. Define a comprehensive energy function on the discrete point sequence, which includes a path length term, a hazard penalty term, and a smoothing term. Comprehensive energy function The calculation formula is:
[0038] in The midpoint of a path segment is formed by adjacent path points. To smooth out the weights, and For fixed endpoints; The integrated energy function is minimized using an iterative gradient descent method. After each iteration, it is determined whether each point falls into a high-risk obstacle zone. If it does, the point is projected back along the gradient direction at a safe distance equal to a preset small value. On the equidistant surface; The optimized point series is splined again to obtain the final continuous path trajectory, and the nearest point projection interface and track point sampling interface are provided for the surgical navigation system to call.
[0039] After isometric resampling and spline initialization of the optimal discrete path, a comprehensive energy function containing length, risk penalty, and smoothing terms is defined on the discrete point column. The energy function is iteratively optimized using gradient descent, which enables the path to maintain close proximity to the original optimal direction while achieving first-order and second-order geometric continuity. After each iteration, points deviating from the feasible region are projected back to the safe region to ensure that the optimized path still meets clinical safety constraints. Finally, a continuous path trajectory is generated.
[0040] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to control a tunnel path planning device to perform path planning operations.
[0041] This invention provides a tunnel path planning method, device, and storage medium for endoscopic breast surgery, which has the following advantages: Three-dimensional voxel data is acquired through a reverse scanning planning module and a data acquisition module, and multi-tissue fine segmentation is performed using a depth segmentation network, providing accurate three-dimensional anatomical information for path planning. Based on this, two major clinical concerns—safety (avoiding blood vessels and nerves) and tissue thickness stability (uniform flap thickness)—are simultaneously incorporated into multi-objective optimization. A safe distance field is constructed, and thickness statistics are dynamically maintained, achieving an optimal balance between length, risk, and thickness uniformity in the planned path. A bidirectional search strategy and a weighted sum cost function are employed, enabling rapid convergence to the optimal discrete path in complex anatomical structures. After smoothing, a continuous path trajectory is generated that can be directly adapted to the surgical navigation system, significantly improving the automation, safety, and clinical applicability of minimally invasive breast tunnel surgery. Attached Figure Description
[0042] Figure 1 This invention provides a schematic diagram illustrating the workflow and method steps of a tunnel path planning device for laparoscopic breast surgery, as provided in an exemplary embodiment of this application. Figure 2 This illustration shows a detailed flowchart of a bidirectional search provided in an exemplary embodiment of this application; Figure 3 This illustration shows a schematic diagram of a tunnel path planning device for laparoscopic breast surgery provided in an exemplary embodiment of this application; Figure 4 This illustration shows a structural block diagram of a computer device provided in an exemplary embodiment of this application. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of the present invention clearer, the following description will be provided in conjunction with the accompanying drawings. Figures 1-4 The embodiments of this application will be described in further detail.
[0044] 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.
[0045] To facilitate understanding of the technical solution of this invention, some technical terms used herein are explained as follows: Voxel: The smallest cubic unit of three-dimensional spatial data, which is a generalization of two-dimensional pixel in three-dimensional space. The typical physical size of the voxel in this application is 0.5mm × 0.5mm × 0.5mm.
[0046] Morphological dilation is a fundamental image processing operation based on set theory. It expands a target region by using a structuring element, extending its boundaries outward by a specified distance. In this application, a spherical structuring element is used to perform three-dimensional dilation on a set of obstacles to generate a safe buffer region.
[0047] Welford's Algorithm: A numerically stable algorithm for online recursive calculation of variance. It updates the mean and variance estimates sample by sample during a single pass through the data, avoiding the memory overhead and numerical errors caused by storing all historical samples.
[0048] B-mode (Brightness Mode) image: This is the most commonly used two-dimensional ultrasound imaging mode in clinical practice, which uses pixels of different brightness to represent the echo intensity of tissue.
[0049] Cubic spline: A curve formed by splicing piecewise cubic polynomials, which has C² continuity (the function value, first derivative, and second derivative are all continuous) and can generate smooth path trajectories.
[0050] Parent Pointer: In graph search algorithms, this is a data field used to record the predecessor node of each node. After the search is completed, the complete path from the starting point to the ending point can be reconstructed by backtracking through the parent pointer chain.
[0051] 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.
[0052] This embodiment provides a tunnel path planning device for endoscopic breast surgery, which automatically generates an optimal tunnel path from the axillary incision to the center of the breast lesion, taking into account the shortest path, avoiding important blood vessels and nerves, and maintaining the uniformity of skin flap thickness. Figure 1 As shown, the device includes the following workflow and method steps: S100, the reverse scanning planning module starts from the center of the surgical incision and ends at the center of the lesion, and plans the scanning path along the curved surface of the chest wall. After the ultrasound probe performs a reverse ultrasound scan in the opposite direction of the planned path, the data acquisition module acquires three-dimensional voxel data in a unified world coordinate system. The data processing module performs tissue segmentation on the three-dimensional voxel data to obtain the probability information of each voxel belonging to the skin, lesion, blood vessel and nerve respectively. First, from the center of the incision Starting point, lesion center As the endpoint, the chest wall surface is reconstructed based on preoperative three-dimensional medical images, and the incision center is used as the starting point. Starting point, lesion center Virtual scanning path planning is performed to generate a series of virtual scanning points from the incision center to the lesion center, and a unit scan vector is defined to describe the direction of probe movement at each scanning point. During the procedure, the ultrasound probe slides along the chest wall curvature in the direction opposite to the virtual scanning path planned, and the system will... The actual direction of movement is obtained by projecting onto the local tangent plane. and with step size Update the probe position to obtain virtual path points. ,in The operator moves the probe in the opposite direction of the virtual path (from the incision to the lesion), acquiring one frame of two-dimensional B-mode (Brightness Mode, the most commonly used two-dimensional ultrasound imaging mode in clinical practice) image at each virtual path point. Simultaneously, the real-time 6-DOF pose of the probe is recorded by an electromagnetic or optical positioning system. This ensures all images are located in the world coordinate system. Using the probe pose and intrinsic parameters, each frame of the 2D image is interpolated and mapped to a preset resolution. ( The dimensions are 0.5mm × 0.5mm × 0.5mm, meaning each voxel corresponds to a cube with a side length of 0.5mm in real space. The grid coverage area is set according to the envelope from the lesion to the incision area determined by the preoperative 3D image. After accumulation, a three-dimensional voxel dataset covering the area from the lesion to the incision site, located in the world coordinate system, was obtained. By acquiring three-dimensional voxel data through reverse ultrasound scanning, the probe can conform to the anatomical shape of the chest wall, ensuring good contact between the probe and the tissue, effectively reducing image artifacts and data loss, and obtaining high-precision three-dimensional voxel data in the world coordinate system.
[0053] The obtained three-dimensional voxel data Input is the deep segmentation network DF-Net. DF-Net employs an encoder-decoder architecture, where both the encoder and decoder consist of 3D convolutional layers, with the number of channels increasing by a factor of 2 in each layer. To enhance the segmentation capability for small targets (such as neural bundles), an attention mechanism is introduced into the cross-layer connections between the encoder and decoder. This attention mechanism generates attention weights by concatenating the features of the current layer with those of the previous layer and then applying the result to an activation function. The formula for calculating the attention weights is as follows:
[0054] in For the first Layer Characteristics of individual element location, For the first Layer Characteristics of individual elements and For learnable weights and biases, The activation function is Sigmoid. The network outputs each voxel. Raw scores corresponding to the four categories Using small constants The Softmax function converts it into probability values:
[0055] Ultimately, four probability fields are obtained: skin lesions ,Blood vessel ,nerve Through the attention mechanism of DF-Net, the network adaptively enhances the feature responses related to tissue boundaries and key structures during feature transmission, improving the ability to identify low-contrast tissues such as small blood vessels and nerve endings, and outputting more accurate voxel-level tissue probabilities, providing refined 3D data for subsequent path planning.
[0056] S200: The safety distance field construction module constructs a set of buffer barriers based on the probability information of blood vessels and nerves, and calculates the shortest distance from any point in three-dimensional space to the set of buffer barriers, which serves as the safety distance field. This is based on the blood vessel probability obtained in step S100. and neural probability Construct a hazard probability field. Hazard probability field It is obtained by fusing vascular probability information and neural probability information, and its calculation formula is as follows:
[0057] in , The weights for blood vessels and nerves are respectively (in this embodiment, we take...). , ), The coordinates of the voxel center point are given. This formula reflects the joint existence probability of two types of dangerous organizations in a probabilistic fusion manner, which can avoid the information loss caused by traditional binary obstacle classification and represent a continuous risk gradient.
[0058] For a probability value in a dangerous probability field that exceeds a preset threshold Voxel construction of initial obstacle set Preset threshold The selection must meet the following condition: the probability that the voxel belongs to a blood vessel or nerve is higher than that of the voxel. At that time, the voxel was considered to pose a clinically significant risk. In this embodiment, The value ranges from 0.2 to 0.7, and the specific value can be adjusted according to clinical safety requirements and the output calibration of the segmentation network. A preset safety radius is used. right Perform three-dimensional morphological dilation, that is, use a radius of The spherical structural element extends the neighborhood of each voxel in the obstacle set to a distance not exceeding [a certain value]. All locations yield the set of buffer barriers. ,in This is the expansion operator. radius The spherical structural element. Then calculate the center point of any voxel in three-dimensional space. The shortest distance to the set of buffer barriers is used as the safe distance field. The calculation formula is as follows:
[0059] By constructing an initial obstacle set from high-probability voxels in the hazard probability field and performing three-dimensional morphological expansion, an obstacle set with a safety buffer zone can be generated, preventing the planned path from getting too close to dangerous organizations. The safety distance field transforms discrete obstacle information into a continuous scalar field, which facilitates quantifying the safety level of path points in the form of distance metrics during the path search process.
[0060] The S300 path planning module employs a bidirectional search strategy to search for a path from the incision center to the lesion center. During the search process, it dynamically maintains the flap thickness statistics at each planned point along the path. The path evaluation function is accumulated using a weighted sum of path length cost, a risk penalty cost negatively correlated with the safety distance field, and a thickness stability penalty cost based on the flap thickness variance increment, thus planning an optimal discrete path from the incision to the lesion. The risk penalty cost decreases exponentially with increasing safety distance. The bidirectional search strategy uses a weighted sum of path length cost, a risk penalty cost constructed based on the safety distance field, and a thickness stability penalty cost constructed based on flap thickness statistics as the evaluation function to plan an optimal discrete path from the incision... To the lesion The optimal discrete path.
[0061] When from the current voxel center Extending to adjacent voxel centers When using a 26-neighborhood (i.e., all face-adjacent, edge-adjacent, and corner-adjacent voxels of the current voxel, totaling 26), a 26-neighborhood is used instead of a 6-neighborhood or 18-neighborhood to ensure sufficient directional freedom in path search in 3D space, allowing the planned path to traverse the voxel grid diagonally and obtain a smoother path direction.
[0062] Define segment incremental cost The segment increment cost is a weighted sum of the path segment length cost, the exponential hazard penalty cost based on the safety distance field, and the thickness stability penalty cost based on the flap thickness variance increment. The formula for calculating the segment increment cost is as follows:
[0063] in For the current node, Adjacent nodes The path segment length, The midpoint of the path is used to calculate the risk of that path segment; The default values for each cost are: , , , The danger penalty function is based on the safety distance field. It is a stable penalty function based on the variance increment of flap thickness.
[0064] Dangerous penalty function It is negatively correlated with the safety distance field, specifically as a monotonically exponential mapping of the safety distance. The formula for calculating the danger penalty function is as follows:
[0065] in The preset scale parameters, Midpoint of the path segment The safe distance value at the location, preferably, is a scale parameter. When a pathpoint approaches a danger zone, the penalty value approaches 1; when it moves away, the penalty decays exponentially to approach 0, forming a steep cost gradient.
[0066] Thickness stability penalty function The formula for calculating the increase in flap thickness variance before and after introducing the new pathway point is as follows:
[0067] in and These represent the thickness variance before and after expansion. A penalty is only applied when a new point causes an increase in thickness variance, guiding the search to maintain thickness uniformity.
[0068] From the starting point Reach the current node The cumulative cost is The heuristic function reaches the endpoint by multiplying the Euclidean distance by... : The priority key value is .
[0069] To enhance adaptability to different anatomical regions, an adaptive weighting mechanism can be enabled. The average length cost of recent path segments is calculated every 20 segments processed or every 0.2 seconds. Mean of dangerous penalty Mean of thickness penalty , and preset threshold , , The adjusted weighting formula is as follows:
[0070] Among them, , , These represent the average length cost, average hazard penalty, and average thickness penalty of the recent path segment, respectively. , , For the corresponding preset threshold, It is a small constant; when , and At this time, the current weight remains unchanged, preferably, This prevents the denominator from being zero. This mechanism enables path planning to adaptively strengthen the optimization of current out-of-target indicators, avoiding the problem of insufficient adaptability of fixed weights across different anatomical regions or patients.
[0071] The specific process of bidirectional search is as follows: S310, at the starting point and the end point Establish node records at each location, and initialize the cumulative cost, heuristic function value, and thickness statistics; S320. Establish the forward candidate set, the backward candidate set, the forward visited table, and the backward visited table; S330. In each iteration, the side with the smaller priority key value in either the forward candidate set or the backward candidate set is selected for expansion. S340. Expand the three-dimensional neighborhood of the current node. If the safe distance value at the midpoint of the path segment is zero, it is determined to be infeasible and the neighbor is skipped. S350. For neighbors that pass the feasibility check, update the thickness statistics, calculate the segment incremental cost, cumulative cost, and priority key value, and update the candidate set. S360. Check if there are any meeting pairs in the visited tables on both sides whose geometric distance does not exceed the voxel side length. If they exist, calculate the connection cost and update the optimal connection cost. S370. The iteration ends when the early stopping condition is met or any candidate set is empty, and the optimal discrete path from the starting point to the ending point is obtained by backtracking along the parent pointer. .
[0072] The path evaluation function is constructed by using the segment incremental cost accumulation method, which enables the path search process to simultaneously take into account length optimization, hazard avoidance and thickness uniformity. By using the midpoint of the path segment as the calculation point of the hazard penalty, the risk assessment of the area traversed by the path segment can be performed in continuous space, avoiding the inclusion of risk blind spots caused by discrete sampling into the surgical path.
[0073] Based on the optimization objective of tissue thickness stability, the flap thickness statistics at each point along the path are dynamically maintained during the path search process. The skin surface is defined as all points that satisfy the... voxels. For any voxel center point The nearest point along the local external normal direction to the skin surface is denoted as Then the thickness of the flap The calculation formula is:
[0074] During the path search process, a thickness statistic is dynamically maintained for each candidate path: number of samples. Average thickness Cumulative difference of squares When introducing new points Thickness sample At that time, the thickness statistics are updated according to the Welford algorithm, the calculation formula of which is:
[0075] in This is used to estimate the variance of the updated flap thickness. The shortest distance from any point on the path to the skin surface is taken as the flap thickness, and the stability of tissue thickness is measured by statistically analyzing the variance of flap thickness at each point on the path online. This transforms thickness uniformity into a quantifiable optimization metric. Variance, as a statistical measure, can reflect the degree of thickness fluctuation along the entire path, guiding the path search algorithm to select a direction with gradual thickness changes.
[0076] S400: The post-processing module smooths and makes the optimal discrete path continuous, and the navigation path output module outputs a continuous path trajectory that can be used by the surgical navigation system. The optimal discrete path obtained in step S300 is smoothed and made continuous to generate a continuous path trajectory that can be used by the surgical navigation system.
[0077] First, the discrete path according to Equivalent resampling at arc length intervals yields a point sequence. ,in , An initial continuous path is established using a cubic spline curve.
[0078] Define a comprehensive energy function on the resampled point series, which includes a path length term, a hazard penalty term, and a smoothing term. The calculation formula is as follows:
[0079] in The midpoint of a path segment is formed by adjacent path points and used to assess the risk of that path segment. , The path length cost weight and danger penalty cost weight are for the smoothing phase, which can be the same as or different from the weights in the search phase (this embodiment uses the weight values from the search phase). For smoothing weights; endpoints , Fixed. It should be noted that this embodiment uses the midpoint of the path segment to evaluate the hazard penalty to maintain consistency with the evaluation logic in the search phase; alternatively, the path points themselves can also be used. An evaluation was conducted, and both methods fall within the scope of protection of this invention.
[0080] The combined energy function is minimized using iterative gradient descent. For each interior point... ( ), calculate the gradient of the energy function (the specific gradient formula is a standard calculation in this field and will not be elaborated here). With a step size Perform location update: If after the update (Falling into a high-risk obstacle zone) will Projected back along the gradient direction equidistant surfaces (take) To ensure feasibility, repeat the iteration until the relative energy decrease is less than [a certain value]. Or reach the maximum number of iterations (e.g., 50 times).
[0081] The optimized point sequence is splined again to obtain the final continuous path. Provides an interface for subsequent modules: given any point , return to its The nearest point arc length parameter Coordinates of the nearest point and lateral deviation vector ;by Arc-length sampling provides track points and tangent vectors for use by robotic arms or augmented reality navigation. By performing equidistant resampling and energy optimization on discrete paths, geometric continuity can be achieved while maintaining close proximity to the original optimal trajectory. After each iteration, points deviating from the feasible region are projected back into the safe region, ensuring that the optimized path still meets clinical safety constraints. Ultimately, a continuous path trajectory that can be directly adapted to surgical navigation systems is generated.
[0082] The recommended parameters in this embodiment are as follows (which can be adjusted according to clinical needs): , , , , , , , , , , .
[0083] See Figure 3 As shown, in addition, to achieve the above objectives, the present invention also provides a specific structure of a tunnel path planning device for breast endoscopic surgery, comprising: a reverse scanning planning module 510, a data acquisition module 520, a data processing module 530, a safety distance field construction module 540, a path planning module 550, a post-processing module 560, and a navigation path output module 570. The reverse scanning planning module 510 is used to plan the virtual scanning path of the ultrasound probe and make the ultrasound probe perform reverse ultrasound scanning in the opposite direction of the virtual planned path. Data acquisition module 520 is used to acquire three-dimensional voxel data located in a unified world coordinate system obtained by the ultrasound probe scanning along the scanning path; The data processing module 530 is used to perform tissue segmentation on the three-dimensional voxel data to obtain the probability information of each voxel belonging to the skin, lesion, blood vessel and nerve respectively; The safe distance field construction module 540 is used to construct a set of buffer barriers based on the probability information of blood vessels and nerves, and to calculate the shortest distance from any point in three-dimensional space to the set of buffer barriers as the safe distance field. The path planning module 550 is configured to use a bidirectional search strategy to search for a path from the incision center to the lesion center. During the search process, the flap thickness statistics of each planned point on the path are dynamically maintained. The path evaluation function is accumulated by weighting the path length cost, the risk penalty cost which is negatively correlated with the safety distance field, and the thickness stability penalty cost based on the flap thickness variance increment as the segment increment cost. The optimal discrete path from the incision to the lesion is planned. The risk penalty cost decreases exponentially with the increase of the safety distance. Post-processing module 560 is used to smooth and make the optimal discrete path continuous. The navigation path output module 570 is used to output a continuous path trajectory that can be used by the surgical navigation system.
[0084] By acquiring three-dimensional voxel data through reverse ultrasound scanning and performing tissue segmentation, the spatial distribution of various tissues such as skin, lesions, blood vessels, and nerves can be characterized in a refined manner. Based on this, a safe distance field and a dynamic maintenance flap thickness statistic are constructed, incorporating the two major clinical concerns of safety and tissue thickness stability into the path optimization objectives. A bidirectional search strategy is adopted, and a multi-cost weighted sum is used as the evaluation function, which can quickly converge to the optimal discrete path that takes into account length, safety, and thickness stability in complex anatomical environments. After smoothing, a continuous path trajectory is generated, which can be directly adapted to the surgical navigation system, making the planning results clinically practical.
[0085] The modules are connected via a data bus. Specifically: the output of the reverse scan planning module is connected to the input of the data acquisition module; the output of the data acquisition module is connected to the input of the data processing module; the output of the data processing module is connected to the inputs of the safety distance field construction module and the path planning module; the output of the safety distance field construction module is connected to the input of the path planning module; the output of the path planning module is connected to the input of the post-processing module; and the output of the post-processing module is connected to the input of the navigation path output module.
[0086] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, controls a tunnel path planning device to perform path planning operations.
[0087] By acquiring three-dimensional voxel data through reverse ultrasound scanning and combining it with a depth segmentation network for refined segmentation of multiple tissues, accurate three-dimensional anatomical information is provided for path planning. On this basis, two major clinical concerns, safety (avoiding blood vessels and nerves) and tissue thickness stability (uniform flap thickness), are incorporated into multi-objective optimization. A safe distance field is constructed and thickness statistics are dynamically maintained to achieve an optimal balance between length, risk, and thickness uniformity in the planned path. A bidirectional search strategy and a weighted sum cost function are used to quickly converge to the optimal discrete path in complex anatomical structures. After smoothing, a continuous path trajectory that can be directly adapted to the surgical navigation system is generated, significantly improving the automation, safety, and clinical applicability of breast tunnel minimally invasive surgery.
[0088] Figure 4 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.
[0089] The processor may include one or more processing cores, such as a 4-core processor or an 8-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 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.
[0090] 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.
[0091] 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.
[0092] 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.
[0093] 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).
[0094] 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.
[0095] 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.
[0096] 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.
[0097] 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 tunnel path planning device for endoscopic breast surgery, characterized in that, include: The reverse scanning planning module is used to plan the virtual scanning path of the ultrasound probe and make the ultrasound probe perform reverse ultrasound scanning in the opposite direction of the virtual planned path. The data acquisition module is used to acquire three-dimensional voxel data located in a unified world coordinate system obtained by the ultrasound probe scanning along the scanning path; The data processing module is used to perform tissue segmentation on the three-dimensional voxel data to obtain the probability information of each voxel belonging to the skin, lesion, blood vessel and nerve respectively; The safe distance field construction module is used to construct a set of buffer barriers based on the probability information of the blood vessels and nerves, and calculate the shortest distance from any point in three-dimensional space to the set of buffer barriers as the safe distance field; The path planning module is configured to use a bidirectional search strategy to search for a path from the incision center to the lesion center. During the search process, the flap thickness statistics of each planned point on the path are dynamically maintained. The path evaluation function is accumulated by weighting the path length cost, the risk penalty cost negatively correlated with the safety distance field, and the thickness stability penalty cost based on the flap thickness variance increment as the segment increment cost, and a path evaluation function is obtained to plan an optimal discrete path from the incision to the lesion. The risk penalty cost decreases exponentially with the increase of the safety distance. The post-processing module is used to smooth and make the optimal discrete path continuous. The navigation path output module is used to output a continuous path trajectory that can be used by the surgical navigation system.
2. The tunnel path planning device for endoscopic breast surgery according to claim 1, characterized in that: The reverse scanning planning module is configured to start from the incision center and end at the lesion center, reconstruct the chest wall surface based on the preoperative three-dimensional medical images, and generate a series of virtual scanning points from the incision center to the lesion center along the chest wall surface to obtain a virtual scanning path. The data acquisition module is configured to acquire two-dimensional ultrasound images in the opposite direction of the virtual scanning path, and to interpolate and map the two-dimensional ultrasound images onto a three-dimensional voxel grid of a preset resolution using the real-time six-degree-of-freedom pose of the ultrasound probe, thereby obtaining three-dimensional voxel data in the world coordinate system. The data acquisition module further includes a depth segmentation network, which is used to input the three-dimensional voxel data into the depth segmentation network and output the probability that each voxel belongs to the skin, lesion, blood vessel and nerve respectively.
3. The tunnel path planning device for endoscopic breast surgery according to claim 2, characterized in that, The deep segmentation network adopts an encoder-decoder structure and introduces an attention mechanism in the cross-layer connection between the encoder and decoder. This attention mechanism generates attention weights by concatenating the features of the current layer with those of the previous layer and then applying the result to an activation function. The formula for calculating these attention weights is as follows: in For attention weights, For attention learning weights, For attention learning bias, For the first Layer Characteristics of individual element location, For the first Layer Characteristics of individual elements for Activation function.
4. The tunnel path planning device for endoscopic breast surgery according to claim 1, characterized in that, The safe distance field construction module is configured as follows: The vascular probability information and the neural probability information are fused into a hazard probability field. The formula for calculating the danger probability field is: in , The weights for blood vessels and nerves are respectively. Let the coordinates be the center point of the voxel. , These represent the probabilities that voxels belong to blood vessels and nerves, respectively. The probability value in the danger probability field is higher than a preset threshold. Voxel construction of initial obstacle set and with a preset safety radius For the initial set of obstacles Three-dimensional morphological dilation yields a set of buffer barriers. ; Calculate the center point of any voxel in three-dimensional space The shortest distance to the set of buffer barriers is used as the safe distance field. The safe distance field The calculation formula is: in, For the set of buffer barriers Any point in it.
5. The tunnel path planning device for endoscopic breast surgery according to claim 4, characterized in that, The path planning module is configured as follows: Define flap thickness For any voxel center point on the path The shortest distance to the skin surface, i.e. ,in It is the closest point to the skin surface along the local external normal direction; During the path search process, the number of thickness samples n and the mean thickness μ are maintained for each candidate path. t The cumulative sum of squared differences M2 is used to update the number of thickness samples n and the mean thickness μ when a new thickness sample x=t(p) is introduced at point p. t The cumulative sum of squared differences, M2, is updated using the following recursive formula: in, For the updated flap thickness variance estimation, This is the updated average thickness. The segment incremental cost The calculation formula is: in, For the current node, Adjacent nodes The path segment length, The midpoint of the path segment. As the weight of each cost, The danger penalty function is based on the safety distance field. This is a stable penalty function based on the incremental variance of flap thickness; From the starting point Reach the current node The cumulative cost is The heuristic function is: ,in, For the target node, the priority key value is .
6. The tunnel path planning device for endoscopic breast surgery according to claim 5, characterized in that, The danger penalty function The formula for calculating the monotonically exponential mapping of the safety distance is: in The preset scale parameters, Midpoint of the path segment The safe distance value at the location. The flap thickness stability penalty function The formula for calculating the variance increment of flap thickness before and after introducing the new pathway point is as follows: in, and These represent the variance of flap thickness before and after the introduction of the new pathway points, respectively.
7. The tunnel path planning device for endoscopic breast surgery according to claim 5, characterized in that, The path planning module is also configured to: The weight Based on the recent average cost indicators of various path segments With preset threshold The comparison results are adaptively adjusted, and the formula for calculating the adjusted weights is as follows: in, , , These represent the average length cost, average hazard penalty, and average thickness penalty of the recent path segment, respectively. , , For the corresponding preset threshold, It is a small constant; when , and At that time, the current weight remains unchanged.
8. The tunnel path planning device for endoscopic breast surgery according to claim 5, characterized in that, The process by which the path planning module executes the bidirectional search strategy includes: Establish node records at the start and end points respectively, and initialize the cumulative cost, heuristic function value and thickness statistics; Establish the forward candidate set, the backward candidate set, the forward visited table, and the backward visited table; In each iteration, the side with the smaller priority key value in either the forward candidate set or the backward candidate set is selected for expansion; Expand the three-dimensional neighborhood of the current node. If the safe distance value at the midpoint of the path segment is zero, it is determined to be infeasible and the neighbor is skipped. For neighbors that pass the feasibility check, update the thickness statistics, calculate the segment incremental cost, cumulative cost, and priority key value, and update the candidate set; Check if there are any meeting pairs in the visited tables on both sides whose geometric distance does not exceed the voxel side length. If they exist, calculate the connection cost and update the optimal connection cost. The iteration ends when the early stopping condition is met or when any candidate set is empty, and the optimal discrete path from the starting point to the ending point is obtained by backtracking along the parent pointer. The post-processing module is configured as follows: The optimal discrete path is resampled at equal intervals according to a preset arc length spacing, and the continuous path is initialized with a spline curve. Define a comprehensive energy function on the discrete point sequence, which includes a path length term, a hazard penalty term, and a smoothing term. The comprehensive energy function The calculation formula is: in The midpoint of a path segment is formed by adjacent path points. To smooth out the weights, and For fixed endpoints; The integrated energy function is minimized using an iterative gradient descent method. After each iteration, it is determined whether each point falls into a high-risk obstacle zone. If it does, the point is projected back along the gradient direction at a safe distance equal to a preset small value. On the equidistant surface; The optimized point sequence is splined again to obtain the final continuous path trajectory, and the nearest point projection interface and track point sampling interface are provided for the surgical navigation system to call.
9. A tunnel path planning method for endoscopic breast surgery, based on the tunnel path planning device for endoscopic breast surgery according to any one of claims 1-8, characterized in that, include: The reverse scanning planning module plans a virtual scanning path for the ultrasound probe and performs a reverse ultrasound scan in the opposite direction of the virtual planned path. The data acquisition module acquires the three-dimensional voxel data obtained from the reverse ultrasound scan. The data processing module performs tissue segmentation on the three-dimensional voxel data to obtain the probability information of each voxel belonging to skin, lesion, blood vessel and nerve respectively; The safe distance field construction module constructs a set of buffer barriers based on the probability information of the blood vessels and nerves, and calculates the safe distance field. The path planning module uses a bidirectional search strategy to search for tunnel paths from the incision center to the lesion center, and plans the optimal discrete path. The optimal discrete path is smoothed and made continuous by the post-processing module. The navigation path output module outputs a continuous path trajectory that can be used by the surgical navigation system.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, causes the processor to control the tunnel path planning method for breast endoscopic surgery as described in claim 9 to perform path planning operations.
