Spatial constraint integrated raster data spectral clustering method and system

By imposing spatial constraints and similarity threshold pruning in the spectral clustering algorithm, the problem of poor spatial continuity of the traditional spectral clustering algorithm in raster data processing is solved, and efficient clustering results with spatial continuity and attribute similarity are achieved.

CN120744556AActive Publication Date: 2025-10-03BEIJING NORMAL UNIVERSITY
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510659718.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2025-10-03
Estimated Expiration
2045-05-21

AI Technical Summary

Technical Problem

Traditional spectral clustering algorithms fail to effectively combine spatial features when processing raster data, resulting in poor spatial continuity of clustering results and high computational complexity.

Method used

When creating the similarity graph between data nodes, spatial constraints are imposed, the elbow rule is used to determine the similarity threshold, edges with less similarity are deleted, and the amount of spectral clustering calculation is reduced by pruning the similarity matrix, which is then input into the spectral clustering algorithm for clustering.

Benefits of technology

The spatial continuity and attribute similarity of raster data clustering results are improved, the amount of spectral clustering operations is reduced, and the computational efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744556A_ABST
    Figure CN120744556A_ABST
Patent Text Reader

Abstract

The invention provides a raster data spectral clustering method and system integrating spatial constraints. The method comprises the following steps: acquiring different attribute layers of raster data to be classified; determining a clustering number based on the attribute layer, clustering the raster data through a preset algorithm, and calculating a similarity threshold; constructing a clustering network and generating an initial similar matrix based on the similarity threshold according to the grid attributes and the spatial adjacency relationship; reducing a similar graph constructed by the initial similar matrix and removing abnormal nodes to obtain a pruned similar matrix; and inputting the trimmed similar matrix as a parameter into a preset spectral clustering algorithm for clustering to obtain a clustering result. On the basis of an original spectral clustering method, when a similar graph between data nodes is created, spatial constraint is applied to obtain a similarity threshold value, edges with small similarity are deleted to reduce the spectral clustering operand, the defect that an existing spectral clustering method cannot consider spatial continuity is overcome, and the spectral clustering efficiency is improved. And the spatial continuity and the attribute similarity of the raster data clustering result are considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of spatial data processing technology, and in particular to a raster data spectral clustering method and system integrating spatial constraints. Background Art

[0002] Spatial clustering, also known as spatial partitioning, is a traditional research topic in geography. It not only reveals common processes and characteristics within clusters but also highlights differences between clusters, imbuing new clusters with richer geographical meaning and providing a foundation for further integrative research. In spatial clustering methods, spatial units with similar attributes are grouped into the same cluster, and spatial continuity constraints are imposed to ensure the accuracy of clustering results. This constraint can be strict, requiring spatial continuity of the units within a cluster, or loose, requiring only that a majority of the units be continuous. However, the weighting of geographic coordinates or location dissimilarity is crucial for the impact of clustering results. Excessively large location weights may lead to extreme attribute differences in clustering results, while too small location weights may result in spatially dispersed clustering results with poor continuity.

[0003] Spectral clustering is an unsupervised clustering algorithm based on graph theory. It achieves data clustering by representing data samples as nodes on a graph and clustering them on the graph. Specifically, spectral clustering treats data samples as nodes on a graph and represents their similarities as the edge weights between nodes. It then computes the Laplacian matrix of this graph and obtains clustering results by performing eigendecomposition on the Laplacian matrix. Spectral clustering not only effectively handles non-convex and complex data clusters but also exhibits good scalability when processing large datasets. Furthermore, because it is based on graph theory, spectral clustering can naturally handle complex scenarios such as weighted graphs, noisy datasets, and multi-view datasets. Traditional spectral clustering algorithms, when constructing similarity graphs for spatially characterized sample data, only consider the attribute relationships of the sample data and ignore the spatial characteristics of the data itself. As a result, their clustering results fail to reflect the spatial relationships between the study objects. Furthermore, when processing large-scale raster data, the similarity graph becomes extremely large, making further clustering difficult.

[0004] In summary, combining the advantages of spatial clustering algorithm and spectral clustering algorithm, a raster data spectral clustering method with integrated spatial constraints is studied and proposed for raster data. It is of great significance for revealing the spatial clustering characteristics of the multidimensional attributes of the research object expressed based on the raster data model. Summary of the Invention

[0005] The present invention provides a raster data spectral clustering method and system with integrated spatial constraints. Based on the original spectral clustering method, spatial constraints are imposed when creating a similarity graph between data nodes, and the elbow rule is used to obtain a similarity threshold. The threshold is used to simplify the similarity graph, and edges with less similarity are deleted to reduce the amount of spectral clustering calculations. Ultimately, the defect of the existing spectral clustering method that cannot take into account spatial continuity is improved, and both spatial continuity and attribute similarity of the raster data clustering results are taken into account.

[0006] The present invention provides a raster data spectral clustering method integrating spatial constraints, comprising: Get different attribute layers of the raster data to be classified; Determine the number of clusters based on the attribute layer, cluster the raster data using a preset algorithm, and calculate the similarity threshold; Based on the similarity threshold, a clustering network is constructed according to grid attributes and spatial adjacency relationships and an initial similarity matrix is ​​generated; Reducing the similarity graph constructed by the initial similarity matrix and removing abnormal nodes to obtain a pruned similarity matrix; The pruned similarity matrix is ​​input as a parameter into the preset spectral clustering algorithm for clustering to obtain the clustering results.

[0007] According to a raster data spectral clustering method with integrated spatial constraints provided by the present invention, obtaining different attribute layers of the raster data to be classified specifically includes: Obtain input raster data, which should be located in the same area and have the same number of rows and columns; The size of the three-dimensional matrix representing the raster is determined based on the different attribute layers of the raster data to be classified.

[0008] According to a raster data spectral clustering method with integrated spatial constraints provided by the present invention, the method determines the number of clusters based on the attribute layer, clusters the raster data using a preset algorithm, and calculates the similarity threshold, specifically including: Get the number of clusters based on the specified attribute layer or through a preset algorithm; Based on the number of clusters The algorithm clusters the raster data to obtain different clusters, calculates the similarity between all elements in each cluster, and determines the similarity threshold by sorting.

[0009] According to a raster data spectral clustering method with integrated spatial constraints provided by the present invention, the method of constructing a clustering network based on the similarity threshold according to raster attributes and spatial adjacency relationships and generating an initial similarity matrix specifically includes: Mapping at least one grid cell in the raster data into a node set, defining the neighborhood range based on the central grid, and generating an adjacency relationship covering the grid window; Based on the adjacency relationship, all nodes are traversed to calculate the similarity of nodes in the neighborhood range, and an edge set is constructed based on the similarity threshold to form a clustering network, and an initial similarity matrix is ​​constructed simultaneously.

[0010] According to a raster data spectral clustering method with integrated spatial constraints provided by the present invention, the similarity graphs in the initial similarity matrix are reduced and abnormal nodes are removed to obtain a pruned similarity matrix, specifically comprising: Traversing the initial similarity matrix to detect isolated nodes; When the isolated node meets the preset conditions, it is added to the abnormal node set; Node pruning is performed based on the abnormal node set to remove abnormal nodes and generate a pruned similarity matrix.

[0011] According to a raster data spectral clustering method with integrated spatial constraints provided by the present invention, the pruned similarity matrix is ​​input as a parameter into a preset spectral clustering algorithm to perform clustering to obtain a clustering result, specifically comprising: The pruned similarity matrix is ​​input into the spectral clustering algorithm to obtain the clustering results of all non-abnormal nodes; The clustering results of non-abnormal nodes are restored to the initial grid nodes, and the abnormal nodes are marked to the initial grid to obtain the clustering results of all grid nodes.

[0012] The present invention also provides a raster data spectral clustering system integrating spatial constraints, the system comprising: Raster data acquisition module, used to obtain different attribute layers of raster data to be classified; The similarity calculation module is used to determine the number of clusters based on the attribute layer, cluster the raster data using a preset algorithm, and calculate the similarity threshold; An initial similarity matrix generation module is used to construct a clustering network based on the similarity threshold according to grid attributes and spatial adjacency relationships and generate an initial similarity matrix; a matrix pruning module, configured to reduce the similarity graph constructed by the initial similarity matrix and remove abnormal nodes to obtain a pruned similarity matrix; The clustering module is used to input the pruned similarity matrix as a parameter into the preset spectral clustering algorithm to perform clustering and obtain clustering results.

[0013] The present invention also provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for spectral clustering of raster data with integrated spatial constraints as described above is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for integrating spatial constraints into raster data spectral clustering.

[0015] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned raster data spectral clustering methods with integrated spatial constraints.

[0016] The present invention provides a raster data spectral clustering method and system with integrated spatial constraints. The method clusters raster data, imposes spatial constraints, obtains a similarity threshold, uses the similarity threshold to simplify the similarity graph, deletes edges with less similarity to reduce the amount of spectral clustering calculations, prunes the similarity graph, and inputs the pruned similarity matrix as a parameter into a preset spectral clustering algorithm to perform clustering to obtain clustering results. The method avoids the defect of the spectral clustering method that cannot take into account spatial continuity, and takes into account both spatial continuity and attribute similarity of the raster data clustering results. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 It is a flow chart of the raster data spectral clustering method with integrated spatial constraints provided by the present invention.

[0019] Figure 2 This is a schematic diagram of grid properties provided by the present invention.

[0020] Figure 3 Schematic diagram of the elbow rule provided by the present invention.

[0021] Figure 4 This is a schematic diagram of the grid neighborhood range and adjacent nodes provided by the present invention.

[0022] Figure 5 It is a schematic diagram of the similarity graph threshold screening and refining process provided by the present invention.

[0023] Figure 6 This is the raster data clustering result provided by the present invention.

[0024] Figure 7 This is a schematic diagram of module connections of the raster data spectral clustering system with integrated spatial constraints provided by the present invention.

[0025] Figure 8It is a structural schematic diagram of the electronic device provided by the present invention.

[0026] Reference numerals: 110: Raster data acquisition module; 120: Similarity calculation module; 130: Initial similarity matrix generation module; 140: Matrix pruning module; 150: Clustering module; 810: Processor; 820: Communication interface; 830: Memory; 840: Communication bus. DETAILED DESCRIPTION

[0027] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0028] The following combination Figure 1 The present invention describes a raster data spectral clustering method integrating spatial constraints, which includes: step 100, obtaining different attribute layers of the raster data to be classified.

[0029] Specifically, the input raster data is obtained. The raster data should be located in the same area and have the same number of rows and columns. The size of the three-dimensional matrix representing the raster is determined based on the different attribute layers of the raster data to be classified.

[0030] In this invention, the implementation scheme of the raster data spectral clustering method with integrated spatial constraints is described by taking the soil attribute raster data of a certain place as an example. For the input raster data, it is guaranteed that they are located in the same area and the number of rows and columns of the corresponding raster data should be the same. The raster data to be classified can be regarded as A three-dimensional matrix, where is the number of rows and columns of the raster data to be classified, is the number of attributes of the raster data to be classified; in this embodiment, the input raster is The three-dimensional matrix, with specific properties such as Figure 2 shown.

[0031] Step 200: Determine the number of clusters based on the attribute layer, cluster the raster data using a preset algorithm, and calculate a similarity threshold.

[0032] Specifically, the number of clusters is obtained by specifying based on the attribute layer or by using a preset algorithm; Based on the number of clusters The algorithm clusters the raster data to obtain different clusters, calculates the similarity between all elements in each cluster, and determines the similarity threshold by sorting.

[0033] In the present invention, the number of clusters can be directly specified Or use the elbow method based on the k-means algorithm to determine the number of clusters for raster data .use The algorithm clusters the raster data and obtains Clusters, calculate the similarity between all elements in each cluster, sort the similarities between elements in each cluster from small to large, select the first quartile of the similarity; take the average of the first quartiles of the n clusters to get the similarity threshold .

[0034] In one embodiment, you can choose to directly specify the number of clusters Or determine the number of clusters for raster data based on the elbow rule In this embodiment, the elbow rule is used to determine the number of clusters in this embodiment. First, the range of the number of clusters is set to ; Then for each given number of clusters , using K-means algorithm to get Clusters, calculate the sum of squared distances (SSE) of all samples to the center of the cluster to which they belong; draw a curve with the number of clusters as the horizontal axis and SSE as the vertical axis. Observe the curve and find an obvious inflection point, such as Figure 3 The inflection point is the determined number of clusters, which is 6 in this embodiment.

[0035] The K-means algorithm is used to cluster the sample raster data and obtain 6 clusters. The similarity between all elements in each cluster is calculated respectively. The similarity can be obtained by formula (1). The similarity between the elements in each cluster is sorted and the first quartile of the similarity is selected to obtain the first quartile of the 6 clusters. The average of these six numbers is taken as the similarity threshold. , and in this embodiment, the similarity threshold is .

[0036] (1) in, is the node attribute vector, is the modulus between the two node attribute vectors, is a hyperparameter, which is set in this embodiment In actual operation, its value can be changed according to the data distribution.

[0037] Step 300: construct a clustering network based on the similarity threshold according to grid attributes and spatial adjacency relationships and generate an initial similarity matrix.

[0038] Specifically, at least one grid cell in the grid data is mapped into a node set, a neighborhood range is defined based on the central grid, and an adjacency relationship covering the grid window is generated; All nodes are traversed to calculate the similarity of nodes in the neighborhood, and an edge set is constructed based on the similarity threshold to form a clustering network, and an initial similarity matrix is ​​constructed simultaneously.

[0039] In the present invention, Grid cells are mapped to node sets , with the center grid Defined as a benchmark Neighborhood range, generate coverage Adjacency relationship of the grid window. Traverse all nodes , calculate the nodes in its neighborhood Similarity: (2) in is the similarity calculation function, is the node attribute vector, is the pixel row and column number of the grid node, is the neighborhood size. edge Construct edge sets , forming a clustering network Synchronous construction Order similarity matrix , whose row and column indices correspond to grid numbers, and non-empty elements store valid similarity values.

[0040] In a specific embodiment, referring to Figure 4 , map each grid cell to a node to build a node set ,initialization Order sparse matrix .by Define the neighborhood range and form a grid with the center as the center Core Adjacent window. When traversing all grid nodes, for each center grid , calculate the adjacent grids in the window Similarity , calculated according to formula (2). The edges constitute the edge set , and finally form a graph And the corresponding 31820-order similarity matrix , where the matrix row and column indices correspond to the grid numbers, and non-empty elements record the effective similarity.

[0041] Step 400: Reduce the similarity graph constructed by the initial similarity matrix and remove abnormal nodes to obtain a pruned similarity matrix.

[0042] See also Figure 5 ,Specifically, traverse the initial similarity matrix and detect isolated nodes; When the isolated node meets the preset conditions, it is added to the abnormal node set; Node pruning is performed based on the abnormal node set to remove abnormal nodes and generate a pruned similarity matrix.

[0043] In the present invention, the clustering network is detected Isolated node set ,in Is an indicator function, which takes the value 1 when the condition is true and 0 otherwise, through matrix pruning operation Generate refined matrix , It is a set difference operation, which represents the node set after removing abnormalities, and the graph structure is updated synchronously. .

[0044] In a specific embodiment, by traversing Detect isolated nodes. When a node satisfy When it is added to the exception collection . Perform node pruning operations , obtain the refined similarity matrix .

[0045] Step 500: Input the pruned similarity matrix as a parameter into a preset spectral clustering algorithm to perform clustering and obtain a clustering result.

[0046] Specifically, the pruned similarity matrix is ​​input into the spectral clustering algorithm to obtain the clustering results of all non-abnormal nodes; The clustering results of non-abnormal nodes are restored to the initial grid nodes, and the abnormal nodes are marked to the initial grid to obtain the clustering results of all grid nodes.

[0047] In the present invention, the similarity matrix Construct a non-regularized Laplace matrix (L). The Laplace matrix (L) is calculated as shown in formula (3). (3) in, is the Laplace matrix, is the degree matrix, is a diagonal matrix with diagonal elements , is a similarity matrix.

[0048] After constructing the Laplace matrix, solve the generalized eigenvalue problem , obtain the eigenvectors corresponding to the k smallest eigenvalues .

[0049] According to the feature vector Constructing a Matrix .

[0050] The matrix Each row is considered as a data point, and the k-means algorithm is used to Perform clustering to obtain a cluster label for each data point.

[0051] The clustering results of all non-abnormal nodes are converted into a two-dimensional matrix according to the correspondence between grid rows and columns and data points, and restored to the initial grid nodes. At the same time, the abnormal node set All nodes in the grid are restored and marked to obtain the clustering results of all grid nodes. Figure 6 shown.

[0052] A raster data spectral clustering method with integrated spatial constraints provided by the present invention clusters raster data, imposes spatial constraints, obtains a similarity threshold, uses the similarity threshold to simplify the similarity graph, deletes edges with less similarity to reduce the amount of spectral clustering calculations, prunes the similarity graph, and inputs the pruned similarity matrix as a parameter into a preset spectral clustering algorithm for clustering to obtain clustering results. This avoids the defect of the spectral clustering method that cannot take into account spatial continuity, and takes into account both spatial continuity and attribute similarity of the raster data clustering results.

[0053] refer to Figure 7 The present invention also discloses a raster data spectral clustering system integrating spatial constraints, the system comprising: The raster data acquisition module 110 is used to obtain different attribute layers of the raster data to be classified; A similarity calculation module 120 is used to determine the number of clusters based on the attribute layer, cluster the raster data using a preset algorithm, and calculate a similarity threshold; An initial similarity matrix generating module 130 is configured to construct a clustering network based on the similarity threshold according to grid attributes and spatial adjacency relationships and generate an initial similarity matrix; A matrix pruning module 140 is configured to reduce the similarity graph constructed by the initial similarity matrix and remove abnormal nodes to obtain a pruned similarity matrix; The clustering module 150 is configured to input the pruned similarity matrix as a parameter into a preset spectral clustering algorithm to perform clustering and obtain a clustering result.

[0054] Among them, different attribute layers of the raster data to be classified are obtained, including: Obtain input raster data, which should be located in the same area and have the same number of rows and columns; The size of the three-dimensional matrix representing the raster is determined based on the different attribute layers of the raster data to be classified.

[0055] The number of clusters is determined based on the attribute layer, and the raster data is clustered using a preset algorithm to calculate the similarity threshold, including: Get the number of clusters based on the specified attribute layer or through a preset algorithm; Based on the number of clusters The algorithm clusters the raster data to obtain different clusters, calculates the similarity between all elements in each cluster, and determines the similarity threshold by sorting.

[0056] Based on the similarity threshold, a clustering network is constructed according to grid attributes and spatial adjacency relationships and an initial similarity matrix is ​​generated, specifically including: Mapping at least one grid cell in the raster data into a node set, defining the neighborhood range based on the central grid, and generating an adjacency relationship covering the grid window; All nodes are traversed to calculate the similarity of nodes in the neighborhood, and an edge set is constructed based on the similarity threshold to form a clustering network, and an initial similarity matrix is ​​constructed simultaneously.

[0057] The similarity graphs in the initial similarity matrix are reduced and abnormal nodes are removed to obtain a pruned similarity matrix, specifically including: Traversing the initial similarity matrix to detect isolated nodes; When the isolated node meets the preset conditions, it is added to the abnormal node set; Node pruning is performed based on the abnormal node set to remove abnormal nodes and generate a pruned similarity matrix.

[0058] The pruned similarity matrix is ​​input as a parameter into the preset spectral clustering algorithm to obtain clustering results, including: The pruned similarity matrix is ​​input into the spectral clustering algorithm to obtain the clustering results of all non-abnormal nodes; The clustering results of non-abnormal nodes are restored to the initial grid nodes, and the abnormal nodes are marked to the initial grid to obtain the clustering results of all grid nodes.

[0059] A raster data spectral clustering system with integrated spatial constraints is provided based on the present invention. The system clusters raster data, imposes spatial constraints, obtains a similarity threshold, uses the similarity threshold to simplify the similarity graph, deletes edges with less similarity to reduce the amount of spectral clustering calculations, prunes the similarity graph, and inputs the pruned similarity matrix as a parameter into a preset spectral clustering algorithm to perform clustering to obtain clustering results. This avoids the defect of the spectral clustering method that cannot take into account spatial continuity, and takes into account both spatial continuity and attribute similarity of the raster data clustering results.

[0060] Figure 8 An example of a physical structure diagram of an electronic device is shown below. Figure 8 As shown, the electronic device may include: a processor 810, a communications interface 820, a memory 830, and a communications bus 840, wherein the processor 810, the communications interface 820, and the memory 830 communicate with each other via the communications bus 840. The processor 810 may call logic instructions in the memory 830 to execute a raster data spectral clustering method with integrated spatial constraints, the method comprising: obtaining different attribute layers of the raster data to be classified; determining the number of clusters based on the attribute layers, clustering the raster data using a preset algorithm, and calculating a similarity threshold; constructing a clustering network based on the raster attributes and spatial adjacency relationships based on the similarity threshold and generating an initial similarity matrix; reducing the similarity graph constructed from the initial similarity matrix and removing abnormal nodes to obtain a pruned similarity matrix; and inputting the pruned similarity matrix as a parameter into a preset spectral clustering algorithm for clustering to obtain a clustering result.

[0061] Furthermore, the logic instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.

[0062] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the raster data spectral clustering method with integrated spatial constraints provided by the above methods, the method including: obtaining different attribute layers of the raster data to be classified; determining the number of clusters based on the attribute layers, clustering the raster data through a preset algorithm, and calculating a similarity threshold; constructing a clustering network based on the raster attributes and spatial adjacency relationships based on the similarity threshold and generating an initial similarity matrix; reducing the similarity graph constructed by the initial similarity matrix and removing abnormal nodes to obtain a pruned similarity matrix; inputting the pruned similarity matrix as a parameter into a preset spectral clustering algorithm for clustering to obtain a clustering result.

[0063] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the raster data spectral clustering method with integrated spatial constraints provided by the above methods, the method comprising: obtaining different attribute layers of the raster data to be classified; determining the number of clusters based on the attribute layers, clustering the raster data using a preset algorithm, and calculating a similarity threshold; constructing a clustering network based on the raster attributes and spatial adjacency relationships based on the similarity threshold and generating an initial similarity matrix; reducing the similarity graph constructed by the initial similarity matrix and removing abnormal nodes to obtain a pruned similarity matrix; and inputting the pruned similarity matrix as a parameter into a preset spectral clustering algorithm for clustering to obtain a clustering result.

[0064] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0065] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.

[0066] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A spectral clustering method for raster data with integrated spatial constraints, characterized by: include: Get different attribute layers of the raster data to be classified; Determine the number of clusters based on the attribute layer, cluster the raster data using a preset algorithm, and calculate the similarity threshold; Based on the similarity threshold, a clustering network is constructed according to grid attributes and spatial adjacency relationships and an initial similarity matrix is ​​generated; Reducing the similarity graph constructed by the initial similarity matrix and removing abnormal nodes to obtain a pruned similarity matrix; The pruned similarity matrix is ​​input as a parameter into the preset spectral clustering algorithm for clustering to obtain the clustering results.

2. The raster data spectral clustering method with integrated spatial constraints according to claim 1, characterized in that: The obtaining of different attribute layers of the raster data to be classified specifically includes: Obtain input raster data, which should be located in the same area and have the same number of rows and columns; The size of the three-dimensional matrix representing the raster is determined based on the different attribute layers of the raster data to be classified.

3. The raster data spectral clustering method with integrated spatial constraints according to claim 1, characterized in that: The method of determining the number of clusters based on the attribute layer, clustering the raster data using a preset algorithm, and calculating the similarity threshold specifically includes: Get the number of clusters based on the specified attribute layer or through a preset algorithm; Based on the number of clusters The algorithm clusters the raster data to obtain different clusters, calculates the similarity between all elements in each cluster, and determines the similarity threshold by sorting.

4. The raster data spectral clustering method with integrated spatial constraints according to claim 1, characterized in that: The step of constructing a clustering network based on the similarity threshold according to grid attributes and spatial adjacency and generating an initial similarity matrix specifically includes: Mapping at least one grid cell in the raster data into a node set, defining the neighborhood range based on the central grid, and generating an adjacency relationship covering the grid window; Based on the adjacency relationship, all nodes are traversed to calculate the similarity of nodes in the neighborhood range, and an edge set is constructed based on the similarity threshold to form a clustering network, and an initial similarity matrix is ​​constructed simultaneously.

5. The raster data spectral clustering method with integrated spatial constraints according to claim 1, characterized in that: The reducing the similarity graphs in the initial similarity matrix and removing abnormal nodes to obtain a pruned similarity matrix specifically includes: Traversing the initial similarity matrix to detect isolated nodes; When the isolated node meets the preset conditions, it is added to the abnormal node set; Node pruning is performed based on the abnormal node set to remove abnormal nodes and generate a pruned similarity matrix.

6. The raster data spectral clustering method with integrated spatial constraints according to claim 1, characterized in that: The pruned similarity matrix is ​​input as a parameter into a preset spectral clustering algorithm to perform clustering to obtain a clustering result, specifically including: The pruned similarity matrix is ​​input into the spectral clustering algorithm to obtain the clustering results of all non-abnormal nodes; The clustering results of non-abnormal nodes are restored to the initial grid nodes, and the abnormal nodes are marked to the initial grid to obtain the clustering results of all grid nodes.

7. A raster data spectral clustering system integrating spatial constraints, characterized by: The system comprises: Raster data acquisition module, used to obtain different attribute layers of raster data to be classified; The similarity calculation module is used to determine the number of clusters based on the attribute layer, cluster the raster data using a preset algorithm, and calculate the similarity threshold; An initial similarity matrix generation module is used to construct a clustering network based on the similarity threshold according to grid attributes and spatial adjacency relationships and generate an initial similarity matrix; a matrix pruning module, configured to reduce the similarity graph constructed by the initial similarity matrix and remove abnormal nodes to obtain a pruned similarity matrix; The clustering module is used to input the pruned similarity matrix as a parameter into the preset spectral clustering algorithm to perform clustering and obtain clustering results.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the raster data spectral clustering method with integrated spatial constraints according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the raster data spectral clustering method with integrated spatial constraints as claimed in any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the raster data spectral clustering method with integrated spatial constraints as claimed in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Parallel clustering method for processing large geographical grid data

    CN105045934A

  • Fraud recognition method and device, computer equipment and storage medium

    CN109816535A

  • Fast fuzzy spectral clustering method based on anchor point diagram

    CN119719833A

  • Evolutionary Spectral Clustering by Incorporating Temporal Smoothness

    US20080294684A1

  • Serving cell handover method and apparatus, and serving cell determination method and apparatus

    WO2022262480A1