Basic farmland planning method, product, medium and equipment based on improved density peak clustering algorithm
By improving the density peak clustering algorithm and combining fuzzy local density and K-nearest neighbor boundary correction strategies, the basic farmland division is optimized, solving the problem of unreasonable division in the existing technology, improving the accuracy and reliability of farmland protection areas, and providing accurate Agriculture provides theoretical support.
Patent Information
- Application Number
- CN202410795986.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-17
AI Technical Summary
The existing method of dividing basic farmland is highly subjective and lacks scientific decision-making. It ignores factors such as cultivated land quality, contiguous needs and policy regulations, resulting in superficial protection of basic farmland and the inability to form a reasonable spatial layout.
The improved density peak clustering algorithm is used to construct the geographical grid of cultivated land, obtain basic attribute data and accessibility data, carry out fuzzy local density definition and non-cluster center allocation strategy, and combine the K nearest neighbor boundary correction and fusion strategy to optimize the clustering results. To delineate basic farmland protection areas.
It improves the accuracy and reliability of basic farmland protection zone planning, achieves more reasonable division of cultivated land resources and contiguous effects, and provides a theoretical basis for agricultural production.
Smart Images

Figure CN118657403A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of farmland planning, and in particular to a basic farmland planning method, product, medium and equipment based on an improved density peak clustering algorithm. Background Art
[0002] Agricultural zoning management can formulate management strategies according to the characteristics of different zoning areas, providing a theoretical basis for the implementation of precision agriculture. The concept of "precision agriculture" is becoming more mature, and the application of large-scale farmland management zoning technology also provides a theoretical basis for precise regulation in the agricultural production process. Agricultural zoning management mainly divides farmland into management areas based on the spatial variability of soil elements and crops to achieve the purpose of "precision management". As for regional division, demarcation of basic farmland is the process of selectively dividing cultivated land into basic farmland according to the overall plan. The current demarcation process has problems such as strong subjectivity and lack of scientific decision-making. In the demarcation process, only economic needs are considered, and factors such as cultivated land quality, contiguous needs and policy regulations are ignored, resulting in superficial protection of basic farmland and the inability to form a reasonable and optimized spatial layout.
[0003] The farmland division problem can be regarded as a clustering problem of cultivated land plots, that is, using clustering algorithms to divide cultivated land plots with "similar attributes and spatial proximity" into the same category, so as to achieve effective division of farmland.
[0004] Density Peak Clustering (DPC) is a density-based clustering algorithm that is mainly used to identify clusters with different densities and find the center point of each cluster (i.e., density peak). The algorithm does not require iteration and can effectively handle clusters of complex shapes and data sets with noise points. It has good robustness and accuracy. As an effective method of data mining, density peak clustering has been widely used in many fields, such as image processing, data partitioning, biology, etc. In the existing basic farmland delineation research, in the face of the uneven distribution of farmland data sample density, the accurate selection of the center point is still not guaranteed. For example, in the patent (CN116541734A), an industrial data partitioning method and system based on adaptive density peak clustering is disclosed, and its scheme is: clustering based on industrial equipment electricity consumption data and adaptive density peak clustering algorithm to obtain data partitioning results; wherein, the construction process of the adaptive density peak clustering algorithm is: introducing the shared neighbors of the data points to adjust the distance measurement value between the data points, and calculating the local domain density of the data points; combining the local domain density of the data points, introducing the density decay phenomenon, and adaptively aggregating the data points into micro-clusters through the density decay phenomenon; using a two-stage allocation strategy instead of a one-stage allocation strategy to divide the data, in the first stage, the micro-clusters are merged to form a cluster backbone, and in the second stage, the cluster backbone allocated in the first stage is used to guide the allocation of the remaining data points in the second step. However, this method still has allocation errors for high-dimensional data and manifold data, and the accuracy of the clustering algorithm needs to be further enhanced. Therefore, there is an urgent need for a method that can output a more reasonable basic farmland planning to facilitate researchers and farmers to carry out practical operations. Summary of the invention
[0005] The purpose of the present invention is to provide a basic farmland planning method, product, medium and equipment based on an improved density peak clustering algorithm, which can effectively improve the accuracy and reliability of basic farmland protection area planning.
[0006] To achieve the above object, the present invention provides the following solutions:
[0007] A basic farmland planning method based on an improved density peak clustering algorithm includes:
[0008] Constructing a geographic grid of cultivated land in the study area and obtaining attribute data of the geographic grid; the attribute data includes basic attribute data and accessibility attribute data; the basic attribute data includes the number of cultivated land plots, the area of the plots, and the average fractal dimension of the plots; the accessibility attribute data is the distance from the cultivated land plots to the main roads, towns or villages;
[0009] Normalize the attribute data of the geographic grid to obtain a set of farmland sample data;
[0010] Based on the farmland sample data set, the cluster center of the farmland sample data is determined by using the fuzzy local density definition;
[0011] According to the cluster center, the farmland sample data that is not in the cluster center is clustered by combining the self-exploration threshold method and the nearest neighbor principle to obtain the initial clustering results.
[0012] The initial clustering result is corrected based on the boundary correction fusion strategy of K nearest neighbors to obtain the final clustering result;
[0013] Based on the final clustering results, basic farmland protection areas are planned.
[0014] Optionally, constructing a geographic grid of cultivated land in the study area and obtaining attribute data of the geographic grid specifically includes:
[0015] According to the minimum latitude and longitude range of cultivated land in the study area and the scale of spatial objects, equal longitude and latitude division is carried out to construct geographic grids;
[0016] Based on the constructed geographic grid, the basic attribute data and accessibility attribute data of the geographic grid are obtained according to the concepts and connotations of high-standard farmland and farmland protection and the influencing factors of basic farmland protection zone planning.
[0017] Optionally, the normalization of the attribute data of the geographic grid to obtain a farmland sample data set specifically includes:
[0018] After the geographic network is established, the corresponding attribute data is output in the form of a list and the formula Normalize the attribute data of the geographic grid; where x i is the value of a single attribute data in grid cell i; x imin is the minimum value of the column where the single attribute data in grid cell i is located; x imax is the maximum value of the column where a single attribute data is located in grid cell i; X i is the normalized value of a single attribute data in grid unit i; the farmland sample data set is X i A collection of .
[0019] Optionally, the method of determining the cluster center of the farmland sample data by using a fuzzy local density definition based on the farmland sample data set specifically includes:
[0020] According to X in the farmland sample data set i The Euclidean distance d between grid cell i and grid cell j is calculated ij ;
[0021] Using fuzzy local density definition Determine the fuzzy local density ρ of grid cell i i; where μ(d ij ) is the membership value of the fuzzy local density of grid unit j to grid unit i;
[0022] Using formula Determine the relative distance δ of grid cell i i ;
[0023] Using formula Determine the relative distance δ of the grid cell with the highest fuzzy local density h ; where h is the grid cell with the highest fuzzy local density; o is the grid cell other than h in the geographic grid; δ o is the relative distance to other grid cells o;
[0024] According to i , δ i and δ h Construct a decision graph and use the density peak in the decision graph as the cluster center.
[0025] Optionally, clustering the farmland sample data that are not in the cluster center according to the cluster center in combination with the self-exploration threshold method and the nearest neighbor principle to obtain an initial clustering result specifically includes:
[0026] According to the cluster center c of grid cell i i , using the self-exploration threshold method formula Calculate the distance threshold r of grid cell i i ;in, is the first unassigned unit closest to grid unit i; ||·||2 is the L2 norm;
[0027] Combining the nearest neighbor principle and distance threshold r i , using the formula Get the allocation matrix A(i,j);
[0028] Based on the allocation matrix A(i,j), the farmland sample data that are not cluster centers are clustered to obtain the initial clustering results.
[0029] Optionally, the boundary correction fusion strategy based on K nearest neighbors corrects the initial clustering result to obtain the final clustering result, specifically including:
[0030] For the case where there are grid cells of other clusters in the K nearest neighbors of the cluster boundary, the formula is used Calculate the K nearest neighbor radius r K ; Where n is the number of grid cells; is the distance x i The Kth nearest neighbor unit of
[0031] The boundary grid cell in the geographic grid is taken as the center of the circle and the K Construct the K neighbor ranges of the bounding grid cell for the radius;
[0032] The initial clustering result is modified through the K neighbor ranges to obtain the final clustering result.
[0033] Optionally, planning a basic farmland protection zone based on the final clustering result specifically includes:
[0034] A statistical analysis was performed on the attribute data of relevant plots participating in the clustering in all categories included in the final clustering results, and plots with concentrated cultivated land areas, high cultivated land continuity index and high cultivated land utilization index in the attribute data were determined as basic farmland protection areas.
[0035] A computer program product comprises a computer program, which implements the basic farmland planning method based on the improved density peak clustering algorithm when executed by a processor.
[0036] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the basic farmland planning method based on an improved density peak clustering algorithm.
[0037] A computer device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the basic farmland planning method based on the improved density peak clustering algorithm.
[0038] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0039] The present invention provides a basic farmland planning method, product, medium and equipment based on an improved density peak clustering algorithm. On the basis of the density peak clustering algorithm, the density peak clustering algorithm is improved by proposing fuzzy local density definition, non-cluster center allocation clustering strategy and boundary correction fusion strategy. Specifically, the present invention obtains the attribute data of the cultivated land geographic grid for feature extraction, obtains a farmland sample data set after normalization of the attribute data, clusters the farmland sample data set using the improved density peak clustering algorithm, and then delineates the basic farmland protection area, effectively improving the accuracy and reliability of the basic farmland protection area planning. Therefore, the present invention comprehensively analyzes and obtains the most representative and distinguishing farmland sample data with agricultural characteristics, realizes the effective division of the basic farmland protection area, guides the implementation of the basic farmland protection plan, and provides a theoretical basis for promoting agricultural production and ensuring national food security. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 A schematic flow chart of a basic farmland planning method based on an improved density peak clustering algorithm provided by the present invention;
[0042] Figure 2 The schematic diagram of the improved density peak clustering algorithm provided by the present invention;
[0043] Figure 3 A decision diagram of the DPC algorithm provided by the present invention in the Aggregation data set;
[0044] Figure 4 A decision diagram of the improved density peak clustering algorithm provided by the present invention in the Aggregation data set. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] The purpose of the present invention is to provide a basic farmland planning method, product, medium and equipment based on an improved density peak clustering algorithm, which can effectively improve the accuracy and reliability of basic farmland protection area planning.
[0047] The following supplements are made to the method principles involved in the present invention.
[0048] Clustering algorithm refers to dividing the feature space of data, classifying similar samples into one category, and establishing clear boundaries between different categories.
[0049] The density peak clustering algorithm is based on two assumptions: 1) the local density of the cluster center is relatively large and is surrounded by samples with a density that does not exceed it; 2) the distance between the cluster center and the samples with a density that exceeds it is relatively far. By selecting points with large local density and relative distance as cluster centers, clusters of any shape can be clustered.
[0050] For the improved density peak clustering algorithm, the DPC algorithm only considers the global structure of density, which leads to the problem of incorrect center selection. According to the difference in local density of the data set, the proportion of local density is fuzzy, the differentiation of local information of samples is highlighted, and the relative position of samples is more accurately reflected. A reasonable density peak is obtained, thereby determining the optimal cluster center. The allocation strategy of the DPC algorithm is to allocate non-density peak samples to the cluster where the samples closest to it and with greater density are located. This method only depends on the neighboring samples and is prone to "domino" allocation errors, resulting in the inability to achieve correct clustering. Based on the sample nearest neighbor principle and self-exploration threshold, an allocation strategy for non-cluster centers is proposed, which can effectively alleviate the problem of allocation error transmission caused by one-step allocation of the DPC algorithm. Finally, the boundary correction fusion strategy based on K nearest neighbors is combined with intra-class distance and density to correct the initial clustering results, thereby effectively improving the efficiency of the algorithm.
[0051] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0052] like Figure 1 As shown, the basic farmland planning method based on the improved density peak clustering algorithm disclosed in the present invention includes:
[0053] Step 1: Construct the geographic grid of cultivated land in the study area and obtain the attribute data of the geographic grid.
[0054] First, the present invention divides the cultivated land in the study area into equal longitude and latitude (longitude and latitude points) according to the minimum whole longitude and latitude range and the scale of the spatial object, and establishes a geographic grid. After establishment, relevant land use data, cultivated land classification data, etc. are extracted from the land use status data of the study area of the land survey, and the geographic grid is superimposed with the acquired land use data and cultivated land classification data, and the attribute values of the basic farmland demarcation factors are obtained according to the concepts and connotations of high-standard farmland and farmland protection and the influencing factors of the basic farmland protection area planning, that is, the attribute data of the geographic grid is obtained.
[0055] The attribute data include basic attribute data and accessibility attribute data. Among them, the basic attribute data include the number of cultivated land plots, the plot area, the average plot fractal dimension, etc. For the number of cultivated land plots, first construct the minimum enclosing rectangle of each cultivated land plot; secondly, calculate the coordinates of the center point of the minimum enclosing rectangle and the grid number of the geographic grid it falls into; finally, count the number of center points falling into each geographic grid, which is the number of cultivated land plots in the geographic grid. Accessibility attribute data refers to the distance from the cultivated land plot to the main line, town, and village. If there are main line features in the geographic grid, calculate the shortest distance between the cultivated land plot and the main line feature; if there are no main line features in the geographic grid, expand the search range outward until the main line features are found.
[0056] Step 2: Normalize the attribute data of the geographic grid to obtain a set of farmland sample data.
[0057] After the geographic grid is established, the corresponding attribute data is output in the form of a list. Each grid unit is an object to be classified. The selected attribute data of the geographic grid is normalized. The calculation formula is as follows:
[0058]
[0059] Among them, x i is the value of a single attribute data in grid cell i; x imin is the minimum value of the column where the single attribute data in grid cell i is located; x imax is the maximum value of the column where a single attribute data is located in grid cell i; X i is the normalized value of a single attribute data in grid unit i; the farmland sample data set is X i A collection of .
[0060] Step 3: Based on the farmland sample data set, the fuzzy local density definition is used to determine the cluster center of the farmland sample data.
[0061] The present invention introduces a soft measurement mode to define the fuzzy local density and proposes a method based on the core area radius ε min and the extension field radius ε max The fuzzy local density of . Define the distance less than ε min The area is the core geographic grid area, and the distance is greater than ε min But less than ε max The area is the extended geographic grid area, which fuzzifies the neighborhood boundaries of the plots, relaxes the restrictions on the size of the neighborhood plots, and allows the edge objects of the data distribution to be included in the fuzzy boundaries of the cluster. Then, a decision graph is constructed based on the fuzzy local density and relative distance to obtain a reasonable density peak to determine the optimal cluster center of the farmland sample data.
[0062] The fuzzy local density is defined as:
[0063]
[0064] Among them, ρ i is the fuzzy local density of grid cell i; d ij is the Euclidean distance between grid cell i and grid cell j, according to X in the farmland sample data set i The value is calculated; μ(d ij ) is the membership value of the fuzzy local density of grid unit j to grid unit i, which is as follows:
[0065]
[0066] When grid cell j is located in the core area, its membership value is 1; when grid cell j is located in the extended area, the membership value decreases linearly with the increase of distance.
[0067] The relative distance δ of grid cell i i Defined as:
[0068]
[0069] Among them, the fuzzy local density of grid cell j is greater than the fuzzy local density of grid cell i, that is, the relative distance δ of grid cell i i is the distance to the nearest grid cell whose fuzzy local density is greater than that of grid cell i.
[0070] For the grid cell h with the highest fuzzy local density, the relative distance δ of h is h is the relative distance δ of other grid cells o in the geographic grid except h o The maximum value of is defined as:
[0071]
[0072] According to i , δ i and δ h , a new decision graph can be obtained, whose decision value γ i The calculation formula is as follows:
[0073] γ i =ρ i ·δ i (6)
[0074] Taking the Aggregation dataset as an example, the decision diagram obtained by the DPC algorithm is as follows: Figure 3 As shown in the figure, the density peaks in the decision diagram are scattered, the characteristics of the density peaks are not obvious, and the density peaks circled in red in the figure are difficult to find. Figure 3 The ordinate δ is the relative distance of the grid unit, and the abscissa ρ is the fuzzy local density of the grid unit. The decision diagram based on the improved density peak clustering algorithm of the present invention is as follows: Figure 4 As shown in FIG. 1 , the improved density peak clustering algorithm of the present invention is a density clustering algorithm based on fuzzy local density and K nearest neighbor fusion (Fuzzy local density and K nearest Neighborfusion Density Peak clustering, FKN-DPC) algorithm. Figure 4The density peaks of the decision graph shown are compactly distributed, and all density peaks are easy to find. The fuzzy local density of the density peaks is close to the maximum value of the fuzzy local density of all samples. This shows that the proposed fuzzy local density can more accurately characterize the characteristics of the density peak. After determining the density peak, the density peak in the decision graph is used as the cluster center.
[0075] Step 4: Based on the cluster center, the farmland sample data outside the cluster center is clustered by combining the self-exploration threshold method and the nearest neighbor principle to obtain the initial clustering results.
[0076] The present invention combines the nearest neighbor principle and the self-exploration threshold to propose a non-cluster center allocation strategy to classify the remaining farmland sample units, as follows.
[0077] To determine the cluster center c of grid cell i i As the starting point, the distance threshold r of grid unit i is defined by the self-exploration threshold method. i ,as follows:
[0078]
[0079] Among them, the cluster center c i That is, the cluster center of the cluster where grid unit i is located; is the first unassigned cell closest to grid cell i; ||·||2 is the L2 norm.
[0080] Combining the nearest neighbor principle and distance threshold r i Get the allocation matrix A(i,j):
[0081]
[0082] The allocation matrix A(i,j) is a symmetric sparse matrix, which combines the 1-neighbor graph and the shared neighbor graph to determine the directed graph G=(V;E), where V is the grid unit to be clustered and E is the connecting edge. A(i,j)=1, indicating that the connected part of the graph G is the determined cluster. Based on the allocation matrix A(i,j), the farmland sample data that is not the cluster center is clustered to obtain the initial clustering result. After implementing this allocation matrix, there may still be problems with the incorrect allocation of boundary samples. Next, a boundary fusion strategy is used to correct the clustering results.
[0083] Step 5: Based on the boundary correction fusion strategy of K nearest neighbors, the initial clustering result is corrected to obtain the final clustering result.
[0084] The present invention comprehensively considers the intra-class distance and density, proposes a boundary correction fusion strategy based on K nearest neighbors, adjusts the adjacency of the plots, and thus obtains the final clustering result, which is specifically as follows.
[0085] First, determine whether there are grid cells of other clusters in the K nearest neighbors of the cluster boundary. If there are no grid cells of other clusters, such boundaries do not need to be fused; if there are grid cells of other clusters, calculate the radius r of the K nearest neighbors. K :
[0086]
[0087] Where n is the number of grid cells; is the distance x i The Kth nearest neighbor unit of .
[0088] Then, define the boundary grid cell x b The range of K neighbors is KNrang(x b ,r K ), that is, the boundary grid unit x in the geographic grid b As the center of the circle, with r K Finally, through KNrang(x b ,r K ) determines the allocation of boundary samples by majority voting of samples in the cluster, thereby correcting the initial clustering results and obtaining the final clustering results.
[0089] Step 6: Plan basic farmland protection areas based on the final clustering results.
[0090] A statistical analysis was performed on the attribute data of the relevant plots participating in the clustering in all categories included in the final clustering results, and the set of category plots with the best performance was selected as the basic farmland protection zone, that is, plots with concentrated cultivated land area, high cultivated land continuity index and high cultivated land utilization index in the attribute data were selected as the basic farmland protection zone.
[0091] As a specific embodiment, taking the agricultural zoning planting data set as an example, the present invention respectively adopts the DPC algorithm, the K-means algorithm, the density peaks clustering based on density backbone and fuzzy neighborhood (DPC-DBFN) algorithm, a stable membership-based self-adjusting multi-peak clustering (A Stable-Membership-basedAuto-tuning Multi-Peak Clustering, SMMP) algorithm and the basic farmland planning method based on the improved density peak clustering algorithm of the present invention to divide the basic farmland protection area, and the division results are shown in Table 1. The closer the values of the evaluation indicators ARI and FMI are to 1, the better the clustering effect. As can be seen from Table 1, the accuracy of clustering and dividing the data set using the basic farmland planning method based on the improved density peak clustering algorithm of the present invention is higher than that of DPC, K-means, DPC-DBFN, and SMMP algorithms.
[0092] Table 1 Division results of each algorithm
[0093] Clustering methods Ours DPC K-means DPC-DBFN SMMP ARI 0.7315 0.7152 0.5673 0.6246 0.2939 FMI 0.7436 0.7308 0.5966 0.6230 0.4577
[0094] In summary, the present invention selects multiple factors related to the demarcation of basic farmland, such as the quality level of cultivated land, the number of plots, the area of plots, and physical conditions, from the existing cultivated land data for feature extraction, obtains the attribute data of the cultivated land geographic grid, and performs data normalization processing to obtain a set of farmland sample data; then, based on the fuzzy local density definition, the optimal cluster center of the farmland sample data is determined in combination with the relative distance; secondly, a distribution strategy for non-cluster centers is proposed in combination with the nearest neighbor principle and the self-exploration threshold, and the remaining farmland sample units are clustered to obtain the initial clustering results; finally, considering the intra-class distance and density comprehensively, a boundary correction fusion strategy is proposed to complete the clustering process, and the adjacency is adjusted according to the spatial position relationship between the cultivated land plots to achieve the effect of high-quality cultivated land contiguousness, and further statistically analyzes the attributes of the plot set in the category to determine the basic farmland protection area, which can guide the implementation of the basic farmland protection plan and achieve a more accurate basic farmland planning purpose.
[0095] Compared with the traditional division method, the present invention combines the improved density peak clustering algorithm of fuzzy local density and nearest neighbor relationship, involves comprehensive analysis of multiple factors, and fully considers the spatial distribution characteristics of agricultural data samples, which is helpful to determine the basic farmland protection area and provide a theoretical basis for the implementation of precision agriculture. The basic farmland planning method based on the improved density peak clustering algorithm of the present invention has the following advantages:
[0096] (1) The basic farmland planning method based on the improved density peak clustering algorithm of the present invention adopts fuzzy local density definition to overcome the sensitivity of hard division of local density to data, and obtains a more reasonable density peak on this basis, thereby ensuring the accuracy of cluster center selection.
[0097] (2) The present invention proposes a nearest neighbor allocation strategy based on the basic farmland planning method of the improved density peak clustering algorithm, combines the nearest neighbor criterion and the self-exploration threshold to complete the allocation of non-cluster centers, and overcomes the associated error problem of the original allocation strategy.
[0098] (3) The present invention proposes a boundary correction strategy based on the basic farmland planning method of the improved density peak clustering algorithm, defines an intra-class connection ring based on KNN, corrects the distribution of boundary samples according to the sample distribution in the connection ring, improves the distribution accuracy of boundary samples, and thus improves the accuracy of clustering.
[0099] Existing methods mainly make delineations based on a single factor, lack research on comprehensive analysis of multiple factors, only consider the distance characteristics between samples and are sensitive to the cutoff distance parameter, and cannot accurately identify cluster centers with unclear density values. The present invention can accurately determine the density peak value of data sets with large differences in density during the clustering process of the basic farmland planning method based on the improved density peak clustering algorithm, ensure the accuracy of center selection, select multiple factors related to the delineation of basic farmland for comprehensive evaluation, and adjust the adjacency according to the spatial position relationship between the cultivated land plots to achieve the effect of high-quality cultivated land contiguousness, and finally determine the basic farmland protection area.
[0100] In addition, the present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of a basic farmland planning method based on an improved density peak clustering algorithm.
[0101] Furthermore, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a basic farmland planning method based on an improved density peak clustering algorithm.
[0102] Furthermore, the present invention also provides a computer device, including a processor, a memory, an input / output interface (Input / Output, referred to as I / O), a communication interface, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the basic farmland planning method based on the improved density peak clustering algorithm.
[0103] Wherein, the processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Wherein, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store pending transactions. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the basic farmland planning method based on the improved density peak clustering algorithm is implemented.
[0104] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0105] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present invention may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided by the present invention may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.
[0106] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0107] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A basic farmland planning method based on improved density peak clustering algorithm, It is characterized in that include: Constructing a geographic grid of cultivated land in the study area and obtaining attribute data of the geographic grid; the attribute data includes basic attribute data and accessibility attribute data; The basic attribute data include the number of cultivated land plots, the plot area and the average plot fractal dimension; the accessibility attribute data is the distance from the cultivated land plot to the main road, town or village; Normalize the attribute data of the geographic grid to obtain a set of farmland sample data; Based on the farmland sample data set, the cluster center of the farmland sample data is determined by using the fuzzy local density definition; According to the cluster center, the farmland sample data that is not in the cluster center is clustered by combining the self-exploration threshold method and the nearest neighbor principle to obtain the initial clustering results. The initial clustering result is corrected based on the boundary correction fusion strategy of K nearest neighbors to obtain the final clustering result; Based on the final clustering results, basic farmland protection areas are planned.
2. The basic farmland planning method based on the improved density peak clustering algorithm according to claim 1, It is characterized in that The step of constructing a geographic grid of cultivated land in the research area and obtaining attribute data of the geographic grid specifically includes: According to the minimum latitude and longitude range of cultivated land in the study area and the scale of spatial objects, equal longitude and latitude division is carried out to construct geographic grids; Based on the constructed geographic grid, the basic attribute data and accessibility attribute data of the geographic grid are obtained according to the concepts and connotations of high-standard farmland and farmland protection and the influencing factors of basic farmland protection zone planning.
3. The basic farmland planning method based on the improved density peak clustering algorithm according to claim 2, It is characterized in that The attribute data of the geographic grid is normalized to obtain a farmland sample data set, which specifically includes: After the geographic network is established, the corresponding attribute data is output in the form of a list and the formula Normalize the attribute data of the geographic grid; where x i is the value of a single attribute data in grid cell i; x imin is the minimum value of the column where the single attribute data in grid cell i is located; x imax is the maximum value of the column where a single attribute data is located in grid cell i; X i is the normalized value of a single attribute data in grid unit i; the farmland sample data set is X i A collection of .
4. The basic farmland planning method based on the improved density peak clustering algorithm according to claim 1, It is characterized in that The method of determining the cluster center of the farmland sample data by using the fuzzy local density definition based on the farmland sample data set specifically includes: According to X in the farmland sample data set i The Euclidean distance d between grid cell i and grid cell j is calculated ij ; Using fuzzy local density definition Determine the fuzzy local density ρ of grid cell i i ; where μ(d ij ) is the membership value of the fuzzy local density of grid unit j to grid unit i; Using formula Determine the relative distance δ of grid cell i i ; Using formula Determine the relative distance δ of the grid cell with the highest fuzzy local density h ; where h is the grid cell with the highest fuzzy local density; o is the grid cell other than h in the geographic grid; δ o is the relative distance to other grid cells o; According to i ,δ i and δ h Construct a decision graph and use the density peak in the decision graph as the cluster center.
5. The basic farmland planning method based on the improved density peak clustering algorithm according to claim 4, It is characterized in that According to the cluster center, the farmland sample data that is not in the cluster center is clustered by combining the self-exploration threshold method and the nearest neighbor principle to obtain the initial clustering results, which specifically include: According to the cluster center c of grid cell i i , using the self-exploration threshold method formula Calculate the distance threshold r of grid cell i i ;in, is the first unassigned cell closest to grid cell i; ||·|| 2 is the L2 norm; Combining the nearest neighbor principle and distance threshold r i , using the formula Get the allocation matrix A(i,j); Based on the allocation matrix A(i,j), the farmland sample data that are not cluster centers are clustered to obtain the initial clustering results.
6. The basic farmland planning method based on the improved density peak clustering algorithm according to claim 3, It is characterized in that The boundary correction fusion strategy based on K nearest neighbors corrects the initial clustering result to obtain the final clustering result, which specifically includes: For the case where there are grid cells of other clusters in the K nearest neighbors of the cluster boundary, the formula is used Calculate the K nearest neighbor radius r K ; Where n is the number of grid cells; is the distance x i The Kth nearest neighbor unit of The boundary grid cell in the geographic grid is taken as the center of the circle and the K Construct the K neighbor ranges of the bounding grid cell for the radius; The initial clustering result is modified through the K neighbor ranges to obtain the final clustering result.
7. The basic farmland planning method based on the improved density peak clustering algorithm according to claim 1, It is characterized in that The basic farmland protection area is planned based on the final clustering result, specifically including: A statistical analysis was performed on the attribute data of the relevant plots participating in the clustering in all categories included in the final clustering results, and the plots with concentrated cultivated land area, high cultivated land continuity index and high cultivated land utilization index in the attribute data were determined as basic farmland protection areas.
8. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the basic farmland planning method based on the improved density peak clustering algorithm described in any one of claims 1 to 7 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the basic farmland planning method based on the improved density peak clustering algorithm described in any one of claims 1 to 7 is implemented.
10. A computer device, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the basic farmland planning method based on the improved density peak clustering algorithm as described in any one of claims 1 to 7.
Citation Information
Cited By
Mine field zoning method based on regional uranium resources
CN119849892A
Earthquake event space-time density peak value clustering method and device, medium and electronic equipment
CN120123802A
