cognitive adaptive risk-averse evolutionary ant colony optimization

CN122902634APending Publication Date: 2026-10-13INNER MONGOLIA FINANCE AND ECONOMICS UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611326358.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-29
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

第一,传统蚁群算法在路径规划中收敛速度慢,初期搜索具有盲目性,且容易陷入局部最优解

Benefits of technology

实现感知与决策的深度融合:本发明通过自研Swin Transformer-RT-DETR目标检测模型实时识别农田病害分布,生成病害风险感知地图,并将风险信息直接嵌入蚁群算法的启发函数和信息素更新规则中,实现了从“智能感知”到“智能决策”的完整闭环,克服了传统路径规划方法缺乏环境感知能力的缺陷。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122902634A_ABST
    Figure CN122902634A_ABST
Patent Text Reader

Abstract

The application discloses a cognitive adaptive risk-avoidance evolutionary ant colony algorithm and relates to the field of agricultural image detection and path planning.The method comprises the following steps: obtaining a crop image, identifying disease types, positions and severities through a self-developed Swin Transformer-RT-DETR model, and generating a disease risk perception map; initializing ant colony parameters and constructing a rasterized environment map; constructing a heuristic function containing a risk-avoidance factor, taking into account path length and disease risk; designing a state transition probability rule, adopting an adaptive pheromone evaporation strategy and an update rule based on path length and risk cost; iterating until the convergence condition is met, and outputting a globally optimal operation path.The application combines deep learning target detection and improved ant colony algorithm, realizes an intelligent closed loop of farmland disease perception and unmanned aerial vehicle path planning, can effectively guide the unmanned aerial vehicle to preferentially cover high-risk disease areas, shorten the operation path, and improve pesticide utilization efficiency and precise pesticide application efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent detection and path planning technology for agricultural images, and in particular to a cognitive adaptive risk avoidance evolutionary ant colony algorithm. Background Technology

[0002] In the fields of smart agriculture and precision plant protection, autonomous drone operation path planning is a key technology for improving operational efficiency and reducing pesticide use. However, existing path planning methods have the following main shortcomings: First, traditional ant colony algorithms have slow convergence speeds in path planning, exhibit blindness in the initial search, and are prone to getting trapped in local optima. In complex farmland environments, due to factors such as uneven disease distribution and changes in ambient light, traditional ant colony algorithms struggle to dynamically adjust their search strategies based on real-time perceived disease risks.

[0003] Second, existing path planning methods lack the ability to perceive the distribution of agricultural disease risks. Most agricultural drones still fly along fixed routes (such as in a "bow" shape) for full coverage, which cannot achieve precise targeted application of pesticides based on the actual distribution of diseases in the field, resulting in low pesticide utilization and high operating costs.

[0004] Third, the parameters of traditional ant colony algorithms (such as pheromone evaporation coefficient and heuristic function weights) are usually fixed values, lacking the ability to adaptively adjust to environmental changes and task requirements. In dynamic farmland environments such as changes in light and weather, algorithms with fixed parameters are not robust enough and cannot guarantee the optimal balance between global search capability and convergence speed.

[0005] Fourth, among the existing deep learning-based methods for detecting farmland diseases, the YOLO series models have fast detection speeds but limited global feature modeling capabilities, while the DETR series models have high accuracy but their inference speeds are insufficient to meet the real-time operation requirements of UAVs.

[0006] Therefore, those skilled in the art have provided a cognitive adaptive risk avoidance evolutionary ant colony algorithm to address the problems mentioned in the background section. Summary of the Invention

[0007] To address the shortcomings of existing technologies, this invention provides a cognitive adaptive risk avoidance evolutionary ant colony algorithm, which solves the problems mentioned in the background.

[0008] To achieve the above objectives, this invention employs the following technical solution: a cognitive adaptive risk avoidance evolutionary ant colony algorithm, comprising the following steps: Step S1: Construct a disease risk perception map.

[0009] Crop images of the target farmland are acquired, including images of at least one crop among tomatoes, wheat, and rice. These crop images are then input into a pre-trained, self-developed Swin Transformer-RT-DETR target detection model to identify the type, location, and severity of diseases in the images. Based on the identification results, a disease risk perception map containing disease risk level information is generated.

[0010] Preferably, the self-developed Swin Transformer-RT-DETR object detection model replaces the original backbone network of RT-DETR with Swin Transformer as the backbone network. Swin Transformer generates pyramid features at different scales through hierarchical feature representation and a shifted window-based self-attention mechanism, while simultaneously applying shifted window self-attention for inter-window information interaction. The RT-DETR Transformer encoder receives the multi-scale fused features output by the Swin Transformer and maps them into a token sequence that can be processed by the decoder. The RT-DETR hybrid encoder converts the multi-scale features into an image feature sequence through intra-scale feature interaction (AIFI) and a cross-scale feature fusion module (CCFM).

[0011] Preferably, the Swin Transformer backbone network includes four feature extraction stages, with the resolution of the output feature maps of each stage being 1 / 4, 1 / 8, 1 / 16, and 1 / 32 of the input image, respectively, and the number of channels being 96, 192, 384, and 768, respectively. The number of Swin Transformer Blocks in each stage are 2, 2, 6, and 2, respectively, the window size is set to 7×7, and the shift window offset is (3,3).

[0012] Preferably, the feature maps at the four scales output by the Swin Transformer backbone network are passed through 1×1 convolutional layers to unify the number of channels to 256, forming a multi-scale feature pyramid, which is then input into the hybrid encoder of RT-DETR. The hybrid encoder of RT-DETR includes a 4-layer intra-scale feature interaction module (AIFI) and a 4-layer cross-scale feature fusion module (CCFM), and the output feature sequence has a dimension of 256.

[0013] Preferably, the Transformer decoder of the RT-DETR contains 6 decoding layers, each containing a multi-head self-attention module (8 attention heads), a cross-attention module (8 attention heads), and a feedforward network (1024 hidden layer dimensions), and adopts an IoU-aware query selection mechanism with an initial query count of 300.

[0014] Preferably, the disease risk level is comprehensively assessed based on the type and severity of the disease, and is divided into four levels: high-risk area, medium-risk area, low-risk area, and healthy area.

[0015] Preferably, the mapping relationship between the disease type and risk level in step S1 is as follows: Severe infection with late blight in tomatoes is considered high risk, moderate infection is considered medium risk, and mild infection is considered low risk. Severe early blight infection in tomatoes is considered high risk, moderate infection is considered medium risk, and mild infection is considered low risk. Severe infection with tomato leaf mold is considered medium risk, moderate infection is considered low risk, and mild infection is considered healthy. Severe or moderate infection with wheat stripe rust is considered high risk, while mild infection is considered medium risk. Severe infection of wheat leaf rust is considered high risk, moderate infection is considered medium risk, and mild infection is considered low risk. Severe infection of wheat stem rust is considered high risk, moderate infection is considered medium risk, and mild infection is considered low risk. Severe infection with rice blast is considered high risk, moderate infection is considered medium risk, and mild infection is considered low risk. Severe infection with rice sheath blight is considered high risk, moderate infection is considered medium risk, and mild infection is considered low risk.

[0016] Step S2: Initialize ant colony algorithm parameters.

[0017] The algorithm parameters are set as follows: ant count m, pheromone heuristic factor α, expected heuristic factor β, pheromone evaporation coefficient ρ, and maximum number of iterations T_max. Based on the disease risk perception map, a rasterized environment map is constructed, and obstacle areas and passable areas are marked in the rasterized environment map.

[0018] Preferably, the pheromone evaporation coefficient ρ adopts an adaptive adjustment strategy: ρ(t)=ρ_min-(ρ_max-ρ_min)×(t / T_max), where t is the current iteration number, ρ_min and ρ_max are the minimum and maximum values ​​of the pheromone evaporation coefficient, respectively, so that the algorithm maintains a large evaporation coefficient in the early stage of iteration to enhance the global search capability, and reduces the evaporation coefficient in the later stage of iteration to accelerate convergence.

[0019] Preferably, the path planning is set with a starting point S and an ending point T. The starting point S is the current docking position or charging station position of the agricultural drone, and the ending point T is the return position of the drone after the operation is completed or the entrance position of the next operation area. All ants start from the starting point S and terminate the search after reaching the ending point T.

[0020] Step S3: Construct a cognitive adaptive risk aversion heuristic function.

[0021] Based on the traditional ant colony algorithm heuristic function, a risk aversion factor is introduced to construct a cognitive adaptive risk aversion heuristic function η_ij(t): η_ij(t) = (1 / d_ij) (1 / (1+λ×R_j)) Where d_ij is the Euclidean distance from the current node i to the candidate node j, R_j is the risk level coefficient of the region where the candidate node j is located (R_j has a larger value in high-risk regions and a smaller value in healthy regions), λ is the risk aversion intensity coefficient, and β and γ are the distance heuristic factor and the risk heuristic factor, respectively.

[0022] Preferably, the risk level coefficient R_j is determined based on the disease risk perception map in step S1: high-risk area R_j=0.8-1.0, medium-risk area R_j=0.4-0.7, low-risk area R_j=0.1-0.3, and healthy area R_j=0.

[0023] The cognitive adaptive risk avoidance heuristic function enables ants to choose paths that, while taking into account path length, tend to pass through high-risk areas for precise pesticide application, thus achieving a dynamic balance between path length and disease risk.

[0024] Preferably, the risk aversion intensity coefficient λ ranges from 0.1 to 1.0, and more preferably from 0.3 to 0.7; the risk cost weight coefficient μ ranges from 0.1 to 0.5, and more preferably from 0.2 to 0.4. The minimum value ρ_min of the pheromone evaporation coefficient is preferably 0.05 to 0.15, and the maximum value ρ_max is preferably 0.25 to 0.45.

[0025] Step S4: Design state transition probability rules.

[0026] The transition probability of ant k choosing the next node j at node i. for: ) (η_ij(t)) (τ_is(t)) (η_is(t)) Where τ_ij(t) is the pheromone concentration on path (i,j), η_ij(t) is the value of the cognitive adaptive risk avoidance heuristic function, and allowed_k is the set of nodes that ant k can currently choose.

[0027] Preferably, a pseudo-random transition strategy is adopted: select (τ_ij(t)) with probability q_0. (η_ij(t)) The largest node j is selected using a roulette wheel method with a probability of (1-q_0). The q_0 is adaptively adjusted with the number of iterations t: q_0(t)=q_0_min+(q_0_max-q_0_min)×(1-t / T_max), so that the algorithm explores with a larger random probability in the early stage of iteration and develops with a larger deterministic probability in the later stage of iteration.

[0028] Step S5: Design an adaptive pheromone update strategy.

[0029] After each iteration, the pheromones on all paths are evaporated and updated:

[0030] in, Let be the pheromone increment released by ant k on path (i,j).

[0031] Preferably, the pheromone increment The path length L_k of ant k is determined by a combination of the path risk cost C_k and the total path length L_k of ant k.

[0032] Where Q is the pheromone constant, μ is the risk cost weighting coefficient, and C_k=Σ_{path}R_j is the sum of the risk level coefficients of each node the path passes through.

[0033] Preferably, a maximum and minimum pheromone concentration limit is introduced: τ_min≤τ_ij(t)≤τ_max, to prevent premature convergence due to excessively high pheromone concentration or stagnation of search due to excessively low pheromone concentration.

[0034] Preferably, the maximum and minimum pheromone concentration values ​​τ_max and τ_min are set as follows: τ_max = 1 / ((1-ρ)×L_best), τ_min = τ_max / (2×n), where L_best is the length of the current optimal path and n is the total number of nodes in the grid map.

[0035] Step S6: Evolutionary iteration and optimal path output.

[0036] Repeat steps S4 to S5 until the maximum number of iterations T_max is reached or the convergence condition is met. Record the optimal path in each iteration and output the globally optimal path as the optimal operation path for the agricultural drone.

[0037] Preferably, an elite strategy is introduced to further enhance the pheromone of the optimal path in each iteration, thereby accelerating the convergence of the algorithm.

[0038] Preferably, the convergence condition is that the rate of change of the optimal path length in N consecutive iterations is less than a preset threshold ε, where the preferred range of N is 5-10 and the preferred range of ε is 0.01-0.05.

[0039] This invention provides a cognitive adaptive risk avoidance evolutionary ant colony algorithm, which has the following advantages compared with existing technologies: Achieving deep integration of perception and decision-making: This invention uses a self-developed Swin Transformer-RT-DETR target detection model to identify the distribution of farmland diseases in real time, generate a disease risk perception map, and directly embed the risk information into the heuristic function and pheromone update rules of the ant colony algorithm, realizing a complete closed loop from "intelligent perception" to "intelligent decision-making", overcoming the shortcomings of traditional path planning methods that lack environmental perception capabilities.

[0040] Significantly improves the adaptive capability of path planning: This invention designs an adaptive adjustment strategy for cognitive adaptive risk avoidance heuristic function, adaptive pheromone evaporation coefficient and pseudo-random transition probability, enabling the algorithm to dynamically adjust its search behavior according to environmental changes and iterative process. While ensuring global search capability, it accelerates the convergence speed and enhances the robustness of the algorithm in dynamic farmland environments.

[0041] Achieving a dynamic balance between precise targeted application and risk avoidance: By introducing risk avoidance factors and risk cost weights, this invention enables the planned operation path to prioritize coverage of high-risk disease areas while avoiding unnecessary low-risk areas. Compared with traditional full-coverage flight methods, this can significantly shorten the operation path, reduce energy consumption, and improve pesticide utilization efficiency.

[0042] Superior algorithm performance: The self-developed Swin Transformer-RT-DETR algorithm integrates the global modeling capability of Transformer with the real-time detection capability of RT-DETR. Its accuracy is 95%, which is higher than YOLO and DETR. The processing speed is 45 frames per second. It provides high-quality real-time perception input for ant colony algorithm and ensures the accuracy and real-time performance of the entire system. Attached Figure Description

[0043] Figure 1 A schematic diagram of the overall process of the cognitive adaptive risk avoidance evolutionary ant colony algorithm; Figure 2 This is a schematic diagram of the structure of the self-developed Swin Transformer-RT-DETR target detection model. Detailed Implementation

[0044] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0045] Example 1 This embodiment provides a cognitive adaptive risk avoidance evolutionary ant colony algorithm, which is applied to the precise application path planning of pesticides for tomato diseases by agricultural drones.

[0046] Step 1: Construct a disease risk perception map.

[0047] First, using a high-definition camera and a portable spectrometer mounted on an agricultural drone, multi-angle images of diseases were collected in the target tomato growing area. The collected images covered different light conditions, different growth stages, and different types of diseases (including more than 5 diseases such as early blight, late blight, leaf mold, and leaf spot).

[0048] Then, the acquired images are input into the pre-trained self-developed Swin Transformer-RT-DETR object detection model. The backbone network of this model uses the Swin Transformer, which progressively reduces spatial resolution through hierarchical feature extraction in four stages. The output feature map sizes for each stage are 48×48×96, 24×24×192, 12×12×384, and 6×6×768, respectively, with 2, 2, 6, and 2 Swin Transformer Blocks in each stage. The number of multi-head self-attention heads for windowing is set to 3, 6, 12, and 24, respectively. The Swin Transformer employs alternating computation of window-based multi-head self-attention (W-MSA) and shifted-window multi-head self-attention (SW-MSA), with a window size of 7×7, achieving cross-window information interaction while maintaining linear computational complexity.

[0049] During model training, the AdamW optimizer was used, with an initial learning rate set to 1×10⁻⁶. -4The batch size was set to 16, and the training epochs were 300. A cosine annealing learning rate decay strategy was used. The loss function included classification loss and bounding box regression loss. Focal Loss was used for classification loss, and a combination of GIoU Loss and L1 Loss was used for regression loss. An early stopping strategy was employed during training: training was stopped when the validation set loss did not decrease for 20 consecutive epochs.

[0050] The test results show that the model in this embodiment has a detection accuracy of 96.2% for late blight of tomatoes (mAP@0.5), 94.8% for early blight, and 93.5% for leaf mold, with an overall average detection accuracy of 95.1%.

[0051] The multi-scale features output from the Swin Transformer are input into the hybrid encoder of RT-DETR. The hybrid encoder efficiently processes multi-scale features by decoupling intra-scale feature interaction (AIFI) and cross-scale feature fusion (CCFM). Subsequently, the Transformer decoder of RT-DETR optimizes the initialization of the target query through an IoU-aware query selection mechanism, and finally outputs the location, category, and confidence of each disease target in the image.

[0052] Based on the detection results, a disease risk perception map is generated. The detected disease areas are divided into four levels according to the type and severity of the disease: high risk (severe late blight infection), medium risk (moderate early blight infection), low risk (mild leaf mold infection), and healthy.

[0053] Steps 2 through 6: Execute the cognitive adaptive risk avoidance evolutionary ant colony algorithm path planning.

[0054] In a 30×30 rasterized environment map, the number of ants is set to m=50, and the maximum number of iterations T_max=200. The pheromone evaporation coefficient ρ is adaptively decreased from the initial value of 0.3 to 0.1. The risk aversion intensity coefficient λ is set to 0.5, and the risk cost weight coefficient μ is set to 0.3. The path planning start point S is set to the top left corner (0,0) of the raster map, and the end point T is set to the bottom right corner (29,29).

[0055] Each ant calculates its transition probability based on a cognitive adaptive risk avoidance heuristic function, prioritizing high-risk disease areas (R_j≈1.0) while avoiding obstacles. After each iteration, the pheromone is updated based on the total path length and path risk cost.

[0056] After 200 iterations, the algorithm outputs the globally optimal operation path, which, after smoothing, becomes a flight trajectory executable by the drone. This path, while covering all high-risk disease areas, is approximately 25%-35% shorter than the traditional "bow"-shaped full-coverage path, achieving precise targeted application of pesticides.

[0057] To verify the impact of different parameter values ​​on path planning performance, a parameter sensitivity experiment was conducted on a 30×30 grid map. When λ=0.3, the path length was shortened by about 30% but the coverage of high-risk areas was 85%; when λ=0.7, the coverage of high-risk areas reached 98% but the path length was shortened by only about 20%; when λ=0.5, the path length was shortened by about 25%-35% and the coverage of high-risk areas reached over 95%, achieving the optimal balance between path length and risk coverage.

[0058] Example 2 This embodiment provides a cognitive adaptive risk avoidance evolutionary ant colony algorithm, which is applied to the precise application path planning of agricultural drones for wheat diseases.

[0059] The wheat disease dataset was derived from LWDCD2020 (containing 9 types of diseases and healthy samples, totaling approximately 12,000 images) and the CGIAR dataset (containing three types of rust samples, totaling approximately 3,500 images). The two datasets were merged and divided into training, validation, and test sets in an 8:1:1 ratio. The self-developed Swin Transformer-RT-DETR model was trained and validated on these datasets to identify major wheat diseases such as stripe rust, leaf rust, and stem rust.

[0060] During model training, the data augmentation strategy is the same as in Example 1, and the training hyperparameters are set as follows: initial learning rate 5×10⁻⁶. -5 (Slightly smaller than Example 1 due to the smaller size of the wheat dataset), batch size 8, training rounds 200.

[0061] Unlike Example 1, wheat planting areas are typically larger and have relatively open terrain. Therefore, in this example, the rasterized environment map is set to 50×50, the number of ants m=80, and the maximum number of iterations T_max=300. To adapt to the needs of large-area operations, the risk avoidance intensity coefficient λ is set to 0.3 (relatively small), allowing the algorithm to optimize the total path length while covering diseased areas. The risk cost weight coefficient μ is set to 0.2.

[0062] During algorithm execution, a cognitive adaptive risk avoidance heuristic guides ants to prioritize traversing areas prone to stripe rust and leaf rust. Experimental results show that, with a disease coverage rate exceeding 92%, the planned operation path in this embodiment shortens the total path length by approximately 30% and reduces pesticide usage by approximately 20% compared to the traditional full-coverage method.

[0063] Example 3 This embodiment provides a cognitive adaptive risk avoidance evolutionary ant colony algorithm, which is applied to the precise application path planning of agricultural drones for rice diseases.

[0064] The rice disease dataset is derived from the PlantVillage core dataset (5,932 images covering 4 types of diseases), the AI ​​Challenger dataset (approximately 10,000 rice disease images), and specialized crop datasets such as IDADP and PDDB (approximately 8,000 images in total). The combined dataset contains approximately 24,000 images, divided into training, validation, and test sets in an 8:1:1 ratio. The dataset includes images of 18 diseases affecting 3 crops (tomato, wheat, and rice), and includes various disease samples under different lighting conditions.

[0065] In this embodiment, the self-developed Swin Transformer-RT-DETR model enhances its generalization ability through data augmentation strategies (including image rotation, mirroring, and random angle transformation). Due to the significant differences in lighting conditions and complex backgrounds in rice disease images, the data augmentation strategy, based on Embodiment 1, adds random Gaussian noise (standard deviation 0.01-0.05) and random occlusion (occlusion area accounting for 5%-20% of the total image area) to further improve the model's generalization ability. The training hyperparameters are the same as in Embodiment 1. The model processing speed reaches 45 frames per second, which can meet the needs of real-time UAV operations.

[0066] During the path planning phase, the rasterized environment map was set to 40×40, the number of ants m=60, and the maximum number of iterations T_max=250. The pheromone evaporation coefficient ρ adaptively decreased from the initial value of 0.35 to 0.12. The risk aversion intensity coefficient λ was set to 0.6, and the risk cost weight coefficient μ was set to 0.4.

[0067] Unlike Examples 1 and 2, rice diseases (such as rice blast and sheath blight) typically appear in the field as spots or patches, exhibiting obvious clustering characteristics. The cognitive adaptive risk avoidance heuristic function can effectively identify these clustered areas, guiding the drone to prioritize operations in disease-affected areas, achieving efficient and precise pesticide application. Experimental results show that, with a disease coverage rate exceeding 95%, the planned operation path in this example is approximately 32% shorter in total length and approximately 22% lower in pesticide usage compared to the traditional full-coverage method.

[0068] The above description is merely a preferred embodiment of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention. Structures, devices, and operating methods not specifically described or explained in this invention are implemented according to conventional methods in the art unless otherwise specified or limited.

Claims

1. A cognitive adaptive risk-avoidance evolutionary ant colony algorithm, characterized in that, Includes the following steps: Step S1: Obtain crop images of the target farmland, input the crop images into the pre-trained self-developed SwinTransformer-RT-DETR target detection model, identify the types, locations and severity of diseases in the images, and generate a disease risk perception map containing disease risk level information based on the identification results. Step S2: Initialize the ant colony algorithm parameters, set the number of ants m, pheromone heuristic factor α, expected heuristic factor β, pheromone volatility coefficient ρ, and maximum number of iterations T_max. Construct a rasterized environment map based on the disease risk perception map, and mark obstacle areas and passable areas in the rasterized environment map. Step S3: Construct a cognitive adaptive risk avoidance heuristic function η_ij(t). The heuristic function is determined by the path distance from the current node to the candidate node and the risk level coefficient of the area where the candidate node is located. A risk avoidance factor is introduced on the basis of the distance heuristic function of the traditional ant colony algorithm, so that the ants take into account both the path length and the disease risk level when selecting a path. Step S4: Design the state transition probability rules, the transition probability of ant k choosing the next node j at node i. It is determined based on the pheromone concentration τ_ij(t) along the path and the cognitive adaptive risk avoidance heuristic function η_ij(t); Step S5: After each iteration, adaptively evaporate and update the pheromones on all paths. Based on the total path length L_k of ant k and the path risk cost C_k represented by the sum of the risk level coefficients of each node along the path, comprehensively determine the pheromone increment. ; Step S6: Repeat steps S4 to S5 until the maximum number of iterations T_max is reached or the convergence condition is met. Record the optimal path in each iteration and output the global optimal path as the optimal operation path for the agricultural drone.

2. The cognitive adaptive risk avoidance evolutionary ant colony algorithm according to claim 1, characterized in that, The self-developed Swin Transformer-RT-DETR object detection model replaces the original backbone network of RT-DETR with Swin Transformer as the backbone network. Swin Transformer generates pyramid features at different scales through hierarchical feature representation and a shift-window-based self-attention mechanism, and applies shift-window self-attention to perform information interaction between windows. The Transformer encoder of RT-DETR receives the multi-scale fusion features output by Swin Transformer and maps them into a token sequence that can be processed by the decoder. The hybrid encoder of RT-DETR converts multi-scale features into image feature sequences through an intra-scale feature interaction module and a cross-scale feature fusion module.

3. The cognitive adaptive risk avoidance evolutionary ant colony algorithm according to claim 1, characterized in that, The disease risk level mentioned in step S1 is comprehensively assessed based on the type and severity of the disease, and is divided into four levels: high-risk area, medium-risk area, low-risk area, and healthy area. The risk level coefficient R_j of each grid node in the disease risk perception map is as follows: High-risk area: R_j = 0.8-1.0; Medium-risk area: R_j = 0.4-0.7; Low-risk area: R_j = 0.1-0.3; Healthy region: R_j=0.

4. The cognitive adaptive risk avoidance evolutionary ant colony algorithm according to claim 1, characterized in that, The formula for calculating the cognitive adaptive risk aversion heuristic function η_ij(t) mentioned in step S3 is as follows: η_ij(t)=(1 / d_ij) (1 / (1+λ×R_j)) Where d_ij is the Euclidean distance from the current node i to the candidate node j, R_j is the risk level coefficient of the region where the candidate node j is located, λ is the risk aversion intensity coefficient, β is the distance heuristic factor, and γ is the risk heuristic factor.

5. The cognitive adaptive risk avoidance evolutionary ant colony algorithm according to claim 1, characterized in that, The pheromone evaporation coefficient ρ mentioned in step S2 adopts an adaptive adjustment strategy, and its calculation formula is as follows: ρ(t)=ρ_min-(ρ_max-ρ_min)×(t / T_max) Where t is the current iteration number, and ρ_min and ρ_max are the minimum and maximum values ​​of the pheromone evaporation coefficient, respectively. This allows the algorithm to maintain a large evaporation coefficient in the early stages of iteration to enhance global search capabilities, and to reduce the evaporation coefficient in the later stages of iteration to accelerate convergence.

6. The cognitive adaptive risk avoidance evolutionary ant colony algorithm according to claim 1, characterized in that, The state transition probability mentioned in step S4 The calculation formula is: ) (η_ij(t)) (τ_is(t)) (η_is(t)) Where τ_ij(t) is the pheromone concentration on path (i,j), η_ij(t) is the value of the cognitive adaptive risk avoidance heuristic function, and allowed_k is the set of nodes that ant k can currently choose; The state transition probability adopts a pseudo-random transition strategy, selecting (τ_ij(t)) with probability q_0. (η_ij(t)) The largest node j is selected using a roulette wheel method with probability (1-q_0), where q_0 is adaptively adjusted with the number of iterations t. q_0(t)=q_0_min+(q_0_max-q_0_min)×(1-t / T_max) Where q_0_min and q_0_max are the minimum and maximum values ​​of q_0, respectively.

7. The cognitive adaptive risk avoidance evolutionary ant colony algorithm according to claim 1, characterized in that, The pheromone increment in step S5 The calculation formula is: Where Q is the pheromone constant, μ is the risk cost weight coefficient, L_k is the total path length of ant k, and C_k=Σ_{path}R_j is the sum of the risk level coefficients of each node the path passes through; The pheromone update also introduces a maximum and minimum pheromone concentration constraint: τ_min≤τ_ij(t)≤τ_max, where τ_min and τ_max are the minimum and maximum values ​​of the pheromone concentration, respectively.

8. The cognitive adaptive risk avoidance evolutionary ant colony algorithm according to claim 1, characterized in that, The convergence condition in step S6 is that the rate of change of the optimal path length in N consecutive iterations is less than a preset threshold ε, where N ranges from 5 to 10 and ε ranges from 0.01 to 0.

05. In step S6, an elite strategy is introduced to further enhance the pheromone of the optimal path in each iteration.

9. The cognitive adaptive risk avoidance evolutionary ant colony algorithm according to claim 1, characterized in that, The crop images include disease images of at least one of the following crops: tomatoes, wheat, and rice. The disease images are derived from at least one of the following datasets: PlantVillage, LWDCD2020, AI Challenger, IDADP, PDDB, and CGIAR. The datasets in total include images of 3 crops and 18 diseases.

10. A system based on a cognitive adaptive risk avoidance evolutionary ant colony algorithm, characterized in that, include: The image acquisition module is used to acquire crop images of the target farmland; The disease perception module is used to input the crop image into the self-developed Swin Transformer-RT-DETR target detection model to identify the type, location and severity of disease, and generate a disease risk perception map. The map building module is used to build a rasterized environmental map based on the disease risk perception map, and to mark obstacle areas and passable areas; The path planning module is used to execute steps S2 to S6 of the cognitive adaptive risk avoidance evolutionary ant colony algorithm as described in claim 1. The execution module is used to control the agricultural drone to perform precise pesticide application according to the optimal operation path.