A method, device and medium for predicting grain storage pests based on a Transformer model

By using the Transformer model and original sensor data in the granary, combined with grain types and age, accurate prediction of granary pests is achieved, solving the problems of large labor costs and high equipment costs in the existing technology, and improving prediction accuracy.

CN117634673BActive Publication Date: 2025-07-22浪潮数字粮储科技有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311524771.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-15
Publication Date
2025-07-22
Estimated Expiration
2043-11-15

AI Technical Summary

Technical Problem

The existing technology has problems such as high labor costs, high equipment costs and inaccurate detection in granary pest detection, making it difficult to achieve accurate predictions.

Method used

The Transformer model is used to combine the original temperature and humidity sensor data in the granary, and then input it into the Transformer pest prediction model after standardization, and use grain types and ages to predict the probability of pest generation.

Benefits of technology

Without increasing equipment and labor costs, accurate prediction of granary pests is achieved, improving the parallel computing power and prediction accuracy of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117634673B_ABST
    Figure CN117634673B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device and medium for predicting grain storage pests based on a Transformer model, belonging to the technical field of artificial intelligence, and is used to solve the technical problem of achieving accurate prediction of grain storage pests without additional procurement of equipment. The method includes: after the grain to be predicted is put into the warehouse, obtaining the warehouse inventory information corresponding to the grain to be predicted, where the warehouse inventory information at least includes the variety and age of the grain to be predicted; determining the grain temperature detection points corresponding to the grain to be predicted, and obtaining the temperature data and humidity data returned by the sensor cluster deployed at the grain temperature detection points; after performing standardization processing on the temperature data and humidity data, inputting them into a preset Transformer pest prediction model; and using the variety and age of the grain to be predicted, and outputting the pest generation probability corresponding to the grain to be predicted by using the preset Transformer pest prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and particularly to a method, device and medium for predicting pests in a granary based on a Transformer model. Background Art

[0002] As a major grain-producing country, food security is related to social stability and economic development. Reducing losses caused by pests during the storage of grain in granaries is a key point of food security.

[0003] Currently, there are mainly two methods for detecting pests in granaries in the market: one is that workers manually obtain the grain inside the grain pile through a grain sampling rod, and then calculate through the number of pests per unit weight. This method is labor-consuming and the accuracy of the prediction result cannot be guaranteed; the other is to detect the number of pests through a professional warehousing control cabinet with the help of equipment such as an insect trap, an air pump, and a pest number sensor. The relevant instruments are relatively expensive and require high costs. Moreover, due to inaccurate detection and long operation time, etc., the current application situation in the granary is not ideal. However, as the granary keepers, they really need to ensure the good quality of the grain during storage and need to know the pest situation in the granary every day.

[0004] The traditional grain reserve management method cannot meet the current development needs and urgently needs to be upgraded and transformed. In such an environment, almost all granaries are equipped with grain temperature detection equipment, which can detect the atmospheric temperature, the atmospheric temperature inside the granary, and the temperatures at each grain temperature detection point. At the same time, the probability of pests in the granary can also be analyzed through the grain temperature-related data. Summary of the Invention

[0005] Embodiments of the present application provide a method, device and medium for predicting pests in a granary based on a Transformer model to solve the above technical problem of accurately predicting pests in a granary without additional equipment procurement and without additional human and financial resources.

[0006] Embodiments of the present application adopt the following technical solutions:

[0007] In a first aspect, an embodiment of the present application provides a method for predicting grain storage pests based on a Transformer model. The method includes: after the grain to be predicted is stored in the warehouse, obtaining the warehouse inventory information corresponding to the grain to be predicted, where the warehouse inventory information at least includes the variety and age of the grain to be predicted; determining the grain temperature detection points corresponding to the grain to be predicted, and obtaining the temperature data and humidity data returned by the sensor cluster deployed at the grain temperature detection points; after performing standardization processing on the temperature data and humidity data, inputting them into the Transformer pest prediction model; and using the variety and age of the grain to be predicted to output the pest occurrence probability corresponding to the grain to be predicted by the Transformer pest prediction model.

[0008] In a possible implementation manner of the specification of the present application, when the grain to be predicted is stored in the warehouse, the method further includes: if the grain to be predicted is stored in an empty warehouse, generating a warehouse inventory ledger corresponding to the empty warehouse, and writing the warehouse inventory information on the warehouse inventory ledger; if the grain to be predicted is stored in a non-empty warehouse, writing the warehouse inventory information on the warehouse inventory ledger of the non-empty corresponding warehouse; the warehouse inventory information at least further includes the origin and grade of the grain to be predicted.

[0009] In a possible implementation manner of the specification of the present application, obtaining the temperature data and humidity data returned by the sensor cluster deployed at the grain temperature detection points specifically includes: the grain temperature detection points are evenly deployed inside the grain to be predicted; obtaining the temperature data returned by the temperature sensors deployed at the grain temperature detection points and the humidity data returned by the humidity sensors deployed at the grain temperature detection points.

[0010] In a possible implementation manner of the specification of the present application, obtaining the temperature data and humidity data returned by the sensor cluster deployed at the grain temperature detection points specifically further includes: obtaining the temperature data returned by the temperature measurement cables evenly deployed inside the grain to be predicted.

[0011] In a possible implementation manner of the specification of the present application, performing standardization processing on the temperature data and humidity data specifically includes: for the temperature data and humidity data of each grain temperature detection point, respectively determining the maximum value and the minimum value; calculating the ratio of the difference between the temperature data and humidity data and the minimum value to the difference between the maximum value and the minimum value; and using the ratio of the difference to update the temperature data and humidity data corresponding to each grain temperature detection point.

[0012] In a possible implementation manner of the specification of the present application, after the temperature data and humidity data are standardized, they are input into the Transformer pest prediction model, specifically including: inputting the temperature data and humidity data of each updated grain temperature detection point into the Transformer pest prediction model; the Transformer pest prediction model is implemented by a neural network model with an encoder-decoder structure.

[0013] In a possible implementation manner of the specification of the present application, when inputting the temperature data and humidity data of each updated grain temperature detection point into the Transformer pest prediction model, the method further includes: encoding the position of each grain temperature detection point in the grain to be predicted; inputting the position encoding of each grain temperature detection point together with the temperature data and humidity data of each grain temperature detection point into the Transformer pest prediction model.

[0014] In a possible implementation manner of the specification of the present application, using the Transformer pest prediction model to output the pest generation probability corresponding to the grain to be predicted specifically includes: respectively obtaining the temperature change gradient value output by the Transformer pest prediction model according to the temperature data and the humidity change difference interval or humidity change difference gradient value output according to the humidity data; determining the pest generation probability corresponding to the grain to be predicted through the variety and age of the grain to be predicted based on the temperature change gradient value and the humidity change difference interval or humidity change difference gradient value.

[0015] In a second aspect, the embodiment of the present application further provides a granary pest prediction device based on a Transformer model. The device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions that can be executed by the at least one processor, so that the at least one processor can execute, after the grain to be predicted is put into the warehouse, obtaining the granary inventory information corresponding to the grain to be predicted, and the granary inventory information at least includes the variety and age of the grain to be predicted; determining the grain temperature detection points corresponding to the grain to be predicted, and obtaining the temperature data and humidity data returned by the sensor cluster deployed at the grain temperature detection points; after standardizing the temperature data and humidity data, inputting them into the Transformer pest prediction model; using the Transformer pest prediction model to output the pest generation probability corresponding to the grain to be predicted through the variety and age of the grain to be predicted.

[0016] In a third aspect, an embodiment of the present application further provides a non-volatile computer storage medium, on which computer-executable instructions are stored, and the computer-executable instructions are configured to perform: after the grain to be predicted is put into the warehouse, obtain the warehouse inventory information corresponding to the grain to be predicted, where the warehouse inventory information at least includes the variety and age of the grain to be predicted; determine the grain temperature detection points corresponding to the grain to be predicted, and obtain the temperature data and humidity data returned by the sensor cluster deployed at the grain temperature detection points; after performing standardization processing on the temperature data and humidity data, input them into the Transformer pest prediction model; and output the pest generation probability corresponding to the grain to be predicted by using the Transformer pest prediction model through the variety and age of the grain to be predicted.

[0017] The grain warehouse pest prediction method, device and medium based on the Transformer model provided by the embodiment of the present application have the following beneficial effects:

[0018] The present application uses the original temperature measuring sensors or temperature measuring cables in the grain warehouse and other equipment to continue to detect the grain to be predicted, without adding additional equipment, and realizes the accurate prediction of the pest generation probability by using the Transformer model without additional equipment cost and labor cost. That is, compared with the prior art, the present application uses the Transformer model algorithm, combines the modeling of pest population activities based on environmental data such as grain temperature and humidity, captures the correlation of data, and at the same time improves the parallel computing ability of the model. It innovatively uses the grain temperature and humidity data collected by the existing equipment (grain warehouse temperature and humidity sensors) in the grain warehouse for big data analysis, determines key parameters such as temperature change coefficients by establishing machine learning and analysis models, and finally realizes the scheme of predicting grain warehouse pests without additional equipment procurement. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings described below are only some embodiments recorded in the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings. In the drawings:

[0020] Figure 1 It is a flowchart of a grain warehouse pest prediction method based on the Transformer model provided by an embodiment of the present application;

[0021] Figure 2 It is a distribution schematic diagram of grain temperature detection points in an application scenario provided by an embodiment of the present application;

[0022] Figure 3 This is a schematic structural diagram of a grain warehouse pest prediction device based on the Transformer model provided by an embodiment of the present application. Specific implementation manners

[0023] In order to enable those skilled in the art to better understand the technical solutions in the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0024] The following will detail the method in the embodiments of the present application through the accompanying drawings.

[0025] Figure 1 This is a flowchart of a method for predicting pests in a grain warehouse based on the Transformer model provided by an embodiment of the present application. As Figure 1 shown, the method for predicting pests in a grain warehouse in the embodiments of the present application at least includes the following execution steps:

[0026] Step 101: After the grain to be predicted is put into the warehouse, obtain the warehouse inventory information corresponding to the grain to be predicted.

[0027] In an example of the present application, to predict the trend of pest generation in the grain to be predicted in the grain warehouse, it is necessary to first obtain the attribute information such as the age and variety of the grain to be predicted. This is because the older the grain, the easier it is to generate pests, and the probability of generating pests is also related to the variety of the grain. Therefore, in the embodiments of the present application, when the grain to be predicted is put into the grain warehouse, it is judged whether the loaded grain warehouse is an empty warehouse. If so, it means that there is no corresponding warehouse inventory book in the empty warehouse, or there is no inventory data on the corresponding warehouse inventory book. At this time, a warehouse inventory book is generated for the empty warehouse and the warehouse inventory information such as the variety and age of the grain to be predicted is written on the warehouse inventory book. If the grain to be predicted is not put into an empty warehouse, at this time, the type and age and other warehouse inventory information of the grain to be predicted can be directly written on the warehouse inventory book corresponding to the grain warehouse. It should be noted that the warehouse inventory information written on the warehouse inventory book may also include other relevant factors that may affect pest generation, such as the origin and grade of the grain to be predicted.

[0028] Furthermore, after the grain to be predicted is put into the warehouse, the warehouse inventory information corresponding to the grain to be predicted can be directly extracted from the warehouse inventory book corresponding to the grain warehouse for subsequent pest prediction.

[0029] Step 102: Determine the grain temperature detection points corresponding to the grain to be predicted, and obtain the temperature data and humidity data returned by the sensor cluster deployed at the grain temperature detection points.

[0030] Figure 2 As shown in the distribution schematic diagram of the grain temperature detection points in an application scenario provided by this embodiment of the present application, Figure 2 as shown, the grain temperature detection points are all distributed inside the grain to be predicted. Therefore, when extracting the temperature information and humidity information corresponding to the grain temperature detection points in this embodiment of the present application, on the one hand, it can be measured by the temperature measurement cable and humidity sensor originally deployed in the granary. It should be noted that the temperature measurement cable here is evenly deployed inside the grain to be predicted, and the temperature measurement cable passes through each grain temperature detection point shown in Figure 2 as shown. On the other hand, the temperature data and humidity data of the grain to be predicted can also be directly extracted from the data returned by the sensor cluster originally deployed at the grain temperature detection points in the granary. It should be noted that the sensor cluster here is also distributed in one-to-one correspondence with the grain temperature detection points to measure the temperature data and humidity data of each grain temperature detection point. And the sensor cluster here includes at least a temperature sensor and a humidity sensor.

[0031] Step 103: After performing standardization processing on the temperature data and humidity data, input them into the Transformer pest prediction model.

[0032] In an example of the present application, after obtaining the temperature data and humidity data of the grain to be predicted, before inputting these data into the Transformer pest prediction model, it is also necessary to perform standardization processing on the data to facilitate model processing and unify the data to the same magnitude. Specifically, first, for the temperature data and humidity data of each grain temperature detection point, the maximum value and the minimum value need to be determined respectively, that is, find the maximum value and the minimum value in the temperature data (the temperature measured at a certain moment at a grain temperature detection point may correspond to a temperature change range) and the maximum value and the minimum value in the humidity data. Then calculate the ratio of the difference between the temperature data and humidity data and the minimum value to the difference between the maximum value and the minimum value. Finally, update the temperature data and humidity data corresponding to each grain temperature detection point using the ratio of the difference.

[0033] In another example of the present application, after completing the standardization processing of the temperature data and humidity data of the grain temperature detection points, when inputting the data result after standardization processing into the Transformer pest prediction model, the position information corresponding to each grain temperature detection point in the grain to be predicted can also be input together, so that the Transformer pest prediction model can obtain and utilize the sequential information of the grain condition time series data through the relative position information of each added element for prediction.

[0034] Step 104: Based on the variety and age of the grain to be predicted, use the Transformer pest prediction model to output the pest generation probability corresponding to the grain to be predicted.

[0035] After inputting the temperature data and humidity data of the grain to be predicted after standardization into the Transformer pest prediction model, the model can output the temperature change gradient value based on the temperature data and the humidity change difference interval or humidity change difference gradient value based on the humidity data. Then, based on the temperature change gradient value and the humidity change difference interval or humidity change difference gradient value, and through the variety and age corresponding to the grain to be predicted, determine the pest generation probability corresponding to the grain to be predicted.

[0036] It should be noted that the pest generation probability of the grain to be predicted in the embodiments of this application can only be used to predict the pest generation trend of the grain to be predicted and cannot be used for pest control. If it is necessary to avoid irreversible damage to the grain caused by pests, early intervention can be carried out according to the prediction results in the embodiments of this application. At the same time, it should also be noted that the pest generation prediction probability in the embodiments of this application is described in the relevant parts below in the form of text descriptions, and will not be elaborated here in the embodiments of this application.

[0037] For a more detailed explanation of the solutions in the embodiments of this application, the following supplementary descriptions are also provided in the embodiments of this application.

[0038] A method for predicting grain pests in a granary based on a Transformer model disclosed in the embodiments of this application uses the grain temperature data in the granary and combines data such as the habits of pests, the age and variety of grains to achieve the prediction of the pest generation trend. It mainly further includes the following execution processes:

[0039] 1) When the grain transport vehicle arrives at the granary point, after registration and weighing, the grain will be unloaded into the designated warehouse. If this is the first time the warehouse receives grain, the system will automatically generate a grain inventory account for this warehouse, recording the grain inventory information of this warehouse, including attribute information such as the origin and age of the grain. If there is already grain in this warehouse, it means that there is already an inventory account for this warehouse, and this batch of grain will be correspondingly added to the inventory account of this warehouse. The information in the inventory account includes: information such as the variety, origin, age, and grade of the stored grain.

[0040] 2) Using the temperature measuring cable equipment originally deployed in the granary, the temperature measuring cables are evenly distributed in the grain pile, that is, inside the grain to be predicted, and then a sensor for measuring the atmospheric temperature in the warehouse is deployed on the top of the warehouse. The system will automatically detect the temperature and humidity of the grain temperature point. In an example of this application, a sensor cluster can also be evenly deployed inside the grain to be predicted, and the sensor can be used to collect the temperature and humidity of the grain to be predicted.

[0041] 3) It is necessary to standardize the original temperature and humidity data collected in the granary, and use the min-max method to make each indicator at the same level as the input of the Transformer pest prediction model: each grain temperature detection point x = (x-min) / (max-min), where x is the temperature data and humidity data of each grain temperature detection point.

[0042] 4) Transformer-based pest prediction model: The Transformer model is an encoder-decoder structure neural network, which consists of a multi-head self-attention layer, a feedforward neural network, etc. The core is the self-attention mechanism, which models the grain condition time series data and explores the internal connection of the grain condition data. The general formula of the Transformer model is as follows:

[0043]

[0044] Among them, Q stands for question; K stands for key; V stands for value, d k is a scaling factor that makes the gradient more stable during training.

[0045] In addition, in the embodiment of the present application, the position information of each grain temperature detection point can be input through position coding to indicate the absolute position of each element in the grain condition data (i.e., temperature data and humidity data) input sequence, and the sequence information of the grain condition time series data can be utilized by adding the relative position information of each element.

[0046] 5) After processing the data of 10 warehouses in 1 granary for nearly 3 years using the data management method in step 3, the data were input into the pest prediction model in step 4. The data volume was 6 warehouse data as training set, with a total of 72,270 data items; 2 warehouse data as validation set, with a total of 24,090 data items; and 2 warehouse data as test set, with a total of 24,090 data items.

[0047] 6) After self-analysis and calculation of the model in step 5, a preliminary linear table of pest prediction probability is formed:

[0048] ① The grain variety is mixed wheat, and the grain age is 2021. If the temperature rising gradient of the grain temperature point in the last 3 grain temperature detection points (with an interval of 8 hours or more) is 0.25 °C or more and the change difference of the grain humidity value in the last 3 detections (with an interval of 8 hours or more) is between [-0.5, 0.5], the probability of pests occurring in this area is 85.03%;

[0049] ② The grain variety is mixed wheat, and the grain age is 2022. If the temperature rising gradient of the grain temperature point in the last 3 grain temperature detection points (with an interval of 8 hours or more) is 0.25 °C or more and the change difference of the grain humidity value in the last 3 detections (with an interval of 8 hours or more) is between [-0.5, 0.5], the probability of pests occurring in this area is 83.26%;

[0050] ③ The grain variety is mixed wheat, and the grain age is 2021. If the temperature rising gradient of the grain temperature point in the last 5 grain temperature detection points (with an interval of 8 hours or more) is 0.25 °C or more and the change difference of the grain humidity value in the last 5 detections (with an interval of 8 hours or more) is between [-0.5, 0.5], the probability of pests occurring in this area is 91.25%;

[0051] ④ The grain variety is mixed wheat, and the grain age is 2022. If the temperature rising gradient of the grain temperature point in the last 5 grain temperature detection points (with an interval of 8 hours or more) is 0.25 °C or more and the change difference of the grain humidity value in the last 5 detections (with an interval of 8 hours or more) is between [-0.5, 0.5], the probability of pests occurring in this area is 89.29%;

[0052] ⑤ The grain variety is mixed wheat, and the grain age is 2021. If the temperature rising gradient of the grain temperature point in the last 3 grain temperature detection points (with an interval of 8 hours or more) is 0.25 °C or more and the change difference gradient of the grain humidity value in the last 3 detections (with an interval of 8 hours or more) is 0.5%, the probability of pests occurring in this area is 32.45% (at this time, it is considered that the temperature change is caused by grain condensation rather than pest activity);

[0053] ⑥ The grain variety is mixed wheat, and the grain age is 2022. If the temperature rising gradient of the grain temperature point in the last 3 grain temperature detection points (with an interval of 8 hours or more) is 0.25 °C or more and the change difference gradient of the grain humidity value in the last 3 detections (with an interval of 8 hours or more) is 0.5%, the probability of pests occurring in this area is 30.32% (at this time, it is considered that the temperature change is caused by grain condensation rather than pest activity).

[0054] 7) Based on the data of more than 10,000 grain depots across the country, after 3 - 6 cycles, the method in the embodiments of this application will automatically classify data, perform feature learning, etc., and obtain a relatively accurate linear table of pest prediction probabilities. The currently obtained optimal parameters for pest prediction are:

[0055] ① The grain variety is mixed wheat, and the grain age is 2021. If the temperature rise gradient of the grain temperature point at the last 3 grain temperature detection points (with an interval of 8 hours or more) is 0.25 °C or more and the change difference of the grain humidity value at the last 3 detection values (with an interval of 8 hours or more) is within [-0.5, 0.5], the probability of pests occurring in this area is 88.16%;

[0056] ② The grain variety is mixed wheat, and the grain age is 2022. If the temperature rise gradient of the grain temperature point at the last 3 grain temperature detection points (with an interval of 8 hours or more) is 0.25 °C or more and the change difference of the grain humidity value at the last 3 detection values (with an interval of 8 hours or more) is within [-0.5, 0.5], the probability of pests occurring in this area is 87.34%;

[0057] ③ The grain variety is mixed wheat, and the grain age is 2021. If the temperature rise gradient of the grain temperature point at the last 5 grain temperature detection points (with an interval of 8 hours or more) is 0.25 °C or more and the change difference of the grain humidity value at the last 5 detection values (with an interval of 8 hours or more) is within [-0.5, 0.5], the probability of pests occurring in this area is 92.69%;

[0058] ④ The grain variety is mixed wheat, and the grain age is 2022. If the temperature rise gradient of the grain temperature point at the last 5 grain temperature detection points (with an interval of 8 hours or more) is 0.25 °C or more and the change difference of the grain humidity value at the last 5 detection values (with an interval of 8 hours or more) is within [-0.5, 0.5], the probability of pests occurring in this area is 89.29%;

[0059] ⑤ The grain variety is mixed wheat, and the grain age is 2021. If the temperature rise gradient of the grain temperature point at the last 3 grain temperature detection points (with an interval of 8 hours or more) is 0.25 °C or more and the change difference gradient of the grain humidity value at the last 3 detection values (with an interval of 8 hours or more) is 0.5%, the probability of pests occurring in this area is 31.21% (at this time, it is considered that the temperature change is caused by grain dew condensation rather than pest activity);

[0060] ⑥The grain variety is mixed wheat and the grain age is 2022. If the temperature rise gradient of the grain temperature at the grain temperature measurement points in the last 3 measurements (with an interval of 8 hours or more) is 0.25 °C or more and the change difference gradient of the grain humidity value in the last 3 measurements (with an interval of 8 hours or more) is 0.5%, the probability of pests occurring in this area is 29.44% (at this time, it is considered that the temperature change is caused by grain condensation rather than pest activity).

[0061] Based on the same inventive concept, the embodiment of the present application also provides a grain bin pest prediction device based on the Transformer model, and its structure is as Figure 3 shown.

[0062] Figure 3 It is a schematic structural diagram of a grain bin pest prediction device based on the Transformer model provided by the embodiment of the present application. As Figure 3 shown, the grain bin pest prediction device 300 based on the Transformer model in the embodiment of the present application specifically includes: at least one processor 301; and a memory 303 communicatively connected to the at least one processor 301 (connected through a bus 302); wherein, the memory 303 stores instructions that can be executed by the at least one processor 301, so that the at least one processor 301 can execute a grain bin pest prediction method based on the Transformer model as described in the above embodiment.

[0063] In one or more possible implementation manners of the embodiment of the present application, the foregoing processor is configured to execute, after the grain to be predicted is put into the bin, obtain the bin inventory information corresponding to the grain to be predicted, and the bin inventory information at least includes the variety and age of the grain to be predicted; determine the grain temperature measurement points corresponding to the grain to be predicted, and obtain the temperature data and humidity data returned by the sensor cluster deployed at the grain temperature measurement points; after performing standardization processing on the temperature data and humidity data, input them into the Transformer pest prediction model; and output the pest generation probability corresponding to the grain to be predicted by using the Transformer pest prediction model through the variety and age of the grain to be predicted.

[0064] In addition, the embodiment of the present application also provides a non-volatile computer storage medium, on which computer-executable instructions are stored, and the computer-executable instructions are set to execute a grain bin pest prediction method based on the Transformer model as described in the above claims.

[0065] In one or more possible implementation manners of the embodiments of the present application, the aforementioned computer-executable instructions are set to execute. After the grain to be predicted is stored in the warehouse, obtain the warehouse inventory information corresponding to the grain to be predicted, where the warehouse inventory information at least includes the variety and age of the grain to be predicted; determine the grain temperature detection points corresponding to the grain to be predicted, and obtain the temperature data and humidity data returned by the sensor cluster deployed at the grain temperature detection points; after performing standardization processing on the temperature data and humidity data, input them into the Transformer pest prediction model; through the variety and age of the grain to be predicted, use the Transformer pest prediction model to output the pest generation probability corresponding to the grain to be predicted.

[0066] Those skilled in the art should understand that the embodiments of this specification can be provided as a method, system, or computer program product. Therefore, the embodiments of this specification can take the form of an all-hardware embodiment, an all-software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0067] This specification is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0068] It should also be noted that the term "including", "comprising", or any other variant thereof is intended to cover a non-exclusive inclusion, so that a process, method, commodity, or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, commodity, or device. Without further limitations, the element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, commodity, or device including the element.

[0069] This specification can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0070] Each embodiment in this specification is described in a progressive manner. For the parts that are the same or similar among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of devices, apparatuses, and non-volatile computer storage media, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments.

[0071] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the specific order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0072] The above is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, various changes and modifications can be made to one or more embodiments of this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of one or more embodiments of this specification shall be included within the scope of the claims of this specification.

Claims

1. A method for predicting grain storage pests based on the Transformer model, characterized in that, The method includes: After the grain to be predicted is stored in the warehouse, obtaining the warehouse inventory information corresponding to the grain to be predicted, where the warehouse inventory information at least includes the variety and storage years of the grain to be predicted; Determining the grain temperature detection points corresponding to the grain to be predicted, encoding the positions of each grain temperature detection point in the grain to be predicted, and obtaining the temperature data and humidity data returned by the sensor cluster deployed at the grain temperature detection points; After performing standardization processing on the temperature data and humidity data, input them together with the position encoding of each grain temperature detection point into the Transformer pest prediction model; Using the variety and storage years of the grain to be predicted, outputting the pest generation probability corresponding to the grain to be predicted by the Transformer pest prediction model, including: respectively obtaining the temperature change gradient value output by the Transformer pest prediction model according to the temperature data and the humidity change difference interval or humidity change difference gradient value output according to the humidity data, and determining the pest generation probability corresponding to the grain to be predicted through the variety and storage years corresponding to the grain to be predicted based on the temperature change gradient value and the humidity change difference interval or humidity change difference gradient value.

2. The method for predicting grain storage pests based on the Transformer model according to claim 1, wherein, When the grain to be predicted is stored in the warehouse, the method further includes: If the grain to be predicted is stored in an empty warehouse, generating a warehouse inventory ledger corresponding to the empty warehouse and writing the warehouse inventory information on the warehouse inventory ledger; If the grain to be predicted is stored in a non-empty warehouse, writing the warehouse inventory information on the warehouse inventory ledger of the non-empty corresponding warehouse; The warehouse inventory information at least further includes the origin and grade of the grain to be predicted.

3. A method for predicting grain storage pests based on the Transformer model according to claim 1, characterized in that, Obtaining the temperature data and humidity data returned by the sensor cluster deployed at the grain temperature detection points specifically includes: The grain temperature detection points are evenly deployed inside the grain to be predicted; Obtaining the temperature data returned by the temperature sensors deployed at the grain temperature detection points and the humidity data returned by the humidity sensors deployed at the grain temperature detection points.

4. A method for predicting grain storage pests based on the Transformer model according to claim 3, characterized in that, Obtaining the temperature data and humidity data returned by the sensor cluster deployed at the grain temperature detection points specifically further includes: Obtaining the temperature data returned by the temperature measurement cable evenly deployed inside the grain to be predicted.

5. A method for predicting grain storage pests based on the Transformer model according to claim 1, characterized in that, Performing standardization processing on the temperature data and humidity data specifically includes: For the temperature data and humidity data of each grain temperature detection point, respectively determining the maximum value and the minimum value; Calculating the ratio of the difference between the temperature data and humidity data and the minimum value to the difference between the maximum value and the minimum value; Using the ratio to update the temperature data and humidity data corresponding to each grain temperature detection point.

6. The method for predicting grain storage pests based on the Transformer model according to claim 5, characterized in that, After performing standardization processing on the temperature data and humidity data and inputting them into the Transformer pest prediction model, specifically includes: Inputting the updated temperature data and humidity data of each grain temperature detection point into the Transformer pest prediction model; The Transformer pest prediction model is implemented by a neural network model with an encoder-decoder structure.

7. A grain bin pest prediction device based on a Transformer model, characterized in that, The device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor to enable the at least one processor to execute a method for predicting grain storage pests based on a Transformer model according to any one of claims 1-6.

8. A non-volatile computer storage medium having computer-executable instructions stored thereon, characterized in that, The computer-executable instructions are configured to execute a method for predicting grain storage pests based on a Transformer model according to any one of claims 1-6.

Citation Information

Patent Citations

  • Storage grain pest multi-dimensional information acquisition and early warning method based on mobile terminal

    CN115100471A