Pest situation monitoring and identification method and apparatus based on few-shot learning, and device and medium

By using insect surveillance visual data collection device and image acquisition equipment to obtain pest images in the insect surveillance monitoring system, combining meta-learning algorithms and self-attention mechanisms, the insect surveillance detection model is trained, which solves the problem of difficulty in obtaining pest samples and insufficient number, and achieves high-accuracy new species pest identification and monitoring.

WO2025112071A1PCT designated stage expired Publication Date: 2025-06-05SHANGHAI ZUOANXINHUI ELECTRONICS TECH +1

Patent Information

Application Number
PCT/CN2023/135991
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-27
Filing Date
2023-12-01
Publication Date
2025-06-05

AI Technical Summary

Technical Problem

In the prior art, machine learning systems are not effective in identifying new species of pest pests due to difficulties in obtaining pests and insufficient sample sizes.

Method used

The insect visual data collection device is used to capture pests, and the pest images are obtained through the image acquisition device, feature extraction and labeling are performed to form the target data set. Then, the insect situation detection model is trained using meta-learning algorithms and self-attention mechanisms, and the model parameters are optimized to identify new species of pests.

Benefits of technology

Even with small sample sizes, high accuracy can be maintained and new species pests can be effectively identified and monitored, solving the problems of difficulty in obtaining samples and insufficient number.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023135991_05062025_PF_FP_ABST
    Figure CN2023135991_05062025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a pest situation monitoring and identification method and apparatus based on few-shot learning, and a device and a medium. The method comprises: using a pest situation visual data collection apparatus to capture pests, and acquiring pest images by means of an image collection device; performing feature extraction on the pest images to determine new-species pest features, and marking same, so as to obtain a target data set; training a pest situation detection model on the basis of the target data set and a meta-learning algorithm, optimizing initialization parameters of the pest situation detection model, and obtaining a target pest situation detection model; and using the target pest situation detection model to monitor and identify a new-species pest. In the embodiments of the present application, the pest situation visual data collection apparatus is used to induce and capture pests, and when new-species pests are detected, a few-shot learning algorithm is used to perform model training on a few new shots. In the technical solution, meta-learning and a self-attention mechanism are combined to realize effective pest type monitoring and identification, and a high accuracy can be maintained even when there is only a small number of shots.
Need to check novelty before this filing date? Find Prior Art

Description

Few-sample learning-based insect monitoring and identification method, device, equipment, and medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on November 27, 2023, with application number 202311599370.7, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of insect pest monitoring, and in particular to a method, device, equipment and medium for insect monitoring and identification based on few-sample learning. Background Art

[0003] Crop pests and diseases are among the world's major agricultural disasters. Failure to promptly identify and control them can lead to significant losses in agricultural production. Accurately identifying the types of field pests is crucial for pest prevention and control, as well as for monitoring and forecasting. Related technologies use machine learning algorithms to train pest recognition models, which can then be used to identify pest species.

[0004] However, the inventors discovered that the related art has at least the following technical problems:

[0005] Because collecting pest samples often requires specialized equipment at designated locations and is subject to significant randomness, the field lacks sufficient pest samples. Machine learning systems in related technologies often rely on large amounts of data for feature learning, but for new pest species, this data often lacks. Therefore, effective learning based on limited pest data has become a challenge.

[0006] Summary of the Invention

[0007] One objective of the present application is to provide a pest monitoring and identification method, device, equipment, and medium based on few-shot learning, at least to address the difficulties in obtaining pest samples and the insufficient number of pest samples. The present application aims to provide a pest monitoring and identification method based on few-shot learning. This method uses a pest visual data collection device to capture pests and obtain pest images using an image acquisition device. Feature extraction is performed on the pest images to identify features of new pest species and label them to obtain a target dataset. A pest detection model is trained based on the target dataset and a meta-learning algorithm, optimizing initialization parameters of the pest detection model to obtain a target pest detection model. The target pest detection model is then used to monitor and identify new pest species. In this embodiment, a target pest detection model is constructed to monitor and identify new pest species. Pest samples are collected using the light from the pest visual data collection device to induce and capture pests. When a new pest species is detected, a few-shot learning algorithm is used to train the model on a small number of new samples. The technical solution of this embodiment combines meta-learning and a self-attention mechanism to achieve effective pest species monitoring and identification, maintaining high accuracy even with a small sample size.

[0008] To achieve the above objectives, some embodiments of the present application provide the following aspects:

[0009] In a first aspect, some embodiments of the present application further provide a method for insect monitoring and identification using few-sample learning, the method comprising:

[0010] Use insect visual data collection devices to capture pests, and obtain pest images through image acquisition equipment;

[0011] Extract features from pest images to determine the characteristics of new pest species and mark them to obtain the target data set;

[0012] Training an insect detection model based on the target data set and a meta-learning algorithm, optimizing initialization parameters of the insect detection model and obtaining a target insect detection model;

[0013] The target insect detection model is used to monitor and identify new species of pests.

[0014] In a second aspect, some embodiments of the present application further provide an insect monitoring and identification device using few-sample learning, the device comprising:

[0015] The pest image acquisition module is configured to capture pests using an insect visual data collection device and acquire pest images using an image acquisition device;

[0016] The data set acquisition module is configured to extract features from pest images to determine features of new pest species and mark them to obtain a target data set;

[0017] a target insect detection model determination module configured to train the insect detection model based on the target data set and the meta-learning algorithm, optimize the initialization parameters of the insect detection model, and obtain the target insect detection model;

[0018] The pest monitoring and identification module is configured to monitor and identify new species of pests using the target insect detection model.

[0019] In a third aspect, some embodiments of the present application further provide a computer device, comprising:

[0020] one or more processors; and

[0021] A memory storing computer program instructions, wherein the computer program instructions, when executed, cause the processor to perform the insect monitoring and identification method based on few-sample learning as described above.

[0022] In a fourth aspect, some embodiments of the present application further provide a computer-readable medium having computer program instructions stored thereon, which can be executed by a processor to implement the insect monitoring and identification method based on few-sample learning as described above.

[0023] Compared with the related art, the solution provided in the embodiment of the present application is to capture pests by using an insect visual data collection device, and obtain pest images through an image acquisition device; feature extraction is performed on the pest images to determine the characteristics of new species of pests and mark them to obtain a target data set; the insect detection model is trained based on the target data set and the meta-learning algorithm, the initialization parameters of the insect detection model are optimized and a target insect detection model is obtained; the target insect detection model is used to monitor and identify new species of pests. Using the technical solution of the embodiment of the present application, a target insect detection model for monitoring and identifying the types of new species of pests is constructed; the light of the insect visual data collection device is used to induce and capture pests to collect samples, and when a new species of pest is detected, a small number of new samples will be trained on the model using a few-sample learning algorithm. The technical solution of the embodiment of the present application combines meta-learning and self-attention mechanisms to achieve effective pest species monitoring and identification, and can maintain high accuracy even when the sample size is small. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] FIG1 is a flow chart of a method for monitoring and identifying insect infestations using few-sample learning according to a first embodiment of the present application;

[0025] FIG2 is a flow chart of a method for monitoring and identifying insect infestations using few-sample learning provided in Example 2 of the present application;

[0026] FIG3 is a schematic diagram of the structure of an insect monitoring and identification device using few-sample learning according to a third embodiment of the present application;

[0027] FIG4 is a schematic diagram of the structure of a computer device provided in Example 4 of the present application. DETAILED DESCRIPTION

[0028] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0029] The technical solutions provided by the embodiments of the present application are described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0030] Example 1

[0031] FIG1 is a flow chart of the insect monitoring and identification method using few-sample learning provided in Example 1 of the present application. As shown in FIG1 , the process specifically includes the following steps:

[0032] In step S101, pests are captured using an insect visual data collection device, and pest images are acquired using an image acquisition device.

[0033] Pests can refer to harmful insects that damage plant growth. Accurately identifying pest species is crucial for pest control. However, pest samples often require specialized equipment to be collected at designated locations, resulting in a small number of collected samples due to various random factors. Furthermore, training pest models requires a large amount of data. Therefore, embodiments of the present application provide a method for pest monitoring and identification based on few-shot learning.

[0034] By adopting the technical solution of the embodiment of the present application, an insect visual data collection device is used to induce pests and obtain a sample data set; when a new species is detected, an insect detection model is trained based on a small number of sample pest images and a meta-learning algorithm to obtain a target insect detection model; the target insect detection model is used to monitor and identify new species of pests, and a high accuracy rate can be maintained even when the sample size is small.

[0035] In some embodiments of the present application, the method of capturing pests using an insect visual data collection device and obtaining pest images using an image acquisition device includes but is not limited to steps A1-A2:

[0036] In step A1: deploy an insect visual data collection device in a target area, and use the insect visual data collection device to attract and capture pests to obtain pest samples; the insect visual data collection device includes an intelligent insect monitoring light.

[0037] In step A2: an image acquisition device is used to regularly acquire images of the pest samples in the insect visual data collection device to determine pest images.

[0038] In this embodiment, an intelligent insect monitoring light is used as a visual data collection device for insect infestation, and a CCD camera is used as an image acquisition device to obtain images of insect pests. The intelligent insect monitoring light is deployed in the target area, attracting the pests with light and capturing them through an electric grid. A high-resolution CCD camera is used to periodically capture images of the pests within the intelligent insect monitoring light.

[0039] In this solution, the light of the intelligent insect monitoring lamp is used to attract pests and the pests are captured through the electric grid. A large number of pests can be captured in a short time, improving the efficiency of sample collection.

[0040] In step S102, feature extraction is performed on the pest image to determine the features of the new species of pests and mark them to obtain a target data set.

[0041] The captured pest images are then subjected to feature extraction and compared with existing feature data. Features that differ significantly from the existing feature data are identified as new features of the new pest species. The existing feature data may refer to feature data of known pest species. The features of the new pest species are labeled to obtain a sample dataset of the new pest species.

[0042] In the embodiment of the present application, new species of pests are marked and applied to the subsequent few-shot meta-learning algorithm, which can reduce costs and realize the identification of new species of pests based on the original model.

[0043] In some embodiments of the present application, the embodiments of the present application may also pre-process the pest image before extracting features from the pest image. The pre-processing includes but is not limited to image enhancement processing of the pest image, and the quality of the pest image is improved by image processing technology, so that the feature extraction is more accurate.

[0044] In step S103, the insect detection model is trained based on the target data set and the meta-learning algorithm, the initialization parameters of the insect detection model are optimized, and the target insect detection model is obtained.

[0045] Meta-learning refers to leveraging previous knowledge and experience to guide the learning of new tasks, enabling the network to learn. It is a common approach for addressing the few-shot learning problem. In meta-learning, the training unit is the task, typically divided into two types: training tasks and test tasks. Training tasks involve preparing many subtasks to learn optimal hyperparameters. Test tasks use the hyperparameters learned from the training tasks to train specific tasks.

[0046] In the embodiment of the present application, a sample data set of known pest species is used to form multiple subtasks, and the multiple subtasks are used to learn to obtain a hyperparameter; the hyperparameter is used as the initialization parameter of the new species pest infestation detection model, and the new species pest identification task is trained using the hyperparameter, the initialization parameter of the new species pest infestation detection model is optimized, and the target pest infestation detection model is obtained.

[0047] In step S104, the target insect detection model is used to monitor and identify new species of pests.

[0048] After determining a target pest detection model capable of identifying and detecting new pest species, the target pest detection model is used to monitor and identify the new pest species. For example, an intelligent pest monitoring light is used to capture pest images, which are then subjected to feature extraction. The extracted pest images are then input into the target pest detection model for detection and identification, ultimately determining the pest species corresponding to the images.

[0049] In an alternative embodiment of the present application, the target pest detection model is used to identify pests, enabling timely intervention upon the presence of new pest species. The target pest detection model can effectively identify and monitor pest species, maintaining high accuracy even when sample sizes are limited.

[0050] The embodiment of the present application provides a method for monitoring and identifying pests based on few-sample learning, which uses a pest visual data collection device to capture pests and obtain pest images through an image acquisition device; performs feature extraction on the pest images to determine the characteristics of new species of pests and labels them to obtain a target data set; trains an insect detection model based on the target data set and a meta-learning algorithm, optimizes the initialization parameters of the insect detection model and obtains a target insect detection model; and uses the target insect detection model to monitor and identify new species of pests. Using the technical solution of the embodiment of the present application, an insect visual data collection device is used to induce and capture pests to collect samples. When a new species of pest is detected, a few-sample learning algorithm is used to train a model on a small number of new samples; the target insect detection model obtained by training can effectively identify and monitor pest species, and maintain a high accuracy rate even when the sample size is scarce.

[0051] Example 2

[0052] FIG2 is a flow chart of the insect monitoring and identification method using few-sample learning provided in Example 2 of the present application. As shown in FIG2 , the method specifically includes the following steps:

[0053] In step S201, pests are captured using an insect visual data collection device, and pest images are acquired using an image acquisition device.

[0054] In step S202, feature extraction is performed on the pest image using a deep learning model to determine a target pest image after pest feature extraction.

[0055] A deep learning model is used to extract features from pest images, thereby weighting the features of the pest images. These features include, but are not limited to, color, shape, and texture. For example, in the embodiments of this application, the self-attention mechanism within the Transformer architecture is used to extract features from pest images, thereby weighting the features of the pest images.

[0056] In some embodiments of the present application, extracting features from the pest image using a deep learning model includes:

[0057] Use the self-attention mechanism in the Transformer structure to extract features from pest images. The formula is as follows:

[0058] Among them, Q, K and V refer to query, key and value matrices respectively. Q, K and V matrices are obtained by linear transformation of pest image features; d k refers to the dimension of the key.

[0059] The self-attention mechanism can refer to the self-attention mechanism, which can be regarded as a feature extraction layer. Given the input features a1, a2, ..., an, the self-attention layer fuses each input feature to obtain new features b1, b2, ..., bn. For example, let the pest image feature be I, and multiply the pest image feature I by three matrices W respectively. q 、W k and W v Get three matrices Q, K and V; transform matrices Q and K T Multiply to obtain an attention matrix; normalize the attention matrix to obtain a normalized attention matrix, where attention matrix normalization can refer to dividing the attention matrix by the adjustment factor To compress the output value of the attention matrix; finally, multiply the normalized attention matrix by V to obtain the final output features of the pest image.

[0060] In step S203, new species of pest images are determined from the pest images based on the pest features, and the features of the new species of pest images are marked to obtain a target data set.

[0061] Pest features are obtained and compared with previously acquired feature data. If pest feature data significantly differs from the previously acquired feature data, the pest feature data is marked. Since the previously acquired feature data is for known pest species, obtaining pest feature data significantly different from the previously acquired feature data indicates the presence of a new species of pest in the pest image. The features of the new species of pest image are marked and determined as part of the target dataset.

[0062] In step S204, the insect detection model is trained based on the target data set and the meta-learning algorithm, the initialization parameters of the insect detection model are optimized, and the target insect detection model is obtained.

[0063] During the meta-learning process, the initialization parameters of the insect detection model, obtained using a dataset of known pest species, are optimized to obtain a target insect detection model capable of detecting new pest species. In the present embodiment, the initialization parameters of the insect detection model are optimized and updated to train the insect detection model on a new task using a small amount of sample data from a new pest species, resulting in a target insect detection model.

[0064] In some embodiments of the present application, the training of the insect detection model based on the target data set and the meta-learning algorithm, optimizing the initialization parameters of the insect detection model and obtaining the target insect detection model include but are not limited to steps B1-B4:

[0065] In step B1: the target data set is split into a training set and a test set, and the training set is split into at least two training tasks; the training set includes a support set and a query set.

[0066] In step B2: determining the initialization parameters of the insect detection model, and performing gradient calculation on the initialization parameters to determine the parameters after gradient descent.

[0067] In step B3: determining the sum of losses of at least two training tasks based on the parameters after gradient descent, and updating the initialization parameters based on the sum of losses.

[0068] In step B4: the insect detection model is trained according to the updated initialization parameters to obtain a target insect detection model.

[0069] In MAML, the initialization parameter θ of the insect detection model is determined, and a small amount of gradient updates are used to adapt to the new task. The optimized initialization parameter can be expressed as:

[0070] Among them, θ is the initialization parameter of the insect detection model, T is a task sampled from the task distribution, and L T is the loss function corresponding to task T, f θ is a model parameterized by parameter θ, α is a learning rate, represents the gradient of θ.

[0071] In each meta-training iteration, a gradient descent step is first performed on the current parameter θ to obtain a new parameter. The loss is then calculated on the new parameter and θ is updated. In the present embodiment, meta-learning is used to create a target insect detection model. This target insect detection model can quickly adapt to new pest species using a small number of samples, significantly reducing the data cost of training the model and greatly improving its recognition accuracy and reliability.

[0072] In some embodiments of the present application, the training of the insect detection model based on the updated initialization parameters to obtain the target insect detection model includes but is not limited to steps C1-C3:

[0073] In step C1: the insect detection model is trained according to the updated initialization parameters to obtain the insect detection model to be optimized.

[0074] In step C2: the labels of the samples in the query set are predicted based on the samples and labels in the support set.

[0075] In step C3: the similarity between the labels of the samples in the query set and the labels of the samples in the support set is determined, and the parameters of the insect detection model to be optimized are adjusted according to the similarity to obtain the target insect detection model.

[0076] Among them, the main purpose of the Matching Networks is to use the information in the support set to predict the labels of the samples in the query set. By calculating the similarity between the samples in the query set and the samples in the support set, and using the attention weights to calculate the weighted sum, the labels of the samples in the query set can be predicted. This method is particularly suitable for few-shot learning because it can effectively use a small number of labeled samples to predict the labels of unlabeled samples. Matching Networks uses an attention mechanism to weigh the importance of samples in the support set and classifies them by calculating the similarity between the samples in the support set and the query samples. The similarity can be calculated using the learned metric space, which can be expressed as:

[0077] Where y is the label of the query point, x is the query point, and x i and y i They are samples and labels in the support set respectively; a(x,x i ) is the attention weight, which is usually normalized using the softmax function; k is the size of the support set.

[0078] In the embodiment of the present application, the query point label is determined using the above formula, and the similarity between the query point label and the sample point label is determined to optimize and adjust the target insect detection model. The similarity between the query set and the support set can be used to derive a predicted value. The greater the similarity between the query set and the support set, the greater the predicted value, indicating a more accurate detection model.

[0079] In some embodiments of the present application, determining the similarity between the labels of the samples in the query set and the labels of the samples in the support set includes:

[0080] The cross entropy loss function is used to maximize the similarity between the labels of the samples in the query set and the labels of the samples in the support set. The cross entropy loss function is calculated using the following formula:

[0081] Where |Q| refers to the number of samples in the query set; ∑ c y c is the sum of all categories c; y c Is the indicator function of the true label of the sample on category c, where if the sample belongs to category c, it is 1, otherwise it is 0; is the probability that the model predicts that the sample belongs to category c.

[0082] In this embodiment, the cross-entropy loss function is minimized to maximize the similarity between the predicted value and the true value. This technical solution can train a model capable of identifying and classifying new pest species using a small number of samples, greatly improving the reliability and practicality of insect detection lights.

[0083] In step S205, the target insect detection model is used to monitor and identify new species of pests.

[0084] This embodiment, building on the previous examples, provides a target pest detection model for monitoring and identifying new pest species. Pest samples are collected using light from a visual data collection device to induce and capture pests. When a new pest species is detected, a few-shot learning algorithm is used to train the model on the small number of new samples. The technical solution of this embodiment combines meta-learning and self-attention mechanisms to achieve effective pest species monitoring and identification, maintaining high accuracy even with a small sample size.

[0085] Example 3

[0086] FIG3 is a schematic diagram of the structure of the insect monitoring and identification device using few-sample learning provided in Example 3 of the present application. As shown in FIG3 , it specifically includes the following:

[0087] The pest image acquisition module 310 is configured to capture pests using an insect visual data collection device and acquire pest images using an image acquisition device;

[0088] The data set acquisition module 320 is configured to extract features from pest images to determine features of new pest species and mark them to obtain a target data set;

[0089] a target insect detection model determination module 330 configured to train an insect detection model based on the target data set and a meta-learning algorithm, optimize initialization parameters of the insect detection model, and obtain a target insect detection model;

[0090] The pest monitoring and identification module 340 is configured to monitor and identify new species of pests using the target insect detection model.

[0091] The insect monitoring and identification device for few-shot learning in the embodiments of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc., and the embodiments of the present application do not specifically limit this.

[0092] The insect monitoring and identification device for few-shot learning in the embodiments of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.

[0093] The insect monitoring and identification device for few-sample learning provided in the embodiment of the present application can implement each process implemented in the above method embodiment. To avoid repetition, it will not be repeated here.

[0094] Example 4

[0095] In addition, an embodiment of the present application further provides a computer device. FIG4 is a schematic diagram of the structure of the computer device provided in Example 5 of the present application. The structure of the device is shown in FIG4 . The device includes a memory 51 capable of storing computer-readable instructions and a processor 52 capable of executing computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor is triggered to execute the method described.

[0096] The methods and / or embodiments in the embodiments of the present application can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code that can execute the method shown in the flowchart. When the computer program is executed by a processing unit, the above-mentioned functions defined in the method of the present application are performed.

[0097] It should be noted that the computer-readable medium described in this application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. Computer-readable media may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.

[0098] In the present application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination thereof.

[0099] Computer program code that can perform the operations of the present application can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0100] The flow chart or block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the equipment, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions that can realize the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0101] As another aspect, embodiments of the present application further provide a computer-readable medium, which may be included in the device described in the above embodiments, or may exist independently and not incorporated into the device. The computer-readable medium carries one or more computer-readable instructions, which can be executed by a processor to implement the steps of the methods and / or technical solutions of the above embodiments of the present application.

[0102] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPUs), input / output interfaces, network interfaces and memories.

[0103] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0104] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology for information storage. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc-read only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission medium that can store information that can be accessed by a computing device.

[0105] In addition, an embodiment of the present application further provides a computer program, which is stored in a computer device, so that the computer device executes the method for controlling code execution.

[0106] It should be noted that the present application can be implemented in a combination of software and / or software and hardware, for example, can be implemented using an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device. In certain embodiments, the software program of the present application can be executed by a processor to implement the above steps or functions. Similarly, the software program of the present application (including related data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and similar devices. In addition, some steps or functions of the present application can be implemented using hardware, for example, as a circuit that cooperates with a processor to perform each step or function.

[0107] It is obvious to those skilled in the art that the present application is not limited to the details of the above-mentioned exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic characteristics of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes that fall within the meaning and scope of the equivalent elements of the claims are included in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. Words such as first and second are used to indicate names and do not indicate any particular order.

Claims

1. A few-shot learning method for pest situation monitoring and recognition, wherein, the method includes: Using a pest situation visual data collection device to capture pests, and obtaining pest images through an image acquisition device; Performing feature extraction on the pest images to determine the features of new species pests and marking them to obtain a target data set; Training a pest situation detection model based on the target data set and a meta-learning algorithm, optimizing the initialization parameters of the pest situation detection model and obtaining a target pest situation detection model; Using the target pest situation detection model to monitor and recognize new species pests.

2. The method according to claim 1, wherein, the using a pest situation visual data collection device to capture pests and obtaining pest images through an image acquisition device includes: Deploying the pest situation visual data collection device in the target area, and using the pest situation visual data collection device to attract and capture pests to obtain pest samples; the pest situation visual data collection device includes an intelligent pest situation monitoring lamp; Regularly using the image acquisition device to perform image acquisition on the pest samples in the pest situation visual data collection device to determine pest images.

3. The method according to claim 1, wherein, the performing feature extraction on the pest images to determine the features of new species pests and marking them to obtain a target data set includes: Performing feature extraction on the pest images through a deep learning model to determine the target pest images after feature extraction of pests; wherein, the pest features include color, shape, and texture features; Determining new species pest images from the pest images according to the pest features, and marking the features of the new species pest images to obtain a target data set.

4. The method according to claim 3, wherein, the performing feature extraction on the pest images through a deep learning model includes: Use the self-attention mechanism in the Transformer structure to extract features from pest images. The formula is as follows: Among them, Q, K, and V respectively refer to the query, key, and value matrices, and the Q, K, and V matrices are obtained by linearly transforming the pest image features; d k refers to the dimension of the key.

5. The method according to claim 1, wherein, the training a pest situation detection model based on the target data set and a meta-learning algorithm, optimizing the initialization parameters of the pest situation detection model and obtaining a target pest situation detection model includes: Splitting the target data set into a training set and a test set, and splitting the training set into at least two training tasks; the training set includes a support set and a query set; Determining the initialization parameters of the pest situation detection model, and performing gradient calculation on the initialization parameters to determine the parameters after gradient descent; Determining the loss sum of at least two training tasks according to the parameters after gradient descent, and updating the initialization parameters according to the loss sum; Training the pest situation detection model according to the updated initialization parameters to obtain a target pest situation detection model.

6. The method according to claim 5, wherein, the training the pest situation detection model according to the updated initialization parameters to obtain a target pest situation detection model includes: Training the pest situation detection model according to the updated initialization parameters to obtain a pest situation detection model to be optimized; Predicting the labels of the samples in the query set according to the samples and labels in the support set; Determining the similarity between the labels of the samples in the query set and the labels of the samples in the support set, and adjusting the parameters of the pest situation detection model to be optimized according to the similarity to obtain a target pest situation detection model.

7. The method according to claim 6, wherein, determining the similarity between the labels of the samples in the query set and the labels of the samples in the support set includes: The cross-entropy loss function is used to maximize the similarity between the labels of the samples in the query set and the labels of the samples in the support set; the cross-entropy loss function is calculated using the following formula: where |Q| refers to the number of samples in the query set; ∑ c y c sums over all classes c; y c is the indicator function of the true label of the sample on class c, where if the sample belongs to class c, it is 1, otherwise it is 0; is the probability that the model predicts that the sample belongs to class c.

8. A few-shot learning device for pest situation monitoring and recognition, wherein, the device includes: a pest image acquisition module configured to capture pests by using a pest situation vision data collection device and obtain pest images through an image acquisition device; a data set acquisition module configured to extract features from the pest images to determine the features of new species pests and perform labeling to obtain a target data set; a target pest situation detection model determination module configured to train a pest situation detection model according to the target data set and a meta-learning algorithm, optimize the initialization parameters of the pest situation detection model, and obtain a target pest situation detection model; a pest monitoring and recognition module configured to monitor and recognize new species pests by using the target pest situation detection model.

9. A computer device, wherein, the device includes: one or more processors; and a memory storing computer program instructions, which when executed cause the processor to execute the few-shot learning pest situation monitoring and recognition method according to any one of claims 1-7.

10. A computer-readable medium, wherein, computer program instructions are stored thereon, and the computer program instructions can be executed by a processor to implement the few-shot learning pest situation monitoring and recognition method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Small sample crop disease identification method based on feature extraction and storage medium

    CN114693990A

  • A fine-grained classification method for crop diseases based on Swin-Transformer

    CN114937021A

  • Vineyard pest identification method based on attribute feature knowledge graph

    CN116664944A

  • Crop disease identification method based on local selection and feature interaction

    CN116824366A

  • System for identifying pests and monitoring information through image analysis, and monitoring method using same

    US20200250482A1

Cited By

  • Laser insecticidal system and high-precision winged insect identification model training method

    CN120419537A

  • Tibetan text small sample learning method based on matching network

    CN121980276A