A method for GPU-accelerated polygon Boolean operation

By using a GPU-accelerated polygon Boolean operation method, the polygon set is distributed on a grid and a synchronous GPU thread group is constructed, which solves the problems of low computing efficiency and high parallelization difficulty of traditional CPUs, and realizes efficient parallel polygon Boolean operation to meet the real-time requirements of integrated circuit design.

CN122047149BActive Publication Date: 2026-06-26HEFEI ARTIFICIAL INTELLIGENCE & BIG DATA RES INST CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HEFEI ARTIFICIAL INTELLIGENCE & BIG DATA RES INST CO LTD
Filing Date
2026-04-16
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Traditional CPU serial computing methods are inefficient, difficult to parallelize, and have uneven loads when processing large-scale polygonal data, making it difficult to meet the real-time requirements of modern integrated circuit design.

Method used

A GPU-accelerated polygon Boolean operation method is adopted. By geometrically distributing the polygon set on a preset grid, multiple synchronously executing GPU thread groups are constructed. Parallel Boolean operations are performed based on grid cells and intersection chains to obtain the resulting polygons.

Benefits of technology

This achievement improves the processing speed and computational efficiency of parallel Boolean operations on polygons, meeting the real-time requirements of modern integrated circuit design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122047149B_ABST
    Figure CN122047149B_ABST
Patent Text Reader

Abstract

The application particularly relates to a GPU-accelerated polygon Boolean operation method. The method involves: distributing a polygon set in geometry on a preset grid, and dividing the preset grid to obtain a plurality of grid cells; constructing a plurality of synchronously executed GPU thread groups, each of which is connected to one or more grid cells; obtaining a corresponding result polygon based on each GPU thread group; obtaining a complete result polygon by integration based on the result polygon corresponding to each GPU thread group; and then, based on the synchronously executed GPU thread groups, implementing parallel polygon Boolean operation to meet the real-time requirement of modern integrated circuit design. The number of grid cells is determined based on different degrees of Boolean calculation complexity to ensure the processing speed of Boolean operation. The number of grid cells connected to each GPU thread group is determined based on the Boolean operation complexity corresponding to each grid cell to ensure the calculation efficiency of Boolean operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of high-performance computing technology, and in particular to a GPU-accelerated polygon Boolean operation method. Background Technology

[0002] In the field of Electronic Design Automation (EDA), polygon Boolean operations are fundamental and crucial geometric operations in integrated circuit layout design. With the continuous expansion of integrated circuit design scale and increasing design complexity, the number of polygons contained in the layout grows exponentially, and the computational complexity of geometric operations also increases significantly. Traditional CPU serial computing methods face technical bottlenecks when processing large-scale polygon data, including long computation time, large memory consumption, and low efficiency. Specifically:

[0003] 1) Low computational efficiency; When dealing with large-scale polygonal data, the traditional CPU serial computing method is slow and cannot meet the real-time requirements of modern integrated circuit design.

[0004] 2) High difficulty in parallelization; polygon Boolean operations have complex topological relationships and data dependencies, making it difficult to achieve effective parallel computing;

[0005] 3) Uneven load: The non-uniform distribution of polygon data in space leads to uneven computational load, which in turn affects the overall computational efficiency.

[0006] To address the aforementioned technical issues, this application proposes a GPU-accelerated polygon Boolean operation method. Summary of the Invention

[0007] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a polygon Boolean operation method based on GPU acceleration, which solves the current problem of "how to achieve parallel polygon Boolean operation in the field of electronic design automation while ensuring the processing speed and computational efficiency of Boolean operation".

[0008] To achieve the above objectives, the main technical solutions adopted by the present invention include:

[0009] This invention provides a GPU-accelerated polygon Boolean operation method, which includes:

[0010] S1. Obtain the polygon set and the preset grid; based on the total number of sides N involved in the polygon set, determine the grid resolution G of the preset grid to obtain G×G grid cells;

[0011] The polygon set includes: a first polygon set and a second polygon set for which Boolean operations are performed;

[0012] S2. Distribute the polygon set geometrically across a preset grid to obtain: the edge-grid cell mapping relationship between each edge of the polygon set and the grid cell;

[0013] S3. Based on the preset line segment intersection determination algorithm, obtain the unit-intersection set and intersection belonging relationship of each grid unit; based on the unit-intersection set and intersection belonging relationship, obtain the intersection chain involved in each grid unit; based on the type of intersection chain and the preset intersection traversal order, obtain the intersection information involved in the intersection chain.

[0014] Each intersection chain includes at least two consecutive intersections; the type identification of the intersection chain includes:

[0015] If there are one or more non-intersecting original vertices between two preset intersection points of a polygon involved in a Boolean operation, then a normal cross chain is formed between the two preset intersection points.

[0016] If there are one or more intersections between two preset intersections of a polygon that is subjected to Boolean operation and there are no original vertices that are not intersections, then a degenerate chain is formed between the two preset intersections.

[0017] S4. Construct multiple GPU thread groups that execute synchronously; determine the intersection tracing path of the preset Boolean operation type based on the intersection information; based on the intersection tracing path, each GPU thread group performs: intersection tracing involving one or more mesh cells to obtain the thread group-result polygon;

[0018] S5. Based on the edge-mesh cell mapping relationship, intersection point attribution relationship, and each thread group-result polygon, the overall-result polygon is obtained by integration.

[0019] Optionally, in S1, the calculation formula involved in obtaining the mesh element is as shown in (1):

[0020] G = ceil(sqrt(N / k))(1)

[0021] Where G is the grid resolution; k is an empirical coefficient, and the value of k ranges from 100 to 1000.

[0022] Optionally, in S2, the edge-mesh cell mapping relationship involves: each edge of the polygon set, and one or more mesh cells in which each edge is located.

[0023] Optionally, in S3, the cell-intersection set is: all intersections included in each grid cell;

[0024] The intersection point attribution relationship is the relationship between each intersection point and the edge to which it belongs.

[0025] Optionally, in S3, obtaining the intersection chain involves: using the polygon performing Boolean operations as a reference, and based on a preset intersection tracking order, organizing the intersections included in each grid cell into an intersection chain.

[0026] Optionally, in step S3, the identification of the intersection chain type further includes:

[0027] If the edges of the same polygon to which the two ends of the degenerate chain intersect are located / not located on the same side, then the two ends of the degenerate chain intersect to form a degenerate springback chain / degenerate cross chain.

[0028] Optionally, in step S3, the method for obtaining the intersection information involved in the intersection chain includes:

[0029] Mark all intersections involved in each normal cross-chain as Cross-Entry / Cross-Exit; mark the two ends of each degenerate cross-chain as Cross-Entry / Cross-Exit; mark all intersections between the two ends of each degenerate cross-chain as Bounce; mark all intersections involved in each degenerate bounce chain as Bounce.

[0030] Cross-Entry / Cross-Exit means traversing from the outside / inside of the polygon to the corresponding intersection point inside / outside of the polygon according to the preset intersection point traversal order; Bounce means the intersection point that does not require processing.

[0031] Optionally, in S4, the preset Boolean operation types include: finding the intersection, union, and difference of different polygons; and the intersection tracing path involves ordinary cross chains and degenerate chains.

[0032] Optionally, in step S5, the splicing order of different GPU thread groups is obtained based on the edge-mesh cell mapping relationship and the intersection point attribution relationship; based on the splicing order of different GPU thread groups, the complete result polygon is obtained by integrating all thread groups and result polygons.

[0033] The beneficial effects of this application include:

[0034] In this application, a polygon set is geometrically distributed on a preset grid, and the preset grid is divided to obtain multiple grid cells; multiple synchronously executed GPU thread groups are constructed, each GPU thread group is connected to one or more grid cells; the corresponding result polygon is obtained based on each GPU thread group; based on the result polygon corresponding to each GPU thread group, the complete result polygon is obtained by integration; furthermore, based on the synchronously executed GPU thread groups, parallel Boolean operations on polygons are implemented to meet the real-time requirements of modern integrated circuit design.

[0035] In this application, the grid resolution G of the preset grid is determined based on the total number of sides N involved in the polygon set, so as to obtain G×G grid cells; that is, the number of grid cells is determined based on different levels of Boolean computation complexity to ensure the processing speed of Boolean operations.

[0036] In this application, based on each GPU thread group, the following are performed: intersection chain-intersection identification and marking, intersection chain-intersection calculation involving one or more mesh units; that is, based on the Boolean operation complexity corresponding to each mesh unit, the number of mesh units connected to each GPU thread group is determined to ensure the computational efficiency of Boolean operations. Attached Figure Description

[0037] Figure 1 A schematic diagram of a GPU-accelerated polygon Boolean operation method provided in one embodiment of the present invention;

[0038] Figure 2 This is a schematic diagram of an intersection chain structure provided in one embodiment of the present invention;

[0039] Figure 3 A schematic diagram of a common cross-chain provided in one embodiment of the present invention;

[0040] Figure 4 This is a schematic diagram of a degraded springback chain provided in one embodiment of the present invention;

[0041] Figure 5 This is a schematic diagram of a degenerate cross-chain provided in one embodiment of the present invention;

[0042] Figure 6 This is a schematic diagram illustrating the intersection point tracing involved in finding the intersection point according to an embodiment of the present invention. Detailed Implementation

[0043] To better explain and facilitate understanding of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0044] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present invention can be understood more clearly and thoroughly, and that the scope of the present invention can be fully conveyed to those skilled in the art.

[0045] Example 1

[0046] This embodiment proposes a GPU-accelerated polygon Boolean operation method; Figure 1This is a flowchart illustrating a GPU-accelerated polygon Boolean operation method; for example... Figure 1 As shown, the polygon Boolean operation method includes:

[0047] S1. Obtain the polygon set and the preset grid; based on the total number of sides N involved in the polygon set, determine the grid resolution G of the preset grid to obtain G×G grid cells.

[0048] In S1, the polygon set includes: a first polygon set and a second polygon set for which Boolean operations are performed.

[0049] In S1, the calculation formula involved in obtaining the mesh cells is shown in (1):

[0050] G = ceil(sqrt(N / k))(1)

[0051] Where G is the grid resolution; k is an empirical coefficient, and the value of k ranges from 100 to 1000.

[0052] In S1, the grid cells are regular and of equal size; each grid cell can independently perform the corresponding polygon Boolean operation.

[0053] S2. Distribute the polygon set geometrically across a preset grid to obtain the edge-grid cell mapping relationship between each edge of the polygon set and the grid cell.

[0054] In S2, by geometrically distributing the polygon set on a preset grid, the polygon structure involved in each grid cell can be obtained; based on the polygon structure involved in each grid cell, it can be known that each edge involved in the polygon set is specifically distributed in one or several grid cells, so as to obtain the edge-grid cell mapping relationship.

[0055] That is, the edge-mesh cell mapping relationship involves: each edge of the polygon set, and one or more mesh cells in which each edge is located.

[0056] S3. Based on the preset line segment intersection determination algorithm, obtain the unit-intersection set and intersection belonging relationship of each grid unit; based on the unit-intersection set and intersection belonging relationship, obtain the intersection chain involved in each grid unit; based on the type of intersection chain and the preset intersection traversal order, obtain the intersection information involved in the intersection chain.

[0057] In S3, the cell-intersection set is: all intersections included in each grid cell; the intersection attribution relationship is: the relationship between each intersection and the edge to which the intersection belongs.

[0058] In step S3, obtaining the intersection chain involves: taking the polygon performing Boolean operations as a reference, and organizing the intersections included in each grid cell into an intersection chain based on a preset intersection tracking order; each intersection chain includes no less than 2 consecutive intersections.

[0059] In this embodiment, Figure 2 This is a schematic diagram of the intersection chain structure; for example... Figure 2 As shown, when Boolean operations are performed on solid polygon A1A2A3A4A1 and dashed polygon B1B2B3B4B1, A1A2A3A4A1 and B1B2B3B4B1 have a total of 7 intersection points from X1 to X7; the aforementioned 7 intersection points from X1 to X7 constitute an intersection point chain.

[0060] In S3, the type identification of the intersection chain includes:

[0061] 1) If there are one or more original vertices that are not intersections between two preset intersection points involved in the polygon performing Boolean operations, then a normal cross chain is formed between the two preset intersection points;

[0062] In this embodiment, Figure 3 This is a schematic diagram of a typical cross-link, such as... Figure 3 As shown, when Boolean operations are performed on solid polygon C1C2C3C1 and dashed polygon D1D2D3D1, C1C2C3C1 and D1D2D3D1 have a total of 2 intersection points, X8 and X9. Furthermore, between X8 and X9, there exists an original vertex D1 that is not an intersection point, which can form a normal cross chain.

[0063] 2) If there are one or more intersections between two preset intersections of the polygons involved in the Boolean operation and there are no original vertices that are not intersections, then the two preset intersections form a degenerate chain; if the edges of the same polygon to which the two intersections of the degenerate chain belong are on the same side, then the two intersections of the degenerate chain form a degenerate bounce chain; if the edges of the same polygon to which the two intersections of the degenerate chain belong are not on the same side, then the two intersections of the degenerate chain form a degenerate cross chain.

[0064] In this embodiment, Figure 4 A schematic diagram of a degenerate springback chain, as shown below. Figure 4 As shown, solid-line polygon E1X 10 X 11 X 12 X 13 E2E3E1 and dashed polygon F1X 10 X 11 X 12 X 13 F1 performs Boolean operations, E1X 10 X 11 X 12 X 13E2E3E1 and F1X 10 X 11 X 12 X 13 F1 involves X 10 X 11 X 12 X 13 There are a total of 4 intersection points; intersection point X 10 Intersection point X 13 There exists an intersection point X. 11 Intersection point X 12 And the intersection point X 11 Intersection point X 12 None of them are original vertices that are not intersection points, and "intersection point X" 10 The edge to which it belongs is F1X 10 "Intersection point X" 13 The edge to which it belongs is F1X 13 None of them touched the E1X 10 X 11 X 12 X 13 The inner side of E2E3E1, and thus the intersection point X 10 Intersection point X 13 They form a degenerate springback chain;

[0065] In this embodiment, Figure 5 A schematic diagram of a degenerate cross-link, such as Figure 5 As shown, solid-line polygon G1X 14 X 15 X 16 X 17 G2G3G1 and dashed polygon H1X 14 X 15 X 16 X 17 Perform Boolean operations on H2H3H1, G1X 14 X 15 X 16 X 17 G2G3G1 and H1X 14 X 15 X 16 X 17 H2H3H1 both involve X 14 X 15 X 16 X 17 X 18 There are a total of 5 intersection points; intersection point X 14 Intersection point X 17 There exists an intersection point X. 15 Intersection point X 16 And the intersection point X 15 Intersection point X 16None of them are original vertices that are not intersection points, and "intersection point X" 14 The edge to which it belongs H1X 14 "G1X was not touched" 14 X 15 X 16 X 17 The inner side of G2G3G1, and "intersection X" 17 The edge to which it belongs H2X 17 "Touched G1X" 14 X 15 X 16 X 17 The inner side of G2G3G1, and thus the intersection point X 14 Intersection point X 17 They form degenerate cross chains.

[0066] In step S3, the method for obtaining intersection information involved in the intersection chain includes:

[0067] Mark all intersections involved in each normal cross-chain as Cross-Entry / Cross-Exit; mark the two ends of each degenerate cross-chain as Cross-Entry / Cross-Exit; mark all intersections between the two ends of each degenerate cross-chain as Bounce; mark all intersections involved in each degenerate bounce chain as Bounce.

[0068] Cross-Entry indicates that the intersection points are traversed from the outside of the polygon to the inside of the polygon according to the preset intersection point traversal order; Cross-Exit indicates that the intersection points are traversed from the inside of the polygon to the outside of the polygon according to the preset intersection point traversal order; Bounce indicates intersection points that do not require processing.

[0069] In this embodiment, as Figure 3 As shown, taking C1C2C3C1 as the reference, the traversal starts from vertex D2, enters the interior of C1C2C3C1 and reaches vertex D1. This process touches the polygon boundary, thus generating intersection point X8, which is then marked as Cross-Entry. Starting from vertex D1, the traversal leaves the interior of C1C2C3C1 and reaches vertex D3. This process generates intersection point X9, which is then marked as Cross-Exit.

[0070] In this embodiment, as Figure 4 As shown, E1X 10 X 11 X 12 X 13 E2E3E1 and F1X 10 X 11 X 12 X13 Although F1 involves X 10 X 11 X 12 X 13 There are a total of 4 intersection points; however, it should be noted that E1X 10 X 11 X 12 X 13 E2E3E1 did not touch F1X 10 X 11 X 12 X 13 The interior of F1, and then the intersection point X 10 Intersection point X 11 Intersection point X 12 Intersection point X 13 Marked as Bounce.

[0071] In this embodiment, as Figure 5 As shown, solid-line polygon G1X 14 X 15 X 16 X 17 G2G3G1 and the dashed polygon both involve X. 14 X 15 X 16 X 17 X 18 There are a total of 5 intersection points; with G1X 14 X 15 X 16 X 17 Using G2G3G1 as a reference, the traversal starts from vertex H1, reaches the polygon boundary, and thus generates the intersection point X. 14 Therefore, the intersection point X8 is marked as a Cross-Entry; because the intersection point X 15 Intersection point X 16 None of them are original vertices that are not intersection points, thus the intersection point X is... 15 Intersection point X 16 Marked as Bounce; self-intersection point X 16 The initial traversal touches the polygon boundary, thus generating the intersection point X. 17 And then the intersection point X 17 Marked as Cross-Entry; Self-intersection point X 17 Start traversal, leave G1X 14 X 15 X 16 X 17 After entering G2G3G1, the polygon reaches vertex H2. This process touches the polygon boundary, thus creating the intersection point X. 18 And then the intersection point X 18 Marked as Cross-Exit.

[0072] S4. Construct multiple synchronously executing GPU thread groups; determine the intersection tracing path of the preset Boolean operation type based on the intersection information; based on the intersection tracing path, each GPU thread group performs: intersection tracing involving one or more mesh cells to obtain the thread group-result polygon.

[0073] In S4, the preset Boolean operation types include: intersection, union, and difference of different polygons; intersection tracing paths involve ordinary cross chains and degenerate chains.

[0074] In this embodiment, Figure 6 A diagram illustrating the intersection point tracing involved in finding the intersection; such as Figure 6 As shown, the intersection operation is performed between the solid line polygon I1I2I3I4I5I6I7I8I1 and the dashed line polygon J1J2J3J4J1. The intersection of I1I2I3I4I5I6I7I8I1 and J1J2J3J4J1 involves X... 19 ~X 22 There are a total of 4 intersection points; when performing the intersection operation, starting from intersection point X... 19 Start tracing, passing through intersection point X in sequence. 20 Vertex I7, vertex I8; and from the intersection point X 22 Start tracing, passing through X in sequence 21 Vertex I4 and vertex I3 are then used to obtain the polygon corresponding to the intersection.

[0075] S5. Based on the edge-mesh cell mapping relationship, intersection point attribution relationship, and each thread group-result polygon, the overall-result polygon is obtained by integration.

[0076] In step S5, the splicing order of different GPU thread groups is obtained based on the edge-mesh unit mapping relationship and the intersection point attribution relationship; based on the splicing order of different GPU thread groups, the complete result polygon is obtained by integrating all thread groups and result polygons.

[0077] In this embodiment, Table 1 is a performance comparison table of polygon Boolean operations. Referring to Table 1, it should be noted that: Clipper2 is currently the most advanced dedicated 2D clipping library, representing the performance limit of the scanline algorithm in integer coordinates; Klayout is an EDA-specific tool, leading in efficiency when processing Manhattan maps; case_01, tinyRocket, jpeg, case_02, and bp relate to chip-related maps, while osm_tokyo_large, osm_tokyo_landuse, and osm_tokyo_roads relate to geographic data maps.

[0078] Table 1 shows the performance comparison of Boolean operations on polygons.

[0079]

[0080] In this embodiment, referring to Table 1 above, it can be seen that the processing time of this method is shorter than that of Clipper2 and Klayout; specifically, the average speedup is 14 times that of Clipper2 and 8 times that of Klayout.

[0081] In this embodiment, preferably, the aforementioned method can be implemented based on the following:

[0082] 1) GPU hardware: GPU devices that support CUDA or OpenCL;

[0083] 2) Software environment: Linux operating system, CUDA / OpenCL programming framework;

[0084] 3) Development tools: C++ compiler and related development tools.

[0085] In this embodiment, preferably, the optimization of memory access is implemented in the following ways:

[0086] 1) Use shared memory to cache frequently accessed data;

[0087] 2) Reduce the number of global memory accesses;

[0088] 3) Adopt memory merge access mode.

[0089] In this embodiment, preferably, the Arena memory pool management mechanism is adopted to allocate a large amount of memory at once and reuse it, thereby reducing the overhead of frequent memory allocation; the design of the aforementioned Arena memory pool involves the following:

[0090] class Arena {

[0091] char* blocks[SIZE];

[0092] size_t currentPos;

[0093] size_t blockSize;

[0094] / / ...

[0095] }

[0096] In this embodiment, preferably, dedicated parallel algorithms are designed for the computational characteristics of different stages, specifically including: a grid parallel computation algorithm, an intersection chain parallel marking algorithm, and a result polygon parallel construction algorithm.

[0097] Based on the polygon Boolean operation method described in Embodiment 1 above, the polygon set is geometrically distributed on a preset grid, and the preset grid is divided to obtain multiple grid cells; multiple synchronously executed GPU thread groups are constructed, each GPU thread group is connected to one or more grid cells; the corresponding result polygon is obtained based on each GPU thread group; based on the result polygon corresponding to each GPU thread group, the complete result polygon is obtained by integration; and then, based on the synchronously executed GPU thread groups, parallel Boolean operation of polygons is realized to meet the real-time requirements of modern integrated circuit design.

[0098] Based on the polygon Boolean operation method described in the aforementioned embodiment one, the grid resolution G of the preset grid is determined based on the total number of sides N involved in the polygon set, so as to obtain G×G grid cells; that is: the number of grid cells is determined based on different levels of Boolean computation complexity to ensure the processing speed of Boolean operations.

[0099] Based on the polygon Boolean operation method described in Embodiment 1 above, the following are performed for each GPU thread group: intersection chain-intersection identification marking and intersection chain-intersection calculation involving one or more mesh units; that is: the number of mesh units connected to each GPU thread group is determined based on the complexity of the Boolean operation corresponding to each mesh unit, so as to ensure the computational efficiency of the Boolean operation.

[0100] It should be noted that any reference numerals placed between parentheses in the claims should not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The words "a" or "an" preceding a component do not exclude the presence of a plurality of such components. The use of the terms first, second, third, etc., is for convenience only and does not indicate any order. These terms can be understood as part of the component names.

[0101] Furthermore, it should be noted that in the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0102] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the claims should be interpreted to include both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0103] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, then this invention should also include these modifications and variations.

Claims

1. A GPU-accelerated polygon Boolean operation method, characterized in that, The polygon Boolean operation method includes: S1. Obtain the polygon set and the preset grid; based on the total number of sides N involved in the polygon set, determine the grid resolution G of the preset grid to obtain G×G grid cells; The polygon set includes: a first polygon set and a second polygon set for which Boolean operations are performed; S2. Distribute the polygon set geometrically across a preset grid to obtain: the edge-grid cell mapping relationship between each edge of the polygon set and the grid cell; S3. Based on the preset line segment intersection determination algorithm, obtain the unit-intersection set and intersection belonging relationship of each grid unit; based on the unit-intersection set and intersection belonging relationship, obtain the intersection chain involved in each grid unit; based on the type of intersection chain and the preset intersection traversal order, obtain the intersection information involved in the intersection chain. Each intersection chain includes at least two consecutive intersections; the type identification of the intersection chain includes: If there are one or more non-intersecting original vertices between two preset intersection points of a polygon involved in a Boolean operation, then a normal cross chain is formed between the two preset intersection points. If there are one or more intersections between two preset intersections of a polygon that is subjected to Boolean operation and there are no original vertices that are not intersections, then a degenerate chain is formed between the two preset intersections. S4. Construct multiple GPU thread groups that execute synchronously; determine the intersection tracing path of the preset Boolean operation type based on the intersection information; based on the intersection tracing path, each GPU thread group performs: intersection tracing involving one or more mesh cells to obtain the thread group-result polygon; The preset Boolean operation types include: intersection, union, and difference operations for different polygons; intersection tracing paths involve ordinary cross chains and degenerate chains; S5. Based on the edge-mesh cell mapping relationship, intersection point attribution relationship, and each thread group-result polygon, the overall-result polygon is obtained by integration.

2. The polygon Boolean operation method according to claim 1, characterized in that, In S1, the calculation formulas involved in obtaining the mesh cells are shown in (1): G = ceil(sqrt(N / k))(1) Where G is the grid resolution; k is an empirical coefficient, and the value of k ranges from 100 to 1000.

3. The polygon Boolean operation method according to claim 1, characterized in that, In S2, the edge-mesh cell mapping relationship involves: each edge of the polygon set, and one or more mesh cells in which each edge is located.

4. The polygon Boolean operation method according to claim 1, characterized in that, In S3, the cell-intersection set is: all intersections included in each grid cell; The intersection point attribution relationship is the relationship between each intersection point and the edge to which it belongs.

5. The polygon Boolean operation method according to claim 4, characterized in that, In S3, obtaining the intersection chain involves: taking the polygon performing Boolean operations as a reference, and organizing the intersections included in each grid cell into an intersection chain based on a preset intersection tracking order.

6. The polygon Boolean operation method according to claim 1, characterized in that, In S3, the identification of the intersection chain type also includes: If the edges of the same polygon to which the two ends of the degenerate chain intersect are located / not located on the same side, then the two ends of the degenerate chain intersect to form a degenerate springback chain / degenerate cross chain.

7. The polygon Boolean operation method according to claim 6, characterized in that, In step S3, the method for obtaining intersection information involved in the intersection chain includes: Mark all intersections involved in each normal cross-chain as Cross-Entry / Cross-Exit; mark the two ends of each degenerate cross-chain as Cross-Entry / Cross-Exit; mark all intersections between the two ends of each degenerate cross-chain as Bounce; mark all intersections involved in each degenerate bounce chain as Bounce. Cross-Entry / Cross-Exit means traversing from the outside / inside of the polygon to the corresponding intersection point inside / outside of the polygon according to the preset intersection point traversal order; Bounce means the intersection point that does not require processing.

8. The polygon Boolean operation method according to claim 1, characterized in that, In step S5, the splicing order of different GPU thread groups is obtained based on the edge-mesh unit mapping relationship and the intersection point attribution relationship; based on the splicing order of different GPU thread groups, the complete result polygon is obtained by integrating all thread groups and result polygons.