Intelligent agricultural system based on deep learning

Through a smart agricultural system based on deep learning, the crop growth environment is monitored and managed in real time, and pests and diseases are automatically identified and controlled, which solves the problems of high labor intensity and inefficiency in traditional agriculture, and improves crop yield and quality.

CN120065841APending Publication Date: 2025-05-30JINLING INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510202783.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In traditional agriculture, labor intensity, strong subjectivity and low efficiency are difficult to achieve refined management of each plant, and problems such as pests and diseases cannot be discovered and dealt with in a timely manner.

Method used

The intelligent agricultural system based on deep learning is adopted, including environmental monitoring units, crop image acquisition units, identification units and control units, to detect and regulate environmental parameters of crop growth in real time, and automatically identify and control diseases and pests.

Benefits of technology

Real-time monitoring and automated management of crop growth environment have been achieved, the efficiency of pest identification and control has been improved, manual intervention has been reduced, and crop yield and quality have been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120065841A_ABST
    Figure CN120065841A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent agricultural system based on deep learning, and belongs to the technical field of intelligent agriculture, and the system comprises an environment monitoring unit which is used for monitoring the environment of an agricultural greenhouse where crops are located; the crop image acquisition unit is used for performing image acquisition on crop plants in the planting area; the recognition unit is used for carrying out health state recognition on the collected plant pictures, and the health state recognition comprises plant growth state recognition, weed state recognition and pest and disease damage recognition; and the control unit is used for controlling the action of each agricultural auxiliary device according to the preset in-greenhouse environment parameters, the environment data monitored by the environment monitoring unit, the growth state, the weed condition and the pest and disease identification result. The environment parameters of crop growth can be detected and adjusted in real time, and diseases and pests can be automatically recognized and treated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of smart agriculture, and particularly relates to a smart agriculture system based on deep learning. Background Art

[0002] Traditional agriculture in our country has disadvantages such as high labor intensity, strong subjectivity, and low efficiency. Traditional tomato cultivation requires a large amount of manual operations, including irrigation, ventilation, pest control, etc. This not only increases the labor intensity, but also affects the economic benefits as the labor cost rises. Due to the lack of accurate data support, farmers often rely on traditional experience to decide when to irrigate or control pests and diseases. This method is easily affected by individual differences, thus affecting the final crop yield and quality. It is difficult to achieve refined management of each plant with traditional planting methods, and it is impossible to detect and handle problems such as pests and diseases in a timely manner.

[0003] Smart agriculture, as a topic repeatedly mentioned by the country in recent years, has become an important issue, and many institutions, companies, etc. have conducted research on it. The prior art with the application number CN201710991987.1 discloses a smart agriculture control method based on the web page. The feature of this method is to directly read the status of sensors and control the controlled devices using the web page. However, considering the actual situation, the knowledge level of many farmers is limited, and the use of computer web pages is not yet popular, so the application is limited. The idea of equipping each household with a computer is relatively ideal. The prior art with the application number CN202111003881.9 discloses a smart agriculture planting system based on Internet of Things technology. The fertility in the soil is inspected through soil detection sensors, and the fertilization amount is controlled based on the detected data to ensure the fertilizers required for plant growth. However, this prior art only conducts environmental monitoring through soil detection sensors, with a single parameter, and it is difficult to be used as the main reference quantity, and decisions should be made by considering various factors. Summary of the Invention

[0004] In view of the deficiencies in the prior art, the present invention provides a smart agriculture system based on deep learning, which can detect and adjust the environmental parameters for the growth of crops in real time, and can automatically identify and control pests and diseases.

[0005] The present invention provides the following technical solutions:

[0006] A smart agriculture system based on deep learning, comprising:

[0007] An environmental monitoring unit for monitoring the environment of the agricultural greenhouse where the crops are located;

[0008] A crop image acquisition unit for acquiring images of crop plants in the planting area;

[0009] An identification unit for identifying the health status of the collected plant pictures, where the health status identification includes the growth status of the plants, the weed condition, and the identification of pests and diseases;

[0010] A control unit for controlling the actions of various agricultural auxiliary devices according to the preset environmental parameters in the greenhouse, the environmental data monitored by the environmental monitoring unit, the growth status, the weed condition, and the identification results of pests and diseases.

[0011] Optionally, the environmental monitoring unit includes a greenhouse temperature sensor, a carbon dioxide concentration sensor, a soil humidity sensor, and a light intensity sensor; the agricultural auxiliary devices include a growth lamp, a ventilation fan, a sprinkler device, and a pesticide application device;

[0012] The environmental data monitored by the environmental monitoring unit is stored using a mean filter algorithm and a FIFO cache mechanism.

[0013] Optionally, the crop image acquisition unit includes a servo motor and a camera. The servo motor is installed in the middle of the crop plants surrounding in a circle, and the camera is installed at the rotating part of the servo motor; the pesticide application device includes a medicine box and several spraying devices. The spraying devices are connected to the medicine box, and the spraying range is part of the crop plants surrounding the servo motor, and the medicine box is located below the servo motor.

[0014] Optionally, the identification unit for identifying the health status of the collected plant pictures has the following specific process:

[0015] The trained growth status identification model, weed identification model, and pest and disease identification model are respectively used to identify the health status of the collected plant pictures; the growth status identification model, weed identification model, and pest and disease identification model are all built based on the YOLOv5 framework; the network frameworks of the growth status identification model, weed identification model, and pest and disease identification model all include a backbone network, a neck, and a detection head. The backbone network uses a CSP structure, the neck uses SPPF to extract features of different scales, and PANet is used to fuse the extracted features of different scales; the detection head of the growth status identification model focuses on identifying the growth status of the plants, the detection head of the weed identification model focuses on identifying the weed condition around the plants, and the detection head of the pest and disease identification model focuses on identifying the pests and diseases of the plants.

[0016] Optionally, the detection heads of the growth status identification model, weed identification model, and pest and disease identification model all output the target classification results, and use an anchor-free method to output the position information of the predicted box of the target;

[0017] The target classification result output by the growth status identification model is a mature state or an immature state;

[0018] The target classification result output by the weed recognition model is that there are weeds or there are no weeds;

[0019] The target classification results output by the pest and disease recognition model are no pests, yellow virus, leaf spot, bacterial spot, early blight, late blight, or virus disease.

[0020] Optionally, during the training process of the growth state recognition model, the weed recognition model, and the pest and disease recognition model, the EIOU (Enhanced IoU) loss function is used to optimize the models; specifically, the loss function L class is:

[0021]

[0022] where N is the number of samples, y n * is the true label, y n is the predicted probability, x i is the sample, x n is the total number, X i is the sample value flexible maximum transfer function.

[0023] Optionally, the control unit includes a display screen and an STM32F746G-Disco terminal. The display screen can display the environmental data monitored by the environmental monitoring unit, as well as the growth state, weed condition, and pest and disease recognition results;

[0024] The STM32F746G-Disco terminal has an automatic management mode and a manual management mode;

[0025] In the automatic management mode, the STM32F746G-Disco terminal determines whether the spraying device has the required liquid medicine according to the weed state and the pest and disease recognition results, and sprays the liquid medicine when the required liquid medicine is available; the STM32F746G-Disco terminal can also compare the environmental data of the environmental monitoring unit with the preset environmental parameters in the greenhouse, and control the growth lamp, ventilation fan, and sprinkler device according to the comparison results;

[0026] In the manual mode, the STM32F746G-Disco terminal directly controls the actions of each agricultural auxiliary device according to the operation buttons on the display screen.

[0027] Optionally, the STM32F746G-Disco terminal transmits data to the display screen and mobile devices including mini-programs / Aliyun via a wifi module; specifically: the STM32F746G-Disco terminal transmits the environmental data monitored by the environmental monitoring unit, as well as the growth status, weed status, and pest and disease identification results, to the display screen and mobile devices, and the mobile devices can transmit control instructions for agricultural auxiliary equipment to the STM32F746G-Disco terminal.

[0028] Compared with the prior art, the beneficial effects of the present invention are:

[0029] (1) It can monitor environmental parameters such as soil humidity, light intensity, and temperature in real time, and automatically identify the status of tomato plants, such as growth status, weed status, and whether there are pests and diseases, based on the crop image acquisition unit and recognition unit, realizing precise field management and decision-making support; at the same time, the automation degree of this application is high, and the automatic control system can automatically adjust lighting, irrigation, and pest and disease identification and treatment operations according to preset parameters, reducing manual intervention and improving work efficiency.

[0030] (2) It can be directly operated on the display screen, which is simple and convenient. At the same time, we are also equipped with an Internet of Things interface and multi-terminal operations of mini-programs. The YOLOv5 object detection algorithm is used to identify the health status of crop plants, and the recognition accuracy exceeds 98%, significantly improving the recognition efficiency of pests and diseases, fruit maturity, and weed quantity; the network frameworks of the growth status recognition model, weed recognition model, and pest and disease recognition model of this application all include a backbone network, a neck, and a detection head. The CSPDarknet53 is used as the backbone network architecture, the improved PANet is used as the neck structure, and an Anchor-free detection head is introduced. Coupled with the fusion of the EIOU loss function, the performance and detection accuracy of the model are significantly improved, and at the same time, the adaptability and robustness of the model in complex environments are enhanced, which is particularly suitable for the plant health monitoring and pest and disease identification needs in traditional greenhouse environments and modern greenhouse spaces. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is the overall structural schematic diagram of the agricultural greenhouse of the present invention;

[0032] Figure 2 is the structural block diagram of a smart agriculture system based on deep learning of the present invention;

[0033] Figure 3 is the network framework diagram of the growth status recognition model, weed recognition model, and pest and disease recognition model of the present invention;

[0034] Figure 4It is a schematic structural diagram of the present invention for outputting the position information of the prediction box of the target in an anchor-free manner;

[0035] Figure 5 It is a flowchart of the steps for the display screen of the present invention to dynamically display pictures.

[0036] In the figure, the markings are as follows: 1 is a growth lamp, 2 is a water pump, 3 is a water tank, 4 is a medicine box, 5 is a soil humidity sensor, 6 is a light intensity sensor, 7 is a carbon dioxide concentration sensor, 8 is a greenhouse temperature sensor, 9 is an STM32F746G-Disco terminal, 10 is a ventilation fan, 11 is a sprinkler head, 12 is a camera, 13 is a servo, and 14 is a plant. Detailed implementation manners

[0037] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and cannot be used to limit the protection scope of the present invention. It should be noted that the terms "include" and any variations thereof in the description and claims of the present invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0038] As Figure 1 and Figure 2 shown, a smart agriculture system based on deep learning is provided, including: an environmental monitoring unit, a crop image acquisition unit, an identification unit, and a control unit.

[0039] I. Agricultural auxiliary equipment

[0040] It includes a growth lamp 1, a ventilation fan 10, a watering device, and a pesticide application device. The growth lamp 1 can be set at the top of the agricultural greenhouse, and the irradiation range can cover all the crops in the agricultural greenhouse; the ventilation fan 10 is set on the side of the greenhouse, and the number of ventilation fans 10 can be adjusted according to the size of the greenhouse. The watering device includes a sprinkler head 11, a water tank 3, and a water pump 2. Optionally, the sprinkler head 11 is set at the top of the greenhouse and is connected to the water tank 3 through the water pump 2; the water pump 2 and the water tank 3 can be set outside the agricultural greenhouse. The pesticide application device includes a medicine box 4 and several spraying devices. The medicine box 4 can have multiple ones arranged vertically or side by side and stores different liquid medicines for controlling pests and diseases. The spraying devices are communicated with the medicine box 4. Specifically, the spraying devices can correspond to the medicine box 4 one by one, so as to spray different liquid medicines by starting different spraying devices; of course, the number of spraying devices can also be determined according to the spraying range. Specifically, all the medicine boxes 4 are communicated with the spraying devices, and each medicine box 4 is controlled to be connected to the spraying devices through valves and the like.

[0041] II. Environmental Monitoring Unit

[0042] It is used to monitor the environment of the agricultural greenhouse where the crops are located. Specifically, it includes a greenhouse temperature sensor 8, a carbon dioxide concentration sensor 7, a soil humidity sensor 5, and a light intensity sensor 6.

[0043] Multiple sensors are used to measure light, temperature, soil humidity, and carbon dioxide concentration. The structures of the greenhouse temperature sensor 8, the carbon dioxide concentration sensor 7, the soil humidity sensor 5, and the light intensity sensor 6 can refer to the existing technologies.

[0044] For the environmental data monitored by the environmental monitoring unit, a mean filtering algorithm and a FIFO (First In First Out) cache mechanism are used for storage; specifically, a data cache space with a fixed size is created to store the recently collected data points, and the mean filtering method is used to smooth these data to reduce noise interference and ensure the accuracy and stability of chart display and data dynamic refresh.

[0045] III. Crop Image Acquisition Unit

[0046] It is used to acquire images of crop plants in the planting area.

[0047] The crop image acquisition unit includes a servo 13 and a camera 12. The servo 13 is installed in the middle of the crop plants surrounding in a circle, and the camera 12 is installed at the rotating part of the servo 13; of course, in some other embodiments, the crop image acquisition unit can also use a drone.

[0048] In this embodiment, the spraying device is connected to the medicine box 4, and the spraying range is part of the crop plants surrounding the servo 13. The medicine box 4 is located below the servo 13. A number of small compartments are arranged in the medicine box 4. Each small compartment is not connected to each other and stores different types of liquid medicines. Each small compartment is connected or disconnected from the spraying device through a valve control.

[0049] IV. Identification Unit

[0050] It is used to identify the health status of the collected plant pictures. The health status identification includes the growth status of the plants, the weed condition, and the identification of pests and diseases.

[0051] The specific process of identifying the health status of the collected plant pictures is as follows:

[0052] Use the trained plant growth status recognition model, weed recognition model, and pest and disease recognition model to identify the health status of the collected plant images respectively. The growth status recognition model identifies the growth status of the plant, including mature or immature; the weed recognition model identifies the weed condition of the plant, including the presence or absence of weeds; the pest and disease recognition model identifies the types of pests and diseases of the plant, including no pests, yellow virus, leaf spot, bacterial spot, early blight, late blight, or virus disease.

[0053] The growth status recognition model, weed recognition model, and pest and disease recognition model are all built based on the YOLOv5 framework.

[0054] As Figure 3 shown, the network frameworks of the growth status recognition model, weed recognition model, and pest and disease recognition model all include a backbone, a neck, and a head. The backbone uses a CSP structure, the neck uses SPPF to extract features of different scales, and PANet is used to fuse the features of different scales extracted to capture information of different scales; the head of the growth status recognition model focuses on identifying the growth status of the plant, the head of the weed recognition model focuses on identifying the weed condition around the plant, and the head of the pest and disease recognition model focuses on identifying the pests and diseases of the plant.

[0055] The backbone network uses a CSP (Cross Stage Partial Networks) structure. By dividing the feature map into two parts for processing, one part performs convolution operations, and the other part is directly spliced with the convolution result, thus retaining the diversity of feature information and reducing the computational complexity.

[0056] The neck uses an improved PANet (Path Aggregation Network), combines top-down and bottom-up path enhancement for feature fusion, and is paired with SPPF (Spatial Pyramid Pooling-Fast) to replace the traditional SPP, and improves the computational efficiency through serial processing of multiple 5x5 maxpooling layers.

[0057] Furthermore, the heads of the growth status recognition model, weed recognition model, and pest and disease recognition model all output the target classification results, and use an anchor-free method to output the position information of the predicted bounding box of the target.

[0058] As Figure 4 shown, the position and size of the predicted bounding box are adjusted through the coordinates on the feature map and the predefined anchor offset to ensure that the predicted bounding box can cover the target object more accurately. The specific formula is expressed as:

[0059] X = position.x + layerWidth × (0.5 - anchorPoint)

[0060] Y = position.y + layerHeight × (0.5 - anchorPoint)

[0061] W = (B.x - A.x) × (2 × Position.x(layerWidth)) 2

[0062] H = (B.y - A.y) × (2 × position.y(layerHeight)) 2

[0063] Among them, position.x and position.y are the coordinates of the center point of the predicted box on the feature map, layerWidth and layerHeight are the width and height of the feature map respectively; anchorPoint is a predefined anchor point offset used to adjust the position of the predicted box; B.x and A.x are the coordinates of the right boundary and left boundary of the bounding box on the feature map respectively; B.y and A.y are the coordinates of the upper boundary and lower boundary of the bounding box on the feature map respectively. X and Y are the center point positions of the predicted box after adjustment, and W and H are the width and height of the predicted box after adjustment.

[0064] Furthermore, during the training process of the growth state recognition model, weed recognition model, and pest and disease recognition model, the EIOU (Enhanced IoU) loss function is used to optimize the models; the loss function of this application is improved based on the CIOU (Complete IoU) loss. After separating the ordinate and solving Softmax(x), relevant accumulations are made to solve the loss function; specifically, the loss function L class is as follows:

[0065]

[0066] Among them, N is the number of samples, y n * is the true label, y n is the predicted probability, x i is the sample, x n is the total number, X i is the sample value flexible maximum transfer function.

[0067] By optimizing the loss function, the confidence and accuracy of the model can be effectively improved, ensuring more reliable detection results in practical applications. After rigorous testing, the proposed algorithm achieved a mean average precision (mAP) of 99.36% in detecting the health status of tomato plants, while achieving a running speed of 8 frames per second (fps). This enables it to meet the requirements of automatic health detection and is applicable to traditional greenhouse environments as well as modern greenhouse spaces.

[0068] V. Control Unit

[0069] It is used to control the actions of various agricultural auxiliary devices according to the preset environmental parameters in the greenhouse, the environmental data monitored by the environmental monitoring unit, the growth status, the weed condition, and the pest and disease identification results.

[0070] The control unit includes a display screen and an STM32F746G-Disco terminal.

[0071] The display screen can display the environmental data monitored by the environmental monitoring unit, as well as the growth status, the weed condition, and the pest and disease identification results.

[0072] The STM32F746G-Disco terminal has an automatic management mode and a manual management mode; in the automatic management mode, the STM32F746G-Disco terminal determines whether the spraying device has the required liquid medicine according to the weed status and the pest and disease identification results, and sprays the liquid medicine when the required liquid medicine is available; the STM32F746G-Disco terminal can also compare the environmental data of the environmental monitoring unit with the preset environmental parameters in the greenhouse, and control the growth lamp 1, the ventilation fan 10, and the sprinkler device according to the comparison results; in the manual mode, the STM32F746G-Disco terminal directly controls the actions of various agricultural auxiliary devices according to the operation buttons on the display screen.

[0073] As an option, the interface of the display screen is as follows:

[0074] Environmental monitoring interface, which has five main parts: light intensity detection, soil humidity detection, carbon dioxide detection, air temperature detection, and the current regional weather system. The first four modules all have status displays. When a problem occurs in a certain item of data, an abnormal prompt will appear below its module. Except for the current weather system, the first four parts all have independent interfaces, and you can directly click on the corresponding module to enter the corresponding sub-interface. The historical data collected by the current sensor is displayed in a chart and updated in real time. Click the return button to return to the environmental monitoring interface, and click the exit button on the environmental monitoring interface to return to the main interface.

[0075] Device management interface, which has three major modules: growth buttons, water pump 2 button, and ventilation fan 10 button. Clicking on the corresponding button can control the corresponding device. Above the three major modules, there is a "manual / automatic" mode switch. When switched to the automatic mode, manual management is invalid, and the terminal will automatically manage and control the device according to the environmental data. At the same time, the device can be remotely controlled on the IOT Stdio website of Alibaba Cloud or within the WeChat mini-program, and all environmental data can be received in real time. Clicking on the return button within the device management interface can return to the main interface.

[0076] Plant health interface, which has three major modules: image acquisition, plant health information, and pest and disease control. When the device is just powered on, there is no plant information. Therefore, the second module, plant health information, shows "unknown". At this time, clicking on the image acquisition button, the servo 13 starts to rotate, and the camera 12 on the turntable collects and transmits the image information to the PC side for YOLO recognition and image processing, and then transmits it to the STM32F746G-DISCO terminal via the USB cable and stores it in the TF card of the terminal. The terminal reads the plant image information in the TF card and displays the information on the plant health information module. The plant health information module includes: Plant 1, Plant 2, Plant 3, and Plant 4, and shows whether the corresponding plant status is good. Each of the four plants has a corresponding button. When clicking on one of the buttons, it will enter the details interface of the corresponding plant. This interface can display: pest and disease information, growth status information, and weed status information. Only one type of information can be displayed at the same time, that is, the processed corresponding plant image information and the text details of pest and disease / growth status / weed status. There are switching buttons for the three types of information in the lower right corner of the interface, which can display the three information interfaces respectively. The three information interfaces correspond to different recognized plant images and text descriptions. For the third module, pest and disease control, in the plant health interface, click to enter the control interface, select the corresponding pest and disease type according to the processed plant health information, and click "Start control", then the servo 13 will start to rotate to the plant with the corresponding pest and disease for pesticide spraying. Clicking on the return button within the plant health interface can return to the main interface.

[0077] In this embodiment, the display screen is an RGB screen with a resolution of 480*272, using the LTDC interface. The terminal is equipped with a TF card and a USB data cable to implement the function of a card reader. By connecting to the host computer through the USB data cable and using the FatFs file system installed on the terminal, the host computer can conveniently manage the plant data stored in the terminal. The STM32F746G-DISCO terminal uses the STM32F746G-Disco development board from STMicroelectronics. In the STM32 series of development boards, ST has specifically designed hardware accelerators: Chrom-ART (DMA2D), a hardware JPEG codec, and Chrom-GRC. The Chrom-ART accelerator is specifically used for DMA in two-dimensional graphics display, the hardware JPEG codec is used for the encoding and decoding of JPEG images, and the Chrom-GRC memory management unit is used to optimize the storage overhead of non-graphic displays.

[0078] The STM32F746G-Disco terminal transmits data to the display screen and mobile devices (including mini-programs / Aliyun) through the wifi module. Specifically, the STM32F746G-Disco terminal transmits the environmental data monitored by the environmental monitoring unit, as well as the growth status, weed conditions, and pest and disease identification results, to the display screen and mobile devices. The mobile device can transmit control instructions for agricultural auxiliary equipment to the STM32F746G-Disco terminal.

[0079] System data can be viewed at any time on the computer, mobile phone, or display screen. The WeChat mini-program page receives real-time environmental monitoring data from the Alibaba Cloud Internet of Things platform and updates the display content on the page. The current weather information is obtained and displayed using a third-party API (QWeather API). Users can remotely control the status of the LED light, water pump 2, and ventilation fan 10 through switches on the page. When the user changes the switch status, the corresponding control command is sent to the corresponding device through the MQTT protocol. The MQTT protocol is used to achieve low-latency communication between the WeChat mini-program and the Internet of Things devices, enabling users to monitor environmental data in real time and remotely control the devices. In addition, a reconnection mechanism for the MQTT client is set up to ensure connection maintenance even in the case of unstable network conditions, enhancing the reliability of the system. Authentication uses the triple (ProductKey, DeviceName, DeviceSecret) provided by Alibaba Cloud to ensure the security of communication. The event listening method is adopted to handle situations such as MQTT message reception and connection exceptions, making the code structure clearer and easier to maintain.

[0080] In some other embodiments, the present invention realizes the detailed configuration of the USB interface of the STM32 microcontroller through customized USB device initialization, including clock configuration, GPIO pin setting, and interrupt priority setting, ensuring the stable operation of the USB interface and supporting full-speed or high-speed transmission modes. Further, the present invention calls the USBD_Init function and registers necessary callback functions, such as PCD_SetupStageCallback, PCD_DataOutStageCallback, etc., enabling the system to be recognized as a USB flash drive by the host as a mass storage device, facilitating users to directly access and manage the data stored on the TF card, and supporting automatic mounting and hot plugging functions, allowing data exchange to be completed without restarting the device. Meanwhile, a wake-up mechanism in the low-power mode is added to improve energy efficiency. To achieve efficient and reliable data storage, the system is configured with a 32GB-capacity TF (TransFlash) card and adopts the FatFs file system. The present invention makes full use of the advantages of the TF card supporting both SDIO and SDMMC communication protocols, connecting the TF card through the built-in SDIO interface of the STM32 microcontroller, simplifying the circuit design while improving the data transmission rate. In addition, to extend the battery life, the present invention introduces an intelligent power management system, automatically turning off the power supply of the SDIO interface when no data read / write operations are performed and quickly restoring the power supply when the TF card needs to be accessed, achieving an energy-saving effect. This storage medium is configured as a mass storage device (Mass Storage Class, MSC) through the USB_FS interface, enabling it to have the function of a card reader. Due to its compact design and support for SDIO and SDMMC interfaces, the TF card is widely used in mobile devices and becomes an ideal data storage option. The collected plant images and other relevant data are transmitted via the USB_FS interface to the TF card in the card slot above the terminal, realizing convenient data management and access. Users can enter the plant health monitoring interface through the terminal. When the detection has not started, the "unknown" status is displayed on the interface. When the user clicks the "Click to Start Collection" button, the system starts the servo 13 to rotate, staying for 5 seconds for each plant for multi-dimensional detection, including growth status, weed condition, and pest and disease situation. After a round of collection, all the obtained data will be automatically saved to the TF card. When the user opens the plant health interface again, the specific information of each plant can be viewed. In terms of the file system, the present invention conducts secondary development based on the open-source FatFs library, optimizing the file system to better adapt to the resource limitations in the embedded environment. Specific improvements include adjusting the cache policy to reduce memory occupancy, improving the directory traversal algorithm to increase the search speed, and adding support for long file names, etc.The present invention also introduces a secure and reliable write protection mechanism to prevent data loss or damage caused by accidental power outages or other abnormal conditions; when an impending power outage is detected, all unfinished write operations are immediately stopped, and the file system is marked as read-only until the next normal startup. In addition, by optimizing structures such as the cluster linked list and FAT table, the speeds of file creation, deletion, and modification are accelerated, especially when dealing with a large number of small files. In addition, for the identified pest and disease problems, users can further take control measures. The specific operation is to enter the pest and disease control interface, select the diseased plants and click "Start Control", the system will control the servo 13 to rotate to the specified position, and then the nozzle 11 will automatically spray pesticides for treatment.

[0081] In this embodiment, as Figure 5 shown, the display screen also performs dynamic picture display, that is, first define a picture buffer area in the TouchGFX initialization, that is, set a space of a certain size after the starting address of the SDRAM for picture caching, and clear the buffer area after each picture display is completed and before the next picture is displayed. Specifically, an example is given. After entering the environmental monitoring interface of the display screen, under the TouchGFX framework, through the api interface provided by it and the FatFs file system introduced by this system, the data such as pictures in the TF card are placed into the buffer area and displayed on the interface. Four environmental parameters can be viewed on the interface, and the curve coordinate image drawn from the real-time data can also be entered for viewing.

[0082] The various embodiments in this specification are described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform.

[0083] The above is only the preferred embodiment of the present invention. The protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the idea of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, several improvements and refinements made without departing from the principle of the present invention should be regarded as within the protection scope of the present invention.

Claims

1. A smart agricultural system based on deep learning, characterized in that: include: Environmental monitoring unit, used to monitor the environment of the agricultural greenhouse where the crops are located; A crop image acquisition unit, used for acquiring images of crop plants in a planting area; An identification unit, used to identify the health status of the collected plant pictures, wherein the health status identification includes the growth status, weed status and pest and disease identification of the plant; The control unit is used to control the actions of various agricultural auxiliary equipment according to the preset greenhouse environmental parameters, environmental data monitored by the environmental monitoring unit, growth status, weed conditions and pest and disease identification results.

2. The deep learning-based smart agriculture system according to claim 1, characterized in that: The environmental monitoring unit includes a greenhouse temperature sensor, a carbon dioxide concentration sensor, a soil moisture sensor and a light intensity sensor; the agricultural auxiliary equipment includes a growth lamp, a ventilation fan, a sprinkler and a pesticide application device; The environmental data monitored by the environmental monitoring unit is stored using a mean filtering algorithm and a FIFO buffer mechanism.

3. The deep learning-based smart agriculture system according to claim 2, characterized in that: The crop image acquisition unit includes a servo and a camera, the servo is installed in the middle of the crop plants surrounding it, and the camera is installed at the rotating part of the servo; the pesticide application device includes a medicine box and a plurality of spraying devices, the spraying devices are connected to the medicine box, and the spraying range is part of the crop plants surrounding the servo, and the medicine box is located below the servo.

4. The deep learning-based smart agriculture system according to claim 1, characterized in that: The identification unit is used to identify the health status of the collected plant pictures, and the specific process is as follows: The trained growth state recognition model, weed recognition model and pest and disease recognition model are used to recognize the health state of the collected plant pictures respectively; the growth state recognition model, weed recognition model and pest and disease recognition model are all built based on the YOLOv5 framework; the network frameworks of the growth state recognition model, weed recognition model and pest and disease recognition model all include a backbone network, a neck and a detection head, and the backbone network adopts a CSP structure, the neck uses SPPF to extract features of different scales, and PANet is used to fuse the extracted features of different scales; the detection head of the growth state recognition model focuses on identifying the growth state of the plant, the detection head of the weed recognition model focuses on identifying the weed condition around the plant, and the detection head of the pest and disease recognition model focuses on identifying the pests and diseases of the plant.

5. The deep learning-based smart agriculture system according to claim 4, characterized in that: The detection heads of the growth state recognition model, the weed recognition model, and the pest and disease recognition model all output target classification results, and output the predicted frame position information of the target in an anchor-free manner; The target classification result output by the growth state recognition model is a mature state or an immature state; The target classification result output by the weed recognition model is the presence of weeds or the absence of weeds; The target classification results output by the pest and disease identification model are pest-free, yellow virus, leaf spot, bacterial spot, early blight, late blight or viral disease.

6. The deep learning-based smart agriculture system according to claim 4, characterized in that: During the training process, the growth state recognition model, the weed recognition model, and the pest and disease recognition model all use the EIOU (Enhanced IoU) loss function for model optimization; specifically, the loss function L class for: Where N is the number of samples, is the true label, y n is the predicted probability, x i is a sample, x n is the total number, X i is the sample value flexible maximum transfer function.

7. The deep learning-based smart agriculture system according to claim 1, characterized in that: The control unit includes a display screen and an STM32F746G-Disco terminal, and the display screen can display environmental data monitored by the environmental monitoring unit as well as growth status, weed status and pest and disease identification results; The STM32F746G-Disco terminal has an automatic management mode and a manual management mode; In the automatic management mode, the STM32F746G-Disco terminal determines whether the pesticide application device has the required liquid medicine according to the weed status and the pest identification results, and sprays the liquid medicine when the required liquid medicine is available; the STM32F746G-Disco terminal can also compare the environmental data of the environmental monitoring unit with the preset greenhouse environmental parameters, and control the growth lamp, ventilation fan and sprinkler according to the comparison results; In manual mode, the STM32F746G-Disco terminal directly controls the actions of various agricultural auxiliary equipment according to the operation buttons on the display screen.

8. The deep learning-based smart agriculture system according to claim 7, characterized in that: The STM32F746G-Disco terminal transmits data with the display screen and a mobile device containing the mini program / Alibaba Cloud through a wifi module; specifically: the STM32F746G-Disco terminal transmits the environmental data monitored by the environmental monitoring unit as well as the growth status, weed conditions and pest and disease identification results to the display screen and the mobile device, and the mobile device can transmit control instructions for agricultural auxiliary equipment to the STM32F746G-Disco terminal.

Citation Information

Patent Citations

  • Intelligent agriculture control method based on web application

    CN109669497A

  • Intelligent agricultural planting system based on Internet-of-Things technology

    CN113711737A