A pest monitoring, analysis and processing system based on agricultural and forestry economic management
By combining cosine similarity and Euclidean distance, a pest and disease warning index is constructed, which solves the problem of difficult to balance the overall morphology and local lesions of crops in the prior art, and achieves high-precision pest and disease monitoring and early warning.
Patent Information
- Application Number
- CN202510152425.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-02-12
AI Technical Summary
The prior art is difficult to effectively balance and weight allocation between the overall morphology of the crop and local lesions, and it is difficult to accurately capture the overall changes caused by local lesions.
Real-time growth images of agricultural and forestry crops are obtained through the real-time image monitoring module, and combined with the data in the historical image library, the cosine similarity and Euclidean distance between the real-time image and the historical image are calculated, and the pest and disease warning index is constructed, and the pest and disease scale level is predicted.
While maintaining image morphological similarity analysis, it can sensitively capture the details caused by pests and diseases, improve the accuracy of pest monitoring, and issue early warnings in a timely manner.
Smart Images

Figure CN119625542B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to pest monitoring, and in particular to a pest monitoring, analysis and processing system based on agricultural and forestry economic management. Background Art
[0002] In modern agriculture, the impact of pests and diseases on crops is a key factor that cannot be ignored in the production process. Traditional pest and disease monitoring methods mainly rely on manual inspections or simple sensory judgments. With the continuous development of information technology, especially image processing and analysis technology, image-based pest and disease monitoring methods have gradually emerged, which can efficiently detect crop pests and diseases and provide timely warnings. However, the existing image-based pest and disease monitoring technology mainly focuses on image feature extraction and preliminary classification. The prior art with patent publication number CN115185220A discloses an agricultural and forestry pest and disease monitoring system based on the Internet of Things. It establishes a pest and disease development timeline, predicts time and nodes, and obtains pest and disease impact range analysis and evaluation results to remind agricultural and forestry managers to take preventive measures in advance before the disaster occurs, so as to reduce the economic losses caused by pests and diseases.
[0003] However, in the prior art, when crops are affected by pests and diseases, the overall appearance of the crops may change, but the details (such as color and texture) can often better reflect the severity of the pests and diseases. Therefore, how to effectively balance and weight the overall morphology and local lesions is a difficulty that traditional methods cannot solve. Secondly, pests and diseases often start in local areas first, and as the disease spreads, the impact of pests and diseases on the entire crop gradually intensifies. It is difficult for existing technologies to accurately capture this overall change caused by local lesions. The occurrence of pests and diseases is often accompanied by changes in details, but when the disease is serious, changes in details will have a greater impact on the overall morphology, resulting in insufficient recognition accuracy of traditional methods. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention provides a pest and disease monitoring, analysis and processing system based on agricultural and forestry economic management, which solves the technical problems raised in the background technology by comprehensively considering the overall appearance similarity of the image and the detailed differences of local lesions, as well as the timeliness of the occurrence of pests and diseases.
[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0006] A pest monitoring, analysis and processing system based on agricultural and forestry economic management, comprising:
[0007] Real-time image monitoring module, used to obtain real-time growth images of agricultural and forestry crops;
[0008] A time marking module, used to mark the monitoring time point of the real-time growth image;
[0009] A historical image acquisition module is used to match N historical growth images at the same time point in a predefined crop growth cycle image library according to the marked monitoring time point;
[0010] A similarity calculation module, used to calculate the cosine similarity between the real-time growth image and N historical growth images;
[0011] A marked image determination module, used to determine a marked image according to N cosine similarities;
[0012] A pest index calculation module, used to calculate the pest warning index between the marked image and the real-time growth image;
[0013] The pest scale prediction module is used to predict the scale level of pests and diseases of agricultural and forestry crops according to the pest and disease warning index.
[0014] In some of the embodiments, matching N historical growth images at the same time point in a predefined crop growth cycle image library according to the marked monitoring time point includes:
[0015] S3-1, converting the monitoring time point into a matching index; wherein the matching index is in a timestamp format;
[0016] S3-2, inputting the matching index into a predefined crop growth cycle image library; wherein the crop growth cycle image library stores a number of historical growth images at each historical monitoring time point;
[0017] S3-3, in the crop growth cycle image library, using the matching index to search for the historical growth image of the corresponding historical monitoring time point;
[0018] S3-4. If the matched historical monitoring time point is equal to the monitoring time point of the matching index, it is determined that the historical growth image of the historical monitoring time point is the historical growth image of the same time point.
[0019] In some embodiments, the pre-defining step of the crop growth cycle image library includes:
[0020] A1. At the initial monitoring time point, collect historical growth images of the same type of agricultural and forestry crops in different shapes, sizes and health states at the same crop location;
[0021] A2. Based on the growth cycle of agricultural and forestry crops, historical images are generated by sliding along the time axis to collect multiple monitoring time points;
[0022] A3. The historically generated images at multiple monitoring time points are defined as the crop growth cycle image library.
[0023] In some of the embodiments, calculating the cosine similarity between the real-time growth image and the N historical growth images includes:
[0024] S4-1, assigning independent image numbers to N historical growth images;
[0025] S4-2, performing convolution operations on the N historical growth images respectively, extracting their feature vectors, so as to generate N historical image vectors;
[0026] S4-3, performing a convolution operation on the real-time growth image to extract its feature vector to generate a real-time image vector;
[0027] S4-4, calculating the cosine similarity between the real-time image vector and each historical image vector to obtain N cosine similarities;
[0028] The expression of the cosine similarity is:
[0029] ;
[0030] Among them, CS represents cosine similarity, A represents real-time image vector, B represents historical image vector, represents the L2 norm of the real-time image vector, Represents the L2 norm of the historical image vector.
[0031] In some of the embodiments, determining the labeled image according to N cosine similarities includes:
[0032] S5-1, constructing a first historical image set by sorting the N cosine similarities from high to low;
[0033] S5-2, selecting the top M historical growth images ranked by cosine similarity from the first historical image set, and constructing a second historical image set;
[0034] S5-3. Determine the marked image from the second historical image set.
[0035] In some embodiments, determining the marked image from the second historical image set includes:
[0036] S5-3-1, extracting the historical image vector of each historical growth image in the second historical image set;
[0037] S5-3-2, extracting a real-time image vector of the real-time growth image;
[0038] S5-3-3, calculating the Euclidean distance between the real-time image vector and each historical image vector in the second historical image set, and obtaining M Euclidean distances;
[0039] The calculation expression of the Euclidean distance is:
[0040] ;
[0041] Where ED represents the Euclidean distance between the real-time image vector and the historical image vector, M represents the number of the second historical images, represents the i-th real-time image vector, represents the i-th historical image vector;
[0042] S5-3-4. Select the historical growth image corresponding to the maximum Euclidean distance from the M Euclidean distances and determine it as the marked image.
[0043] The determination expression of the labeled image is:
[0044] ;
[0045] in, represents a labeled image, Indicates the selection of the maximum Euclidean distance from M Euclidean distances, j indicates the selection index, represents the jth real-time image vector, Represents the j-th historical image vector.
[0046] In some embodiments, calculating the pest warning index between the marked image and the real-time growth image includes:
[0047] S6-1, marking the corresponding cosine similarity and maximum Euclidean distance according to the image number of the marked image;
[0048] S6-2, defining a first weight of cosine similarity, a second weight of maximum Euclidean distance, and a third weight of the influence of cosine similarity on Euclidean distance;
[0049] S6-3, calculating the pest warning index based on the first weight, the second weight, the cosine similarity between the marked image and the real-time growth image, and the maximum Euclidean distance;
[0050] The calculation expression of the pest warning index is:
[0051] ;
[0052] Among them, PI represents the pest warning index, is the first weight, indicating the contribution of cosine similarity in the pest warning index; is the second weight, indicating the contribution of Euclidean distance to the pest warning index; is the third weight, which indicates the nonlinear adjustment degree of the influence of cosine similarity on Euclidean distance. is a nonlinear adjustment function.
[0053] In some embodiments, predicting the scale of pests and diseases of agricultural and forestry crops according to the pest and disease early warning index includes:
[0054] S7-1, calculating the time weight of the monitoring time point;
[0055] S7-2. According to the time weight, the pest warning index is converted into a pest scale grade.
[0056] In some of the embodiments, calculating the time weight of the monitoring time point includes:
[0057] S7-1-1, obtaining the sowing time point, harvesting time point and growth cycle of the agricultural and forestry crops;
[0058] S7-1-2, calculating the time difference between the monitoring time point and the sowing time point;
[0059] S7-1-3. Define the ratio of the time difference to the growth period as the time weight.
[0060] The definition expression of the time weight is:
[0061] ;
[0062] in, It represents the time weight of the monitoring time point, t represents the time difference, and T represents the growth cycle.
[0063] In some embodiments, the pest warning index is converted into a pest scale index according to the time weight, including:
[0064] S7-2-1. Calculate the pest scale prediction index based on the time weight and pest warning index;
[0065] The calculation expression of the pest scale prediction index is:
[0066] ;
[0067] Among them, S represents the pest scale prediction index, represents a logarithmic function, which is used to smoothly adjust the impact of time point weights on the pest scale index;
[0068] S7-2-2. Determine the pest scale level corresponding to the pest scale prediction index according to the pest scale prediction index.
[0069] The present invention provides a pest monitoring, analysis and processing system based on agricultural and forestry economic management, which has the following beneficial effects:
[0070] By combining cosine similarity with Euclidean distance, the system can simultaneously focus on the overall shape and local details of the image, especially when the details caused by pests and diseases are significantly changed, and can accurately reflect the impact of pests and diseases. Thus, while maintaining the image morphological similarity analysis, the detailed differences caused by pests and diseases are sensitively captured, thereby improving the accuracy of pest and disease monitoring.
[0071] Moreover, in the process of constructing the pest warning index, the nonlinear adjustment degree of the influence of cosine similarity on Euclidean distance was introduced, thereby reflecting the influence of changes in local details on the overall shape, and more scientifically reflecting the overall expression of the degree of pest and disease lesions in agricultural and forestry crop images.
[0072] In addition, the present invention introduces a time weight mechanism to reasonably evaluate the timeliness of the occurrence of pests and diseases, so that the system can more accurately identify the early signs of pests and diseases and issue early warnings in a timely manner. By combining time difference, image similarity and detail differences, the system can not only accurately monitor pests and diseases, but also provide specific early warnings and treatment suggestions according to the different stages of pests and diseases. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 This is a structural block diagram of a pest monitoring, analysis and processing system based on agricultural and forestry economic management of the present invention;
[0074] Figure 2 A schematic diagram of a processing flow of a pest monitoring, analysis and processing system based on agricultural and forestry economic management according to the present invention;
[0075] Figure 3 Schematic diagram of the calculation process of cosine similarity of the present invention;
[0076] Figure 4 This is a schematic diagram of the calculation process of the pest warning index of the present invention;
[0077] Figure 5 Schematic diagram of the transformation of the scale of pests and diseases described in the present invention DETAILED DESCRIPTION
[0078] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0079] Example 1: See Figures 1 to 4 The present invention provides a pest monitoring, analysis and processing system based on agricultural and forestry economic management, the processing system comprising:
[0080] Real-time image monitoring module, used to obtain real-time growth images of agricultural and forestry crops;
[0081] A time marking module, used to mark the monitoring time point of the real-time growth image;
[0082] A historical image acquisition module is used to match N historical growth images at the same time point in a predefined crop growth cycle image library according to the marked monitoring time point;
[0083] A similarity calculation module, used to calculate the cosine similarity between the real-time growth image and N historical growth images;
[0084] A marked image determination module, used to determine a marked image according to N cosine similarities;
[0085] A pest index calculation module, used to calculate the pest warning index between the marked image and the real-time growth image;
[0086] The pest scale prediction module is used to predict the scale level of pests and diseases of agricultural and forestry crops according to the pest and disease warning index.
[0087] This embodiment first collects real-time growth images of agricultural and forestry crops through the real-time image monitoring module, and time-marks each image through the time marking module to ensure that the image data accurately corresponds to the monitoring time point. Then, the system matches historical images from the predefined crop growth cycle image library according to the marked monitoring time point through the historical image acquisition module, thereby providing comparison data for the real-time image. On this basis, the similarity calculation module evaluates the shape similarity of the image by calculating the cosine similarity between the real-time image and the historical image to identify possible signs of pests and diseases. Through further analysis of the cosine similarity, the marked image determination module can filter out the most relevant image from multiple historical images as a marked image, thereby providing data basis for subsequent pest and disease warnings.
[0088] Finally, the system uses the pest index calculation module and pest scale prediction module to combine the comparison results of the marked image and the real-time image to calculate and predict the pest warning index and the pest scale level of the crop. This prediction can not only help monitor the health of crops in real time, but also identify potential pest risks in advance, take timely countermeasures, and avoid the spread of pests and diseases and crop losses.
[0089] In this embodiment, the acquisition step of the historical image acquisition module includes:
[0090] S3-1, converting the monitoring time point into a matching index; wherein the matching index is in a timestamp format;
[0091] S3-2, inputting the matching index into a predefined crop growth cycle image library; wherein the crop growth cycle image library stores a number of historical growth images at each historical monitoring time point;
[0092] S3-3, in the crop growth cycle image library, using the matching index to search for the historical growth image of the corresponding historical monitoring time point;
[0093] S3-4. If the matched historical monitoring time point is equal to the monitoring time point of the matching index, it is determined that the historical growth image of the historical monitoring time point is the historical growth image of the same time point.
[0094] In summary, this embodiment identifies and analyzes the historical growth status of crops by matching the monitoring time points. In the system, the monitoring time points are first converted into a standardized timestamp format so as to match the historical data in the crop growth cycle image library. The system then uses the timestamp index to quickly retrieve the corresponding historical growth images from the predefined crop growth cycle image library. By comparing the matching of the historical monitoring time points with the current time points, it is confirmed whether these historical images are consistent with the monitoring time points, and then it is determined that they are historical growth images at the same time point.
[0095] In this embodiment, the pre-definition steps of the crop growth cycle image library include:
[0096] A1. At the initial monitoring time point, collect historical growth images of the same type of agricultural and forestry crops in different shapes, sizes and health states at the same crop location;
[0097] A2. Based on the growth cycle of agricultural and forestry crops, historical images are generated by sliding along the time axis to collect multiple monitoring time points;
[0098] A3. The historically generated images at multiple monitoring time points are defined as the crop growth cycle image library.
[0099] In this embodiment, the crop growth cycle image library uses a two-dimensional matrix structure to organize data. For example, the row vector of the two-dimensional matrix represents the historical growth images of the same type of agricultural and forestry crops in different shapes, sizes and health states at the same crop position, while the column vector corresponds to the classification features at different acquisition and monitoring time points. Specifically, various features of the same type of agricultural and forestry crops at the same crop position are arranged as a row matrix. Among them, images of different sizes or shapes are arranged based on the column number of the column vector, and the real-time growth image corresponds to the specific crop position when shooting, and is compared with the two-dimensional matrix of the same crop position when matching. Through the predefined crop growth cycle image library, this embodiment can efficiently organize and query the historical growth images of agricultural and forestry crops, and provide accurate image support for pest and disease monitoring.
[0100] In this embodiment, the calculation steps of the similarity calculation module include:
[0101] S4-1, assigning independent image numbers to N historical growth images;
[0102] S4-2, performing convolution operations on the N historical growth images respectively, extracting their feature vectors, so as to generate N historical image vectors;
[0103] S4-3, performing a convolution operation on the real-time growth image to extract its feature vector to generate a real-time image vector;
[0104] S4-4, calculating the cosine similarity between the real-time image vector and each historical image vector to obtain N cosine similarities;
[0105] The expression of the cosine similarity is:
[0106] ;
[0107] Among them, CS represents cosine similarity, which is used to measure the shape similarity of images. The closer its value is to 1, the more similar the image shapes are; the closer its value is to 0, the greater the difference in image shapes. A represents the real-time image vector, and B represents the historical image vector. represents the L2 norm of the real-time image vector, Represents the L2 norm of the historical image vector.
[0108] Specifically, the L2 norm calculation expression of the real-time image vector and the historical image vector is:
[0109] ;
[0110] ;
[0111] Where n represents the dimension of the vector, and are the i-th element of the real-time image vector and the historical image vector respectively.
[0112] In this embodiment, the directional similarity between the real-time growth image and the historical production image is characterized by cosine similarity. Specifically, cosine similarity does not pay attention to changes in the size, brightness, and scale of the image, but pays more attention to the overall shape of the image. Therefore, when comparing images of different sizes or brightness, cosine similarity can better reflect the similarity of the images, especially in judging whether the shapes and structures are consistent.
[0113] In this embodiment, a unique image number is first assigned to the historical growth image, and the feature vectors of the real-time growth image and the historical growth image are extracted through a convolution operation. Then, the cosine similarity between the real-time image vector and each historical image vector is calculated to measure their shape similarity. The calculation of cosine similarity focuses on the overall shape of the image, which makes it particularly suitable for judging the shape similarity of images under different sizes or brightness conditions, thereby focusing on assessing the health status and pest and disease risks of crops.
[0114] In this embodiment, the determination step of the marker image determination module includes:
[0115] S5-1, constructing a first historical image set by sorting the N cosine similarities from high to low;
[0116] S5-2, selecting the top M historical growth images ranked by cosine similarity from the first historical image set, and constructing a second historical image set;
[0117] S5-3. Determine the marked image from the second historical image set.
[0118] Furthermore, the step S5-3 specifically includes:
[0119] S5-3-1, extracting the historical image vector of each historical growth image in the second historical image set;
[0120] S5-3-2, extracting a real-time image vector of the real-time growth image;
[0121] S5-3-3, calculating the Euclidean distance between the real-time image vector and each historical image vector in the second historical image set, and obtaining M Euclidean distances;
[0122] The calculation expression of the Euclidean distance is:
[0123] ;
[0124] Among them, ED represents the Euclidean distance between the real-time image vector and the historical image vector, which is used to measure the difference in image details (such as texture, color changes, etc.). The larger the value, the greater the image difference, which usually indicates that the signs of pests and diseases are more obvious. M represents the number of the second historical image; represents the i-th real-time image vector, Represents the i-th historical image vector.
[0125] S5-3-4. Select the historical growth image corresponding to the maximum Euclidean distance from the M Euclidean distances and determine it as the marked image.
[0126] The determination expression of the labeled image is:
[0127] ;
[0128] in, represents a labeled image, Indicates the selection of the maximum Euclidean distance from M Euclidean distances, j indicates the selection index, represents the jth real-time image vector, Represents the j-th historical image vector.
[0129] This embodiment determines the marked image by combining cosine similarity and Euclidean distance, thereby providing support for pest and disease monitoring. Specifically, first, the system sorts N cosine similarities from high to low to construct a first historical image set; then, the historical images ranked in the top M by cosine similarity are filtered out from the set to form a second historical image set. Finally, the system determines the marked image based on the second historical image set.
[0130] In the process of determining the marked image, the system first extracts the feature vector of each historical image in the second historical image set, and extracts the feature vector of the real-time growth image. Then, the Euclidean distance between the real-time image vector and each historical image vector in the second historical image set is calculated to obtain M Euclidean distances. The Euclidean distance is used to measure the difference in details between images (such as texture, color changes, etc.). The larger the value, the greater the difference in the image, which usually indicates that the signs of pests and diseases are more obvious. Based on these Euclidean distances, the system selects the historical growth image corresponding to the maximum Euclidean distance and determines it as the marked image.
[0131] In this embodiment, the calculation steps of the pest index calculation module include:
[0132] S6-1, marking the corresponding cosine similarity and maximum Euclidean distance according to the image number of the marked image;
[0133] S6-2, defining a first weight of cosine similarity, a second weight of maximum Euclidean distance, and a third weight of the influence of cosine similarity on Euclidean distance;
[0134] S6-3, calculating the pest warning index based on the first weight, the second weight, the cosine similarity between the marked image and the real-time growth image, and the maximum Euclidean distance;
[0135] The calculation expression of the pest warning index is:
[0136] ;
[0137] Among them, PI represents the pest warning index, is the first weight, which indicates the contribution of cosine similarity to the pest warning index and is used to control the impact of image appearance similarity on the pest warning index; is the second weight, which indicates the contribution of the Euclidean distance to the pest warning index, and is used to control the impact of image detail differences (such as color and texture changes caused by pests and diseases) on the pest warning index; is the third weight, which indicates the nonlinear adjustment degree of the influence of cosine similarity on Euclidean distance, and is used to determine the nonlinear enhancement effect of Euclidean distance when cosine similarity is low. It is a nonlinear adjustment function, and the sigmoid function is used to adjust the impact of the Euclidean distance on the pest warning index. When the cosine similarity (CS) is low, the image shape difference is large, and the impact of the pest details (Euclidean distance) is amplified.
[0138] In this embodiment, the cosine similarity between the real-time growth image and the historical growth image is calculated through the sigmoid function, so that when the cosine similarity (CS) is close to 0, the influence of the Euclidean distance (ED) between the real-time growth image and the historical growth image increases, emphasizing the impact of pests and diseases on detail differences; when the cosine similarity (CS) is close to 1, the influence of the Euclidean distance (ED) decreases, and more attention is paid to the cosine similarity in shape.
[0139] In summary, the higher the value of the pest and disease warning index, the greater the difference between the image and the healthy image, which may mean that the crop's pest and disease condition is more serious; and the weight relationship between cosine similarity (CS) and Euclidean distance (ED) determines the relative importance of image appearance similarity and detail differences in different scenarios; the introduction of nonlinear functions ensures that on the basis of appearance similarity, when the details caused by pests and diseases are greatly different, the system can effectively detect pests and diseases.
[0140] In summary, the pest warning index of this embodiment can effectively comprehensively consider the appearance similarity and detail differences of images, especially when facing crop images of different shapes, sizes and health conditions, it can still accurately reflect the severity of pests and diseases. The shape similarity between images is evaluated by cosine similarity, and the Euclidean distance is introduced to measure the detail differences, ensuring that even when the crops are similar in appearance, the differences in details (such as changes in color and texture) can be effectively paid attention to.
[0141] In addition, the pest and disease warning index uses a nonlinear function adjustment, so that on the basis of the similarity of image appearance, it can sensitively capture the detailed changes caused by pests and diseases. This method of combining shape similarity and detail differences ensures that crop health problems can be discovered and responded to in a timely manner in the early stages of pests and diseases.
[0142] Example 2: See Figure 5 The technical solution of this embodiment 2 is different from that of embodiment 1 in that the specific steps for obtaining the scale level of the pests and diseases described in embodiment 1 are disclosed, and the steps include:
[0143] S7-1, calculating the time weight of the monitoring time point;
[0144] S7-2. According to the time weight, the pest warning index is converted into a pest scale grade.
[0145] Furthermore, the step S7-1 specifically includes:
[0146] S7-1-1, obtaining the sowing time point, harvesting time point and growth cycle of the agricultural and forestry crops;
[0147] S7-1-2, calculating the time difference between the monitoring time point and the sowing time point;
[0148] S7-1-3. Define the ratio of the time difference to the growth period as the time weight.
[0149] The definition expression of the time weight is:
[0150] ;
[0151] in, It represents the time weight of the monitoring time point, t represents the time difference, and T represents the growth cycle.
[0152] Furthermore, the step S7-2 specifically includes:
[0153] S7-2-1. Calculate the pest scale prediction index based on the time weight and pest warning index;
[0154] The calculation expression of the pest scale prediction index is:
[0155] ;
[0156] Among them, S represents the pest scale prediction index, represents a logarithmic function, which is used to smoothly adjust the impact of time point weights on the pest scale index;
[0157] Specifically, in this embodiment, in order to reasonably reflect the relationship that the shorter the time difference, the larger the scale of the pests and diseases, and to avoid over-magnifying the impact of the time difference on the scale index, logarithmic compression can be used to adjust the time point weight. The logarithmic function can ensure that the scale index changes smoothly and reasonably when pests and diseases occur in the early stage. Through the logarithmic function, the impact of pests and diseases gradually increases as the time of the occurrence of pests and diseases is advanced, while avoiding over-magnifying the impact of pests and diseases that occur in the early stage.
[0158] S7-2-2, according to the pest scale prediction index, determining the pest scale level corresponding to the pest scale prediction index;
[0159] For example, the pest scale index can be mapped to a specific pest scale level by empirical rules or statistical methods according to the value range of the pest scale index (e.g., 0 to 100). For example:
[0160] 0-20: low pest and disease scale (minor impact);
[0161] 21-50: medium pest and disease scale (moderate impact);
[0162] 51-100: high pest and disease scale (severe impact);
[0163] The mapping range can also be adjusted according to actual conditions to suit different crops or the severity of different pests and diseases.
[0164] In summary, this embodiment uses the pest warning index combined with the time weight to achieve the prediction of the scale of pests and diseases in agricultural and forestry crops. By calculating the ratio of the time difference to the growth cycle, the time weight is calculated for each monitoring time point to reflect the early or late occurrence of pests and diseases. A shorter time difference corresponds to a higher time weight, which means that the earlier the pests and diseases occur, the greater the impact on the crops may be. In order to avoid over-amplifying the impact of the early occurrence of pests and diseases on the scale index, the system uses a logarithmic function to smoothly adjust the time weight to ensure that the scale prediction is more reasonable.
[0165] Based on this time weight, combined with the pest warning index, the system calculates the pest scale prediction index. In this process, cosine similarity and Euclidean distance work together on the warning index to judge the severity of pests and diseases by comparing the shape and detail differences. Finally, based on the calculated scale prediction index, the system maps it to a specific pest scale level, such as slight impact, moderate impact or severe impact, thus providing an effective basis for pest and disease prevention and control.
[0166] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.) means.
[0167] The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., DVD ), or semiconductor media. The semiconductor media may be a solid state drive.
[0168] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division of a waterway underwater terrain change analysis system and method. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0169] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A pest monitoring, analysis and processing system based on agricultural and forestry economic management, characterized in that: include: Real-time image monitoring module, used to obtain real-time growth images of agricultural and forestry crops; A time marking module, used to mark the monitoring time point of the real-time growth image; A historical image acquisition module is used to match N historical growth images at the same time point in a predefined crop growth cycle image library according to the marked monitoring time point; A similarity calculation module, used to calculate the cosine similarity between the real-time growth image and N historical growth images; A marked image determination module, used to determine a marked image according to N cosine similarities; The step of determining the labeled image according to the N cosine similarities includes: S5-1, constructing a first historical image set by sorting the N cosine similarities from high to low; S5-2, selecting the top M historical growth images ranked by cosine similarity from the first historical image set, and constructing a second historical image set; S5-3, determining the marked image from the second historical image set; Determining the marked image from the second historical image set includes: S5-3-1, extracting the historical image vector of each historical growth image in the second historical image set; S5-3-2, extracting a real-time image vector of the real-time growth image; S5-3-3, calculating the Euclidean distance between the real-time image vector and each historical image vector in the second historical image set, and obtaining M Euclidean distances; S5-3-4. Select the historical growth image corresponding to the maximum Euclidean distance from the M Euclidean distances and determine it as the marked image A pest index calculation module, used to calculate the pest warning index between the marked image and the real-time growth image; A pest scale prediction module, used to predict the scale level of pests and diseases of agricultural and forestry crops according to the pest and disease warning index; The calculation steps of the pest index calculation module include: S6-1, according to the image number of the marked image, mark the corresponding cosine similarity and maximum Euclidean distance; S6-2, defining a first weight of cosine similarity, a second weight of maximum Euclidean distance, and a third weight of the influence of cosine similarity on Euclidean distance; S6-3, calculating the pest warning index based on the first weight, the second weight, the cosine similarity between the marked image and the real-time growth image, and the maximum Euclidean distance; The calculation expression of the pest warning index is: ; Among them, PI represents the pest warning index, is the first weight, indicating the contribution of cosine similarity in the pest warning index; is the second weight, indicating the contribution of Euclidean distance to the pest warning index; is the third weight, which indicates the nonlinear adjustment degree of the influence of cosine similarity on Euclidean distance. is a nonlinear adjustment function.
2. A pest monitoring, analysis and processing system based on agricultural and forestry economic management according to claim 1, characterized in that: According to the marked monitoring time point, N historical growth images of the same time point are matched in the predefined crop growth cycle image library, including: S3-1, converting the monitoring time point into a matching index; wherein the matching index is in a timestamp format; S3-2, inputting the matching index into a predefined crop growth cycle image library; wherein the crop growth cycle image library stores a number of historical growth images at each historical monitoring time point; S3-3, in the crop growth cycle image library, using the matching index to search for the historical growth image of the corresponding historical monitoring time point; S3-4. If the matched historical monitoring time point is equal to the monitoring time point of the matching index, it is determined that the historical growth image of the historical monitoring time point is the historical growth image of the same time point.
3. A pest monitoring, analysis and processing system based on agricultural and forestry economic management according to claim 1, characterized in that: The predefined steps of the crop growth cycle image library include: A1. At the initial monitoring time point, collect historical growth images of the same type of agricultural and forestry crops in different shapes, sizes and health states at the same crop location; A2. Based on the growth cycle of agricultural and forestry crops, historical images are generated by sliding along the time axis to collect multiple monitoring time points; A3. The historically generated images at multiple monitoring time points are defined as the crop growth cycle image library.
4. A pest monitoring, analysis and processing system based on agricultural and forestry economic management according to claim 2, characterized in that: Calculate the cosine similarity between the real-time growth image and N historical growth images, including: S4-1, assigning independent image numbers to N historical growth images; S4-2, performing convolution operations on the N historical growth images respectively, extracting their feature vectors, so as to generate N historical image vectors; S4-3, performing a convolution operation on the real-time growth image to extract its feature vector to generate a real-time image vector; S4-4, calculating the cosine similarity between the real-time image vector and each historical image vector to obtain N cosine similarities; The expression of the cosine similarity is: ; Among them, CS represents cosine similarity, A represents real-time image vector, B represents historical image vector, represents the L2 norm of the real-time image vector, Represents the L2 norm of the historical image vector.
5. The pest monitoring, analysis and processing system based on agricultural and forestry economic management according to claim 1, characterized in that: According to the pest warning index, the scale of pests and diseases of agricultural and forestry crops is predicted, including: S7-1, calculating the time weight of the monitoring time point; S7-2. According to the time weight, the pest warning index is converted into a pest scale grade.
6. A pest monitoring, analysis and processing system based on agricultural and forestry economic management according to claim 5, characterized in that: Calculating the time weight of the monitoring time point includes: S7-1-1, obtaining the sowing time point, harvesting time point and growth cycle of the agricultural and forestry crops; S7-1-2, calculating the time difference between the monitoring time point and the sowing time point; S7-1-3, defining the ratio of the time difference to the growth period as the time weight; The definition expression of the time weight is: ; in, It represents the time weight of the monitoring time point, t represents the time difference, and T represents the growth cycle.
7. A pest monitoring, analysis and processing system based on agricultural and forestry economic management according to claim 5, characterized in that: According to the time weight, the pest warning index is converted into a pest scale index, including: S7-2-1. Calculate the pest scale prediction index based on the time weight and pest warning index; The calculation expression of the pest scale prediction index is: ; Among them, S represents the pest scale prediction index, represents a logarithmic function, which is used to smoothly adjust the impact of time point weights on the pest scale index; S7-2-2. Determine the pest scale level corresponding to the pest scale prediction index according to the pest scale prediction index.
Citation Information
Patent Citations
Agricultural and forestry pest monitoring system based on Internet of Things
CN115185220A
Agricultural intelligent monitoring system and method based on machine vision
CN116773550A