An intelligent plant protection method, device, equipment and medium based on drone
By using deep convolutional neural networks and task scheduling modules in plant protection drones, we can automatically identify and process abnormal areas in rice fields, realizing precise plant protection operations without manual intervention by drones, reducing costs and improving identification accuracy.
Patent Information
- Application Number
- CN202411140960.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-08-20
AI Technical Summary
Existing technology is difficult to achieve precise area identification in plant protection drones, resulting in high cost of plant protection operations and insufficient identification objectivity and accuracy.
By obtaining the longitude and latitude data of rice fields based on map software, determining preset points, and using drones to collect picture data, anomaly recognition models are trained based on deep convolutional neural networks, and combined with the task scheduling module to generate field patrol and plant protection tasks to achieve automated patrols. fields and spraying operations.
UAV field patrol and plant protection operations are realized with almost no manual participation, which reduces costs and improves the objectivity and accuracy of identification. The lightweight MobileNetV3 neural network is selected to ensure high accuracy and fast reasoning.
Smart Images

Figure CN118658069B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent plant protection technology, and in particular to an intelligent plant protection method, device, equipment and medium based on unmanned aerial vehicle. Background Art
[0002] With the development of intelligent agricultural technology, plant protection drones are increasingly used in agricultural production. Therefore, plant protection drones have gradually become the new favorite of the plant protection industry. Plant protection drones can be used to realize automated spraying operations, such as spraying pesticides and seeds. However, not all areas of a farmland need to be planted for protection. This requires identifying the farmland areas to be planted for protection in order to achieve precise plant protection operations. However, if the identification is done manually, it will take a lot of work and time. Although there are methods in the prior art to identify whether crops are abnormal through image classification models, the classification is not comprehensive and detailed enough, which can easily affect the objectivity and accuracy of the identification. Summary of the invention
[0003] The purpose of the present invention is to provide an intelligent plant protection method, device, equipment and medium based on drones, which divides the rice field into multiple smaller areas, identifies abnormalities and performs plant protection on each smaller area, which can effectively reduce the cost of plant protection and solve at least one of the above-mentioned prior art problems.
[0004] In one aspect, the present invention provides an intelligent plant protection method based on a drone, the method specifically comprising:
[0005] Obtaining first longitude and latitude data of the rice field based on a map software, wherein the first longitude and latitude data is the longitude and latitude data of the boundary of the rice field, determining a plurality of preset points in the rice field according to the first longitude and latitude data, and uploading the longitude and latitude data of the plurality of preset points to a data center;
[0006] Using a drone to collect a first picture set within a first preset number at each preset point, the first picture set includes a rice growth cycle data set, a rice disease data set, a rice insect pest data set, and a rice weed damage data set, and training the first picture set based on a deep convolutional neural network to obtain a rice abnormality recognition model;
[0007] According to the task scheduling module, the latitude and longitude data of the plurality of preset points are obtained from the data center and a field patrol task is generated, the plant protection task is obtained according to the rice abnormality recognition model, and the drone is controlled to execute the field patrol task and the plant protection task.
[0008] Further, the method of obtaining first longitude and latitude data of a rice field based on a map software, wherein the first longitude and latitude data is longitude and latitude data of a boundary of the rice field, and determining a plurality of preset points in the rice field according to the first longitude and latitude data, specifically includes:
[0009] Step 1: obtaining first longitude and latitude data of the rice field based on map software, wherein the first longitude and latitude data is the longitude and latitude data of the boundary of the rice field;
[0010] Step 2: obtaining the center point of the rice field according to the first longitude and latitude data, and determining the center point of the rice field as a first preset point;
[0011] Step 3: determining four preset points to be determined at locations spaced by a first preset distance in four directions of front, back, left, and right of the first preset point, and determining whether the four preset points to be determined are within the rice field;
[0012] Step 4: If the judgment is yes, the preset point to be determined in the rice field is determined as the first preset point, and the process returns to step 3.
[0013] Furthermore, the method of using a drone to collect a first set of pictures within a first preset number at each preset point, wherein the first set of pictures includes a rice growth cycle data set, a rice disease data set, a rice insect pest data set, and a rice weed data set, and training the first set of pictures based on a deep convolutional neural network to obtain a rice abnormality recognition model specifically includes:
[0014] Using a drone to take pictures of each preset point to form a first preset number of first picture sets, and dividing the first picture sets into a rice growth cycle data set, a rice disease data set, a rice insect pest data set, and a rice weed damage data set;
[0015] Based on the PyTorch framework, the rice growth cycle dataset, the rice disease dataset, the rice insect pest dataset, and the rice weed pest dataset are respectively input into the pre-trained MobileNetV3 neural network model for training;
[0016] Based on the cross entropy loss function, the loss is calculated and the gradient descent method is used to optimize the network parameters to generate the rice growth cycle model, rice disease model, rice insect pest model and rice weed damage model;
[0017] The rice growth cycle model, the rice disease model, the rice insect pest model and the rice weed damage model are combined to obtain a rice abnormality recognition model.
[0018] Furthermore, based on the PyTorch framework, the rice growth cycle dataset, the rice disease dataset, the rice insect pest dataset and the rice weed pest dataset are respectively input into the pre-trained MobileNetV3 neural network model for training, specifically including:
[0019] Based on the PyTorch framework, determine the pre-trained first MobileNetV3 neural network model, the second MobileNetV3 neural network model, the third MobileNetV3 neural network model, and the fourth MobileNetV3 neural network model;
[0020] The dimensions of the input parameters of the first MobileNetV3 neural network model, the second MobileNetV3 neural network model, the third MobileNetV3 neural network model, and the fourth MobileNetV3 neural network model are set to N*5*3*H*W, and the dimensions of the output parameters are set to N*5*T, where N represents the size of the batch, 5 represents a total of 5 pictures of the current preset point and its neighboring preset points in the four directions of front, back, left, and right, 3 represents the three RGB channels, W and H represent the width and height of the picture, and T represents the number of output branches;
[0021] Input the rice growth cycle data set into the first MobileNetV3 neural network model for training, and output five branches: greening period, tillering period, jointing and booting period, heading period, and fruiting period;
[0022] Input the rice disease data set into the second MobileNetV3 neural network model for training, and output seven branches: no disease, rice false smut, rice sooty mold, rice blast, rice sheath blight, rice sesame leaf spot, and rice bacterial leaf streak;
[0023] Input the rice pest data set into the third MobileNetV3 neural network model for training, and output eight branches including no pest, yellow stem borer, striped stem borer, shaving insect, rice sheath borer, rice planthopper, rice leaf roller and rice leaf miner;
[0024] The rice weed damage data set is input into the fourth MobileNetV3 neural network model for training, and nine branches are output, namely, no weed damage, round-leaved knotweed, water dragon, barnyard grass, philoxerod, bamboo knotweed, Acorus truncatus, sedge and duckweed.
[0025] Furthermore, the loss is calculated based on the cross entropy loss function, and the network parameters are optimized by the gradient descent method to generate a rice growth cycle model, a rice disease model, a rice insect pest model and a rice weed damage model, specifically including:
[0026] Based on the cross entropy loss function, the cross entropy errors of each preset point and its neighboring preset points in the four directions of front, back, left, and right are calculated, and the cross entropy errors of each preset point and its neighboring preset points in the four directions of front, back, left, and right are merged according to the preset weight data to obtain the total cross entropy error;
[0027] The gradient descent method is used to optimize the network parameters. When the absolute value of the difference of the total cross entropy error is less than a preset value in four consecutive epochs, the training is terminated and a rice growth cycle model, a rice disease model, a rice insect pest model and a rice weed damage model are generated.
[0028] Further, the task scheduling module obtains the latitude and longitude data of the plurality of preset points from the data center and generates a field patrol task, obtains the plant protection task according to the rice abnormality recognition model, and controls the drone to perform the field patrol task and the plant protection task, specifically including:
[0029] Obtaining the latitude and longitude data of the plurality of preset points from the data center according to the task scheduling module at first preset time intervals and generating a field patrol task, and sending the field patrol task to the task recording module, wherein the field patrol task includes a first field patrol route;
[0030] activating the drone at a second preset time interval, controlling the drone to obtain the field patrol task from the task recording module, and taking pictures at each preset point on the first field patrol route to form a second picture set of a second preset number, and uploading the second picture set to the data center;
[0031] Acquire the second picture set from the data center based on the task scheduling module, and send the second picture set to the artificial intelligence processing module;
[0032] Based on the artificial intelligence processing module, a first recognition result is obtained according to the rice abnormality recognition model, and the first recognition result is sent to the rice knowledge base, and a plant protection task is intelligently generated according to the corresponding abnormal prevention and control measures and specific drug dosage in the rice knowledge base, and the plant protection task is sent to the task recording module;
[0033] The drone is controlled to access the task recording module to obtain and execute the plant protection task.
[0034] Furthermore, the controlling the drone to access the task recording module to obtain and execute the plant protection task specifically includes:
[0035] When the drone is activated every second preset time, controlling the drone to access the task recording module and obtain the plant protection task, wherein the plant protection task includes a second field patrol route;
[0036] Controlling the UAV to perform spraying operations at each preset point on the second field patrol route;
[0037] When the spraying operation resources on the drone are consumed, the current second preset point is marked as an unfinished state, and the second preset point is set as the starting point of the third field patrol route. The third field patrol route is the field patrol route for the drone to re-perform spraying operations after replenishing the spraying operation resources.
[0038] On the other hand, the present invention also provides an intelligent plant protection device based on a drone, the device specifically comprising:
[0039] a first processing module, configured to obtain first longitude and latitude data of a rice field based on a map software, wherein the first longitude and latitude data is longitude and latitude data of a boundary of the rice field, determine a plurality of preset points in the rice field according to the first longitude and latitude data, and upload the longitude and latitude data of the plurality of preset points to a data center;
[0040] A second processing module is used to collect a first picture set within a first preset number at each preset point using a drone, wherein the first picture set includes a rice growth cycle data set, a rice disease data set, a rice insect pest data set, and a rice weed damage data set, and train the first picture set based on a deep convolutional neural network to obtain a rice abnormality recognition model;
[0041] The third processing module is used to obtain the latitude and longitude data of the plurality of preset points from the data center according to the task scheduling module and generate a field patrol task, obtain the plant protection task according to the rice abnormality recognition model, and control the UAV to perform the field patrol task and the plant protection task.
[0042] On the other hand, the present invention also provides a computer device, comprising: a memory and a processor and a computer program stored in the memory. When the computer program is executed on the processor, the intelligent plant protection method based on a drone as described in any one of the above methods is implemented.
[0043] On the other hand, the present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the intelligent plant protection method based on a drone as described in any one of the above methods is implemented.
[0044] Compared with the prior art, the present invention has at least one of the following technical effects:
[0045] 1. The entire field inspection and plant protection operations are completed by drones, with almost no human involvement.
[0046] 2. Divide the rice fields into several smaller areas, identify abnormalities and carry out plant protection in each smaller area, which can effectively reduce the cost of plant protection.
[0047] 3. Comprehensively judge whether there is any abnormality in rice according to the four categories of rice growth cycle, rice disease, rice insect pest and rice weed pest, which is more objective and accurate.
[0048] 4. Due to the large number of categories and pictures, the lightweight deep convolutional neural network MobileNetV3 was selected to train the rice picture dataset, which ensured high accuracy and fast inference speed.
[0049] 5. Considering that the abnormal situation of rice at the current preset point is closely related to the rice conditions at the surrounding preset points, the field inspection picture of the current preset point and the pictures of the four preset points in front, behind, left and right are used as the input data of the neural network model to better ensure the accuracy of the rice abnormality recognition model. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0051] Figure 1 It is a flow chart of an intelligent plant protection method based on drones provided by an embodiment of the present invention;
[0052] Figure 2 yes Figure 1 Schematic diagram of the process of S103 in FIG.
[0053] Figure 3 It is a structural schematic diagram of an intelligent plant protection device based on a drone provided in an embodiment of the present invention;
[0054] Figure 4 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0056] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0057] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0058] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0059] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0060] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0061] With the development of intelligent agricultural technology, plant protection drones are increasingly used in agricultural production. Therefore, plant protection drones have gradually become the new favorite of the plant protection industry. Plant protection drones can be used to realize automated spraying operations, such as spraying pesticides and seeds. However, not all areas of a farmland need to be planted for protection. This requires identifying the farmland areas to be planted for protection in order to achieve precise plant protection operations. However, if the identification is done manually, it will take a lot of work and time. Although there are methods in the prior art to identify whether crops are abnormal through image classification models, the classification is not comprehensive and detailed enough, which can easily affect the objectivity and accuracy of the identification.
[0062] Based on this, refer to Figure 1 The embodiment of the present invention provides an intelligent plant protection method based on a drone, and the method specifically includes:
[0063] S101: Obtaining first longitude and latitude data of a rice field based on a map software, wherein the first longitude and latitude data is the longitude and latitude data of a boundary of the rice field, determining a plurality of preset points in the rice field according to the first longitude and latitude data, and uploading the longitude and latitude data of the plurality of preset points to a data center.
[0064] In some embodiments, the obtaining of first longitude and latitude data of a rice field based on a map software, wherein the first longitude and latitude data is the longitude and latitude data of a boundary of the rice field, and determining a plurality of preset points in the rice field according to the first longitude and latitude data, specifically includes:
[0065] Step 1: obtaining first longitude and latitude data of the rice field based on map software, wherein the first longitude and latitude data is the longitude and latitude data of the boundary of the rice field;
[0066] Step 2: obtaining the center point of the rice field according to the first longitude and latitude data, and determining the center point of the rice field as a first preset point;
[0067] Step 3: determining four preset points to be determined at locations spaced by a first preset distance in four directions of front, back, left, and right of the first preset point, and determining whether the four preset points to be determined are within the rice field;
[0068] Step 4: If the judgment is yes, the preset point to be determined in the rice field is determined as the first preset point, and the process returns to step 3.
[0069] In this embodiment, it is necessary to configure a plurality of evenly distributed preset points within the range of the rice field, each preset point represents a small area of the rice field, and the preset point also serves as a fixed stop for the drone and takes pictures and performs plant protection operations during the stop. Starting from the center point of the rice field, the evenly distributed preset points can be determined more quickly, so it is necessary to pre-collect the longitude and latitude data of each boundary point of the rice field, and calculate the longitude and latitude data of the center point based on the longitude and latitude data of each boundary point. First, the vertex of the boundary outline of the rice field can be used as the boundary point, and then the longitude and latitude data of all boundary points of the rice field can be obtained through the map software, and then the longitude and latitude data of all boundary points are added to obtain the total longitude data and total latitude data respectively. After the total longitude data and total latitude data are divided by the number of boundary points, the longitude and longitude data of the center point of the rice field are obtained.
[0070] Next, after determining the position of the center point, the center point is used as the first preset point, and four preset points to be determined are obtained by extending a certain distance from the point in the four directions of front, back, left and right, and then judging whether the four preset points to be determined are located within the range of the rice field. If they are within the range of the rice field, the preset point to be determined is used as the new first preset point, and then the points are continued to be extended in the four directions of front, back, left and right to obtain four new preset points to be determined, and the iteration is continued until a number of first preset points are evenly distributed throughout the rice field.
[0071] S102: Using a drone to collect a first set of pictures within a first preset number at each preset point, the first set of pictures includes a rice growth cycle dataset, a rice disease dataset, a rice insect pest dataset, and a rice weed pest dataset, and training the first set of pictures based on a deep convolutional neural network to obtain a rice abnormality recognition model.
[0072] In some embodiments, the method of using a drone to collect a first set of pictures within a first preset number at each preset point, wherein the first set of pictures includes a rice growth cycle dataset, a rice disease dataset, a rice insect pest dataset, and a rice weed dataset, and training the first set of pictures based on a deep convolutional neural network to obtain a rice abnormality recognition model specifically includes:
[0073] Using a drone to take pictures of each preset point to form a first preset number of first picture sets, and dividing the first picture sets into a rice growth cycle data set, a rice disease data set, a rice insect pest data set, and a rice weed damage data set;
[0074] Based on the PyTorch framework, the rice growth cycle dataset, the rice disease dataset, the rice insect pest dataset, and the rice weed pest dataset are respectively input into the pre-trained MobileNetV3 neural network model for training;
[0075] Based on the cross entropy loss function, the loss is calculated and the gradient descent method is used to optimize the network parameters to generate the rice growth cycle model, rice disease model, rice insect pest model and rice weed damage model;
[0076] The rice growth cycle model, the rice disease model, the rice insect pest model and the rice weed damage model are combined to obtain a rice abnormality recognition model.
[0077] Specifically, based on the PyTorch framework, the rice growth cycle dataset, the rice disease dataset, the rice insect pest dataset, and the rice weed pest dataset are respectively input into the pre-trained MobileNetV3 neural network model for training, which specifically includes:
[0078] Based on the PyTorch framework, determine the pre-trained first MobileNetV3 neural network model, the second MobileNetV3 neural network model, the third MobileNetV3 neural network model, and the fourth MobileNetV3 neural network model;
[0079] The dimensions of the input parameters of the first MobileNetV3 neural network model, the second MobileNetV3 neural network model, the third MobileNetV3 neural network model, and the fourth MobileNetV3 neural network model are set to N*5*3*H*W, and the dimensions of the output parameters are set to N*5*T, where N represents the size of the batch, 5 represents a total of 5 pictures of the current preset point and its neighboring preset points in the four directions of front, back, left, and right, 3 represents the three RGB channels, W and H represent the width and height of the picture, and T represents the number of output branches;
[0080] Input the rice growth cycle data set into the first MobileNetV3 neural network model for training, and output five branches: greening period, tillering period, jointing and booting period, heading period, and fruiting period;
[0081] Input the rice disease data set into the second MobileNetV3 neural network model for training, and output seven branches: no disease, rice false smut, rice sooty mold, rice blast, rice sheath blight, rice sesame leaf spot, and rice bacterial leaf streak;
[0082] Input the rice pest data set into the third MobileNetV3 neural network model for training, and output eight branches including no pest, yellow stem borer, striped stem borer, shaving insect, rice sheath borer, rice planthopper, rice leaf roller and rice leaf miner;
[0083] The rice weed damage data set is input into the fourth MobileNetV3 neural network model for training, and nine branches are output, namely, no weed damage, round-leaved knotweed, water dragon, barnyard grass, philoxerod, bamboo knotweed, Acorus truncatus, sedge and duckweed.
[0084] Specifically, the loss is calculated based on the cross entropy loss function, and the network parameters are optimized by the gradient descent method to generate a rice growth cycle model, a rice disease model, a rice insect pest model, and a rice weed damage model, which specifically includes:
[0085] Based on the cross entropy loss function, the cross entropy errors of each preset point and its neighboring preset points in the four directions of front, back, left, and right are calculated, and the cross entropy errors of each preset point and its neighboring preset points in the four directions of front, back, left, and right are merged according to the preset weight data to obtain the total cross entropy error;
[0086] The gradient descent method is used to optimize the network parameters. When the absolute value of the difference of the total cross entropy error is less than a preset value in four consecutive epochs, the training is terminated and a rice growth cycle model, a rice disease model, a rice insect pest model and a rice weed damage model are generated.
[0087] In this embodiment, in order to facilitate the use of the pictures taken by the drone during the field inspection to automatically identify whether there is abnormal rice by the rice abnormality recognition model, the drone is required to take RGB pictures of field rice crops at each preset point in advance and use them to train the rice abnormality recognition model. The pictures taken by the drone are classified in the early stage, and each picture is marked with the rice growth cycle category, rice disease category, rice insect pest category and rice weed category. 1000-10000 pictures are collected for each category. For insufficient categories, image enhancement can be used to expand the number. Image enhancement includes rotation and translation, etc., to form a rice data set, i.e., the first picture set.
[0088] Considering that a rice field contains hundreds of preset points, the artificial intelligence processing module needs to identify a large number of field patrol photos every day based on the rice anomaly recognition model. Therefore, the rice anomaly recognition model must choose a lightweight classification model to ensure high accuracy and fast reasoning speed. Here, the deep convolutional neural network MobileNetV3 is used to build it.
[0089] Considering that the abnormal situation of rice at the current preset point is closely related to the rice conditions at the surrounding preset points, in the same batch of field inspection pictures, the field inspection pictures of a specific preset point and the pictures of the four preset points in front, behind, left and right are added as the input of the model. The dimension of the input data is N*5*3*H*W, where N is the batch size, 5 represents the five pictures of the current preset point and the surrounding preset points, 3 represents the three RGB channels, and W and H represent the width and height of the picture; the output of the model is N*5*T, where N and 5 are consistent with the first two dimensions of the input data, and T represents the number of output categories contained in this category. The original MobileNetV3 is used for the ImageNet classification task, and the number of categories is 1000. Here we need to modify the number of output categories of the last layer of MobileNetV3. The four models are changed to the number of categories of the corresponding categories, and the network structure of the rest remains unchanged. That is, the number of output categories of the first MobileNetV3 neural network model used to train the rice growth cycle dataset is changed to 5 (i.e., five categories: green period, tillering period, jointing and booting period, heading period and fruiting period), and the number of output categories of the second MobileNetV3 neural network model used to train the rice disease dataset is changed to 7 The number of output categories of the third MobileNetV3 neural network model used to train the rice insect pest dataset was changed to 8 (i.e., no insect pests, rice false smut, rice sooty mold disease, rice blast, rice sheath blight, rice sesame leaf spot and rice bacterial leaf streak), and the number of output categories of the fourth MobileNetV3 neural network model used to train the rice weed pest dataset was changed to 9 (i.e., no weed pests, round-leaved knotweed, water dragon, barnyard grass, philoxeroides, bamboo knotweed, Acorus digitata, sedge and duck tongue grass).
[0090] Next, the first MobileNetV3 neural network model, the second MobileNetV3 neural network model, the third MobileNetV3 neural network model and the fourth MobileNetV3 neural network model that have been pre-trained are used to calculate the loss and optimize the network parameters using the cross entropy error. The model can calculate the cross entropy error of the five preset point images. The cross entropy error weight of the current preset point is set to 0.6, and the cross entropy error weights of the four surrounding preset points are all set to 0.1. Therefore, the total cross entropy error is loss=0.6*center+0.1(left+right+top+bottom), where center represents the cross entropy error of the current preset point image, and left, right, top and bottom represent the cross entropy errors of the surrounding preset points. If the absolute value of the difference between the losses of four consecutive Epochs is less than 1e-6, the training can be terminated, the current weight data can be saved, and the rice growth cycle model, rice disease model, rice insect pest model and rice weed damage model can be generated. Finally, the above four models are merged to form a rice abnormality recognition model.
[0091] S103: According to the task scheduling module, the latitude and longitude data of the plurality of preset points are obtained from the data center and a field patrol task is generated, a plant protection task is obtained according to the rice abnormality recognition model, and the drone is controlled to execute the field patrol task and the plant protection task.
[0092] In some embodiments, the task scheduling module obtains the latitude and longitude data of the plurality of preset points from the data center and generates a field patrol task, obtains a plant protection task according to the rice abnormality recognition model, and controls the drone to perform the field patrol task and the plant protection task, specifically including:
[0093] Obtaining the latitude and longitude data of the plurality of preset points from the data center according to the task scheduling module at first preset time intervals and generating a field patrol task, and sending the field patrol task to the task recording module, wherein the field patrol task includes a first field patrol route;
[0094] activating the drone at a second preset time interval, controlling the drone to obtain the field patrol task from the task recording module, and taking pictures at each preset point on the first field patrol route to form a second picture set of a second preset number, and uploading the second picture set to the data center;
[0095] Acquire the second picture set from the data center based on the task scheduling module, and send the second picture set to the artificial intelligence processing module;
[0096] Based on the artificial intelligence processing module, a first recognition result is obtained according to the rice abnormality recognition model, and the first recognition result is sent to the rice knowledge base, and a plant protection task is intelligently generated according to the corresponding abnormal prevention and control measures and specific drug dosage in the rice knowledge base, and the plant protection task is sent to the task recording module;
[0097] The drone is controlled to access the task recording module to obtain and execute the plant protection task.
[0098] Specifically, controlling the drone to access the task recording module to obtain and execute the plant protection task specifically includes:
[0099] When the drone is activated every second preset time, controlling the drone to access the task recording module and obtain the plant protection task, wherein the plant protection task includes a second field patrol route;
[0100] Controlling the UAV to perform spraying operations at each preset point on the second field patrol route;
[0101] When the spraying operation resources on the drone are consumed, the current second preset point is marked as an unfinished state, and the second preset point is set as the starting point of the third field patrol route. The third field patrol route is the field patrol route for the drone to re-perform spraying operations after replenishing the spraying operation resources.
[0102] In this embodiment, refer to Figure 2 , Figure 2 yes Figure 1 The process diagram of S103 in the figure, the task scheduling module reads all the field information of the data center regularly (for example, set to every day), plans the field inspection route according to the preset points of the field, adds the daily field inspection task to the task recording module, including the field information of the task and the field inspection route, and plans the field inspection route in a manner that the preset points are arranged in the order of longitude and latitude, the smaller the latitude, the closer the arrangement is, and compares the longitude when the latitude is the same, the smaller the longitude, the closer the arrangement is, and then connects all the preset points in sequence according to the arrangement order to obtain the field inspection route of the rice field.
[0103] The drone device wakes up autonomously at a fixed time, accesses the task record module, takes out tasks in sequence, obtains task details, field information and route planning. For field patrol tasks, the drone stops at each preset point and takes RGB pictures of the growth status of rice crops in the field. One picture is taken at each preset point every day and uploaded to the data center, including the task number, shooting time, preset point and GPS location.
[0104] The task scheduling module accesses the data center through a scheduled task to obtain unprocessed field inspection pictures (i.e., field rice crop pictures taken by the drone equipment in the field inspection task of the previous day), and inputs them into the artificial intelligence processing module to obtain the recognition results of four models, including the rice growth cycle category and the categories of rice diseases, rice insect pests, and rice weeds. The artificial intelligence processing module accesses the rice knowledge base based on the input pictures and recognition results of the previous step, and the rice knowledge base makes a decision to determine whether to add a new plant protection task. When adding a new field plot plant protection task, the field plot is the field plot where the above-mentioned abnormal picture is taken. The preset point where the drone performs the plant protection task is the preset point where the above-mentioned abnormal picture is taken in the field, and all the preset points with the abnormality in the field are counted, and all the preset points with the abnormality are arranged in the order of longitude and latitude. The smaller the latitude, the closer the arrangement. When the latitude is the same, the longitude is compared. The smaller the longitude, the closer it is to the front. Then, all the preset points are connected in sequence according to the arrangement order to obtain the flight route of the plant protection task.
[0105] For plant protection tasks, the drone uploads the operation data to the remote data center after completing the plant protection task at each preset point based on the preset point parameters of the task, and updates the data in the task record storage database. If all preset points in the current field have completed plant protection, the task record module will mark the current task as completed; during the plant protection process, if the pesticide or fertilizer is consumed, it can fly back to replenish it by itself, and the current preset point is still marked as unfinished, and the task is returned to the task record module; after the drone completes the replenishment, it will take out the task and continue to perform the plant protection task from the first unfinished preset point.
[0106] Reference Figure 3 The embodiment of the present invention also provides an intelligent plant protection device 3 based on a drone, and the device 3 specifically includes: a first processing module 301, which is used to obtain first longitude and latitude data of a rice field based on a map software, wherein the first longitude and latitude data is the longitude and latitude data of a boundary of the rice field, and a plurality of preset points are determined in the rice field according to the first longitude and latitude data, and the longitude and latitude data of the plurality of preset points are uploaded to a data center; a second processing module 302, which is used to collect a first picture set within a first preset number at each preset point by using a drone, wherein the first picture set includes a rice growth cycle data set, a rice disease data set, a rice insect pest data set, and a rice weed data set, and the first picture set is trained based on a deep convolutional neural network to obtain a rice abnormality recognition model; a third processing module 303, which is used to obtain the longitude and latitude data of the plurality of preset points from the data center according to a task scheduling module and generate a field patrol task, obtain a plant protection task according to the rice abnormality recognition model, and control the drone to perform the field patrol task and the plant protection task.
[0107] It is understandable that if Figure 1The contents of the UAV-based intelligent plant protection method embodiment shown in the figure are applicable to the UAV-based intelligent plant protection device embodiment. The functions specifically implemented by the UAV-based intelligent plant protection device embodiment are similar to those in the embodiment shown in the figure. Figure 1 The embodiment of the intelligent plant protection method based on drone shown in FIG. Figure 1 The beneficial effects achieved by the embodiment of the drone-based intelligent plant protection method shown are also the same.
[0108] It should be noted that the information interaction, execution process and other contents between the above-mentioned devices are based on the same concept as the method embodiment of the present invention. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0109] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0110] Reference Figure 4 The embodiment of the present invention further provides a computer device 4, comprising: a memory 402 and a processor 401 and a computer program 403 stored in the memory 402. When the computer program 403 is executed on the processor 401, the intelligent plant protection method based on a drone as described in any one of the above methods is implemented.
[0111] The computer device 4 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The computer device may include, but is not limited to, a processor 401 and a memory 402. Those skilled in the art will appreciate that Figure 4 It is only an example of the computer device 4 and does not constitute a limitation on the computer device 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0112] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0113] In some embodiments, the memory 402 may be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 402 may also be an external storage device of the computer device 4, such as a plug-in 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 computer device 4. Further, the memory 402 may also include both an internal storage unit and an external storage device of the computer device 4. The memory 402 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 402 may also be used to temporarily store data that has been output or is to be output.
[0114] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the intelligent plant protection method based on a drone as described in any one of the above methods is implemented.
[0115] In this embodiment, if the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, USB flash drive, mobile hard disk, disk or optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0116] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0117] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0118] In the embodiments disclosed in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0119] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Claims
1. An intelligent plant protection method based on drones, It is characterized in that The method specifically comprises: Obtaining first longitude and latitude data of the rice field based on a map software, wherein the first longitude and latitude data is the longitude and latitude data of the boundary of the rice field, determining a plurality of preset points in the rice field according to the first longitude and latitude data, and uploading the longitude and latitude data of the plurality of preset points to a data center; The method of obtaining first longitude and latitude data of a rice field based on a map software, wherein the first longitude and latitude data is the longitude and latitude data of a boundary of the rice field, and determining a plurality of preset points in the rice field according to the first longitude and latitude data, specifically includes: Step 1: obtaining first longitude and latitude data of the rice field based on map software, wherein the first longitude and latitude data is the longitude and latitude data of the boundary of the rice field; Step 2: obtaining the center point of the rice field according to the first longitude and latitude data, and determining the center point of the rice field as a first preset point; Step 3: determining four preset points to be determined at locations spaced by a first preset distance in four directions of front, back, left, and right of the first preset point, and determining whether the four preset points to be determined are within the rice field; Step 4: If the judgment is yes, the preset point to be determined in the rice field is determined as the first preset point, and the process returns to step 3; Using a drone to collect a first picture set within a first preset number at each preset point, the first picture set includes a rice growth cycle data set, a rice disease data set, a rice insect pest data set, and a rice weed damage data set, and training the first picture set based on a deep convolutional neural network to obtain a rice abnormality recognition model; The method comprises: using a drone to collect a first set of pictures within a first preset number at each preset point, wherein the first set of pictures includes a rice growth cycle data set, a rice disease data set, a rice insect pest data set, and a rice weed data set; and training the first set of pictures based on a deep convolutional neural network to obtain a rice abnormality recognition model, specifically comprising: Using a drone to take pictures of each preset point to form a first preset number of first picture sets, and dividing the first picture sets into a rice growth cycle data set, a rice disease data set, a rice insect pest data set, and a rice weed damage data set; Based on the PyTorch framework, the rice growth cycle dataset, the rice disease dataset, the rice insect pest dataset, and the rice weed pest dataset are respectively input into the pre-trained MobileNetV3 neural network model for training; Based on the cross entropy loss function, the loss is calculated and the gradient descent method is used to optimize the network parameters to generate the rice growth cycle model, rice disease model, rice insect pest model and rice weed damage model; Combining the rice growth cycle model, the rice disease model, the rice insect pest model and the rice weed damage model to obtain a rice abnormality recognition model; The method of calculating the loss based on the cross entropy loss function, optimizing the network parameters by the gradient descent method, and generating the rice growth cycle model, the rice disease model, the rice insect pest model and the rice weed damage model specifically includes: Based on the cross entropy loss function, the cross entropy errors of each preset point and its neighboring preset points in the four directions of front, back, left, and right are calculated, and the cross entropy errors of each preset point and its neighboring preset points in the four directions of front, back, left, and right are merged according to the preset weight data to obtain the total cross entropy error; The network parameters are optimized by the gradient descent method. When the absolute value of the difference of the total cross entropy error is less than a preset value in four consecutive epochs, the training is terminated and a rice growth cycle model, a rice disease model, a rice insect pest model and a rice weed damage model are generated. According to the task scheduling module, the latitude and longitude data of the plurality of preset points are obtained from the data center and a field patrol task is generated, the plant protection task is obtained according to the rice abnormality recognition model, and the drone is controlled to execute the field patrol task and the plant protection task.
2. The method according to claim 1, It is characterized in that Based on the PyTorch framework, the rice growth cycle dataset, the rice disease dataset, the rice insect pest dataset, and the rice weed pest dataset are respectively input into the pre-trained MobileNetV3 neural network model for training, specifically including: Based on the PyTorch framework, determine the pre-trained first MobileNetV3 neural network model, the second MobileNetV3 neural network model, the third MobileNetV3 neural network model, and the fourth MobileNetV3 neural network model; The dimensions of the input parameters of the first MobileNetV3 neural network model, the second MobileNetV3 neural network model, the third MobileNetV3 neural network model, and the fourth MobileNetV3 neural network model are set to N*5*3*H*W, and the dimensions of the output parameters are set to N*5*T, where N represents the size of the batch, 5 represents a total of 5 pictures of the current preset point and its neighboring preset points in the four directions of front, back, left, and right, 3 represents the three RGB channels, W and H represent the width and height of the picture, and T represents the number of output branches; Input the rice growth cycle data set into the first MobileNetV3 neural network model for training, and output five branches: greening period, tillering period, jointing and booting period, heading period, and fruiting period; Input the rice disease data set into the second MobileNetV3 neural network model for training, and output seven branches: no disease, rice false smut, rice sooty mold, rice blast, rice sheath blight, rice sesame leaf spot, and rice bacterial leaf streak; Input the rice pest data set into the third MobileNetV3 neural network model for training, and output eight branches including no pest, yellow stem borer, striped stem borer, shaving insect, rice sheath borer, rice planthopper, rice leaf roller and rice leaf miner; The rice weed damage data set is input into the fourth MobileNetV3 neural network model for training, and nine branches are output, namely, no weed damage, round-leaved knotweed, water dragon, barnyard grass, philoxerod, bamboo knotweed, Acorus truncatus, sedge and duckweed.
3. The method according to claim 1, It is characterized in that The task scheduling module obtains the latitude and longitude data of the plurality of preset points from the data center and generates a field patrol task, obtains the plant protection task according to the rice abnormality recognition model, and controls the drone to perform the field patrol task and the plant protection task, specifically including: Obtaining the latitude and longitude data of the plurality of preset points from the data center according to the task scheduling module at first preset time intervals and generating a field patrol task, and sending the field patrol task to the task recording module, wherein the field patrol task includes a first field patrol route; activating the drone at a second preset time interval, controlling the drone to obtain the field patrol task from the task recording module, and taking pictures at each preset point on the first field patrol route to form a second picture set of a second preset number, and uploading the second picture set to the data center; Acquire the second picture set from the data center based on the task scheduling module, and send the second picture set to the artificial intelligence processing module; Based on the artificial intelligence processing module, a first recognition result is obtained according to the rice abnormality recognition model, and the first recognition result is sent to the rice knowledge base, and a plant protection task is intelligently generated according to the corresponding abnormal prevention and control measures and specific drug dosage in the rice knowledge base, and the plant protection task is sent to the task recording module; The drone is controlled to access the task recording module to obtain and execute the plant protection task.
4. The method according to claim 3, It is characterized in that The controlling the drone to access the task recording module to obtain and execute the plant protection task specifically includes: When the drone is activated every second preset time, controlling the drone to access the task recording module and obtain the plant protection task, wherein the plant protection task includes a second field patrol route; Controlling the UAV to perform spraying operations at each preset point on the second field patrol route; When the spraying operation resources on the drone are consumed, the current second preset point is marked as an unfinished state, and the second preset point is set as the starting point of the third field patrol route. The third field patrol route is the field patrol route for the drone to re-perform spraying operations after replenishing the spraying operation resources.
5. An intelligent plant protection device based on drones, It is characterized in that Used to implement the intelligent plant protection method based on drone according to any one of claims 1 to 4, the device specifically comprises: a first processing module, configured to obtain first longitude and latitude data of a rice field based on a map software, wherein the first longitude and latitude data is longitude and latitude data of a boundary of the rice field, determine a plurality of preset points in the rice field according to the first longitude and latitude data, and upload the longitude and latitude data of the plurality of preset points to a data center; The method of obtaining first longitude and latitude data of a rice field based on a map software, wherein the first longitude and latitude data is the longitude and latitude data of a boundary of the rice field, and determining a plurality of preset points in the rice field according to the first longitude and latitude data, specifically includes: Step 1: obtaining first longitude and latitude data of the rice field based on map software, wherein the first longitude and latitude data is the longitude and latitude data of the boundary of the rice field; Step 2: obtaining the center point of the rice field according to the first longitude and latitude data, and determining the center point of the rice field as a first preset point; Step 3: determining four preset points to be determined at locations spaced by a first preset distance in four directions of front, back, left, and right of the first preset point, and determining whether the four preset points to be determined are within the rice field; Step 4: If the judgment is yes, the preset point to be determined in the rice field is determined as the first preset point, and the process returns to step 3; A second processing module is used to collect a first picture set within a first preset number at each preset point using a drone, wherein the first picture set includes a rice growth cycle data set, a rice disease data set, a rice insect pest data set, and a rice weed damage data set, and train the first picture set based on a deep convolutional neural network to obtain a rice abnormality recognition model; The method comprises: using a drone to collect a first set of pictures within a first preset number at each preset point, wherein the first set of pictures includes a rice growth cycle data set, a rice disease data set, a rice insect pest data set, and a rice weed data set; and training the first set of pictures based on a deep convolutional neural network to obtain a rice abnormality recognition model, specifically comprising: Using a drone to take pictures of each preset point to form a first preset number of first picture sets, and dividing the first picture sets into a rice growth cycle data set, a rice disease data set, a rice insect pest data set, and a rice weed damage data set; Based on the PyTorch framework, the rice growth cycle dataset, the rice disease dataset, the rice insect pest dataset, and the rice weed pest dataset are respectively input into the pre-trained MobileNetV3 neural network model for training; Based on the cross entropy loss function, the loss is calculated and the gradient descent method is used to optimize the network parameters to generate the rice growth cycle model, rice disease model, rice insect pest model and rice weed damage model; Combining the rice growth cycle model, the rice disease model, the rice insect pest model and the rice weed damage model to obtain a rice abnormality recognition model; The method of calculating the loss based on the cross entropy loss function, optimizing the network parameters by the gradient descent method, and generating the rice growth cycle model, the rice disease model, the rice insect pest model and the rice weed damage model specifically includes: Based on the cross entropy loss function, the cross entropy errors of each preset point and its neighboring preset points in the four directions of front, back, left, and right are calculated, and the cross entropy errors of each preset point and its neighboring preset points in the four directions of front, back, left, and right are merged according to the preset weight data to obtain the total cross entropy error; The network parameters are optimized by the gradient descent method. When the absolute value of the difference of the total cross entropy error is less than a preset value in four consecutive epochs, the training is terminated and a rice growth cycle model, a rice disease model, a rice insect pest model and a rice weed damage model are generated. The third processing module is used to obtain the latitude and longitude data of the plurality of preset points from the data center according to the task scheduling module and generate a field patrol task, obtain the plant protection task according to the rice abnormality recognition model, and control the UAV to perform the field patrol task and the plant protection task.
6. A computer device, It is characterized in that include: A memory and a processor and a computer program stored in the memory, when the computer program is executed on the processor, implements the intelligent plant protection method based on a drone as described in any one of claims 1 to 4.
7. A computer-readable storage medium, It is characterized in that A computer program is stored thereon, and when the computer program is executed by a processor, the intelligent plant protection method based on a drone as described in any one of claims 1 to 4 is implemented.
