Optimal Design of Intracranial Hematoma Puncture Drainage Tube Based on Adaptive Bifurcation Algorithm

Aiming at the puncture and drainage of clinical intracranial hematoma, we proposed an adaptive bifurcation algorithm based on the hematoma point cloud and optimized the design of the drainage tube. Firstly, based on the CTdata of intracranial hematoma patients, a three-dimensional hematomamodel was established, the point cloud on the surface of the hematoma was extracted and simplified, and the location of the main drainage tube was located by using the long-axis extraction algorithm. Secondly, the Eight Diagrams algorithm was used to identify the internal point cloud of hematoma, and the positions of multiple absorption points were determined by the K-means clustering algorithm. -e locations of the bifurcation points of the main drainage tubes were calculated by the numerical method, and the telescopic lengths and directions of multiple subdrainage tubes were obtained. Finally, connect the main tube and the subtube, design an adaptive bifurcation drainage tube model, and apply it to intracranial hematoma puncture and drainage surgery. -e algorithm can accurately determine the puncture point, puncture path, number, and location of subdrainage tubes according to the geometric characteristics of hematoma, achieve a uniform and accurate dose adjustment and drainage of intracranial hematoma, and accelerate the dissolution and drainage speed. -e application of an adaptive bifurcation drainage tube can significantly reduce the risk of intracerebral hemorrhage, intracranial infection, and other complications, which has certain guiding significance and application value in clinical practice.


Introduction
At present, craniotomy is often used clinically to remove intracranial hematoma in patients. Patients with hematoma have a long anterior and posterior diameter, which is difficult to expose during the operation, requires a larger bone window, and repeatedly stretches the cortex. e operation is more difficult and the hematoma removal rate is low. e patient has a poor prognosis [1]. In recent years, minimally invasive hematoma removal by hematoma puncture and drainage can reduce the surgical incision, facilitate timely removal of hematoma, quickly improve intracranial pressure, do a good job in the prevention, control, and treatment of secondary brain injury, and relieve the damage of hematoma tissue to nerve cells [2]. Neuronavigation hematoma puncture technology can quickly and accurately remove an intracranial hematoma, intraoperative puncture direction, puncture point, and puncture depth can be controlled, and the drainage tube can be easily and accurately placed into the hematoma cavity, avoiding the blindness of traditional puncture [3]. It is an important means for clinical treatment of cerebral hemorrhage and improvement of prognosis. However, the small hole at the end of the traditional drainage tube is embedded in the wall of the main tube, and the diffusion rate is low and slow, thus prolongs the operation time and increases the operation risk. Moreover, uniform administration and drainage in different directions could not be realized according to the shape of hematoma. erefore, this paper optimized the design of the traditional drainage tube.
At present, the minimally invasive surgery for the elimination of intracranial hematoma in clinical practice uses the traditional drug drainage tube. e total length of the main canal is 14 cm, and the diameter is 0.2 cm. e end of the main canal is closed, among which 1 cm and 1.5 cm away from the end are provided with a hole with a diameter of 1 mm, respectively, these two small holes are symmetrically distributed on both sides of the main channel, as shown in Figure 1.
e small hole at the end of the traditional drainage tube is embedded in the wall of the main tube so that the outer surface of the main tube is fully smooth, thus reducing the friction between the drainage tube and intracranial tissue during the operation and ensuring that the drainage tube can reach the center of the hematoma as quickly, safely, and accurately as possible.
e hemolytic agent can produce the interdiffusion reaction with the hematoma. e hemolytic agent drained by the traditional drainage tube is mainly concentrated in the small hole of the main tube, and the blood concentration in the hematoma is also diffused in the direction of the orifice. As a result, the interdiffusion efficiency of hemolytic agent and hematoma is low and the speed is slow, thus prolongs the operation time and increases the operation risk [4].
Cui proposed a multifunctional drainage tube for intracerebral hematoma with multiple subtubes, which could achieve telescopic subtubes in the common duct and 360°r otation of drug delivery in the common duct, so as to achieve the purpose of multipoint and multidirectional uniform drug delivery and drainage [5]. Pan L proposed an improved adaptive weighted particle swarm optimization point cloud search algorithm to improve the efficiency and accuracy of puncture point identification and applied it to extract the optimal external axis, thus providing the optimal path for hematoma drainage tubes [6]. Zhu puts forward visual analysis of flow and diffusion of hemolytic agents and hematomas, using COMSOL more physical software to simulate the hemolysis agent bifurcate drainage tube in the streamline distribution and hemolysis agent in the diffusion behavior of hematoma [4]. Based on previous studies in our team, the drainage tube was optimized, and the adaptive bifurcation drainage tube was customized according to the geometric characteristics of different intracranial hematomas.
In this paper, an optimization model for the traditional drainage tube was proposed. Based on the long-axis extraction algorithm, the main position was determined, and the clustering points were found according to the K-means clustering analysis to accurately locate the position of the subdrainage tube. e optimized adaptive bifurcation drainage tube can achieve uniform and accurate administration and drainage of hematoma in different directions, reduce blood residue, achieve the purpose of maximum drainage, accelerate the dissolution and drainage of hematoma, and improve the safety of surgery. ree-dimensional real-time software simulation technology is used to reconstruct anatomical sites, such as hematoma, blood vessels, skull, and nerve tract. Clinicians can use the adaptive bifurcated drainage tube designed in this paper to conduct preoperative simulation, avoid important parts of the brain, and achieve accurate puncture of hematoma, thus reducing the risk and time of treatment [7-9].

Optimal Design of Main Drainage Tube
Based on Long-Axis Extraction Algorithm 2.1. Simplify the Surface Structure of Hematoma. In this paper, CT data of intracranial hematoma patients were extracted and preprocessed to achieve 3D reconstruction, and point cloud datasets were extracted. Due to the complexity of the shape of hematoma, the number of point clouds, the location of scattered and discontinuous, and the difficulty of calculation, and the surface hierarchy of hematoma are simplified. e hematoma data were obtained from Tangshan Gongren Hospital, as shown in Figures 2  and 3. is paper uses decimation of triangle meshes algorithm, with valuation grid on local topology and geometry properties of lattice; the lattice can be divided into simple types; thus, it can be divided into interior and boundary of two types. e judgment of lattice deletion is based on d < X, X is given to allow the deviation value, the interior point d is the distance between candidate points to the average plane, and the boundary point d is a candidate to second neighbor points of attachment. Finally, the neighborhood of the deleted grid points is repartitioned by the method of the optimal split plane, and the time complexity is linear [10].
By changing the smoothness of the surface of the hematoma, the surface structure of the hematoma is simplified, and the overall structure of the space remains unchanged. e surface point cloud data is reduced, the algorithm is regular and fast, and the effect of fidelity and detail preservation is good. e simplified hematoma model before and after is shown in Figures 4 and 5.

Puncture Points Were Extracted Using the Optimized
Long-Axis Extraction Algorithm. By studying the long-axis problem of complex geometry, it can be reduced to the farthest point pair problem of the point cloud model [11], that is, the line segment with the longest Euclidean distance between any point pair. By using the long-axis extraction algorithm, the distance function of discrete model is maximized to solve the furthest point pair problem. e distance function of the geometric point cloud model is established to maximize the maximum-minimum distance (max-min) and maximum-average distance (max-avg) between any point pairs. Assume that the given point cloud is set V � v 1 , v 2 , . . . , v n (nonnegative N points), the distance between each point pair is the edge weight, and each edge weight is nonnegative. e edge weight of any point with respect to . e goal of the discrete problem is to locate p points (p ≤ n) among n points in the point cloud to maximize the function of the distance between point pairs [12].
MAX-MIN points' dispersion (MMPD): for the non- and an integer p(2 ≤ p ≤ n) so that |P| � p can obtain the distance function: Maximizing distance function: which make |P| � p and get the average distance function: Maximizing average distance function: Number of point pairs in the point cloud: erefore, the maximized average distance is equal to the sum of the maximized distances. e distance specified in MMPD or MAPD satisfies the triangle inequality, that is, any three different points v i , v j , and v k satisfy Existence distance functions and average distance functions: there are distance functions and average distance functions: e distance between pairs of points in space is Euclidean distance: (8) e above hematoma model was taken as an example to verify the algorithm, as shown in Figures 6 and 7.
From what has been discussed above, the long-axis extraction algorithm can be used to solve the farthest point pair problem in the point cloud model. e long axis of the model is the line segment with the longest Euclidean distance in the point cloud. e algorithm has the advantages of easy model iteration, low time consistency, convenient storage of calculation results, easy expansion, and more consistent with the geometry of the topology.
Preliminary results show that the main drainage tube can determine the direction of puncture and drainage according to the long axis of different hematomas so that the introduction of hemolytic agent and the extraction of hematoma fluid can be precise and avoid important brain functional areas. is design is far away from the dense area of the middle cerebral artery and the important branch of the external carotid artery in the scalp, which has little impact on the normal physiological structure, reduces the difficulty of surgery and reduces the risk of surgery.

Long-Axis Extraction Compared with the Horizontal
Optimization of the Previous Method. When using the longaxis extraction algorithm to extract the point cloud data, because there are many point cloud data in the initial geometry space, the method of simplifying the number of faces is adopted to simplify the hematoma geometry. In order to simplify the influence of different complexity degrees on the long-axis operation time and accuracy, the simplified point cloud data were used to conduct point cloud number statistics and time statistics, and the identification accuracy was compared. Point cloud data with different complexities were shown in Table 1.   (Table 1 and Figure 8) shows that the number of point clouds is positively correlated with the retrieval time, and the simplified data can meet the accuracy requirements within the allowable range of the calculation time, reduce the calculation time of the long axis of the hematoma as much as possible, and meet the requirements of the calculation of puncture hematoma surgery.
In tests of different levels of complexity, although the same number of iterations is used to find the long axis, it is obviously not enough for graphics with more point cloud data. For a graph with a complexity level of 7, a more accurate long axis can be obtained faster with the same number of iterations on the geometry, as shown in Figure 7.

Optimal Design of Adaptive Drainage
Branch Tube

Internal Points of Intracranial Hematoma Were Extracted
Based on the Eight Diagrams Algorithm. e internal points of three-dimensional graphics are identified by using the Eight Diagrams algorithm. e points discussed in this paper are composed of contour data points and internal data points on the surface of geometry by graphic files for the 3D point cloud array [13]. e three-dimensional space is divided into the eight diagrams, as shown in Figure 9. When the target is close to the surface of the geometry, the tangent plane is generated. e target point and the geometry on the tangent plane are in the space rectangular coordinate system and at the side of the origin of the tangent plane. On the other side of the plane, there is at least one hexagram without a target and geometry, so the algorithm can be used for hematoma interior-point discriminant Eight Diagrams.
Eight Diagrams algorithm is used in this paper to discriminant of hematoma interior point, as shown in For example, the target point is zero: a(x a , x b , x c ). e collection of surface points of hematoma is

Journal of Mathematics
e collection of internal points of the hematoma is e set of target point and hematoma surface point vector is To judge the internal point of hematoma, if any hexagrams of the spatial Eight Diagrams contain vectors in set D and the symbols corresponding to each vector include the symbols corresponding to the above Eight Diagrams, then the target point is the internal point of hematoma. If there is at least one hexagram in the spatial Eight Diagrams that does not contain the vector in set D and there is at least one case in which the hexagram corresponding symbol does not contain the vector in set D, then the target point is the hematoma surface point or the external point.
Taking the above intracranial hematoma as an example, the Eight Diagrams algorithm was used to distinguish the internal points of hematoma and extract the data set of internal points and surface points of hematoma. e yellow points were internal data points of hematoma, and the red points were surface data points of hematoma. e distribution of internal and surface data points of hematoma is shown in Figures 11-13 .

Extraction of Hematoma Absorption Points Based on K-Means Clustering Analysis
Algorithm. K-means clustering analysis algorithm clustered n data objects in the space with K points as the center and classified the target points closest to the center to get K clusters [14].
rough the iteration method, the coordinate values of each cluster center are updated successively so that the similarity of objects in the same cluster is high, while the similarity of objects in different clusters is low, and the optimal cluster center is obtained.
For example, we have n variables, x 1 , x 2 , . . . , x n , divided into k classes, X 1 , X 2 , . . . , X k , and N i is the number of variables in class X i , i, and m i for the average:    (2) Iterate for any sample, calculate the Euclidean distance to k center points, respectively, and group the sample to the class where the center with the shortest distance is located. Euclidean distance: If d(x j , m i ) < d(x i , m i ), among them, 1 ≤ p ≤ K, i � 1, . . . , k, so assign x j to class p.
(3) Use the mean method to update the values of the center of the k classes.
(4) For all k clustering centers, the abovementioned (2) and (3) are repeated until each clustering center no longer changes. e iteration is finished and the classification is completed.
Combined with the above intracranial hematoma data set. K-means clustering analysis algorithm was adopted. e data objects of intracranial hematoma in space were clustered with 4 points as the center, and the target points nearest to the center were divided into 4 clusters. rough the iteration method, the coordinate values of each clustering center are updated successively so that the similarity of objects in the same clustering is higher, while the similarity of objects in different clustering is smaller. Finally, four optimal clustering centers are obtained. e data set is shown in Table 2.
K-means clustering analysis was performed on the internal data points of the hematoma, and the clustering results are shown in Figure 14. e four clusters were yellow, green, purple, and blue, and the four red dots were the clustering centers, namely, the absorption points of the hematoma.

Determine the Point of Branching of the Hematoma on the Main Drainage Tube.
e origin is O at the end of the long axis, the major axis is the z-axis, and the outlet direction of the main outlet is the positive direction of the Z-axis. us, a three-dimensional coordinate system O-XYZ is established. Let the length of the long axis be L; divide the long axis into points n and take a point a i , i ∈ [1, n] at every interval L/n; vectors were made with four hematoma absorption sites Z ij �→ ; calculate the angle θ between each vector and the positive direction of the z-axis z → . Let the supervisor start with A s � (x s , y s , z s ).
e main end is A e � (x e , y e , z e ). en, the leading vector is a � (x s − x e , y s − y e , z s − z e ). Supervisor above each point is e

set of vectors composed of each point on the main axis is
Let the absorption point vector be P j � (x j , y j , z j ), j ∈ [1,4]. en, the vector set from each point on the main to each absorption point is In the error value calculation method, the measured value θ, E is the normal value 45°: The points on the surface of the training results

Journal of Mathematics
. (14) e iterative calculation was carried out to make the error value ε � 0.05 satisfied δ < ε by giving the error value δ. e four points with the smallest error were taken as the branch bifurcation points of the main pipeline. By connecting the bifurcation point and absorption point, the telescopic length and direction of the subdrainage tube were obtained. en, the overall structure of the bifurcation drainage tube was designed.

Result Analysis
In this paper, an adaptive bifurcation algorithm based on hematoma point cloud is proposed. To optimize the design of puncture drainage tube for clinical intracranial hematoma, the following steps are followed: Step 1: based on the CT scan data of patients with intracranial hematoma, 3D reconstruction was performed to establish a 3D hematoma model. e point cloud data set was extracted to simplify the hematoma surface hierarchy and the surface point data set.
Step 2: use the long-axis extraction algorithm to select the farthest point pair of Euclidean distance as the two endpoints of the long axis to locate the location of the main drainage tube, and the coordinates of the two ends of the long axis are shown in Table 3; Step 3: Eight Diagrams algorithm was used to extract internal point cloud of hematoma.
Step 4: the K-means clustering analysis algorithm is used to determine the position of absorption points. e coordinates of the absorption point are shown in Table 4; Step 5: use numerical solution to calculate the branch point of the upper branch of the main pipe. e coordinates of the bifurcation point are shown in Table 5; Step 6: the expansion direction and length of the adaptive bifurcation drainage tube were obtained by connecting the bifurcation point with the absorption point. erefore, an adaptive bifurcation drainage tube model was designed, as shown in Figure 15.
Step 7: the three-dimensional reconstruction model of intracranial hematoma was imported into COMSOL. On this basis, the adaptive branching drainage tube model was introduced to obtain the visual simulation diagram of the influence of the adaptive branching drainage tube on hematoma, as shown in Figures 16  and 17.
In clinical medicine, the closed adaptive bifurcated drainage tube is delivered to the intracranial hematoma through a catheter, and the drainage tube is automatically stretched in the hematoma. Among them, the drainage pipe for special silicone material is soft in texture and small to tissue damage. When the hemolysis agent passes through the drainage tube into the hematoma, diffusion effect occurs mainly in the export area around the four drainage tubes. Multicast delivery drainage achieves the purpose of uniform dosage and drainage, so as to speed up the blood clot dissolves and drainage. And, pressure is applied to quickly remove the main functional structure of the hematoma to reduce the damage that causes the disease of cerebral hemorrhage.

Error Analysis of Simplified Hematoma Surface.
Hierarchy Structure Algorithm is used with the function approximation to perform error analysis on the simplified model and solve the geometric similarity measurement problem [15].
L ∞ and L 2 norms are two commonly used error measurement standards. Let the surface point function of the original hematoma be f(t), e simplified surface point function of hematoma is g(t), we give a closed interval [a, b].
e L ∞ norm is used to indicate the maximum deviation between two functions: e L 2 norm represents the average deviation between two functions: After simplification, the surface point function of hematoma is g(t), which is considered to be optimal; the similarity error measure of L ∞ norm and L 2 norm can be used to measure the error between two triangular mesh models. In the triangular mesh model, what is measured is After testing, the original hematoma model was simplified by 60% in this paper, and the geometric similarity of the hematoma was within the error range. e simplified results could better simulate the original hematoma model.

Error Analysis of Optimized Long-Axis Extraction
Algorithm.
e beginning end of the long axis A s1 and the end A e1 are obtained by the initial long-axis algorithm; the beginning end A s2 and the end A e2 of the long axis are obtained by optimizing the long-axis algorithm.  e long-axis vector obtained by the initial long-axis algorithm t 1 � A s1 − A e1 . e long-axis vector obtained by optimizing the long- Let ε � 0.05, and there are rough testing, the positions and directions of the two endpoints of the long axis before and after optimization in this paper are within the error range, and the optimized long-axis extraction algorithm has high computational efficiency, which reduces the preoperative planning time.

Conclusion
In this paper, the traditional drainage tube was optimized into an adaptive bifurcation drainage tube that could be customized according to different hematoma conditions. It makes the introduction of the hemolytic agent and the derivation of hematoma fluid precise. CT data are obtained from patients with intracranial hematoma to establish a threedimensional hematoma model and simplify the hematoma surface hierarchy; then, the surface point cloud of hematoma was extracted; using long-axis extraction algorithm, locate the location of the main drainage tube. Accurately determine the entrance and direction of the puncture of the main drainage tube, using the Eight Diagrams algorithm and discriminating the internal data sets of hematomas and the visual processing. e absorption points are determined by K-means clustering analysis algorithm; among them, the number of absorption points can be calculated according to the shape of hematoma. e telescopic direction and length of the subtube were obtained by connecting the absorption point and the bifurcation point. Based on this, the self-adaptive bifurcation drainage tube model was designed and finally applied to the puncture and drainage of intracranial hematoma. e algorithm can accurately determine the puncture point, the puncture path, and the location and number of subdrainage tubes according to the geometric characteristics of hematoma, achieve a uniform and accurate drug administration and drainage of intracranial hematoma, and accelerate the dissolution and drainage speed of hematoma. e adaptive bifurcation algorithm proposed in this paper is based on the idealized state, and it is necessary to consider the distribution of peripheral nerves and other important parts of intracranial hematoma in the application. e application of adaptive bifurcated drainage tubes can effectively shorten the operative time of patients, reduce intraoperative blood loss, improve the hematoma clearance rate, and improve the neurological function and prognosis of patients, with accurate, minimally invasive, and safe effects [16]. It has clinical significance and application value for the medical treatment of intracranial hematoma and provides preoperative simulation. It can promote the subsequent hematoma deformation research and visualization analysis and provide important guidance and value for the formulation of a puncture surgery plan and the reduction of surgical risk.

Data Availability
e data used to support the findings of this study are restricted by the Tangshan Gongren Hospital in order to  Journal of Mathematics protect patient privacy. e data are available from the Tangshan Gongren Hospital for researchers who meet the criteria for access to confidential data.

Conflicts of Interest
e authors declare that they have no conflicts of interest.