A disease and pest control scheme generation method

By acquiring multimodal pest and disease information, and utilizing a large language model combined with a professional knowledge base and a text embedding model, risk level and cost-benefit analysis are conducted to generate personalized pest and disease control solutions. This solves the problem of insufficient accuracy and professionalism in existing solutions and improves the level of intelligence in pest and disease control.

CN122288909APending Publication Date: 2026-06-26XINJIANG UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XINJIANG UNIV OF SCI & TECH
Filing Date
2026-03-02
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing methods for generating pest and disease control solutions lack precision, professionalism, and personalization, making it difficult to respond quickly to large-scale or sudden pest and disease problems.

Method used

By acquiring multimodal pest and disease information, using a large language model combined with a professional knowledge base and a text embedding model, risk level and cost-benefit analysis are conducted, and weighted scoring and ranking are performed based on user preferences to generate personalized pest and disease control plans.

Benefits of technology

It has improved the accuracy, professionalism, and personalization of pest and disease control programs, and enhanced decision-making efficiency and intelligence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122288909A_ABST
    Figure CN122288909A_ABST
Patent Text Reader

Abstract

This invention provides a method for generating pest and disease control solutions, relating to the field of artificial intelligence technology. The method includes: acquiring pest and disease information, including textual descriptions of pest and disease symptoms, images of pests and diseases, and environmental data of the pest and disease occurrence location; retrieving multiple knowledge fragments most relevant to the pest and disease information from a knowledge base storing multi-source pest and disease expertise; inputting prompts containing pest and disease information and each knowledge fragment into a large language model to obtain multiple pest and disease control solutions output by the large language model; determining the risk level and cost-effectiveness of each pest and disease control solution, and weighting and summing the risk level and cost-effectiveness according to user preference weights to obtain a comprehensive score for each pest and disease control solution; and ranking and outputting each pest and disease control solution based on its comprehensive score. This invention can generate and recommend more accurate, professional, and personalized pest and disease control solutions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method for generating pest and disease control plans. Background Technology

[0002] Pest and disease control in fruit orchards is a crucial link in ensuring fruit yield and quality, and is vital to the agricultural economy. Traditional pest and disease control strategies typically rely on the accumulated experience of agricultural technicians or on consulting scattered technical manuals and research papers. This approach is highly dependent on human expertise, and the knowledge acquisition and decision-making process is inefficient, making it difficult to respond quickly to large-scale or sudden pest and disease problems.

[0003] In recent years, large language models have demonstrated powerful content generation capabilities. Existing technologies have greatly improved efficiency by generating pest and disease control solutions using large language models. However, large language models are general-purpose, and in the specialized field of pest and disease control, they may generate inaccurate or even erroneous solutions, lacking precision and professionalism. Furthermore, the generated solutions are also generic, making it difficult to meet the preferences of different users and lacking personalization. Summary of the Invention

[0004] This invention provides a method for generating pest and disease control plans, which addresses the technical problems of insufficient accuracy, professionalism, and personalization in existing pest and disease control plans.

[0005] This invention provides a method for generating pest and disease control plans, comprising: Acquire pest and disease information, which includes textual descriptions of pest and disease symptoms, images of pests and diseases, and environmental data of the location where pests and diseases occur. In a knowledge base storing multi-source pest and disease expertise, retrieve the multiple knowledge fragments most relevant to the pest and disease information; Input the prompt words containing the pest and disease information and each of the knowledge fragments into the large language model to obtain multiple pest and disease control schemes output by the large language model; The risk level and cost-effectiveness of the pest and disease control plan are determined respectively, and the risk level and cost-effectiveness are weighted and summed according to user preference weights to obtain the comprehensive score of the pest and disease control plan. The pest and disease control programs are ranked and output based on their comprehensive scores.

[0006] According to a method for generating pest and disease control plans provided by the present invention, before retrieving multiple knowledge fragments most relevant to the pest and disease information from a knowledge base storing multi-source pest and disease expertise, the method further includes: The professional knowledge of multi-source pests and diseases is semantically segmented into multiple knowledge fragments; The knowledge fragment is input into a pre-trained text embedding model to obtain the vector representation output by the text embedding model; The knowledge fragments and their corresponding vector representations are stored in the knowledge base, and an index is created for each vector representation.

[0007] According to a method for generating pest and disease control schemes provided by the present invention, before inputting the knowledge fragment into a pre-trained text embedding model to obtain the vector representation output by the text embedding model, the method further includes: The pre-trained text embedding model was further pre-trained using agricultural corpus. Construct a dataset of positive and negative sample pairs in the field of pests and diseases; The text embedding model, which has been further pre-trained, is fine-tuned using the positive and negative sample pairs dataset and a contrastive learning loss function.

[0008] According to a method for generating pest and disease control schemes provided by the present invention, the positive sample pairs include at least one of the following: Adjacent paragraphs within the same pest and disease technical document; The text obtained by randomly rewriting or replacing the same text with synonyms; Different translations of the same description of a disease or pest.

[0009] According to a method for generating pest and disease control schemes provided by the present invention, the negative sample pairs include at least one of the following: Descriptions of different diseases and pests; Descriptions of pests and diseases and descriptions unrelated to agricultural operations.

[0010] According to a method for generating pest and disease control plans provided by the present invention, the step of retrieving multiple knowledge fragments most relevant to the pest and disease information from a knowledge base storing multi-source pest and disease expertise includes: The pest and disease information is encoded into a query vector; A hierarchical navigable small-world graph index is constructed based on each of the aforementioned vector representations and their indices; Using the hierarchical navigable small-world graph index, an approximate nearest neighbor search is performed in the knowledge base to obtain the Top-K vector representations most similar to the query vector; Extract the top-K vectors to represent the corresponding knowledge fragments.

[0011] According to a method for generating pest and disease control plans provided by the present invention, the step of retrieving multiple knowledge fragments most relevant to the pest and disease information from a knowledge base storing multi-source pest and disease expertise includes: Input the images of the pests and diseases into the visual big model to obtain the names, severity, and typical symptoms of the pests and diseases output by the visual big model. Based on the textual description of the pest and disease symptoms, the name of the pest and disease, the severity and typical symptom textual description, and the environmental data, retrieve the multiple knowledge fragments most relevant to the pest and disease information from the knowledge base.

[0012] According to a method for generating pest and disease control schemes provided by the present invention, before inputting the pest and disease image into a large visual model to obtain the pest and disease name, severity, and typical symptom text description output by the large visual model, the method further includes: Construct a pest and disease image dataset containing pest and disease image samples and their annotations. The annotations include pest and disease category labels, affected part labels, severity level labels, and text descriptions of typical symptoms. Contrastive language-image pre-training of a large visual model using a general image-text pair dataset; The pre-trained visual model is fine-tuned using the pest and disease image dataset. The multi-tasks include pest and disease classification, severity regression, and symptom description generation.

[0013] According to a method for generating pest and disease control schemes provided by the present invention, after sorting and outputting the pest and disease control schemes based on their comprehensive scores, the method further includes: Obtain user evaluations of the effectiveness of the pest and disease control plan; The performance evaluation is then transformed into a reward signal for reinforcement learning; The policy network parameters of the large language model are fine-tuned using a near-end policy optimization algorithm based on the reward signal.

[0014] According to a method for generating pest and disease control schemes provided by the present invention, after sorting and outputting the pest and disease control schemes based on their comprehensive scores, the method further includes: Determine the correlation between the pest and disease control solutions adopted by the user and each of the knowledge fragments; The retrieval weights of each knowledge fragment are adjusted based on the relevance.

[0015] The pest and disease control plan generation method provided by this invention acquires multimodal pest and disease information, including text, images, and environmental data, enabling a large language model to make more comprehensive and accurate judgments on pest and disease conditions. By retrieving relevant knowledge fragments from a professional knowledge base and inputting them along with the pest and disease information into the large language model, the generated pest and disease control plan ensures that it possesses both the flexibility and language capabilities of the large model and is based on solid professional knowledge, significantly improving the professionalism and reliability of the plan. By performing risk level and cost-benefit analysis on the generated plan and combining it with user preferences for weighted scoring and ranking, the recommended results can meet the personalized needs of users. This invention can generate and recommend more accurate, professional, and personalized pest and disease control plans, improving the intelligence level and decision-making efficiency of pest and disease control. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating the method for generating pest and disease control solutions provided by the present invention.

[0018] Figure 2 This is a schematic diagram illustrating the principle of the pest and disease control scheme generation method provided by the present invention.

[0019] Figure 3 This is a schematic diagram of the device for generating pest and disease control solutions provided by the present invention.

[0020] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

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

[0022] The following is combined Figures 1 to 4 The present invention describes a method for generating pest and disease control solutions.

[0023] Figure 1 This is a flowchart illustrating the method for generating pest and disease control solutions provided by the present invention, as shown below. Figure 1 As shown, the method includes, but is not limited to, steps S1, S2, S3, S4 and S5.

[0024] Step S1: Obtain pest and disease information, which includes textual descriptions of pest and disease symptoms, images of pests and diseases, and environmental data of the location where pests and diseases occur.

[0025] Multimodal pest and disease information input by users can be obtained through user devices (such as mobile apps and web pages), including text descriptions of pest and disease symptoms input by users in natural language (such as "the surface of my pears has many black speckled mold spots"), images of pests and diseases taken by users that can intuitively reflect the characteristics of the diseases, and environmental data automatically collected by IoT sensors deployed in the pest and disease occurrence area (or orchard). Environmental data may include air temperature, air humidity, soil moisture, leaf humidity and temperature.

[0026] Step S2: In the knowledge base storing multi-source pest and disease expertise, retrieve the multiple knowledge fragments most relevant to the pest and disease information.

[0027] This invention will pre-build a knowledge base, which stores a massive amount of professional knowledge on pest and disease control from various sources. This knowledge base may include structured control manuals (such as "Color Atlas of Fruit Tree Pests and Diseases in a Certain Country"), unstructured scientific research papers, patent documents, and local planting experience datasets.

[0028] Retrieval refers to finding and extracting, based on the pest and disease information obtained in the previous step, several knowledge fragments that are semantically most relevant to the pest and disease information from the knowledge base. A knowledge fragment is a knowledge unit with complete semantics that is extracted from the original knowledge document.

[0029] Step S3: Input the prompt words containing the pest and disease information and each of the knowledge fragments into the large language model to obtain multiple pest and disease control schemes output by the large language model.

[0030] This invention combines pest and disease information with retrieved knowledge fragments into a structured prompt, which is then input into a large language model, such as ChatGLM-6B, a trained generative artificial intelligence model. Based on the prompt, which incorporates both on-site information and professional knowledge, the large language model generates multiple possible pest and disease control solutions.

[0031] Step S4: Determine the risk level and cost-effectiveness of the pest and disease control plan, and perform a weighted summation of the risk level and cost-effectiveness according to user preference weights to obtain a comprehensive score for the pest and disease control plan.

[0032] To help users make optimal decisions, this invention will conduct a quantitative assessment of the risk level and cost-effectiveness of each generated pest and disease control plan.

[0033] First, named entity recognition technology can be used to extract key entities such as control methods, recommended pesticides, dosage, and application timing from pest and disease control programs. For example, "Control method: chemical control; recommended pesticide: difenoconazole; dosage: diluted 1500 times; application timing: early stage of disease."

[0034] Then, based on the pesticide toxicity classification database and environmental assessment database, the toxicity level of the recommended agent (e.g., "difenoconazole" is classified as low toxicity) and its potential impact on non-target organisms and the environment are assessed, as well as its potential risk level to the pollinating bees and nearby water sources recorded in the orchard. The risk level can be severe, moderate, or moderate.

[0035] Based on local agricultural input price data and historical yield data, the cost of pesticides and manual spraying required to implement this pest and disease control program is estimated. Based on the historical damage and loss data of the pest and disease, the potential yield loss and economic benefits that may be avoided after successful control are predicted.

[0036] This invention allows users to set their own preference weights, such as whether users value environmental protection more (high risk level weight) or low cost more (high cost-effectiveness weight). The risk level and cost-effectiveness are weighted and summed using the user preference weights to calculate the comprehensive score of each pest and disease control plan.

[0037] Step S5: Sort and output the pest and disease control schemes according to the comprehensive scores of each scheme.

[0038] This invention sorts these solutions from highest to lowest based on their comprehensive scores and presents the sorted results to the user, allowing the user to intuitively see the most suitable and professional pest and disease control solution for their needs.

[0039] As described above, this invention acquires multimodal pest and disease information, including text, images, and environmental data, enabling the large language model to make more comprehensive and accurate judgments on pest and disease conditions. By retrieving relevant knowledge fragments from a professional knowledge base and inputting them into the large language model along with the pest and disease information, it ensures that the generated pest and disease control solutions possess both the flexibility and language capabilities of the large model, while also being based on solid professional knowledge, significantly improving the professionalism and reliability of the solutions. By conducting risk level and cost-benefit analysis on the generated solutions, and combining this with weighted scoring and ranking based on user preferences, the recommended results can meet the personalized needs of users. In summary, this method can generate and recommend more accurate, professional, and personalized pest and disease control solutions, improving the intelligence level and decision-making efficiency of pest and disease control.

[0040] In one embodiment, prior to step S2, the method of the present invention may further include: The professional knowledge of multi-source pests and diseases is semantically segmented into multiple knowledge fragments; The knowledge fragment is input into a pre-trained text embedding model to obtain the vector representation output by the text embedding model; The knowledge fragments and their corresponding vector representations are stored in the knowledge base, and an index is created for each vector representation.

[0041] First, the multi-source pest and disease knowledge can be cleaned, denoised, and standardized in format. This includes removing HTML tags, irrelevant tables, and special characters, and converting all documents to plain text. Then, text segmentation algorithms based on semantic boundary detection (such as mutation point detection using sentence vector similarity) can semantically segment the multi-source pest and disease knowledge (e.g., PDF papers, HTML web manuals) into multiple knowledge fragments. Semantic segmentation means breaking down long, unstructured documents into multiple independent, semantically relatively complete knowledge fragments. For example, a document about "pear black spot disease" can be segmented into multiple independent knowledge fragments such as "symptoms," "pathogens and disease patterns," "agricultural control measures," and "selection of chemical control agents." This step ensures fine-grained knowledge, laying the foundation for accurate retrieval.

[0042] Next, each knowledge fragment is input into a pre-trained text embedding model (such as an agricultural-optimized version of BGE-large-zh). The text embedding model can map each knowledge fragment into a vector representation in a high-dimensional space, with a vector representation dimension of at least 384, such as a 768-dimensional dense vector.

[0043] Finally, all knowledge fragments and their corresponding vector representations are stored in a knowledge base, which can be a vector database such as Milvus or ChromaDB, and indexes are created for these vector representations. The purpose of the index is to optimize the query structure, which can greatly improve the speed when performing similarity searches on massive amounts of vectors.

[0044] This invention transforms knowledge fragments into vector representations, changing the retrieval problem from string matching to vector similarity calculation in a high-dimensional space. This allows retrieval to move beyond literal interpretation and be performed at the semantic level. Even if the query and the knowledge fragment use completely different terms, as long as they describe the same or related concepts, their vectors will be spatially similar, thus enabling successful retrieval.

[0045] In one embodiment, before inputting the knowledge fragment into a pre-trained text embedding model to obtain the vector representation output by the text embedding model, the method of the present invention may further include: The pre-trained text embedding model was further pre-trained using agricultural corpus. Construct a dataset of positive and negative sample pairs in the field of pests and diseases; The text embedding model, which has been further pre-trained, is fine-tuned using the positive and negative sample pairs dataset and a contrastive learning loss function.

[0046] Before inputting knowledge fragments into the text embedding model, this invention can perform a two-stage optimization on the pre-trained text embedding model, making it more suitable for specialized tasks in the agricultural field. The pre-trained text embedding model is usually trained on a general large-scale corpus (such as Wikipedia), and it has general language understanding capabilities.

[0047] The first stage of optimization involves further pre-training the pre-trained text embedding model using agricultural corpora. Agricultural corpora can include Chinese agricultural science and technology literature, planting manuals, and pest and disease reports. Further training the general model with agricultural corpora allows it to learn agricultural terminology, expression habits, and contextual relationships. For example, it can understand the specific meanings of terms like "endotropic transport" and "optimal temperature for spore germination," transforming it from a linguistic generalist into an agricultural expert.

[0048] The second stage of optimization involves fine-tuning the pre-trained text embedding model using the aforementioned positive and negative sample pair dataset and a contrastive learning loss function. First, a positive and negative sample pair dataset targeting the pest and disease domain is constructed. Positive sample pairs consist of two semantically highly similar text pairs, while negative sample pairs consist of two semantically unrelated or distinct text pairs. The role of the contrastive learning loss function (such as InfoNCE) during training is to optimize model parameters so that the model's output vectors shorten the distance between positive sample pairs and widen the distance between negative sample pairs in the vector space, forcing the cosine similarity of positive sample pair vectors in the semantic space to approach 1, and the similarity of negative sample pairs to approach 0. Fine-tuning the model in this way can significantly improve its semantic discrimination ability within the specific domain of pest and disease.

[0049] Generally, generic text embedding models lack an understanding of the expertise and subtle semantic differences in agriculture, especially in the field of pest and disease control, resulting in low accuracy when performing semantic retrieval.

[0050] This invention enables a general text embedding model to master domain-specific and specialized terminology through continued pre-training, and further trains it into an expert in pest and disease control through contrastive learning fine-tuning. This two-stage optimization strategy allows the vector representation generated by the final text embedding model to more accurately capture the semantic core and subtle differences of pest and disease-related texts. Therefore, using this optimized text embedding model for knowledge retrieval significantly improves the accuracy of retrieval results, ensuring the most relevant and high-quality knowledge support for large language models, thereby fundamentally enhancing the professional level of the final generated solution.

[0051] In one embodiment, the positive sample pair of the present invention may include at least one of the following: Adjacent paragraphs within the same pest and disease technical document; The text obtained by randomly rewriting or replacing the same text with synonyms; Different translations of the same description of a disease or pest.

[0052] In order for text embedding models to learn what constitutes semantic similarity or high relevance, they need to be provided with high-quality positive sample pairs. This invention provides three types of positive sample pairs.

[0053] The first type is adjacent paragraphs in the same pest and disease technical document. This is based on the fact that technical documents are usually written with strong logical coherence, and adjacent paragraphs (for example, the paragraph describing the symptoms of the disease and the paragraph immediately following it describing the disease pattern) are highly related semantically. For example, "black spot disease damages leaves" and "leaves initially develop chlorotic yellow spots."

[0054] The second type is text obtained by randomly rewriting or replacing the same text with synonyms. For example, rewriting "spraying difenoconazole" as "applying difenoconazole as a spray" is different in wording but has the same meaning. This method can teach the model to ignore word changes and grasp the core meaning.

[0055] The third type is different translations of the same pest and disease description text. For example, translating a Chinese description into English and then back into Chinese will result in different expressions, but the core meaning remains the same. This also helps to enhance the semantic understanding robustness of the model.

[0056] This invention significantly enriches the diversity of positive sample pairs by providing multiple strategies for constructing them. From document structure (adjacent paragraphs) and lexical syntax (rewriting / replacement) to cross-linguistic representation (backtranslation), these methods offer semantically equivalent paradigms for the model from different dimensions. This enables the model to learn more robust and generalized semantic representations, ensuring that changes in textual expression do not affect its understanding of the core meaning. Consequently, it can make more accurate semantic similarity judgments when faced with various complex and varied queries and knowledge texts in the real world.

[0057] In one embodiment, the negative sample pair of the present invention may include at least one of the following: Descriptions of different diseases and pests; Descriptions of pests and diseases and descriptions unrelated to agricultural operations.

[0058] To enable text embedding models to learn what is semantically irrelevant or different, they need to be provided with high-quality negative sample pairs, especially difficult negative samples that are easily confused. This embodiment provides two types of negative sample pairs.

[0059] The first type is descriptive texts of different diseases and pests. For example, “symptoms of jujube rust” and “symptoms of pear black spot disease” constitute a negative sample pair. Although both belong to disease descriptions, they refer to completely different diseases in terms of specific semantics. This can train the model to have the ability to distinguish within the subcategories of diseases.

[0060] The second type consists of descriptive texts about pests and diseases and descriptive texts unrelated to agricultural operations. For example, "methods for controlling jujube rust" and a description of "orchard fertilization techniques" constitute a negative sample pair. Both belong to the category of agricultural technology, but the former is about "disease" and the latter is about "fertilization," with completely different semantic focuses. Such negative samples can be used to train models to distinguish between different agricultural topics.

[0061] The technical problem to be solved by the embodiments of the present invention is: how to construct negative sample pairs that can improve the fine-grained semantic discrimination ability of the model when fine-tuning the text embedding model for contrastive learning.

[0062] This invention forces the model to learn and understand subtle semantic differences within the agricultural domain, rather than simply distinguishing between agriculture and non-agriculture, by pairing descriptions of different diseases or disease descriptions with descriptions of other related agricultural operations. This training method significantly improves the model's fine-grained semantic discrimination ability in the target domain, enabling it to construct clear boundaries for different but related concepts in the vector space. This allows for more accurate elimination of interfering terms and improved accuracy of search results during retrieval tasks.

[0063] In one embodiment, step S2 of the present invention may further include: The pest and disease information is encoded into a query vector; A hierarchical navigable small-world graph index is constructed based on each of the aforementioned vector representations and their indices; Using the hierarchical navigable small-world graph index, an approximate nearest neighbor search is performed in the knowledge base to obtain the Top-K vector representations most similar to the query vector; Extract the top-K vectors to represent the corresponding knowledge fragments.

[0064] First, the pest and disease information input by the user can be encoded using an optimized text embedding model to obtain a query vector. Then, an efficient index structure of the Hierarchical Navigable Small World (HNSW) graph index is used to perform an approximate nearest neighbor search. The HNSW index is a graph-structured index containing multiple levels; the top level is a sparse graph with few nodes but long connection distances; the bottom level is a dense graph containing all vector nodes. By establishing long-distance connections between the top and bottom levels, the search path length between any two nodes is shortened. This structure allows for rapid localization of the target region at the top level during the search, followed by a more refined search by descending each level.

[0065] The specific search process is as follows: First, the query vector is compared with the nodes in the top layer to find the closest node as the entry point. Then, a greedy search is performed at the level of this entry point, continuously moving towards neighboring nodes closer to the query vector until a local optimum is found. Next, from this local optimum, the process moves to the next level and repeats the greedy search. Finally, the most refined search is performed at the bottom layer, and a candidate list containing the Top-K most similar vectors is dynamically maintained. This list is returned after the search is complete. Finally, based on the returned Top-K vectors most similar to the query vector, the corresponding knowledge fragments are extracted from the knowledge base. K is a preset positive integer, such as 5 or 10.

[0066] This invention achieves a significant leap in retrieval efficiency by employing an approximate nearest neighbor search algorithm based on the HNSW index. The algorithm's search complexity is far below linear (approaching logarithmic levels), allowing retrieval times in massive datasets to be controlled within milliseconds while maintaining very high retrieval accuracy. This ensures that even with the continuous growth of the knowledge base, it can still provide users with a smooth, real-time response, greatly improving the system's availability and scalability.

[0067] In one embodiment, step S2 of the present invention may further include: Input the images of the pests and diseases into the visual big model to obtain the names, severity, and typical symptoms of the pests and diseases output by the visual big model. Based on the textual description of the pest and disease symptoms, the name of the pest and disease, the severity and typical symptom textual description, and the environmental data, retrieve the multiple knowledge fragments most relevant to the pest and disease information from the knowledge base.

[0068] When pest and disease information includes images of pests and diseases, this invention inputs these images into a large-scale visual model. The model analyzes the images, extracts visual features of the pests and diseases, and converts these features into text descriptions. These text descriptions may include the name of the pest or disease, its severity, and typical symptoms. The large-scale visual model is a specially trained artificial intelligence model capable of understanding images and describing their content in natural language. It can be based on the Vision Transformer architecture.

[0069] For example, after a user uploads an image of a diseased leaf, the visual model may output: Disease / pest name: Pear black spot disease; Affected parts: Leaves and fruits; Severity: Level 4 (severe); Typical symptom description: Yellowish spots appear on the upper surface of the leaves, which later turn into black star-shaped mold spots; Black circular sunken lesions appear on the surface of the fruit.

[0070] Then, the professional, structured text descriptions generated by the visual big data model are integrated with the text descriptions of pest and disease symptoms and environmental data input by the user, and the most relevant knowledge fragments are found by searching the knowledge base.

[0071] This invention elevates pest and disease images from simple classification labels to rich, professional, and structured text descriptions of pest and disease names, severity levels, and typical symptoms through a large visual model, providing far more information than single classification labels. Integrating high-quality text descriptions into search queries greatly enriches the query's content and detail, enabling the retrieval of knowledge fragments with a higher degree of matching to the current pest and disease situation from the knowledge base. This significantly improves search accuracy and provides a solid information foundation for subsequently generating highly targeted prevention and control solutions.

[0072] In one embodiment, before inputting the pest and disease image into a large visual model to obtain the pest and disease name, severity, and typical symptom text description output by the large visual model, the method of the present invention may further include: Construct a pest and disease image dataset containing pest and disease image samples and their annotations. The annotations include pest and disease category labels, affected part labels, severity level labels, and text descriptions of typical symptoms. Contrastive language-image pre-training of a large visual model using a general image-text pair dataset; The pre-trained visual model is fine-tuned using the pest and disease image dataset. The multi-tasks include pest and disease classification, severity regression, and symptom description generation.

[0073] In order to enable the visual large model to have professional disease and pest diagnosis capabilities, it needs to be specially constructed and trained.

[0074] First, a large number of disease and pest image samples were collected and meticulously annotated by plant pathologists and senior agronomists. The annotation information can be multi-dimensional, including disease and pest category labels (such as "jujube rust" and "fragrant pear black spot"), affected part labels (leaves, fruits, branches), severity level labels (such as level 1-5, level 1 being the mildest and level 5 being the most severe, determined jointly by at least two experts based on the proportion of lesion area), and textual descriptions of typical symptoms (such as "yellow spots with curled edges appear on the upper surface of the leaves, and yellowish-brown to brown powdery spore masses grow on the corresponding areas on the lower surface").

[0075] Then, the Vision Transformer is used as the basic architecture. Its input layer is configured to segment the input pest and disease image into fixed-size image blocks and perform linear embedding, while adding positional encoding to preserve spatial information.

[0076] Next, the model undergoes two-stage training. The first stage is contrastive language-image pre-training, which involves pre-training the large visual model on a large-scale general image-text pair dataset (such as LAION-5B). The training objectives include image-text contrastive learning loss and image-to-text and text-to-image retrieval losses based on image-text pairs. This enables the model to learn the aligned representation of visual concepts with natural language descriptions, and to learn to match visual concepts in images (such as yellow, spots, and leaves) with words in natural language, thus establishing a basic visual-language alignment capability.

[0077] The second stage is multi-task fine-tuning, which involves fine-tuning the pre-trained visual model using the pest and disease image dataset built in the previous step. Multi-task means that the model needs to learn and optimize multiple objectives simultaneously during fine-tuning, which may include pest and disease classification tasks (learning to correctly classify pests), severity regression tasks (learning to accurately predict severity values ​​and outputting a continuous value from 1 to 5 to represent severity), and symptom description generation tasks (learning to generate accurate text descriptions based on images).

[0078] The symptom description generation task can adopt an encoder-decoder architecture. The encoder can be a pre-trained Vision Transformer, responsible for extracting visual features from the input pest and disease image. The decoder can be a Transformer decoder, which uses the visual features output by the encoder as conditions and employs a teacher-forced strategy to autoregressively generate natural language text describing typical symptoms of pests and diseases. The cross-entropy loss function can be used for optimization during training.

[0079] This invention employs a "pre-training + multi-task fine-tuning" strategy to efficiently construct comprehensive professional visual models. Large-scale, general-purpose pre-training endows the model with powerful basic visual understanding capabilities, avoiding the difficulties and overfitting risks of training from scratch. Building upon this foundation, multi-task fine-tuning is performed using professional datasets with multi-dimensional annotations, enabling the model to not only classify but also regress to assess severity and generate symptom descriptions. These three tasks mutually reinforce each other, resulting in a deeper and more comprehensive understanding of pests and diseases. The final model outputs structured diagnostic information containing category, severity, and description, providing high-quality input for accurate retrieval, far exceeding the capabilities of single-task models.

[0080] In one embodiment, after step S5, the method of the present invention may further include: Obtain user evaluations of the effectiveness of the pest and disease control plan; The performance evaluation is then transformed into a reward signal for reinforcement learning; The policy network parameters of the large language model are fine-tuned using a near-end policy optimization algorithm based on the reward signal.

[0081] This invention can first obtain users' evaluation of the implementation effect of the pest and disease control plan through certain methods (such as questionnaires pushed by an APP), such as user feedback labels such as effective, average effect, ineffective, or rating from 1 to 5 stars.

[0082] Next, these qualitative or quantitative user evaluations are transformed into reinforcement learning reward signals that machine learning can understand. Specifically, positive user evaluations of the recommendation scheme are used as positive reward signals, and negative evaluations are used as negative reward signals. For example, a "very effective" or "5-star" evaluation is transformed into a positive reward (e.g., +1), and a "ineffective" or "1-star" evaluation is transformed into a negative reward (e.g., -1).

[0083] Finally, a reinforcement learning algorithm with proximal policy optimization is employed to fine-tune the policy network parameters of the large language model, guided by the obtained reward signals. The policy network parameters determine the behavioral tendencies of the large language model when generating text. The purpose of fine-tuning is to make the large language model more inclined to generate solution types that have previously received positive rewards and proven to be effective, while reducing the generation of solution types that have previously received negative rewards.

[0084] This invention constructs an intelligent closed loop from recommendation to execution and then to feedback optimization by introducing a reinforcement learning mechanism based on user feedback. This allows the large language model to continuously learn from real-world application results. The application of a proximal policy optimization algorithm ensures that the model does not deviate too far from the original policy when learning new policies, thus ensuring the stability of the training process. This mechanism gives the large language model the ability to evolve; as it is used more frequently, it increasingly understands which prevention and control measures are truly effective in practice, thereby continuously improving the effectiveness of recommendation schemes and user satisfaction, achieving continuous self-optimization of the large language model.

[0085] In one embodiment, after step S5, the method of the present invention may further include: Determine the correlation between the pest and disease control solutions adopted by the user and each of the knowledge fragments; The retrieval weights of each knowledge fragment are adjusted based on the relevance.

[0086] After a user finally adopts a pest control plan, this invention determines the relevance between the adopted plan and the various knowledge fragments used to generate it. Then, based on this relevance, the retrieval weights of each knowledge fragment are adjusted, dynamically increasing the retrieval weights of knowledge fragments frequently referenced by adopted plans. This adjustment can directly affect the retrieval algorithm level; for example, by assigning a bonus coefficient to the scores of these knowledge fragments in the next similarity calculation.

[0087] This invention dynamically increases the retrieval weight of knowledge fragments referenced in successful application cases, making high-quality, highly practical knowledge, proven in practice, easier to discover and utilize in future searches. This is equivalent to establishing a survival-of-the-fittest mechanism within the knowledge base, which not only improves the quality of future search results but also indirectly enhances the quality of large language model generation solutions, forming a virtuous cycle of "knowledge use - effect feedback - knowledge optimization".

[0088] Based on the preceding text, we can conclude that... Figure 2 The complete technical solution of the present invention is shown.

[0089] The following provides examples of the application of this invention. Text descriptions of pest / disease names, severity levels, and typical symptoms. Example 1: Generation of a pest and disease control plan for jujube rust. In late July, a jujube farmer discovered that some of the jujube leaves were turning yellow. He uploaded several photos of the leaves with the front side showing no green and the back side showing a brown powdery substance through an app.

[0090] The visual model accurately identified the disease as jujube rust, with a severity level of 3 (medium), and generated text descriptions of typical symptoms. The current average temperature in the orchard is 28℃, and the relative humidity is 85%.

[0091] Based on this, knowledge fragments such as "jujube rust is prone to outbreak in high humidity environments" and "the combination of difenoconazole and triadimefon can improve control efficacy" were retrieved from the knowledge base. The pest and disease control plan generated by the large language model includes agricultural measures (orchard sanitation, improved ventilation) and chemical measures (two recommended pesticides).

[0092] If the user prioritizes environmental protection, agricultural measures are recommended, with detailed explanations of their environmental friendliness and slow but persistent disease control characteristics. Feedback from users who adopted these measures was positive.

[0093] Example 2: Generation of a pest and disease control plan for scab disease in fragrant pears. A pear grower discovered black mold spots on the surface of the fruit. He entered a text description of the disease and pest symptoms and uploaded a photo of the fruit.

[0094] The visual big data model identified the disease as pear scab, with a severity level of 4. Retrieved knowledge fragments indicated that therapeutic agents should be used at this stage. The large language model generated a disease control plan containing "flusilazole" and "cyproconazole".

[0095] A cost-benefit analysis revealed that the local price of cyazofamid was only 60% of that of flusilazole, while their efficacy was similar. Given the user's preference for the lowest cost, the cyazofamid regimen was strongly recommended as the first choice, and calculations showed that this regimen could recover 85% of the economic losses. The user adopted and confirmed the cost-effectiveness of this regimen.

[0096] Example 3: Generation of pest and disease control plans for complex pests and diseases An orchard owner discovered that his apple leaves had both insect bite holes and lesions, a complex situation. He uploaded pictures and described the leaves as having "insect bites and yellow spots."

[0097] The visual model identified the damage caused by the "golden-striped leafminer moth" and the symptoms of "apple brown spot disease." It also identified the need to "avoid using insecticides highly toxic to bees to prevent impacting pollination in the orchard" and to "consider fungicides that can treat both diseases simultaneously."

[0098] The large language model recommends using low-toxicity insecticides (such as abamectin) to control pests, and combining them with mancozeb to prevent the spread of diseases. It also emphasizes that application should avoid peak bee activity periods. The risk assessment found the overall risk of the solution to be low, meeting the user's multiple objectives.

[0099] The following describes the pest and disease control scheme generation device provided by the present invention. The pest and disease control scheme generation device described below and the pest and disease control scheme generation method described above can be referred to in correspondence.

[0100] like Figure 3 As shown, the pest and disease control scheme generation device provided by the present invention includes: The acquisition module is used to acquire pest and disease information, which includes text descriptions of pest and disease symptoms, images of pests and diseases, and environmental data of the location where pests and diseases occur. The retrieval module is used to retrieve multiple knowledge fragments that are most relevant to the pest information from a knowledge base that stores multi-source pest and disease expertise. The input module is used to input prompt words containing the pest and disease information and each of the knowledge fragments into the large language model to obtain multiple pest and disease control schemes output by the large language model. The scoring module is used to determine the risk level and cost-effectiveness of the pest and disease control plan, and to perform a weighted summation of the risk level and cost-effectiveness according to user preference weights to obtain a comprehensive score for the pest and disease control plan. The output module is used to sort and output the pest and disease control schemes according to the comprehensive score of each scheme.

[0101] Figure 4This example illustrates the physical structure of an electronic device, which may include a processor, a communication interface, memory, and a communication bus. The processor, communication interface, and memory communicate with each other via the communication bus. The processor can invoke logical instructions from the memory to execute a method for generating pest and disease control plans. This method includes: acquiring pest and disease information, including textual descriptions of pest and disease symptoms, images of pests and diseases, and environmental data of the pest and disease occurrence location; retrieving multiple knowledge fragments most relevant to the pest and disease information from a knowledge base storing multi-source pest and disease expertise; inputting prompts containing pest and disease information and each knowledge fragment into a large language model to obtain multiple pest and disease control plans output by the large language model; determining the risk level and cost-effectiveness of each pest and disease control plan, and weighting and summing the risk level and cost-effectiveness according to user preference weights to obtain a comprehensive score for the pest and disease control plan; and ranking and outputting the pest and disease control plans based on their comprehensive scores.

[0102] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0103] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the pest and disease control scheme generation method provided by the above methods. The method includes: acquiring pest and disease information, including text descriptions of pest and disease symptoms, images of pests and diseases, and environmental data of the pest and disease occurrence location; retrieving multiple knowledge fragments most relevant to the pest and disease information from a knowledge base storing multi-source pest and disease expertise; inputting prompt words containing pest and disease information and each knowledge fragment into a large language model to obtain multiple pest and disease control schemes output by the large language model; determining the risk level and cost-effectiveness of each pest and disease control scheme, and weighting and summing the risk level and cost-effectiveness according to user preference weights to obtain a comprehensive score for the pest and disease control scheme; and ranking and outputting each pest and disease control scheme according to the comprehensive score of each scheme.

[0104] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a method for generating pest and disease control schemes provided by the above-described methods. This method includes: acquiring pest and disease information, including textual descriptions of pest and disease symptoms, images of pests and diseases, and environmental data of the pest and disease occurrence location; retrieving multiple knowledge fragments most relevant to the pest and disease information from a knowledge base storing multi-source pest and disease expertise; inputting prompts containing pest and disease information and each knowledge fragment into a large language model to obtain multiple pest and disease control schemes output by the large language model; determining the risk level and cost-effectiveness of each pest and disease control scheme, and weighting and summing the risk level and cost-effectiveness according to user preference weights to obtain a comprehensive score for the pest and disease control schemes; and ranking and outputting each pest and disease control scheme according to its comprehensive score.

[0105] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0106] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating a pest and disease control plan, characterized in that, include: Acquire pest and disease information, which includes textual descriptions of pest and disease symptoms, images of pests and diseases, and environmental data of the location where pests and diseases occur. In a knowledge base storing multi-source pest and disease expertise, retrieve the multiple knowledge fragments most relevant to the pest and disease information; Input the prompt words containing the pest and disease information and each of the knowledge fragments into the large language model to obtain multiple pest and disease control schemes output by the large language model; The risk level and cost-effectiveness of the pest and disease control plan are determined respectively, and the risk level and cost-effectiveness are weighted and summed according to user preference weights to obtain the comprehensive score of the pest and disease control plan. The pest and disease control programs are ranked and output based on their comprehensive scores.

2. The method for generating a pest and disease control plan according to claim 1, characterized in that, Before retrieving the multiple knowledge fragments most relevant to the pest information from the knowledge base storing multi-source pest and disease expertise, the process also includes: The professional knowledge of multi-source pests and diseases is semantically segmented into multiple knowledge fragments; The knowledge fragment is input into a pre-trained text embedding model to obtain the vector representation output by the text embedding model; The knowledge fragments and their corresponding vector representations are stored in the knowledge base, and an index is created for each vector representation.

3. The method for generating pest and disease control plans according to claim 2, characterized in that, Before inputting the knowledge fragment into a pre-trained text embedding model to obtain the vector representation output by the text embedding model, the method further includes: The pre-trained text embedding model was further pre-trained using agricultural corpus. Construct a dataset of positive and negative sample pairs in the field of pests and diseases; The text embedding model, which has been further pre-trained, is fine-tuned using the positive and negative sample pairs dataset and a contrastive learning loss function.

4. The method for generating a pest and disease control plan according to claim 3, characterized in that, The positive sample pair includes at least one of the following: Adjacent paragraphs within the same pest and disease technical document; The text obtained by randomly rewriting or replacing the same text with synonyms; Different translations of the same description of a disease or pest.

5. The method for generating a pest and disease control plan according to claim 3, characterized in that, The negative sample pair includes at least one of the following: Descriptions of different diseases and pests; Descriptions of pests and diseases and descriptions unrelated to agricultural operations.

6. The method for generating a pest and disease control plan according to claim 2, characterized in that, The process of retrieving multiple knowledge fragments most relevant to the pest and disease information from a knowledge base storing multi-source pest and disease expertise includes: The pest and disease information is encoded into a query vector; A hierarchical navigable small-world graph index is constructed based on each of the aforementioned vector representations and their indices; Using the hierarchical navigable small-world graph index, an approximate nearest neighbor search is performed in the knowledge base to obtain the Top-K vector representations most similar to the query vector; Extract the top-K vectors to represent the corresponding knowledge fragments.

7. The method for generating a pest and disease control plan according to claim 1, characterized in that, The process of retrieving multiple knowledge fragments most relevant to the pest and disease information from a knowledge base storing multi-source pest and disease expertise includes: Input the images of the pests and diseases into the visual big model to obtain the names, severity, and typical symptoms of the pests and diseases output by the visual big model. Based on the textual description of the pest and disease symptoms, the name of the pest and disease, the severity and typical symptom textual description, and the environmental data, retrieve the multiple knowledge fragments most relevant to the pest and disease information from the knowledge base.

8. The method for generating a pest and disease control plan according to claim 7, characterized in that, Before inputting the pest and disease image into the visual large model to obtain the pest and disease name, severity, and typical symptom text description output by the visual large model, the process also includes: Construct a pest and disease image dataset containing pest and disease image samples and their annotations. The annotations include pest and disease category labels, affected part labels, severity level labels, and text descriptions of typical symptoms. Contrastive language-image pre-training of a large visual model using a general image-text pair dataset; The pre-trained visual model is fine-tuned using the pest and disease image dataset. The multi-tasks include pest and disease classification, severity regression, and symptom description generation.

9. The method for generating a pest and disease control plan according to claim 1, characterized in that, After ranking and outputting the pest and disease control programs based on their comprehensive scores, the process further includes: Obtain user evaluations of the effectiveness of the pest and disease control plan; The performance evaluation is then transformed into a reward signal for reinforcement learning; The policy network parameters of the large language model are fine-tuned using a near-end policy optimization algorithm based on the reward signal.

10. The method for generating a pest and disease control plan according to claim 1, characterized in that, After ranking and outputting the pest and disease control programs based on their comprehensive scores, the process further includes: Determine the correlation between the pest and disease control solutions adopted by the user and each of the knowledge fragments; The retrieval weights of each knowledge fragment are adjusted based on the relevance.