Water and fertilizer control method based on Internet of Things

Through real-time monitoring and intelligent adjustment of IoT technology, the problems of resource waste and inhomogeneity in traditional water and fertilizer irrigation methods are solved, and accurate and efficient control of crop water and fertilizer management is achieved.

CN119087862AInactive Publication Date: 2024-12-06LIAOCHENG GUOXINGXINGNONG AGRICULTURAL SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411211834.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional water and fertilizer irrigation methods cannot be adjusted according to the actual water demand of crops, resulting in waste of water and fertilizer resources and uneven irrigation, low management efficiency and high cost.

Method used

Using the Internet of Things water and fertilizer control method, we will use real-time monitoring of soil water and fertilizer concentration, meteorological conditions and crop water demand, combined with intelligent data processing and deep reinforcement learning, and build intelligent irrigation regulation strategies for water and fertilizer to achieve accurate monitoring and control of crop areas.

Benefits of technology

The efficiency and accuracy of water and fertilizer management have been improved, and the precise adjustment of the irrigation amount of water and fertilizer in different crop areas has been achieved, which has improved the quality and management efficiency of crop growth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119087862A_ABST
    Figure CN119087862A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of water and fertilizer control, and discloses a water and fertilizer control method based on the Internet of Things, and the method comprises the steps: obtaining the size of a crop region and crop distribution information, deploying a soil water and fertilizer concentration sensor, and collecting soil water and fertilizer concentration data; calculating and predicting the water and fertilizer concentration distribution condition of the crop area; crop images are collected, crop characteristic parameters are extracted, and crop health conditions are evaluated; and constructing a water and fertilizer intelligent irrigation adjustment strategy to adjust and control the water and fertilizer irrigation amount. According to the method, position variation is carried out by adopting a multi-group self-adaptive disturbance mode, a variation processing result with global variability is quickly obtained, falling into a local optimal solution is avoided, soil water and fertilizer concentration data of all crop areas are acquired, and the water and fertilizer concentration distribution condition is predicted; the water and fertilizer irrigation amount of different crop areas is accurately adjusted and controlled by combining the water and fertilizer concentration distribution condition of the crop areas and the health condition of crops.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of water and fertilizer control, and in particular to a water and fertilizer control method based on the Internet of Things. Background Art

[0002] Crop irrigation is an important means to maintain efficient agricultural production, but traditional irrigation methods have many problems. Traditional irrigation often uses a timed and quantitative method, which cannot be adjusted according to the actual water demand of crops, which easily leads to waste of water and fertilizer resources and over-irrigation. At the same time, due to factors such as terrain, soil type and crop coverage differences, traditional irrigation is difficult to achieve uniformity and accuracy of irrigation. In addition, traditional irrigation management requires a lot of manpower and material resources, is inefficient and costly. Summary of the invention

[0003] In view of this, the present invention provides a water and fertilizer control method based on the Internet of Things, which realizes accurate monitoring and control of water and fertilizer irrigation in crop areas by real-time monitoring of key factors such as soil water and fertilizer concentration, meteorological conditions, and crop water demand, combined with intelligent data processing and control systems.

[0004] To achieve the above object, the present invention provides a water and fertilizer control method based on the Internet of Things, comprising the following steps:

[0005] S1: Obtain crop area size and crop distribution information, deploy soil water and fertilizer concentration sensors, connect the soil water and fertilizer concentration sensors to the central control system through wireless communication protocols, and establish a wireless sensor network covering the entire crop area;

[0006] S2: Using the deployed soil water and fertilizer concentration sensors to collect soil water and fertilizer concentration data in real time, and combining with meteorological data to build a soil water and fertilizer concentration prediction model, calculate and predict the distribution of water and fertilizer concentration in the crop area, where the meteorological data includes temperature, wind speed, rainfall and light intensity. Adaptive modal decomposition and residual attention mechanism are the main implementation methods of the soil water and fertilizer concentration prediction model;

[0007] S3: Collect crop images in the crop area, extract crop characteristic parameters, and evaluate the health status of the crops based on the extracted crop characteristic parameters;

[0008] S4: Based on the real-time monitoring of the distribution of water and fertilizer concentrations in crop areas and the health status of crops, an intelligent water and fertilizer irrigation regulation strategy is constructed to accurately adjust and control the water and fertilizer irrigation amounts in different crop areas. Among them, deep reinforcement learning based on the network model structure with dual Q value weights is the main implementation method of the intelligent water and fertilizer irrigation regulation strategy.

[0009] As a further improvement method of the present invention:

[0010] Optionally, the step S1 of acquiring the size of the crop area and the crop distribution information and deploying a soil water and fertilizer concentration sensor includes:

[0011] The size and distribution information of crop regions are obtained, and the crop regions are discretized into M×N crop sub-regions, where M represents the total number of crop sub-regions in the horizontal direction, and N represents the total number of crop sub-regions in the vertical direction. The crop sub-regions are marked based on the crop distribution, and the marking results of the crop sub-regions are as follows:

[0012] {α(m,n)|m∈[1,M],n∈[1,N]}

[0013] in:

[0014] α(m,n) represents the labeling result of the crop sub-region Pix(m,n) in the mth row and nth column in the crop region;

[0015] α(m,n)=0 or 1, α(m,n)=1 indicates that there are crops in the crop sub-region Pix(m,n), and α(m,n)=0 indicates that there are no crops in the crop sub-region Pix(m,n);

[0016] The number of soil water and fertilizer concentration sensors to be deployed is set, and the deployment positions of the soil water and fertilizer concentration sensors are calculated based on the marking results of the crop sub-areas. The calculation process of the deployment positions of the soil water and fertilizer concentration sensors is as follows:

[0017] S11: Construct sensor coverage function for crop areas:

[0018]

[0019] in:

[0020] F(θ) represents the sensor coverage function of the crop area, θ represents the deployment position vector of K soil water and fertilizer concentration sensors, θ=(θ1,θ2,...,θ k ,...,θ K ), θ k represents the deployment location of the kth soil water and fertilizer concentration sensor;

[0021] P(m,n,θ) represents the sensor coverage rate of the crop sub-area Pix(m,n) after the soil water and fertilizer concentration sensors are deployed according to the deployment position vector θ, min k∈[1,K] dis(Pix(m,n),θ k) represents the shortest distance between any deployment position in the deployment position vector θ and the crop sub-region Pix(m,n), and R represents the sensing radius of the soil water and fertilizer concentration sensor; in the present invention, the distance between the deployment position and the crop sub-region is calculated as the Euclidean distance;

[0022] S12: Randomly generate K position coordinates as the initial deployment position vector of the soil water and fertilizer concentration sensor:

[0023]

[0024] in:

[0025] θ 0 represents the initial deployment position vector, Represents the initial deployment position vector θ 0 The kth deployment location in ;

[0026] S13: Set the current iteration number of the initial deployment position vector to t, the initial value of t is 0, and the maximum value is Max, then the t-th iteration result of the initial deployment position vector is:

[0027]

[0028] in:

[0029] θ t is the tth iteration result of the initial deployment position vector, Indicates the deployment location The tth iteration result of ;

[0030] S14: Set θ t The deployment positions in the sensor coverage function are input in sequence, and the growth value of the sensor coverage function after the deployment position is input is used as the fitness of the deployment position. The fitness of

[0031] S15: Select the deployment positions in the deployment position vector in turn. In θ t Select from Three different deployment positions and the optimal deployment position are subjected to mutation processing, where the mutation processing formula is:

[0032]

[0033] in:

[0034] Indicates the deployment location The result of mutation processing;

[0035] Represents θ t The optimal deployment position in θ t The deployment position with the highest fitness;

[0036] Indicates the three selected deployment locations. represents the fitness of the three selected deployment positions;

[0037] Indicates the deployment location The amount of disturbance;

[0038] F max ,F min Indicates the preset maximum fitness and minimum fitness;

[0039] If the mutation processing result If it is not in the crop area, the mutation processing result is patched as follows:

[0040]

[0041] in:

[0042] Re(·) represents the mapping function of the patching process, The mutation processing results Map to the nearest crop area boundary location;

[0043] S16: Deployment location obtained in step S15 The mutation processing results are selected and the selection results are used as the initial deployment position vector θ 0 The t+1th iteration result of the kth deployment position in

[0044]

[0045] in:

[0046] Indicates that Replace θ t Deployment location in θ t The deployment locations in are input into the sensor coverage function in turn, The corresponding fitness;

[0047] Let k = k + 1, and return to step S15 until the deployment position vector θ t All deployment locations in complete the t+1th iteration;

[0048] S17: Let t = t + 1, and return to step S14 until the maximum number of iterations of the initial deployment position vector is reached. Based on the θ obtained in the final iteration, Max Deploy soil water and fertilizer concentration sensors.

[0049] In the present invention, for the traditional randomly arranged wireless sensor network, the node distribution is irregular, the node density in some areas is high, a large amount of redundant data will be generated, and the transmission nodes are too close to each other when transmitting information; the node density in some areas is too small, which will lead to the generation of network monitoring blind spots. Both of these situations will lead to inaccurate data collection and transmission of wireless sensors and poor network service quality. A method for optimizing the layout of wireless sensor networks in crop areas is proposed, which uses a differential optimization algorithm for global search, has simple parameters, is not easy to fall into local extreme values, and has parallelism to achieve better layout effects.

[0050] Optionally, in step S1, the soil water and fertilizer concentration sensor is connected to a central control system via a wireless communication protocol to establish a wireless sensor network covering the entire crop area, including:

[0051] The soil water and fertilizer concentration sensor is connected to the central control system through a wireless communication protocol to establish a wireless sensor network covering the entire crop area. The soil water and fertilizer concentration sensor includes a soil nitrogen, phosphorus and potassium sensor and a soil moisture sensor. The soil nitrogen, phosphorus and potassium sensor determines the concentration of nitrogen, phosphorus and potassium elements in the soil by measuring the potential change of the electrode. The soil moisture sensor measures the humidity by the resistance change of the soil. The ratio of the concentration of nitrogen, phosphorus and potassium elements in the soil to the soil moisture is used as the soil water and fertilizer concentration value. The soil water and fertilizer concentration sensor uses wireless communication to send the water and fertilizer concentration value of the monitored area to the central control system.

[0052] Optionally, in step S2, the soil water and fertilizer concentration data is collected by using the deployed soil water and fertilizer concentration sensor, and a soil water and fertilizer concentration prediction model is constructed in combination with meteorological data to calculate and predict the distribution of water and fertilizer concentration in the crop area, including:

[0053] The central control system uses the deployed soil water and fertilizer concentration sensors to collect soil water and fertilizer concentration data and obtains soil water and fertilizer concentration data for num crop sub-areas where crops exist, where The collected soil water and fertilizer concentration data are expressed in the form of:

[0054] {L i |i∈[1,num]}

[0055] in:

[0056] L iRepresents the soil water and fertilizer concentration data of the i-th crop sub-region where crops exist, wherein the soil water and fertilizer concentration data represents the sequence data of water and fertilizer concentration values ​​in the crop sub-region from the time when the soil water and fertilizer concentration sensor is deployed to the current time;

[0057] Collect the meteorological data ω at the current moment, where the meteorological data includes temperature, wind speed, rainfall and light intensity. Combine the meteorological data to build a soil water and fertilizer concentration prediction model. Use the soil water and fertilizer concentration prediction model to sequentially receive the soil water and fertilizer concentration data of num crop sub-regions where crops exist, and obtain the soil water and fertilizer concentration prediction results of different crop sub-regions. The soil water and fertilizer concentration prediction process for the i-th crop sub-region where crops exist is as follows:

[0058] S21: The soil water and fertilizer concentration prediction model receives soil water and fertilizer concentration data L i And the current weather dataω;

[0059] S22: soil water and fertilizer concentration data L i As the data to be decomposed, set the current decomposition scale of the data to be decomposed to j, the initial value of j is 1, and the maximum value is J;

[0060] S23: Obtain all local extreme value points in the data to be decomposed, and use the cubic spline interpolation method to interpolate the minimum value point set and the maximum value point set respectively, wherein the interpolation result of the minimum value point set is the lower envelope, and the interpolation result of the maximum value point set is the upper envelope;

[0061] S24: Calculate the mean sequence of the upper and lower envelopes, and calculate the difference sequence between the data to be decomposed and the mean sequence;

[0062] If the difference between the number of zero points of the difference sequence and the number of local extreme points of the data to be decomposed is less than or equal to 1, and the mean of the upper and lower envelopes of the difference sequence is 0, then the difference sequence is used as the soil water and fertilizer concentration data L i The decomposition result L at decomposition scale j i (j), and let j = j + 1, the decomposition result is L i (j) as the data to be decomposed, return to step S23, until j = J; otherwise, let the difference sequence be the data to be decomposed, return to step S23;

[0063] S25: Construct soil water and fertilizer concentration data L i The set of decomposition results at J decomposition scales:

[0064] {L i (j)|j∈[1,J]}

[0065] S26: Combined with the residual attention mechanism, the soil water and fertilizer concentration of the i-th crop sub-region where crops exist is predicted, where the prediction formula is:

[0066]

[0067] in:

[0068] ε i represents the predicted results of soil water and fertilizer concentration in the i-th crop sub-region where crops exist;

[0069] exp(·) represents an exponential function with a natural constant as the base;

[0070] W j Represents the convolution matrix corresponding to the decomposition scale j;

[0071] *Indicates convolution processing.

[0072] Optionally, in step S3, collecting crop images of the crop area and extracting crop characteristic parameters include:

[0073] The crop images of the crop area are collected, and the collection results of the crop images of the crop area are as follows:

[0074] {I i |i∈[1,num]}

[0075] in:

[0076] I i represents a real-time captured image of an i-th crop sub-region where crops exist in the crop region, and uses the real-time captured image of the crop sub-region where crops exist in the crop region as the collected crop image of the crop region;

[0077] The crop feature parameters are extracted from the crop image of the crop area, wherein the crop image of the crop area I i The process of crop characteristic parameter extraction is as follows:

[0078] S31: crop image I of crop area i Grayscale processing is performed to obtain the crop image I of the crop area i The gray value of each pixel in the crop area is constructed to obtain the crop image I i The corresponding grayscale image matrix gray i ;

[0079] S32: Use Ostu algorithm to calculate grayscale image matrix gray i Perform binarization processing to obtain the crop image I of the crop area i The corresponding binary image matrix gi :

[0080] g i =(g i (x,y) X×Y

[0081] in:

[0082] g i It is a matrix with X rows and Y columns, where X represents the crop image I of the crop area. i The number of pixel rows, Y represents the crop image I of the crop area i The number of pixel columns;

[0083] g i (x, y) represents the crop area crop image I i The binarization result of the pixel in the xth row and yth column is the binarized image matrix g i The element value of the element in the xth row and yth column, g i (x,y)=0 or 1;

[0084] S33: Count the binary image matrix g respectively i The element column number sequence of each row matrix whose element value is 1 and the element row number sequence of each column matrix whose element value is 1;

[0085] S34: For the binary image matrix g i For each row of the matrix in , count the difference between the element column number where the element value 1 appears for the last time and the element column number where the element value 1 appears for the first time in each row of the matrix, where the difference in the xth row is

[0086]

[0087] S35: For the binary image matrix g i For each column of the matrix in , count the difference between the element row number where the element value 1 appears for the last time and the element row number where the element value 1 appears for the first time in each column of the matrix, where the difference in the yth column is

[0088]

[0089] S36: Screen to get the maximum difference in the X row matrix and the maximum difference in the Y column matrix Will as the crop characteristic parameter of the i-th crop sub-region where crops exist in the crop region;

[0090] Assess crop health status based on the extracted crop characteristic parameters.

[0091] Optionally, in step S3, evaluating the health status of crops according to the extracted crop characteristic parameters includes:

[0092] The crop health status is evaluated based on the extracted crop characteristic parameters, where the crop health status evaluation formula in the i-th crop sub-region where crops exist in the crop region is:

[0093]

[0094] in:

[0095] value i Indicates the crop health status in the i-th crop sub-region where crops exist in the crop region.

[0096] Optionally, in step S4, a water and fertilizer intelligent irrigation regulation strategy is constructed according to the real-time monitored water and fertilizer concentration distribution in the crop area and the health status of the crops, including:

[0097] Based on the real-time monitored distribution of water and fertilizer concentration in the crop area and the health status of the crops, a water and fertilizer intelligent irrigation regulation strategy is constructed, wherein the water and fertilizer intelligent irrigation regulation strategy receives the crop health status and soil water and fertilizer concentration prediction results of each crop sub-area in the crop area where crops exist, and calculates the water and fertilizer irrigation amount of the corresponding crop sub-area;

[0098] The training process of the water and fertilizer intelligent irrigation regulation strategy is as follows:

[0099] S41: Generate U groups of crop health conditions and soil water and fertilizer concentrations in different crop sub-regions, obtain the standard water and fertilizer irrigation amount for each group of crop sub-regions, and construct a training data set data for the water and fertilizer intelligent irrigation regulation strategy:

[0100] data={(E u ,V u )|u∈[1,U]}

[0101]

[0102] in:

[0103] E u Indicates the crop health status of the generated u-th group of crop sub-regions and soil water and fertilizer concentration V u represents the standard water and fertilizer irrigation amount of the u-th group of crop sub-regions; the standard water and fertilizer irrigation amount of the U-th group of crop sub-regions is arranged in descending order;

[0104] S42: Initialize and generate the Q matrix representing the weights of crop health status And the Q matrix representing the weight of soil water and fertilizer concentration Set the current number of iterations of the Q matrix to d and the maximum number of iterations to D, then the Q matrix Q Matrix The d-th iteration results are The initial value of d is 0; in the present invention, D=U;

[0105] S43: Update the Q matrix, where the update formula of the Q matrix is:

[0106]

[0107] in:

[0108] δ represents the cyclic coefficient, δ∈(0,2];

[0109] Represents the Q matrix iteration result The reward value, Represents the Q matrix iteration result The reward value of

[0110] S44: Let d = d + 1, return to step S43, until the maximum number of iterations is reached, and the Q matrix that reaches the maximum number of iterations is used as the double Q matrix Q of the water-fertilizer intelligent irrigation regulation strategy 1 ,Q 2 , where Q 1 ,Q 2 Respectively represent the weight of crop health status and soil water and fertilizer concentration;

[0111] Intelligent water and fertilizer irrigation regulation strategies are used to accurately adjust and control the amount of water and fertilizer irrigation in different crop areas.

[0112] Optionally, in step S44, the water and fertilizer intelligent irrigation regulation strategy is used to accurately regulate and control the water and fertilizer irrigation amounts of different crop areas, including:

[0113] The water and fertilizer intelligent irrigation regulation strategy is used to accurately regulate and control the water and fertilizer irrigation amount of different crop areas. The precise regulation and control process of the water and fertilizer irrigation amount of the i-th crop sub-area where there are crops in the crop area is as follows:

[0114] Intelligent irrigation regulation strategy for water and fertilizer receives crop health value i And the predicted results of soil water and fertilizer concentration ε i ;

[0115] Use the double Q matrix to calculate the health status value i And the predicted results of soil water and fertilizer concentration ε iMapping is performed to obtain the current water and fertilizer irrigation amount of the i-th crop sub-area where crops exist in the crop area:

[0116] P i =Q 1 value i +Q 2 value i

[0117] in:

[0118] P i represents the current water and fertilizer irrigation amount of the i-th crop sub-region where crops exist in the crop region, based on the current water and fertilizer irrigation amount P i The i-th crop sub-region in the crop region where crops exist is irrigated, and the crop sub-region in the crop region where crops do not exist is irrigated according to the minimum water and fertilizer irrigation amount.

[0119] In order to solve the above problem, the present invention provides an electronic device, the electronic device comprising:

[0120] A memory storing at least one instruction;

[0121] Communication interface, enabling electronic equipment to communicate; and

[0122] The processor executes the instructions stored in the memory to implement the water and fertilizer control method based on the Internet of Things.

[0123] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned water and fertilizer control method based on the Internet of Things.

[0124] Compared with the prior art, the present invention proposes a water and fertilizer control method based on the Internet of Things, which has the following advantages:

[0125] First, this scheme deploys soil water and fertilizer concentration sensors in crop areas by using an improved differential evolution algorithm. In the process of sensor deployment position variation, multiple sets of adaptive perturbations are used to vary the position, and variation processing results with global variability are obtained more quickly to avoid falling into local optimal solutions, thereby realizing the construction of wireless sensor networks in crop areas, and then collecting soil water and fertilizer concentration data in different crop areas. Combined with meteorological data, the soil water and fertilizer concentration prediction model is constructed using adaptive modal decomposition and residual attention mechanism, which can more accurately predict the distribution of water and fertilizer concentration in crop areas and improve the efficiency and accuracy of water and fertilizer control management.

[0126] At the same time, this solution can realize real-time monitoring and evaluation of the health status of crops in different crop areas by collecting crop images in crop areas and extracting crop characteristic parameters, and combining image analysis technology to evaluate the health status of crops. According to the real-time monitored water and fertilizer concentration distribution in the crop area and the health status of crops, a water and fertilizer intelligent irrigation regulation strategy based on reinforcement learning is constructed to accurately adjust and control the water and fertilizer irrigation amount in different crop areas, thereby realizing intelligent adjustment and optimization of the water and fertilizer irrigation amount in different crop areas, further realizing the intelligence and refinement of soil water and fertilizer management, and improving management efficiency and crop growth quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0127] Figure 1 A schematic diagram of a flow chart of a water and fertilizer control method based on the Internet of Things provided by an embodiment of the present invention;

[0128] Figure 2 A schematic diagram of the structure of an electronic device for implementing a water and fertilizer control method based on the Internet of Things provided by an embodiment of the present invention.

[0129] In the figure: 1 electronic device, 10 processor, 11 memory, 12 program, 13 communication interface.

[0130] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0131] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0132] The embodiment of the present application provides a water and fertilizer control method based on the Internet of Things. The execution subject of the water and fertilizer control method based on the Internet of Things includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the water and fertilizer control method based on the Internet of Things can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0133] Embodiment 1:

[0134] S1: Obtain crop area size and crop distribution information, deploy soil water and fertilizer concentration sensors, connect the soil water and fertilizer concentration sensors to the central control system through wireless communication protocols, and establish a wireless sensor network covering the entire crop area.

[0135] The step S1 obtains the crop area size and crop distribution information and deploys soil water and fertilizer concentration sensors, including:

[0136] The size and distribution information of crop regions are obtained, and the crop regions are discretized into M×N crop sub-regions, where M represents the total number of crop sub-regions in the horizontal direction, and N represents the total number of crop sub-regions in the vertical direction. The crop sub-regions are marked based on the crop distribution, and the marking results of the crop sub-regions are as follows:

[0137] {α(m,n)|m∈[1,M],n∈[1,N]}

[0138] in:

[0139] α(m,n) represents the labeling result of the crop sub-region Pix(m,n) in the mth row and nth column in the crop region;

[0140] α(m,n)=0 or 1, α(m,n)=1 indicates that there are crops in the crop sub-region Pix(m,n), and α(m,n)=0 indicates that there are no crops in the crop sub-region Pix(m,n);

[0141] The number of soil water and fertilizer concentration sensors to be deployed is set, and the deployment positions of the soil water and fertilizer concentration sensors are calculated based on the marking results of the crop sub-areas. The calculation process of the deployment positions of the soil water and fertilizer concentration sensors is as follows:

[0142] S11: Construct sensor coverage function for crop areas:

[0143]

[0144] in:

[0145] F(θ) represents the sensor coverage function of the crop area, θ represents the deployment position vector of K soil water and fertilizer concentration sensors, θ=(θ1,θ2,...,θ k ,...,θ K ), θ k represents the deployment location of the kth soil water and fertilizer concentration sensor;

[0146] P(m,n,θ) represents the sensor coverage rate of the crop sub-area Pix(m,n) after the soil water and fertilizer concentration sensors are deployed according to the deployment position vector θ, min k∈[1,K] dis(Pix(m,n),θ k ) represents the shortest distance between any deployment position in the deployment position vector θ and the crop sub-region Pix(m,n), and R represents the sensing radius of the soil water and fertilizer concentration sensor;

[0147] S12: Randomly generate K position coordinates as the initial deployment position vector of the soil water and fertilizer concentration sensor:

[0148]

[0149] in:

[0150] θ 0 represents the initial deployment position vector, Represents the initial deployment position vector θ 0 The kth deployment location in ;

[0151] S13: Set the current iteration number of the initial deployment position vector to t, the initial value of t is 0, and the maximum value is Max, then the t-th iteration result of the initial deployment position vector is:

[0152]

[0153] in:

[0154] θ t is the tth iteration result of the initial deployment position vector, Indicates the deployment location The tth iteration result of ;

[0155] S14: Set θ t The deployment positions in the sensor coverage function are input in sequence, and the growth value of the sensor coverage function after the deployment position is input is used as the fitness of the deployment position. The fitness of

[0156] S15: Select the deployment positions in the deployment position vector in turn. In θ t Select from Three different deployment positions and the optimal deployment position are subjected to mutation processing, where the mutation processing formula is:

[0157]

[0158] in:

[0159] Indicates the deployment location The result of mutation processing;

[0160] Represents θ t The optimal deployment position in θ t The deployment position with the highest fitness;

[0161] Indicates the three selected deployment locations. represents the fitness of the three selected deployment positions;

[0162] Indicates the deployment location The amount of disturbance;

[0163] F max ,F min Indicates the preset maximum fitness and minimum fitness;

[0164] If the mutation processing result If it is not in the crop area, the mutation processing result is patched as follows:

[0165]

[0166] in:

[0167] Re(·) represents the mapping function of the patching process, The mutation processing results Map to the nearest crop area boundary location;

[0168] S16: Deployment location obtained in step S15 The mutation processing results are selected and the selection results are used as the initial deployment position vector θ 0 The t+1th iteration result of the kth deployment position in

[0169]

[0170] in:

[0171] Indicates that Replace θ t Deployment location in θ t The deployment locations in are input into the sensor coverage function in turn, The corresponding fitness;

[0172] Let k = k + 1, and return to step S15 until the deployment position vector θ t All deployment locations in complete the t+1th iteration;

[0173] S17: Let t = t + 1, and return to step S14 until the maximum number of iterations of the initial deployment position vector is reached. Based on the θ obtained in the final iteration, Max Deploy soil water and fertilizer concentration sensors.

[0174] In step S1, the soil water and fertilizer concentration sensor is connected to the central control system through a wireless communication protocol to establish a wireless sensor network covering the entire crop area, including:

[0175] The soil water and fertilizer concentration sensor is connected to the central control system through a wireless communication protocol to establish a wireless sensor network covering the entire crop area. The soil water and fertilizer concentration sensor includes a soil nitrogen, phosphorus and potassium sensor and a soil moisture sensor. The soil nitrogen, phosphorus and potassium sensor determines the concentration of nitrogen, phosphorus and potassium elements in the soil by measuring the potential change of the electrode. The soil moisture sensor measures the humidity by the resistance change of the soil. The ratio of the concentration of nitrogen, phosphorus and potassium elements in the soil to the soil moisture is used as the soil water and fertilizer concentration value. The soil water and fertilizer concentration sensor uses wireless communication to send the water and fertilizer concentration value of the monitored area to the central control system.

[0176] S2: Use the deployed soil water and fertilizer concentration sensors to collect soil water and fertilizer concentration data in real time, and build a soil water and fertilizer concentration prediction model based on meteorological data to calculate and predict the distribution of water and fertilizer concentration in the crop area. The meteorological data includes temperature, wind speed, rainfall and light intensity.

[0177] In the step S2, the soil water and fertilizer concentration data is collected by using the deployed soil water and fertilizer concentration sensor, and a soil water and fertilizer concentration prediction model is constructed in combination with meteorological data to calculate and predict the distribution of water and fertilizer concentration in the crop area, including:

[0178] The central control system uses the deployed soil water and fertilizer concentration sensors to collect soil water and fertilizer concentration data and obtains soil water and fertilizer concentration data for num crop sub-areas where crops exist, where The collected soil water and fertilizer concentration data are expressed in the form of:

[0179] {L i |i∈[1,num]}

[0180] in:

[0181] L i Represents the soil water and fertilizer concentration data of the i-th crop sub-region where crops exist, wherein the soil water and fertilizer concentration data represents the sequence data of water and fertilizer concentration values ​​in the crop sub-region from the time when the soil water and fertilizer concentration sensor is deployed to the current time;

[0182] Collect the meteorological data ω at the current moment, where the meteorological data includes temperature, wind speed, rainfall and light intensity. Combine the meteorological data to build a soil water and fertilizer concentration prediction model. Use the soil water and fertilizer concentration prediction model to sequentially receive the soil water and fertilizer concentration data of num crop sub-regions where crops exist, and obtain the soil water and fertilizer concentration prediction results of different crop sub-regions. The soil water and fertilizer concentration prediction process for the i-th crop sub-region where crops exist is as follows:

[0183] S21: The soil water and fertilizer concentration prediction model receives soil water and fertilizer concentration data L i And the current weather dataω;

[0184] S22: soil water and fertilizer concentration data L i As the data to be decomposed, set the current decomposition scale of the data to be decomposed to j, the initial value of j is 1, and the maximum value is J;

[0185] S23: Obtain all local extreme value points in the data to be decomposed, and use the cubic spline interpolation method to interpolate the minimum value point set and the maximum value point set respectively, wherein the interpolation result of the minimum value point set is the lower envelope, and the interpolation result of the maximum value point set is the upper envelope;

[0186] S24: Calculate the mean sequence of the upper and lower envelopes, and calculate the difference sequence between the data to be decomposed and the mean sequence;

[0187] If the difference between the number of zero points of the difference sequence and the number of local extreme points of the data to be decomposed is less than or equal to 1, and the mean of the upper and lower envelopes of the difference sequence is 0, then the difference sequence is used as the soil water and fertilizer concentration data L i The decomposition result L at decomposition scale j i (j), and let j = j + 1, the decomposition result is L i (j) as the data to be decomposed, return to step S23, until j = J; otherwise, let the difference sequence be the data to be decomposed, return to step S23;

[0188] S25: Construct soil water and fertilizer concentration data L i The set of decomposition results at J decomposition scales:

[0189] {L i (j)|j∈[1,J]}

[0190] S26: Combined with the residual attention mechanism, the soil water and fertilizer concentration of the i-th crop sub-region where crops exist is predicted, where the prediction formula is:

[0191]

[0192] in:

[0193] ε i represents the predicted results of soil water and fertilizer concentration in the i-th crop sub-region where crops exist;

[0194] exp(·) represents an exponential function with a natural constant as the base;

[0195] W j Represents the convolution matrix corresponding to the decomposition scale j;

[0196] *Indicates convolution processing.

[0197] S3: Collect crop images in the crop area, extract crop characteristic parameters, and evaluate the health status of the crops based on the extracted crop characteristic parameters.

[0198] In the step S3, the crop images of the crop area are collected and the characteristic parameters of the crops are extracted, including:

[0199] The crop images of the crop area are collected, and the collection results of the crop images of the crop area are as follows:

[0200] {I i |i∈[1,num]}

[0201] in:

[0202] I i represents a real-time captured image of an i-th crop sub-region where crops exist in the crop region, and uses the real-time captured image of the crop sub-region where crops exist in the crop region as the collected crop image of the crop region;

[0203] The crop feature parameters are extracted from the crop image of the crop area, wherein the crop image of the crop area I i The process of crop characteristic parameter extraction is as follows:

[0204] S31: crop image I of crop area i Grayscale processing is performed to obtain the crop image I of the crop area i The gray value of each pixel in the crop area is constructed to obtain the crop image I i The corresponding grayscale image matrix gray i ;

[0205] S32: Use Ostu algorithm to calculate grayscale image matrix gray i Perform binarization processing to obtain the crop image I of the crop area i The corresponding binary image matrix g i :

[0206] g i =(g i (x,y) X×Y

[0207] in:

[0208] g i It is a matrix with X rows and Y columns, where X represents the crop image I of the crop area. i The number of pixel rows, Y represents the crop image I of the crop area i The number of pixel columns;

[0209] g i(x, y) represents the crop area crop image I i The binarization result of the pixel in the xth row and yth column is the binarized image matrix g i The element value of the element in the xth row and yth column, g i (x,y)=0 or 1;

[0210] S33: Count the binary image matrix g respectively i The element column number sequence of each row matrix whose element value is 1 and the element row number sequence of each column matrix whose element value is 1;

[0211] S34: For the binary image matrix g i For each row of the matrix in , count the difference between the element column number where the element value 1 appears for the last time and the element column number where the element value 1 appears for the first time in each row of the matrix, where the difference in the xth row is

[0212]

[0213] S35: For the binary image matrix g i For each column of the matrix in , count the difference between the element row number where the element value 1 appears for the last time and the element row number where the element value 1 appears for the first time in each column of the matrix, where the difference in the yth column is

[0214]

[0215] S36: Screen to get the maximum difference in the X row matrix and the maximum difference in the Y column matrix Will as the crop characteristic parameter of the i-th crop sub-region where crops exist in the crop region;

[0216] Assess crop health status based on the extracted crop characteristic parameters.

[0217] In step S3, the crop health status is evaluated according to the extracted crop characteristic parameters, including:

[0218] The crop health status is evaluated based on the extracted crop characteristic parameters, where the crop health status evaluation formula in the i-th crop sub-region where crops exist in the crop region is:

[0219]

[0220] in:

[0221] value i Indicates the crop health status in the i-th crop sub-region where crops exist in the crop region.

[0222] S4: Based on the real-time monitoring of the distribution of water and fertilizer concentrations in crop areas and the health of crops, an intelligent water and fertilizer irrigation regulation strategy is constructed to accurately regulate and control the water and fertilizer irrigation amounts in different crop areas.

[0223] In step S4, a water and fertilizer intelligent irrigation regulation strategy is constructed based on the real-time monitored water and fertilizer concentration distribution in the crop area and the health status of the crops, including:

[0224] Based on the real-time monitored distribution of water and fertilizer concentration in the crop area and the health status of the crops, a water and fertilizer intelligent irrigation regulation strategy is constructed, wherein the water and fertilizer intelligent irrigation regulation strategy receives the crop health status and soil water and fertilizer concentration prediction results of each crop sub-area in the crop area where crops exist, and calculates the water and fertilizer irrigation amount of the corresponding crop sub-area;

[0225] The training process of the water and fertilizer intelligent irrigation regulation strategy is as follows:

[0226] S41: Generate U groups of crop health conditions and soil water and fertilizer concentrations in different crop sub-regions, obtain the standard water and fertilizer irrigation amount for each group of crop sub-regions, and construct a training data set data for the water and fertilizer intelligent irrigation regulation strategy:

[0227] data={(E u ,V u )|u∈[1,U]}

[0228]

[0229] in:

[0230] E u Indicates the crop health status of the generated u-th group of crop sub-regions and soil water and fertilizer concentration V u represents the standard water and fertilizer irrigation amount of the u-th group of crop sub-regions; the standard water and fertilizer irrigation amount of the U-th group of crop sub-regions is arranged in descending order;

[0231] S42: Initialize and generate the Q matrix representing the weights of crop health status And the Q matrix representing the weight of soil water and fertilizer concentration Set the current number of iterations of the Q matrix to d and the maximum number of iterations to D, then the Q matrix Q Matrix The d-th iteration results are The initial value of d is 0; in the embodiment of the present invention, D=U;

[0232] S43: Update the Q matrix, where the update formula of the Q matrix is:

[0233]

[0234] in:

[0235] δ represents the cyclic coefficient, δ∈(0,2];

[0236] Represents the Q matrix iteration result The reward value, Represents the Q matrix iteration result The reward value of

[0237] S44: Let d = d + 1, return to step S43, until the maximum number of iterations is reached, and the Q matrix that reaches the maximum number of iterations is used as the double Q matrix Q of the water-fertilizer intelligent irrigation regulation strategy 1 ,Q 2 , where Q 1 ,Q 2 Respectively represent the weight of crop health status and soil water and fertilizer concentration;

[0238] Intelligent water and fertilizer irrigation regulation strategies are used to accurately adjust and control the amount of water and fertilizer irrigation in different crop areas.

[0239] In step S44, the water and fertilizer intelligent irrigation regulation strategy is used to accurately regulate and control the water and fertilizer irrigation amount of different crop areas, including:

[0240] The water and fertilizer intelligent irrigation regulation strategy is used to accurately regulate and control the water and fertilizer irrigation amount of different crop areas. The precise regulation and control process of the water and fertilizer irrigation amount of the i-th crop sub-area where there are crops in the crop area is as follows:

[0241] Intelligent irrigation regulation strategy for water and fertilizer receives crop health value i And the predicted results of soil water and fertilizer concentration ε i ;

[0242] Using the double Q matrix to calculate the health status value i And the predicted results of soil water and fertilizer concentration ε i Mapping is performed to obtain the current water and fertilizer irrigation amount of the i-th crop sub-area where crops exist in the crop area:

[0243] P i =Q 1 value i +Q 2 value i

[0244] in:

[0245] P irepresents the current water and fertilizer irrigation amount of the i-th crop sub-region where crops exist in the crop region, based on the current water and fertilizer irrigation amount P i The i-th crop sub-region in the crop region where crops exist is irrigated, and the crop sub-region in the crop region where crops do not exist is irrigated according to the minimum water and fertilizer irrigation amount.

[0246] Embodiment 2:

[0247] like Figure 2 , which is a schematic diagram of the structure of an electronic device for implementing a water and fertilizer control method based on the Internet of Things provided by an embodiment of the present invention.

[0248] The electronic device 1 may include a processor 10 , a memory 11 , a communication interface 13 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10 , such as a program 12 .

[0249] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. The memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 may be used not only to store application software and various types of data installed in the electronic device 1, such as the code of the program 12, etc., but also to temporarily store data that has been output or is to be output.

[0250] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules (such as the program 12 for implementing water and fertilizer control) stored in the memory 11, and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.

[0251] The communication interface 13 may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices, and to achieve connection and communication between internal components of the electronic device.

[0252] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0253] Figure 2 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 2 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0254] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0255] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.

[0256] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0257] The program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0258] Obtain crop area size and crop distribution information, deploy soil water and fertilizer concentration sensors, connect the soil water and fertilizer concentration sensors to the central control system through wireless communication protocols, and establish a wireless sensor network covering the entire crop area;

[0259] The deployed soil water and fertilizer concentration sensors are used to collect soil water and fertilizer concentration data in real time, and a soil water and fertilizer concentration prediction model is built in combination with meteorological data to calculate and predict the distribution of water and fertilizer concentration in the crop area.

[0260] Collect crop images in the crop area, extract crop characteristic parameters, and evaluate the health status of the crops based on the extracted crop characteristic parameters;

[0261] Based on the real-time monitoring of the distribution of water and fertilizer concentrations in crop areas and the health status of crops, an intelligent water and fertilizer irrigation regulation strategy is constructed to accurately regulate and control the amount of water and fertilizer irrigation in different crop areas.

[0262] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figure 1 to Figure 2 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0263] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0264] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0265] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A water and fertilizer control method based on the Internet of Things, characterized in that: The method comprises: S1: Obtain crop area size and crop distribution information, deploy soil water and fertilizer concentration sensors, connect the soil water and fertilizer concentration sensors to the central control system through wireless communication protocols, and establish a wireless sensor network covering the entire crop area; S2: Use the deployed soil water and fertilizer concentration sensors to collect soil water and fertilizer concentration data in real time, build a soil water and fertilizer concentration prediction model based on meteorological data, calculate and predict the distribution of water and fertilizer concentration in the crop area, where meteorological data includes temperature, wind speed, rainfall and light intensity; S3: Collect crop images in the crop area, extract crop characteristic parameters, and evaluate the health status of the crops based on the extracted crop characteristic parameters; S4: Based on the real-time monitoring of the distribution of water and fertilizer concentrations in crop areas and the health of crops, an intelligent water and fertilizer irrigation regulation strategy is constructed to accurately regulate and control the water and fertilizer irrigation amounts in different crop areas.

2. A water and fertilizer control method based on the Internet of Things as claimed in claim 1, characterized in that: The step S1 obtains the crop area size and crop distribution information and deploys soil water and fertilizer concentration sensors, including: The size and distribution information of crop regions are obtained, and the crop regions are discretized into M×N crop sub-regions, where M represents the total number of crop sub-regions in the horizontal direction, and N represents the total number of crop sub-regions in the vertical direction. The crop sub-regions are marked based on the crop distribution, and the marking results of the crop sub-regions are as follows: *α(m,n)|m∈,1,M-,n∈,1,N-+ in: α(m,n) represents the labeling result of the crop sub-region Pix(m,n) in the mth row and nth column in the crop region; α(m,n)=0 or 1, α(m,n)=1 indicates that there are crops in the crop sub-region Pix(m,n), and α(m,n)=0 indicates that there are no crops in the crop sub-region Pix(m,n); The number of soil water and fertilizer concentration sensors to be deployed is set, and the deployment positions of the soil water and fertilizer concentration sensors are calculated based on the marking results of the crop sub-areas. The calculation process of the deployment positions of the soil water and fertilizer concentration sensors is as follows: S11: Construct sensor coverage function for crop areas: in: F(θ) represents the sensor coverage function of the crop area, θ represents the deployment position vector of K soil water and fertilizer concentration sensors, θ=(θ1,θ2,...,θ k ,...,θ K ), θ k represents the deployment location of the kth soil water and fertilizer concentration sensor; P(m,n,θ) represents the sensor coverage rate of the crop sub-area Pix(m,n) after the soil water and fertilizer concentration sensors are deployed according to the deployment position vector θ, min k∈[1,K] dis(Pix(m,n),θ k ) represents the shortest distance between any deployment position in the deployment position vector θ and the crop sub-region Pix(m,n), and R represents the sensing radius of the soil water and fertilizer concentration sensor; S12: Randomly generate K position coordinates as the initial deployment position vector of the soil water and fertilizer concentration sensor: in: θ 0 represents the initial deployment position vector, Represents the initial deployment position vector θ 0 The kth deployment location in ; S13: Set the current iteration number of the initial deployment position vector to t, the initial value of t is 0, and the maximum value is Max, then the t-th iteration result of the initial deployment position vector is: in: θ t is the tth iteration result of the initial deployment position vector, Indicates the deployment location The tth iteration result of ; S14: Set θ t The deployment positions in the sensor coverage function are input in sequence, and the growth value of the sensor coverage function after the deployment position is input is used as the fitness of the deployment position. The fitness of S15: Select the deployment positions in the deployment position vector in turn. In θ t Select from Three different deployment positions and the optimal deployment position are subjected to mutation processing, where the mutation processing formula is: in: Indicates the deployment location The result of mutation processing; Represents θ t The optimal deployment position in θ t The deployment position with the highest fitness; Indicates the three selected deployment locations. represents the fitness of the three selected deployment positions; Indicates the deployment location The amount of disturbance; F max ,F min Indicates the preset maximum fitness and minimum fitness; If the mutation processing result If it is not in the crop area, the mutation processing result is patched as follows: in: Re(·) represents the mapping function of the patching process, The mutation processing results Map to the nearest crop area boundary location; S16: Deployment location obtained in step S15 The mutation processing results are selected and the selection results are used as the initial deployment position vector θ 0 The t+1th iteration result of the kth deployment position in in: Indicates that Replace θ t Deployment location in θ t The deployment locations in are input into the sensor coverage function in turn, The corresponding fitness; Let k = k + 1, and return to step S15 until the deployment position vector θ t All deployment locations in complete the t+1th iteration; S17: Let t = t + 1, and return to step S14 until the maximum number of iterations of the initial deployment position vector is reached. Based on the θ obtained in the final iteration, Max Deployment of soil water and fertilizer concentration sensors; The soil water and fertilizer concentration sensors are connected to the central control system through wireless communication protocols to establish a wireless sensor network covering the entire crop area.

3. A water and fertilizer control method based on the Internet of Things as claimed in claim 2, characterized in that: In step S1, the soil water and fertilizer concentration sensor is connected to the central control system through a wireless communication protocol to establish a wireless sensor network covering the entire crop area, including: The soil water and fertilizer concentration sensor is connected to the central control system through a wireless communication protocol to establish a wireless sensor network covering the entire crop area. The soil water and fertilizer concentration sensor includes a soil nitrogen, phosphorus and potassium sensor and a soil moisture sensor. The soil nitrogen, phosphorus and potassium sensor determines the concentration of nitrogen, phosphorus and potassium elements in the soil by measuring the potential change of the electrode. The soil moisture sensor measures the humidity by the resistance change of the soil. The ratio of the concentration of nitrogen, phosphorus and potassium elements in the soil to the soil moisture is used as the soil water and fertilizer concentration value. The soil water and fertilizer concentration sensor uses wireless communication to send the water and fertilizer concentration value of the monitored area to the central control system.

4. A water and fertilizer control method based on the Internet of Things as claimed in claim 3, characterized in that: In the step S2, the soil water and fertilizer concentration data is collected by using the deployed soil water and fertilizer concentration sensor, and a soil water and fertilizer concentration prediction model is constructed in combination with meteorological data to calculate and predict the distribution of water and fertilizer concentration in the crop area, including: The central control system uses the deployed soil water and fertilizer concentration sensors to collect soil water and fertilizer concentration data and obtains soil water and fertilizer concentration data for num crop sub-areas where crops exist, where The collected soil water and fertilizer concentration data are expressed in the form of: *L i |i∈,1,num-+ in: L i Represents the soil water and fertilizer concentration data of the i-th crop sub-region where crops exist, wherein the soil water and fertilizer concentration data represents the sequence data of water and fertilizer concentration values ​​in the crop sub-region from the time when the soil water and fertilizer concentration sensor is deployed to the current time; Collect the meteorological data ω at the current moment, where the meteorological data includes temperature, wind speed, rainfall and light intensity. Combine the meteorological data to build a soil water and fertilizer concentration prediction model. Use the soil water and fertilizer concentration prediction model to sequentially receive the soil water and fertilizer concentration data of num crop sub-regions where crops exist, and obtain the soil water and fertilizer concentration prediction results of different crop sub-regions. The soil water and fertilizer concentration prediction process for the i-th crop sub-region where crops exist is as follows: S21: The soil water and fertilizer concentration prediction model receives soil water and fertilizer concentration data L i And the current weather dataω; S22: soil water and fertilizer concentration data L i As the data to be decomposed, set the current decomposition scale of the data to be decomposed to j, the initial value of j is 1, and the maximum value is J; S23: Obtain all local extreme value points in the data to be decomposed, and use the cubic spline interpolation method to interpolate the minimum value point set and the maximum value point set respectively, wherein the interpolation result of the minimum value point set is the lower envelope, and the interpolation result of the maximum value point set is the upper envelope; S24: Calculate the mean sequence of the upper and lower envelopes, and calculate the difference sequence between the data to be decomposed and the mean sequence; If the difference between the number of zero points of the difference sequence and the number of local extreme points of the data to be decomposed is less than or equal to 1, and the mean of the upper and lower envelopes of the difference sequence is 0, then the difference sequence is used as the soil water and fertilizer concentration data L i The decomposition result L at decomposition scale j i (j), and let j = j + 1, the decomposition result is L i (j) as the data to be decomposed, return to step S23, until j = J; otherwise, let the difference sequence be the data to be decomposed, return to step S23; S25: Construct soil water and fertilizer concentration data L i The set of decomposition results at J decomposition scales: *L i (j)|j∈,1,J-+ S26: Combined with the residual attention mechanism, the soil water and fertilizer concentration of the i-th crop sub-region where crops exist is predicted, where the prediction formula is: in: ε i represents the predicted results of soil water and fertilizer concentration in the i-th crop sub-region where crops exist; exp(·) represents an exponential function with a natural constant as the base; W j Represents the convolution matrix corresponding to the decomposition scale j; *Indicates convolution processing.

5. The water and fertilizer control method based on the Internet of Things as claimed in claim 1, characterized in that: In the step S3, the crop images of the crop area are collected and the characteristic parameters of the crops are extracted, including: The crop images of the crop area are collected, and the collection results of the crop images of the crop area are as follows: *I i |i∈,1,num-+ in: I i represents a real-time captured image of an i-th crop sub-region where crops exist in the crop region, and uses the real-time captured image of the crop sub-region where crops exist in the crop region as the collected crop image of the crop region; The crop feature parameters are extracted from the crop image of the crop area, wherein the crop image of the crop area I i The process of crop characteristic parameter extraction is as follows: S31: crop image I of crop area i Grayscale processing is performed to obtain the crop image I of the crop area i The gray value of each pixel in the crop area is constructed to obtain the crop image I i The corresponding grayscale image matrix gray i ; S32: Use Ostu algorithm to calculate grayscale image matrix gray i Perform binarization processing to obtain the crop image I of the crop area i The corresponding binary image matrix g i : g i =(g i (x,y)) X×Y in: g i It is a matrix with X rows and Y columns, where X represents the crop image I of the crop area. i The number of pixel rows, Y represents the crop image I of the crop area i The number of pixel columns; g i (x, y) represents the crop area crop image I i The binarization result of the pixel in the xth row and yth column is the binarized image matrix g i The element value of the element in the xth row and yth column, g i (x,y)=0 or 1; S33: Count the binary image matrix g respectively i The element column number sequence of each row matrix whose element value is 1 and the element row number sequence of each column matrix whose element value is 1; S34: For the binary image matrix g i For each row of the matrix in , count the difference between the element column number where the element value 1 appears for the last time and the element column number where the element value 1 appears for the first time in each row of the matrix, where the difference in the xth row is S35: For the binary image matrix g i For each column of the matrix in , count the difference between the element row number where the element value 1 appears for the last time and the element row number where the element value 1 appears for the first time in each column of the matrix, where the difference in the yth column is S36: Screen to get the maximum difference in the X row matrix and the maximum difference in the Y column matrix Will as the crop characteristic parameter of the i-th crop sub-region where crops exist in the crop region; Assess crop health status based on the extracted crop characteristic parameters.

6. A water and fertilizer control method based on the Internet of Things as claimed in claim 5, characterized in that: In step S3, the crop health status is evaluated according to the extracted crop characteristic parameters, including: The crop health status is evaluated based on the extracted crop characteristic parameters, where the crop health status evaluation formula in the i-th crop sub-region where crops exist in the crop region is: in: value i Indicates the crop health status in the i-th crop sub-region where crops exist in the crop region.

7. The water and fertilizer control method based on the Internet of Things as claimed in claim 1, characterized in that: In step S4, a water and fertilizer intelligent irrigation regulation strategy is constructed based on the real-time monitored water and fertilizer concentration distribution in the crop area and the health status of the crops, including: Based on the real-time monitored distribution of water and fertilizer concentration in the crop area and the health status of the crops, a water and fertilizer intelligent irrigation regulation strategy is constructed, wherein the water and fertilizer intelligent irrigation regulation strategy receives the crop health status and soil water and fertilizer concentration prediction results of each crop sub-area in the crop area where crops exist, and calculates the water and fertilizer irrigation amount of the corresponding crop sub-area; The training process of the water and fertilizer intelligent irrigation regulation strategy is as follows: S41: Generate U groups of crop health conditions and soil water and fertilizer concentrations in different crop sub-regions, obtain the standard water and fertilizer irrigation amount for each group of crop sub-regions, and construct a training data set data for the water and fertilizer intelligent irrigation regulation strategy: data=*(E u ,V u )|u∈,1,U-+ in: E u Indicates the crop health status of the generated u-th group of crop sub-regions and soil water and fertilizer concentration V u represents the standard water and fertilizer irrigation amount of the u-th group of crop sub-regions; the standard water and fertilizer irrigation amount of the U-th group of crop sub-regions is arranged in descending order; S42: Initialize and generate the Q matrix representing the weights of crop health status And the Q matrix representing the weight of soil water and fertilizer concentration Set the current iteration number of the Q matrix to d and the maximum iteration number to D, then the Q matrix Q Matrix The d-th iteration results are The initial value of d is 0; S43: Update the Q matrix, where the update formula of the Q matrix is: in: δ represents the cyclic coefficient, δ∈(0,2-; Represents the Q matrix iteration result The reward value, Represents the Q matrix iteration result The reward value of S44: Let d = d + 1, return to step S43, until the maximum number of iterations is reached, and the Q matrix that reaches the maximum number of iterations is used as the double Q matrix Q of the water-fertilizer intelligent irrigation regulation strategy 1 ,Q 2 , where Q 1 ,Q 2 Respectively represent the weight of crop health status and soil water and fertilizer concentration; Intelligent water and fertilizer irrigation regulation strategies are used to accurately adjust and control the amount of water and fertilizer irrigation in different crop areas.

8. The water and fertilizer control method based on the Internet of Things as claimed in claim 7, characterized in that: In step S44, the water and fertilizer intelligent irrigation regulation strategy is used to accurately regulate and control the water and fertilizer irrigation amount of different crop areas, including: The water and fertilizer intelligent irrigation regulation strategy is used to accurately regulate and control the water and fertilizer irrigation amount of different crop areas. The precise regulation and control process of the water and fertilizer irrigation amount of the i-th crop sub-area where there are crops in the crop area is as follows: Intelligent irrigation regulation strategy for water and fertilizer receives crop health value i And the predicted results of soil water and fertilizer concentration ε i ; Using the double Q matrix to calculate the health status value i And the predicted results of soil water and fertilizer concentration ε i Mapping is performed to obtain the current water and fertilizer irrigation amount of the i-th crop sub-area where crops exist in the crop area: P i =Q 1 value i +Q 2 value i in: P i represents the current water and fertilizer irrigation amount of the i-th crop sub-region where crops exist in the crop region, based on the current water and fertilizer irrigation amount P i The i-th crop sub-region in the crop region where crops exist is irrigated, and the crop sub-region in the crop region where crops do not exist is irrigated according to the minimum water and fertilizer irrigation amount.