Intelligent Identification and Early Warning Method and System for Rice Diseases and Pests
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-31
- Publication Date
- 2026-08-11
AI Technical Summary
[0003]然而,上述技术路线在实际部署于水稻主产区规模化农田监测场景时,仍存在以下技术缺陷:例如,现有域自适应方法采用“离线适配、静态部署”的单次迁移模式,无法适应水稻农田环境的动态演化规律,且传统迁移学习在目标域样本稀缺时采用差异越大、冻结越多的保守策略,与农业物联网场景下的快速适应需求相悖,以及多源域数据融合方式粗放,未考虑与当前农田分布最匹配的源域子集筛选等问题;因此,如何动态调用与当前农田分布最匹配的源域代表性样本,并基于样本分布差异主动调制目标域样本影响权重以对目标农田进行自适应识别预警
本申请提供的水稻病虫害智能识别预警方法及系统中,首先,持续采集目标农田当前的水稻图像,得到目标农田的近期水稻图像集并提取其特征分布表征,该步骤可将目标农田持续采集的水稻图像流转化为具有统计意义的特征分布表征,使离散图像升华为连续分布空间中的动态数字指纹,从而提高了对农田环境随生育期、光照、病害演变等因素变化的实时感知与量化跟踪能力,为后续自适应调制提供精准的分布度量基准;其次,从预构建的全局特征库中,调用多个不同源域训练数据集对应的源域特征分布,该步骤可实现多源域特征分布的统一预构建与轻量化调用,边缘节点仅需缓存分布参数而非海量原始图像,从而大幅降低了边缘计算设备的存储压力与网络传输带宽开销;随后,确定所述特征分布表征与每个源域特征分布之间的分布距离值,进而将最小分布距离值作为反映当前农田与已有源域整体差异程度的区域表征差异度,该步骤可实现目标农田与各源域分布偏移程度的定量计算,并将最小分布距离凝练为区域表征差异度这一核心控制参数,从而将复杂的分布比较问题转化为单一、可调制的量化指标,为后续自适应调制提供了与农田动态变化实时联动的决策依据;然后,从所述区域表征差异度对应的源域中调用与目标农田特征分布最相似的代表性样本,并与所述近期图像集共同构建混合训练数据,依据所述混合训练数据对水稻病虫害的基准识别模型进行微调,生成专用于目标农田的自适应调制识别模型,该步骤可从最相似源域中按需检索代表性样本并与当前农田样本按差异度加权混合微调,在继承通用病害识别知识的同时动态增强本地样本影响权重,从而显著提升了模型在环境剧变时快速遗忘旧分布、拟合新分布的持续适配能力,生成专用于目标农田的高精度自适应调制识别模型;最后,依据所述自适应调制识别模型对目标农田后续输入的水稻图像进行病虫害识别,并基于识别结果的时间序列变化与病害严重程度,生成分级预警信息,该步骤可基于自适应调制模型的高精度病虫害识别,并将识别结果转化为时序严重程度曲线与分级预警信号,完成了从感知、适配到决策的完整闭环,从而显著提高了病害早期发现、趋势预判与精准防控的时效性,为规模化水稻种植提供智能化的监测预警支撑;综上所述,本申请的方案可动态调用与当前农田分布最匹配的源域代表性样本,并基于样本分布差异主动调制目标域样本影响权重以对目标农田进行自适应识别预警。
Smart Images

Figure CN122551090A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent identification technology for pests and diseases, and in particular to an intelligent identification and early warning method and system for rice pests and diseases. Background Technology
[0002] Rice diseases and pests are characterized by sudden outbreaks and rapid spread. Accurate identification and early warning are key prerequisites for effective prevention and control and reducing yield losses. Existing rice disease and pest identification mainly adopts the following two technical approaches: The first approach is to pre-train the identification model in a laboratory environment or on a public dataset, and then fine-tune the model using a small number of labeled images of the target farmland to achieve the transfer and adaptation of the model to specific fields; The second approach is to measure the difference in feature distribution between the source domain and the target domain, align the feature distribution of the two domains during the model training process, thereby improving the model's generalization ability in the target domain.
[0003] However, when the above-mentioned technical approaches are actually deployed in large-scale farmland monitoring scenarios in major rice-producing areas, the following technical shortcomings still exist: For example, the existing domain adaptation methods adopt a single migration mode of "offline adaptation and static deployment," which cannot adapt to the dynamic evolution of the rice farmland environment. Furthermore, traditional transfer learning adopts a conservative strategy of freezing more samples when the target domain samples are scarce, which contradicts the rapid adaptation requirements in agricultural IoT scenarios. In addition, the multi-source domain data fusion method is crude and does not consider issues such as the selection of the source domain subset that best matches the current farmland distribution. Therefore, it is necessary to dynamically call the representative samples of the source domain that best match the current farmland distribution and actively modulate the influence weight of the target domain samples based on the differences in sample distribution to adaptively identify and warn of the target farmland. Summary of the Invention
[0004] Based on this, this application provides a method and system for intelligent identification and early warning of rice diseases and pests, which dynamically calls the representative samples of the source domain that best match the current farmland distribution, and actively modulates the influence weight of the target domain samples based on the differences in sample distribution to adaptively identify and warn of the target farmland.
[0005] In a first aspect, this application provides a method for intelligent identification and early warning of rice diseases and pests, comprising the following steps: Continuously collect current rice images of the target farmland to obtain a recent rice image set of the target farmland and extract its feature distribution representation; From a pre-built global feature library, call the source domain feature distributions corresponding to multiple training datasets from different source domains; Determine the distribution distance value between the feature distribution representation and the feature distribution of each source domain, and then use the minimum distribution distance value as the regional representation difference degree that reflects the overall difference between the current farmland and the existing source domains; The representative sample most similar to the feature distribution of the target farmland is called from the source domain corresponding to the regional characterization difference, and a hybrid training data is constructed together with the recent image set. The benchmark identification model of rice diseases and pests is fine-tuned based on the hybrid training data to generate an adaptive modulation identification model specifically for the target farmland. Based on the adaptive modulation recognition model, pest and disease identification is performed on the rice images subsequently input into the target farmland, and graded early warning information is generated based on the time series changes and severity of the disease based on the recognition results.
[0006] In some embodiments, calling source domain feature distributions corresponding to multiple different source domain training datasets from a pre-built global feature library specifically includes: Obtain a pre-built global feature library and receive model update requests sent by the edge computing server of the target farmland; In response to the model update request, the source domain feature distributions corresponding to multiple different source domain training datasets are read from the pre-built global feature library; The read feature distributions from multiple source domains are sent to the edge computing server of the target farmland and cached in the local memory of the edge computing server.
[0007] In some embodiments, determining the distribution distance value between the feature distribution representation and the feature distribution of each source domain, and then using the minimum distribution distance value as the regional representation difference degree reflecting the overall difference between the current farmland and the existing source domains, specifically includes: Obtain the feature distribution representation of the target farmland and the feature distributions of multiple source domains called from the global feature library; Calculate the distribution distance between the feature distribution representation and each source domain feature distribution one by one to obtain multiple distribution distance values; Extract the minimum distribution distance value from all the distribution distance values, and use the minimum distribution distance value as the regional characterization difference.
[0008] In some embodiments, retrieving representative samples from the source domain corresponding to the regional representation difference that are most similar to the target farmland feature distribution, and constructing mixed training data together with the recent image set specifically includes: Locate the source domain corresponding to the regional characterization difference, and retrieve multiple representative samples that are most similar to the target farmland feature distribution from the original image library of the source domain; All the retrieved representative samples are merged with all the images in the recent image set to form an initial mixed training set; Specifically, sampling weights are assigned to each image in the recent image set based on the magnitude of the regional representation difference. The greater the regional representation difference, the higher the sampling weight. The sampling weights are then added to the initial mixed training set to obtain weighted mixed training data.
[0009] In some embodiments, fine-tuning the baseline identification model for rice diseases and pests based on the hybrid training data to generate an adaptive modulation identification model specifically for the target farmland includes: Load the pre-trained benchmark identification model for rice diseases and pests, and initialize the classification layer parameters of the benchmark identification model; The mixed training data is input into the benchmark recognition model, and the loss contribution of each image in the recent image set and each representative sample is differentially weighted, and backpropagation and parameter update are performed. The updated baseline recognition model is used as an adaptive modulation recognition model specifically for the target farmland and deployed to the edge computing server of the target farmland.
[0010] In some embodiments, identifying pests and diseases in subsequently input rice images of the target farmland based on the adaptive modulation recognition model specifically includes: Receive real-time images of rice paddies collected subsequently from the target farmland; The rice image is input into the adaptive modulation recognition model to perform forward inference calculation; Obtain the pest and disease identification results output by the adaptive modulation identification model, wherein the identification results include at least quantitative indicators of disease category, confidence level, and disease severity.
[0011] In some embodiments, generating graded early warning information based on the time-series changes in the identification results and the severity of the disease specifically includes: The pest and disease identification results are stored in a time series database in chronological order to construct a time series of the severity of diseases in the target farmland; Based on the preset time window, determine the current level and trend of disease severity within the current time period; Based on the current level and trend of the severity of the disease, a preset graded early warning rule is matched to generate corresponding graded early warning information; The tiered early warning information is pushed to the user terminal.
[0012] Secondly, this application provides an intelligent identification and early warning system for rice diseases and pests, comprising: The acquisition module is used to continuously acquire current rice images of the target farmland, obtain a recent rice image set of the target farmland, and extract its feature distribution representation; The processing module is used to call the source domain feature distributions corresponding to multiple different source domain training datasets from a pre-built global feature library; The processing module is also used to determine the distribution distance value between the feature distribution representation and each source domain feature distribution, and then use the minimum distribution distance value as the regional representation difference degree that reflects the overall difference between the current farmland and the existing source domains. The processing module is also used to call the representative sample most similar to the feature distribution of the target farmland from the source domain corresponding to the regional characterization difference, and construct mixed training data together with the recent image set. Based on the mixed training data, the benchmark identification model of rice diseases and pests is fine-tuned to generate an adaptive modulation identification model specifically for the target farmland. The execution module is used to identify pests and diseases in rice images subsequently input from the target farmland based on the adaptive modulation recognition model, and to generate graded early warning information based on the time series changes and severity of the diseases in the recognition results.
[0013] Thirdly, this application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described intelligent identification and early warning method for rice diseases and pests.
[0014] Fourthly, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described intelligent identification and early warning method for rice diseases and pests.
[0015] The technical solutions provided by the embodiments disclosed in this application have the following beneficial effects: The intelligent identification and early warning method and system for rice diseases and pests provided in this application firstly continuously collects current rice images of the target farmland to obtain a recent rice image set of the target farmland and extracts its feature distribution representation. This step can transform the continuously collected rice image stream of the target farmland into a statistically significant feature distribution representation, sublimating discrete images into dynamic digital fingerprints in a continuous distribution space. This improves the real-time perception and quantitative tracking capability of changes in the farmland environment with factors such as growth period, light intensity, and disease evolution, providing an accurate distribution measurement benchmark for subsequent adaptive modulation. Secondly, it calls the source domain feature distributions corresponding to multiple different source domain training datasets from a pre-constructed global feature library. This step can achieve the unification of multi-source domain feature distributions. Pre-construction and lightweight invocation mean that edge nodes only need to cache distribution parameters instead of massive amounts of raw images, thus significantly reducing the storage pressure and network bandwidth overhead of edge computing devices. Subsequently, the distribution distance between the feature distribution representation and the feature distribution of each source domain is determined. The minimum distribution distance is then used as the regional representation difference degree reflecting the overall difference between the current farmland and existing source domains. This step enables the quantitative calculation of the distribution offset between the target farmland and each source domain, and condenses the minimum distribution distance into the core control parameter of regional representation difference. This transforms the complex distribution comparison problem into a single, modulotable quantitative indicator, providing a decision-making basis for subsequent adaptive modulation that is linked to real-time changes in farmland dynamics. Then, from the... The most representative samples most similar to the feature distribution of the target farmland are retrieved from the source domain corresponding to the regional representation difference degree, and a mixed training data is constructed together with the recent image set. Based on the mixed training data, the baseline identification model for rice diseases and pests is fine-tuned to generate an adaptive modulation identification model specifically for the target farmland. This step involves retrieving representative samples from the most similar source domain as needed and mixing them with the current farmland samples according to the difference degree for fine-tuning. While inheriting general disease identification knowledge, the influence weight of local samples is dynamically enhanced, thereby significantly improving the model's continuous adaptation ability to quickly forget old distributions and fit new distributions when the environment changes drastically, generating a high-precision adaptive modulation identification model specifically for the target farmland. Finally, based on the adaptive modulation identification model... The proposed method identifies pests and diseases in rice images subsequently input into the target farmland. Based on the time-series changes and severity of the identification results, it generates graded early warning information. This step utilizes a high-precision pest and disease identification based on an adaptive modulation model and transforms the identification results into a time-series severity curve and graded early warning signals, completing a full closed loop from perception and adaptation to decision-making. This significantly improves the timeliness of early disease detection, trend prediction, and precise control, providing intelligent monitoring and early warning support for large-scale rice cultivation. In summary, the proposed method can dynamically call upon representative samples from the source domain that best match the current farmland distribution and actively modulate the influence weights of target domain samples based on differences in sample distribution to adaptively identify and warn of the target farmland. Attached Figure Description
[0016] Figure 1 This is an exemplary flowchart of a method for intelligent identification and early warning of rice diseases and pests according to some embodiments of this application; Figure 2 This is a schematic diagram illustrating an application scenario of an intelligent pest and disease identification and early warning data processing system according to some embodiments of this application; Figure 3 This is a schematic diagram of the process for generating graded early warning information according to some embodiments of this application; Figure 4 This is a schematic diagram of the structure of an intelligent identification and early warning system for rice diseases and pests, as shown in some embodiments of this application; Figure 5 This is a schematic diagram of the structure of a computer device for implementing an intelligent identification and early warning method for rice diseases and pests, according to some embodiments of this application. Detailed Implementation
[0017] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0018] refer to Figure 1 The figure is an exemplary flowchart of a method for intelligent identification and early warning of rice diseases and pests according to some embodiments of this application. The method mainly includes the following steps: In step 101, current rice images of the target farmland are continuously acquired to obtain a set of recent rice images of the target farmland and extract its feature distribution representation.
[0019] It should be noted that the feature distribution representation in this application is a parameterized or non-parameterized representation that can characterize the overall visual feature distribution of the batch of images. Its function is to abstract the discrete image set into a point in a continuous distribution space, which serves as a digital fingerprint of the current state of the target farmland in the feature space. This fingerprint is used to make a quantitative comparison with the feature distribution of the source domain, thereby perceiving the dynamic changes of the farmland environment with factors such as the growing season and climate.
[0020] In practice, continuously acquiring current rice images of the target farmland to obtain a recent rice image set and extracting its feature distribution characteristics can be achieved in the following way: First, industrial-grade network cameras with fixed angles are set up inside or at the edge of the target farmland, or monitoring cameras already deployed on the local agricultural IoT platform are directly used to acquire visible light images of the rice canopy at a fixed frequency of one frame every 30 minutes. The acquired images are uploaded in real time to an edge computing server deployed near the farmland via a 4G wireless network or an edge computing gateway. This edge server is equipped with NVIDIA Jetson series embedded inference computing units to perform subsequent image processing and feature extraction tasks. Then, a first-in-first-out sliding window mechanism is used to construct a recent rice image set of the target farmland. The fixed capacity of the sliding window is set to 20 images. Whenever the edge server receives a newly acquired image, it is stored at the end of the window, and the oldest image in the window is automatically removed, ensuring that the recent rice image set always retains the 20 most recently acquired consecutive images. Valid images; next, uniform image preprocessing operations are performed sequentially on each image in the recent rice image set, including scaling the original image size to 224 pixels × 224 pixels, linearly scaling the pixel values to the range of 0 to 1, and performing channel-level normalization on the pixel values using the mean vector and standard deviation vector statistically obtained from the ImageNet dataset; after preprocessing, each image is input into a lightweight convolutional neural network MobileNetV3, which has been pre-trained on the ImageNet large-scale image classification dataset, as a feature extractor to extract a 1280-dimensional feature vector after the global average pooling layer and before the fully connected classification layer of the network, as the image-level feature representation of the image; finally, statistical modeling is performed on the 20 1280-dimensional feature vectors corresponding to all 20 images in the recent rice image set. Specifically, the arithmetic mean of the 20 vectors is calculated dimension by dimension to obtain the 1280-dimensional mean vector μ_t, and the unbiased sample variance of the 20 vectors is calculated dimension by dimension to obtain the 1280-dimensional variance vector σ_t. 2 And the mean vector μ_t is compared with the diagonal elements σ_t of the diagonal covariance matrix. 2 The combined encapsulation serves as a representation of the overall feature distribution of the target farmland rice image in the current time period. As a preferred embodiment, when the target farmland is in the rice heading and flowering stage or when there are continuous rainy days causing drastic fluctuations in light intensity, the edge server can dynamically adjust the sliding window capacity to 30 to 50 images and use a Gaussian mixture model containing 3 to 5 Gaussian components instead of a single Gaussian distribution to describe the distribution pattern of the feature vectors, thereby capturing the multimodal distribution characteristics of image features more precisely. This application does not impose a unique limitation on the specific value of the recent image set window capacity and the specific modeling method of feature distribution representation. Other methods can also be used in other embodiments, and no limitation is made here.
[0021] It should be noted that the above steps can transform the continuously collected rice image stream of the target farmland into a statistically significant feature distribution representation, and sublimate discrete images into dynamic digital fingerprints in a continuous distribution space. This improves the ability to perceive and quantitatively track changes in the farmland environment with factors such as growth period, light, and disease evolution, and provides an accurate distribution measurement benchmark for subsequent adaptive modulation.
[0022] In some embodiments, reference Figure 2 As shown in the figure, this figure is a schematic diagram of the application scenario of the intelligent pest and disease identification and early warning data processing system shown in some embodiments of this application. The figure includes three main components: acquisition device, server and data storage device. The acquisition device is responsible for collecting current rice images of the target farmland, obtaining a recent rice image set of the target farmland, and sending the collected recent rice image set to the server through the communication network. The intelligent pest and disease identification and early warning data processing system runs on the server. The server stores the processing results in the data storage device and visualizes them.
[0023] In step 102, source domain feature distributions corresponding to multiple different source domain training datasets are retrieved from the pre-built global feature library.
[0024] In some embodiments, retrieving source domain feature distributions corresponding to multiple different source domain training datasets from a pre-built global feature library can be achieved using the following steps: Obtain a pre-built global feature library and receive model update requests sent by the edge computing server of the target farmland; In response to the model update request, the source domain feature distributions corresponding to multiple different source domain training datasets are read from the pre-built global feature library; The read feature distributions from multiple source domains are sent to the edge computing server of the target farmland and cached in the local memory of the edge computing server.
[0025] It should be noted that the source domain feature distribution in this application is the statistical distribution parameter of the feature vector set calculated after feature extraction from all images in the source domain. Its function is to completely preserve the global statistical characteristics of the source domain data in the feature space with extremely low storage overhead, serving as the distribution identifier of each source domain, allowing the target farmland to quickly retrieve and match during model updates, thereby avoiding the storage and transmission of massive amounts of original images. The pre-built global feature library is a structured data warehouse pre-built on a cloud server, containing the identification information of multiple source domain training datasets of different regions, years, varieties, and pest types, as well as their corresponding source domain feature distributions. Its function is to serve as a unified management center for multi-source domain distribution information, supporting edge computing servers to initiate call requests on demand and quickly obtain the required source domain feature distributions, realizing centralized storage, efficient distribution, and version management of distribution information.
[0026] In specific implementation, acquiring the pre-built global feature library and receiving model update requests sent by the edge computing server of the target farmland can be achieved in the following way: A model update client is deployed on the edge computing server of the target farmland. This client automatically generates a model update request as a scheduled task, for example, at 2:00 AM daily or when the recent rice image set of the target farmland has accumulated 20 new images. The model update request carries at least a unique identifier for the target farmland, the device ID of the edge computing server, and the current timestamp. This request is transmitted to the cloud server via 4G / 5G network encrypted using the MQTT or HTTPS protocol. Upon receiving the request, the cloud server parses the farmland identifier and device ID and verifies the legitimacy of the edge computing server. After the verification is passed, the cloud server determines that the current request is a valid model update request, and then prepares to read the source domain feature distributions corresponding to multiple source domain training datasets from the global feature library. As a preferred embodiment, the cloud server can preload the source domain feature distributions of all source domains in the global feature library into the memory cache to cope with the fast response requirements when dozens or even hundreds of edge computing servers simultaneously initiate model update requests in high-concurrency scenarios. In other embodiments, the model update request can also be actively triggered by the cloud server. For example, when a new source domain dataset is added to the global feature library, the cloud server broadcasts an incremental update notification to all registered edge computing servers, and the edge computing servers decide independently whether to pull the latest source domain feature distribution. This application does not limit this to a single method.
[0027] In specific implementation, the global feature library can be pre-constructed in the following way: Multiple publicly available or self-built rice disease image datasets from different regions, years, rice varieties, and pest and disease types are collected as source domain training datasets. These source domain training datasets include at least a subset of rice diseases from the PlantVillage public dataset, the AI Challenger 2018 crop disease competition dataset, and field-measured rice disease image datasets from Jiangsu (2019), Zhejiang (2021), and Heilongjiang (2023). For each source domain training dataset, the MobileNetV3 feature extraction network, identical to the recent rice image set of the target farmland in claim 1, is used to perform batch feature extraction on all images within the source domain, obtaining a 1280-dimensional feature vector for each image. Based on the feature vectors of all images in the source domain, the arithmetic mean is calculated dimension-wise to obtain a 1280-dimensional mean vector μ_s, and the unbiased sample variance is calculated dimension-wise to obtain a 1280-dimensional variance vector σ_s. 2 The mean vector μ_s and the variance vector σ_s 2The source domain feature distribution is used as the source domain training dataset; the unique ID, name identifier, geographic location label, mean vector μ_s, and variance vector σ_s of each source domain training dataset are used. 2 The storage path or object storage address of the original image in the source domain is stored in a cloud MySQL database or Redis cache in a relational database table structure or key-value pair format to complete the pre-construction of the global feature library. Other methods can also be used in other embodiments, which are not limited here.
[0028] It should be noted that the steps in this application of reading source domain feature distributions corresponding to multiple different source domain training datasets from a pre-built global feature library in response to the model update request, and sending the read multiple source domain feature distributions to the edge computing server of the target farmland and caching them in the local memory of the edge computing server can all be implemented using known existing technologies, and this application does not limit them.
[0029] In addition, it should be noted that the above steps can achieve unified pre-construction and lightweight calling of multi-source domain feature distribution. Edge nodes only need to cache distribution parameters instead of massive amounts of original images, thereby significantly reducing the storage pressure and network transmission bandwidth overhead of edge computing devices.
[0030] In step 103, the distribution distance value between the feature distribution representation and each source domain feature distribution is determined, and then the minimum distribution distance value is used as the regional representation difference degree that reflects the overall difference between the current farmland and the existing source domain.
[0031] In some embodiments, determining the distribution distance value between the feature distribution representation and each source domain feature distribution, and then using the minimum distribution distance value as the regional representation difference degree reflecting the overall difference between the current farmland and the existing source domains, can be achieved by the following steps: Obtain the feature distribution representation of the target farmland and the feature distributions of multiple source domains called from the global feature library; Calculate the distribution distance between the feature distribution representation and each source domain feature distribution one by one to obtain multiple distribution distance values; Extract the minimum distribution distance value from all the distribution distance values, and use the minimum distribution distance value as the regional characterization difference.
[0032] It should be noted that the distribution distance value in this application refers to a non-negative real number obtained by calculating the degree of difference between the characteristic distribution representation of the target farmland and the characteristic distribution of a certain source domain through a preset distribution measurement algorithm. Its function is to transform the similarity between the two distributions into a single numerical index, providing a mathematical basis for subsequent screening of the source domain most similar to the target farmland and quantifying the degree of distribution shift. The regional representation difference represents the shift intensity of the current farmland relative to the existing overall distribution system of the source domain. It can be used as the core control parameter of the influence weight of the target farmland sample during the dynamic modulation model update process, realizing an adaptive mechanism where the greater the distribution shift, the higher the weight of the local sample.
[0033] In specific implementation, the distribution distance value between the feature distribution representation and each source domain feature distribution is calculated one by one. Multiple distribution distance values can be obtained in the following way: First, on the edge computing server of the target farmland, multiple cached source domain feature distributions are read from local memory. Each source domain feature distribution contains a 1280-dimensional mean vector μ_s and a 1280-dimensional variance vector σ_s corresponding to that source domain. 2 Simultaneously, the feature distribution representation of the target farmland is obtained from the current working memory of the edge computing server. This feature distribution representation includes a 1280-dimensional mean vector μ_t and a 1280-dimensional variance vector σ_t. 2 Then, for each source domain, perform the following distributed distance calculation operations: calculate the Euclidean distance between μ_t and μ_s to obtain the mean distance component; calculate σ_t. 2 With σ_s 2 The mean distance component and the variance distance component are obtained by Euclidean distance; the mean distance component and the variance distance component are weighted and summed according to preset weights, wherein the weight of the mean distance component and the weight of the variance distance component are both 0.5, and the result of the weighted sum is used as the distribution distance value between the source domain and the target farmland; the edge computing server sequentially traverses all M source domains and repeats the above calculation process to obtain M distribution distance values; as a preferred embodiment, when the source domain feature distribution is stored using a Gaussian mixture model, the edge computing server uses the Monte Carlo sampling method to extract 5000 virtual samples from the feature distribution representation of the target farmland and the feature distribution of the source domain respectively, and calculates the maximum mean difference between the two virtual sample sets as the distribution distance value; in other embodiments, if the source domain feature distribution only stores the mean vector and not the variance vector, the Euclidean distance between μ_t and μ_s is directly used as the distribution distance value. This application does not impose a unique limitation on the specific measurement method and weighting weight of the distribution distance.
[0034] It should be noted that the above steps can quantitatively calculate the degree of distribution deviation between the target farmland and each source domain, and condense the minimum distribution distance into the core control parameter of regional characterization difference, thereby transforming the complex distribution comparison problem into a single, modulotable quantitative indicator, providing a decision basis for subsequent adaptive modulation that is linked to the dynamic changes of farmland in real time.
[0035] In step 104, representative samples most similar to the feature distribution of the target farmland are retrieved from the source domain corresponding to the regional characterization difference, and mixed training data is constructed together with the recent image set. Based on the mixed training data, the benchmark identification model of rice diseases and pests is fine-tuned to generate an adaptive modulation identification model specifically for the target farmland.
[0036] In some embodiments, the process of calling representative samples from the source domain corresponding to the regional representation difference degree that are most similar to the target farmland feature distribution and constructing mixed training data together with the recent image set can be achieved by the following steps: Locate the source domain corresponding to the regional characterization difference, and retrieve multiple representative samples that are most similar to the target farmland feature distribution from the original image library of the source domain; All the retrieved representative samples are merged with all the images in the recent image set to form an initial mixed training set; Specifically, sampling weights are assigned to each image in the recent image set based on the magnitude of the regional representation difference. The greater the regional representation difference, the higher the sampling weight. The sampling weights are then added to the initial mixed training set to obtain weighted mixed training data.
[0037] In specific implementation, locating the source domain corresponding to the regional representation difference and retrieving multiple representative samples most similar to the target farmland feature distribution from the original image library of the source domain can be achieved in the following way: First, on the edge computing server of the target farmland, the source domain number is read from the source domain identifier corresponding to the minimum distribution distance value recorded in step 103. Based on the source domain number, the corresponding source domain original image library, which is pre-stored on the edge computing server, is located. The original image library of the source domain contains all the original image files of the source domain and a pre-extracted 1280-dimensional feature vector index library. The feature vector index library is constructed using the Faiss vector retrieval engine and has been loaded into the memory of the edge computing server. Then, the 1280-dimensional feature vectors of all 20 images in the recent image set output in step 101 are used as query vectors and sequentially input into the Faiss retrieval engine for each recent image. For each recent image, a nearest neighbor search using Euclidean distance is performed in the source domain feature vector index library to retrieve the five closest source domain images in the feature space. The storage paths of these source domain images and their corresponding pest and disease category labels are recorded. Finally, all source domain images retrieved from recent images are merged and deduplicated. If the same source domain image is matched by multiple recent images, it is only retained once. The final result is a representative sample set consisting of no more than 100 source domain images and their labels. As a preferred embodiment, when the local storage space of the edge computing server is insufficient, the original source domain image library can be deployed in cloud object storage. During retrieval, the edge server sends the query vector to the cloud retrieval engine. After the cloud performs a nearest neighbor search, the matched image files are returned to the edge server in batches in the form of compressed packages. This application does not impose a unique limitation on the retrieval method and deployment architecture of the representative samples.
[0038] In specific implementation, sampling weights are assigned to each image in the recent image set according to the magnitude of the regional representation difference. The greater the regional representation difference, the higher the sampling weight. The sampling weights are then added to the initial mixed training set to obtain weighted mixed training data. This can be achieved as follows: First, the regional representation difference d at the current time is obtained from step 103. This regional representation difference is a dimensionless real number that has been normalized to a closed interval between 0 and 1. Then, the modulation function of the sampling weights is set to a linear mapping relationship. Specifically, the sampling weight w_cur of each image in the current recent farmland image set is assigned the value of 1 plus twice the regional representation difference d, i.e., w_cur = 1 + 2d, where the sampling weight is 1 when the regional representation difference d is 0, and 3 when the regional representation difference d is 1; for all representative samples from the source domain obtained, their sampling weights are uniformly fixed at 1; then, the 20 images in the recent image set and their corresponding sampling weights w_cur and disease category labels, along with all images in the representative sample set and their sampling weights 1 and disease category labels, are merged into a single dataset according to the image data flow order, and the sampling weight value is explicitly stored for each image; finally, the single dataset is packaged into the input format required by PyTorch or TensorFlow data loaders that support weighted sampling, generating weighted mixed training data for subsequent fine-tuning steps; as a preferred embodiment, the modulation function can also be in exponential form w_cur = e^(βd), where β takes the value of 2 to 3, or a piecewise threshold function is used. When the regional characterization difference d is less than 0.2, w_cur takes 0.5; when d is between 0.2 and 0.6, w_cur takes 1.5; when d is greater than 0.6, w_cur takes 3.0. This application does not impose a unique limitation on the specific modulation method of the sampling weight.
[0039] In some embodiments, fine-tuning the baseline identification model for rice diseases and pests based on the hybrid training data to generate an adaptive modulation identification model specifically for the target farmland can be achieved through the following steps: Load the pre-trained benchmark identification model for rice diseases and pests, and initialize the classification layer parameters of the benchmark identification model; The mixed training data is input into the benchmark recognition model, and the loss contribution of each image in the recent image set and each representative sample is differentially weighted, and backpropagation and parameter update are performed. The updated baseline recognition model is used as an adaptive modulation recognition model specifically for the target farmland and deployed to the edge computing server of the target farmland.
[0040] It should be noted that the baseline recognition model in this application refers to a deep convolutional neural network model pre-trained on a large-scale public or self-built crop disease image dataset. Its network weights have converged to the point where they can generalize and recognize multiple crops and multiple disease categories. Its role is to serve as the starting point for the fine-tuning process, providing the target farmland with rich visual feature priors and disease classification knowledge, enabling subsequent fine-tuning to converge quickly with a small number of target domain samples, avoiding the massive labeled data and computational resources required for training from scratch. The adaptive modulation recognition model refers to a customized pest and disease recognition model specifically for the target farmland, obtained by fine-tuning a mixed training data consisting of the current farmland's recent image set and the most similar representative samples from the source domain, and applying differentiated sampling weights to the current farmland samples based on the regional representation differences. Its role is to achieve online continuous adaptation to the dynamic environment of the target farmland, such as the change of growth period, light changes, and the evolution of disease prevalence, while inheriting the general knowledge of the source domain, and continuously optimizing the recognition accuracy over time. In specific implementation, loading the pre-trained benchmark identification model for rice diseases and pests and initializing the classification layer parameters of the benchmark identification model can be achieved in the following way: First, in the deep learning inference framework of the edge computing server, load the EfficientNet-B0 network model, which has been pre-trained on a large crop disease image classification dataset, from the local model repository or cloud model storage center. This benchmark identification model is the rice disease and pest identification model. The network weights of this benchmark identification model are persistently stored in PyTorch's .pth file format or ONNX format. Then, read the network structure definition of the benchmark identification model, locate the fully connected classification layer at the end of the model, and modify the number of output nodes of the fully connected classification layer from the original number of categories during pre-training, such as 61 categories, to adapt to the actual situation of the target farmland. The number of categories for the pest and disease identification task is such that the target farmland must include at least four categories of pests and diseases: rice blast, sheath blight, rice planthopper, and healthy rice. Therefore, the output dimension of the fully connected layer is set to 4. Next, the weight matrix and bias terms of the newly set fully connected layer are assigned values using a random initialization method, such as using the Kaiming normal distribution for initialization, while the weight parameters of the other backbone network layers remain unchanged after pre-training. This completes the initialization of the classification layer parameters of the benchmark identification model. As a preferred embodiment, if the benchmark identification model adopts an architecture such as MobileNetV3 or Swin-Tiny, the above operation is also followed: all pre-trained weights except for the classification head are retained, and only the classification head fully connected layer is replaced and randomly initialized. This application does not impose a unique limitation on the specific architecture and initialization method of the benchmark identification model.
[0041] In specific implementation, the benchmark identification model for rice diseases and pests can be pre-trained in the following manner: First, collect a large-scale public crop disease image dataset containing at least 26 crops and 61 disease categories, such as the PlantVillage dataset, the AI Challenger 2018 crop disease competition dataset, and a self-built rice paddy complex background disease image dataset, totaling no less than 100,000 labeled images; then, uniformly scale all images in the above dataset to 224 pixels × 224 pixels, and perform the same image preprocessing operations as in step S1, including scaling pixel values to the 0-1 range and standardizing with ImageNet statistics; next, select EfficientNet-B0 as the basic network architecture, use a stochastic gradient descent optimizer on a server cluster, set the initial learning rate to 0.01, use cosine annealing decay, set the batch size to 256, iterate for 100 rounds, and use cross-entropy loss. The function aims to optimize all parameters of the network through end-to-end supervised training. After training, the model weights that perform best on the validation set are saved as pre-trained weights for the benchmark recognition model and distributed and stored in the cloud model library and the local model repository on the edge server for subsequent fine-tuning steps. As a preferred embodiment, an image classification model pre-trained on the ImageNet-1K dataset can also be used as the initial weights, followed by secondary transfer pre-training using the aforementioned crop disease dataset to further improve the model's ability to represent rice pest and disease characteristics. This application does not impose a unique limitation on the pre-training dataset and training strategy of the benchmark recognition model.
[0042] In specific implementation, the mixed training data is input into the benchmark recognition model, and the loss contribution of each image in the recent image set and each representative sample is differentially weighted. Backpropagation and parameter update can be implemented in the following way: First, in the deep learning training environment of the edge computing server, images and their corresponding disease category labels and sampling weight values are loaded in batches from the weighted mixed training data. Each batch contains 32 images, where the ratio of the current farmland's recent images to the source domain's representative samples is naturally determined by the weighted random sampling mechanism of the sampling weight in the data loader. Then, the image data of the current batch is input into the benchmark recognition model that has been loaded and whose classification layer parameters have been initialized, and forward inference calculation is performed to obtain the predicted probability distribution of each image belonging to various diseases and pests. Next, for each image, the cross-entropy loss function is used to calculate the loss value between the predicted probability of the image and the true label, and the loss value is multiplied by the image. The pre-allocated sampling weights are used to obtain the weighted loss value. The weighted loss values of all images are summed and averaged to obtain the overall weighted loss of the current batch. Then, the backpropagation algorithm is executed to calculate the gradient of the overall weighted loss with respect to the parameters of each layer of the model. The AdamW optimizer is used to update the parameters of the unfrozen network layers with a base learning rate of 1e-4. The parameters of the first 5 MBConv modules of the backbone network are frozen and do not participate in the update. Only the last 2 MBConv modules and the newly initialized fully connected classification layer participate in gradient descent. The above batch loading, forward calculation, weighted loss, backpropagation, and parameter update process is repeated for 20 iterations to complete the fine-tuning of the benchmark recognition model. As a preferred embodiment, an early stopping mechanism can be introduced during the model training process. When the validation set loss no longer decreases for 5 consecutive iterations, the training is terminated early to prevent overfitting. This application does not impose unique limitations on the optimizer type, learning rate scheduling, freezing strategy, and iteration rounds in the fine-tuning stage.
[0043] It should be noted that the above steps can retrieve representative samples from the most similar source domain as needed and fine-tune them by mixing them with the current farmland samples according to the degree of difference. While inheriting general disease identification knowledge, the influence weight of local samples is dynamically enhanced, thereby significantly improving the model's ability to quickly forget the old distribution and fit the new distribution when the environment changes drastically, and generating a high-precision adaptive modulation identification model specifically for the target farmland.
[0044] In step 105, pest and disease identification is performed on the rice images subsequently input into the target farmland based on the adaptive modulation recognition model, and graded early warning information is generated based on the time series changes and severity of the disease based on the recognition results.
[0045] In some embodiments, the identification of pests and diseases in subsequent input rice images of the target farmland based on the adaptive modulation recognition model can be achieved through the following steps: Receive real-time images of rice paddies collected subsequently from the target farmland; The rice image is input into the adaptive modulation recognition model to perform forward inference calculation; Obtain the pest and disease identification results output by the adaptive modulation identification model, wherein the identification results include at least quantitative indicators of disease category, confidence level, and disease severity.
[0046] It should be noted that the confidence metric in this application quantifies the degree of certainty of the adaptive modulation recognition model for the current recognition result. It can be used as an evaluation index of the reliability of the recognition result, as well as as an auxiliary estimation of the severity of the disease, monitoring of multiple infections, and dynamic threshold adjustment in early warning rules.
[0047] In specific implementation, the rice image is input into the adaptive modulation recognition model, and forward inference calculation can be performed in the following way: First, on the edge computing server of the target farmland, a visible light image of the rice canopy is collected and uploaded every 30 minutes by an industrial-grade network camera deployed in the farmland via the MQTT protocol or RTSP video stream protocol; after receiving the image, the edge computing server immediately calls the locally deployed adaptive modulation recognition model inference engine, which uses ONNX Runtime or TensorRT. The Lite framework loads and runs the finely tuned adaptive modulation recognition model; the server performs the same image preprocessing operations as in step 101 on the received raw image, including scaling the size to 224 pixels × 224 pixels, normalizing pixel values to the 0-1 range, and channel-level normalization of the ImageNet dataset; after preprocessing, the image tensor is input into the adaptive modulation recognition model, and a forward inference calculation is performed. The model will calculate layer by layer and output the original unnormalized category score vector; as a preferred embodiment, when the edge computing server needs to process multiple cameras or high-concurrency image streams simultaneously, a batch inference method can be adopted to merge the accumulated 4 or 8 images into a batch input to the model to improve throughput and reduce the average inference latency of a single image. This application does not impose a unique limitation on the batch size and specific inference framework during inference.
[0048] In specific implementation, the pest and disease identification results output by the adaptive modulation recognition model are obtained. These results include at least quantitative indicators of disease category, confidence level, and disease severity. This can be achieved as follows: First, the edge computing server converts the original category score vector output by the model's forward inference into a probability distribution between 0 and 1 using the Softmax function. The category index corresponding to the maximum probability is taken as the disease category of the image. The disease categories include rice blast, sheath blight, rice planthopper, and healthy rice. Simultaneously, the maximum probability value is used as the model's confidence level for the identification result. If the adaptive modulation recognition model has semantic segmentation capabilities, such as using a lightweight DeepLabV3 architecture, the model outputs a pixel-level segmentation mask with the same resolution as the input image, in addition to the category probability. The server traverses all pixel regions in the segmentation mask that are predicted as disease categories, counts the total number of disease pixels, and divides it by the number of rice pixels in the segmentation mask. The total number of pixels in the leaf area is used to calculate the percentage of the leaf area covered by lesions, which is then used as a quantitative indicator of disease severity. If the adaptive modulation recognition model only outputs image-level classification results without segmentation capabilities, the server uses the probability values output by the model or a pre-defined severity mapping table, such as mapping to mild, moderate, and severe levels based on confidence intervals, as alternative quantitative indicators of disease severity. Finally, the acquisition timestamp, farmland identifier, disease category, confidence level, and disease severity value of each image are encapsulated into a JSON-formatted recognition result object and stored in the local memory of the edge computing server for use in the next step. As a preferred embodiment, when the model outputs the probabilities of multiple disease categories simultaneously, all disease categories with confidence levels exceeding a preset threshold, such as 0.5, and their corresponding severity levels can be retained for subsequent monitoring of compound infection. This application does not impose a unique limitation on the specific data structure of the recognition results or the method of calculating disease severity.
[0049] It should be noted that in this application, for cases where only image-level classification results are output without segmentation capabilities, the server needs to convert the confidence level or other alternative indicators output by the model into simulated severity values that can be compared with a preset percentage threshold. The specific conversion method can employ a mapping function or mapping table based on expert experience or historical data fitting. As an example implementation, a piecewise linear mapping function is pre-defined: if the confidence level `conf` is less than 0.5, the identification is considered unreliable and not included in the severity statistics; if `conf` is in the interval [0.5, 0.7), it is mapped to a simulated severity value `sev = 3%` for mild cases; if `conf` is in the interval [0.7, 0.9), it is mapped to a simulated severity value `sev = 10%` for moderate cases; and if `conf` is in the interval [0.9, 1.0], it is mapped to a simulated severity value `sev = 20%` for severe cases. These mapping values can be adjusted according to different disease types or regional characteristics. As another example implementation, a continuous mapping function can be used, for example, `sev = k * conf + ...`. b, where coefficients k and b are obtained by fitting historical disease severity measurement data and corresponding image classification confidence scores using the least squares method, so that the simulated severity value is consistent with the actual severity percentage in a statistical sense; after the above mapping, the disease severity of each image is quantified into a value between 0% and 100% (or its approximation), thus making it possible to subsequently average the images within the window to obtain S_curr, and compare it with preset grading thresholds such as 5% and 15%.
[0050] In some embodiments, reference Figure 3 As shown in the figure, this is a schematic diagram of the process for generating graded early warning information in some embodiments of this application. In this embodiment, the generation of graded early warning information based on the time series changes of the identification results and the severity of the disease can be achieved by the following steps: In step 1031, the pest and disease identification results are stored in a time series database in chronological order to construct a time series of the severity of diseases in the target farmland; In step 1032, the current level and trend of disease severity within the current time period are determined according to the preset time window; In step 1033, based on the current level and trend of the severity of the disease, a preset graded early warning rule is matched to generate corresponding graded early warning information; In step 1034, the graded early warning information is pushed to the user terminal.
[0051] In specific implementation, the pest and disease identification results are stored in a time-series database in chronological order. Constructing a time series of disease severity for the target farmland can be achieved as follows: First, a lightweight time-series database, SQLite or InfluxDB, is deployed on an edge computing server or cloud server, and an independent data table or storage bucket is pre-created for each target farmland. After the server generates the pest and disease identification result for each image, it immediately writes the collection timestamp, disease severity value, and disease category of the result into the corresponding farmland's time-series database as a record, where the timestamp serves as the primary key and the severity value as the metric field. For the same farmland... In cases where multiple images of a field may exist at the same time, such as those taken from multiple perspectives, the median or average of the severity values of all images at that moment is taken as the aggregated severity value for that moment. As images are continuously acquired and identified, a data point sequence with time as the horizontal axis and disease severity as the vertical axis will be accumulated in the time-series database, i.e., the time series of disease severity of the target farmland. As a preferred embodiment, the edge computing server can be set to automatically synchronize the newly added identification results of the day to the cloud center time-series database in batches every morning to achieve centralized storage and long-term trend analysis of multi-farmland data. This application does not impose a unique limitation on the specific selection and deployment location of the time-series database.
[0052] In specific implementation, the current severity level and trend of the disease within the current time period can be determined according to the preset time window in the following way: First, the edge computing server queries the time series database for all disease severity records within the preset time window, which is 24 hours prior to the current time, to obtain a list of severity values within that window. If there are fewer than 3 records in the window, the data is considered insufficient, and level and trend determination is not performed at this time. If there are sufficient records, the arithmetic mean of all severity values within the window is calculated as the average severity S_curr for the current time period. At the same time, the average severity S_prev of the previous 24-hour window, which is 24 hours prior to the start time of the current window, is queried. Then, the current level is determined according to the preset severity grading threshold: if S_curr is less than 5%, it is determined as Level I (mild occurrence); if S_curr is between 5% and 15%, it is determined as Level II (moderate occurrence); if S_curr is greater than 15%, it is determined as Level III (severe occurrence). The trend is determined by calculating the rate of change ΔS = (S_curr - S_prev) / S_prev, where S_prev is 0 and S_curr itself is taken as the change, and a trend judgment rule is preset: if ΔS is less than 10%, it is judged as stable; if ΔS is between 10% and 30%, it is judged as rising; if ΔS is greater than 30%, it is judged as rising rapidly. As a preferred embodiment, the length of the time window can be dynamically adjusted according to the rice growth period. For example, a 24-hour window is used during the tillering stage and a 12-hour window is used during the heading stage. This application does not make a unique limitation on the specific length of the time window and the grading threshold.
[0053] In specific implementation, determining the current severity level and trend of the disease within a preset time window can be achieved in the following way: First, the edge computing server or cloud server reads a predefined graded early warning rule table. This rule table contains multiple rule entries, each consisting of four parts: severity level, trend, warning level, and warning content template. For example, rule entry 1: if the level is Level II and the trend is upward, the warning level is a yellow warning, and the warning content is that rice blast has occurred moderately and is on the rise, suggesting increased patrols; rule entry 2: if the level is Level III or the trend is rapidly rising, the warning level is a red warning, and the warning content is that the disease has occurred severely or is spreading rapidly, requesting immediate control measures; the server, based on the currently determined severity level and trend, in The rule table performs exact matching to find the first perfectly matching rule entry. If no perfect match is found, fuzzy matching is performed based on the principle of prioritizing severity level and then trend, selecting the closest rule. After a successful match, the server instantiates and generates complete structured hierarchical early warning information based on the warning level and warning content template, combined with contextual information such as the target farmland identifier, current time, and the three most recent typical images. This information includes the warning level (blue / yellow / orange / red), warning title, detailed description, suggested measures, associated image URL, and timestamp. As a preferred embodiment, the early warning rule table can be configured to be dynamically updated, and agricultural experts can remotely adjust the hierarchical threshold and warning content through the backend management interface. This application does not impose a unique limitation on the specific form and matching strategy of the hierarchical early warning rules.
[0054] In specific implementation, the tiered early warning information can be pushed to user terminals in the following ways: First, the edge computing server or cloud server retrieves the type of receiving terminal and push address bound to the user's account (farmer account, plant protection station account, or agricultural expert account) from the user registration information database based on the farmer's account, plant protection station account, or agricultural expert account corresponding to the target farmland. The terminal types include WeChat mini-programs, SMS messages, mobile applications, and web pages. For WeChat mini-programs, the server calls the WeChat Official Accounts Platform template message interface via HTTPS requests, encapsulates the title, content, image thumbnail, and jump link of the early warning information into JSON format, and pushes it to the specific user's WeChat. For SMS messages, the server connects to a third-party SMS gateway to push the core summary of the early warning (such as "Red Alert: Severe Occurrence of Rice Blast") to the target farmland. The data is truncated to a text of no more than 70 characters and sent to the target mobile phone number. For mobile applications, the server uses JPush or Alibaba Cloud Mobile Push services to send the structured early warning data to the application client in a transparent manner, where it is rendered as a notification message locally. For web applications, the early warning information is pushed to the online monitoring dashboard or the backend management interface in real time via a WebSocket long connection. After the push is completed, the server records the push time, push channel, and reception status of this early warning and stores them in the early warning log database for subsequent statistics and backtracking. As a preferred embodiment, when the same farmland triggers the same level of early warning multiple times in a row, the system automatically merges the pushes to avoid high-frequency repetitive messages from interfering with users. This application does not limit the specific push channel and merging strategy.
[0055] It should be noted that the above steps can be based on the high-precision identification of pests and diseases using an adaptive modulation model, and the identification results can be transformed into time-series severity curves and graded early warning signals, completing a complete closed loop from perception, adaptation to decision-making. This significantly improves the timeliness of early disease detection, trend prediction and precise control, and provides intelligent monitoring and early warning support for large-scale rice cultivation.
[0056] In another aspect, in some embodiments, this application provides an intelligent identification and early warning system for rice diseases and pests, referring to... Figure 4 The figure is a schematic diagram of the structure of an intelligent identification and early warning system for rice diseases and pests according to some embodiments of this application. The intelligent identification and early warning system for rice diseases and pests includes: a data acquisition module 401, a processing module 402, and an execution module 403, which are described below: The acquisition module 401 in this application is mainly used to continuously acquire current rice images of the target farmland, obtain a recent rice image set of the target farmland and extract its feature distribution representation. Processing module 402, in this application, is mainly used to call source domain feature distributions corresponding to multiple different source domain training datasets from a pre-built global feature library; The processing module 402 described in this application is also used to determine the distribution distance value between the feature distribution representation and each source domain feature distribution, and then use the minimum distribution distance value as the regional representation difference degree that reflects the overall difference between the current farmland and the existing source domains. The processing module 402 described in this application is further configured to call the representative sample most similar to the feature distribution of the target farmland from the source domain corresponding to the regional characterization difference, and construct mixed training data together with the recent image set, fine-tune the benchmark identification model of rice diseases and pests based on the mixed training data, and generate an adaptive modulation identification model specifically for the target farmland. The execution module 403 in this application is mainly used to identify pests and diseases in rice images subsequently input into the target farmland based on the adaptive modulation recognition model, and to generate graded early warning information based on the time series changes and severity of the diseases in the recognition results.
[0057] Each module in the aforementioned intelligent identification and early warning system for rice diseases and pests can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0058] In another embodiment, this application provides a computer device, which may be a server, and its internal structure diagram may be as follows. Figure 5 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores intelligent identification and early warning data for rice diseases and pests. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements an intelligent identification and early warning method for rice diseases and pests.
[0059] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0060] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described embodiment of the intelligent identification and early warning method for rice diseases and pests.
[0061] In one embodiment, a computer-readable storage medium is provided, storing a computer program that, when executed by a processor, implements the steps described in the embodiment of the intelligent identification and early warning method for rice diseases and pests.
[0062] In one embodiment, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps described in the embodiment of the intelligent identification and early warning method for rice diseases and pests.
[0063] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0064] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0065] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for intelligent identification and early warning of rice diseases and pests, characterized in that, Includes the following steps: Continuously collect current rice images of the target farmland to obtain a recent rice image set of the target farmland and extract its feature distribution representation; From a pre-built global feature library, call the source domain feature distributions corresponding to multiple training datasets from different source domains; Determine the distribution distance value between the feature distribution representation and the feature distribution of each source domain, and then use the minimum distribution distance value as the regional representation difference degree that reflects the overall difference between the current farmland and the existing source domains; The representative sample most similar to the feature distribution of the target farmland is called from the source domain corresponding to the regional characterization difference, and a hybrid training data is constructed together with the recent image set. The benchmark identification model of rice diseases and pests is fine-tuned based on the hybrid training data to generate an adaptive modulation identification model specifically for the target farmland. Based on the adaptive modulation recognition model, pest and disease identification is performed on the rice images subsequently input into the target farmland, and graded early warning information is generated based on the time series changes and severity of the disease based on the recognition results.
2. The method as described in claim 1, characterized in that, Specifically, calling source domain feature distributions corresponding to multiple different source domain training datasets from a pre-built global feature library includes: Obtain a pre-built global feature library and receive model update requests sent by the edge computing server of the target farmland; In response to the model update request, the source domain feature distributions corresponding to multiple different source domain training datasets are read from the pre-built global feature library; The read feature distributions from multiple source domains are sent to the edge computing server of the target farmland and cached in the local memory of the edge computing server.
3. The method as described in claim 1, characterized in that, Determining the distribution distance between the feature distribution representation and the feature distribution of each source domain, and then using the minimum distribution distance value as the regional representation difference degree reflecting the overall difference between the current farmland and the existing source domains, specifically includes: Obtain the feature distribution representation of the target farmland and the feature distributions of multiple source domains called from the global feature library; Calculate the distribution distance between the feature distribution representation and each source domain feature distribution one by one to obtain multiple distribution distance values; Extract the minimum distribution distance value from all the distribution distance values, and use the minimum distribution distance value as the regional characterization difference.
4. The method as described in claim 1, characterized in that, Specifically, the process of retrieving representative samples from the source domain corresponding to the regional representation difference degree that are most similar to the target farmland feature distribution and constructing mixed training data together with the recent image set includes: Locate the source domain corresponding to the regional characterization difference, and retrieve multiple representative samples that are most similar to the target farmland feature distribution from the original image library of the source domain; All the retrieved representative samples are merged with all the images in the recent image set to form an initial mixed training set; Specifically, sampling weights are assigned to each image in the recent image set based on the magnitude of the regional representation difference. The greater the regional representation difference, the higher the sampling weight. The sampling weights are then added to the initial mixed training set to obtain weighted mixed training data.
5. The method as described in claim 1, characterized in that, Based on the aforementioned mixed training data, the baseline identification model for rice diseases and pests is fine-tuned to generate an adaptive modulation identification model specifically for the target farmland. This specifically includes: Load the pre-trained benchmark identification model for rice diseases and pests, and initialize the classification layer parameters of the benchmark identification model; The mixed training data is input into the benchmark recognition model, and the loss contribution of each image in the recent image set and each representative sample is differentially weighted, and backpropagation and parameter update are performed. The updated baseline recognition model is used as an adaptive modulation recognition model specifically for the target farmland and deployed to the edge computing server of the target farmland.
6. The method as described in claim 1, characterized in that, The specific steps for identifying pests and diseases in subsequent rice images of the target farmland based on the adaptive modulation recognition model include: Receive real-time images of rice paddies collected subsequently from the target farmland; The rice image is input into the adaptive modulation recognition model to perform forward inference calculation; Obtain the pest and disease identification results output by the adaptive modulation identification model, wherein the identification results include at least quantitative indicators of disease category, confidence level, and disease severity.
7. The method as described in claim 1, characterized in that, Based on the time-series changes and disease severity of the identification results, the generation of graded early warning information specifically includes: The pest and disease identification results are stored in a time series database in chronological order to construct a time series of the severity of diseases in the target farmland; Based on the preset time window, determine the current level and trend of disease severity within the current time period; Based on the current level and trend of the severity of the disease, a preset graded early warning rule is matched to generate corresponding graded early warning information; The tiered early warning information is pushed to the user terminal.
8. A smart identification and early warning system for rice diseases and pests, characterized in that, include: The acquisition module is used to continuously acquire current rice images of the target farmland, obtain a recent rice image set of the target farmland, and extract its feature distribution representation; The processing module is used to call the source domain feature distributions corresponding to multiple different source domain training datasets from a pre-built global feature library; The processing module is also used to determine the distribution distance value between the feature distribution representation and each source domain feature distribution, and then use the minimum distribution distance value as the regional representation difference degree that reflects the overall difference between the current farmland and the existing source domains. The processing module is also used to call the representative sample most similar to the feature distribution of the target farmland from the source domain corresponding to the regional characterization difference, and construct mixed training data together with the recent image set. Based on the mixed training data, the benchmark identification model of rice diseases and pests is fine-tuned to generate an adaptive modulation identification model specifically for the target farmland. The execution module is used to identify pests and diseases in rice images subsequently input from the target farmland based on the adaptive modulation recognition model, and to generate graded early warning information based on the time series changes and severity of the diseases in the recognition results.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the intelligent identification and early warning method for rice diseases and pests as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the intelligent identification and early warning method for rice diseases and pests as described in any one of claims 1 to 7.