A method for uniform area division based on grid map and diffusion compensation algorithm
Through the jump iteration method based on grid map and the improved ray method, combined with adjacent side diffusion and compensation rules, the uniformity and continuity of drone reconnaissance in large-area area division is solved, and the full coverage reconnaissance of drones is achieved.
Patent Information
- Application Number
- CN202211718375.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-12-29
AI Technical Summary
The existing regional division methods have problems with high computational complexity, low accuracy, unevenness and inapplicability in large-area reconnaissance. Especially when the drone has limited battery life, it is difficult to achieve full coverage reconnaissance.
The boundary grid is determined by jump iterative method based on the grid map, and the area division is divided by improved ray method and adjacent edge diffusion method, and the number of sub-region grids is optimized through compensation rules to ensure uniformity and continuity.
The uniform and continuous coverage and reconnaissance of drones in large areas is achieved, ensuring that each drone completes full coverage within its endurance, and improving the applicability and rationality of the algorithm.
Smart Images

Figure CN115937230B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of region division, and in particular relates to a method for uniform region division based on a grid map and a diffusion compensation algorithm. Background Art
[0002] In reality, when conducting full-coverage reconnaissance of unknown areas beyond the flight range of a single drone, it is necessary to rationally divide the area to facilitate the coordinated reconnaissance of multiple drones. Using a grid method to plan reconnaissance areas is a common research method for regional reconnaissance. Using drones to conduct regional reconnaissance to obtain map information and perform outward-to-inward path planning is a major research trend. However, as the size of the reconnaissance area increases, the limited flight range of a single drone becomes a major constraint on reconnaissance capabilities. Therefore, collaborative reconnaissance solutions for multiple drones are gaining attention. Segmenting the area and pre-assigning the resulting sub-areas to each drone, ensuring that each drone can collaboratively complete full-coverage reconnaissance within its own flight range, is a popular research approach.
[0003] Subregion partitioning methods include K-nearest neighbor search, Voronoi diagram, differential integration, bisection shift iteration, midpoint bisection iteration, and polygon random segmentation. The K-nearest neighbor search algorithm itself has high computational complexity, and different values of the hyperparameter K have a significant impact on the algorithm. The complexity of the Voronoi diagram method increases the time required to locate points as the number of sample points increases, and its implementation details are relatively complex. While the differential integration method can be used for continuous segmentation of raster graphics, its algorithmic accuracy is low, and the generated subregions do not guarantee good clustering. The bisection shift and midpoint bisection iteration algorithms use different segmentation methods. The former requires constant adjustment of the segmentation line to achieve equal partitioning, and calculating the area of the segmented region becomes a challenge when the segmented region is a concave polygon. The latter is a parallel line segmentation algorithm that requires the direction of the parallel lines to be determined during initialization, resulting in inaccurate and unstable results for different directions. The polygon random segmentation algorithm is more suitable for segmentation planning based on natural changes in natural agriculture. However, the patch model used in the algorithm changes with the landscape, making it unsuitable for equal partitioning of fixed raster regions. Summary of the Invention
[0004] To solve the above problems, the present invention provides the following solution: a method for uniformly dividing an area based on a grid map and a diffusion compensation algorithm, comprising:
[0005] Rasterize the polygonal reconnaissance area to be divided to determine the scanning area;
[0006] The boundary grid of the reconnaissance area is determined by a jump iteration method, and based on the scanning method and the improved ray method, the grid feature identifier is assigned, and the feature identifier is used to realize the search of the grid inside the scanning area;
[0007] Based on a search algorithm for a search sub-region grid, the scanning region is diffusely segmented to obtain a sub-reconnaissance region;
[0008] The sub-reconnaissance area is optimized based on the compensation rule to obtain a uniform area division result.
[0009] Preferably, the process of determining the boundary grid of the reconnaissance area by the jump iteration method includes:
[0010] Iteratively take points on each edge of the polygonal area at a certain interval, and obtain the grid center array of the reconnaissance area boundary by determining the grid to which the iteration point belongs; when the current iteration point belongs to the same grid as the previous iteration point, the current iteration point jumps.
[0011] Preferably, the process of jumping the current iteration point includes:
[0012] Draw grid parallel lines in the horizontal and vertical directions along the iteration end point, record the closest intersection points between the grid parallel lines in the horizontal and vertical directions and the grid, and obtain the first intersection point and the second intersection point;
[0013] Determine reference points on the region boundary corresponding to the first intersection point and the second intersection point respectively, to obtain a first reference point and a second reference point;
[0014] Compare the horizontal distances between the first reference point, the second reference point and the iteration starting point, and select the reference point with the smaller distance as the jump target point to complete the jump;
[0015] Iteratively jump the boundary lines of the polygonal area and record the grid centers without duplication to obtain a boundary grid center array.
[0016] Preferably, based on the scanning method and the improved ray method, a grid feature identifier is assigned, and the process of searching the grid inside the scanning area using the feature identifier includes:
[0017] The boundary grid center array is pre-screened to obtain a target boundary grid center array; and feature identification is performed on the target boundary grid center array to determine a regional fixed-point grid identification.
[0018] Preferably, the process of performing feature identification on the target boundary grid center array and determining the regional fixed-point grid identification includes:
[0019] Modify all grids in the scan area and mark them as α; according to the boundary grid center array, modify the grid center marks belonging to the boundary grid center array to β;
[0020] A row of grids at the top of the scanning area is used as the starting scanning line, and the identification of each grid in the starting scanning line is modified from α to γ before starting scanning. The final identification of the grid is determined by comparing the identification of the scanning line and the area to be scanned.
[0021] Preferably, the process of performing feature identification on the target boundary grid center array and determining the regional fixed-point grid identification further includes:
[0022] During the comparison process, when the scan line grid and the scanned grid are identified as β and α respectively, the improved ray method is further used to perform secondary determination;
[0023] The process of using the improved ray method to perform secondary determination includes:
[0024] The grid identification is identified based on the improved ray method to determine the number of times the ray crosses the boundary. When the recognition priority of the second feature identification of the grid in the improved ray method is higher than the first feature identification, the first identification recognition of the current continuous grid segment is skipped.
[0025] Preferably, the scanning area is diffusely segmented based on a search algorithm for searching sub-area grids to obtain sub-reconnaissance areas, comprising:
[0026] The sub-regions are divided based on the adjacent edge diffusion method, and it is determined whether the number of grids contained in each sub-region is equal to the pre-averaged number of grids. If so, the sub-regions are locally optimized to determine the grid center array of each sub-region. Otherwise, the number of grids in each sub-region is optimized based on the adjacent edge compensation method until the number of grids contained in each sub-region is equal to the pre-averaged number of grids. After that, the compensation is completed and the grid center array of each sub-region is obtained.
[0027] Preferably, the process of dividing the sub-regions based on the neighboring diffusion method includes:
[0028] Set the grid to be searched to δ, update the starting grid to ε, diffuse outward one layer and update the relevant grid to ε, and determine whether the number of ε grids is equal to the total number of grids to be searched. If so, end the division; otherwise, count the total number of grids searched in each sub-area, continue to diffuse outward one layer and update the relevant grid to ε, until the number of ε grids is equal to the total number of grids to be searched, and the division ends.
[0029] The present invention discloses the following technical effects:
[0030] This invention provides a method for evenly partitioning regions based on grid maps and a diffusion compensation algorithm. For large polygonal regions, taking into account the characteristics of gridded regions, a "jump iteration method" is first used to determine the region boundary grid array at regular intervals. Next, a ray method is improved by screening for grid concave points and identifying grid features. A decision table is then used to determine which grids belong to the region interior. A subsequent region equalization algorithm, suitable for grid maps, is proposed. This algorithm first simulates water wave diffusion, starting from the starting grid of each subregion and spreading inward layer by layer. During the diffusion process, the diffusion priority is adjusted in real time based on the size of each subregion to avoid polarized diffusion within each subregion. Because the number of grids in each subregion determined by the diffusion method can exceed the pre-allocated number of grids for the drone or even the maximum number of grids that can be detected by the drone, a neighboring compensation method is proposed for optimization. By comparing the features of adjacent subregions and establishing a compensation rule table, the method compensates subregions using neighboring edges. The above process ultimately results in a region division scheme with an even number of subregions.
[0031] The experimental results of the proposed algorithm are compared with those of the Voronoi diagram equal division algorithm, which is widely used. By comparing the experimental results, it can be found that when the area is large and the number of sub-region divisions is large, compared with the equal division effect of the Voronoi diagram method, the algorithm proposed in the present invention always maintains equal division from the region boundary to the inside, which is more applicable and reasonable for UAVs to conduct full coverage reconnaissance from the outside to the inside of the region. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0033] Figure 1 is a flow chart of a method according to an embodiment of the present invention;
[0034] Figure 2 This is a schematic diagram of the jump principle of an embodiment of the present invention;
[0035] Figure 3 A schematic diagram of a ray method according to an embodiment of the present invention;
[0036] Figure 4 A schematic diagram of a grid of concave dots arranged in parallel according to an embodiment of the present invention;
[0037] Figure 5 Schematic diagram of different characteristic vertices passed by rays according to an embodiment of the present invention;
[0038] Figure 6 This is a flow chart of an improved algorithm according to an embodiment of the present invention;
[0039] Figure 7 This is a flow chart of the adjacent edge diffusion method according to an embodiment of the present invention;
[0040] Figure 8 This is a diagram showing the algorithm search effect of an embodiment of the present invention;
[0041] Figure 9 Schematic diagrams of three polygonal areas according to an embodiment of the present invention;
[0042] Figure 10 This is a diagram showing the effect of implementing the algorithm in different experimental areas according to an embodiment of the present invention;
[0043] Figure 11 This is a comparison chart of the equal division effects of the two algorithms in an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0045] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0046] Considering the limitations of the equipment carried by reconnaissance drones, they must transmit information back to the communication base station at a certain frequency when conducting reconnaissance and acquiring ground information. This requires the drone to maintain a certain distance from the communication base station during regional reconnaissance missions. Therefore, sub-region division should be based on this consideration. Because the parallel averaging method cannot effectively guarantee the above conditions, this paper proposes an outside-inward area averaging method. For the grid map constructed based on the grid method, the averaging is ultimately achieved through different optimization stages.
[0047] To address the problem of equal division of grid maps, this paper uses a jump iteration method to confirm region boundaries, formulates judgment criteria based on grid characteristics to identify grid features, uses an improved ray method to identify grids within a region, and proposes a neighboring diffusion method that mimics water wave diffusion to achieve preliminary diffusion segmentation of the region. Finally, a compensation rule is designed to compensate for the number of grids in each subregion, ultimately achieving equal division of the grid area. Experiments have shown that the proposed equal division algorithm has better aggregation, continuity, and uniformity than other algorithms.
[0048] like Figure 1 As shown, the present invention provides a method for uniformly dividing a region based on a grid map and a diffusion compensation algorithm, which includes four stages: in the first stage, the boundary grid of the region is determined by an iterative method; in the second stage, a scanning method and an improved ray method are combined to assign grid feature identifiers, and the identifiers are used to search for grids inside the region; in the third stage, a search algorithm for searching sub-region grids is proposed by imitating the water wave diffusion pattern, and the initial segmented sub-regions are formed by this algorithm; in the fourth stage, compensation rules are designed, and the sub-regions are optimized through the rules.
[0049] Furthermore, the process of determining the boundary grid by the jump iteration method includes:
[0050] Iterate and select points on each edge of the polygonal area at a certain interval α, and obtain the grid center array of the area boundary by determining the grid to which the iteration point belongs. When the current iteration point belongs to the same grid as the previous iteration point, it needs to "jump" to avoid redundant iteration of subsequent iteration points in the same grid. The jumping principle is as follows Figure 2 shown.
[0051] First, draw parallel lines to the grid in the x and y directions along the iteration end point, and record the closest intersection of the two lines and the grid; then determine the reference points P on the region boundary corresponding to the two intersection points. in-x and P in-y Finally, compare the horizontal distance between the reference point and the iteration starting point, and take the reference point with the smaller distance as the jump target point to complete the jump process.
[0052] Polygonal area r R The boundary line is iterated and jumped according to the above principle, and the grid center is recorded without duplication to finally determine the boundary grid center array P bou ={p b1 ,p b2 ,...,p bn}(where p bn =(x bn ,y bn ,m,t) T is the identification vector of the nth grid in the boundary grid array: (x bn ,y bn ) is the grid center coordinate; m represents the mth edge of the iterative process, which is the first feature identifier; t is the second feature identifier).
[0053] Furthermore, the improved ray method is used to determine r R The internal grid process includes,
[0054] For r RThe determination of the internal grid mainly includes the ray method, the area method and the angle method. The ray method is more stable than other algorithms, so the present invention adopts the scanning method to traverse the scanning area r S At the same time, the ray method is used as the determination algorithm of the grid position attributes.
[0055] like Figure 3 As shown in the figure, unlike convex polygons, when the ray method is applied to concave polygons, the existence of concave points will lead to inaccurate results. To address the special cases of the ray method (where the ray passes through a polygon vertex or coincides with a polygon edge), the present invention proposes the following improved scheme for the ray method based on the characteristics of the grid:
[0056] Array pre-filtering
[0057] When a polygon has a concave point, the internal angle corresponding to the concave point must be greater than 180°. The number of concave points in the polygon can be preliminarily determined by comparing the vector product of the two adjacent side vectors, as shown in formula (1).
[0058]
[0059] Where, P v-i (x v-i ,y v-i ) is the region r R The i-th vertex of . Then vertex i is a concave point, otherwise it is a convex point. When using the ray method, the ray direction used is y + direction, so we need to get from array P bou The excluded concave points should meet the following conditions: v-i ≤min{x v-i-1 ,x v-i+1} or x v-i ≥max{x v-i-1 ,x v_i+1}.
[0060] For the grid, when the angular coefficient of one side of the reconnaissance area is large (or small), the boundary grid will have adjacent grids in the same column (row) as the concave point, such as Figure 4 Therefore, after determining the concave point that meets the above conditions, the algorithm will start from P bou Filter and exclude adjacent grids in the same column (row) as the concave grid.
[0061] Determine the region vertex grid identifier
[0062] Determine the filtered array P bou After that, the remaining vertices need to be marked with features. Figure 5 As shown, Figure 5 (a) and Figure 5(b) The vertices passed by the ray have the same boundary grid, where the two sides with vertex A as the endpoint are on both sides of the ray; the adjacent side with vertex B as the endpoint is on one side of the ray. For vertices with the same features as vertex B, the second feature t of the grid to which the vertex belongs is modified to "1", otherwise the second feature t of the grid is modified to "0". The overall flow chart of the improved algorithm is as follows Figure 6 shown.
[0063] r S The grid inside has three labels α, β and γ (and the grid is represented by (x S_m ,y S-m ,α / β / γ)), respectively representing that the current grid belongs to r R Internal, r R Boundary (i.e. grid center belongs to array P bou ) or r R External (grids are referred to as α grid, β grid and γ grid respectively). The specific process of the algorithm is as follows:
[0064] Assume r S All grids in the grid belong to r R , modify r S All grids in the are labeled as α;
[0065] According to the array P bou , will belong to P bou The grid center identifier is changed to β;
[0066] r S The top row of grids is used as the starting scan line, and the identification of each grid in the starting scan line is modified from α to γ.
[0067] Start scanning, and determine the final grid identification by comparing the identification of the scan line and the area to be scanned. The identification comparison and modification rules are shown in Table 1. During the comparison process, when the identification of the scan line grid and the scanned grid is β and α respectively, the comparison results will have two situations (as shown in the third row of Table 1), and it is necessary to further use the improved ray method for secondary determination, that is, step (5).
[0068] Table 1
[0069]
[0070] Secondary determination of grid identification
[0071] The improved algorithm determines the number of times the ray crosses the boundary by identifying the grid identifier given previously. In the algorithm, the recognition priority of the second feature identifier of the grid is higher than the first feature identifier. If the value of the second feature identifier is "1", the recognition of the first identifier of the current continuous grid segment is skipped.
[0072] The specific calculation process of the algorithm is shown in Table 2: Lines (1)-(9) calculate the number of boundary grid segments that the ray passes through; Lines (10)-(16) determine the second feature identification value of each grid in each boundary grid segment; Lines (17)-(22) count the number of different first feature identification values in each boundary grid segment; Lines (23)-(28) determine the identification value of the currently scanned grid by the parity of the number of times the ray passes through the region boundary.
[0073] Table 2
[0074]
[0075]
[0076] After algorithm search, it can be finally determined that it belongs to region r R Array of grid centers where p R-m =(x R-m ,y R-m ,α / β) T ,The algorithm will then use this array as the data group to achieve grid equipartition.
[0077] Neighbor Diffusion Method to Form Subregions
[0078] Let the scanning width of the drone be l c (The grid size is 2l c ×2l c ), based on this assumption, the UAV can stably complete at most n A For a complete flight reconnaissance of a grid, the number of drones required to be dispatched (i.e., the number of sub-regions) is n sp Calculated by formula (2):
[0079]
[0080] Where n R For array P R The total number of elements contained.
[0081] Next, randomly select r R n, the grid spacing of the boundary grid sp The grid is used as the starting grid for each sub-area to be covered by each drone. This invention designs a diffusion algorithm based on the regular arrangement characteristics of the grid and the characteristics of the equal difference of the center coordinates of adjacent grids. The algorithm principle imitates the diffusion of water waves and realizes the division of sub-areas by gradually increasing the diffusion radius. The algorithm division process is as follows: Figure 7 shown.
[0082] After each diffusion, the number of grids searched in each sub-region is counted, and the priority of the next diffusion is determined according to the number of grids in each sub-region: the sub-region with fewer total grids has a higher diffusion priority in the next diffusion. Figure 8 As shown, the algorithm randomly selects n equal grid spacing sp (n in the figure sp =5) grids as the starting grid (thick black dots in the figure).
[0083] In the sub-area determined by the algorithm, there may be more grids than n A sub-regions, so optimization is required.
[0084] Optimization of adjacent edge compensation method
[0085] Suppose that n sp The array of equally divided grid numbers for each UAV is The grid number array of each sub-region determined by the neighbor diffusion method is Then determine the grid number array that should be adjusted for each sub-area Then according to the array M dv The algorithm compensation rule table is used to determine the boundary grids that need to be adjusted in the current sub-region, so as to achieve the number of grids contained in the current sub-region and the number of array M. av The corresponding element values in are equal. The algorithm compensation rule table is shown in Table 3.
[0086] Table 3
[0087]
[0088] The meanings of the symbols in Table 3 are shown in Table 4.
[0089] Table 4
[0090]
[0091] As shown in Table 3, for any sub-region, the adjacent edges to be adjusted depend on three influencing factors, which are array M dv The positive and negative of the element, the difference between the horizontal and vertical coordinates of the starting grids of adjacent sub-regions, and the relative position of the starting grids of adjacent sub-regions (Note: If m dv-k =0, the adjacent edge compensation optimization process of this sub-region is skipped). The above influencing factors can be used to determine the longest adjacent boundary between two sub-regions, thereby adjusting the longest boundary to achieve the grid compensation optimization process between sub-regions.
[0092] Experimental design and analysis
[0093] Furthermore, the present invention uses matlab (2021b version) software to conduct experiments. In order to prove the applicability of the algorithm, the present invention selects three different types of sub-regions in the randomly generated region, such as Figure 9 The robustness and universality of the algorithm are verified through the three seed areas in the figure.
[0094] in Figure 9 (A) Conventional polygons are used to verify the universality of the algorithm; Figure 9 (B) Used to verify the applicability of the jump iteration method: As mentioned above, the jump iteration method needs to calculate the angular coefficient of each edge in the application process to determine the value of the iteration interval mapped to the horizontal direction. Therefore, when the angular coefficient tends to infinity, the algorithm needs to consider it as a special case; combined with Figure 5 When the ray method is applied to concave polygons, special judgment situations may occur. Figure 9 (C) Used to verify the applicability of the improved ray method to concave polygons.
[0095] After algorithm optimization, the final specific data is shown in Table 5. The third column in the table shows the number of grids in each sub-region obtained by the diffusion method, and the fourth column shows the number of grids in each sub-region after the compensation method optimization. A ≤30.
[0096] Table 5
[0097]
[0098] The above table shows the stability and uniformity of the compensation algorithm. Figure 10 As shown, Figure 10 The working process of the algorithm is shown in stages: Stage 1 realizes regional rasterization (the present invention assumes that the effective coverage width of the drone is l c =0.5 (unit length), so the grid width is 2l c ×2l c =1×1), and extract the boundary grid of the area (α=0.01 in the present invention); in the second stage, the grid of the area to be divided is determined by the improved ray method; in the third stage, the initial sub-region is determined by the adjacent edge diffusion method; in the fourth stage, the final sub-region segmentation map is determined after optimization by the adjacent edge compensation method.
[0099] The present invention adopts a random strategy for selecting the starting grid of the sub-region. Different selection schemes may produce different optimization results. Figure 9 This is one of the optimization results. Different optimization results can guarantee the following characteristics:
[0100] Uniformity. After the fourth stage of compensation, the number of grids contained in each sub-region can always correspond to the evenly divided array M av The element value in .
[0101] Clustering. Each sub-region is clustered in a spherical shape, ensuring that the grids in a sub-region are as close as possible to the grids in the same sub-region.
[0102] Continuity. Each grid in each subregion must be adjacent to at least one grid in the same region.
[0103] Figure 9 The second set of experiments and the third set of experiments in phases 1 and 2 proved that the jump iteration method and the improved ray method still have good applicability in special cases. Figure 10 From the third and fourth stages of the algorithm, we can see that, regardless of the diffusion method or the compensation method, the sub-regions calculated by the algorithm try to ensure the aggregation and continuity between the sub-region grids. Moreover, after the optimization of the compensation algorithm, the regional division effect after equal division is better than the initial regional division effect. Table 5 proves that Figure 10 The allocation scheme of stage 3 (the number of sub-region grids initially determined by the neighboring diffusion method) is not uniform. After optimization by the neighboring compensation method, the number of grids in each sub-region is equal to the average array M. av In summary, after optimizing the overall algorithm, it is possible to ensure that each drone can complete full-coverage reconnaissance of each sub-area within its flight time.
[0104] As a comparison, Figure 11 This is a comparison chart of the effects of the averaging algorithm adopted by the present invention and the Voronoi diagram averaging algorithm based on k-means grouping.
[0105] Depend on Figure 9 It can be seen that: (1) under the condition of limited UAV endurance, when the area is large and the number of sub-area divisions increases to a certain extent, the Voronoi diagram averaging algorithm based on k-means grouping will form sub-areas inside the area. As mentioned above, in actual practice, UAVs conduct regional coverage reconnaissance from the outside to the inside, and the starting point of the UAV should be arranged on the boundary of the area, so the Voronoi diagram method has application limitations; (2) The Voronoi diagram method focuses on the area averaging of polygons, while the present invention focuses on the averaging of the number of grids. When the Voronoi diagram method is applied to a grid map, it cannot be guaranteed that the grids passed by the dividing boundary line can be well divided into each sub-area, so the algorithm is not satisfactory in the application of grid maps. The algorithm of the present invention can always achieve regional averaging from the outside to the inside under the same circumstances. Therefore, the algorithm of the present invention has certain reference significance for the averaging of grid maps and as a subsequent regional reconnaissance for multiple UAVs.
[0106] For large polygonal areas, the present invention proposes a region averaging algorithm based on a grid map. Taking into account the characteristics of grid regions, the algorithm first uses a "jump iteration method" to determine the region boundary grid array at regular intervals. Next, the algorithm improves upon the ray method by screening for concave points and identifying grid features. A decision table is then used to determine which grids belong to the region interior. The present invention then proposes a region averaging algorithm suitable for grid maps. This algorithm first mimics water wave diffusion, starting from the starting grid of each subregion and spreading inward layer by layer. During the diffusion process, the diffusion priority is adjusted in real time based on the size of each subregion to avoid polarization of subregion diffusion. Because the number of grids in each subregion determined by the diffusion method can exceed the pre-allocated number of grids for the drone or even the maximum number of grids that can be detected by the drone, a neighboring compensation method is proposed for optimization. By comparing the features of adjacent subregions and establishing a compensation rule table, the algorithm compensates subregions based on adjacent edges. This process ultimately results in a region partitioning scheme that evens out the number of subregions.
[0107] The experimental results of the proposed algorithm are compared with those of the Voronoi diagram equal division algorithm, which is widely used. By comparing the experimental results, it can be found that when the area is large and the number of sub-region divisions is large, compared with the equal division effect of the Voronoi diagram method, the algorithm proposed in the present invention always maintains equal division from the region boundary to the inside, which is more applicable and reasonable for UAVs to conduct full coverage reconnaissance from the outside to the inside of the region.
[0108] It should be noted that the present invention adopts a random strategy to determine the starting grid center of each sub-area. Due to the irregularity of the polygonal area, different polygons may produce different optimization effects for different starting grids, but the algorithm can ensure that the sub-areas divided each time meet the continuity and uniformity.
[0109] The embodiments described above are merely descriptions of preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by persons skilled in the art should fall within the scope of protection defined by the claims of the present invention.
Claims
1. A method for uniformly dividing an area based on a grid map and a diffusion compensation algorithm, characterized in that: include: Rasterize the polygonal reconnaissance area to be divided to determine the scanning area; The boundary grid of the reconnaissance area is determined by a jump iteration method, and based on the scanning method and the improved ray method, the grid feature identifier is assigned, and the feature identifier is used to realize the search of the grid inside the scanning area; Based on a search algorithm for a search sub-region grid, the scanning region is diffusely segmented to obtain a sub-reconnaissance region; Optimizing the sub-reconnaissance area based on a compensation rule to obtain a uniform area division result; Based on the scanning method and the improved ray method, the grid feature identifier is assigned, and the process of searching the grid inside the scanning area using the feature identifier includes: Pre-screening the boundary grid center array to obtain the target boundary grid center array; performing feature identification on the target boundary grid center array to determine the regional fixed-point grid identification; Based on the search algorithm of the search sub-region grid, the scanning area is diffusely segmented to obtain the sub-reconnaissance area, which includes: The sub-regions are divided based on the adjacent edge diffusion method, and it is determined whether the number of grids contained in each sub-region is equal to the pre-averaged number of grids. If so, the sub-regions are locally optimized to determine the grid center array of each sub-region. Otherwise, the number of grids in each sub-region is optimized based on the adjacent edge compensation method until the number of grids contained in each sub-region is equal to the pre-averaged number of grids. After that, the compensation is completed and the grid center array of each sub-region is obtained.
2. The method for uniformly dividing an area based on a grid map and a diffusion compensation algorithm according to claim 1, characterized in that: The process of determining the boundary grid of the reconnaissance area by the jump iteration method includes: Iteratively take points on each edge of the polygonal area at a certain interval, and obtain the grid center array of the reconnaissance area boundary by determining the grid to which the iterative point belongs; When the current iteration point belongs to the same grid as the previous iteration point, the current iteration point jumps.
3. The method for uniformly dividing an area based on a grid map and a diffusion compensation algorithm according to claim 2, characterized in that: The process of jumping the current iteration point includes: Draw grid parallel lines in the horizontal and vertical directions along the iteration end point, record the closest intersection points between the grid parallel lines in the horizontal and vertical directions and the grid, and obtain the first intersection point and the second intersection point; Determine reference points on the region boundary corresponding to the first intersection point and the second intersection point respectively, to obtain a first reference point and a second reference point; Compare the horizontal distances between the first reference point, the second reference point and the iteration starting point, and select the reference point with the smaller distance as the jump target point to complete the jump; Iteratively jump the boundary lines of the polygonal area and record the grid centers without duplication to obtain a boundary grid center array.
4. The method for uniformly dividing an area based on a grid map and a diffusion compensation algorithm according to claim 1, wherein: The process of performing feature identification on the target boundary grid center array and determining the regional fixed-point grid identification includes: Mark all grids in the scan area as modified ; According to the boundary grid center array, modify the grid center identifiers belonging to the boundary grid center array to ; A row of grids on the top layer of the scanning area is used as the starting scanning line, and each grid in the starting scanning line is used as The logo is changed to Then the scan is started and the final grid mark is determined by comparing the scan line and the mark of the area to be scanned.
5. The method for uniformly dividing an area based on a grid map and a diffusion compensation algorithm according to claim 1, wherein: The process of performing feature identification on the target boundary grid center array and determining the regional fixed-point grid identification also includes: During the comparison process, when the scanning line grid and the scanned grid are marked and When , the improved ray method is further used for secondary determination; The process of using the improved ray method to perform secondary determination includes: The grid identification is identified based on the improved ray method to determine the number of times the ray crosses the boundary. When the recognition priority of the second feature identification of the grid in the improved ray method is higher than the first feature identification, the first identification recognition of the current continuous grid segment is skipped.
6. The method for uniformly dividing an area based on a grid map and a diffusion compensation algorithm according to claim 1, wherein: The process of dividing sub-regions based on the neighbor diffusion method includes: Set the grid to be searched to be marked , update the starting point grid mark to , diffuse outward one layer and update the relevant grid mark ,judge Is the number of grids equal to the total number of grids to be searched? If so, end the division; otherwise, count the total number of grids searched in each sub-area, continue to spread outward one layer and update the relevant grid marks. , until The number of grids is equal to the total number of grids to be searched, and the division is completed.
Citation Information
Patent Citations
Multi-unmanned aerial vehicle-oriented distributed coverage search method based on region allocation
CN111209294A
Real number field high dynamic range blue noise sampling method and system based on error diffusion
CN115409701A