Method and apparatus for dividing a ramp unit

By using spectral clustering to divide terrain micro-units into slope units, the problem of relying on expert experience and improper threshold settings in existing technologies is solved. This achieves automated and stable slope unit division with uniform slope and aspect, improving the efficiency and accuracy of geological disaster risk management.

CN117710666BActive Publication Date: 2026-08-04CHINA REINSURANCE (GROUP) CORPORATION +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA REINSURANCE (GROUP) CORPORATION
Filing Date
2023-11-30
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Existing slope cell division methods rely on expert experience. Improper threshold settings can lead to stringent or slack cell merging conditions, making automation difficult and obtaining slope cells with uniform slope and aspect.

Method used

The spectral clustering method is adopted, and the terrain micro-units are used as nodes in the graph. The graph is generated based on the adjacency relationship and slope similarity. The graph is divided into multiple subgraphs by spectral clustering, realizing the automatic division of slope units and ensuring that the similarity within the subgraph is maximized and the similarity between subgraphs is minimized.

Benefits of technology

It achieves automated and stable slope cell generation, reduces reliance on expert experience, obtains slope cells with relatively uniform slope and aspect, improves generation efficiency, and ensures cell independence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117710666B_ABST
    Figure CN117710666B_ABST
Patent Text Reader

Abstract

The application discloses a method and device for dividing slope units. A graph is generated based on the adjacency relationship between different terrain micro units in a plurality of terrain micro units and the slope direction and slope of each terrain micro unit. A node in the graph represents a terrain micro unit. An edge between different nodes in the graph represents the adjacency relationship between different terrain micro units. The weight of the edge in the graph represents the similarity of the slope direction and slope of the two terrain micro units corresponding to the edge. The graph is divided into a plurality of subgraphs by using a spectral clustering method based on the weight of the edge in the graph. The similarity of the edge between the plurality of subgraphs is minimum. The weight of the edge inside each subgraph in the plurality of subgraphs is maximum. The plurality of terrain micro units are divided into at least one slope unit based on the plurality of subgraphs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of geological disaster technology, specifically to a method and apparatus for dividing slope units. Background Technology

[0002] Slope units are an important foundation for geological disaster prevention and risk management. Large-scale slope units are complex and require a large amount of work to divide, so automatic division methods are needed for rapid division.

[0003] The methods for dividing slope units include extraction methods based on hydrological process analysis using forward and reverse Digital Elevation Models (DEMs), the curvature watershed method, the r.slopeunits method, and the multivariate index of aspect and hillshade units method for slope unit delination (MIA-HSU) method, which achieves relatively uniform slope and aspect in the division of topographic micro-units. The MIA-HSU method involves: calculating curvature, slope, and aspect based on topographic geomorphology; extracting ridges and valleys and dividing them into topographic micro-units based on image morphology; merging adjacent topographic micro-units with similar slope and aspect based on principal component analysis; and manually setting and continuously adjusting a threshold for the similarity of topographic micro-unit merging to achieve relatively uniform slope and aspect in the division of slope units.

[0004] When using the MIA-HSU method to divide slope elements, it is necessary to set a threshold for merging terrain micro-units and adjust it manually. If the threshold is set too small, the element merging conditions are too stringent, and not enough merged elements can be obtained; if the threshold is set too large, the element merging conditions are too loose, and it is not easy to obtain well-merged slope elements. In addition, the MIA-HSU method relies on expert experience. Summary of the Invention

[0005] This application provides a method and apparatus for dividing slope units, which can automatically divide slope units with relatively uniform slope and aspect, and automatically obtain better slope units by considering the adjacency relationship between terrain micro-units. The technical solution is as follows.

[0006] Firstly, a method for dividing slope elements is provided, the method comprising:

[0007] Based on the adjacency relationships between different terrain micro-units in multiple terrain micro-units and the aspect and slope of each terrain micro-unit, a graph is generated. The nodes in the graph represent terrain micro-units, the edges between different nodes in the graph represent the adjacency relationships between different terrain micro-units, and the weight of the edges in the graph represents the similarity of the aspect and slope of the two terrain micro-units corresponding to the edges.

[0008] Based on the weights of the edges in the graph, spectral clustering is used to divide the graph into multiple subgraphs. The similarity of edges between the multiple subgraphs is minimized, and the weight of the edges within each subgraph is maximized.

[0009] Based on the multiple sub-maps, the multiple terrain micro-units are divided into at least one slope unit.

[0010] In some implementations, the generation of the map based on the adjacency relationships between different terrain micro-units and the aspect and slope of each terrain micro-unit includes:

[0011] An adjacency matrix is ​​generated based on the adjacency relationship between different terrain micro-units. The first element value in the adjacency matrix is ​​used to identify that the terrain micro-unit corresponding to the row where the first element value is located has an adjacency relationship with the terrain micro-unit corresponding to the column where the first element value is located. The second element value in the adjacency matrix is ​​used to identify that the terrain micro-unit corresponding to the row where the second element value is located does not have an adjacency relationship with the terrain micro-unit corresponding to the column where the second element value is located.

[0012] A similarity matrix is ​​generated based on the aspect and slope of each terrain micro-unit, and the similarity matrix is ​​used to indicate the similarity of the aspect and slope of different terrain micro-units.

[0013] The adjacency matrix and the similarity matrix are multiplied by a dot to generate an adjacency similarity matrix representing the graph. The adjacency similarity matrix is ​​used to indicate the similarity of aspect and slope of terrain micro-units with adjacency relationships.

[0014] In some implementations, generating a similarity matrix based on the aspect and slope of each terrain micro-unit includes:

[0015] For each of the multiple terrain micro-units, the least squares method is used to fit the three-dimensional plane corresponding to each terrain micro-unit to obtain multiple fitted three-dimensional planes.

[0016] Calculate the normal vector of each fitted 3D plane, which is used to indicate the aspect and slope of the terrain micro-unit;

[0017] The cosine similarity between the normal vectors of each fitted 3D plane is determined to obtain the similarity matrix between every two terrain micro-units.

[0018] In some implementations, dividing the graph into multiple subgraphs using spectral clustering based on the edge weights in the graph includes: generating a Laplacian matrix based on the adjacency similarity matrix representing the graph; generating feature vectors of the Laplacian matrix according to the number of clusters, where the number of clusters is the number of ramp units to be divided; constructing a feature matrix composed of the feature vectors; and performing K-means clustering on the feature matrix to obtain multiple classes, each class corresponding to a subgraph.

[0019] In some implementations, dividing the multiple terrain micro-units into at least one slope unit based on the multiple sub-maps includes: assigning a corresponding category label to each class; and merging terrain micro-units with the same category label to obtain a slope unit.

[0020] In some implementations, before generating the map based on the adjacency relationship between different terrain micro-units in multiple terrain micro-units and the aspect and slope of each terrain micro-unit, the method further includes: dividing the digital elevation model into ridge areas and valley areas based on the average curvature of each grid in the digital elevation model, and constructing binary images of the ridge areas and valley areas.

[0021] Image morphology methods were used to extract the skeleton lines of the ridge area and the valley area, which were then used as ridge lines and valley lines.

[0022] Starting from each vertices of each ridgeline and each branch of each valley line, connect the ridgelines and valley lines as close as possible to form closed terrain micro-units.

[0023] Secondly, a device for dividing slope units is provided, the device comprising:

[0024] A generation unit is used to generate a map based on the adjacency relationship between different terrain micro-units in multiple terrain micro-units and the aspect and slope of each terrain micro-unit. The nodes in the map represent terrain micro-units, the edges between different nodes in the map represent the adjacency relationship between different terrain micro-units, and the weight of the edge in the map represents the similarity of the aspect and slope of the two terrain micro-units corresponding to the edge.

[0025] A partitioning unit is used to divide the graph into multiple subgraphs based on the weights of the edges in the graph using spectral clustering, wherein the similarity of the edges between the multiple subgraphs is minimized and the weight of the edges within each of the multiple subgraphs is maximized; and the multiple terrain micro-units are divided into at least one slope unit based on the multiple subgraphs.

[0026] In some implementations, the generating unit is configured to generate an adjacency matrix based on the adjacency relationships between different terrain micro-units. A first element value in the adjacency matrix indicates that the terrain micro-unit in the row containing the first element value is adjacent to the terrain micro-unit in the column containing the first element value. A second element value in the adjacency matrix indicates that the terrain micro-unit in the row containing the second element value is not adjacent to the terrain micro-unit in the column containing the second element value. A similarity matrix is ​​generated based on the aspect and slope of each terrain micro-unit. The similarity matrix indicates the similarity of the aspect and slope of different terrain micro-units. A dot product is performed on the adjacency matrix and the similarity matrix to generate an adjacency similarity matrix representing the graph. The adjacency similarity matrix indicates the similarity of the aspect and slope of terrain micro-units with adjacency relationships.

[0027] In some embodiments, the generating unit is configured to, for each of the plurality of terrain micro-units, fit a three-dimensional plane corresponding to each terrain micro-unit using the least squares method to obtain a plurality of fitted three-dimensional planes; calculate the normal vector of each fitted three-dimensional plane, the normal vector of the fitted three-dimensional plane being used to indicate the slope aspect and slope of the terrain micro-unit; and determine the cosine similarity between the normal vectors of each fitted three-dimensional plane to obtain a similarity matrix between every two terrain micro-units.

[0028] In some implementations, the partitioning unit is used to generate a Laplacian matrix based on an adjacency similarity matrix representing the graph; generate eigenvectors of the Laplacian matrix according to the number of clusters, where the number of clusters is the number of ramp units to be partitioned; construct a feature matrix composed of the eigenvectors; and perform K-means clustering on the feature matrix to obtain multiple classes, each class corresponding to a subgraph.

[0029] In some implementations, the partitioning unit is used to assign a corresponding category label to each class; terrain micro-units with the same category label are merged to obtain slope units.

[0030] In some implementations, the partitioning unit is used to divide the digital elevation model into ridge regions and valley regions based on the average curvature of each grid in the digital elevation model, and construct binary images of the ridge regions and valley regions; the skeleton lines of the ridge regions and valley regions are extracted using image morphology methods as ridge lines and valley lines; and the ridge lines and valley lines are connected as close as possible to each branch vertex of each ridge line and each valley line to form closed terrain micro-units.

[0031] Thirdly, a computing device is provided, comprising a processor coupled to a memory storing at least one computer program instruction, the at least one computer program instruction being loaded and executed by the processor to enable the computing device to implement the method provided by the first aspect or any alternative embodiment of the first aspect. Specific details of the computing device provided in the third aspect can be found in the first aspect or any alternative embodiment of the first aspect, and will not be repeated here.

[0032] Fourthly, a computer-readable storage medium is provided, which stores at least one instruction that, when executed on a computer, causes the computer to perform the method provided in the first aspect or any alternative method of the first aspect.

[0033] Fifthly, a computer program product is provided, the computer program product comprising one or more computer program instructions, which, when loaded and run by a computer, cause the computer to perform the method provided in the first aspect or any alternative method of the first aspect.

[0034] In a sixth aspect, a chip is provided, including a memory and a processor, the memory for storing computer instructions, and the processor for calling and executing the computer instructions from the memory to perform the methods described in the first aspect and any possible implementation thereof.

[0035] Therefore, the embodiments of this application have the following beneficial effects:

[0036] This embodiment of the application treats terrain micro-units as nodes in the graph, and the adjacency between terrain micro-units as edges between vertices. The cosine value of the plane normal vector of adjacent terrain micro-units is used to indicate the similarity of slope and aspect between terrain micro-units. The terrain micro-unit clustering process in the automatic division of slope units is transformed into the optimal subgraph division process in the graph. That is, similar terrain micro-units are merged by dividing terrain micro-units with large differences in slope and / or aspect. Since the adjacency relationship between terrain micro-units is taken into account, enclaves will not be formed.

[0037] Furthermore, it can automatically divide slope elements, thereby improving the efficiency of slope element division and effectively obtaining better slope element division results automatically, reducing the dependence of the MIA-HSU method on expert experience.

[0038] Furthermore, since the slope units are divided based on the similarity of the slope and aspect of the terrain micro-units, the slope aspect and slope of the slope units are relatively uniform. Attached Figure Description

[0039] Figure 1This is a schematic diagram illustrating the technical principle of dividing slope elements according to an embodiment of this application;

[0040] Figure 2 This is a flowchart of a method for slope element division provided in an embodiment of this application;

[0041] Figure 3 This application provides a schematic diagram of the structure of a device for dividing ramp elements according to an embodiment;

[0042] Figure 4 This application provides a schematic diagram of the structure of a computing device. Detailed Implementation

[0043] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0044] The embodiments of this application provide automatically divided, stable, and relatively uniform slope units with slope and aspect for geological disaster risk management, especially for the quantification of geological disaster risks in a catastrophic insurance actuarial model.

[0045] Currently, when using the MIA-HSU method to delineate slope units, the extraction results are affected by a manually set similarity threshold for merging terrain micro-units. Furthermore, there is a lack of simple and easy-to-implement methods for optimizing the extraction results. Additionally, the need to adjust the similarity threshold results in low automation.

[0046] In view of this, this application provides an automatic slope unit division method based on spectral theory, which provides automatically divided, stable, and relatively uniform slope units with slope angle and aspect for geological disaster risk management, especially for geological disaster risk quantification in catastrophic insurance actuarial models. Slope units are an important foundation for geological disaster prevention and risk management. Large-scale slope units are complex due to terrain, and the division workload is large, requiring an automatic division method for rapid division. In addition, since insurance payouts are based on events, the geological disaster risk quantification in catastrophic insurance actuarial models requires the clear definition of landslide events. Events should be independent of each other. Slope unit division can help separate geological disaster events, with geological disasters occurring in different slope units belonging to different disaster events, thereby ensuring the independence between events.

[0047] For regional landslide assessment or prediction methods based on mechanical concepts, the landslide analysis models used (infinite slope model, limit equilibrium theory, finite element method, etc.) are all based on the theory of continuous media. Since landslide bodies are heterogeneous, some reasonable simplifications are usually required during landslide analysis. This involves assuming that the analyzed slope has uniform slope, aspect, and mechanical parameters; in other words, the slope element itself must also satisfy the basic assumption of homogeneity.

[0048] The optimal partitioning criterion of graph partitioning theory is highly consistent with the idea of ​​merging terrain micro-units into slope units. For example, each terrain micro-unit can be regarded as a vertex V in the graph, and the adjacency between terrain micro-units is represented by the edge E between each vertex. The cosine value of the plane normal vector of each adjacent terrain micro-unit describes the similarity of slope and aspect between terrain micro-units, and serves as the weight W of edge E. In this way, all terrain micro-units can be regarded as an undirected weighted graph G = (V, E) based on similarity, and the process of partitioning slope units can be equivalent to a graph partitioning problem on graph G. The optimal partitioning criterion based on graph theory is to maximize the similarity within the partitioned subgraphs and minimize the similarity between subgraphs. Therefore, the terrain micro-unit clustering problem in the automatic partitioning of slope units is transformed into the optimal subgraph partitioning problem of graph G, or it can be understood as merging similar terrain micro-units by dividing terrain micro-units with large differences in slope and / or aspect.

[0049] For example, please refer to Figure 1 , Figure 1 This illustrates the technical principle of dividing slope elements. Figure 1 In this context, a, b, c, d, and e represent five terrain micro-units. Based on... Figure 1 Spectral clustering can be used to group multiple terrain micro-units with similar topographic features into the same slope unit. Specifically, if two terrain micro-units are adjacent and have similar slope aspect and gradient, they can be merged to create a slope unit. For example, nodes in the graph represent terrain micro-units, edges between nodes represent the adjacency between any two terrain micro-units, and edge weights represent the similarity in slope aspect and gradient between the two terrain micro-units corresponding to the edge. For instance, the cosine similarity of the normal vectors of the two fitted planes corresponding to two terrain micro-units can be used as the edge weight. After constructing the graph, it is segmented into subgraphs according to graph theory, maximizing the edge weights within each subgraph and minimizing the edge weights between any two different subgraphs, thus creating multiple subgraphs, each representing a slope unit, thereby achieving the clustering of terrain micro-units into slope units. Figure 1 As shown, during the subgraph partitioning process, the edges inside terrain micro-units a, b, and c have the highest weights, as do the edges inside terrain micro-units d and e. The edges between the subgraph containing terrain micro-units a, b, and c and the subgraph containing terrain micro-units d and e have the lowest weights. Therefore, terrain micro-units a, b, and c are assigned to the first slope unit, and terrain micro-units d and e are assigned to the second slope unit.

[0050] Due to the nature of the graph partitioning problem, finding the optimal solution is an NP-complete (NP) difficult problem. A good approach is to consider a continuously relaxed form of the problem, which transforms the original problem into solving the spectral decomposition of similarity matrices or Laplacian matrices. Therefore, this type of method is collectively referred to as spectral clustering.

[0051] Using spectral clustering to solve the practical problem of slope unit division has several advantages: (1) The construction of the similarity matrix in the spectral clustering algorithm is one of the difficulties of this type of algorithm. Since the difference in the normal vectors between terrain micro-units is used to represent the similarity, the construction of the similarity matrix has a clear physical meaning. (2) The determination of the number of clusters in the spectral clustering algorithm is another difficulty of this algorithm. In the work of geological disaster prevention and control, the division of slope units at different scales generally specifies the range of unit area. Based on the area of ​​the units to be divided according to need, the approximate number of slope units can be determined. (3) Existing methods for automatic division of slope units lack simple and easy-to-implement optimization steps for extracting results. By cutting the edges in the map transformed from terrain micro-units, the function of adjusting the details of the extracted results can be realized. In addition, through this method, the geological unit boundaries in the regional geological map can also be introduced into the process of constructing terrain micro-units, and then the relevant edges can be cut during the construction process to realize the division of slope units considering the geological map.

[0052] Appendix Figure 2 This is a flowchart illustrating a method for slope element generation provided in an embodiment of this application. (Attached) Figure 2 The method shown includes the MIA step and the slope unit spectrum clustering step. Figure 2 The illustrated embodiments can be applied to computing devices, such as personal computers (PCs), servers, laptops, tablets, or mobile phones.

[0053] MIA Steps

[0054] Step S210: Read the Digital Elevation Model (DEM).

[0055] A DEM is a digital representation of a topographic map. A DEM contains multiple grids, each labeled with its corresponding elevation. A topographic micro-unit comprises several grids within a DEM; a topographic micro-unit can be understood as a closed area within a DEM extending from a ridgeline to a valleyline.

[0056] Step S211: Calculate the average curvature of all grids, and divide the ridge area and valley area according to the average curvature of each grid, and construct the binary image of the ridge area and valley area.

[0057] For example, ridges and valleys correspond to high and low values ​​of curvature, respectively. Ridges are the raised parts of the terrain, and their curvature is positive; while valleys are the concave parts of the terrain, and their curvature is negative. By determining the sign of the average curvature of each grid cell, the boundaries of ridges and valleys can be accurately defined.

[0058] Step S212: Use image morphology methods to extract the skeleton lines of the ridge area and the valley area as ridge lines and valley lines.

[0059] Step S213: Search for all branch vertices of the ridgeline and valleyline.

[0060] Step S214: Starting from each branch vertex of each ridgeline and each valley line, connect the ridgelines and valley lines as close as possible to form closed terrain micro-units.

[0061] Step S215: Label the connected components for each terrain micro-unit.

[0062] By labeling each terrain micro-unit with its connected components, the connectivity within each micro-unit is identified. For example, the same micro-unit label is added to each cell within the same micro-unit, while different labels are added to cells in different micro-units, thus identifying the micro-unit to which each cell belongs and distinguishing the micro-units to which different cells belong. For example, please refer to... Figure 1 Add a terrain micro-unit label 'a' to each grid cell inside terrain micro-unit 'a', thereby identifying that each grid cell inside terrain micro-unit 'a' is located in terrain micro-unit 'a'. Add a terrain micro-unit label 'b' to each grid cell inside terrain micro-unit 'b', thereby identifying that each grid cell inside terrain micro-unit 'b' is located in terrain micro-unit 'b'.

[0063] Step S216: For each terrain micro-unit, fit a three-dimensional plane using the least squares method.

[0064] For example, for each terrain micro-unit, a set of grids contained in the terrain micro-unit is fitted based on the least squares method to obtain a plane that can approximate the distribution of these grids.

[0065] Step S217: Calculate the normal vector of the fitted three-dimensional plane of the terrain micro-unit.

[0066] The normal vector of the fitted plane is used to indicate the aspect and slope of the terrain micro-units. For example, the normal vector of the fitted plane has three components, representing the east-west, north-south, and vertical directions. The aspect is the ratio of the two horizontal components of the normal vector, i.e., the reciprocal of the sine of the included angle; while the slope is the ratio of the vertical component of the normal vector to the overall vector, and then the arctangent. Therefore, by fitting the normal vector of a three-dimensional plane, we can more clearly express the aspect and slope information of the terrain.

[0067] Slope unit spectral clustering steps

[0068] Step S220: Based on the normal vector of the fitted three-dimensional plane of the terrain micro-unit, generate the similarity matrix B between the terrain micro-units.

[0069] For example, a similarity matrix can be obtained by determining the cosine similarity between the normal vectors of the fitted 3D planes corresponding to any two terrain micro-units. The similarity matrix B indicates the similarity of aspect and slope between terrain micro-units. For example, the larger the element value in the similarity matrix, the more similar the aspect and slope of the two terrain micro-units corresponding to that element value. For instance, the element value in the i-th row and j-th column of the similarity matrix is ​​the cosine similarity between the normal vector of the fitted 3D plane of the i-th terrain micro-unit in the i-th row and the normal vector of the fitted 3D plane of the j-th terrain micro-unit in the j-th column. Of course, other methods for determining normal vector similarity besides cosine similarity can also be used to construct the similarity matrix.

[0070] For example, if two terrain micro-units are adjacent but located on opposite sides of a ridgeline, and their slope aspects differ greatly, the normal vectors of the fitted 3D planes corresponding to the two terrain micro-units will differ significantly. Consequently, the cosine similarity between the normal vectors of the fitted 3D planes corresponding to the two terrain micro-units will be relatively small, resulting in smaller weight values ​​for the edges corresponding to the two terrain micro-units in the graph.

[0071] Step S221: Determine the neighboring units of each terrain micro-unit. Specifically, perform two 4-connected dilation operations on the binary image of each terrain micro-unit. The other terrain micro-units covered by this dilation are the neighboring units.

[0072] Step S222: Generate an adjacency matrix A based on the adjacency relationships between terrain micro-units.

[0073] The adjacency matrix A is used to indicate the adjacency relationships between terrain micro-units. Specifically, each element of the adjacency matrix A indicates whether the terrain micro-unit in the row containing that element is adjacent to the terrain micro-unit in the column containing that element. For example, if the first terrain micro-unit and the second terrain micro-unit are adjacent, then the first element value exists in the row corresponding to the first terrain micro-unit and the column corresponding to the second terrain micro-unit in the adjacency matrix A; if the first terrain micro-unit and the second terrain micro-unit are not adjacent, then the second element value exists in the row corresponding to the first terrain micro-unit and the column corresponding to the second terrain micro-unit in the adjacency matrix A. Taking the method of using 1 to indicate adjacency and 0 to indicate non-adjacency as an example, the adjacency matrix A is, for example, a binary matrix. If terrain micro-unit i and terrain micro-unit j are adjacent, then the element (i,j) in the i-th row and j-th column of the adjacency matrix A is 1; if terrain micro-unit i and terrain micro-unit j are not adjacent, then the element (i,j) in the i-th row and j-th column of the adjacency matrix A is 0.

[0074] by Figure 1 For example, for instance, regarding Figure 1 The scene shown contains five terrain micro-units: terrain micro-unit a, terrain micro-unit b, terrain micro-unit c, terrain micro-unit d, and terrain micro-unit e. The constructed adjacency matrix A is a 5x5 matrix, where each of the five rows and five columns corresponds to one of the five terrain micro-units. Terrain micro-units a and b are adjacent, while terrain micro-units a and e are not adjacent. The elements in the row corresponding to terrain micro-unit a and the column corresponding to terrain micro-unit b are all 1. The elements in the row corresponding to terrain micro-unit a and the column corresponding to terrain micro-unit e are all 0.

[0075] Step S223: Perform a dot product on the adjacency matrix A and the similarity matrix B to generate an adjacency similarity matrix.

[0076] Constructing an adjacency similarity matrix is ​​equivalent to constructing a graph. The adjacency similarity matrix indicates the similarity of aspect and slope among adjacent terrain micro-units. Each element of the adjacency similarity matrix represents the cosine similarity of the normal vectors of the fitted 3D plane containing the adjacent terrain micro-units. Each element of the adjacency similarity matrix is ​​the weight of an edge in the graph.

[0077] For example, if the i-th terrain micro-unit and the j-th terrain micro-unit are not adjacent, then the element value of the i-th row and j-th column in the adjacency matrix A is the first element value (0). Then the element value of the i-th row and j-th column in the similarity matrix B is the cosine similarity of the normal vector between the fitted 3D plane corresponding to the i-th terrain micro-unit and the fitted 3D plane corresponding to the j-th terrain micro-unit. After the element value of the i-th row and j-th column in the similarity matrix B is multiplied by the first element value (0) of the i-th row and j-th column in the adjacency similarity matrix, since the result of 0 multiplied by any value is 0, the element value of the i-th row and j-th column in the adjacency similarity matrix is ​​the first element value (0). If the i-th terrain micro-unit and the j-th terrain micro-unit are not adjacent, then the element value of the i-th row and j-th column in the adjacency matrix A is the second element value (1). Then the element value of the i-th row and j-th column in the similarity matrix B is the normal vector cosine similarity between the fitted 3D plane corresponding to the i-th terrain micro-unit and the fitted 3D plane corresponding to the j-th terrain micro-unit. After the element value of the i-th row and j-th column in the similarity matrix B is multiplied by the second element value of the i-th row and j-th column in the adjacency similarity matrix (1), the element value of the i-th row and j-th column in the adjacency similarity matrix is ​​the normal vector cosine similarity.

[0078] Step S224: Calculate the Laplacian matrix based on the adjacency similarity matrix.

[0079] Step S225: Calculate the eigenvalues ​​and eigenvectors of the Laplacian matrix based on the predetermined number of clusters.

[0080] The number of clusters can be, for example, the number of slope units to be divided. The number of clusters is set based on the requirements of geological hazard risk management. For example, the number of clusters is the ratio between the area of ​​the geological hazard control area and the area of ​​the slope unit. Taking the common 1:10,000 geological hazard risk management as an example, the slope unit needs to be about 0.2 km2. The number of clusters can be obtained by dividing the total area of ​​the region by 0.2 km2.

[0081] Step S226: Construct a feature matrix composed of feature vectors.

[0082] Step S227: Perform K-means clustering on the feature matrix to obtain multiple classes, and assign a corresponding class label to each class.

[0083] Category labels are used to identify slope units. The same slope unit has the same category label, while different slope units have different category labels. Figure 1Taking the scenario shown as an example, for terrain micro-units a, b, and c, based on the fact that terrain micro-units a, b, and c belong to the same class, category label 1 is assigned to terrain micro-units a, b, and c. Category label 1 is used to identify the first slope unit. Category label 1 is added to each grid in terrain micro-unit a, each grid in terrain micro-unit b, and each grid in terrain micro-unit c. For terrain micro-units d and e, based on the fact that terrain micro-units d and e belong to the same class, category label 2 is assigned to terrain micro-units d and e. Category label 2 is used to identify the first slope unit. Category label 2 is added to each grid in terrain micro-unit d and each grid in terrain micro-unit e.

[0084] Step S228: According to the clustering results, the terrain micro-units with the same category label are merged to form slope units.

[0085] For example, if two terrain micro-units have similar slopes and aspects, the corresponding edges between them on the graph have relatively large weights. Therefore, during clustering, these two terrain micro-units are assigned the same category label, thus classifying them into the same slope unit. If two terrain micro-units have significantly different slopes and aspects, the corresponding edges between them on the graph have relatively small weights. Therefore, during clustering, these two terrain micro-units are assigned different category labels, thus classifying them into two different slope units.

[0086] The method provided in this embodiment treats terrain micro-units as graphs, and divides terrain micro-units into slope units, which is transformed into dividing the graph into subgraphs. The graph is divided into subgraphs by using the optimal partitioning criterion based on graph theory (maximum similarity within subgraphs and minimum similarity between subgraphs), thereby automatically dividing slope units with relatively uniform slope and aspect.

[0087] Furthermore, since the number of clusters is the set number of slope units to be divided, the number of clusters is stable. A better division method is obtained through the spectral clustering process. There is no need to manually adjust the similarity threshold between the terrain micro-units required for merging, nor is it necessary to adjust the area of ​​the largest and smallest slope units. A stable and better fixed number of slope units can be obtained. Therefore, compared with the MIA-HSU method, this embodiment can obtain stable slope unit division results and can divide slope units according to the number of slope units required for geological disaster risk management.

[0088] Furthermore, it offers a relatively simple result adjustment function by adjusting the adjacency similarity matrix. For example, if expert experience suggests that two terrain micro-units are adjacent but should not be classified into the same slope unit, the weights of the corresponding edges of the two terrain micro-units in the graph can be set to 0, preventing the device from classifying the two terrain micro-units into the same slope unit.

[0089] Figure 3 This is a schematic diagram of a ramp unit dividing device 300 provided in an embodiment of this application. The device 300 includes:

[0090] The generation unit 310 is used to generate a map based on the adjacency relationship between different terrain micro-units in multiple terrain micro-units and the aspect and slope of each terrain micro-unit. The nodes in the map represent terrain micro-units, the edges between different nodes in the map represent the adjacency relationship between different terrain micro-units, and the weight of the edge in the map represents the similarity of the aspect and slope of the two terrain micro-units corresponding to the edge.

[0091] The partitioning unit 320 is used to divide the graph into multiple subgraphs based on the weights of the edges in the graph using spectral clustering, wherein the similarity of the edges between the multiple subgraphs is minimized and the weight of the edges within each of the multiple subgraphs is maximized; and the multiple terrain micro-units are divided into at least one slope unit based on the multiple subgraphs.

[0092] In some embodiments, the generation unit 310 is configured to generate an adjacency matrix based on the adjacency relationships between different terrain micro-units. A first element value in the adjacency matrix indicates that the terrain micro-unit in the row containing the first element value is adjacent to the terrain micro-unit in the column containing the first element value. A second element value in the adjacency matrix indicates that the terrain micro-unit in the row containing the second element value is not adjacent to the terrain micro-unit in the column containing the second element value. A similarity matrix is ​​generated based on the aspect and slope of each terrain micro-unit. The similarity matrix indicates the similarity of the aspect and slope of different terrain micro-units. A dot product is performed on the adjacency matrix and the similarity matrix to generate an adjacency similarity matrix representing the graph. The adjacency similarity matrix indicates the similarity of the aspect and slope of terrain micro-units with adjacency relationships.

[0093] In some embodiments, the generation unit 310 is configured to, for each of the plurality of terrain micro-units, fit a three-dimensional plane corresponding to each terrain micro-unit using the least squares method to obtain a plurality of fitted three-dimensional planes; calculate the normal vector of each fitted three-dimensional plane, wherein the normal vector of the fitted three-dimensional plane is used to indicate the slope aspect and slope of the terrain micro-unit; and determine the cosine similarity between the normal vectors of each fitted three-dimensional plane to obtain a similarity matrix between every two terrain micro-units.

[0094] In some embodiments, the partitioning unit 320 is configured to generate a Laplacian matrix based on an adjacency similarity matrix representing the graph; generate eigenvectors of the Laplacian matrix according to the number of clusters, wherein the number of clusters is the number of ramp units to be partitioned; construct a feature matrix composed of the eigenvectors; and perform K-means clustering on the feature matrix to obtain multiple classes, each class corresponding to a subgraph.

[0095] In some implementations, the partitioning unit 320 is used to assign a corresponding category label to each class; and to merge terrain micro-units with the same category label to obtain slope units.

[0096] In some implementations, the partitioning unit 320 is used to divide the digital elevation model into ridge regions and valley regions based on the average curvature of each grid in the digital elevation model, and construct binary images of the ridge regions and valley regions; extract the skeleton lines of the ridge regions and valley regions using image morphology methods, as ridge lines and valley lines; and connect the ridge lines and valley lines as close as possible to each branch vertex of each ridge line and each valley line, forming closed terrain micro-units.

[0097] Figure 4 This application provides a schematic diagram of the structure of a computing device 800, which includes a processor 801 coupled to a memory 802. The memory 802 stores at least one computer program instruction, which is loaded and executed by the processor 801 to enable the computing device 800 to perform the aforementioned functions. Figure 2 The methods provided.

[0098] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0099] A references B, which means that A is the same as B or A is a simple variation of B.

[0100] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects, and should not be construed as indicating or implying relative importance. For example, "first objective function" and "second objective function" are used to distinguish different objective functions, not to describe a specific order of objective functions, and should not be construed as the first objective function being more important than the second objective function.

[0101] In this application, unless otherwise stated, "at least one" means one or more, and "multiple" means two or more. For example, multiple objective functions refer to two or more objective functions.

[0102] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, they can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).

[0103] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method for dividing slope elements, characterized in that, The method includes: Based on the adjacency relationships between different terrain micro-units in multiple terrain micro-units and the aspect and slope of each terrain micro-unit, a graph is generated. The nodes in the graph represent terrain micro-units, the edges between different nodes in the graph represent the adjacency relationships between different terrain micro-units, and the weight of the edges in the graph represents the similarity of the aspect and slope of the two terrain micro-units corresponding to the edges. Based on the weights of the edges in the graph, spectral clustering is used to divide the graph into multiple subgraphs. The similarity of edges between the multiple subgraphs is minimized, and the weight of the edges within each subgraph is maximized. Based on the multiple sub-maps, the multiple terrain micro-units are divided into at least one slope unit.

2. The method according to claim 1, characterized in that, The method for generating a map based on the adjacency relationships between different terrain micro-units and the slope aspect and slope of each terrain micro-unit includes: An adjacency matrix is ​​generated based on the adjacency relationship between different terrain micro-units. The first element value in the adjacency matrix is ​​used to identify that the terrain micro-unit corresponding to the row where the first element value is located has an adjacency relationship with the terrain micro-unit corresponding to the column where the first element value is located. The second element value in the adjacency matrix is ​​used to identify that the terrain micro-unit corresponding to the row where the second element value is located has no adjacency relationship with the terrain micro-unit corresponding to the column where the second element value is located. A similarity matrix is ​​generated based on the aspect and slope of each terrain micro-unit, and the similarity matrix is ​​used to indicate the similarity of the aspect and slope of different terrain micro-units. The adjacency matrix and the similarity matrix are multiplied by a dot to generate an adjacency similarity matrix representing the graph. The adjacency similarity matrix is ​​used to indicate the similarity of aspect and slope of terrain micro-units with adjacency relationships.

3. The method according to claim 2, characterized in that, The generation of a similarity matrix based on the aspect and slope of each terrain micro-unit includes: For each of the multiple terrain micro-units, the least squares method is used to fit the three-dimensional plane corresponding to each terrain micro-unit to obtain multiple fitted three-dimensional planes. Calculate the normal vector of each fitted 3D plane, which is used to indicate the aspect and slope of the terrain micro-unit; The cosine similarity between the normal vectors of each fitted 3D plane is determined to obtain the similarity matrix between every two terrain micro-units.

4. The method according to claim 1, characterized in that, The graph is divided into multiple subgraphs using spectral clustering based on the edge weights, including: A Laplacian matrix is ​​generated based on the adjacency similarity matrix representing the graph; The eigenvectors of the Laplacian matrix are generated based on the number of clusters, where the number of clusters is the number of slope units to be divided. Construct a feature matrix composed of the feature vectors; K-means clustering is performed on the feature matrix to obtain multiple classes, each corresponding to a subgraph.

5. The method according to claim 4, characterized in that, The process of dividing the multiple terrain micro-units into at least one slope unit based on the multiple sub-maps includes: Assign a corresponding category label to each class; Terrain micro-units with the same category label are merged to obtain slope units.

6. The method according to claim 1, characterized in that, Before generating the map based on the adjacency relationships between different terrain micro-units and the aspect and slope of each terrain micro-unit, the method further includes: Based on the average curvature of each grid in the digital elevation model, the digital elevation model is divided into ridge areas and valley areas, and binary images of the ridge areas and valley areas are constructed. Image morphology methods were used to extract the skeleton lines of the ridge area and the valley area, which were then used as ridge lines and valley lines. Starting from each vertices of each ridgeline and each branch of each valley line, connect the ridgelines and valley lines as close as possible to form closed terrain micro-units.

7. A device for dividing slope units, characterized in that, The device includes: A generation unit is used to generate a map based on the adjacency relationship between different terrain micro-units in multiple terrain micro-units and the aspect and slope of each terrain micro-unit. The nodes in the map represent terrain micro-units, the edges between different nodes in the map represent the adjacency relationship between different terrain micro-units, and the weight of the edge in the map represents the similarity of the aspect and slope of the two terrain micro-units corresponding to the edge. A partitioning unit is used to divide the graph into multiple subgraphs based on the weights of the edges in the graph using spectral clustering, wherein the similarity of the edges between the multiple subgraphs is minimized and the weight of the edges within each of the multiple subgraphs is maximized; and the multiple terrain micro-units are divided into at least one slope unit based on the multiple subgraphs.

8. The apparatus according to claim 7, characterized in that, The generation unit is used to generate an adjacency matrix based on the adjacency relationships between different terrain micro-units. A first element value in the adjacency matrix indicates that the terrain micro-unit in the row containing the first element value is adjacent to the terrain micro-unit in the column containing the first element value. A second element value in the adjacency matrix indicates that the terrain micro-unit in the row containing the second element value is not adjacent to the terrain micro-unit in the column containing the second element value. A similarity matrix is ​​generated based on the aspect and slope of each terrain micro-unit. The similarity matrix indicates the similarity of the aspect and slope of different terrain micro-units. A dot product is performed on the adjacency matrix and the similarity matrix to generate an adjacency similarity matrix representing the graph. The adjacency similarity matrix indicates the similarity of the aspect and slope of terrain micro-units with adjacency relationships.

9. The apparatus according to claim 8, characterized in that, The generation unit is used to fit the three-dimensional plane corresponding to each of the multiple terrain micro-units using the least squares method to obtain multiple fitted three-dimensional planes. Calculate the normal vector of each fitted 3D plane, which is used to indicate the aspect and slope of the terrain micro-unit; The cosine similarity between the normal vectors of each fitted 3D plane is determined to obtain the similarity matrix between every two terrain micro-units.

10. A computing device, characterized in that, The computing device includes: a processor coupled to a memory, the memory storing at least one computer program instruction, the at least one computer program instruction being loaded and executed by the processor to enable the computing device to implement the method of any one of claims 1-6.