An edge segmentation and clustering analysis-based region division method, system, terminal and storage medium

CN122346703BActive Publication Date: 2026-08-11SHENZHEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-08
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0004]本发明的主要目的在于提供一种基于边缘分割与聚类分析的区域划分方法、系统、终端及存储介质,旨在解决现有的区域划分方法存在无法稳定进行数据统计,及划分结果不准确的问题

Benefits of technology

[0015] This invention acquires target buildings within a target area, statistically processes the raster traffic of these buildings to obtain a raster dataset, and performs edge segmentation on the raster dataset to obtain an initial partitioning result. A boundary buffer is constructed based on the initial partitioning result, gradient calculation is performed on the boundary buffer to obtain gradient data, and the position of boundary nodes in the initial partitioning result is corrected based on the gradient data to obtain an optimized partitioning result. The optimized partitioning result is then subjected to region clustering processing based on clustering parameters to obtain clustering results, which are then filtered to obtain a target clustering result. Finally, the boundaries of all levels of clustering regions in the target clustering result are smoothed to obtain the target partitioning result. This invention improves the stability of data statistics and the accuracy of partitioning results through the integrated processing of initial grading, edge correction, density clustering, and geometric smoothing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122346703B_ABST
    Figure CN122346703B_ABST
Patent Text Reader

Abstract

This invention relates to the field of region partitioning technology, and discloses a region partitioning method, system, terminal, and storage medium based on edge segmentation and clustering analysis. The method includes: acquiring target buildings in a target region; statistically processing the raster traffic of the target buildings and performing edge segmentation to obtain an initial partitioning result; constructing a boundary buffer, performing gradient calculation to obtain gradient data, and correcting the position of the boundary nodes of the initial spatial boundary to obtain an optimized partitioning result; performing region clustering processing on the optimized partitioning result according to clustering parameters to obtain a clustering result, and filtering the clustering result to obtain a target clustering result; and performing smoothing optimization on the boundaries of all levels of clustering regions in the target clustering result to obtain the target partitioning result. This invention improves the stability of data statistics and the accuracy of partitioning results through the integrated processing of initial grading, edge correction, density clustering, and geometric smoothing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of region partitioning technology, and in particular to a region partitioning method, system, terminal, and computer-readable storage medium based on edge segmentation and cluster analysis. Background Technology

[0002] Currently, region division is often based on the current region's traffic flow (e.g., urban population). While traffic-based region division can provide quantitative basis for traffic flow optimization and node expansion, existing traffic-based region division methods have the following technical problems: (1) Inaccurate spatial boundary positioning: If the boundary is divided solely based on the numerical threshold, it is easy to fall into the area where the flow is smooth and transitional, which cannot match the actual location of the flow change, resulting in inaccurate division results; (2) Spatial fragmentation: Affected by local flow fluctuations, the same level of space is scattered, with a large number of micro spaces and isolated noise points, making it impossible to conduct stable data statistics; (3) Discontinuous boundary morphology: The jagged boundary formed by splicing discrete grids has weak geometric stability and spatial interpretability, resulting in a mismatch with the corresponding real morphology.

[0003] Therefore, existing technologies still need to be improved and developed. Summary of the Invention

[0004] The main objective of this invention is to provide a region partitioning method, system, terminal, and storage medium based on edge segmentation and clustering analysis, aiming to solve the problems of existing region partitioning methods being unable to stably perform data statistics and having inaccurate partitioning results.

[0005] To achieve the above objectives, the present invention provides a region partitioning method based on edge segmentation and cluster analysis, the method comprising the following steps: The target buildings in the target area are obtained, the raster traffic of the target buildings is statistically processed to obtain a raster dataset, and the raster dataset is edge segmented to obtain an initial segmentation result. A boundary buffer is constructed based on the initial partitioning result. Gradient calculation is performed on the boundary buffer to obtain gradient data. The position of the boundary nodes in the initial partitioning result is corrected based on the gradient data to obtain the partitioning optimization result. The partitioning optimization results are subjected to region clustering processing based on the clustering parameters to obtain clustering results, and the clustering results are then filtered to obtain the target clustering results. The boundaries of cluster regions at all levels in the target clustering results are smoothed and optimized to obtain the target partitioning results.

[0006] Optionally, the region partitioning method based on edge segmentation and clustering analysis, wherein obtaining the target buildings in the target region, statistically processing the raster traffic of the target buildings to obtain a raster dataset, and performing edge segmentation on the raster dataset to obtain an initial partitioning result, specifically includes: The target buildings in the target area are obtained, and the target buildings are rasterized according to the target scale to obtain multiple raster units. The traffic flow of each raster unit is statistically processed to obtain multiple traffic flow statistics results. All the traffic statistics results are combined to obtain a raster dataset. The raster dataset is then hierarchically processed to obtain a multi-level raster set. Each level of the raster set is then segmented to obtain an initial partitioning result.

[0007] Optionally, the region partitioning method based on edge segmentation and clustering analysis, wherein constructing a boundary buffer based on the initial partitioning result, performing gradient calculation on the boundary buffer to obtain gradient data, and correcting the position of the boundary nodes in the initial partitioning result based on the gradient data to obtain a partitioning optimization result, specifically includes: The initial spatial boundary in the initial partitioning result is expanded to obtain a boundary buffer. The boundary buffer is then traversed by a grid to obtain the grid traversal result. Gradient values ​​are calculated for each grid cell in the grid traversal result to obtain multiple comprehensive gradient values, and gradient data is obtained based on all the comprehensive gradient values. The initial spatial boundary is traversed to obtain multiple boundary nodes. The positions of all the boundary nodes are corrected according to the gradient data to obtain multiple target boundary nodes. The spatial boundary set is obtained based on all the target boundary nodes. The boundary buffer is constrained according to the set of spatial boundaries to obtain the constraint result, and the partitioning optimization result is obtained according to the constraint result.

[0008] Optionally, in the region partitioning method based on edge segmentation and clustering analysis, the step of calculating the gradient value for each grid cell in the grid traversal result specifically involves: ; in, For the comprehensive gradient value, The gradient is in the horizontal direction. The gradient is in the vertical direction; The expression for the horizontal gradient is as follows: ; The expression for the vertical gradient is as follows: .

[0009] Optionally, the region partitioning method based on edge segmentation and clustering analysis, wherein the step of performing region clustering processing on the partitioning optimization result according to clustering parameters to obtain clustering results, and filtering the clustering results to obtain target clustering results, specifically includes: Set clustering parameters, wherein the clustering parameters include neighborhood radius and minimum number of neighborhood grids; Based on the clustering parameters, the neighborhood density of each grid in the partitioning optimization result is detected to obtain core point information. Based on the core points in the core point information, the same-level grids within the neighborhood radius are recursively searched to obtain the search results. Based on the search results, region clustering is performed to obtain clustering results, and the clustering results are then filtered to obtain the target clustering results.

[0010] Optionally, the region partitioning method based on edge segmentation and clustering analysis, wherein the smoothing optimization of the clustering region boundaries at all levels in the target clustering result to obtain the target partitioning result specifically includes: Boundary traversal is performed on the target clustering results to obtain the clustering region boundaries of all levels, and the coordinates of the clustering region boundary grids of all the clustering region boundaries are calculated to obtain the average coordinates; The coordinates of each cluster region boundary grid are updated based on the average coordinate value to obtain the coordinate update result. The boundaries of all cluster regions are then smoothed and optimized based on the coordinate update result to obtain the target partitioning result.

[0011] Optionally, in the region partitioning method based on edge segmentation and clustering analysis, the calculation of coordinates for the cluster region boundary grids of all the cluster regions specifically involves: ; in, The average value of the coordinates. The coordinates of the first adjacent grid cell. The coordinates of the second adjacent grid cell. These are the raster coordinates of the cluster region boundaries. The x-coordinate of the raster. y is the raster ordinate.

[0012] Optionally, the region partitioning method based on edge segmentation and clustering analysis, wherein the region partitioning system based on edge segmentation and clustering analysis includes: The initial classification module is used to acquire target buildings in the target area, perform statistical processing on the raster traffic of the target buildings to obtain a raster dataset, and perform edge segmentation on the raster dataset to obtain the initial classification result. The edge segmentation module is used to construct a boundary buffer based on the initial segmentation result, perform gradient calculation on the boundary buffer to obtain gradient data, and perform position correction on the boundary nodes in the initial segmentation result based on the gradient data to obtain the segmentation optimization result. The clustering integration module is used to perform regional clustering processing on the partitioning optimization results according to the clustering parameters to obtain the clustering results, and to filter the clustering results to obtain the target clustering results; The boundary smoothing module is used to smooth and optimize the boundaries of cluster regions at all levels in the target clustering result to obtain the target partitioning result.

[0013] Furthermore, to achieve the above objectives, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a region partitioning program based on edge segmentation and clustering analysis stored in the memory and executable on the processor, wherein when the region partitioning program based on edge segmentation and clustering analysis is executed by the processor, it implements the steps of the region partitioning method based on edge segmentation and clustering analysis as described above.

[0014] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a region partitioning program based on edge segmentation and clustering analysis, and the region partitioning program based on edge segmentation and clustering analysis, when executed by a processor, implements the steps of the region partitioning method based on edge segmentation and clustering analysis as described above.

[0015] This invention acquires target buildings within a target area, statistically processes the raster traffic of these buildings to obtain a raster dataset, and performs edge segmentation on the raster dataset to obtain an initial partitioning result. A boundary buffer is constructed based on the initial partitioning result, gradient calculation is performed on the boundary buffer to obtain gradient data, and the position of boundary nodes in the initial partitioning result is corrected based on the gradient data to obtain an optimized partitioning result. The optimized partitioning result is then subjected to region clustering processing based on clustering parameters to obtain clustering results, which are then filtered to obtain a target clustering result. Finally, the boundaries of all levels of clustering regions in the target clustering result are smoothed to obtain the target partitioning result. This invention improves the stability of data statistics and the accuracy of partitioning results through the integrated processing of initial grading, edge correction, density clustering, and geometric smoothing. Attached Figure Description

[0016] Figure 1This is a flowchart of a preferred embodiment of the region partitioning method based on edge segmentation and cluster analysis of the present invention; Figure 2 This is a schematic diagram of the overall process of the region partitioning method based on edge segmentation and cluster analysis of the present invention; Figure 3 This is a schematic diagram of the grid 8 adjacency relationship in a preferred embodiment of the present invention; Figure 4 This is a schematic diagram of the boundary smoothing method in a preferred embodiment of the present invention; Figure 5 This is a schematic diagram illustrating the area division effect of the target building in a preferred embodiment of the present invention; Figure 6 This is a structural diagram of a preferred embodiment of the region partitioning system based on edge segmentation and cluster analysis of the present invention; Figure 7 This is a structural diagram of a preferred embodiment of the terminal of the present invention. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0018] It should be noted that if the embodiments of the present invention involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.

[0019] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.

[0020] The preferred embodiment of the present invention describes a region partitioning method based on edge segmentation and clustering analysis, such as... Figure 1 As shown, the region partitioning method based on edge segmentation and clustering analysis includes the following steps: Step S10: Obtain the target buildings in the target area, perform statistical processing on the raster traffic of the target buildings to obtain a raster dataset, and perform edge segmentation on the raster dataset to obtain the initial segmentation result.

[0021] Specifically, in high-density building and transportation hub spaces (e.g., large rail transit stations), pedestrian flow distribution exhibits high non-uniformity and dynamic complexity, with significant differences in space utilization efficiency. Traditional spatial region division methods relying on a single Fruit service level standard generally suffer from significant technical defects: on the one hand, relying solely on discrete numerical thresholds for "hard cutting" ignores the natural spatial continuity of pedestrian flow fields, leading to inaccurate boundary positioning and mismatches in critical region level assignments due to minor numerical fluctuations; on the other hand, judgments based on simple connectivity are easily affected by local random movement and short-term aggregation behavior of pedestrians, causing severe spatial fragmentation and isolated "salt and pepper noise"; furthermore, limited by the discrete characteristics of the grid, the generated region edges inevitably exhibit stepped and jagged shapes, resulting in severe deficiencies in statistical stability and physical spatial interpretability, leading to problems such as the inability to stably perform data statistics and inaccurate division results in existing region division methods. Therefore, this invention proposes a region division method based on edge segmentation and cluster analysis, which improves the stability of data statistics and the accuracy of division results through integrated processing of initial grading, edge correction, density clustering, and geometric smoothing.

[0022] Specifically, such as Figure 2 As shown, the target buildings in the target area are obtained, and spatial syntax is used to perform global rasterization discretization processing on the target buildings. The building plan of the target buildings is divided into multiple regular raster units according to the target scale. Pedestrian traffic flow is calculated for each raster unit, and multiple traffic flow statistics are obtained. All the traffic flow statistics are combined to form a raster dataset covering the continuous traffic flow distribution of the entire building area, thereby realizing the quantitative expression of space utilization intensity. Next, the raster dataset needs to be graded. Referring to the Fruit pedestrian traffic service level grading standard, as shown in Table 1, the raster dataset is divided into 6 space utilization levels based on the raster traffic flow value, forming a multi-level raster set. The expression for is: ; in, It is a multi-level raster set. This is the first-level grid. For the second level grid, It is a third-level grid. It is a fourth-level grid. It is the fifth level grid. It is the sixth level of the grid.

[0023] Table 1: Fruit's Pedestrian Traffic Service Level Classification Standards

[0024] During the classification process, physically restricted spaces inaccessible within the building are automatically identified and eliminated. These primarily include areas with no pedestrian traffic, such as elevator shafts, building atriums, skylights, equipment shafts, and enclosed machine rooms. These areas are not involved in traffic calculation, classification, or subsequent optimization processes; they are only marked as background spaces. After traffic classification and invalid space elimination, based on grid spatial connectivity rules, the grids within each level are topologically segmented. Grids of the same level that are spatially adjacent and contiguous are aggregated into independent initial spatial units, resulting in the initial classification results. After segmentation, it was found that the initial classification results exhibit significant distributional differences. Furthermore, the initial classification results have the following problems: spaces within the same level exhibit multi-core, fragmented distributions, with most containing only a few grids, and even isolated points of single grids are widespread, lacking statistical representativeness of traffic flow; boundary areas show a large number of critical grids with similar values ​​but classified into different levels, resulting in fragmented classification that does not match actual traffic changes; boundaries are formed by splicing discrete grids, exhibiting a sawtooth or stepped shape with poor geometric continuity. Therefore, the above problems provide clear optimization targets for subsequent edge segmentation correction, density clustering integration, and boundary geometric smoothing.

[0025] Step S20: Construct a boundary buffer based on the initial partitioning result, perform gradient calculation on the boundary buffer to obtain gradient data, and perform position correction on the boundary nodes in the initial partitioning result based on the gradient data to obtain the partitioning optimization result.

[0026] Specifically, after obtaining the initial partitioning result, based on the initial spatial boundary of the initial partitioning result, and referring to morphological processing methods, the initial spatial boundary is expanded (i.e., dilation and erosion operations are performed respectively). The boundary is expanded by three grid squares on both the center and non-center sides of the region corresponding to the initial spatial boundary, forming a local search buffer (i.e., a boundary buffer), which is used as the target domain for subsequent gradient calculations, i.e., any point on the boundary... Using the center as the coordinate offset, traverse the coordinate offsets. All gratings are then processed. Next, within the constructed boundary buffer, the Sobel operator (an operator used in image processing to calculate image differences) is applied to perform gradient calculations, traversing all gratings in the boundary buffer, allowing the Sobel operator to calculate the horizontal gradient for each grating. gradient in the vertical direction The corresponding expressions are as follows: ; ; For each grid cell in the grid traversal result, the gradient value is calculated to obtain multiple comprehensive gradient values, and the corresponding expression is: ; in, For the comprehensive gradient value, The gradient is in the horizontal direction. The gradient is the vertical gradient. The comprehensive gradient value is used to identify the location of the real boundary where the flow rate changes most drastically. The larger the comprehensive gradient value, the more drastic the flow rate change at that location, which is the location of the real spatial boundary.

[0027] Next, the initial spatial boundary is traversed to obtain multiple boundary nodes. Based on the gradient data, the positions of all the boundary nodes are corrected to obtain multiple target boundary nodes. Specifically, the position correction process involves first traversing each boundary node on the initial spatial boundary. The coordinate difference of the preceding and following boundary nodes of each boundary node is performed to determine its tangent vector. With the corresponding normal vector Satisfying orthogonality Subsequently, with A one-dimensional search path is constructed within the boundary buffer along the normal direction, centered on the grid, to synthesize the gradient values ​​of each grid cell along the normal direction. Then, the grid cell with the largest gradient value is retrieved. This serves as the point of inflection for the flow along the normal. Finally, the corresponding boundary node is moved along the normal direction. At the coordinates. If the current level spatial boundary touches a defined previous level spatial boundary when expanding outward, the "higher level priority" principle is followed, forcibly preserving the position of the previous level boundary unchanged. The current boundary node only snaps to that boundary to avoid spatial overlap between different levels. Traverse all boundary nodes, updating and adjusting the boundaries while maintaining the topological connection order, to obtain a set of spatial boundaries sorted by topology.

[0028] After the boundary position is adjusted, some grids within the boundary buffer may experience changes in their classification due to boundary movement. Using the adjusted spatial boundary set as a constraint, the boundary buffer is constrained according to the spatial boundary set to obtain the constraint result. Specifically, it is determined whether each grid within the boundary buffer is contained on the spatial center side. If the grid is still on the spatial center side, it is retained; if the grid is not on the spatial center side, it is moved down to the next level, thereby improving the accuracy of critical grid classification. Subsequently, the partitioning optimization result is obtained based on the constraint result.

[0029] Step S30: Perform region clustering processing on the partitioning optimization results according to the clustering parameters to obtain clustering results, and then filter the clustering results to obtain the target clustering results.

[0030] Specifically, clustering parameters are set, wherein the clustering parameters include neighborhood radius. (e.g., 1.5m) and minimum number of neighboring grid cells (For example, 3), such as Figure 3 As shown, the grid cell side length is 1m, and the neighborhood radius is set to 1.5m to establish 8 adjacency logic in space. The minimum neighborhood grid number is set to 3 because pedestrian traffic is often constrained by building boundaries (e.g., corridors, narrow passages) and presents a long and narrow strip distribution. Setting the minimum neighborhood grid number to 3 can effectively identify linear spaces with obvious directionality. The minimum effective space size threshold is 30, that is, only when the space contains no less than 30 grids is it considered to have statistical significance. Spaces with fewer than 30 grids are sunken and merged into adjacent lower-level spaces to maintain spatial continuity.

[0031] For any grid point Its neighborhood is defined as follows: Center, neighborhood radius The set of all grid cells within the range is denoted as: ; in, For a raster set, The Euclidean distance between grid cells. For grid points, planar spatial distance calculation is used, and grid points that meet the requirements are used as core points. When the value is 0, it indicates that the neighborhood of the grid point contains at least 3 grids of the same level.

[0032] like Figure 2 As shown, DBSCAN clustering (Density-Based Spatial Clustering of Applications with Noise) is performed sequentially from high to low levels. Specifically, the raster set of the current processing level is selected as input, and the clustering parameters are set as described above: The process iterates through each grid cell in the grid set, performing neighborhood density checks. If a grid cell has at least three sibling grid cells within its neighborhood radius, it is identified as a core point and used as the recursive starting point for constructing subsequent clustering regions. If a grid cell has fewer than three sibling grid cells within its neighborhood radius, it is temporarily marked as a discrete point to obtain core point information. Then, using any core point from this core point information as a starting point, it recursively searches for sibling grid cells within its neighborhood radius, continuously incorporating grid cells that meet the core point criteria into the current clustering region. Simultaneously, grid cells within the neighborhood that do not meet the core point criteria but are directly adjacent to a core point are included in the region as boundary points. This process continues iterating until no new grid cells are generated within the current clustering region, forming a complete spatial clustering region and yielding the clustering result.

[0033] The number of all grid cells within the same cluster is denoted as . and the minimum effective space size threshold When comparing, If it is, then it is considered valid space and is reserved; when If the microspace is not found, it is considered an invalid microspace and a sinking process is initiated.

[0034] After completing the clustering results for the current service level, the clustering results are filtered to obtain the target clustering results. The filtering process is a noise reduction process. Noise points are defined as discrete rasters that do not meet the core point or boundary node requirements, or cluster regions whose number of rasters is less than a preset minimum region size threshold. If a raster or region meets this condition, it is moved down and merged to the next level, and then participates in the clustering analysis again in a subsequent process.

[0035] Step S40: Perform smooth optimization on the boundaries of cluster regions at all levels in the target clustering result to obtain the target partitioning result.

[0036] Specifically, after completing DBSCAN density clustering and spatial integration, the spatial boundaries at each level are still composed of discrete grid units, exhibiting stepped, jagged, and angular geometric shapes that fail to accurately reflect the interface characteristics of continuous transitions in architectural space and reduce the readability of the spatial division results. Therefore, a boundary geometric smoothing method based on local neighborhood coordinate averaging is used to uniformly smooth the boundaries of clustering regions at all levels, making the boundary curves more continuous, smooth, and consistent with the actual spatial form. The specific process involves traversing the boundaries of the target clustering results to obtain the boundaries of clustering regions at all levels (i.e., the set of clustering region boundaries), and then using a simple smoothing method to geometrically optimize the set of clustering region boundaries, using the grid of any clustering region boundary... Centered on the grid, select one adjacent grid cell before and after its topological connection. , To construct a local neighborhood, the coordinates of the boundary grid of all the clustered regions are calculated, and the average coordinates are obtained. The corresponding expression is: ; in, The average value of the coordinates. The coordinates of the first adjacent grid cell. The coordinates of the second adjacent grid cell. These are the raster coordinates of the cluster region boundaries. The x-coordinate of the raster. This represents the raster ordinate. Then, the boundary raster coordinates are updated using an arithmetic mean method, such as... Figure 4 As shown, The first neighboring raster of the boundary raster of the target cluster region. The target clustering region boundary grid, For the next adjacent raster of the boundary raster of the target clustering region, For the updated target cluster region boundary raster, replace the current raster coordinates with the average of all raster coordinates in the neighborhood.

[0037] During the smoothing process, the overall topological structure of the boundary remains unchanged, without altering spatial connectivity or hierarchical affiliation. Only the boundary coordinates are fine-tuned to avoid spatial contour distortion caused by over-smoothing. After point-by-point smoothing of the boundaries of all clustered regions within the same level, the processing pointer is moved to the next level. Using the updated dataset containing the sinking noise raster from the previous level as input, clustering and boundary extraction are re-executed, followed by another round of smoothing, until boundary optimization for all spatial utilization levels is completed. Through local coordinate averaging smoothing, the original raster stepped edges are corrected into continuous smooth curves, resulting in a more regular and natural spatial contour, significantly improving boundary geometric stability and spatial interpretability. After completing global boundary smoothing, the final partitioning result (i.e., the target partitioning result) is output as follows: Figure 5 As shown.

[0038] This invention calculates the building-wide raster flow based on spatial syntax, performs initial flow level classification according to the Fruit standard, eliminates invalid spaces, and forms initial classification units based on connectivity. It employs the Sobel gradient edge segmentation algorithm to overcome the limitations of a single threshold, accurately correcting spatial boundaries to the physical locations of flow abrupt changes and automatically optimizing the critical raster level assignment, thus resolving issues of inaccurate boundary positioning and ambiguous assignment. DBSCAN density clustering identifies spatial clustering areas, combined with a minimum scale threshold to filter isolated noise, and a unique degradation and sinking compensation mechanism integrates scattered spaces, significantly reducing spatial fragmentation. Finally, geometric arithmetic smoothing is used to obtain continuous and regular spatial boundaries, improving the accuracy and visualization of the region division results.

[0039] Furthermore, such as Figure 6 As shown, based on the above-mentioned region partitioning method based on edge segmentation and clustering analysis, the present invention also provides a region partitioning system based on edge segmentation and clustering analysis, wherein the region partitioning system based on edge segmentation and clustering analysis includes: The initial classification module 51 is used to acquire target buildings in the target area, perform statistical processing on the raster traffic of the target buildings to obtain a raster dataset, and perform edge segmentation on the raster dataset to obtain an initial classification result. The edge segmentation module 52 is used to construct a boundary buffer based on the initial segmentation result, perform gradient calculation on the boundary buffer to obtain gradient data, and perform position correction on the boundary nodes in the initial segmentation result based on the gradient data to obtain a segmentation optimization result. The clustering integration module 53 is used to perform regional clustering processing on the partitioning optimization results according to the clustering parameters to obtain clustering results, and to filter the clustering results to obtain target clustering results; The boundary smoothing module 54 is used to smooth and optimize the boundaries of clustering regions at all levels in the target clustering result to obtain the target partitioning result.

[0040] Furthermore, such as Figure 7 As shown, based on the above-mentioned region division method based on edge segmentation and cluster analysis, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 7 Only some of the terminal components are shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0041] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code installed on the terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a region partitioning program 40 based on edge segmentation and clustering analysis, which can be executed by the processor 10 to implement the region partitioning method based on edge segmentation and clustering analysis in this application.

[0042] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing the region partitioning method based on edge segmentation and clustering analysis.

[0043] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the terminal and to display a visual user interface.

[0044] In one embodiment, when the processor 10 executes the region partitioning program 40 based on edge segmentation and clustering analysis in the memory 20, the following steps are performed: The target buildings in the target area are obtained, the raster traffic of the target buildings is statistically processed to obtain a raster dataset, and the raster dataset is edge segmented to obtain an initial segmentation result. A boundary buffer is constructed based on the initial partitioning result. Gradient calculation is performed on the boundary buffer to obtain gradient data. The position of the boundary nodes in the initial partitioning result is corrected based on the gradient data to obtain the partitioning optimization result. The partitioning optimization results are subjected to region clustering processing based on the clustering parameters to obtain clustering results, and the clustering results are then filtered to obtain the target clustering results. The boundaries of cluster regions at all levels in the target clustering results are smoothed and optimized to obtain the target partitioning results.

[0045] Specifically, the process of acquiring target buildings within a target area, statistically processing the raster flow of the target buildings to obtain a raster dataset, and performing edge segmentation on the raster dataset to obtain an initial partitioning result includes: The target buildings in the target area are obtained, and the target buildings are rasterized according to the target scale to obtain multiple raster units. The traffic flow of each raster unit is statistically processed to obtain multiple traffic flow statistics results. All the traffic statistics results are combined to obtain a raster dataset. The raster dataset is then hierarchically processed to obtain a multi-level raster set. Each level of the raster set is then segmented to obtain an initial partitioning result.

[0046] Specifically, the step of constructing a boundary buffer based on the initial partitioning result, calculating gradients in the boundary buffer to obtain gradient data, and correcting the positions of boundary nodes in the initial partitioning result based on the gradient data to obtain a partitioning optimization result includes: The initial spatial boundary in the initial partitioning result is expanded to obtain a boundary buffer. The boundary buffer is then traversed by a grid to obtain the grid traversal result. Gradient values ​​are calculated for each grid cell in the grid traversal result to obtain multiple comprehensive gradient values, and gradient data is obtained based on all the comprehensive gradient values. The initial spatial boundary is traversed to obtain multiple boundary nodes. The positions of all the boundary nodes are corrected according to the gradient data to obtain multiple target boundary nodes. The spatial boundary set is obtained based on all the target boundary nodes. The boundary buffer is constrained according to the set of spatial boundaries to obtain the constraint result, and the partitioning optimization result is obtained according to the constraint result.

[0047] Specifically, calculating the gradient value for each grid cell in the grid traversal result involves: ; in, For the comprehensive gradient value, The gradient is in the horizontal direction. The gradient is in the vertical direction; The expression for the horizontal gradient is as follows: ; The expression for the vertical gradient is as follows: .

[0048] Specifically, the step of performing region clustering processing on the partitioning optimization results based on clustering parameters to obtain clustering results, and then filtering the clustering results to obtain target clustering results, includes: Set clustering parameters, wherein the clustering parameters include neighborhood radius and minimum number of neighborhood grids; Based on the clustering parameters, the neighborhood density of each grid in the partitioning optimization result is detected to obtain core point information. Based on the core points in the core point information, the same-level grids within the neighborhood radius are recursively searched to obtain the search results. Based on the search results, region clustering is performed to obtain clustering results, and the clustering results are then filtered to obtain the target clustering results.

[0049] Specifically, the smoothing optimization of the cluster region boundaries at all levels in the target clustering result to obtain the target partitioning result includes: Boundary traversal is performed on the target clustering results to obtain the clustering region boundaries of all levels, and the coordinates of the clustering region boundary grids of all the clustering region boundaries are calculated to obtain the average coordinates; The coordinates of each cluster region boundary grid are updated based on the average coordinate value to obtain the coordinate update result. The boundaries of all cluster regions are then smoothed and optimized based on the coordinate update result to obtain the target partitioning result.

[0050] Specifically, the calculation of coordinates for the cluster region boundary grids of all the cluster regions involves: ; in, The average value of the coordinates. The coordinates of the first adjacent grid cell. The coordinates of the second adjacent grid cell. These are the raster coordinates of the cluster region boundaries. The x-coordinate of the raster. y is the raster ordinate.

[0051] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a region partitioning program based on edge segmentation and clustering analysis, and the region partitioning program based on edge segmentation and clustering analysis, when executed by a processor, implements the steps of the region partitioning method based on edge segmentation and clustering analysis as described above.

[0052] In summary, this invention provides a region partitioning method, system, terminal, and storage medium based on edge segmentation and clustering analysis. The method includes: acquiring target buildings in a target region; statistically processing the raster traffic of the target buildings to obtain a raster dataset; performing edge segmentation on the raster dataset to obtain an initial partitioning result; constructing a boundary buffer based on the initial partitioning result; calculating gradients on the boundary buffer to obtain gradient data; correcting the position of boundary nodes in the initial partitioning result based on the gradient data to obtain an optimized partitioning result; performing region clustering processing on the optimized partitioning result based on clustering parameters to obtain clustering results; filtering the clustering results to obtain a target clustering result; and smoothing the boundaries of all levels of clustering regions in the target clustering result to obtain the target partitioning result. This invention improves the stability of data statistics and the accuracy of partitioning results through integrated processing of initial grading, edge correction, density clustering, and geometric smoothing.

[0053] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0054] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The computer-readable storage medium can be a memory, magnetic disk, optical disk, etc.

[0055] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A region partitioning method based on edge segmentation and cluster analysis, characterized in that, The region partitioning method based on edge segmentation and cluster analysis includes: The target buildings in the target area are obtained, and the target buildings are rasterized according to the target scale to obtain multiple raster units. The traffic flow of each raster unit is statistically processed to obtain multiple traffic flow statistics results. All the traffic statistics results are combined to obtain a raster dataset. The raster dataset is then hierarchically processed to obtain a multi-level raster set. Each level of the raster set is then segmented to obtain an initial partitioning result. A boundary buffer is constructed based on the initial partitioning result. Gradient calculation is performed on the boundary buffer to obtain gradient data. The position of the boundary nodes in the initial partitioning result is corrected based on the gradient data to obtain the partitioning optimization result. The partitioning optimization results are subjected to region clustering processing based on the clustering parameters to obtain clustering results, and the clustering results are then filtered to obtain the target clustering results. The step of performing region clustering processing on the partitioning optimization results based on clustering parameters to obtain clustering results, and then filtering the clustering results to obtain target clustering results, specifically includes: Set clustering parameters, wherein the clustering parameters include neighborhood radius and minimum number of neighborhood grids; Based on the clustering parameters, the neighborhood density of each grid in the partitioning optimization result is detected to obtain core point information. Based on the core points in the core point information, the same-level grids within the neighborhood radius are recursively searched to obtain the search results. Based on the search results, region clustering is performed to obtain clustering results, and the clustering results are then filtered to obtain the target clustering results; The boundaries of cluster regions at all levels in the target clustering results are smoothed and optimized to obtain the target partitioning results; The step of smoothing and optimizing the boundaries of cluster regions at all levels in the target clustering result to obtain the target partitioning result specifically includes: Boundary traversal is performed on the target clustering results to obtain the clustering region boundaries of all levels, and the coordinates of the clustering region boundary grids of all the clustering region boundaries are calculated to obtain the average coordinates; The coordinates of each cluster region boundary grid are updated based on the average coordinate value to obtain the coordinate update result. The boundaries of all cluster regions are then smoothed and optimized based on the coordinate update result to obtain the target partitioning result.

2. The region partitioning method based on edge segmentation and cluster analysis according to claim 1, characterized in that, The process of constructing a boundary buffer based on the initial partitioning result, calculating gradients in the boundary buffer to obtain gradient data, and correcting the positions of boundary nodes in the initial partitioning result based on the gradient data to obtain a partitioning optimization result specifically includes: The initial spatial boundary in the initial partitioning result is expanded to obtain a boundary buffer. The boundary buffer is then traversed by a grid to obtain the grid traversal result. Gradient values ​​are calculated for each grid cell in the grid traversal result to obtain multiple comprehensive gradient values, and gradient data is obtained based on all the comprehensive gradient values. The initial spatial boundary is traversed to obtain multiple boundary nodes. The positions of all the boundary nodes are corrected according to the gradient data to obtain multiple target boundary nodes. The spatial boundary set is obtained based on all the target boundary nodes. The boundary buffer is constrained according to the set of spatial boundaries to obtain the constraint result, and the partitioning optimization result is obtained according to the constraint result.

3. The region partitioning method based on edge segmentation and cluster analysis according to claim 2, characterized in that, The gradient value calculation for each grid cell in the grid traversal result is specifically as follows: ; in, For the comprehensive gradient value, The gradient is in the horizontal direction. This represents the gradient in the vertical direction.

4. The region partitioning method based on edge segmentation and cluster analysis according to claim 3, characterized in that, The expression for the horizontal gradient is as follows: ; The expression for the vertical gradient is as follows: 。 5. The region partitioning method based on edge segmentation and cluster analysis according to claim 1, characterized in that, The calculation of coordinates for the cluster region boundary grids of all the cluster regions specifically involves: ; in, The average value of the coordinates. The coordinates of the first adjacent grid cell. The coordinates of the second adjacent grid cell. These are the raster coordinates of the cluster region boundaries. The x-coordinate of the raster. y is the raster ordinate.

6. A region partitioning system based on edge segmentation and cluster analysis, characterized in that, The region partitioning system based on edge segmentation and clustering analysis is used to implement the region partitioning method based on edge segmentation and clustering analysis as described in any one of claims 1-4, wherein the region partitioning system based on edge segmentation and clustering analysis includes: The data processing module is used to acquire target buildings in the target area, perform rasterization processing on the target buildings according to the target scale to obtain multiple raster units, and perform statistical processing on the traffic flow of each raster unit to obtain multiple traffic flow statistics results. The initial grading module is used to combine all the traffic statistics results to obtain a raster dataset, perform grading processing on the raster dataset to obtain a multi-level raster set, and perform segmentation processing on the raster at each level in the multi-level raster set to obtain the initial division result. The edge segmentation module is used to construct a boundary buffer based on the initial segmentation result, perform gradient calculation on the boundary buffer to obtain gradient data, and perform position correction on the boundary nodes in the initial segmentation result based on the gradient data to obtain the segmentation optimization result. The clustering integration module is used to perform regional clustering processing on the partitioning optimization results according to the clustering parameters to obtain the clustering results, and to filter the clustering results to obtain the target clustering results; The boundary smoothing module is used to smooth and optimize the boundaries of cluster regions at all levels in the target clustering result to obtain the target partitioning result.

7. A terminal, characterized in that, The terminal includes a memory, a processor, and a program stored in the memory and executable on the processor. When the program is executed by the processor, it implements the steps of the region partitioning method based on edge segmentation and clustering analysis as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which stores a region partitioning program based on edge segmentation and clustering analysis. When the region partitioning program based on edge segmentation and clustering analysis is executed by a processor, it implements the steps of the region partitioning method based on edge segmentation and clustering analysis as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Construction method of overground and underground integrated geological dynamic grid structure

    CN120236030A

  • Multi-level gridding deployment method, system and equipment based on hierarchical clustering division

    CN121920694A