A method for dividing rural landscape ecological units based on clustering algorithm

By combining clustering algorithms with natural geographical and vegetation conditions, the problems of irregular regions and unclear boundaries in the division of rural landscape ecological units were solved, and accurate ecological unit division and quantitative analysis were achieved.

CN115563493BActive Publication Date: 2026-02-10SOUTHEAST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211410012.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-10
Publication Date
2026-02-10
Estimated Expiration
2042-11-10

AI Technical Summary

Technical Problem

Existing methods for dividing landscape ecological units in rural landscapes suffer from irregular shapes, varying areas, and unclear boundaries, leading to a large workload in later stages and a lack of precision in considering natural geographical and vegetation conditions.

Method used

A clustering algorithm-based approach is adopted, which involves grid partitioning, data preprocessing, multidimensional cluster analysis, and visualization output. Combined with natural geographical conditions, administrative divisions, and vegetation conditions, an ecological unit partitioning method that conforms to the dynamic change characteristics of ecological units is generated.

Benefits of technology

It improves the accuracy and adaptability of landscape ecological unit division, makes up for the shortcomings of subjective judgment, and realizes quantitative analysis and scientific ecological unit division.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115563493B_ABST
    Figure CN115563493B_ABST
Patent Text Reader

Abstract

The application discloses a method for dividing rural landscape ecological units based on a clustering algorithm, and belongs to the field of landscape architecture research; the method comprises the following steps: S1, carrying out grid division on a research region to obtain two types of grid division results A and B; S2, collecting basic information of the research region to establish a basic information database of each region; S3, collating and preprocessing the collected basic information data, and preparing for secondary analysis of the grid; S4, carrying out multi-dimensional clustering analysis on the type A grid; S5, naming and distinguishing the clustering results of the type A grid; S6, taking the classification results of the type A grid as a reference to improve the data of the type B grid; S7, carrying out multi-dimensional clustering analysis on the type B grid, and naming and distinguishing the results; S8, visualizing the analysis result data of the type A and type B grids, and distinguishing the classification results by using color blocks with different gray scales; and S9, merging the grids with the same gray color and adjacent to each other, and generating ecological units according to the analysis results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of landscape architecture research, specifically involving a method for dividing rural landscape ecological units based on clustering algorithms. Background Technology

[0002] Currently, there are few existing methods for dividing landscape ecological units, and most of them focus on purely natural landscapes and urban landscapes. Commonly used methods for dividing ecological units include natural zoning and kilometer grid methods, but both have problems such as irregular area shapes, varying areas, and unclear boundaries, leading to a large amount of work in later stages.

[0003] Because different land use types have different ecological functions, even the same land use type can have different ecological functions due to differences in area, hydrology, climate, elevation and vegetation cover. Summary of the Invention

[0004] To address the shortcomings of existing technologies, the present invention aims to provide a method for dividing rural landscape ecological units based on clustering algorithms. This method considers the natural geographical conditions, administrative divisions, and current vegetation conditions of different regions, increases the accuracy of research and mapping, and enables the division of landscape ecological units to adapt to various scales and better reflect the dynamic changes in the time and space of ecological units.

[0005] The objective of this invention can be achieved through the following technical solutions:

[0006] A method for dividing rural landscape ecological units based on a clustering algorithm, the method comprising the following steps:

[0007] S1, divide the study area into grids to obtain two types of grid division results, A and B;

[0008] S2, Collect basic information about the study area and establish a basic information database for each area;

[0009] S3, organize and preprocess the collected basic information data, and prepare for secondary analysis of the grid;

[0010] S4, perform multidimensional cluster analysis on the A-class grid;

[0011] S5, naming and distinguishing the clustering results of the A-class grid;

[0012] S6. Using the classification results of type A grid as a reference, improve the data of type B grid;

[0013] S7, perform multidimensional clustering analysis on the B-type grid, and name and distinguish the results;

[0014] S8 visualizes the analysis results of A and B type grids, using different shades of gray to distinguish the classification results;

[0015] S9 merges adjacent grids with the same grayscale color and generates ecological units based on the analysis results.

[0016] Furthermore, in S1, the step of dividing the mesh includes:

[0017] S11, Calculate the regional scale of the research object:

[0018] The maximum length H in the X direction and the maximum length L in the Y direction are calculated according to the following formula:

[0019] Number of grids in the Y direction

[0020] Total number of units

[0021] Where x is the number of grids in the Y direction, and x is a positive integer; n is the cell side length; the grids of the corresponding scale are overlaid on the satellite image of the object under study, the empty grids are removed, and the remaining grids become the effective grids;

[0022] S12 is divided into A and B types of grids based on the differences in function, composition and morphology within a single grid cell in the effective unit grid.

[0023] Furthermore, the basic information collected in S2 includes: land use, hydrology and climate, elevation and slope, soil sensitivity, and vegetation cover.

[0024] Furthermore, in step S3, the data preprocessing step is as follows:

[0025] S31, clean and transform the data to obtain data that can be effectively processed;

[0026] S32 transforms continuous data into discrete data;

[0027] S33, after preprocessing the data dimensions using the PCA principal component analysis method, selects data with 95% energy factor dimensions for clustering, reducing the dimensionality of high-dimensional data samples with low information loss.

[0028] Furthermore, in step S4, the multidimensional clustering analysis of class A grids is performed as follows:

[0029] S41, Initialize a matrix to store the data for each grid;

[0030] S42 uses the K-means algorithm from the Scikit-learn library in Python to cluster the divided grid, where k is the initial number of sample centers. Through multiple iterations of centroid calculations, the sum of squared errors of the overall classification function finally reaches a minimum value, and the centers of K samples are obtained.

[0031] S43, try multiple times the value of k and the position of the initial centroid in the algorithm, and select the set of results with the best clustering effect as the final clustering result.

[0032] Furthermore, in step S5, the steps for naming and distinguishing the clustering results of class A grids are as follows:

[0033] S51, After multidimensional clustering analysis, the clustering results are obtained, and the grid cells of different groups are marked with different colors;

[0034] S52 uses adjacent positions of the grid to divide the color into similar plots, which are then identified as an ecological unit and named accordingly.

[0035] Furthermore, in S6, when refining the data of the B-type grid, it is necessary to add the condition: the adjacency of different ecological units of the A-type grid.

[0036] Furthermore, in step S7, the multidimensional clustering analysis steps for class B grids are as follows:

[0037] 1) Initialize a matrix to store the data for each grid cell;

[0038] 2) Create centroids, randomly selecting k centroids;

[0039] 3) Calculate the distance, Euclidean distance calculation: Each point X in n-dimensional Euclidean space can be represented as (x[1]x[2]…x[n]) where x (i=12…n) is a real number, called the i-th coordinate of X. The distance d(AB) between two points A=(a[1]a[2]…a[n]) and B=(b[1]b[2]…b[n]) is defined by the formula d(AB)=sqrt[∑((ab)^2)](i=12…n);

[0040] 4) Determine the value of k and iteratively calculate the distance;

[0041] 5) Obtain the B-class grid clustering results.

[0042] Furthermore, in S33, the step of PCA dimensionality reduction is as follows:

[0043] 1) Center the sample set X = [x1, x2, x3, x4, ...], that is, subtract the mean of the corresponding attribute in the sample set from each attribute of each sample;

[0044] 2) Calculate the covariance matrix D = XXT;

[0045] 3) Sort the eigenvalues ​​from largest to smallest, select the projection directions of the k attributes with the lowest correlation and perform a linear combination, and then use the corresponding k eigenvectors as row vectors to form the eigenvector matrix P;

[0046] 4) Transform the data into a new space constructed from k feature vectors, i.e., Y = PX.

[0047] Furthermore, the specific steps of S42 are as follows:

[0048] First, randomly select any number k, and denote the k centers as μ1, μ2, ..., μ k Secondly, based on the mean of each cluster object, substitute it into the formula group:

[0049] D = min Dis j

[0050] Calculate the Euclidean distance Dis between each object and these center objects, and re-divide the corresponding objects according to the minimum distance D, and then calculate the cluster center of each new cluster. Repeat this process until the standard deviation measure function begins to converge; the calculation formula is as follows:

[0051]

[0052] E is the sum of the mean squared errors of all objects in the database; p is a point in the space of the objects; μ i Clustering x i The mean.

[0053] The beneficial effects of this invention are:

[0054] 1. This invention takes into account the current status of natural geographical conditions, administrative divisions and vegetation conditions in different regions, increases the accuracy of research and mapping, and makes the division of landscape ecological units adaptable to various scales and more in line with the dynamic changes of ecological units in time and space.

[0055] 2. This invention utilizes artificial intelligence algorithms to divide rural landscape ecological units, overcoming the shortcomings of existing methods that rely on subjective map reading and intuitive judgment. It provides a quantitative analysis method for dividing rural landscape ecological units, which takes rural ecological landscape unit division as the main research object, introduces computer programming algorithms, and combines existing grid division methods. Attached Figure Description

[0056] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0057] Figure 1 This is an overall flowchart of the present invention;

[0058] Figure 2 This is a schematic diagram of mesh division according to an embodiment of the present invention;

[0059] Figure 3 This is a schematic diagram of the research scope of an embodiment of the present invention;

[0060] Figure 4 This is a schematic diagram of land use characteristics according to an embodiment of the present invention;

[0061] Figure 5 This is a schematic diagram of the slope distribution according to an embodiment of the present invention;

[0062] Figure 6 This is a schematic diagram of land sensitivity according to an embodiment of the present invention;

[0063] Figure 7 This is a schematic diagram of vegetation coverage according to an embodiment of the present invention;

[0064] Figure 8 This is a schematic diagram of the A-type grid clustering process according to an embodiment of the present invention;

[0065] Figure 9 This is a schematic diagram of the final clustering result in an embodiment of the present invention. Detailed Implementation

[0066] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0067] Clustering algorithms are algorithms that use distance as a similarity index and the sum of squared errors from sample points to class centers as the evaluation criterion for clustering quality. They are clustering methods that use continuous iteration to eventually minimize the sum of squared errors of the overall classification.

[0068] like Figure 1 As shown, a method for dividing rural landscape ecological units based on a clustering algorithm includes the following steps:

[0069] S1. Divide the study area into reasonable grids according to standards to obtain two types of grid division results, A and B. The specific steps are as follows:

[0070] S11, calculates the regional scale of the research object;

[0071] The maximum length H in the X direction and the maximum length L in the Y direction are calculated according to the following formula:

[0072] Number of grids in the Y direction

[0073] Total number of units

[0074] Where x is the number of grid cells in the Y direction, and x is a positive integer; n is the cell side length, and the size of n depends on the size of the object under study; when the area of ​​the object under study is 10 km², ... 2 When the distance is within 10km, n is recommended to be 100m; when the research object is within 10km... 2 In the above cases, the value of n is generally between [100, 500]. The corresponding scale of the grid is overlaid on the satellite image of the research object, the empty grid is removed, and the remaining grid becomes the effective grid.

[0075] S12, divide the mesh into two categories, A and B, and name them;

[0076] In an effective cell grid, there are grids with relatively consistent functions, composition, and morphology within a single grid, which are called Class A grids; there are also grids with significantly different functions, composition, and morphology, which are called Class B grids. They are named accordingly, with Class A grids starting from the northwest corner and numbered sequentially from left to right and top to bottom as A1, A2, A3, etc. Class B grids are named similarly as B1, B2, B3, etc.

[0077] S2, conduct research and collect basic information about the research area, and establish a basic information database for each area;

[0078] The survey collected basic information about the study area, including five major categories of factors: land use, hydrology and climate, elevation and slope, soil sensitivity, and vegetation cover, and established a basic information database for each area.

[0079] Land use type: According to the "Classification of Current Land Use" (GB / T21010-2017), my country's land use types are divided into eight primary types: cultivated land, orchards, forest land, pasture land, residential and industrial land, transportation land, water area, and unused land; land use information of the study area is collected according to this classification.

[0080] Hydrology and Climate: This includes hydrological and climatic elements; the data collection for hydrological elements depends on whether there is surface runoff, and includes water level, flow rate, and velocity; climatic elements include temperature characteristics, precipitation characteristics, wind direction and force, and precipitation amount.

[0081] Elevation and slope: Elevation data is collected while simultaneously recording slope aspect and slope.

[0082] Soil sensitivity: refers to the degree of soil erosion modulus in the study area; it is usually divided into six levels according to the soil erosion modulus: slight erosion, mild erosion, moderate erosion, severe erosion, very severe erosion, and extreme erosion;

[0083] Vegetation coverage: refers to the percentage of the vertical projection area of ​​vegetation on the ground to the total area of ​​the statistical area. The types of vegetation are recorded while collecting data.

[0084] S3. Organize and preprocess the collected basic information data to prepare for secondary analysis of the grid; specifically, this includes the following steps:

[0085] S31, Data preprocessing, including data cleaning, data transformation, etc., to obtain data that can be effectively processed. For objects with large and complex data volume, cleaning is performed, and the data is standardized.

[0086] S32, Data Transformation, transforming continuous data into discrete data;

[0087] S33, PCA (Principal Component Analysis) dimensionality reduction: After preprocessing the data dimensionality using the PCA principal component analysis method, data with 95% energy factor dimensions are selected for clustering. This reduces the dimensionality of high-dimensional data samples with minimal information loss, improving the algorithm's performance and processing effectiveness.

[0088] S4, perform multidimensional cluster analysis on the A-class grid;

[0089] Import the A-class data into Python for multidimensional clustering. After loading the data, calculate the Euclidean distance of the A-class data. The multidimensional clustering algorithm analysis includes the following steps:

[0090] S41, initialize a matrix to store the data for each grid; including grid name and corresponding data for land use, water level, flow rate, flow velocity, runoff, average temperature, annual precipitation, elevation, slope, soil sensitivity and vegetation cover;

[0091] S42 uses the K-means algorithm from the Scikit-learn library in Python to cluster the divided grid, where k is the initial number of sample centers. Through multiple iterations of centroid calculations, the sum of squared errors of the overall classification finally reaches a minimum value, and the centers of K samples are obtained.

[0092] S43, try the value of k in the algorithm multiple times, and try the position of the initial centroid multiple times. Finally, select the group with the best clustering effect as the final clustering result.

[0093] The program code for S4 is as follows:

[0094]

[0095]

[0096]

[0097]

[0098] S5, naming and distinguishing the clustering results of class A grids; specifically including the following steps:

[0099] S51, After multidimensional clustering analysis, the clustering results are obtained, and the grid cells of different groups are marked with different colors;

[0100] S52 uses adjacent positions of the grid to divide the color into similar plots, which are then called an ecological unit; they are named L1, L2, etc.

[0101] The S5 program code is as follows:

[0102]

[0103]

[0104]

[0105]

[0106] S6. Using the classification results of type A grid as a reference, improve the data of type B grid;

[0107] Because the regions with different geographical features included in the B-type grid, which is a complex plot, have geographical and characteristic connections with adjacent ecological units, a condition is added to the B-type grid data: the adjacency status with different ecological units of type A; for example, those located between L1 and L2 are marked as adjacent to plots L1 and L2.

[0108] S7, perform multidimensional clustering analysis on the B-type grid, and name and differentiate the results; specifically including the following steps:

[0109] S71, load data;

[0110] S72, a multidimensional clustering algorithm, k-means clustering;

[0111] ① Initialize a matrix to store the data for each grid, including the grid name and the number of corresponding land use types, land use nature, water level, flow rate, flow velocity, runoff, average temperature, annual precipitation, elevation, slope, soil sensitivity, vegetation cover, and the adjacent status with surrounding Class A land parcels.

[0112] ② Create centroids, randomly selecting k centroids;

[0113] ③ Calculate the distance, Euclidean distance calculation: Each point X in n-dimensional Euclidean space can be represented as (x[1]x[2]…x[n]) where x (i=12…n) is a real number, called the i-th coordinate of X. The distance d(AB) between two points A=(a[1]a[2]…a[n]) and B=(b[1]b[2]…b[n]) is defined by the formula d(AB)=sqrt[∑((ab)^2)](i=12…n);

[0114] ④ Determine the value of k and iteratively calculate the distance;

[0115] ⑤ Obtain the B-class grid clustering results;

[0116] S73 uses adjacent positions of the grid to divide the color into similar plots, which are then identified as an ecological unit; these are named P1, P2, etc.

[0117] S8 visualizes the analysis results of categories A and B, using different shades of gray to differentiate the classification results; the specific steps are as follows:

[0118] S81, the rural landscape ecological units obtained from different group clustering results are marked with different colors;

[0119] S82, puts the visualized grid data array back into the map in its original position according to the order.

[0120] S9, merge adjacent grids with the same grayscale color, and generate ecological units based on the analysis results; the specific steps are as follows:

[0121] S91: Analyze the grid colors according to administrative divisions and geographical locations, and merge adjacent grids with the same grayscale color to form an ecological unit;

[0122] S92, each unit is systematically named according to its characteristics; such as XX village XX mountain area, XX reservoir, XX boundary wetland, etc.

[0123] Example:

[0124] The following example uses a certain region to divide rural landscape ecological units using clustering algorithms. This achieves a scientific division of rural landscape ecological units based on clustering algorithms, identifying clearly defined landscape ecological units by classifying single and complex ecological areas. The specific implementation steps are as follows:

[0125] S1. Based on the standard, perform reasonable mesh division to obtain two types of mesh division results, A and B.

[0126] S11, the total area of ​​this region is 8.2 square kilometers. Based on the regional scale of the research object, a 100m*100m grid corresponds to a suitable research precision for this research object; therefore, n = 100m. Following the grid standard, using the fishing net tool in ArcGIS, the circumscribed rectangular area of ​​the Paifang community was divided into grids, forming a total of 353*564 grids. A system with each grid being 100m*100m was established. Figure 2 As shown;

[0127] Create a Fishnet label corresponding to the geometric center of each grid cell, and designate it as the sampling point of the grid; finally, remove grid cells with empty content from the bounding rectangle, such as... Figure 3 As shown;

[0128] S12. In the effective unit grid, there are grids with relatively consistent functions, composition and morphology within a single grid (called Class A grids), and there are also grids with significantly different functions, composition and morphology (called Class B grids). They are named respectively. Class A grids are named A1 starting from the northwest corner, and numbered A1, A2, A3, etc. from left to right and top to bottom. Class B grids are named B1, B2, B3, etc. in the same way.

[0129] S2, conduct research and collect basic information on the selected areas, including specific factors such as land use, hydrology and climate, elevation and slope, soil sensitivity, and vegetation cover, and establish a basic information database for each area;

[0130] Land Use Types: According to the "Classification of Current Land Use" (GB / T21010-2017), my country's land use types are divided into eight primary types: cultivated land, orchards, forest land, pasture land, residential and industrial / mining land, transportation land, water areas, and unused land. Land use information for the study area is collected accordingly. Figure 4 As shown;

[0131] Hydrology and climate: This includes hydrological elements and climatic elements; the data collection for hydrological elements depends on whether there is surface runoff, and includes water level, flow rate, and flow velocity; climatic elements include temperature characteristics, precipitation characteristics, wind direction and force, and precipitation amount.

[0132] Elevation: Elevation data is collected along with slope aspect and gradient; such as... Figure 5 As shown;

[0133] Soil sensitivity: refers to the degree of soil erosion modulus in the study area; it is usually classified into six levels according to the soil erosion modulus: slight erosion, mild erosion, moderate erosion, severe erosion, very severe erosion, and extreme erosion; for example... Figure 6 As shown;

[0134] Vegetation cover: refers to the percentage of the total area of ​​the statistical area that is the vertical projection of vegetation onto the ground. Vegetation species are recorded simultaneously with data collection; for example... Figure 7 As shown;

[0135] The following points should be noted when collecting data:

[0136] (1) Data is collected in grid units;

[0137] (2) When collecting data in Class A grids, pay attention to the average value. Collect a set of data for each grid, and ensure that the data within each grid is representative. Specifically: land use is recorded according to the land use map provided by the local area; hydrology and climate include hydrological elements and climate elements. Hydrological elements include whether there is surface runoff in the grid. If surface runoff exists, runoff data is collected simultaneously. When collecting climate elements, the average temperature and annual precipitation of each grid location are obtained through network data; elevation and slope are obtained by average sampling method. After selecting three rows and three columns of sampling points at equal intervals in each small grid, the average elevation and variance are calculated to obtain the results; vegetation cover is calculated by the proportion of vegetation area in the grid area.

[0138] (3) When collecting data in Class B grids, pay attention to the extraction of elements of different types of natural geographical properties. For example, if the same grid unit includes water areas, cultivated land and residential land, data should be collected separately. Among them, land use properties should be recorded according to the land use map provided locally; when collecting vegetation cover data, the non-water area should be used as the denominator within the same grid, and the water area should be marked.

[0139] S3, organize and preprocess the collected basic information data to prepare for secondary analysis of the grid;

[0140] S31, Data preprocessing, including data cleaning, data transformation, etc., to obtain data that can be effectively processed;

[0141] Data cleaning refers to removing irrelevant and duplicate data from the original data, and handling outliers and normal values. It primarily targets large and complex datasets, removing outliers according to rules. For missing values, imputation methods are used. For example, when handling missing values ​​for "elevation," if data is missing when using interval sampling, the mean / median / mode method can be used for imputation.

[0142] Data transformation refers to the standardization of data. Because the dimensions of different characteristic data in the collected raw data may be inconsistent, and the numerical differences may be large, such as the range of "average elevation" often differing significantly from that of "vegetation cover," data normalization can be used to scale the "average elevation" proportionally. By specifying the maximum elevation value max = 1 and the minimum elevation value min = -1, the intermediate values ​​are scaled proportionally to the range [-1, 1], thereby increasing the comparability between different types of data.

[0143] S32, Data Transformation

[0144] The collected data is presented in Excel spreadsheet format, with one data point corresponding to each grid. Category A data includes 11 items: land use, water level, flow rate, flow velocity, runoff, average temperature, annual precipitation, elevation, slope, soil sensitivity, and vegetation cover. If there is no surface runoff within a grid, the runoff data for that item is not available. When clustering Category A data, 10 or 11 items are actually considered. Category B data, due to the complexity of the land parcels, includes more than two land use types. Therefore, in addition to the above-mentioned standard data, it is also necessary to count the number of land use types within a single grid. For example, if a land parcel includes cultivated land, water area, and forest land, then the number of land use types is 3.

[0145] Data transformation: Converting continuous data into discrete data. This involves segmenting continuous data types and assigning labels to them; for example, using the equal-width method to process elevation data, dividing the data range into intervals of equal width, the number of which is determined by the characteristics of the data itself.

[0146] S33, PCA (Principal Component Analysis) Dimensionality Reduction

[0147] After preprocessing the data using Principal Component Analysis (PCA), clustering is performed on data with 95% energy factor dimensions. This reduces the dimensionality of high-dimensional data samples with minimal information loss, improving the algorithm's performance and processing efficiency. The main steps include:

[0148] 1) The sample set X = [x1, x2, x3, x4, ...] is centered, that is, each attribute of each sample is subtracted from the mean of the corresponding attribute in the sample set; for example, the sample set X = [land use, water level, flow rate, flow velocity, runoff, average temperature, annual precipitation, elevation, slope, soil sensitivity, vegetation cover] in the A-class grid.

[0149] 2) Calculate the covariance matrix D = XXT (reflecting the degree of correlation between different attributes);

[0150] 3) Sort the eigenvalues ​​from largest to smallest, select the projection directions of the k attributes with the lowest correlation and perform a linear combination, and then use the corresponding k eigenvectors as row vectors to form the eigenvector matrix P;

[0151] 4) Transform the data into a new space constructed from k feature vectors, i.e., Y = PX.

[0152] S4, perform multidimensional cluster analysis on the A-class grid;

[0153] The data of class A is imported into Python for multidimensional clustering. After loading the data, the Euclidean distance of the data of class A is calculated. The multidimensional clustering algorithm analysis includes:

[0154] Initialize a matrix to store the data for each grid, including the grid name and the corresponding data for land use, water level, flow rate, flow velocity, runoff, average temperature, annual precipitation, elevation, slope, soil sensitivity, and vegetation cover.

[0155] The three-dimensional clustering process in Python includes: first, randomly selecting an arbitrary number k (representing the types of final rural landscape units of the research object), and denoting the k centers as μ1, μ2, ..., μ... k Secondly, based on the mean of each cluster object, substitute it into the formula group:

[0156] D = min Dis j

[0157] Calculate the Euclidean distance Dis between each object and these center objects, and re-divide the corresponding objects according to the minimum distance D, and then calculate the cluster center of each new cluster. (The mean of all objects in this cluster), this process is repeated until the standard deviation measure function begins to converge; the calculation formula is as follows:

[0158]

[0159] E is the sum of the mean squared errors of all objects in the database; p is a point in the space of the objects; μ i For clustering xi The mean (p and μ) i (All are multidimensional); such as Figure 8 As shown.

[0160] S5, naming and distinguishing the clustering results of the A-class grid;

[0161] S51, After multidimensional clustering analysis, the clustering results are obtained; the grid cells of different groups are marked with different colors;

[0162] S52 uses adjacent positions of the grid to divide the color into similar plots, which are then called an ecological unit; they are named L1, L2, etc.

[0163] S6. Using the classification results of type A grid as a reference, improve the data of type B grid;

[0164] Because the regions with different geographical features included in the B-type grid, which is a complex plot, have geographical and characteristic connections with adjacent ecological units, a condition is added to the B-type grid data: the adjacency status with different ecological units of type A; for example, those located between L1 and L2 are marked as adjacent to plots L1 and L2.

[0165] S7 performs multidimensional clustering analysis on the B-type grid, naming and differentiating the results. This includes:

[0166] S71, load data;

[0167] S72, a multidimensional clustering algorithm, k-means clustering;

[0168] ① Initialize a matrix to store the data for each grid, including the grid name and the number of corresponding land use types, land use nature, water level, flow rate, flow velocity, runoff, average temperature, annual precipitation, elevation, slope, soil sensitivity, vegetation cover, and the adjacent status with surrounding Class A land parcels.

[0169] ② Create centroids, randomly selecting k centroids;

[0170] ③ Calculate the distance, Euclidean distance calculation: Each point X in n-dimensional Euclidean space can be represented as (x[1]x[2]…x[n]) where x (i=12…n) is a real number, called the i-th coordinate of X. The distance d(AB) between two points A=(a[1]a[2]…a[n]) and B=(b[1]b[2]…b[n]) is defined by the formula d(AB)=sqrt[∑((ab)^2)](i=12…n);

[0171] ④ Determine the value of k and iteratively calculate the distance;

[0172] ⑤ Obtain the B-class grid clustering results;

[0173] S73 uses adjacent grid positions to divide the area into color zones to identify similar plots, which constitute an ecological unit. These are named P1, P2, and so on.

[0174] S8 visualizes the analysis results of A and B type grids, using different shades of gray to distinguish the classification results;

[0175] S81, the rural landscape ecological units obtained from different group clustering results are marked with different colors;

[0176] S82, puts the visualized grid data array back into the map in its original position according to the order.

[0177] S9 merges adjacent grids with the same grayscale color and generates ecological units based on the analysis results;

[0178] S91, analyze grid colors according to administrative divisions and geographical locations, merge adjacent grids with the same grayscale color to form an ecological unit; (e.g.) Figure 9 (as shown);

[0179] S92, each unit is systematically named according to its characteristics. For example, XX Village XX Mountain Area, XX Reservoir, XX Boundary Wetland, etc.

[0180] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.

Claims

1. A method for dividing rural landscape ecological units based on clustering algorithms, characterized in that, The method includes the following steps: S1, divide the study area into grids to obtain two types of grid division results, A and B; S2, Collect basic information about the study area and establish a basic information database for each area; S3, organize and preprocess the collected basic information data, and prepare for secondary analysis of the grid; S4, perform multidimensional cluster analysis on the A-class grid; S5, naming and distinguishing the clustering results of the A-class grid; S6. Using the classification results of type A grid as a reference, improve the data of type B grid; S7, perform multidimensional clustering analysis on the B-type grid, and name and distinguish the results; S8 visualizes the analysis results of A and B type grids, using different shades of gray to distinguish the classification results; S9 merges adjacent grids with the same grayscale color and generates ecological units based on the analysis results; In step S1, the mesh generation step includes: S11, Calculate the regional scale of the research object: The maximum length H in the X direction and the maximum length L in the Y direction are calculated according to the following formula: Number of grids in the Y direction Total number of units Where x is the number of grids in the Y direction, and x is a positive integer; n is the cell side length; the grids of the corresponding scale are overlaid on the satellite image of the object under study, the empty grids are removed, and the remaining grids become the effective grids; S12, based on the differences in function, composition and morphology of a single grid within an effective unit grid, is divided into A and B types of grids; In S6, when improving the data of the B-type grid, it is necessary to add the condition: the adjacency of different ecological units of the A-type grid.

2. The method for dividing rural landscape ecological units based on clustering algorithm according to claim 1, characterized in that, The basic information collected in S2 includes: land use, hydrology and climate, elevation and slope, soil sensitivity, and vegetation cover.

3. The method for dividing rural landscape ecological units based on clustering algorithm according to claim 1, characterized in that, In step S3, the data preprocessing steps are as follows: S31, clean and transform the data to obtain data that can be effectively processed; S32 transforms continuous data into discrete data; S33, after preprocessing the data dimensions using the PCA principal component analysis method, selects data with 95% energy factor dimensions for clustering, thus reducing the dimensionality of high-dimensional data samples with low information loss.

4. The method for dividing rural landscape ecological units based on clustering algorithm according to claim 3, characterized in that, In step S4, the multidimensional clustering analysis of class A grids is performed as follows: S41, Initialize a matrix to store the data for each grid; S42 uses the K-means algorithm from the Scikit-learn library in Python to cluster the divided grid, where k is the initial number of sample centers. Through multiple iterations of centroid calculations, the sum of squared errors of the overall classification function finally reaches a minimum value, and the centers of K samples are obtained. S43, try multiple times the value of k and the position of the initial centroid in the algorithm, and select the set of results with the best clustering effect as the final clustering result.

5. The method for dividing rural landscape ecological units based on clustering algorithm according to claim 4, characterized in that, In step S5, the steps for naming and distinguishing the clustering results of class A grids are as follows: S51, After multidimensional clustering analysis, the clustering results are obtained, and the grid cells of different groups are marked with different colors; S52 uses adjacent positions of the grid to divide the color into similar plots, which are then identified as an ecological unit and named accordingly.

6. The method for dividing rural landscape ecological units based on clustering algorithm according to claim 5, characterized in that, In S7, the steps for multidimensional clustering analysis of type B grids are as follows: 1) Initialize a matrix to store the data for each grid cell; 2) Create centroids, randomly selecting k centroids; 3) Calculate the distance, Euclidean distance calculation: Each point X in n-dimensional Euclidean space is represented as (x[1]x[2]…x[n]) where x (i=12…n) is a real number, called the i-th coordinate of X. The distance d(AB) between two points A=(a[1]a[2]…a[n]) and B=(b[1]b[2]…b[n]) is defined by the formula d(AB)=sqrt[∑((ab)^2)](i=12…n); 4) Determine the value of k and iteratively calculate the distance; 5) Obtain the B-class grid clustering results.

7. The method for dividing rural landscape ecological units based on clustering algorithm according to claim 3, characterized in that, In step S33, the steps for PCA dimensionality reduction are as follows: 1) Center the sample set X = [x1, x2, x3, x4, ...], that is, subtract the mean of the corresponding attribute in the sample set from each attribute of each sample; 2) Calculate the covariance matrix D = XXT; 3) Sort the eigenvalues ​​from largest to smallest, select the projection directions of the k attributes with the lowest correlation and perform a linear combination, and then use the corresponding k eigenvectors as row vectors to form the eigenvector matrix P; 4) Transform the data into a new space constructed from k feature vectors, i.e., Y = PX.

8. The method for dividing rural landscape ecological units based on clustering algorithm according to claim 4, characterized in that, The specific steps of S42 are as follows: First, randomly select any number k, and denote the k centers as μ1, μ2, ..., μ k Secondly, based on the mean of each cluster object, substitute it into the formula group: Calculate the Euclidean distance Dis between each object and these center objects, and re-divide the corresponding objects according to the minimum distance D, and then calculate the cluster center of each new cluster. Repeat this process until the standard measure of the mean squared error begins to converge; The calculation formula is as follows: E is the sum of the mean squared errors of all objects in the database; p is a point in the space of the objects; μ i For clustering x i The mean.

Citation Information

Patent Citations

  • Grid interval data scalable k-means algorithm network traffic analysis method

    CN113572702A

  • Rural landscape zoning method and system and storage medium

    CN114418470A