A rural grid governance planning method and system, and a storage medium

By optimizing rural road planning through adaptive rotating grid partitioning and the connecting vessel algorithm, and dynamically adjusting the grid layout, the problems of poor planning flexibility and rigid resource allocation in existing technologies are solved, and efficient connectivity and accessibility of rural road networks are achieved under resource constraints.

CN122175115APending Publication Date: 2026-06-09XIHUA UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIHUA UNIV
Filing Date
2026-03-11
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

The current rural road planning lacks systematic and intelligent planning tools, resulting in poor planning flexibility, rigid resource allocation, high costs, insufficient connectivity, and low land use efficiency, making it difficult to maximize the overall benefits of the road network under resource constraints.

Method used

An adaptive rotating mesh partitioning mechanism is adopted, which combines the communicating vessel algorithm and the erosion algorithm to dynamically adjust the mesh layout. By randomly generating multiple sets of sets to be planned and extracting the skeleton of the connected regions, the skeleton connection and mesh allocation rules are set to optimize the trunk connectivity and branch connection, thereby achieving refined resource utilization and cost control.

Benefits of technology

While reducing construction costs, it significantly improves the overall connectivity and accessibility of rural road networks, optimizes resource allocation, and enhances the flexibility and efficiency of planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122175115A_ABST
    Figure CN122175115A_ABST
Patent Text Reader

Abstract

This invention relates to the field of route planning technology, specifically to a rural grid-based governance planning method, system, and storage medium. By introducing an adaptive rotating grid division mechanism, this invention provides a rural grid-based governance planning method and system. First, a two-dimensional electronic map of the village is divided and labeled into grids. The number of road surface planning grids is obtained, and multiple sets of planning sets are constructed within the flat ground grids, from which candidate planning sets are selected. For the skeleton in any candidate planning set, skeleton connection rules and grid allocation rules are set based on the number of road surface planning grids and the road surface grids. The skeletons are connected according to these rules to obtain the final skeleton. Finally, the final skeleton of the optimal candidate planning set is selected for road paving. This invention's method and system significantly improve the refined utilization rate of construction resources while reducing construction costs, enhancing the overall connectivity and accessibility of the rural road network, and showing promising application prospects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of route planning technology, specifically to a rural grid-based governance planning method, system, and storage medium. Background Technology

[0002] Current rural road planning and management largely rely on manual on-site surveys and experience-based decision-making, lacking systematic and intelligent planning tools. Existing technologies often employ static grid division or simple connectivity analysis, failing to fully consider the complex topography of rural areas (such as the distribution of farmland, housing, existing roads, and flat areas), limited construction resources (such as the road length or paved area corresponding to the budget), and multi-objective optimization needs. For example, traditional methods often use fixed grid division methods, resulting in poor planning flexibility; the value of potential flat areas is not fully explored during road alignment selection; and the resource allocation process is rigid, failing to optimize the efficiency of branch line connections while ensuring the connectivity of main roads. Furthermore, existing schemes typically output only a single planning result, lacking a mechanism for selecting the best from multiple feasible options, making it difficult to maximize the overall benefits of the road network under resource constraints. This often results in planning outcomes that are costly, lack connectivity, or have low land use efficiency.

[0003] Therefore, developing governance planning methods and systems for reducing costs and increasing efficiency in rural roads is an urgent problem to be solved in this field. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a rural grid-based governance planning method, system, and storage medium.

[0005] This invention provides a rural grid-based governance planning method, which includes the following steps: Step 1: Divide the rural map into grids and label the grids, including the grids for flat ground. Step 2: In the flat ground grid, randomly select multiple sets of flat ground grids with the same number as the road surface planning grids to form multiple sets of planning sets; Step 3: For each set to be planned, the flat ground grid in the set to be planned is divided into several connected regions using the Communicator algorithm. Then, the skeleton of each connected region is extracted using the Erosion algorithm. The total length of the skeleton of all connected regions is calculated. A preset retention percentage is set. The set to be planned within the retention percentage before the total length of the skeleton is called the candidate planning set. Step 4: For any candidate planning set, obtain the shortest path from each skeleton to the road surface and the shortest path from each skeleton to other skeletons. Combine the number of road planning grids to set the skeleton connection rules. Starting from the longest skeleton, connect the skeletons in sequence according to the skeleton connection rules until the skeleton connection rules are no longer satisfied. Derive the longest skeleton and the remaining number of road planning grids. The longest skeleton is called the first road skeleton. Step 5: Obtain the shortest path between the endpoints of the first road skeleton and the road surface, combine it with the number of remaining road surface planning grids to set grid allocation rules, allocate the remaining road surface planning grids to the endpoints of the first road skeleton based on the grid allocation rules, and export the final skeleton and the final number of remaining road surface planning grids. Step 6: Obtain the shortest path between each endpoint of the final skeleton and the road surface. Combine this with the final remaining road surface planning grid number to select the final skeleton of the optimal candidate planning set for road paving.

[0006] Furthermore, in step 1, the map is a two-dimensional electronic map; The method for grid division includes: taking the geometric center point of the village in the two-dimensional electronic map as the center, constructing a central unit grid according to the unit grid size, expanding multiple unit grids outward along the central unit grid to cover all areas of the village in the two-dimensional electronic map, removing the unit grids of non-village areas inside, using the remaining grids as the grid division scheme, and counting the number of removed grids. The grid is rotated and traversed based on the geometric center, and the unit grid is expanded outward to cover all rural areas in the two-dimensional electronic map. Unit grids containing non-rural areas are removed to form a new grid division scheme, and the number of removed grids is counted. The grid partitioning scheme with the smallest number of grid cells is discarded and used as the final grid partitioning scheme.

[0007] Further, in step 1, the grid labeling method includes: if there are residential housing areas in the grid, the grid is labeled as a residential housing grid; if there are no residential housing areas in the grid but there are farmland areas, the grid is labeled as a farmland grid; if the grid is neither a residential housing grid nor a farmland grid, and the road surface area in the grid is greater than 80%, the grid is labeled as a road surface grid; if the grid is neither a road surface grid, a residential housing grid, nor a farmland grid, the average height within the grid is calculated, and the percentage of areas where the absolute difference between the height within the grid and the average height is less than a height difference threshold is obtained; if the percentage is greater than 90%, the grid is labeled as a flat ground grid; if the grid is neither a flat ground grid, a road surface grid, a residential housing grid, nor a farmland grid, the grid is classified as another type of grid. And / or, in step 2, the method for calculating the number of road planning grids includes: the ratio of the road construction budget to the cost required to pave a level ground grid as a road surface.

[0008] Furthermore, in step 3, the method of extracting the skeleton of each connected region by the erosion algorithm includes: for each connected region, starting from the boundary mesh, in each iteration, the outermost mesh is systematically peeled off without destroying its topological connectivity. This process continues, and the connected region is eroded inward uniformly from all directions until no more meshes can be removed, so as to obtain the skeleton of the connected region.

[0009] Furthermore, in steps 4 and 5, the methods for obtaining the shortest path from each skeleton to the road surface, the shortest path from each skeleton to other skeletons, and the shortest path from the endpoint to the road surface include: setting the distance cost of the smooth road surface mesh to 1 and setting the distance cost of the non-smooth road surface mesh to positive infinity. For any skeleton, a heuristic search algorithm is used to determine the shortest path distance cost between each grid on the skeleton and the road surface grid, and the path with the minimum shortest path distance cost is selected as the shortest path from the skeleton to the road surface. For any skeleton, a heuristic search algorithm is used to determine the shortest path distance cost between each grid on the skeleton and each grid on other skeletons, and the path with the minimum shortest path distance cost is selected as the shortest path from the skeleton to all other skeletons. For any skeleton, a heuristic search algorithm is used to determine the shortest path distance cost between the grids containing each endpoint of the skeleton and the road surface grid. The path with the minimum shortest path distance cost is selected as the shortest path between each endpoint of the skeleton and the road surface.

[0010] Furthermore, in step 4, the method for obtaining the remaining road surface planning grid number includes: obtaining the shortest path length from the longest skeleton to each of the other skeletons, taking the other skeletons corresponding to the minimum value as the second longest skeleton, obtaining the number of grids on the longest skeleton, the number of grids on the second longest skeleton, the number of grids on the shortest path between the longest and second longest skeletons, and the number of grids from the longest skeleton to the shortest path of the road surface, and calculating the sum of the four, which is called the consumed grid number. The skeleton connection rules include: if the number of grids consumed is less than or equal to the number of grids planned for the road surface, then connect the longest skeleton and the road surface, and the longest skeleton and the second longest skeleton according to the shortest path; update the connected skeleton to the longest skeleton. The process is iterated until the skeleton connection rules are no longer met. The longest skeleton that is finally updated is then exported as the first road skeleton. The number of road planning grids is then subtracted from the number of grids on the first road skeleton, which is called the remaining number of road planning grids.

[0011] Further, in step 5, the grid allocation rules include: obtaining the shortest path between each endpoint of the first road skeleton and the road surface, and sorting the endpoints of the first road skeleton in ascending order of the shortest path length. Starting from the first endpoint, if the number of grids on the shortest distance between the endpoint and the road surface is less than or equal to the number of remaining road surface planning grids, then the endpoint and the road surface are connected according to the shortest path between the endpoint and the road surface, and the number of grids on the shortest path between the endpoint and the road surface is subtracted from the number of remaining road surface planning grids to update the number of remaining road surface planning grids; this process is iterated until the number of grids on the shortest distance between the endpoint and the road surface is greater than the number of remaining road surface planning grids, or all endpoints are connected to the road surface. If the number of grids at the shortest distance between the endpoint and the road surface is greater than the number of remaining road surface planning grids, then among the unconnected endpoints, starting from the endpoint with the smallest sorting position, the remaining road surface planning grids are allocated sequentially according to the shortest path between the smallest endpoint and the road surface until the number of remaining road surface planning grids is 0; the allocated skeleton is exported and named the final skeleton, and the number of remaining road surface planning grids is exported and named the final number of remaining road surface planning grids. If all endpoints are connected to the road surface, then the final skeleton is derived, and the final number of remaining road surface planning grids is derived.

[0012] Furthermore, in step 6, the method for selecting the optimal candidate planning set includes: if there is at least one candidate planning set among all candidate planning sets that satisfies the condition that the final number of remaining road planning grids is not 0, then the optimal candidate planning set is the candidate planning set with the largest number of remaining road planning grids. If the final number of remaining road planning grids in all candidate planning sets is 0, calculate the sum of the shortest distances between each endpoint of the final skeleton and the road surface. The optimal candidate planning set is the candidate planning set with the smallest sum of shortest distances.

[0013] This invention provides a rural grid-based governance planning system for implementing the rural grid-based governance planning method as described in any of the preceding claims, comprising the following modules: The grid division module is configured to divide the rural map into grids and annotate the grids, including annotating grids on flat ground. The set generation module is configured to randomly select multiple sets of flat ground grids, the number of which is equal to the number of road planning grids, to form multiple sets of sets to be planned. The candidate screening module is configured to, for each set to be planned, use the communication algorithm to divide the flat ground grid in the set to be planned into several connected regions, then use the erosion algorithm to extract the skeleton of each connected region, calculate the total length of the skeleton of all connected regions, preset the retention percentage, and call the set to be planned within the retention percentage before the total length of the skeleton the candidate planning set. The skeleton connection module is configured to, for any candidate planning set, use a heuristic search algorithm to obtain the shortest path from each skeleton to the road surface and the shortest path from each skeleton to other skeletons, and set skeleton connection rules in combination with the number of road planning grids. Starting from the longest skeleton, skeletons are connected sequentially according to the skeleton connection rules until the skeleton connection rules are no longer satisfied. The longest skeleton and the remaining number of road planning grids are then derived. The longest skeleton is called the first road skeleton. The remaining allocation module is configured to use a heuristic search algorithm to obtain the shortest path between the endpoints of the first road skeleton and the road surface, combine it with the number of remaining road surface planning grids to set grid allocation rules, allocate the remaining road surface planning grids to the endpoints of the first road skeleton based on the grid allocation rules, and derive the final skeleton and the final number of remaining road surface planning grids. The optimal selection module is configured to use a heuristic search algorithm to obtain the shortest path between each endpoint of the final skeleton and the road surface, and combine the final remaining road surface planning grid number to select the final skeleton of the optimal candidate planning set for road paving.

[0014] The present invention provides a storage medium storing a computer program, which, when executed by a processor, implements the rural grid-based governance planning system as described above.

[0015] In this invention, the "geometric center point" refers to the centroid of the polygon, that is, the average value of the coordinates of all vertices.

[0016] In this invention, the "skeleton" or "road skeleton" refers to a single-grid wide-line structure extracted from a connected region, which maintains the topological connectivity of the original region and can be regarded as the "central axis" or "vein" of the region.

[0017] The "endpoint" of a skeleton refers to the starting point, ending point, or branch end of the skeleton. It is a mesh on the skeleton that is connected to only one adjacent skeleton mesh.

[0018] This invention provides a rural grid-based governance planning method and system by introducing an adaptive rotating grid partitioning mechanism. This method and system can dynamically adjust the grid layout according to the actual shape of the village, reducing the number of invalid grids and improving the data quality and computational efficiency of subsequent processing. By randomly generating multiple sets of planning targets and combining them with connected component skeleton extraction technology, this invention fully explores various spatial combinations of flat areas as potential road corridors, providing rich candidates for optimized route selection. Based on the skeleton connection rules and grid allocation rules of the road planning grid number, a dynamic resource allocation logic is realized that, under strict resource constraints, priority is given to ensuring the connectivity of the main trunk lines, followed by optimizing the connection of branch lines, ensuring the refined utilization of limited construction resources. Finally, by setting a dual-objective optimization strategy combining the remaining number of grids and the endpoint access distance, the optimal road planning scheme in terms of cost control and access convenience can be automatically selected, thereby significantly improving the overall connectivity and accessibility of the rural road network while reducing construction costs.

[0019] Obviously, based on the above description of the present invention, and according to common technical knowledge and conventional methods in the field, various other modifications, substitutions or alterations can be made without departing from the basic technical concept of the present invention.

[0020] The following detailed embodiments further illustrate the above-described content of the present invention. However, this should not be construed as limiting the scope of the present invention to the following examples. All technologies implemented based on the above-described content of the present invention fall within the scope of the present invention. Attached Figure Description

[0021] Figure 1 A flowchart illustrating the rural grid-based governance planning method; Figure 2 A schematic diagram of the structure of a rural grid-based governance planning system. Detailed Implementation

[0022] In the following embodiments and experimental examples, the algorithms for data acquisition, transmission, storage, and processing steps not specifically described, as well as the hardware structures and circuit connections not specifically described, can all be implemented using the content already disclosed in the prior art.

[0023] Example 1: A Rural Grid-Based Governance Planning Method This embodiment provides a rural grid-based governance planning method, such as... Figure 1 As shown, the specific steps are as follows: Step 1: Obtain a two-dimensional electronic map of the village, divide the two-dimensional electronic map into grids, and label the grids as residential housing grids, farmland grids, road grids, flat ground grids, and other grids; The method for obtaining a two-dimensional electronic map is as follows: a high-resolution orthophoto map (DOM) of the rural area is obtained through low-altitude aerial surveying by UAV, and a digital elevation model (DEM) of the corresponding area is generated through oblique photogrammetry modeling or LiDAR measurement. The two are then registered and fused to form a two-dimensional electronic map that contains both ground feature information and elevation information.

[0024] Grid generation and labeling were performed using QGIS geographic information system software: A two-dimensional electronic map was input into QGIS, and the "Create Grid" tool was used to generate regular cell grids. Then, combined with raster statistics and image classification plugins, the feature types and elevation variations within each grid were calculated and analyzed, automatically completing the labeling of residential housing grids, farmland grids, road surface grids, and flat ground grids. For ease of subsequent analysis, a positive direction grid was selected when creating the grid. To ensure that the grid meets the design requirements, in this embodiment, the width of the actual road surface is obtained and mapped onto a two-dimensional electronic map, and the mapping result is used as the side length of the square grid.

[0025] Furthermore, the geometric center point of the village in the two-dimensional electronic map is determined, and the size of the divided unit grid is determined. A central unit grid whose center coincides with the geometric center point is constructed. Multiple unit grids are expanded outward along the central unit grid in the form of concentric rectangles to ensure coverage of all areas of the village in the two-dimensional electronic map. Unit grids of non-village areas inside are removed, and the remaining grids are used as the grid division scheme. The number of removed grids is counted. Set the initial rotation angle to 0, rotate the central unit grid counterclockwise around the geometric center point, and after every 2 degrees of rotation, expand outward again to ensure that all unit grids cover all rural areas in the two-dimensional electronic map. Remove the unit grids of non-rural areas inside to form a new grid division scheme, and count the number of removed grids. The grid partitioning scheme with the smallest number of grid cells is discarded and used as the final grid partitioning scheme.

[0026] The main purpose of this approach is to optimize coverage efficiency in rural areas by dynamically adjusting the grid layout, reducing the number of invalid grids caused by irregular boundaries or regional discontinuities. Specifically, traditional fixed grid division often fails to accurately reflect the actual terrain boundaries of rural areas, resulting in some grids containing large amounts of non-rural areas, increasing subsequent computational burden and planning errors. This method uses a rotational traversal based on the geometric center (e.g., every 2 degrees) to find the grid division scheme that most densely covers rural areas and eliminates the fewest grids, thereby maximizing the purity and representativeness of the grid data while maintaining grid regularity. This reduces invalid data processing and improves algorithm efficiency; furthermore, it provides more accurate and terrain-reflecting basic grid data for subsequent steps such as path planning and skeleton extraction, thereby improving the rationality of road planning and resource utilization efficiency.

[0027] Furthermore, if a grid contains residential areas, it is labeled as a residential grid; if a grid does not contain residential areas but contains farmland, it is labeled as a farmland grid. If a grid is neither a residential nor a farmland grid, and more than 80% of its area is road surface, it is labeled as a road surface grid. If a grid is neither a road surface grid, a residential grid, nor a farmland grid, the average height within the grid is calculated, and the percentage of areas where the absolute difference between the height and the average height is less than a height difference threshold is obtained. If the percentage of areas where the absolute difference is less than the height difference threshold is greater than 90%, the grid is labeled as a flat ground grid. If a grid is neither a flat ground grid, a road surface grid, a residential grid, nor a farmland grid, it is labeled as another type of grid.

[0028] Since two-dimensional electronic maps contain elevation information, when calculating the average height within a grid, the average value of all elevation data within the grid can be directly calculated. This average value can be directly exported through QGIS geographic information system software.

[0029] Step 2: Obtain the number of road planning grids. In the flat ground grids, randomly select multiple sets of flat ground grids with the number of road planning grids to form multiple sets of planning sets. The number of road surface planning grids is determined based on the budget. First, the budget for road construction is obtained, then the cost required to pave a flat ground grid as a road surface is calculated, the ratio of the budget to the cost is calculated, and the result is rounded down to obtain the number of road surface planning grids.

[0030] Step 3: For each set to be planned, the flat ground grid in the set to be planned is divided into several connected regions using the Communicator algorithm. Then, the skeleton of each connected region is extracted using the Erosion algorithm. The total length of the skeleton of all connected regions is calculated. A preset retention percentage is set. The set to be planned within the retention percentage before the total length of the skeleton is called the candidate planning set. When calculating the total length of the skeleton of all connected regions, you can first count how many grids the skeleton contains and directly use the number of grids on the skeleton as the total length of the skeleton.

[0031] The retention percentage ranges from 20% to 40%. Using the set of plans within the initial retention percentage of the total skeleton length as the candidate planning set is to select the set of schemes with the greatest road connectivity potential within limited planning resources and computation time. A longer total skeleton length indicates a richer variety of flat, continuous, and extendable road corridors within the area, making it more likely to form a widely covered and structurally sound arterial road network. By retaining only the set within the initial retention percentage, schemes with poor connectivity and limited expansion space can be quickly eliminated, reducing subsequent optimization computation. This also ensures that the candidate set maintains diversity while focusing on the solution space with optimal potential, thus achieving a balance between efficiency and effectiveness and improving the overall optimization capability of the planning system.

[0032] This embodiment uses an 8-connected component labeling algorithm to analyze the grid and form several connected regions. The process is as follows: for each flat ground grid in the rural area, when an unlabeled flat ground grid is encountered, it is taken as a seed point of a new connected component.

[0033] Starting from the seed point, a breadth-first search or depth-first search algorithm is used to recursively find and label all flat ground grids connected to it by an 8-connectivity rule. This process forms an independent, continuous connected region, which is then assigned a unique label. This process is repeated until all large-aperture pixels in the image have been visited and labeled. This is existing technology and will not be elaborated upon here.

[0034] Furthermore, the method for extracting the skeleton of each connected region using the erosion algorithm is as follows: For each connected region, starting from the boundary mesh, in each iteration, the outermost mesh is systematically peeled off without destroying its topological connectivity. This process continues, and the connected region is eroded inward uniformly from all directions until no more meshes can be removed, so as to obtain the skeleton of the connected region.

[0035] Step 4: For any candidate planning set, obtain the shortest path from each skeleton to the road surface and the shortest path from each skeleton to other skeletons. Combine the number of road planning grids to set the skeleton connection rules. Starting from the longest skeleton, connect the skeletons in sequence according to the skeleton connection rules until the skeleton connection rules are no longer satisfied. Derive the longest skeleton, which is called the first road skeleton and the remaining number of road planning grids. Furthermore, the logic for obtaining the shortest path from each skeleton to the road surface, the shortest path from each skeleton to other skeletons, and the shortest path from the endpoint to the road surface is as follows: set the distance cost of the smooth road surface mesh to 1, and set the distance cost of the non-smooth road surface mesh to positive infinity. For any skeleton, based on A The algorithm determines the shortest path distance cost between each grid on the skeleton and the road surface grid, and selects the path with the minimum shortest path distance cost as the shortest path from the skeleton to the road surface. For any skeleton, based on A The algorithm determines the shortest path distance cost between each grid on the skeleton and each grid on other skeletons, and selects the path with the minimum shortest path distance cost as the shortest path from the skeleton to all other skeletons. For any skeleton, based on A The algorithm determines the shortest path distance cost between the grids containing each endpoint of the skeleton and the road surface grid, and selects the path with the minimum shortest path distance cost as the shortest path between each endpoint of the skeleton and the road surface grid.

[0036] A The A-Star algorithm is a classic heuristic search algorithm used to find the shortest path in a graph. When searching for the shortest path, the algorithm starts from the starting grid point and adds the distance cost of the already traveled paths from the current position to the starting point to the estimated cost from the current position to the destination (usually calculated using Manhattan distance or Euclidean distance) to obtain an evaluation function. It then prioritizes expanding the grid point with the smallest evaluation function value, sequentially checking its accessible neighboring grid points and updating their costs, skipping grid points with positive infinity distance costs, until it expands to the destination grid point. Finally, it backtracks along the recorded parent nodes to obtain the path with the minimum cumulative cost. This is existing technology and will not be elaborated upon here.

[0037] Furthermore, the logic for determining the remaining number of road planning grids is as follows: obtain the shortest path length from the longest skeleton to each of the other skeletons, take the other skeletons corresponding to the minimum value as the second longest skeleton, obtain the number of grids on the longest skeleton, the number of grids on the second longest skeleton, the number of grids on the shortest path between the longest and second longest skeletons, and the number of grids on the shortest path from the longest skeleton to the road surface, and calculate the sum of the four, which is called the number of consumed grids. The skeleton connection rule is as follows: if the number of grids consumed is not greater than the number of grids planned for the road surface, then connect the longest skeleton and the road surface, and the longest skeleton and the second longest skeleton according to the shortest path; update the connected skeleton to the longest skeleton.

[0038] The process is iterated until the skeleton connection rules are no longer met. The longest skeleton that is finally updated is then exported as the first road skeleton. The number of road planning grids is then subtracted from the number of grids on the first road skeleton, which is called the remaining number of road planning grids.

[0039] This approach prioritizes the construction of the main road network and maximizes its connectivity within the constraints of limited road construction resources (i.e., the number of road surface planning grids). First, the longest skeleton is selected as the core backbone, and the nearest second-longest skeleton is connected to it. This expands the main road network with minimal path cost. Simultaneously, the longest skeleton is connected to existing road surfaces to ensure seamless integration between the new road network and the existing system. Calculating the number of grids consumed quantifies the resources required for each connection step and compares them with remaining resources. Connections are only executed when resources are sufficient, ensuring that each expansion step is within budget. The technical effect of this mechanism is to achieve dynamic, progressive road network construction under resource constraints. It prioritizes the continuity and accessibility of main roads while iteratively updating the "longest skeleton" and remaining resources to gradually integrate more skeletons and optimize the road network structure, ultimately forming a road planning scheme that is as connected, efficient, and cost-effective as possible within a limited grid.

[0040] Step 5: Obtain the shortest path between the endpoints of the first road skeleton and the road surface, combine it with the number of remaining road surface planning grids to set grid allocation rules, allocate the remaining road surface planning grids to the endpoints of the first road skeleton based on the grid allocation rules, and export the final skeleton and the final number of remaining road surface planning grids. Furthermore, the grid allocation rule is as follows: obtain the shortest path between each endpoint of the first road skeleton and the road surface, and sort the endpoints of the first road skeleton in ascending order of the shortest path length. Starting from the first endpoint, if the number of grids on the shortest distance between the endpoint and the road surface is not greater than the remaining road surface planning grid number, then connect the endpoint and the road surface according to the shortest path between the endpoint and the road surface, and subtract the number of grids on the shortest path between the endpoint and the road surface from the remaining road surface planning grid number to update the remaining road surface planning grid number; this process is repeated until the number of grids on the shortest distance between the endpoint and the road surface is greater than the remaining road surface planning grid number, or all endpoints are connected to the road surface. If the number of grids at the shortest distance between the endpoint and the road surface is greater than the number of remaining road surface planning grids, then among the unconnected endpoints, starting from the endpoint with the smallest sorted position, the remaining road surface planning grids are allocated sequentially according to the shortest path between the smallest endpoint and the road surface, until the number of remaining road surface planning grids is 0; the allocated skeleton is exported and named the final skeleton, and the number of remaining road surface planning grids is exported and named the final number of remaining road surface planning grids.

[0041] If the number of remaining road planning grids is 0, export the allocated skeleton and name it the final skeleton. Export the number of remaining road planning grids and name it the final remaining road planning grid number.

[0042] By prioritizing the provision of shortest connections between backbone endpoints and the existing road network using remaining resources, the system maximizes the accessibility and efficiency of newly constructed roads. By sorting and allocating grids according to connection path length, the system prioritizes connecting endpoints with the lowest access costs, ensuring as many endpoints as possible are connected with limited resources. When resources are insufficient to complete the entire connection, allocation is made along the shortest path, achieving full resource utilization and avoiding waste. The technical effect of this rule is to achieve refined and prioritized allocation of remaining resources. While ensuring backbone connectivity, it further optimizes branch line connections, shortening the actual distance between residential areas, farmland, and other areas and the road network, thereby significantly improving the overall coverage efficiency and end-point accessibility of the rural road network under cost constraints.

[0043] Step 6: Obtain the shortest path between each endpoint of the final skeleton and the road surface. Combine this with the number of remaining road surface planning grids, and select the final skeleton of the optimal candidate planning set to implement road paving.

[0044] Furthermore, the logic for selecting the optimal candidate planning set is as follows: if there is at least one candidate planning set among all candidate planning sets that satisfies the condition that the final number of remaining road planning grids is not 0, then the optimal candidate planning set is the candidate planning set with the largest number of remaining road planning grids. If the final number of remaining road planning grids in all candidate planning sets is 0, calculate the sum of the shortest distances between each endpoint of the final skeleton and the road surface. The optimal candidate planning set is the candidate planning set with the smallest sum of shortest distances.

[0045] First, the scheme with the most remaining road surface planning grids is prioritized. This means that the scheme saves the most resources while completing the same connectivity task, reflecting higher cost control and resource utilization efficiency. If all schemes exhaust resources (remaining resources are 0), then the scheme with the smallest sum of shortest distances between endpoints and road surfaces is evaluated. This scheme minimizes the connection path between the new road network and the existing road network, achieving optimal overall accessibility. The technical effect of this dual-objective optimization mechanism is that, under strict resource constraints, the system can automatically balance the two objectives of saving resources and improving connectivity, prioritizing economic efficiency, and further optimizing the end-point connection efficiency of the road network while making full use of resources. This results in a rural road planning scheme that meets budget constraints and has good practicality.

[0046] Example 2: A Rural Grid-Based Governance Planning System This invention provides a rural grid-based governance planning system, which is used to implement the rural grid-based governance planning method described in Embodiment 1, such as... Figure 2 As shown, the system integrates the following modules: The grid division module is configured to divide the two-dimensional electronic map of the countryside into grids and label the grids as residential housing grids, farmland grids, road grids, flat ground grids and other grids; The set generation module is configured to randomly select multiple sets of flat ground grids, the number of which is equal to the number of road planning grids (preset or input), to form multiple sets of sets to be planned. The candidate screening module is configured to, for each set to be planned, use the communication algorithm to divide the flat ground grid in the set to be planned into several connected regions, then use the erosion algorithm to extract the skeleton of each connected region, calculate the total length of the skeleton of all connected regions, preset the retention percentage, and call the set to be planned within the retention percentage before the total length of the skeleton the candidate planning set. The skeleton connection module is configured to, for any set of candidate plans, employ a heuristic search algorithm (specifically A) The algorithm obtains the shortest path from each skeleton to the road surface and the shortest path from each skeleton to other skeletons. It also sets the skeleton connection rules based on the number of road planning grids. Starting from the longest skeleton, the skeletons are connected sequentially according to the skeleton connection rules until the skeleton connection rules are no longer satisfied. The longest skeleton is then derived and called the first road skeleton and the remaining number of road planning grids. The remaining allocation module is configured to use a heuristic search algorithm (specifically A). The algorithm obtains the shortest path between the endpoints of the first road skeleton and the road surface, combines it with the number of remaining road surface planning grids to set grid allocation rules, allocates the remaining road surface planning grids to the endpoints of the first road skeleton based on the grid allocation rules, and derives the final skeleton and the final number of remaining road surface planning grids. The optimal selection module is configured to use a heuristic search algorithm (specifically A). The algorithm obtains the shortest path between each endpoint of the final skeleton and the road surface, and combines it with the number of remaining road surface planning grids to select the final skeleton of the optimal candidate planning set for road paving.

[0047] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0048] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.

[0049] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0050] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that cannot be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

[0051] As can be seen from the above embodiments, this invention provides a rural grid-based governance planning method and system by introducing an adaptive rotating grid partitioning mechanism. This method and system can dynamically adjust the grid layout according to the actual shape of the village, reduce the number of invalid grids, and improve the data quality and computational efficiency of subsequent processing. By randomly generating multiple sets of planning targets and combining them with connected domain skeleton extraction technology, this invention fully explores the various spatial combinations of flat areas as potential road corridors, providing rich candidates for optimized route selection. Based on the skeleton connection rules and grid allocation rules of the road planning grid number, a dynamic resource allocation logic is realized that, under strict resource constraints, priority is given to ensuring the connectivity of the main trunk lines, and then the connection of branch lines is optimized, ensuring the refined utilization of limited construction resources. Finally, by setting a dual-objective optimization strategy that combines the remaining number of grids and the endpoint access distance, the optimal road planning scheme in terms of cost control and access convenience can be automatically selected, thereby significantly improving the overall connectivity and accessibility of the rural road network while reducing construction costs.

Claims

1. A rural grid-based governance planning method, characterized in that, It includes the following steps: Step 1: Divide the rural map into grids and label the grids, including the grids for flat ground. Step 2: In the flat ground grid, randomly select multiple sets of flat ground grids with the same number as the road surface planning grids to form multiple sets of planning sets; Step 3: For each set to be planned, the flat ground grid in the set to be planned is divided into several connected regions using the Communicator algorithm. Then, the skeleton of each connected region is extracted using the Erosion algorithm. The total length of the skeleton of all connected regions is calculated. A preset retention percentage is set. The set to be planned within the retention percentage before the total length of the skeleton is called the candidate planning set. Step 4: For any candidate planning set, obtain the shortest path from each skeleton to the road surface and the shortest path from each skeleton to other skeletons. Combine the number of road planning grids to set the skeleton connection rules. Starting from the longest skeleton, connect the skeletons in sequence according to the skeleton connection rules until the skeleton connection rules are no longer satisfied. Derive the longest skeleton and the remaining number of road planning grids. The longest skeleton is called the first road skeleton. Step 5: Obtain the shortest path between the endpoints of the first road skeleton and the road surface, combine it with the number of remaining road surface planning grids to set grid allocation rules, allocate the remaining road surface planning grids to the endpoints of the first road skeleton based on the grid allocation rules, and export the final skeleton and the final number of remaining road surface planning grids. Step 6: Obtain the shortest path between each endpoint of the final skeleton and the road surface. Combine this with the final remaining road surface planning grid number to select the final skeleton of the optimal candidate planning set for road paving.

2. The rural grid-based governance planning method according to claim 1, characterized in that: In step 1, the map is a two-dimensional electronic map; The method for grid division includes: taking the geometric center point of the village in the two-dimensional electronic map as the center, constructing a central unit grid according to the unit grid size, expanding multiple unit grids outward along the central unit grid to cover all areas of the village in the two-dimensional electronic map, removing the unit grids of non-village areas inside, using the remaining grids as the grid division scheme, and counting the number of removed grids. The grid is rotated and traversed based on the geometric center, and the unit grid is expanded outward to cover all rural areas in the two-dimensional electronic map. Unit grids containing non-rural areas are removed to form a new grid division scheme, and the number of removed grids is counted. The grid partitioning scheme with the smallest number of grid cells is discarded and used as the final grid partitioning scheme.

3. The rural grid-based governance planning method according to claim 1, characterized in that: In step 1, the grid labeling method includes: if there are residential housing areas in the grid, the grid is labeled as a residential housing grid; if there are no residential housing areas in the grid but there are farmland areas, the grid is labeled as a farmland grid; if the grid is neither a residential housing grid nor a farmland grid, and the road surface area in the grid is greater than 80%, the grid is labeled as a road surface grid; if the grid is neither a road surface grid, a residential housing grid, nor a farmland grid, the average height within the grid is calculated, and the percentage of areas where the absolute difference between the height within the grid and the average height is less than a height difference threshold is obtained; if the percentage is greater than 90%, the grid is labeled as a flat ground grid; if the grid is neither a flat ground grid, a road surface grid, a residential housing grid, nor a farmland grid, the grid is classified as other grids. And / or, in step 2, the method for calculating the number of road planning grids includes: the ratio of the road construction budget to the cost required to pave a level ground grid as a road surface.

4. The rural grid-based governance planning method according to claim 1, characterized in that, In step 3, the method of extracting the skeleton of each connected region using the erosion algorithm includes: for each connected region, starting from the boundary mesh, in each iteration, the outermost mesh is systematically peeled off without destroying its topological connectivity. This process continues, and the connected region is eroded inward uniformly from all directions until no more meshes can be removed, so as to obtain the skeleton of the connected region.

5. The rural grid-based governance planning method according to claim 1, characterized in that, In steps 4 and 5, the methods for obtaining the shortest path from each skeleton to the road surface, the shortest path from each skeleton to other skeletons, and the shortest path from the endpoint to the road surface include: setting the distance cost of the smooth road surface mesh to 1 and setting the distance cost of the non-smooth road surface mesh to positive infinity. For any skeleton, a heuristic search algorithm is used to determine the shortest path distance cost between each grid on the skeleton and the road surface grid, and the path with the minimum shortest path distance cost is selected as the shortest path from the skeleton to the road surface. For any skeleton, a heuristic search algorithm is used to determine the shortest path distance cost between each grid on the skeleton and each grid on other skeletons, and the path with the minimum shortest path distance cost is selected as the shortest path from the skeleton to all other skeletons. For any skeleton, a heuristic search algorithm is used to determine the shortest path distance cost between the grids containing each endpoint of the skeleton and the road surface grid. The path with the minimum shortest path distance cost is selected as the shortest path between each endpoint of the skeleton and the road surface.

6. The rural grid-based governance planning method according to claim 1, characterized in that, In step 4, the method for obtaining the remaining road surface planning grid number includes: obtaining the shortest path length from the longest skeleton to each of the other skeletons, taking the other skeletons corresponding to the minimum value as the second longest skeleton, obtaining the number of grids on the longest skeleton, the number of grids on the second longest skeleton, the number of grids on the shortest path between the longest and second longest skeletons, and the number of grids from the longest skeleton to the shortest path of the road surface, and calculating the sum of the four, which is called the consumed grid number. The skeleton connection rules include: if the number of grids consumed is less than or equal to the number of grids planned for the road surface, then connect the longest skeleton and the road surface, and the longest skeleton and the second longest skeleton according to the shortest path; update the connected skeleton to the longest skeleton. The process is iterated until the skeleton connection rules are no longer met. The longest skeleton that is finally updated is then exported as the first road skeleton. The number of road planning grids is then subtracted from the number of grids on the first road skeleton, which is called the remaining number of road planning grids.

7. The rural grid-based governance planning method according to claim 1, characterized in that, In step 5, the grid allocation rules include: obtaining the shortest path between each endpoint of the first road skeleton and the road surface, and sorting the endpoints of the first road skeleton in ascending order of the shortest path length. Starting from the first endpoint, if the number of grids on the shortest distance between the endpoint and the road surface is less than or equal to the number of remaining road surface planning grids, then connect the endpoint and the road surface according to the shortest path between the endpoint and the road surface, and subtract the number of grids on the shortest path between the endpoint and the road surface from the number of remaining road surface planning grids to update the number of remaining road surface planning grids; this process is repeated until the number of grids on the shortest distance between the endpoint and the road surface is greater than the number of remaining road surface planning grids, or all endpoints are connected to the road surface. If the number of grids at the shortest distance between the endpoint and the road surface is greater than the number of remaining road surface planning grids, then among the unconnected endpoints, starting from the endpoint with the smallest sorting position, the remaining road surface planning grids are allocated sequentially according to the shortest path between the smallest endpoint and the road surface until the number of remaining road surface planning grids is 0; the allocated skeleton is exported and named the final skeleton, and the number of remaining road surface planning grids is exported and named the final number of remaining road surface planning grids. If all endpoints are connected to the road surface, then the final skeleton is derived, and the final number of remaining road surface planning grids is derived.

8. The rural grid-based governance planning method according to claim 7, characterized in that, In step 6, the method for selecting the optimal candidate planning set includes: if there is at least one candidate planning set among all candidate planning sets that satisfies the condition that the final number of remaining road planning grids is not 0, then the optimal candidate planning set is the candidate planning set with the largest number of remaining road planning grids. If the final number of remaining road planning grids in all candidate planning sets is 0, calculate the sum of the shortest distances between each endpoint of the final skeleton and the road surface. The optimal candidate planning set is the candidate planning set with the smallest sum of shortest distances.

9. A rural grid-based governance planning system for implementing the rural grid-based governance planning method according to any one of claims 1-8, characterized in that, It includes the following modules: The grid division module is configured to divide the rural map into grids and annotate the grids, including annotating grids on flat ground. The set generation module is configured to randomly select multiple sets of flat ground grids, the number of which is equal to the number of road planning grids, to form multiple sets of sets to be planned. The candidate screening module is configured to, for each set to be planned, use the communication algorithm to divide the flat ground grid in the set to be planned into several connected regions, then use the erosion algorithm to extract the skeleton of each connected region, calculate the total length of the skeleton of all connected regions, preset the retention percentage, and call the set to be planned within the retention percentage before the total length of the skeleton the candidate planning set. The skeleton connection module is configured to, for any candidate planning set, use a heuristic search algorithm to obtain the shortest path from each skeleton to the road surface and the shortest path from each skeleton to other skeletons, and set skeleton connection rules in combination with the number of road planning grids. Starting from the longest skeleton, skeletons are connected sequentially according to the skeleton connection rules until the skeleton connection rules are no longer satisfied. The longest skeleton and the remaining number of road planning grids are then derived. The longest skeleton is called the first road skeleton. The remaining allocation module is configured to use a heuristic search algorithm to obtain the shortest path between the endpoints of the first road skeleton and the road surface, combine it with the number of remaining road surface planning grids to set grid allocation rules, allocate the remaining road surface planning grids to the endpoints of the first road skeleton based on the grid allocation rules, and derive the final skeleton and the final number of remaining road surface planning grids. The optimal selection module is configured to use a heuristic search algorithm to obtain the shortest path between each endpoint of the final skeleton and the road surface, and combine the final remaining road surface planning grid number to select the final skeleton of the optimal candidate planning set for road paving.

10. A storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the rural grid-based governance planning system as described in claim 9.