A parallel method for computing convex hulls based on multi-core architecture
By employing classification-based computation and multi-directional array point decomposition methods under a multi-core architecture, the integration problem in convex hull computation is solved, improving computational efficiency and scalability while reducing complexity and power consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG GONGSHANG UNIVERSITY
- Filing Date
- 2022-11-19
- Publication Date
- 2026-05-01
AI Technical Summary
In multi-core architectures, existing technologies struggle to effectively address the integration problem in convex hull computation, making it impossible to simply decompose the divide-and-conquer strategy and leaving the solution perplexing.
By re-entering the convex hull point after the non-empty point set is implanted into the JDSS(S) interval and then being transferred out of the serial interval after being identified as unqualified by the JDSS(S) interval, a classification calculation method is adopted, which is combined with multi-directional array points and conjugate functions for decomposition, and the sub-problems are solved in parallel using a divide-and-conquer strategy.
It achieves an efficient solution to the integration problem of convex hull computing under a multi-core architecture, improving computing efficiency and scalability while reducing complexity and power consumption.
Smart Images

Figure CN115994283B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of geometric computation technology, and more specifically to a parallel method for computing convex hulls based on a multi-core architecture. Background Technology
[0002] Convex hulls are one of the most common and fundamental structures in computational geometry. The problem of convex hulls for planar point sets has wide applications in many fields such as computer graphics, image processing and pattern recognition, and geographic information systems. Early research results on serial algorithms for computing convex hulls, both domestically and internationally, mainly included the convolutional wrapping method, Graham's algorithm, divide-and-conquer algorithms, incremental algorithms, real-time algorithms, and fast algorithms. With the continuous development of parallel computing technology, many researchers both domestically and internationally have attempted to apply parallel techniques to the computation of convex hulls.
[0003] The fundamental principle of multi-core architecture is to maximize application performance and scalability while minimizing power consumption and upgrade complexity. Multi-core architecture combines dedicated hardware acceleration with high-performance multi-core processor architecture technology. Most of these parallel algorithms employ a divide-and-conquer strategy, breaking down the original problem into several subproblems, solving these subproblems independently in parallel, and then combining the solutions to all subproblems to obtain the solution to the original problem.
[0004] However, in solving some combined problems, there are algorithmic interactions between the two combined problems, so it is not possible to simply decompose the original problem to achieve a divide-and-conquer strategy. In the process of solving the original problem with a divide-and-conquer strategy, overall decomposition may also lead to a situation where it is impossible to know where to start. Summary of the Invention
[0005] To overcome the shortcomings of existing technologies, this invention proposes a parallel method for computing convex hulls based on a multi-core architecture. By re-entering the convex hull point set after it has been qualified by the JDSS(S) interval, and exiting the serial interval after it has been identified as unqualified by the JDSS(S) interval, the algorithm with a large combination problem can be classified and calculated to achieve the goal of solving the problem.
[0006] The parallel method for computing convex hulls based on a multi-core architecture, as described in this invention, includes the following steps:
[0007] a. In the process of solving the algorithm, any convex hull point is sorted into a point list. Combined with the recognition algorithm window, the non-convex hull points are removed for the first time. The three-dimensional extreme points formed along the horizontal and vertical directions are found. In the process of recognizing whether the algorithm points are completely convex hull points, the incomplete convex hull points in the algorithm points are marked to form the convex hull point list NCP(S). The complete convex hull edge chain in the algorithm points is NCE(S).
[0008] b. The convex hull point sequence NCP(S) and the convex hull edge chain NCE(S) need to form a multi-directional array point after backup. In the array point, historical experience points are compared and judged from left to right and from outside to inside to form an undecomposed point GIDF(S). When GIDF(S) is greater than 3-4 times MAXCLS, it is transferred to the serial interval to form a non-empty point set.
[0009] c. If the GIDF(S) in the serial interval is non-concave, its non-empty point set is again successfully implanted by the JDSS(S) interval and then transferred to the convex shell point. If it fails to be identified by the JDSS(S) interval implantation, it is transferred out of the serial interval.
[0010] d. After determining whether the number of points in the convex hull point chain NCP(S) and the convex hull edge chain NCE(S) is greater than a given threshold, perform parallel classification of point sets or serial classification of point sets. Then, grow the first to nth directed edges from each directed edge in NCE(S) in parallel. Finally, delete the non-convex hull vertices in NCP(S), thus ending the process.
[0011] Preferably, the derivative is obtained by using a closed convex set as a decomposition guide when the undecomposed point GIDF(S) is transferred into the interval JDSS(S).
[0012] Preferably, outliers and redundant points are intercepted by multi-directional filtering code DUGW(S) before parallel growth of NCE(S).
[0013] Preferably, data from N points needs to be stored before the algorithm starts, and the storage space between the data points is less than 2n.
[0014] Preferably, the vertices of the polygon formed by the convex hull point chain NCP(S) and the convex hull edge chain NCE(S) must be on the same side of any edge of the polygon.
[0015] The beneficial effects of this invention are as follows: by re-entering the convex shell point after the non-empty point set is implanted into the JDSS(S) interval and is identified as unqualified after being implanted into the JDSS(S) interval, the point is transferred out of the serial interval, thereby performing classification calculations on algorithms with large combination problems and achieving the goal of solving the problem. Attached Figure Description
[0016] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0017] Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0018] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.
[0019] like Figure 1As shown, the parallel method for computing convex hulls based on a multi-core architecture according to the present invention includes the following steps:
[0020] a. In the process of solving the algorithm, any convex hull point is sorted into a point list. Combined with the recognition algorithm window, the non-convex hull points are removed for the first time. The three-dimensional extreme points formed along the horizontal and vertical directions are found. In the process of recognizing whether the algorithm points are completely convex hull points, the incomplete convex hull points in the algorithm points are marked to form the convex hull point list NCP(S). The complete convex hull edge chain in the algorithm points is NCE(S).
[0021] b. The convex hull point sequence NCP(S) and the convex hull edge chain NCE(S) need to form a multi-directional array point after backup. In the array point, historical experience points are compared and judged from left to right and from outside to inside to form undecomposed points GIDF(S). When GIDF(S) is greater than 3-4 times MAXCLS, it is transferred to the serial interval to form a non-empty point set.
[0022] c. If the GIDF(S) in the serial interval is non-concave, its non-empty point set is again successfully implanted by the JDSS(S) interval and then transferred to the convex shell point. If it fails to be identified by the JDSS(S) interval implantation, it is transferred out of the serial interval.
[0023] d. After determining whether the number of points in the convex hull point sequence NCP(S) and the convex hull edge chain NCE(S) is greater than a given threshold, perform parallel classification of point sets or serial classification of point sets. Then, grow the first to nth directed edges from each directed edge in NCE(S) in parallel. Finally, delete the non-convex hull vertices in NCP(S) to end the process.
[0024] In practice, most parallel algorithms use a divide-and-conquer strategy, which decomposes the original problem into several subproblems, solves these subproblems independently in parallel, and then combines the solutions of all subproblems to obtain the solution to the original problem. However, in the process of solving some combined problems, there will be algorithmic interactions between the two combined problems, so it is not possible to simply decompose the original problem to achieve the divide-and-conquer strategy. In the process of solving the original problem with the divide-and-conquer strategy, overall decomposition may also lead to a situation where there is no way to start solving the problem.
[0025] In the initial algorithm process, S is set as {P1, P2, ..., Pn} / 2R≥3, which is any non-empty set of points on the plane. Then, the convex hull in the point set S, along the counterclockwise direction for each vertex in BCH(S), forms the LVBCH(S), which is a polygon in BCH(S). By matching the edge points on the polygon with the points on the convex hull point sequence NCP(S), NCE(S) is formed. Based on the above point set, a multi-directional array of points is formed. Since the point set has Pn points, the number of transitions to 2 will not exceed n, and each vertex will be deleted at most once, and the number of deleted vertices will not exceed n. Therefore, step b has a linear time complexity. Calculate the tangent line between Pn and NCP(S) to obtain the tangent points u and v. This is equivalent to adding Pn to the polygon NCE(S) by deleting several edges, and then obtaining a vertex classification table based on the included angle according to a similar vertex classification method.
[0026] f:X→R
[0027] The conjugate function is:
[0028] g*(y)=sup{<x,y> -f(x)}
[0029] x∈X
[0030] The independent variable of the conjugate function becomes y, and x becomes one of its parameters; it must be a convex function, or even a polyconvex function. Because it is the maximum value among a series of affine functions (linear functions) of y, its slope must increase piecewise; thus, a decomposition point GIDF(S) can be formed. When GIDF(S) is greater than 3-4 times MAXCLS, it is transferred into a serial interval to form a non-empty point set; the non-empty point set is again decomposed by the JDSS(S) interval and, after passing the decomposition, is transferred back into the convex shell point; if it fails the JDSS(S) interval decomposition, it is transferred out of the serial interval. The decomposed data may be the program input, the program output, or the intermediate values maintained by the program; the analysis and partitioning may vary depending on the data structure. Appropriate rules of thumb will be applied first to the largest or most frequently accessed data structure.
[0031] After determining whether the number of points in the convex hull point sequence NCP(S) and the convex hull edge chain NCE(S) is greater than a given threshold, parallel or serial point set classification is performed. For point set Si, parallel classification is performed according to eve2: S is divided into two point sets Su and Si2 of approximately equal size. The external points of e1 are deleted from Su, and these points are added to the external point set of er. The same process is performed in parallel on S2 and e2. The remaining points in Su and Si2 are merged into the original Si. The same process is performed in parallel on point set S according to ese. Then, the first to n directed edges are grown from each directed edge in NCE(S) in parallel. Finally, the non-convex hull vertices in NCP(S) are deleted, thus ending the process.
[0032] In one embodiment of the present invention, the derivative is used as a decomposition guide by means of a closed convex set when the undecomposed point GIDF(S) transitions into the interval JDSS(S). During operation, the subgradient is a closed convex set, representing an extension of the derivative concept to convex functions. An element in the subdifferential... This is called the subgradient of the function φ at the point x0. A closed set is defined if and only if the function φ is differentiable at x0. Transform into derivative For example, when the absolute value function φ(x) = |x|: x < 0, When x>0, When x = 0, This closed interval; the derivative guide on the closed convex set provides decomposition hints and basis for derivative decomposition.
[0033] As one embodiment of the present invention, before parallel growth of NCE(S), the multi-directional filtering code DUGW(S) is used to intercept external points and redundant points. During operation, for external points and redundant points, the filtering code DUGW(S) in the convex hull points intercepts the convex hull, iteratively classifies and deletes uncertain points until there are no more uncertain points, thereby achieving the purpose of simplifying the convex hull points and reducing the running burden for unnecessary subsequent calculations. External points, which are on the directed edge side, are also subject to point set generation and classification.
[0034] As one embodiment of the present invention, the algorithm needs to store data of N points before it starts, and the storage space between the data is less than 2n. During operation, with sufficient storage space, the line point L can be rotated around Pi by a corresponding method. First, connect Pi with the non-convex hull vertex Pj, j = i+1,...,n, to obtain line segment PiPj. Then, calculate the angle between these line segments and L (line segment Pi-Pj). The other endpoint Pi+1 that forms the smallest angle is the convex hull vertex. When there are three or more collinear points, if only the points at the two endpoints can be counted and the other points in the middle are not counted, it is necessary to make another judgment during the algorithm execution. When there are several minimum angles, the point with the farthest distance should be selected.
[0035] In one embodiment of the present invention, the vertices of the polygon formed by the convex hull point sequence NCP(S) and the convex hull edge chain NCE(S) must be on the same side of any edge of the polygon. During operation, the cross product of vectors is used to determine whether two points are on opposite sides or on the same side of a line segment. For example, if there are two points p and q and line segment AB, then the vectors pA, pB, qA, and qB are calculated. If the cross product pA*pB and qA*qB have the same sign, it means they are on the same side of the line segment; otherwise, they are on opposite sides. In addition, if the calculation results in zero, it means that the point is on that line segment, i.e., multiple points are collinear. By ensuring that all vertices are on the same side of any line segment, the linear time complexity can be intuitively demonstrated.
[0036] Specifically, the derivative guide on the closed convex set provides decomposition hints and basis for derivative decomposition; for external points and redundant points, the filtering code DUGW(S) in the convex hull intercepts the convex hull, iteratively classifies and deletes uncertain points until there are no more uncertain points, thereby simplifying the convex hull points and reducing the runtime burden for unnecessary subsequent calculations. External points, as directed edges, are also classified and generated into point sets; with sufficient storage space, the rotation of the line point L around Pi is conveniently implemented through a corresponding method. First, connect Pi to the non-convex hull vertex Pj, j = i+1,...,n, to obtain the line segment PiPj, then... Next, calculate the angles between these line segments and L(line segment Pi-1Pi). The other endpoint Pi+1 that forms the smallest angle is the vertex of the convex hull. When three or more points are collinear, if only the points at the two endpoints are counted and the other points in between are ignored, a separate judgment must be made during algorithm execution. When there are several minimum angles, the point with the farthest distance must be selected. To determine whether two points are on opposite sides or on the same side of a line segment, use the cross product of vectors. For example, if there are two points p and q, and line segment AB, calculate vectors pA, pB, qA, and qB. When calculating the cross product pA*pB and qA*qB, if they have the same sign, it means they are on the same side of the line segment; otherwise, they are on opposite sides. In addition, if the calculation results in zero, it means that the point is on that line segment, i.e., multiple points are collinear. By placing all vertices on the same side of any line segment, the linear time complexity can be intuitively demonstrated.
[0037] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A parallel method for computing convex hulls based on a multi-core architecture, characterized in that, Includes the following steps: a. In the process of solving the algorithm, any convex hull point is sorted into a point list. Combined with the recognition algorithm window, the non-convex hull points are removed for the first time. The three-dimensional extreme points formed along the horizontal and vertical directions are found. In the process of recognizing whether the algorithm points are completely convex hull points, the incomplete convex hull points in the algorithm points are marked to form the convex hull point list NCP(S). The complete convex hull edge chain in the algorithm points is NCE(S). b. The convex hull point sequence NCP(S) and the convex hull edge chain NCE(S) need to form a multi-directional array point after backup. In the array point, historical experience points are compared and judged from left to right and from outside to inside to form an undecomposed point GIDF(S). When GIDF(S) is greater than 3-4 times MAXCLS, it is transferred to the serial interval to form a non-empty point set. c. If the GIDF(S) in the serial interval is non-concave, its non-empty point set is again successfully implanted by the JDSS(S) interval and then transferred to the convex shell point. If it fails to be identified by the JDSS(S) interval implantation, it is transferred out of the serial interval. d. After determining whether the number of points in the convex hull point chain NCP(S) and the convex hull edge chain NCE(S) is greater than a given threshold, perform parallel classification of point sets or serial classification of point sets. Then, grow the first to nth directed edges from each directed edge in NCE(S) in parallel. Finally, delete the non-convex hull vertices in NCP(S), thus ending the process.
2. The parallel method for computing convex hulls based on a multi-core architecture according to claim 1, characterized in that: In the interval JDSS(S), the derivative is obtained by using a closed convex set as a decomposition guide when the undecomposed point GIDF(S) is transferred into JDSS(S).
3. The parallel method for computing convex hulls based on a multi-core architecture according to claim 2, characterized in that: Before parallel growth of NCE(S), outliers and redundant points are intercepted by the multi-directional filtering code DUGW(S).
4. The parallel method for computing convex hulls based on a multi-core architecture according to claim 3, characterized in that: Before the algorithm starts, data from N points needs to be stored, and the storage space between the data points is less than 2n.
5. The parallel method for computing convex hulls based on a multi-core architecture according to claim 1, characterized in that: In a polygon formed by the convex hull point sequence NCP(S) and the convex hull edge chain NCE(S), each vertex must be on the same side of any edge of the polygon.
Citation Information
Patent Citations
Constraint terrain parallel construction method under single-computer multi-core environment
CN105160706A
Methods and Apparatus for Encoding Data in Notched Shapes
US20210150821A1