Field drip irrigation automatic zoning method and system based on improved k-means algorithm
Through the improved k-means algorithm and horned lizard optimization algorithm, combined with the random forest model to process the multi-dimensional state data of field plots, the problem of inaccurate plot clustering in the existing technology is solved, and the precise partitioning of field drip irrigation and Efficient irrigation improves irrigation effect and water resource utilization efficiency.
Patent Information
- Application Number
- CN202411320493.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2024-12-31
AI Technical Summary
Existing automatic partitioning methods are difficult to obtain accurate plot clustering results when dealing with complex farmland environments, resulting in poor irrigation results.
The improved k-means algorithm is adopted, combined with the random forest model and the horned lizard optimization algorithm, and by obtaining the multi-dimensional state data of the field plots, a more reasonable initial clustering center is generated, and the optimal or Close to the optimal clustering center to ensure the accuracy of partition results.
It improves the accuracy and stability of automatic zoning of field drip irrigation, ensures that the zoning results meet the actual conditions in the field, realizes the precise allocation and efficient utilization of water resources, reduces irrigation waste, and improves healthy growth and yield of crops.
Smart Images

Figure CN119226839A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and in particular to a method and system for automatic field drip irrigation zoning based on an improved k-means algorithm. Background Art
[0002] In modern agricultural irrigation practice, traditional irrigation methods often rely on experience or unified standards, ignoring the complexity and diversity of farmland environment. With the advancement of agricultural science and technology, especially the rapid development of Internet of Things, big data processing and analysis technology, intelligent irrigation systems have emerged, aiming to improve irrigation efficiency and reduce water waste through automation and intelligent means.
[0003] A key link in intelligent irrigation systems is the rational zoning of field areas so that targeted irrigation strategies can be developed based on the specific conditions of different areas. However, most current automatic zoning methods face many challenges in dealing with complex farmland environments. On the one hand, farmland environments contain a variety of factors that are difficult to quantify, which have a significant impact on irrigation demand; on the other hand, existing zoning methods often rely on a single algorithm or model, which makes it difficult to fully consider the diversity and dynamics of farmland environments, resulting in inaccurate zoning results, which in turn affects irrigation effectiveness. Summary of the invention
[0004] The technical problem to be solved by this application is to provide a method and system for automatic field drip irrigation partitioning based on an improved k-means algorithm, which can obtain accurate plot clustering results, thereby effectively improving the drip irrigation effect. The specific solution is as follows:
[0005] A method for automatic field drip irrigation partitioning based on an improved k-means algorithm, comprising:
[0006] Acquire status data of each plot in the field area, the status data including soil moisture, soil properties, crop types, crop distribution, crop growth status and terrain data;
[0007] Inputting the status data of each of the plots into a pre-trained random forest model to obtain N initial cluster centers output by the random forest model, where N is the number of clusters of the k-means algorithm;
[0008] Obtaining N optimal clustering centers according to a preset horned lizard optimization algorithm, the status data of each of the plots, and the N initial clustering centers;
[0009] Clustering each of the plots according to the status data of each plot and the N optimal clustering centers to obtain a clustering result for each plot, wherein the clustering result for each plot represents the irrigation type to which the plot belongs;
[0010] According to the clustering result of each of the plots, a drip irrigation scheme for each of the plots is determined.
[0011] In the above method, optionally, obtaining N optimal clustering centers according to a preset horned lizard optimization algorithm, the status data of each of the plots and the N initial clustering centers comprises:
[0012] Obtaining setting parameters of the horned lizard optimization algorithm; the setting parameters include a population size parameter, a maximum number of iterations, a step size parameter, a disturbance intensity, and a migration distance;
[0013] Generate a horned lizard population according to the N initial cluster centers, the status data of each of the plots, and the population size parameter; the horned lizard population includes a plurality of horned lizard individuals, and each horned lizard individual includes N candidate cluster centers;
[0014] Calculate the current fitness value of each horned lizard individual in the horned lizard population;
[0015] Adjust the step length parameter according to the current fitness value of each horned lizard individual;
[0016] The position of each horned lizard individual is adjusted according to the adjusted step length parameter and the first target horned lizard individual; the first target horned lizard individual is the horned lizard individual with the best global fitness value;
[0017] Generate a random vector, and randomly perturb the horned lizard individual after adjusting the position according to the random vector and the perturbation intensity;
[0018] For each horned lizard individual after random disturbance, when it is determined that the horned lizard individual meets the preset migration condition according to the fitness value of the horned lizard individual after random disturbance, the position of each horned lizard individual is migrated according to the migration distance and the second target horned lizard individual to complete the iteration; the second target horned lizard individual is any horned lizard individual in the current population;
[0019] Calculate the fitness value of each horned lizard individual in the iterated horned lizard population, and determine the horned lizard individual with the best current global fitness value according to the fitness value of each horned lizard individual in the iterated horned lizard population;
[0020] When the number of iterations of the horned lizard population is less than a preset iteration number threshold, returning to the step of adjusting the step size parameter according to the current fitness value of each horned lizard individual;
[0021] When the iteration number of the horned lizard population is not less than a preset iteration number threshold, the N optimal clustering centers of the k-means algorithm are determined according to the horned lizard individuals with the best current global fitness values.
[0022] In the above method, optionally, the step of obtaining status data of each plot in the field area includes:
[0023] Obtaining initial status data of each plot in the field area;
[0024] The initial state data of each plot in the field area are preprocessed to obtain the state data of each plot in the field area.
[0025] In the above method, optionally, determining the drip irrigation scheme for each plot of land according to the clustering result of each plot of land comprises:
[0026] According to the clustering result of each of the plots, each of the plots is divided into a plurality of drip irrigation areas;
[0027] Determine the irrigation time, irrigation amount and irrigation frequency of each of the drip irrigation areas;
[0028] An irrigation plan for the plot in each drip irrigation area is generated according to the irrigation time, irrigation amount and irrigation frequency of each drip irrigation area.
[0029] The above method may, optionally, after determining the drip irrigation scheme for each plot of land according to the clustering result of each plot of land, further include:
[0030] Drip irrigation is performed on each of the plots according to the drip irrigation scheme of each of the plots;
[0031] After drip irrigation is performed on each of the plots, target state data of each of the plots is collected; the target state data includes soil moisture change data and crop growth data;
[0032] The drip irrigation effect of the drip irrigation scheme of each plot of land is determined according to the target state data of each plot of land.
[0033] An automatic field drip irrigation zoning system based on an improved k-means algorithm includes:
[0034] An acquisition unit, used for acquiring status data of each plot in the field area, wherein the status data includes soil moisture, soil properties, crop types, crop distribution, crop growth status and terrain data;
[0035] A first execution unit is used to input the status data of each of the plots into a pre-trained random forest model to obtain N initial cluster centers output by the random forest model, where N is the number of clusters of the k-means algorithm;
[0036] A second execution unit is used to obtain N optimal clustering centers according to a preset horned lizard optimization algorithm, the status data of each of the plots and the N initial clustering centers;
[0037] A clustering unit, configured to cluster each of the plots according to the status data of each of the plots and the N optimal clustering centers, to obtain a clustering result for each of the plots, wherein the clustering result for each plot represents the irrigation type to which the plot belongs;
[0038] The first determining unit is used to determine the drip irrigation scheme of each of the plots according to the clustering result of each of the plots.
[0039] In the above system, optionally, the second execution unit includes:
[0040] A first acquisition subunit is used to acquire setting parameters of the horned lizard optimization algorithm; the setting parameters include a population size parameter, a maximum number of iterations, a step size parameter, a disturbance intensity, and a migration distance;
[0041] A first generating subunit is used to generate a horned lizard population according to the N initial clustering centers, the status data of each of the plots, and the population size parameter; the horned lizard population includes a plurality of horned lizard individuals, and each horned lizard individual includes N candidate clustering centers;
[0042] The first calculation subunit is used to calculate the current fitness value of each horned lizard individual in the horned lizard population;
[0043] A first adjusting subunit, used for adjusting the step length parameter according to the current fitness value of each horned lizard individual;
[0044] The second adjusting subunit is used to adjust the position of each horned lizard individual according to the adjusted step length parameter and the first target horned lizard individual; the first target horned lizard individual is the horned lizard individual with the best global fitness value;
[0045] A second generating subunit is used to generate a random vector, and randomly perturb the horned lizard individual after adjusting the position according to the random vector and the perturbation intensity;
[0046] A migration subunit is used for, for each randomly disturbed horned lizard individual, when it is determined according to the fitness value of the randomly disturbed horned lizard individual that the horned lizard individual meets the preset migration condition, migrating the position of each horned lizard individual according to the migration distance and a second target horned lizard individual to complete iteration; the second target horned lizard individual is any horned lizard individual in the current population;
[0047] The second calculation subunit is used to calculate the fitness value of each horned lizard individual in the iterated horned lizard population, and determine the horned lizard individual with the best current global fitness value according to the fitness value of each horned lizard individual in the iterated horned lizard population;
[0048] A first execution subunit is used for returning to trigger the first adjustment subunit to execute the step of adjusting the step size parameter according to the current fitness value of each individual horned lizard when the number of iterations of the horned lizard population is less than a preset iteration number threshold;
[0049] The second execution subunit is used to determine N optimal clustering centers of the k-means algorithm according to the horned lizard individual with the best current global fitness value when the iteration number of the horned lizard population is not less than a preset iteration number threshold.
[0050] In the above system, optionally, the acquisition unit includes:
[0051] The second acquisition subunit is used to acquire the initial state data of each plot in the field area;
[0052] The preprocessing subunit is used to perform a preprocessing operation on the initial state data of each plot in the field area to obtain the state data of each plot in the field area.
[0053] In the above system, optionally, the first determining unit includes:
[0054] A third execution subunit is used to divide each of the plots into a plurality of drip irrigation areas according to the clustering result of each of the plots;
[0055] A determination subunit, used to determine the irrigation time, irrigation amount and irrigation frequency of each of the drip irrigation areas;
[0056] The third generating subunit is used to generate an irrigation plan for the plot of each drip irrigation area according to the irrigation time, irrigation amount and irrigation frequency of each drip irrigation area.
[0057] The above system may optionally further include:
[0058] A control unit, configured to perform drip irrigation on each of the plots according to the drip irrigation scheme of each of the plots;
[0059] A collection unit, used for collecting target state data of each plot of land after drip irrigation is performed on each plot of land; the target state data includes soil moisture change data and crop growth data;
[0060] The determination unit is used to determine the drip irrigation effect of the drip irrigation scheme of each of the plots according to the target state data of each of the plots.
[0061] Based on the above-mentioned implementation of the present application, a field drip irrigation automatic zoning method and system based on an improved k-means algorithm are provided to obtain status data of each plot in the field area, wherein the status data includes soil moisture, soil properties, crop types, crop distribution, crop growth status and terrain data; the status data of each plot is input into a pre-trained random forest model to obtain N initial clustering centers output by the random forest model, where N is the number of clusters of the k-means algorithm; according to the preset horned lizard optimization algorithm, the status data of each plot and the N initial clustering centers, N optimal clustering centers are obtained; according to the status data of each plot and the N optimal clustering centers, each plot is clustered to obtain a clustering result for each plot, wherein the clustering result of each plot represents the irrigation type to which the plot belongs; according to the clustering result of each plot, the drip irrigation scheme for each plot is determined. The method provided in this application is applied. By introducing the random forest model as a preprocessing step, using its advantages in processing complex data, key features are extracted from the multi-dimensional state data of the field plots, and more reasonable initial clustering centers are generated, which effectively avoids the randomness of the initial clustering center selection of the traditional k-means algorithm and improves the stability and accuracy of the clustering process. The initial clustering center can be further optimized in combination with the horned lizard optimization algorithm. The horned lizard optimization algorithm, with its good global search ability and fast convergence, can quickly find the optimal or near-optimal clustering center in the complex search space, thereby further improving the clustering effect and ensuring that the partitioning results are more in line with the actual field conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0063] Figure 1 A method flow chart of a field drip irrigation automatic partitioning method based on an improved k-means algorithm provided in this application;
[0064] Figure 2 A flowchart of a process for obtaining N optimal cluster centers provided in this application;
[0065] Figure 3 A flowchart of a process for determining a drip irrigation plan for each plot of land provided for this application;
[0066] Figure 4A structural schematic diagram of a field drip irrigation automatic zoning system based on an improved k-means algorithm provided in this application. DETAILED DESCRIPTION
[0067] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0068] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0069] The embodiment of the present invention provides a method for automatic field drip irrigation partitioning based on an improved k-means algorithm, which is applied to electronic equipment. The method flow chart of the method is as follows: Figure 1 As shown, specifically including:
[0070] S101: Acquire status data of each plot in a field area, wherein the status data includes soil moisture, soil properties, crop types, crop distribution, crop growth status, and terrain data.
[0071] In this embodiment, the soil moisture may include at least one of real-time moisture and historical moisture, wherein the real-time moisture may be the soil moisture value of each area of the field monitored by the sensor. The historical moisture may be a record of soil moisture over a period of time in the past, which may be used to analyze moisture trends.
[0072] In this embodiment, the crop types may be wheat, corn, vegetables, etc.; the crop distribution may be the specific location distribution of each crop in the field, for example, it may be GPS coordinates or field numbers.
[0073] In this embodiment, the terrain data may include at least one of altitude, slope and terrain type. The altitude may be the altitude difference between different areas of the field. The slope may be the inclination angle of different areas of the field, which has an important influence on the flow and accumulation of water. The terrain type may be plains, hills, mountains, etc. Different terrains have different requirements for irrigation.
[0074] Optionally, the crop growth status may include at least one of the information of growth stage, nutritional status, etc. Crops at different growth stages have different requirements for water, and the nutritional status of crops (such as the lack or excess of nutrients such as nitrogen, phosphorus, potassium, etc.) will also affect their demand for water.
[0075] Optionally, the soil properties may include at least one of soil type, soil pH, organic matter content and salt content. Soil type may include sandy soil, loam, clay, etc. Organic matter content may be the proportion of organic matter in the soil, reflecting soil fertility.
[0076] In some embodiments, the status data of the plot may also include meteorological information of the plot, such as rainfall data, temperature data, air humidity data (affecting water evaporation), and wind speed data (affecting the evaporation rate of water).
[0077] In some embodiments, the status data of a plot may include fertilization records, such as fertilizer type and amount, etc.; the status data of a plot may also include irrigation records, which may include historical irrigation time and historical irrigation amount. The status data of a plot may also include pest and disease conditions. The occurrence of pests and diseases in different areas may require adjustment of irrigation strategies.
[0078] In this embodiment, by comprehensively analyzing the features in the status data of the plots, areas with similar characteristics can be effectively identified, and a reasonable irrigation plan can be formulated accordingly.
[0079] In an implementation provided by the present application, based on the above solution, optionally, the step of obtaining status data of each plot in the field area includes:
[0080] Obtaining initial status data of each plot in the field area;
[0081] The initial state data of each plot in the field area are preprocessed to obtain the state data of each plot in the field area.
[0082] In this embodiment, the preprocessing may be operations such as data cleaning and data conversion.
[0083] Optionally, the initial state data may include sensor data collected by various types of sensors, image data collected by satellites, location data, etc.
[0084] S102: Inputting the status data of each of the plots into a pre-trained random forest model to obtain N initial clustering centers output by the random forest model, where N is the number of clusters of the k-means algorithm.
[0085] In this embodiment, the trained random forest model can be used to predict the initial clustering center of the k-means algorithm.
[0086] In some embodiments, a first training data set can be obtained, and each first training sample in the first training data set includes historical state data X and a cluster label Y; then, an initial random forest model is trained using the first training samples in the first training data set; when the number of training times of the initial random forest model is greater than a preset training number threshold, the initial random forest model is determined as a trained random forest model.
[0087] S103: Obtain N optimal clustering centers according to a preset horned lizard optimization algorithm, the status data of each of the plots, and the N initial clustering centers.
[0088] In this embodiment, a horned lizard population can be generated according to the status data of the land parcel and N initial clustering centers, and then the horned lizard population can be optimized to obtain N optimal clustering centers.
[0089] S104: Clustering each of the plots according to the status data of each of the plots and the N optimal clustering centers to obtain a clustering result for each of the plots, wherein the clustering result for each plot represents the irrigation type to which the plot belongs.
[0090] Optionally, a k-means algorithm improved based on random forest and horned lizard optimization algorithm can be run, so that each plot can be clustered according to the status data of each plot and N optimal clustering centers, so as to obtain the clustering result of each plot.
[0091] S105: Determine a drip irrigation plan for each of the plots of land according to the clustering result of each of the plots of land.
[0092] The method provided in this application is applied. By introducing the random forest model as a preprocessing step, using its advantages in processing complex data, key features are extracted from the multi-dimensional state data of the field plots, and more reasonable initial clustering centers are generated, which effectively avoids the randomness of the initial clustering center selection of the traditional k-means algorithm and improves the stability and accuracy of the clustering process. The initial clustering center can be further optimized in combination with the horned lizard optimization algorithm. The horned lizard optimization algorithm, with its good global search ability and fast convergence, can quickly find the optimal or near-optimal clustering center in the complex search space, thereby further improving the clustering effect and ensuring that the partitioning results are more in line with the actual field conditions.
[0093] In an implementation provided by the present application, based on the above scheme, optionally, the preset horned lizard optimization algorithm, the state data of each of the plots and the N initial clustering centers are used to obtain N optimal clustering centers, such as Figure 2 As shown, including:
[0094] S201: Obtaining setting parameters of the horned lizard optimization algorithm; the setting parameters include a population size parameter, a maximum number of iterations, a step size parameter, a disturbance intensity, and a migration distance;
[0095] In this embodiment, the population size Np of horned lizards is set, the maximum number of iterations T is set, and the behavioral parameters of horned lizards are set, such as the step size parameter α of skin color change, the disturbance intensity β of blood spraying, and the migration distance γ of movement escape.
[0096] S202: Generate a horned lizard population according to the N initial cluster centers, the status data of each of the plots, and the population size parameter; the horned lizard population includes a plurality of horned lizard individuals, and each horned lizard individual includes N candidate cluster centers.
[0097] In this embodiment, a horned lizard population P is initialized according to N initial cluster centers, the status data of each plot, and the population size parameter. Each individual p i represents a set of cluster centers, i.e., pi = (c1,i,c2,i,…,ck,i), where cj,i is the representation of the j-th cluster center in the i-th individual.
[0098] S203: Calculate the current fitness value of each horned lizard individual in the horned lizard population.
[0099] In this embodiment, for each horned lizard p i , calculate its fitness value F i , that is, the total sum of squared errors (SSE) under this group of cluster centers:
[0100]
[0101] Among them, C j refers to the set of all data points assigned to the jth cluster.
[0102] S204: Adjusting the step length parameter according to the current fitness value of each horned lizard individual.
[0103] In this embodiment, a step size adjustment factor δ is set, which is usually a positive number between 0 and 1 and is used to adjust the step size.
[0104] In this embodiment, the current individual p i The step size is dynamically adjusted based on the gap between the fitness value and the historical best fitness value.
[0105] ΔF=F i -F best
[0106] Among them, Fi For the horned lizard individual p i The fitness value, F best is the best fitness value in history.
[0107] If ΔF<0, it means that the current individual's fitness is better than the historical best, and the step size can be appropriately increased; otherwise, the step size should be reduced.
[0108]
[0109] Among them, α i It can be a horned lizard individual p i The step size parameter.
[0110] S205: adjusting the position of each horned lizard individual according to the adjusted step length parameter and the first target horned lizard individual; the first target horned lizard individual is the horned lizard individual with the best global fitness value.
[0111] In this embodiment, the position of each horned lizard individual is adjusted according to the adjusted step length parameter and the first target horned lizard individual to complete the skin color change operation of the horned lizard optimization algorithm, and the specific method is as follows:
[0112] p i =p i +α i ·(gp i )
[0113] In this embodiment, g is the current global optimal solution, α i It can be adjusted dynamically according to the fitness value.
[0114] S206: Generate a random vector, and perform random perturbations on the horned lizard individuals after adjusting their positions according to the random vector and the perturbation intensity.
[0115] In this embodiment, the horned lizard individual after adjusting the position is randomly disturbed according to the random vector and the disturbance intensity to complete the blood spraying operation of the horned lizard optimization algorithm, and the specific method is as follows:
[0116] p i =p i +β·∈
[0117] Where β is the perturbation intensity and ∈ is a random vector following a normal distribution.
[0118] S207: For each horned lizard individual after random disturbance, when it is determined that the horned lizard individual meets the preset migration condition according to the fitness value of the horned lizard individual after the random disturbance, the position of each horned lizard individual is migrated according to the migration distance and the second target horned lizard individual to complete the iteration; the second target horned lizard individual is any horned lizard individual in the current population.
[0119] In this embodiment, the migration condition may be that the horned lizard individual has not significantly improved its fitness value in L consecutive iterations, for example, in L consecutive iterations, the difference between the fitness values of any two adjacent iterations is less than a preset improvement threshold. In this case, the horned lizard individual that meets the migration condition may be migrated to a new location:
[0120] p i =p r +γ·(gp r )
[0121] where p r is an individual randomly selected from the current population, and γ is a parameter that controls the migration distance.
[0122] Optionally, when the horned lizard individual does not meet the migration condition, the position of the horned lizard individual may not be migrated, and the horned lizard individual is determined to complete the current iteration.
[0123] S208: Calculate the fitness value of each horned lizard individual in the iterated horned lizard population, and determine the horned lizard individual with the best current global fitness value according to the fitness value of each horned lizard individual in the iterated horned lizard population.
[0124] S209: Determine whether the iteration number of the horned lizard population is less than a preset iteration number threshold; if so, return to execute S204, if not, execute S210.
[0125] S210: Determine N optimal clustering centers of the k-means algorithm according to the horned lizard individual with the best current global fitness value.
[0126] In an implementation provided by the present application, based on the above solution, optionally, the process of determining the drip irrigation scheme for each plot of land according to the clustering result of each plot of land is as follows: Figure 3 As shown, including:
[0127] S301: Divide each of the land parcels into a plurality of drip irrigation areas according to the clustering result of each of the land parcels.
[0128] In this embodiment, the clustering results of the plots in one irrigation area are the same.
[0129] S302: Determine the irrigation time, irrigation amount and irrigation frequency of each drip irrigation area.
[0130] In this embodiment, the irrigation time, irrigation amount and irrigation frequency of each drip irrigation area can be determined according to the status data of the plots with the same clustering result in the irrigation area.
[0131] In some embodiments, the irrigation time, irrigation amount, and irrigation frequency for each irrigation zone can be set by a technician.
[0132] S303: Generate an irrigation plan for each plot of the drip irrigation area according to the irrigation time, irrigation amount and irrigation frequency of each drip irrigation area.
[0133] By applying the method provided by this neural embodiment, based on the optimized clustering results, the field plots can be accurately divided into different irrigation type areas, and personalized drip irrigation plans can be formulated according to the characteristics of different areas to achieve accurate allocation and efficient use of water resources, reduce waste, and improve irrigation efficiency. Through precision irrigation, the irrigation needs of different plots and different crops at different growth stages can be met, which is conducive to the healthy growth of crops, improves crop yield and quality, and reduces the occurrence of pests and diseases caused by over-irrigation or insufficient irrigation, thereby reducing agricultural production costs.
[0134] In some embodiments, suppose a field is clustered and four different clusters are obtained, each with its own specific feature combination:
[0135] Cluster result 1: The soil moisture is high, the crop is rice, and the terrain is flat.
[0136] Cluster result 2: The soil moisture is moderate, the crop is corn, and the terrain is slightly undulating.
[0137] Cluster result 3: The soil moisture is low, the crop is soybean, and the terrain is steep.
[0138] Cluster 4: soil moisture is very low, crops are drought-tolerant, and the terrain is very rugged.
[0139] For these four clusters, we can formulate different irrigation strategies respectively:
[0140] Solution for cluster result 1: Due to the high soil moisture, the number of irrigation times can be reduced to avoid excessive moisture that may cause root rot.
[0141] Solution for cluster result 2: The soil moisture is moderate, and regular irrigation frequency is sufficient.
[0142] Solution for cluster result 3: Due to low soil moisture, it is necessary to increase the number of irrigation times to ensure that the soil maintains an appropriate moisture level.
[0143] Solutions for cluster 4: For very dry soils, special irrigation systems, such as deep irrigation, may be needed to ensure adequate water supply for drought-tolerant crops.
[0144] In an implementation provided by the present application, based on the above solution, optionally, after determining the drip irrigation solution for each plot of land according to the clustering result of each plot of land, the method further includes:
[0145] Drip irrigation is performed on each of the plots according to the drip irrigation scheme of each of the plots;
[0146] After drip irrigation is performed on each of the plots, target state data of each of the plots is collected; the target state data includes soil moisture change data and crop growth data;
[0147] The drip irrigation effect of the drip irrigation scheme of each plot of land is determined according to the target state data of each plot of land.
[0148] In this embodiment, after the drip irrigation scheme for each plot is determined, the controller in the drip irrigation control system executes the drip irrigation scheme.
[0149] Optionally, the drip irrigation effect may include one of insufficient drip irrigation, sufficient drip irrigation and excessive drip irrigation.
[0150] In this embodiment, the target state data of each plot of land is input into a pre-trained neural network model to obtain a drip irrigation recognition result of each plot of land; the drip irrigation recognition result represents the drip irrigation effect of the plot of land.
[0151] Optionally, the neural network model may include an input layer, a convolutional neural network model CNN, a recurrent neural network RNN and an output module. The target state data of the plot can be input into the input layer of the trained neural network model, and then the convolutional neural network model can be used to process the crop growth data to obtain convolution features, and the recurrent neural network can be used to process the soil moisture change data to obtain time series features; the output module can be used to obtain the drip irrigation recognition results of the plot based on the convolution features and time series features.
[0152] In some embodiments, whether the drip irrigation scheme of each plot of land meets the adjustment conditions is determined according to the drip irrigation effect of each plot of land; if the adjustment conditions are met, the drip irrigation scheme adjustment prompt information of the plot of land is generated and output according to the drip irrigation effect of the plot of land.
[0153] Optionally, when the drip irrigation effect of the plot is insufficient drip irrigation or excessive drip irrigation, it is determined that the drip irrigation scheme of the plot meets the adjustment conditions.
[0154] Optionally, in the case of insufficient drip irrigation, a first prompt message may be output to increase the irrigation frequency, irrigation amount, etc. of the plot. In the case of excessive drip irrigation, a second prompt message may be output to reduce the irrigation frequency, irrigation amount, etc. of the plot.
[0155] In some embodiments, the process of training a neural network model may include: obtaining an initial neural network model and a second training data set; each second training sample in the second training data set includes historical target state data and a drip irrigation effect label; the drip irrigation effect label of each second training sample includes one of insufficient drip irrigation, sufficient drip irrigation and excessive drip irrigation; using the second training data set to train the initial neural network model, and when the number of training times of the initial neural network model meets a preset second training number threshold, determining the initial neural network model as a trained neural network model.
[0156] See also Figure 4 , is a structural schematic diagram of a field drip irrigation automatic zoning system based on an improved k-means algorithm provided in an embodiment of the present application, the field drip irrigation automatic zoning system based on the improved k-means algorithm includes:
[0157] An acquisition unit 401 is used to acquire status data of each plot in a field area, wherein the status data includes soil moisture, soil properties, crop types, crop distribution, crop growth status, and terrain data;
[0158] The first execution unit 402 is used to input the status data of each of the plots into a pre-trained random forest model to obtain N initial cluster centers output by the random forest model, where N is the number of clusters of the k-means algorithm;
[0159] The second execution unit 403 is used to obtain N optimal clustering centers according to a preset horned lizard optimization algorithm, the status data of each of the plots and the N initial clustering centers;
[0160] A clustering unit 404 is used to cluster each of the plots according to the status data of each of the plots and the N optimal clustering centers to obtain a clustering result for each of the plots, wherein the clustering result for each plot represents the irrigation type to which the plot belongs;
[0161] The first determining unit 405 is used to determine the drip irrigation scheme for each of the plots according to the clustering result of each of the plots.
[0162] In an embodiment provided in the present application, based on the above solution, optionally, the second execution unit 403 includes:
[0163] A first acquisition subunit is used to acquire setting parameters of the horned lizard optimization algorithm; the setting parameters include a population size parameter, a maximum number of iterations, a step size parameter, a disturbance intensity, and a migration distance;
[0164] A first generating subunit is used to generate a horned lizard population according to the N initial clustering centers, the status data of each of the plots, and the population size parameter; the horned lizard population includes a plurality of horned lizard individuals, and each horned lizard individual includes N candidate clustering centers;
[0165] The first calculation subunit is used to calculate the current fitness value of each horned lizard individual in the horned lizard population;
[0166] A first adjusting subunit, used for adjusting the step length parameter according to the current fitness value of each horned lizard individual;
[0167] The second adjusting subunit is used to adjust the position of each horned lizard individual according to the adjusted step length parameter and the first target horned lizard individual; the first target horned lizard individual is the horned lizard individual with the best global fitness value;
[0168] A second generating subunit is used to generate a random vector, and randomly perturb the horned lizard individual after adjusting the position according to the random vector and the perturbation intensity;
[0169] A migration subunit is used for, for each randomly disturbed horned lizard individual, when it is determined according to the fitness value of the randomly disturbed horned lizard individual that the horned lizard individual meets the preset migration condition, migrating the position of each horned lizard individual according to the migration distance and a second target horned lizard individual to complete iteration; the second target horned lizard individual is any horned lizard individual in the current population;
[0170] The second calculation subunit is used to calculate the fitness value of each horned lizard individual in the iterated horned lizard population, and determine the horned lizard individual with the best current global fitness value according to the fitness value of each horned lizard individual in the iterated horned lizard population;
[0171] A first execution subunit is used for returning to trigger the first adjustment subunit to execute the step of adjusting the step size parameter according to the current fitness value of each individual horned lizard when the number of iterations of the horned lizard population is less than a preset iteration number threshold;
[0172] The second execution subunit is used to determine N optimal clustering centers of the k-means algorithm according to the horned lizard individual with the best current global fitness value when the iteration number of the horned lizard population is not less than a preset iteration number threshold.
[0173] In an embodiment provided in the present application, based on the above solution, optionally, the acquisition unit 401 includes:
[0174] The second acquisition subunit is used to acquire the initial state data of each plot in the field area;
[0175] The preprocessing subunit is used to perform a preprocessing operation on the initial state data of each plot in the field area to obtain the state data of each plot in the field area.
[0176] In an embodiment provided in the present application, based on the above solution, optionally, the first determining unit 405 includes:
[0177] A third execution subunit is used to divide each of the plots into a plurality of drip irrigation areas according to the clustering result of each of the plots;
[0178] A determination subunit, used to determine the irrigation time, irrigation amount and irrigation frequency of each of the drip irrigation areas;
[0179] The third generating subunit is used to generate an irrigation plan for the plot of each drip irrigation area according to the irrigation time, irrigation amount and irrigation frequency of each drip irrigation area.
[0180] In an embodiment provided in the present application, based on the above solution, optionally, it further includes:
[0181] A control unit, configured to perform drip irrigation on each of the plots according to the drip irrigation scheme of each of the plots;
[0182] A collection unit, used for collecting target state data of each plot of land after drip irrigation is performed on each plot of land; the target state data includes soil moisture change data and crop growth data;
[0183] The determination unit is used to determine the drip irrigation effect of the drip irrigation scheme of each of the plots according to the target state data of each of the plots.
[0184] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0185] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
[0186] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0187] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0188] The above is a detailed introduction to the field drip irrigation automatic zoning method based on the improved k-means algorithm provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for automatic field drip irrigation partitioning based on an improved k-means algorithm, characterized in that: include: Acquire status data of each plot in the field area, the status data including soil moisture, soil properties, crop types, crop distribution, crop growth status and terrain data; Inputting the status data of each of the plots into a pre-trained random forest model to obtain N initial cluster centers output by the random forest model, where N is the number of clusters of the k-means algorithm; Obtaining N optimal clustering centers according to a preset horned lizard optimization algorithm, the status data of each of the plots, and the N initial clustering centers; Clustering each of the plots according to the status data of each plot and the N optimal clustering centers to obtain a clustering result for each plot, wherein the clustering result for each plot represents the irrigation type to which the plot belongs; According to the clustering result of each of the plots, a drip irrigation scheme for each of the plots is determined.
2. The method according to claim 1, characterized in that: The method of obtaining N optimal clustering centers according to the preset horned lizard optimization algorithm, the status data of each of the plots and the N initial clustering centers includes: Obtaining setting parameters of the horned lizard optimization algorithm; the setting parameters include a population size parameter, a maximum number of iterations, a step size parameter, a disturbance intensity, and a migration distance; Generate a horned lizard population according to the N initial cluster centers, the status data of each of the plots, and the population size parameter; the horned lizard population includes a plurality of horned lizard individuals, and each horned lizard individual includes N candidate cluster centers; Calculate the current fitness value of each horned lizard individual in the horned lizard population; Adjust the step length parameter according to the current fitness value of each horned lizard individual; The position of each horned lizard individual is adjusted according to the adjusted step length parameter and the first target horned lizard individual; the first target horned lizard individual is the horned lizard individual with the best global fitness value; Generate a random vector, and randomly perturb the horned lizard individual after adjusting the position according to the random vector and the perturbation intensity; For each horned lizard individual after random disturbance, when it is determined that the horned lizard individual meets the preset migration condition according to the fitness value of the horned lizard individual after random disturbance, the position of each horned lizard individual is migrated according to the migration distance and the second target horned lizard individual to complete the iteration; the second target horned lizard individual is any horned lizard individual in the current population; Calculate the fitness value of each horned lizard individual in the iterated horned lizard population, and determine the horned lizard individual with the best current global fitness value according to the fitness value of each horned lizard individual in the iterated horned lizard population; When the number of iterations of the horned lizard population is less than a preset iteration number threshold, returning to the step of adjusting the step size parameter according to the current fitness value of each horned lizard individual; When the iteration number of the horned lizard population is not less than a preset iteration number threshold, the N optimal clustering centers of the k-means algorithm are determined according to the horned lizard individuals with the best current global fitness values.
3. The method according to claim 1, characterized in that The step of obtaining status data of each plot in the field area includes: Obtaining initial status data of each plot in the field area; The initial state data of each plot in the field area are preprocessed to obtain the state data of each plot in the field area.
4. The method according to claim 1, characterized in that Determining the drip irrigation scheme for each plot of land according to the clustering result of each plot of land includes: According to the clustering result of each plot, each plot is divided into a plurality of drip irrigation areas; Determine the irrigation time, irrigation amount and irrigation frequency of each of the drip irrigation areas; An irrigation plan for the plot in each drip irrigation area is generated according to the irrigation time, irrigation amount and irrigation frequency of each drip irrigation area.
5. The method according to claim 1, characterized in that After determining the drip irrigation scheme for each plot of land according to the clustering result of each plot of land, the method further includes: Drip irrigation is performed on each of the plots according to the drip irrigation scheme of each of the plots; After drip irrigation is performed on each of the plots, target state data of each of the plots is collected; the target state data includes soil moisture change data and crop growth data; The drip irrigation effect of the drip irrigation scheme of each plot of land is determined according to the target state data of each plot of land.
6. A field drip irrigation automatic zoning system based on an improved k-means algorithm, characterized in that: include: An acquisition unit, used for acquiring status data of each plot in the field area, wherein the status data includes soil moisture, soil properties, crop types, crop distribution, crop growth status and terrain data; A first execution unit is used to input the status data of each of the plots into a pre-trained random forest model to obtain N initial cluster centers output by the random forest model, where N is the number of clusters of the k-means algorithm; A second execution unit is used to obtain N optimal clustering centers according to a preset horned lizard optimization algorithm, the status data of each of the plots and the N initial clustering centers; A clustering unit, configured to cluster each of the plots according to the status data of each of the plots and the N optimal clustering centers, to obtain a clustering result for each of the plots, wherein the clustering result for each plot represents the irrigation type to which the plot belongs; The first determining unit is used to determine the drip irrigation scheme of each of the plots according to the clustering result of each of the plots.
7. The system according to claim 6, characterized in that The second execution unit includes: A first acquisition subunit is used to acquire setting parameters of the horned lizard optimization algorithm; the setting parameters include a population size parameter, a maximum number of iterations, a step size parameter, a disturbance intensity, and a migration distance; A first generating subunit is used to generate a horned lizard population according to the N initial clustering centers, the status data of each of the plots, and the population size parameter; the horned lizard population includes a plurality of horned lizard individuals, and each horned lizard individual includes N candidate clustering centers; The first calculation subunit is used to calculate the current fitness value of each horned lizard individual in the horned lizard population; A first adjusting subunit, used for adjusting the step length parameter according to the current fitness value of each horned lizard individual; The second adjusting subunit is used to adjust the position of each horned lizard individual according to the adjusted step length parameter and the first target horned lizard individual; the first target horned lizard individual is the horned lizard individual with the best global fitness value; A second generating subunit is used to generate a random vector, and randomly perturb the horned lizard individual after adjusting the position according to the random vector and the perturbation intensity; A migration subunit is used for, for each randomly disturbed horned lizard individual, when it is determined according to the fitness value of the randomly disturbed horned lizard individual that the horned lizard individual meets the preset migration condition, migrating the position of each horned lizard individual according to the migration distance and a second target horned lizard individual to complete iteration; the second target horned lizard individual is any horned lizard individual in the current population; The second calculation subunit is used to calculate the fitness value of each horned lizard individual in the iterated horned lizard population, and determine the horned lizard individual with the best current global fitness value according to the fitness value of each horned lizard individual in the iterated horned lizard population; A first execution subunit is used for returning to trigger the first adjustment subunit to execute the step of adjusting the step size parameter according to the current fitness value of each individual horned lizard when the number of iterations of the horned lizard population is less than a preset iteration number threshold; The second execution subunit is used to determine N optimal clustering centers of the k-means algorithm according to the horned lizard individual with the best current global fitness value when the iteration number of the horned lizard population is not less than a preset iteration number threshold.
8. The system of claim 6, wherein: The acquisition unit comprises: The second acquisition subunit is used to acquire the initial state data of each plot in the field area; The preprocessing subunit is used to perform a preprocessing operation on the initial state data of each plot in the field area to obtain the state data of each plot in the field area.
9. The system of claim 6, wherein: The first determining unit includes: A third execution subunit is used to divide each of the plots into a plurality of drip irrigation areas according to the clustering result of each of the plots; A determination subunit, used to determine the irrigation time, irrigation amount and irrigation frequency of each of the drip irrigation areas; The third generating subunit is used to generate an irrigation plan for the plot of each drip irrigation area according to the irrigation time, irrigation amount and irrigation frequency of each drip irrigation area.
10. The system according to claim 6, characterized in that Also includes: A control unit, configured to perform drip irrigation on each of the plots according to the drip irrigation scheme of each of the plots; A collection unit, used for collecting target state data of each plot of land after drip irrigation is performed on each plot of land; The target state data includes soil moisture change data and crop growth data; The determination unit is used to determine the drip irrigation effect of the drip irrigation scheme of each of the plots according to the target state data of each of the plots.
Citation Information
Cited By
Irrigation area irrigation water demand prediction method based on unmanned aerial vehicle remote sensing
CN120236209A
Intelligent drip irrigation system and method for vegetable greenhouse
CN120898667A
Irrigated area water-saving irrigation control system fused with Internet of Things technology
CN120959132A
