Large-area cotton field pest monitoring system and monitoring method based on deep learning

Through a large-area cotton field pest monitoring system based on deep learning, combined with the improved YOLOv7 algorithm and multi-spectral camera, the problems of low efficiency and poor accuracy of traditional monitoring methods are solved, and efficient and accurate cotton field pest monitoring is achieved, providing scientific basis to reduce the harm of pests to cotton.

CN120336924AInactive Publication Date: 2025-07-18SHAANXI SCI TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510478386.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-07-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional cotton field pest monitoring methods are inefficient and have poor accuracy, making it difficult to achieve comprehensive and real-time monitoring in large areas. The existing deep learning systems have low recognition accuracy and poor stability in complex environments.

Method used

A large-area cotton field pest monitoring system based on deep learning is adopted, including monitoring terminals, image acquisition units, sensor groups, control units, communication modules and servers. The improved YOLOv7 algorithm combines multi-spectral cameras and environmental sensors to conduct automated data acquisition and intelligent analysis to identify pest species and distribution.

Benefits of technology

It has achieved efficient and accurate monitoring of cotton field pests, provided scientific basis to reduce the harm of pests to cotton, improve yield and quality, and has reasonable system costs and is easy to promote on a large scale.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336924A_ABST
    Figure CN120336924A_ABST
Patent Text Reader

Abstract

A deep learning-based large-area cotton field pest monitoring system disclosed by the present invention comprises a monitoring terminal, the monitoring terminal is connected with an image acquisition unit, a sensor group, a control unit and a communication module, the monitoring terminal is connected with a data transmission module through the communication module, and the data transmission module is further connected with a server. The server is connected with a user terminal, and the problem that real-time pest monitoring of a large-area cotton field is not accurate is solved. The invention further discloses a large-area cotton field pest monitoring method based on deep learning, the large-area cotton field pest monitoring system based on deep learning is used for monitoring, and the problems that a traditional monitoring method is low in efficiency and poor in accuracy are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of agricultural pest monitoring, and relates to a large-area cotton field pest monitoring system based on deep learning, and also relates to a large-area cotton field pest monitoring method based on deep learning. Background Art

[0002] During the cotton planting process, the damage of pests to cotton seriously affects the yield and quality of cotton. There are many types of cotton field pests, such as cotton bollworms, aphids, etc. They reproduce quickly and have a wide range of harms. Traditional cotton field pest monitoring methods, such as manual on-site inspections and setting up trapping devices, have many problems. Manual monitoring requires a large amount of manpower input. Monitoring personnel need to check each cotton field block by block, with low efficiency and easy fatigue, and it is easy to miss pest-infested areas. At the same time, when manually judging the types and quantities of pests, the subjectivity is relatively strong, and the judgment criteria of different personnel vary, resulting in difficulty in ensuring the accuracy of monitoring results. Although trapping devices can capture some pests, due to the limitation of the trapping principle, they can only attract pests with specific tropisms and cannot comprehensively reflect the actual situation of cotton field pests.

[0003] With the wide application of deep learning technology in various fields, using its powerful image recognition and data analysis capabilities to monitor cotton field pests has become a new research direction. However, the existing related monitoring systems still face many challenges in actual applications. For example, the recognition accuracy of some systems for pests in complex cotton field environments is not high. The morphological differences of cotton plants at different growth stages and the interference of field debris are likely to cause misjudgments; the stability of the systems is poor, and data collection, transmission, and processing are prone to failures under adverse weather conditions or unstable networks; and most systems are difficult to achieve comprehensive and real-time monitoring of large areas and cannot meet the management needs of modern large-scale cotton planting. Summary of the Invention

[0004] The purpose of the present invention is to provide a large-area cotton field pest monitoring system based on deep learning, which solves the problem of inaccurate real-time pest monitoring in large-area cotton fields.

[0005] Another purpose of the present invention is to provide a large-area cotton field pest monitoring method based on deep learning, and use the large-area cotton field pest monitoring system based on deep learning of the present invention for accurate monitoring.

[0006] The first technical solution adopted by the present invention is a large-area cotton field pest monitoring system based on deep learning, including a monitoring terminal, which is respectively connected with an image acquisition unit, a sensor group, a control unit, and a communication module. The monitoring terminal is connected with a data transmission module through the communication module, and the data transmission module is also connected with a server, and the server is connected with a user terminal; The image acquisition unit is used to acquire image data of the cotton field area; the control unit controls the image acquisition unit and the sensor group, receives and processes the data acquired by the image acquisition unit and the sensor group; the communication module sends the data processed by the control unit to the server through the data transmission module; the server uses deep learning algorithms to analyze and process the received data, identify the types of pests, and analyze the distribution of pests in the cotton field; the user terminal is for the user to view the monitoring results.

[0007] The characteristics of the first technical solution of the present invention also lie in: The control unit is a high-performance embedded processor of the STM32 series of Positive Atomic.

[0008] The image acquisition unit includes an auxiliary illumination light source and a high-definition multi-spectral camera array. The high-definition multi-spectral camera array is composed of multiple high-definition cameras with different spectral bands. The high-definition cameras are connected with image sensors, and the image sensors are connected with the control unit.

[0009] The sensor group includes a temperature and humidity sensor and a light intensity sensor.

[0010] The communication module adopts the M5310-A 5G communication module of CM-IoT.

[0011] The second technical solution adopted by the present invention is a method for monitoring pests in large-area cotton fields based on deep learning. The monitoring is carried out by applying the monitoring system for large-area cotton field pests based on deep learning of the present invention. Specifically, the control unit starts the image acquisition unit and the sensor group to collect data. The control unit preprocesses the collected image data, and sends the preprocessed image data and the environmental parameter data collected by the sensors to the server. The server uses a deep learning model based on the improved YOLOv7 algorithm to analyze the image data, identify the types and quantities of pests, combine the environmental parameter data and the geographical location information of the monitoring terminal, analyze the pest distribution and diffusion trends, and store the analysis results in the server database, and send them to the user terminal. The user views the monitoring results. If it is found that the number of pests exceeds the warning threshold, a control instruction is sent through the user terminal, and the server forwards the instruction to the control unit, and the control unit takes corresponding measures according to the instruction.

[0012] Specifically, it is implemented according to the following steps: Step 1, System initialization: Initialize and set the control unit, image acquisition unit, sensor group and communication module of the monitoring terminal, and configure parameters; load and warm up the deep learning model based on the improved YOLOv7 algorithm of the server.

[0013] Step 2: The control unit controls the image acquisition unit and the sensor group to collect data at preset time intervals or trigger conditions, adjusts the parameters of the image acquisition unit according to environmental factors, and dynamically adjusts the sampling frequency of the sensor group. Step 3: The control unit compresses and encrypts the collected data, and sends the data to the data transmission module through the communication module; the data transmission module uses a data verification and retransmission mechanism to ensure data integrity; after receiving the data, the server allocates GPU resources for preprocessing according to the data urgency and type. Step 4: The user interaction control server monitors the access requests and control instructions of the user terminal in real time, and promptly pushes the monitoring results to the user terminal; after verifying the legality of the user instructions, it forwards them to the monitoring terminal control unit, and the control unit performs corresponding operations.

[0014] Specifically, in Step 1, the control unit configures system parameters, sets data processing priorities, and initializes the storage path; calibrates the parameters of the image acquisition unit, including parameters such as the focal length, exposure time, and white balance of the camera; sets the sampling frequency and data transmission protocol for the sensor group; activates the communication module, and configures network connection parameters.

[0015] The deep learning model based on the improved YOLOv7 algorithm is obtained by respectively improving the feature fusion module, optimizing the backbone network, and improving the loss function of the original YOLOv7 algorithm's deep learning model. Specifically, for the improvement of the feature fusion module, the CBAM attention module is introduced into the feature fusion layer. The CBAM attention module includes channel attention and spatial attention. The calculation formula for channel attention Mc(F) is as follows: Mc(F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F))) (1) In formula (1), F is the input feature map, σ is the sigmoid function, MLP is the multi-layer perceptron, and AvgPool and MaxPool are the average pooling and max pooling operations respectively. Spatial attention Ms ( F ) The calculation formula is as follows: Ms ( F )= σ ( f 7×7( AvgPool ( Fc ); MaxPool ( Fc )])) (2) In formula (2), Fc is the feature map after being processed by channel attention, f7×7 represents a 7x7 convolutional operation, and [;] represents a concatenation operation; Specifically, the backbone network is improved by adopting a pruning method based on the L1 norm, and the weights of unimportant convolutional kernels are set to zero; Let the convolutional kernel weight be W , and the pruning threshold be τ , then the pruned weight W ' is calculated as follows: (3); Specifically, the loss function is improved by introducing Focal Loss to solve the problem of unbalanced positive and negative samples. The calculation formula of Focal Loss is as follows: (4) In formula (4), pt is the probability predicted by the model, and γ is the adjustment factor.

[0016] In step 3, the data verification process of the data transmission module adopts cyclic redundancy check CRC or parity check, and judges whether the verified data is complete after transmission by comparing the check codes; Specifically, the retransmission mechanism process of the data transmission module in step 3 is that when the server finds that the check codes are not equal, that is, the data is incorrect, it will send a retransmission request to the data transmission module. This retransmission request contains the identifier of the incorrect data, so that the sender can accurately find the data that needs to be retransmitted; After receiving the retransmission request, the data transmission module finds the corresponding original data according to the identifier in the request, re-performs the verification calculation, generates a new check code, and then sends the data and the new check code to the server again; After receiving the retransmitted data, the server will perform verification calculation and comparison again until the check codes are equal, that is, it is confirmed that the data is complete.

[0017] The beneficial effects of the present invention are: The large-area cotton field pest monitoring system based on deep learning of the present invention can efficiently and accurately monitor the pest situation in large-area cotton fields by collecting data through advanced hardware devices and combining with optimized deep learning algorithms. The system cost is reasonable, and it is easy to deploy and promote in large-scale cotton field planting areas, providing a powerful pest monitoring tool for cotton growers and agricultural managers.

[0018] The pest monitoring method for large - area cotton fields based on deep learning of the present invention, when monitoring using the monitoring system of the present invention, effectively solves the problems of low efficiency and poor accuracy of traditional monitoring methods. Through automated data collection and intelligent data analysis, it can promptly detect pest infestations in cotton fields, provide a scientific basis for taking targeted control measures, help reduce the damage of pests to cotton, and improve the yield and quality of cotton. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is the block diagram of the control unit structure of the pest monitoring system for large - area cotton fields based on deep learning of the present invention; Figure 2 is the power supply circuit diagram of the control unit of the pest monitoring system for large - area cotton fields based on deep learning of the present invention; Figure 3 is the reset circuit of the control unit of the pest monitoring system for large - area cotton fields based on deep learning of the present invention; Figure 4 is the connection circuit between the image acquisition unit and the control unit of the pest monitoring system for large - area cotton fields based on deep learning of the present invention.

[0020] Figure 5 is the connection circuit of the positioning unit in the sensor group of the pest monitoring system for large - area cotton fields based on deep learning of the present invention; Figure 6 is the connection circuit between the communication module and the control unit of the pest monitoring system for large - area cotton fields based on deep learning of the present invention; Figure 7 is the working principle diagram of the data transmission module of the pest monitoring system for large - area cotton fields based on deep learning of the present invention; Figure 8 is the flowchart of the deep - learning model processing data of the pest monitoring system for large - area cotton fields based on deep learning of the present invention; Figure 9 is the deployment schematic diagram of the monitoring system of the pest monitoring system for large - area cotton fields based on deep learning of the present invention in the cotton field. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0021] The present invention will be described in detail below in conjunction with the drawings and specific embodiments. The described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without making creative efforts fall within the scope of protection of the present invention.

[0022] Embodiment 1 This embodiment provides a large - area cotton field pest monitoring system based on deep learning, which includes a monitoring terminal. The monitoring terminal is respectively connected to an image acquisition unit, a sensor group, a control unit, and a communication module. The monitoring terminal is connected to a data transmission module through the communication module. The data transmission module is also connected to a server, and the server is connected to a user terminal; As Figure 1 shown, the control unit selects the high - performance embedded processor of the STM32 series of Zhengdian Yuanzi. Its minimum system includes a power supply circuit, a reset circuit, etc. The power supply circuit adopts a power supply method combining a solar panel and a lithium battery. During the day, the solar panel converts solar energy into electrical energy and stores it in the lithium battery to supply power to the system, and at the same time charges the lithium battery; at night, the lithium battery continuously supplies power to the system. The power supply circuit converts the voltage output by the lithium battery into 5V and 3.3V through a buck circuit to supply power to the control unit and other modules, as shown in Figure 2; the reset circuit generates a low - level signal through a button to achieve system reset, as shown in Figure 3; The control unit controls the image acquisition unit and the sensor group, receives and processes the data collected by the image acquisition unit and the sensor group; the communication module sends the data processed by the control unit to the server through the data transmission module; the server uses deep - learning algorithms to analyze and process the received data, identify the types of pests, and analyze the distribution of pests in the cotton field; the user terminal is for users to view the monitoring results.

[0023] The sensor group includes a temperature and humidity sensor and a light intensity sensor, which are responsible for collecting various environmental data of the cotton field and providing multi - dimensional data support for pest monitoring and analysis. Temperature and humidity sensor: Real - time monitors the temperature and humidity of the cotton field, providing data support for analyzing the suitable living environment of pests. For example, the reproduction speed of some pests accelerates under specific temperature and humidity conditions. Through temperature and humidity data, the potential risk of pest outbreaks can be detected in a timely manner. Light intensity sensor: Used to measure the light intensity of the cotton field to understand the impact of light on pest behavior and cotton plant growth. Different pests have different reactions to light intensity. By monitoring the light intensity, the activity patterns of pests under different light conditions can be analyzed.

[0024] This embodiment only represents the preferred implementation mode of the large - area cotton field pest monitoring system based on deep learning of the present invention. Any pest monitoring system designed with technical features similar to those of the present invention will fall within the protection scope of the large - area cotton field pest monitoring system based on deep learning of the present invention.

[0025] Embodiment 2 This embodiment provides a large-area cotton field pest monitoring system based on deep learning. On the basis of Embodiment 1, the image acquisition unit includes an auxiliary lighting source and a high-definition multispectral camera array. The high-definition multispectral camera array consists of multiple high-definition cameras with different spectral bands, covering different spectral bands such as visible light, near-infrared, and short-wave infrared, with the model being FLIR Blackfly S. The high-definition cameras are connected to image sensors, and the image sensors are connected to the control unit through GigE Vision interfaces. As shown in Figure 4, this interface can achieve high-speed and stable image data transmission, meeting the transmission requirements of large amounts of multispectral image data.

[0026] Light source: When natural light is insufficient, the light source provides auxiliary lighting for image acquisition. Due to advantages such as high luminous efficiency and long lifespan, LED lights have become commonly used auxiliary light sources. Users can select LED lights of different colors and intensities according to the phototactic characteristics of pests to improve the imaging effect of pests. High-definition camera: As the core acquisition device, according to the actual monitoring scenario, a visible light camera or an infrared camera can be selected. The former obtains the intuitive image of the cotton field under natural light for daily monitoring of cotton plant growth and pest activities; the latter forms an image by detecting the infrared radiation emitted by objects, meeting the monitoring requirements in night or low-light environments and ensuring the continuity of monitoring.

[0027] Image sensor: Charge-coupled device (CCD) or complementary metal-oxide-semiconductor (CMOS) is selected. CCD sensors have high sensitivity and excellent image quality, being suitable for scenarios with high requirements for images; CMOS sensors, with the advantages of low power consumption, low cost, and high integration, are widely used in conventional monitoring tasks. This embodiment only represents the preferred implementation manner of the large-area cotton field pest monitoring system based on deep learning of the present invention. Any pest monitoring system designed with technical features similar to those of the present invention will fall within the protection scope of the large-area cotton field pest monitoring system based on deep learning of the present invention.

[0028] Embodiment 3 This embodiment provides a large-area cotton field pest monitoring system based on deep learning. On the basis of Embodiments 1-2, the communication module uses the M5310-A 5G communication module of CM-IoT and is connected to the image sensor of the control unit through a USB interface. The communication module uses the Beidou and GPS positioning systems to real-time locate the position of the target unit, such as: longitude and latitude, altitude, etc. The positioning unit is connected to the control unit using a UART interface, such as: Figure 5 as shown. The connection between the communication module and the control unit is as Figure 6 shown. The communication module can stably and quickly transmit the data of the monitoring terminal to the data transmission module, ensuring the timeliness of data transmission.

[0029] This embodiment only represents the preferred implementation mode of the large - area cotton field pest monitoring system based on deep learning of the present invention. Any pest monitoring system designed with technical features similar to those of the present invention will fall within the protection scope of the large - area cotton field pest monitoring system based on deep learning of the present invention.

[0030] Embodiment 4 This embodiment provides a large - area cotton field pest monitoring system based on deep learning. On the basis of Embodiments 1 - 3, the data transmission module uses a dedicated transmission device based on 5G network slicing technology to receive data from the monitoring terminals through the 5G network and forward it to the server. During the transmission process, the data transmission module uses network slicing technology to provide a dedicated network channel for the monitoring data, ensuring the stability and security of data transmission. The working principle diagram is shown in Figure 7.

[0031] The server uses an Alibaba Cloud GPU cloud server equipped with NVIDIA A100 GPUs. A deep - learning model based on the improved YOLOv7 algorithm is deployed in the server. The model training uses a large number of cotton field pest image data from different cotton fields and different growth stages. These data are professionally labeled and cover the categories and location information of various common cotton field pests. During the training process, transfer learning technology is adopted to optimize the model in combination with the actual application scenario of the cotton field, continuously adjusting the model parameters to improve the recognition accuracy of the model for cotton field pests. The flowchart of the deep - learning model based on the improved YOLOv7 algorithm for processing data is shown in Figure 8. Users can view the cotton field pest monitoring results in real - time on the web page, including the types of pests, quantity statistical charts, distribution maps, and real - time environmental parameter data. At the same time, in order to more intuitively display the deployment of the monitoring system in the cotton field, a deployment schematic diagram of the monitoring system in the cotton field is provided, as Figure 9 shown, which shows the distribution positions of the monitoring terminals in the cotton field and their connection relationships with the server and user terminals.

[0032] This embodiment only represents the preferred implementation mode of the large - area cotton field pest monitoring system based on deep learning of the present invention. Any pest monitoring system designed with technical features similar to those of the present invention will fall within the protection scope of the large - area cotton field pest monitoring system based on deep learning of the present invention.

[0033] Embodiment 5 This embodiment provides a method for monitoring pests in large-area cotton fields based on deep learning. On the basis of Embodiments 1-4, the deep learning-based large-area cotton field pest monitoring system of the present invention is applied for monitoring. Specifically, the control unit starts the image acquisition unit and the sensor group to collect data. The image acquisition unit collects cotton field images every 30 minutes, and the sensor group collects environmental parameter data in real time; The control unit preprocesses the collected image data. First, the histogram equalization algorithm is used to enhance the image contrast, making the characteristics of pests and cotton plants more obvious; then the Gaussian filtering algorithm is used to remove the noise in the image and improve the image clarity; finally, according to the characteristics of the cotton field image, the image is cropped to remove the irrelevant edge areas and reduce the data processing volume; The preprocessed image data and the environmental parameter data collected by the sensor are packaged in JSON format and sent to the server through the communication module and the data transmission module. The server uses a deep learning model based on the improved YOLOv7 algorithm to analyze the image data, identify the types and quantities of pests, and combine environmental parameter data such as temperature, humidity, and light intensity and the geographical location information of the monitoring terminal. Cluster analysis is used to analyze the pest distribution and diffusion trend. For example, when the temperature is suitable, the humidity is high, and the light is sufficient, the reproduction speed of some pests will increase. The server analyzes the correlation between these environmental parameters and the pest quantity, predicts the possible diffusion direction and range of pests, stores the analysis results in the server's MySQL database, and sends them to the user terminal. The user views the monitoring results. If it is found that the pest quantity exceeds the warning threshold, a control instruction is sent through the user terminal, and the server forwards the instruction to the control unit, and the control unit takes corresponding measures according to the instruction.

[0034] The control instructions mainly include control instructions for prevention and control equipment, information notification and warning instructions, and data collection and monitoring instructions. The control instructions for prevention and control equipment are used for further processing after the user discovers pests, including but not limited to starting prevention and control equipment. The information notification and warning instructions mainly inform farmers of the current situation so that farmers can take further measures. The purpose of the data set collection instruction is to update the data set in real time to ensure that the system can better adapt to the cotton field situation.

[0035] At the same time, for the monitoring system, when the monitoring results are sent to the user terminal, the monitoring process can be considered to have completed a stage to a certain extent, but from a more comprehensive perspective, the monitoring process may not be completely over. At the time node of sending the monitoring results to the terminal, for the currently collected and analyzed data, the relevant processing procedures have been completed, including the analysis of image data, the identification of pest types and quantities, the correlation analysis with environmental parameters, and the judgment of distribution and diffusion trends. Users can make decisions and take corresponding measures based on these results (continuous data collection, abnormal situation monitoring, etc.).

[0036] This embodiment only represents the preferred implementation manner of the method for monitoring pests in large-area cotton fields based on deep learning of the present invention. Any pest monitoring method designed by using technical features similar to those of the present invention will fall within the protection scope of the method for monitoring pests in large-area cotton fields based on deep learning of the present invention.

[0037] Embodiment 6 This embodiment provides a method for monitoring pests in large-area cotton fields based on deep learning. On the basis of Embodiment 5, it is specifically implemented according to the following steps: Step 1. System initialization: Initialize and set the control unit, image acquisition unit, sensor group, and communication module of the monitoring terminal, and configure parameters; load and warm up the deep learning model based on the improved YOLOv7 algorithm of the server.

[0038] The control unit configures system parameters, sets the data processing priority, and initializes the storage path; calibrates the parameters of the image acquisition unit, including the focal length, exposure time, white balance, etc. of the camera; sets the sampling frequency and data transmission protocol for the sensor group; activates the communication module and configures the network connection parameters; The control of data acquisition by the control unit is as follows: 1) Control of acquisition devices Start and stop: The control unit remotely starts or stops the data acquisition devices, such as cameras and sensors, by sending control signals. For example, when it is necessary to increase the pest monitoring frequency in a specific area, the control unit sends a start signal to the camera in that area to start collecting image data; when image collection is not required at night, the control unit sends a stop signal to turn off the camera to save energy and extend the service life of the device; Parameter adjustment: The control unit can adjust the parameters of the acquisition devices according to the instructions sent by the server. For image acquisition devices, parameters such as resolution, frame rate, and exposure time can be adjusted to obtain clearer and more accurate pest images. For example, under different lighting conditions, by adjusting the exposure time, ensure that the captured images can clearly show the characteristics of pests for subsequent identification.

[0039] 2) Control of acquisition strategies Timed acquisition: The control unit can periodically trigger the data acquisition devices to collect data at preset time intervals. For example, set all sensors to collect environmental parameter data every 30 minutes and the camera to take a farmland image every 1 hour to obtain the regular change information of pests and the environment; Area selection for data collection: According to the distribution and spread trend of pests, the control unit can selectively choose specific areas for key data collection. If it is detected that pests tend to concentrate in a certain area of the farmland, the control unit will instruct the collection devices in that area to increase the collection frequency or improve the collection accuracy. For areas with fewer pests, the collection frequency will be appropriately reduced to optimize resource utilization and improve monitoring efficiency.

[0040] Step 2: The control unit controls the image acquisition unit and the sensor group to collect data at preset time intervals or trigger conditions, adjusts the parameters of the image acquisition unit according to environmental factors, and dynamically adjusts the sampling frequency of the sensor group. For example, when the temperature and humidity change significantly, the sampling frequency is increased to ensure that the collected data can accurately reflect environmental changes.

[0041] Step 3: The control unit compresses and encrypts the collected data, and sends the data to the data transmission module through the communication module; the data transmission module uses data verification and retransmission mechanisms to ensure data integrity; after receiving the data, the server allocates GPU resources for preprocessing according to the urgency and type of the data.

[0042] Preprocessing includes image enhancement, denoising, and cropping; 1) Image enhancement Brightness adjustment: By adjusting the brightness value of the image, the details of the image can be more clearly displayed under different lighting conditions. For example, for images collected in a darker environment, increase their brightness to highlight the characteristics of the cotton field and pests; Contrast enhancement: Increase the contrast between different regions in the image to make the difference between pests and the background more obvious, which helps the subsequent model to identify pests. For example, enhance the contrast between cotton leaves and pests to make the outline of pests more prominent; Color correction: Correct the color of the image to ensure the accuracy and consistency of the image color. Since images collected at different times and under different weather conditions may have color deviations, these deviations can be eliminated through color correction to make the image more truly reflect the actual situation of the cotton field; 2) Denoising Mean filtering: Calculate the average value of each pixel point in the image and its neighboring pixel points, and replace the value of the current pixel point with this average value, so as to achieve the purpose of smoothing the image and removing noise. This method has a good suppression effect on Gaussian noise; Median filtering: Replace the gray value of each pixel point in the image with the median of the gray values of its neighboring pixel points. Median filtering can effectively remove salt-and-pepper noise while retaining the edge information of the image and will not over-blur the image; Wavelet denoising: The image is decomposed into sub-bands of different frequencies using wavelet transform. Then, threshold processing is performed on the high-frequency sub-band where the noise is located to remove the noise, and the image is reconstructed through inverse wavelet transform. Wavelet denoising can better preserve the detailed information of the image while removing the noise.

[0043] 3) Cropping Region of Interest (ROI) cropping: According to the actual range of the cotton field or the pre-set monitoring area, the area containing the cotton field and potentially existing pests is cropped, removing irrelevant background information, reducing the data volume, and improving the processing speed and accuracy of the model. For example, only the area where the cotton plants grow in the image is retained, and irrelevant parts such as the surrounding open spaces and roads are removed; Size normalization cropping: The cropped images are uniformly adjusted to a specific size to meet the input requirements of the deep learning model. For example, all images are cropped and adjusted to a fixed resolution, such as 224×224 or 448×448, etc., so that the model can uniformly process input images of different sizes.

[0044] Step 4: The user interaction control server monitors the access requests and control instructions of the user terminal in real time, and promptly pushes the monitoring results to the user terminal; after verifying the legality of the user instructions, it forwards them to the monitoring terminal control unit, and the control unit performs corresponding operations.

[0045] This embodiment only represents the preferred implementation manner of the large-area cotton field pest monitoring method based on deep learning of the present invention. Any pest monitoring method designed using technical features similar to those of the present invention will fall within the protection scope of the large-area cotton field pest monitoring method based on deep learning of the present invention.

[0046] Embodiment 7 This embodiment provides a large-area cotton field pest monitoring method based on deep learning. On the basis of Embodiment 6, the deep learning model based on the improved YOLOv7 algorithm is obtained by respectively improving the feature fusion module, optimizing the backbone network, and improving the loss function of the deep learning model of the original YOLOv7 algorithm; The improvement of the feature fusion module is specifically that the CBAM attention module is introduced into the feature fusion layer. The CBAM attention module includes channel attention and spatial attention. The calculation formula of the channel attention Mc(F) is as follows: Mc(F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F))) (1) In formula (1), F is the input feature map, σ is the sigmoid function, MLP is the multi-layer perceptron, and AvgPool and MaxPool are the average pooling and max pooling operations respectively; Spatial attention Ms (F ) The calculation formula is as follows: Ms ( F ) = σ ( f 7×7( AvgPool ( Fc ); MaxPool ( Fc ))) (2) In formula (2), Fc is the feature map after channel attention processing, f 7×7 represents a 7x7 convolution operation, and [;] represents a concatenation operation; The improvement of the feature fusion module can make the model pay more attention to the feature channels and spatial regions that are important for pest detection, and improve the detection accuracy.

[0047] The improvement of the backbone network is specifically to use a pruning method based on the L1 norm to set the weights of unimportant convolution kernels to zero; Let the convolution kernel weight be W , and the pruning threshold be τ , then the pruned weight W ' is calculated as follows: (3); The improvement of the backbone network is to perform pruning and quantization operations on the backbone network of YOLOv7, reduce the model parameters and computational amount, and at the same time improve the inference speed.

[0048] The improvement of the loss function is specifically to introduce Focal Loss to solve the problem of unbalanced positive and negative samples. The calculation formula of Focal Loss is as follows: (4) In formula (4), pt is the probability predicted by the model, γ is the adjustment factor. By adjusting the value of γ , the weight of easily classified samples can be reduced, making the model pay more attention to difficult-to-classify samples and improving the detection recall rate of pest targets.

[0049] This embodiment only represents the preferred implementation manner of the method for monitoring large-area cotton field pests based on deep learning of the present invention. Any pest monitoring method designed by using similar technical features to the present invention will fall within the protection scope of the method for monitoring large-area cotton field pests based on deep learning of the present invention.

[0050] Example 8 This embodiment provides a method for monitoring cotton field pests in large areas based on deep learning. On the basis of Embodiments 6-7, in step 3, cyclic redundancy check (CRC) or parity check is used for data verification processing in the data transmission module. By comparing the check codes, it is determined whether the verified data is complete after transmission. Taking CRC check as an example, the data transmission module will calculate the data to be sent according to a specific generating polynomial to generate a check code with a fixed length (CRC value). For example, assuming the data to be sent is D and the generating polynomial is G, through a specific CRC calculation method (such as modulo-2 division), the CRC value C is obtained. The data D and the check code C are packaged and sent together.

[0051] After receiving the data, the receiving end (server) will perform the same CRC calculation on the received data (including data D and check code C) again to obtain a new check code C'. Then, the newly calculated check code C' is compared with the received check code C.

[0052] If C' is equal to C, it indicates that no error occurred during data transmission and the data is complete; if C' is not equal to C, it indicates that an error may have occurred during data transmission and the data is incomplete.

[0053] The retransmission mechanism processing in the data transmission module in step 3 is specifically as follows: when the server finds that the check codes are not equal, that is, the data is incorrect, it will send a retransmission request to the data transmission module. This retransmission request contains the identifier of the incorrect data, so that the sending end can accurately find the data that needs to be retransmitted. After receiving the retransmission request, the data transmission module finds the corresponding original data according to the identifier in the request, re-performs the verification calculation to generate a new check code, and then sends the data and the new check code to the server again. After receiving the retransmitted data, the server will perform the verification calculation and comparison again until the check codes are equal, that is, it is confirmed that the data is complete.

[0054] Through the above data verification and retransmission mechanism, the data transmission module can effectively detect and correct possible errors in data transmission, thereby ensuring the integrity of the data transmitted to the server and providing a reliable data basis for the accurate analysis of the deep learning model based on the improved YOLOv7 algorithm.

[0055] This embodiment only represents the preferred implementation manner of the method for monitoring cotton field pests in large areas based on deep learning of the present invention. Any pest monitoring method designed by using technical features similar to those of the present invention will fall within the protection scope of the method for monitoring cotton field pests in large areas based on deep learning of the present invention.

Claims

1. A large-area cotton field pest monitoring system based on deep learning, characterized in that, It includes a monitoring terminal, which is respectively connected with an image acquisition unit, a sensor group, a control unit and a communication module. The monitoring terminal is connected with a data transmission module through the communication module, and the data transmission module is also connected with a server, and the server is connected with a user terminal; The image acquisition unit is used to acquire image data of the cotton field area; the control unit controls the image acquisition unit and the sensor group, and receives and processes the data acquired by the image acquisition unit and the sensor group; the communication module sends the data processed by the control unit to the server through the data transmission module; the server uses a deep learning algorithm to analyze and process the received data, identify the types of pests, and analyze the distribution of pests in the cotton field; the user terminal is for the user to view the monitoring results.

2. The large-area cotton field pest monitoring system based on deep learning according to claim 1, characterized in that The control unit includes a high-performance embedded processor of the STM32 series of Zhengdian Yuanzi.

3. The large-area cotton field pest monitoring system based on deep learning according to claim 1, characterized in that, The image acquisition unit includes an auxiliary illumination light source and a high-definition multi-spectral camera array. The high-definition multi-spectral camera array is composed of multiple high-definition cameras with different spectral bands. The high-definition cameras are connected with image sensors, and the image sensors are connected with the control unit.

4. The large-area cotton field pest monitoring system based on deep learning according to claim 1, characterized in that, The sensor group includes a temperature and humidity sensor and a light intensity sensor.

5. The large-area cotton field pest monitoring system based on deep learning according to claim 1, characterized in that The communication module uses the M5310-A 5G communication module of CM-IoT.

6. A method for monitoring cotton field pests in large areas based on deep learning, which is monitored by using the deep learning-based cotton field pest monitoring system as described in claim 1, characterized in that, Specifically, the control unit starts the image acquisition unit and the sensor group to collect data. The control unit preprocesses the collected image data, and sends the preprocessed image data and the environmental parameter data collected by the sensors to the server. The server uses a deep learning model based on the improved YOLOv7 algorithm to analyze the image data, identify the types and quantities of pests, combine the environmental parameter data and the geographical location information of the monitoring terminal, analyze the pest distribution and diffusion trends, store the analysis results in the server database, and send them to the user terminal. The user views the monitoring results. If it is found that the number of pests exceeds the warning threshold, a control instruction is sent through the user terminal, and the server forwards the instruction to the control unit, and the control unit takes corresponding measures according to the instruction.

7. The method for monitoring cotton field pests in a large area based on deep learning according to claim 6, wherein Specifically, it is implemented according to the following steps: Step 1, System initialization: Initialize and set the control unit, image acquisition unit, sensor group and communication module of the monitoring terminal, and configure parameters; load and warm up the deep learning model based on the improved YOLOv7 algorithm of the server; Step 2, The control unit controls the image acquisition unit and the sensor group to collect data according to a preset time interval or trigger condition, adjusts the parameters of the image acquisition unit according to environmental factors, and dynamically adjusts the sampling frequency of the sensor group; Step 3, The control unit compresses and encrypts the collected data, and sends the data to the data transmission module through the communication module; The data transmission module uses a data verification and retransmission mechanism to ensure data integrity; after receiving the data, the server allocates GPU resources for preprocessing according to the urgency and type of the data; Step 4, The user interaction control server monitors the access requests and control instructions of the user terminal in real time, and pushes the monitoring results to the user terminal in time; After verifying the legality of the user instruction, it is forwarded to the monitoring terminal control unit, and the control unit performs corresponding operations.

8. The method for monitoring cotton field pests in a large area based on deep learning according to claim 7, wherein, Specifically, in step 1, the control unit configures system parameters, sets data processing priorities, and initializes the storage path; calibrates the parameters of the image acquisition unit, including the focal length, exposure time, white balance, etc. of the camera; sets the sampling frequency and data transmission protocol for the sensor group; activates the communication module and configures network connection parameters.

9. The method for monitoring cotton field pests in a large area based on deep learning according to claim 7, wherein, The deep learning model based on the improved YOLOv7 algorithm is obtained by improving the feature fusion module, optimizing the backbone network, and improving the loss function of the original YOLOv7 algorithm's deep learning model respectively; Specifically, for the improvement of the feature fusion module, the CBAM attention module is introduced into the feature fusion layer. The CBAM attention module includes channel attention and spatial attention. The calculation formula of the channel attention Mc(F) is as follows: Mc(F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F))) (1) In formula (1), F is the input feature map, σ is the sigmoid function, MLP is the multi-layer perceptron, and AvgPool and MaxPool are the average pooling and maximum pooling operations respectively; The spatial attention Ms ( F ) The calculation formula is as follows: Ms ( F )= σ ( f 7×7([ AvgPool ( Fc ); MaxPool ( Fc )])) (2) In formula (2), Fc is the feature map after channel attention processing, f 7×7 represents a 7x7 convolution operation, and [;] represents a concatenation operation; Specifically, for the improvement of the backbone network, a pruning method based on the L1 norm is adopted to set the weights of unimportant convolution kernels to zero; Let the convolution kernel weight be W , and the pruning threshold be τ . Then the pruned weight W ' is calculated as follows: (3); Specifically, for the improvement of the loss function, Focal Loss is introduced to solve the problem of unbalanced positive and negative samples. The calculation formula of Focal Loss is as follows: (4) In formula (4), pt is the probability predicted by the model, γ is the adjustment factor.

10. The method for monitoring cotton field pests in a large area based on deep learning according to claim 7, wherein, In step 3, cyclic redundancy check CRC or parity check is used for data verification processing of the data transmission module. Whether the verified data is complete after transmission is judged by comparing the check codes; Specifically, for the retransmission mechanism processing of the data transmission module in step 3, when the server finds that the check codes are not equal, that is, there is an error in the data, it will send a retransmission request to the data transmission module. This retransmission request contains the identifier of the error data so that the sending end can accurately find the data that needs to be retransmitted; After receiving the retransmission request, the data transmission module finds the corresponding original data according to the identifier in the request, re-performs the verification calculation, generates a new check code, and then sends the data and the new check code to the server again; After receiving the retransmitted data, the server will perform verification calculation and comparison again until the check codes are equal, that is, it is confirmed that the data is complete.