Lucid ganoderma disease and pest prediction method and device and electronic equipment
By employing a multimodal fusion prediction method, and utilizing environmental sensors and image acquisition devices combined with lightweight models and adaptive modules, the problem of singular environmental monitoring and extensive control strategies in Ganoderma lucidum cultivation for disease and pest prediction is solved. This enables dynamic assessment and intelligent monitoring of Ganoderma lucidum diseases and pests, improving the pertinence and foresight of disease and pest risk assessment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-03
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies for predicting pests and diseases in Ganoderma lucidum cultivation suffer from problems such as limited environmental monitoring dimensions, crude control strategies, lack of differentiated regulation, and insufficient post-event detection, resulting in insufficient robustness in pest and disease prediction and an inability to predict risks in a timely manner.
A multimodal fusion prediction method is adopted. Data collected by environmental sensors is cleaned, normalized and reconstructed. Environmental features are extracted using a lightweight BERT model. Combined with random forest classification and growth stage rules, pest detection is performed using an image acquisition device. Using the YOLO-PEST architecture and low-rank adaptive module, a multimodal fusion feature vector is generated. Finally, the type and level of pests and diseases are predicted through a fully connected prediction network.
It enables dynamic reflection of growth status changes in Ganoderma lucidum disease and pest prediction, improves the pertinence and foresight of disease and pest risk assessment, realizes intelligent monitoring of the entire chain, and enhances the practical value of Ganoderma lucidum cultivation and management.
Smart Images

Figure CN121786761A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Ganoderma lucidum cultivation technology, specifically to a method, device, and electronic equipment for predicting diseases and pests of Ganoderma lucidum. Background Technology
[0002] Reishi mushroom, an important medicinal fungus, possesses high medicinal and economic value. Its growth process is extremely sensitive to environmental conditions. Reishi mushrooms have different requirements for environmental factors such as temperature, humidity, light, carbon dioxide concentration, and water conditions at different growth stages. Simultaneously, it is susceptible to various pests during its growth. Improper environmental control or untimely pest and disease control can easily lead to slow growth, decreased quality, and even large-scale yield reduction, causing significant economic losses to producers.
[0003] Currently, Ganoderma lucidum cultivation and management mainly rely on manual experience or semi-automated control methods. Some existing technologies monitor single or a few environmental parameters by deploying temperature and humidity sensors in the Ganoderma lucidum field, and then perform simple environmental adjustments based on preset thresholds, such as turning on ventilation, humidification, or supplemental lighting. While these methods improve management efficiency to some extent, they generally have the following shortcomings: First, the environmental monitoring dimensions are relatively limited, making it difficult to comprehensively reflect the true environmental conditions of the Ganoderma lucidum field; second, most control strategies are based on static threshold rules, failing to fully consider the cumulative impact of environmental parameter changes over time on Ganoderma lucidum growth; and third, there is a lack of detailed modeling of the differentiated needs of Ganoderma lucidum at different growth stages, resulting in relatively crude control strategies.
[0004] With the development of image recognition and machine learning technologies, some studies have attempted to use image recognition techniques to detect crop diseases and pests. For example, pest target detection models based on convolutional neural networks are used to identify the type and quantity of pests in images. However, existing technologies mostly focus on information processing of a single image modality, resulting in insufficient robustness in disease and pest prediction. Furthermore, existing disease and pest identification methods are mostly post-event detections, making it difficult to predict the risk of disease and pest occurrence in a timely manner and failing to provide effective support for early prevention and control.
[0005] How to accurately and effectively predict diseases and pests affecting Ganoderma lucidum has become an urgent technical problem to be solved. Summary of the Invention
[0006] The purpose of this application is to provide a method, device, and electronic device for predicting diseases and pests of Ganoderma lucidum, and the specific technical solution adopted is as follows: Firstly, a method for predicting diseases and pests of Ganoderma lucidum is provided, the method comprising: The environmental time-series data collected by environmental sensors is cleaned, normalized, and reconstructed. The processed environmental time-series data is then input into a lightweight BERT model, and environmental feature vectors are extracted through a self-attention mechanism. The environmental feature vector is input into the first random forest classification model, and combined with preliminary constraints based on growth cycle information and growth stage rules, the current growth stage of Ganoderma lucidum is determined. The environmental feature vector and the current growth stage are input into the growth prediction model, and the growth suitability, growth rate range and growth stage transition time probability of Ganoderma lucidum are output as the growth prediction result. The Ganoderma lucidum image data acquired by the image acquisition device is input into the pest detection model based on the YOLO-PEST architecture and introducing a low-rank adaptive module to extract image feature vectors that represent the pest category, quantity and spatial distribution. The environmental feature vector, the current growth stage, the growth prediction result, and the image feature vector are concatenated to obtain a multimodal fusion feature; the current growth stage is used as a control signal, and the multimodal fusion feature is weighted through an attention mechanism to generate a multimodal fusion feature vector; The multimodal fusion feature vector is input into a fully connected prediction network to predict the type and severity of diseases and pests affecting Ganoderma lucidum.
[0007] Secondly, a device for predicting diseases and pests of Ganoderma lucidum is provided, the device comprising: The first extraction module is used to clean, normalize and reconstruct the environmental time-series data collected by environmental sensors, and input the processed environmental time-series data into the lightweight BERT model to extract environmental feature vectors through the self-attention mechanism. The determination module is used to input the environmental feature vector into the first random forest classification model and, in combination with preliminary constraints based on growth cycle information and growth stage rules, determine the current growth stage of Ganoderma lucidum. The first prediction module is used to input the environmental feature vector and the current growth stage into the growth prediction model, and output the growth suitability, growth rate range and growth stage transition time probability of Ganoderma lucidum as the growth prediction result. The second extraction module is used to input the Ganoderma lucidum image data acquired by the image acquisition device into the pest detection model based on the YOLO-PEST architecture and introducing a low-rank adaptive module, and extract image feature vectors that characterize the pest category, quantity and spatial distribution. The generation module is used to concatenate the environmental feature vector, the current growth stage, the growth prediction result, and the image feature vector to obtain a multimodal fusion feature; using the current growth stage as a control signal, the multimodal fusion feature is weighted through an attention mechanism to generate a multimodal fusion feature vector; The second prediction module is used to input the multimodal fused feature vector into a fully connected prediction network to predict the type and severity of diseases and pests affecting Ganoderma lucidum.
[0008] Thirdly, an electronic device is provided, comprising: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to perform the method in any of the possible implementations described above.
[0009] Fourthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to perform the method in any of the possible implementations described above.
[0010] This application offers the following advantages: by fusing environmental feature vectors, image feature vectors, growth stage information, and growth prediction results into multiple modalities, pest and disease prediction can dynamically reflect changes in the growth status of Ganoderma lucidum, significantly improving the relevance and foresight of pest and disease risk assessment. Through multi-model collaboration and multi-modal fusion, it achieves intelligent monitoring across the entire chain, from environmental perception to growth stage determination, growth prediction, and pest and disease diagnosis, demonstrating high practical value for Ganoderma lucidum cultivation. Attached Figure Description
[0011] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 A flowchart illustrating a method for predicting diseases and pests of Ganoderma lucidum provided in this application embodiment; Figure 2 A schematic diagram of the structure of a Ganoderma lucidum pest and disease prediction device provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a computer block device provided in an embodiment of this application. Detailed Implementation
[0013] To further illustrate the technical means and effects adopted by this application to achieve the intended purpose of the invention, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a method for predicting diseases and pests of Ganoderma lucidum according to this application. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined from any suitable form.
[0014] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.
[0015] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0016] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.
[0017] This application provides a method for predicting diseases and pests affecting Ganoderma lucidum, such as... Figure 1 As shown, this can be achieved through the following steps: Step S110: Perform data cleaning, normalization and sequence reconstruction on the environmental time-series data collected by environmental sensors, and input the processed environmental time-series data into the lightweight BERT model to extract environmental feature vectors through the self-attention mechanism. Here, various environmental sensors and image acquisition devices can be deployed in the Ganoderma lucidum field to collect environmental data of the Ganoderma lucidum field in real time. The environmental data includes at least air temperature, relative humidity, soil moisture content, carbon dioxide concentration, and light intensity.
[0018] Environmental time-series data is derived from the collected raw environmental data and can characterize the time-series data of the collection period.
[0019] During implementation, computation can be reduced through model pruning (such as removing some attention heads), knowledge distillation, or parameter sharing (such as weight-sharing Transformer layers) to obtain a lightweight BERT model adapted to edge computing scenarios (such as IoT devices in planting bases).
[0020] The lightweight BERT model prunes the structure by reducing the number of encoding layers and the dimension of hidden layers, thereby reducing computational complexity while maintaining feature representation capabilities.
[0021] Self-attention mechanisms can capture long-term dependencies between environmental parameters (such as the effect of continuous high temperatures on the development of Ganoderma lucidum fruiting bodies). Environmental time-series data usually have strong periodicity and continuity. In real-time processes, position encoding can be added to the token embedding layer of BERT to enhance the time-series awareness capability.
[0022] By inputting environmental time-series data into a lightweight BERT model, the changing relationships of environmental variables over time can be modeled through a self-attention mechanism. High-dimensional environmental features, representing the overall environmental state and trends of the Ganoderma lucidum field, can be extracted and used as a unified environmental feature representation for subsequent models. These high-dimensional environmental features can serve as important input features for determining growth stages, predicting growth, and forecasting pests and diseases.
[0023] Step S120: Input the environmental feature vector into the first random forest classification model, and combine it with the preliminary constraints based on growth cycle information and growth stage rules to determine the current growth stage of Ganoderma lucidum. Here, random forests excel at handling high-dimensional, non-linear structured data and are robust to noise in environmental features. Through the ensemble voting mechanism of multiple trees, the risk of overfitting by a single tree can be effectively reduced, making it suitable for multi-classification tasks, such as classifying the mycelial stage, primordium stage, fruiting body stage, maturity stage, and harvesting stage of Ganoderma lucidum.
[0024] During implementation, the environmental characteristics are input into the first random forest classification model to classify and determine the current growth stage of Ganoderma lucidum. The first random forest model outputs the probability value corresponding to each growth stage, and the growth stage with the highest probability value is selected as the determination result of the current growth stage of Ganoderma lucidum.
[0025] The random forest classification model is trained based on environmental features and growth cycle information, and its output growth stage probability is used to comprehensively determine the current growth stage of Ganoderma lucidum. The growth stage determination result can serve as important prior information for subsequent growth status prediction and pest and disease prediction.
[0026] Step S130: Input the environmental feature vector and the current growth stage into the growth prediction model, and output the growth suitability, growth rate range and growth stage transition time probability of Ganoderma lucidum as the growth prediction result. Here, the growth prediction model includes at least the second random forest model and the multilayer perceptron model; During implementation, the second random forest model can be used to predict the growth suitability and growth rate range of Ganoderma lucidum at the current growth stage based on environmental characteristics and the current growth stage.
[0027] The time probability of Ganoderma lucidum transitioning to the next growth stage is predicted using a multilayer perceptron model based on environmental characteristics and the current growth stage.
[0028] Based on the above analysis of the growth suitability and growth rate range of Ganoderma lucidum in the current growth stage, the time probability of Ganoderma lucidum transitioning to the next growth stage can be used to obtain the growth prediction result of Ganoderma lucidum. This growth prediction result can characterize the growth status and future trend of Ganoderma lucidum under the current environmental conditions.
[0029] Step S140: Input the Ganoderma lucidum image data acquired by the image acquisition device into the pest detection model based on the YOLO-PEST architecture and introducing a low-rank adaptive module, and extract image feature vectors representing the pest category, quantity and spatial distribution. Here, the low-rank adaptive module is used to make small adaptive adjustments to the model parameters without significantly changing the original pest detection model parameter scale, so that the pest detection model can adapt to the specific lighting, background and pest species distribution characteristics of the Ganoderma lucidum field.
[0030] During implementation, the adjusted pest model can be used to detect and identify pests in Ganoderma lucidum field images, and while completing pest target detection, image features used to characterize pest categories, quantities and spatial distribution can be extracted.
[0031] Image feature vectors can characterize the category, quantity, and spatial distribution of pests, and are used to characterize the occurrence of pests in Ganoderma lucidum fields. Image feature vectors serve as one of the input features for multimodal pest and disease prediction.
[0032] Step S150: Concatenate the environmental feature vector, the current growth stage, the growth prediction result, and the image feature vector to obtain a multimodal fusion feature; using the current growth stage as a control signal, perform weighted processing on the multimodal fusion feature through an attention mechanism to generate a multimodal fusion feature vector; During implementation, the standardized environmental features, growth stage embedding vectors, growth prediction results, and image features can be directly concatenated into a multi-dimensional fusion feature. If the dimensionality of the concatenated multi-modal fusion feature is too high, it can be optimized by dimensionality reduction through subsequent fully connected layers or by introducing an attention mechanism.
[0033] Then, using the current growth stage as a control signal, the multimodal fusion features are weighted through an attention mechanism to generate a multimodal fusion feature vector. The attention mechanism assigns corresponding weights to different modal features, dynamically adjusting the contribution of each modal feature to pest and disease prediction based on the current growth stage of Ganoderma lucidum and environmental conditions, thereby strengthening feature information highly correlated with pest and disease occurrence. During implementation, feature weighting and concatenation can be performed based on feature importance.
[0034] For example, by using random forest feature importance analysis, environmental features are assigned a weight of 0.4, image features 0.3, growth stage 0.2, and prediction result 0.1, thus achieving weighted stitching and enhancing the influence of key features.
[0035] A multimodal attention mechanism is introduced to dynamically allocate the weights of features from each modality. For example, the sub-entity stage focuses more on illumination and image features, while the mycelium stage focuses more on temperature and humidity features. By adjusting the importance of features through attention weights, the fusion effectiveness is improved.
[0036] Step S160: Input the multimodal fusion feature vector into the fully connected prediction network and output the pest and disease type and level of Ganoderma lucidum.
[0037] Here, the fully connected network acts as a classifier, capable of learning joint representations of multimodal features to perform multi-label classification of pest and disease types and levels.
[0038] In this embodiment, environmental features, image features, growth stage information, and growth prediction results are fused using a multimodal approach. This enables pest and disease prediction to dynamically reflect changes in the growth status of Ganoderma lucidum, significantly improving the relevance and foresight of pest and disease risk assessment. Through multi-model collaboration and multimodal fusion, intelligent monitoring across the entire chain—from environmental perception to growth stage determination, growth prediction, and pest and disease diagnosis—is achieved, demonstrating high practical value for Ganoderma lucidum cultivation.
[0039] In some embodiments, step S110 above, "performing data cleaning, normalization, and sequence reconstruction processing on environmental time-series data collected by environmental sensors, inputting the processed environmental time-series data into a lightweight BERT model, and extracting environmental feature vectors through a self-attention mechanism," can be achieved through the following steps: Step 111: Perform data cleaning on the environmental time series data to remove outliers and fill in missing values to obtain environmental time series data of different dimensions. The cleaning includes outlier detection based on threshold rules and statistical characteristics, and filling in missing values using difference or historical mean. During implementation, the original environmental time-series data is first cleaned to remove outliers and missing values. The data cleaning process includes outlier detection based on threshold rules and statistical characteristics, and missing values are filled in using interpolation or historical averages.
[0040] For example, traditional threshold rules are usually based on a fixed range (such as a temperature of 15 to 30°C), but the tolerance thresholds of Ganoderma lucidum to the environment vary at different growth stages. For instance, the mycelial growth stage is more tolerant of high temperatures (acceptable to 28 to 32°C), while the fruiting body stage requires strict control at 22 to 26°C. A dynamic threshold table related to the growth stage can be introduced, and the outlier detection rules can be dynamically adjusted through stage identifiers.
[0041] Building upon outlier detection based on mean and standard deviation, interquartile range (IQR) or clustering-based methods (such as DBSCAN) can be introduced to improve robustness to non-Gaussian distributed data. For example, outliers in light intensity may exhibit a bimodal distribution (a combination of natural and artificial lighting), and clustering can be used to identify genuine outliers.
[0042] Historical mean values are suitable for short-term missing values, but long-term or consecutive missing values can be predicted and filled using more complex interpolation methods (such as linear interpolation and spline interpolation) or time series models (such as ARIMA and Prophet). For example, missing temperatures for three consecutive hours can be dynamically predicted by combining data from adjacent time periods with weather forecasts.
[0043] Step 112: Normalize the environmental time series data with different dimensions to obtain normalized data in which all environmental data are within a uniform numerical range; Here, normalization includes Min-Max scaling and Z-Score standardization. Min-Max scaling is suitable for data with a concentrated distribution and no significant outliers, maintaining the relative proportions between data points. Z-Score standardization, by adjusting the mean and standard deviation, is more suitable for data with extreme values or skewed distributions (such as the Gaussian distribution of humidity data). During implementation, the normalization method can be dynamically selected based on the distribution characteristics of environmental variables. For example, Z-Score can be used for approximately normally distributed data such as temperature and light intensity, while Min-Max can be used for concentratedly distributed data such as humidity.
[0044] In some embodiments, the distribution characteristics of environmental parameters may change as the Ganoderma lucidum grows (e.g., higher humidity requirements during the fruiting body stage). A stage-related normalized parameter table can be introduced to achieve dynamic range adjustment and avoid feature distortion caused by a fixed normalization range.
[0045] During implementation, a normalization method can be set to ensure that the environmental data obtained through normalization are within a uniform numerical range.
[0046] Step 113: Use a sliding window to reconstruct the normalized data at consecutive time points, and convert the normalized data into time series samples that meet a preset length, wherein the sliding window can cover at least one growth cycle. During implementation, a sliding time window approach can be used to reconstruct the environmental data at consecutive time points, converting the environmental time series data into time series input samples of fixed length.
[0047] Here, the length of the sliding time window can be set according to the growth characteristics of Ganoderma lucidum to cover at least one growth response cycle, so that the reconstructed environmental time-series data can reflect the cumulative impact of environmental changes on the growth of Ganoderma lucidum and the occurrence of pests and diseases. The growth response cycle of Ganoderma lucidum needs to be determined through experimental data. For example, the response cycle of the mycelial growth stage may be 24-48 hours (cumulative temperature effect), while that of the fruiting body stage may be shortened to 12-24 hours (response to light change). The optimal window length can be determined through time-series correlation analysis (such as autocorrelation function ACF) or growth experimental data to ensure coverage of at least one complete response cycle.
[0048] Step 114: Input the time series samples into the lightweight BERT model and extract the environmental features through a self-attention mechanism. The lightweight BERT model is obtained by pruning based on a preset number of encoding layers and hidden layer dimensions.
[0049] During implementation, the reconstructed environmental time-series data is input into a lightweight BERT model. The self-attention mechanism is used to model the relationship between environmental variables in the time dimension, and high-dimensional environmental features are extracted to characterize the overall environmental state and trend of Ganoderma lucidum fields.
[0050] The lightweight BERT model prunes its structure by reducing the number of encoding layers and the dimension of hidden layers, thereby reducing computational complexity while maintaining feature expressiveness. Its output high-dimensional environmental features serve as a unified environmental feature representation for subsequent models. These high-dimensional environmental features are important input features for growth stage determination, growth prediction, and pest and disease prediction.
[0051] This application provides a method for extracting environmental time-series features for Ganoderma lucidum growth characteristics. By cleaning, normalizing and reconstructing environmental data, and using a lightweight time-series feature modeling model to characterize the cumulative impact of environmental changes, environmental features that can reflect the overall environmental state and changing trends of Ganoderma lucidum fields are extracted.
[0052] In some embodiments, the above step S120, "inputting the environmental feature vector into the first random forest classification model and combining it with preliminary constraints based on growth cycle information and growth stage rules to determine the current growth stage of Ganoderma lucidum," can be achieved through the following steps: Step 121: Based on the environmental feature vector, preset growth cycle information and growth stage rules, the current growth stage of Ganoderma lucidum is initially constrained, wherein the growth stage rules are determined based on Ganoderma lucidum cultivation procedures and historical production data. Here, the growth stage rules are formulated based on the standardized cultivation procedures and historical production data of Ganoderma lucidum. They are used to initially constrain the growth stage that Ganoderma lucidum may be in, so as to avoid the model outputting stage results that do not conform to the actual growth logic.
[0053] During implementation, the possible growth stages of Ganoderma lucidum can be initially constrained based on environmental characteristics, growth cycle time information, and preset growth stage rules. The growth stages include at least the mycelial stage, primordium stage, fruiting body stage, maturity stage, and harvesting stage.
[0054] Step 122: Based on the preliminary constraints, input the environmental feature vector into the first random forest classification model to obtain the probability values corresponding to the multiple preset Ganoderma lucidum growth stages. Here, the first random forest classification model is trained based on environmental features and growth cycle information, and its output growth stage probability is used to comprehensively determine the current growth stage of Ganoderma lucidum.
[0055] Based on the initial constraints, the environmental characteristics are input into the first random forest classification model to classify and determine the current growth stage of Ganoderma lucidum. The first random forest model can output the probability value corresponding to each growth stage.
[0056] Step 123: Determine the growth stage with the highest probability value as the current growth stage of the Ganoderma lucidum.
[0057] During implementation, the growth stage with the highest probability value is selected as the current growth stage of Ganoderma lucidum. This growth stage determination serves as important prior information for subsequent growth status prediction and pest and disease prediction.
[0058] In this embodiment, the automatic determination of the growth stage of Ganoderma lucidum is realized. Based on the constraints of environmental characteristics, growth cycle information and growth stage rules, the machine learning model can accurately classify the current growth stage of Ganoderma lucidum, providing reliable prior information for subsequent growth prediction and pest and disease prediction.
[0059] In some embodiments, the growth prediction model includes a second random forest model and a multilayer perceptron model; the step S130 above, "inputting the environmental feature vector and the current growth stage into the growth prediction model, and outputting the growth suitability, growth rate range, and growth stage transition time probability of Ganoderma lucidum as the growth prediction result," can be achieved through the following steps: Step 131: Input the environmental feature vector and the current growth stage of Ganoderma lucidum into the second random forest model to predict the growth suitability and growth rate range of Ganoderma lucidum in the current growth stage; Here, the stage labels (such as mycelial growth, fruiting body differentiation, and maturity) obtained through the first random forest classification can be transformed into numerical features (such as one-heat encoding or embedding vectors) as model input to capture stage-related differences in growth characteristics. For example, the mycelial stage is more sensitive to the accumulation of temperature, while the fruiting body stage is more sensitive to light fluctuations.
[0060] Growth suitability can be defined based on the physiological characteristics of Ganoderma lucidum. It can characterize whether the current environmental conditions are beneficial to the growth of Ganoderma lucidum and can be set as a continuous value from 0 to 1 to reflect the degree to which the current environment promotes the growth of Ganoderma lucidum. For example, the ideal environmental parameter range (such as temperature 22-26℃, humidity 80-90%) can be obtained by fitting historical data, and the similarity between the current environmental parameters and the ideal range (such as Euclidean distance, cosine similarity) can be calculated as the suitability.
[0061] A second random forest regression model is employed, with environmental characteristics and growth stage as inputs and growth suitability as output. Through ensemble learning of multiple trees, the model captures nonlinear interactions between environmental parameters (such as the synergistic effect of temperature and humidity). For example, a high-temperature and high-humidity environment may be suitable for mycelial growth but not for fruiting body development; the model can identify key influencing factors through feature importance analysis.
[0062] Growth rate ranges can be defined based on the characteristics of Ganoderma lucidum's growth stages, representing the range of growth speed at the current stage. For example, the mycelial stage can be divided into "fast" (>1cm / week), "medium" (0.5-1cm / week), and "slow" (<0.5cm / week), while the fruiting body stage can be divided into "fast" (>5g / day), "medium" (2-5g / day), and "slow" (<2g / day). The classification criteria can be determined through experimental data or expert knowledge.
[0063] A second random forest classification model is employed, with environmental characteristics and growth stage as input and growth rate intervals as output (multi-classification task). Through an ensemble voting mechanism of trees, the probability distribution of each interval is output, and the interval with the highest probability is taken as the prediction result. For example, the model can identify that a "high temperature + high light" environment leads to an accelerated growth rate of fruiting bodies, while a "low temperature + low humidity" environment leads to a slowed growth rate.
[0064] Step 132: Input the environmental feature vector and the current growth stage of the Ganoderma lucidum into the multilayer perceptron model to predict the probability of the growth stage transition time of the Ganoderma lucidum. Here, the Multilayer Perceptron (MLP) model is a feedforward neural network consisting of an input layer, hidden layers, and an output layer. Through the nonlinear transformation of multiple neurons, it can approximate any continuous function (the universal approximation theorem). The weights and biases are updated using the backpropagation algorithm to minimize the error between the predicted output and the true output.
[0065] The growth stage transition time probability refers to the probability that an organism will transition from its current growth stage (such as the mycelial growth stage of Ganoderma lucidum) to the next stage (such as the fruiting body differentiation stage) under specific environmental conditions. In other words, it represents the likelihood of entering the next growth stage in the future. For example, if it is determined that Ganoderma lucidum is currently in the primordium stage and the environmental conditions remain suitable, the probability of Ganoderma lucidum entering the fruiting body stage within the next 20 days is predicted to be over 80%.
[0066] During implementation, the trained MLP model achieved probabilistic prediction of growth stage transition time by integrating environmental features and growth stage information.
[0067] Step 133: Based on the growth suitability, the growth rate range, and the probability of the growth stage transition time, construct the growth prediction result of Ganoderma lucidum, wherein the growth prediction result is used to characterize the growth status and change trend of Ganoderma lucidum based on the environmental characteristics.
[0068] Here, the growth suitability, growth rate range, and growth stage transition time probability together constitute the Ganoderma lucidum growth prediction results, which are used to characterize the growth status and future trend of Ganoderma lucidum under the current environmental conditions.
[0069] Growth prediction results, as one of the prior input features for pest and disease prediction, are used to reflect the differences in the sensitivity of Ganoderma lucidum to pests and diseases at different growth stages. Growth prediction results can serve as an important reference for pest and disease risk prediction and automated control.
[0070] In this embodiment, the MLP model, by integrating environmental characteristics and growth stage information, achieves probabilistic prediction of growth stage transition time, providing a scientific basis for the regulation of Ganoderma lucidum growth environment and yield optimization. It enables joint prediction of Ganoderma lucidum growth status and trend; given the known growth stage, it predicts the suitability for growth, growth rate range, and growth stage transition trend, comprehensively depicting the growth status and future trends of Ganoderma lucidum under current environmental conditions.
[0071] In some embodiments, this application also provides a method for training a pest detection model, which can be implemented through the following process: When training the pest detection model, a low-rank adaptive module is introduced into the backbone terminal layer and the key layer of the detection head to adjust the parameters.
[0072] During implementation, the collected image data is input into the pest detection model based on YOLO-PEST for processing. To adapt to the specific application scenario of Ganoderma lucidum fields, while retaining more than 90% of the pre-trained parameters in the YOLO-PEST model, a low-rank adaptive module is introduced in the end layer of the backbone network and the key layer of the detection head for lightweight fine-tuning.
[0073] The low-rank adaptive module is used to make small adaptive adjustments to the model parameters without significantly changing the original network parameter scale, so that the pest detection model can adapt to the specific lighting, background and pest species distribution characteristics of Ganoderma lucidum fields.
[0074] In this embodiment, a lightweight adaptive adjustment is made while maintaining the main parameter structure of the original detection model to achieve effective identification of the types, quantities and spatial distribution of pests in Ganoderma lucidum fields.
[0075] In some embodiments, the step S150 above, "using the current growth stage as a control signal, weighting the multimodal fusion features through an attention mechanism to generate a multimodal fusion feature vector," can be achieved through the following steps: Step 151: Adjust the weights of each modality feature in the multimodal fusion feature based on the current growth stage and the environmental features using an attention mechanism to obtain the adjusted weights; By employing self-attention or cross-attention mechanisms, the model can dynamically adjust the weights of each modality (environment, growth stage, growth prediction result, image) based on the input growth stage and environmental features. For example, in the fruiting body stage, the model automatically increases the weights of illumination features and image features, while decreasing the weight of temperature in the mycelial stage.
[0076] Step 152: Based on the adjusted weights, perform weighted processing on the multimodal fusion features to obtain the multimodal fusion feature vector.
[0077] In this embodiment, the attention mechanism can dynamically adjust the weights of each modality in the multimodal fusion features based on the current growth stage and environmental characteristics of Ganoderma lucidum, thereby achieving more accurate growth prediction and disease and pest diagnosis, and supporting the full-link optimization of the intelligent monitoring system for Ganoderma lucidum growth.
[0078] In some embodiments, this application also provides a method for processing environmental data and Ganoderma lucidum image data, which can be implemented through the following steps: Step S170: Collect environmental data in real time using multiple environmental sensors. The environmental data includes at least air temperature, relative humidity, soil moisture content, carbon dioxide concentration, and light intensity. During implementation, various environmental sensors and image acquisition devices were deployed in the Ganoderma lucidum field. The environmental sensors collected environmental data of the Ganoderma lucidum field in real time. The environmental data included at least air temperature, relative humidity, soil moisture content, carbon dioxide concentration, and light intensity.
[0079] Step S180: Add a corresponding timestamp to each environmental data to form continuous environmental time series data; During implementation, a corresponding timestamp is added to each piece of environmental data to form continuous environmental time-series data, i.e., the original environmental time-series data.
[0080] Step S190: Periodically acquire Ganoderma lucidum image data using the image acquisition device, wherein the image acquisition device and the various environmental sensors are time-calibrated through a unified time synchronization module; While performing step S150, image acquisition devices set above or between rows of Ganoderma lucidum are used to periodically acquire Ganoderma lucidum image data that can characterize the growth status of Ganoderma lucidum and the distribution of pests, for subsequent growth analysis and pest detection.
[0081] Here, both the environmental sensors and image acquisition devices are time-calibrated through a unified time synchronization module, which adds a unified timestamp to the collected environmental and image data to ensure consistency of different data sources in the time dimension.
[0082] Preferably, the collected environmental data and image data are labeled with data quality. When abnormal fluctuations in sensor data, blurry images, or occlusions occur, the corresponding data samples are marked for subsequent feature extraction and prediction processes to perform weight reduction or elimination.
[0083] Step S180: Add a corresponding timestamp to the Ganoderma lucidum image data to achieve time synchronization calibration of the environmental time series data and the Ganoderma lucidum image data.
[0084] During implementation, the multi-source data (environmental data and Ganoderma lucidum image data) were uniformly time-calibrated, and the data quality was marked. In the subsequent feature extraction and prediction process, abnormal data were downweighted or removed, which effectively reduced the interference of data noise on the prediction results and improved the reliability of multi-source data fusion analysis.
[0085] This application provides a method for collaborative acquisition and unified time alignment of multi-source data. By synchronously acquiring and time-calibrating Ganoderma lucidum field environmental data and Ganoderma lucidum image data, the consistency of different data sources in the time dimension is ensured, providing a reliable data foundation for subsequent feature extraction and predictive analysis.
[0086] In some embodiments, the pest and disease risk levels include at least low risk, medium risk, and high risk. This application also provides a method for handling the situation after determining the risk level, which can be achieved through the following steps: Step A: If the pest or disease level is determined to be low risk, start the spraying device to spray the agent at a first preset concentration based on a first time interval; Step B: If the pest or disease level is determined to be medium risk, start the spraying device to spray an agent at a second preset concentration based on a second time interval, wherein the second time interval is shorter than the first time interval and the second preset concentration is greater than the first preset concentration; Step C: If the pest or disease level is determined to be high risk, start the spraying device to spray an agent at a third preset concentration based on a third time interval, wherein the third time interval is shorter than the second time interval and the third preset concentration is greater than the second preset concentration.
[0087] During implementation, when the risk level of pests and diseases is low, the targeted spraying device is activated to spray low-concentration targeted agents, and the light intensity is adjusted to a range suitable for the growth of Ganoderma lucidum and to inhibit pests and diseases. When the risk level of pests and diseases is medium or high, activate the full-area atomized spraying mode and shorten the spraying interval. At the same time, dynamically adjust the light intensity according to the type of pests and diseases and their growth stage to reduce the risk of pests and diseases.
[0088] When the confidence level of the pest and disease prediction results falls below a preset threshold or when the prediction results fluctuate significantly across multiple consecutive predictions, the system enters a manual confirmation mode to avoid erroneously triggering automated control operations. The automated control process and its results are recorded for subsequent model training and system optimization.
[0089] In this embodiment, an automated control execution mechanism based on prediction results is implemented. According to the risk level of pests and diseases, growth prediction results and prediction confidence, the spraying device and environmental control device are intelligently controlled. While reducing the risk of pests and diseases, the control operation is avoided by accident, thereby improving the safety and reliability of Ganoderma lucidum field management.
[0090] This application provides a method for predicting diseases and pests of Ganoderma lucidum, which can be achieved through the following steps: Step S10: Ganoderma lucidum field multi-source data collection.
[0091] This step is used to obtain the basic data required for predicting the growth and pests and diseases of Ganoderma lucidum.
[0092] Multiple environmental sensors and image acquisition devices are deployed within the Ganoderma lucidum field. The environmental sensors collect environmental data in real time, including at least air temperature, relative humidity, soil moisture content, carbon dioxide concentration, and light intensity. Each data point is timestamped to create continuous time-series environmental data. Simultaneously, image acquisition devices positioned above or between rows of the field periodically collect images characterizing the growth status of Ganoderma lucidum and the distribution of pests, used for subsequent growth analysis and pest detection. This multi-source data serves as the raw input for subsequent environmental feature extraction, growth prediction, and pest prediction. Furthermore, both the environmental sensors and image acquisition devices undergo time synchronization through a unified time module, attaching a unified timestamp to the collected environmental and image data to ensure consistency across different data sources in the time dimension. Preferably, the collected environmental and image data are labeled for quality. When abnormal fluctuations in sensor data, image blurring, or occlusion occur, the corresponding data samples are marked for subsequent feature extraction and prediction processes involving weight reduction or removal.
[0093] Step S20: Environmental time series data processing and environmental feature extraction.
[0094] This step is used to convert the collected raw environmental data into environmental features that can be used by the predictive model.
[0095] First, the collected environmental time-series data is cleaned to remove outliers and missing values. The data cleaning process includes outlier detection based on threshold rules and statistical characteristics, and missing values are filled in using interpolation or historical mean.
[0096] Secondly, environmental data of different dimensions are normalized to ensure that all environmental variables are within a uniform numerical range. Then, a sliding time window method is used to reconstruct the environmental data at continuous time points, converting the environmental time-series data into fixed-length time-series input samples. The length of the sliding time window is set according to the growth characteristics of Ganoderma lucidum to cover at least one growth response cycle, so that the reconstructed environmental time-series data can reflect the cumulative impact of environmental changes on the growth of Ganoderma lucidum and the occurrence of pests and diseases.
[0097] The reconstructed environmental time-series data is input into a lightweight BERT model. The self-attention mechanism is used to model the relationship between environmental variables in the time dimension, and high-dimensional environmental features are extracted to characterize the overall environmental state and trend of Ganoderma lucidum fields.
[0098] The lightweight BERT model prunes its structure by reducing the number of encoding layers and the dimensionality of hidden layers, thereby reducing computational complexity while maintaining feature expressiveness. Its output high-dimensional environmental features serve as a unified environmental feature representation for subsequent models. These high-dimensional environmental features are important input features for growth stage determination, growth prediction, and pest and disease prediction.
[0099] Step S30: Determining the growth stage of Ganoderma lucidum.
[0100] This step is used to automatically determine the current growth stage of Ganoderma lucidum.
[0101] Based on environmental characteristics, growth cycle time information, and preset growth stage rules, preliminary constraints are imposed on the possible current growth stages of Ganoderma lucidum. Among them, the growth stages include at least the mycelial stage, primordium stage, fruiting body stage, maturity stage, and harvesting stage.
[0102] Based on the initial constraints, environmental features are input into the random forest classification model to classify and determine the current growth stage of Ganoderma lucidum. The random forest model outputs the probability value corresponding to each growth stage, and the growth stage with the highest probability value is selected as the current growth stage of Ganoderma lucidum.
[0103] The growth stage rules are formulated based on the standardized cultivation procedures and historical production data of Ganoderma lucidum. They are used to initially constrain the current growth stage of Ganoderma lucidum to avoid the model outputting stage results that do not conform to the actual growth logic.
[0104] The random forest classification model is trained based on environmental features and growth cycle information. Its output growth stage probability is used to comprehensively determine the current growth stage of Ganoderma lucidum. The growth stage determination result serves as important prior information for subsequent growth status prediction and pest and disease prediction.
[0105] Step S40: Prediction of Ganoderma lucidum growth status and growth trend.
[0106] This step is used to predict the growth status and future growth trend of Ganoderma lucidum based on the determined growth stage.
[0107] The growth stage determination results and environmental characteristics are used as inputs, and then fed into a random forest model and a multilayer perceptron model for prediction, respectively. Random forest models are used to predict the growth suitability and growth rate range of Ganoderma lucidum at the current growth stage. A multilayer perceptron model is used to predict the growth trend of Ganoderma lucidum and the time probability of transitioning to the next growth stage.
[0108] The prediction results of the random forest model and the multilayer perceptron model are fused to obtain the prediction results of the growth status and growth trend of Ganoderma lucidum.
[0109] The growth suitability, growth rate range, and probability of growth stage transition time together constitute the growth prediction results of Ganoderma lucidum, which are used to characterize the growth status and future trend of Ganoderma lucidum under the current environmental conditions.
[0110] Growth prediction results, as one of the prior input features for pest and disease prediction, are used to reflect the differences in the sensitivity of Ganoderma lucidum to pests and diseases at different growth stages. Growth prediction results serve as an important reference for pest and disease risk prediction and automated control.
[0111] Step S50: Pest image detection and image feature extraction.
[0112] This step is used to identify pests in the Ganoderma lucidum field and extract relevant image features of the pests.
[0113] The collected image data is input into the pest detection model based on YOLO-PEST for processing. To adapt to the specific application scenario of Ganoderma lucidum fields, while retaining more than 90% of the pre-trained parameters in the YOLO-PEST model, a low-rank adaptive module is introduced into the end layer of the backbone network and the key layer of the detection head for lightweight fine-tuning.
[0114] The low-rank adaptive module is used to make small adaptive adjustments to the model parameters without significantly changing the original network parameter scale, so that the pest detection model can adapt to the specific lighting, background and pest species distribution characteristics of Ganoderma lucidum fields.
[0115] The pest detection model is used to detect and identify pests in Ganoderma lucidum field images. While completing the pest target detection, image features used to characterize the pest category, quantity and spatial distribution are extracted.
[0116] Image features, including pest category, quantity, and spatial distribution characteristics, are used to characterize the occurrence of pests in Ganoderma lucidum fields. Image features serve as one of the input features for multimodal pest and disease prediction.
[0117] Step S60: Pest and disease prediction by multimodal feature fusion.
[0118] This step is used to generate prediction results for pests and diseases in Ganoderma lucidum fields.
[0119] By splicing together environmental features, image features, growth stage determination results, and growth prediction results, a multimodal fusion feature representation is constructed.
[0120] Multimodal fusion features include environmental modal features, image modal features, growth stage prior features, and growth prediction features.
[0121] By using an attention mechanism to weight multimodal fusion features, the weights of different modal features in pest and disease prediction are dynamically adjusted, thereby strengthening feature information that is highly correlated with the occurrence of pests and diseases.
[0122] The attention mechanism is used to assign corresponding weights to different modal features and dynamically adjust the contribution of each modal feature in the prediction of pests and diseases according to the current growth stage of Ganoderma lucidum and environmental conditions, so as to strengthen the feature information that is highly correlated with the occurrence of pests and diseases.
[0123] The weighted fusion features are input into a fully connected prediction network to predict the types and risk levels of pests and diseases in Ganoderma lucidum fields. The pest and disease risk levels include at least low risk, medium risk, and high risk, and the pest and disease prediction results are obtained.
[0124] The pest and disease prediction results include the pest and disease type and the corresponding risk level. The risk level is used to characterize the likelihood and severity of the occurrence of pests and diseases.
[0125] Step S70: Execution of automated control based on prediction results.
[0126] This step is used to execute the corresponding automated regulation strategy for Ganoderma lucidum fields based on the prediction results.
[0127] Based on the pest and disease forecasts and the Ganoderma lucidum growth forecasts, the spraying device and environmental control device are controlled to perform corresponding control operations, including: When the risk level of pests and diseases is low, activate the directional spraying device to spray low-concentration targeted agents, and adjust the light intensity to a range suitable for the growth of Ganoderma lucidum and inhibiting pests and diseases. When the risk level of pests and diseases is medium or high, activate the full-area atomized spraying mode and shorten the spraying interval. At the same time, dynamically adjust the light intensity according to the type of pests and diseases and their growth stage to reduce the risk of pests and diseases.
[0128] When the confidence level of the pest and disease prediction results falls below a preset threshold or when the prediction results fluctuate significantly across multiple consecutive predictions, the system enters a manual verification mode to avoid accidentally triggering automated control operations. The automated control process and its results are recorded for subsequent model training and system optimization.
[0129] This invention, through the deep integration of multi-source data collaborative sensing, growth prediction, and pest and disease prediction, and the automated regulation driven by prediction results, forms a closed-loop control system covering "sensing-analysis-prediction-execution," which has at least the following significant beneficial effects: 1. Break through the single environmental threshold control method and realize the time-series cumulative modeling of environmental impact.
[0130] Current Ganoderma lucidum cultivation management methods are mostly based on single-moment environmental parameters and fixed thresholds, which are insufficient to reflect the comprehensive impact of long-term environmental changes on Ganoderma lucidum growth and pest and disease occurrence. This application's embodiments, by reconstructing environmental time-series data and extracting high-dimensional time-series environmental features, can characterize the cumulative effect of environmental changes, making growth and pest / disease predictions more consistent with the actual growth response patterns of Ganoderma lucidum, significantly improving the accuracy and stability of predictions.
[0131] 2. Achieve consistent fusion of multi-source heterogeneous data in the time dimension to improve prediction reliability.
[0132] To address the problem of asynchronous and independent use of environmental and image data in existing technologies, this application embodiment performs unified time calibration on multi-source data and identifies data quality. Abnormal data is downweighted or removed during subsequent feature extraction and prediction processes, effectively reducing the interference of data noise on prediction results and improving the reliability of multi-source data fusion analysis.
[0133] 3. Transform the determination of growth stage from experience-based judgment to intelligent judgment under rule constraints.
[0134] In existing technologies, the growth stages of Ganoderma lucidum largely rely on human experience or simple time divisions, which are difficult to adapt to changes in growth rhythms under different environmental conditions. This application's embodiments introduce growth stage rules as constraints based on machine learning model determination, enabling the growth stage determination results to possess both data-driven adaptive capabilities and adherence to the objective laws of Ganoderma lucidum growth. Technically, this avoids unreasonable stage jumps and improves the reliability of growth stage determination.
[0135] 4. For the first time, the growth prediction results of Ganoderma lucidum were used as an important a priori feature for the prediction of diseases and pests.
[0136] Existing pest and disease identification technologies typically rely solely on image or environmental data for assessment, neglecting the significant differences in the susceptibility of Ganoderma lucidum to pests and diseases at different growth stages. This application's embodiments introduce growth prediction results such as growth suitability, growth rate, and stage transition trends as input features for pest and disease prediction. This enables pest and disease prediction to dynamically reflect changes in the growth status of Ganoderma lucidum, significantly improving the relevance and foresight of pest and disease risk assessment.
[0137] 5. Improve the adaptability of pest detection scenarios while maintaining the stability of the original model structure.
[0138] To address the challenges of complex lighting and variable backgrounds in Ganoderma lucidum fields, this application's embodiment retains the main parameter structure of the pest detection model while introducing a low-rank adaptive module for lightweight fine-tuning. This allows for adaptation to specific application scenarios in Ganoderma lucidum fields without large-scale retraining, reducing deployment costs while ensuring pest detection accuracy and real-time performance.
[0139] 6. Enhance key information through multimodal attention mechanisms to reduce the risk of single-modal failure.
[0140] This application embodiment integrates environmental features, image features, growth stage information, and growth prediction results into a multimodal model. It also dynamically adjusts the weights of each modal feature based on the current environmental state and growth stage through an attention mechanism. This effectively avoids the problem of inaccurate prediction due to image occlusion or single sensor anomaly, and improves the robustness of pest and disease prediction results.
[0141] 7. Achieve differentiated automatic adjustment driven by prediction results, avoiding over- or erroneous adjustment.
[0142] Existing automated control technologies are mostly based on direct triggering of execution based on a single detection result, which can easily lead to over-spraying or unnecessary environmental intervention due to misjudgment. The embodiments of this application implement differentiated spraying and environmental control strategies based on the pest and disease risk level, growth prediction results, and prediction confidence level, and introduce a manual confirmation mechanism when the prediction results are unstable, thereby technically reducing the probability of false triggering and improving the safety and economy of control execution.
[0143] 8. Construct a sustainable and optimized closed-loop control system to improve the overall intelligence level of the system.
[0144] The embodiments of this application record and feed back the prediction results and the control execution process for subsequent model training and system optimization, forming a self-learning and self-optimizing closed-loop control mechanism that can adapt to different Ganoderma lucidum planting environments and management needs, and has good scalability and long-term application value.
[0145] This application provides a device for predicting diseases and pests of Ganoderma lucidum. Please refer to [link / reference]. Figure 2 The system 200 includes: The first extraction module 210 is used to perform data cleaning, normalization and sequence reconstruction processing on environmental time-series data collected by environmental sensors, and input the processed environmental time-series data into a lightweight BERT model to extract environmental feature vectors through a self-attention mechanism. The determination module 220 is used to input the environmental feature vector into the first random forest classification model and, in combination with the preliminary constraints based on growth cycle information and growth stage rules, determine the current growth stage of Ganoderma lucidum. The first prediction module 230 is used to input the environmental feature vector and the current growth stage into the growth prediction model, and output the growth suitability, growth rate range and growth stage transition time probability of Ganoderma lucidum as the growth prediction result. The second extraction module 240 is used to input the Ganoderma lucidum image data acquired by the image acquisition device into a pest detection model based on the YOLO-PEST architecture and introducing a low-rank adaptive module, and extract image feature vectors representing the pest category, quantity and spatial distribution. The generation module 250 is used to concatenate the environmental feature vector, the current growth stage, the growth prediction result, and the image feature vector to obtain a multimodal fusion feature; and to use the current growth stage as a control signal to perform weighted processing on the multimodal fusion feature through an attention mechanism to generate a multimodal fusion feature vector. The second prediction module 260 is used to input the multimodal fusion feature vector into the fully connected prediction network and output the pest and disease type and level of Ganoderma lucidum.
[0146] Figure 3 This is a schematic diagram of the structure of a computer block device provided in an embodiment of this application. For example, as shown... Figure 3 As shown, the computer block device 300 includes: a memory 301, a processor 302, and a computer program 303 stored in the memory 301 and running on the processor 302, wherein when the processor 302 executes the computer program 303, the computer block device can execute any of the aforementioned methods for predicting diseases and pests of Ganoderma lucidum.
[0147] Furthermore, this application also protects a control block device, which may include a memory and a processor. The memory stores executable program code, and the processor is used to call and execute the executable program code to perform a method for predicting diseases and pests of Ganoderma lucidum provided in this application. This application can divide the control block device into functional modules based on the above method example. For example, each module may correspond to a specific function, or two or more functions may be integrated into a processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this application is illustrative and only represents a logical functional division; other division methods may exist in actual implementation. It should also be noted that all relevant content of each step involved in the above method embodiment can be referenced to the functional description of the corresponding functional module, and will not be repeated here. It should be understood that the control block device provided in this application is used to execute the above-mentioned method for predicting diseases and pests of Ganoderma lucidum, and therefore can achieve the same effect as the above-described implementation method. When using integrated units, the control block device may include a processing module and a storage module. When the control block device is applied to a block device, the processing module can be used to control and manage the actions of the block device. The storage module can be used to support block devices in executing mutual program code, etc. The processing module can be a processor or controller, which can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and microprocessors, etc., and the storage module can be a memory.
[0148] Furthermore, the control block device provided in the embodiments of this application may specifically be a chip, component, or module. The chip may include a connected processor and a memory; wherein, the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute the Ganoderma lucidum disease and pest prediction method provided in the above embodiments. The embodiments of this application also provide a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, it causes the computer to execute the aforementioned method steps to implement the Ganoderma lucidum disease and pest prediction method provided in the above embodiments.
[0149] This application also provides a computer program product. When the computer program product is run on a computer, it causes the computer to perform the above-mentioned related steps to realize the method for predicting diseases and pests of Ganoderma lucidum provided in the above embodiments. The control block device, computer-readable storage medium, computer program product, or chip provided in this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here. Through the description of the above embodiments, those skilled in the art can understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the control block device can be divided into different functional modules to complete all or part of the functions described above. In the embodiments provided in this application, it should be understood that the disclosed control block device and method can be implemented in other ways. For example, the control block device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another control block device, 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 an indirect coupling or communication connection through some interface, control block device or unit, and can be electrical, mechanical or other forms.
[0150] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multiple task processing and parallel processing are possible or may be advantageous. The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. The above content is only a specific implementation of this application, but the protection scope of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application.
Claims
1. A method for predicting diseases and pests of Ganoderma lucidum, characterized in that, The method includes: The environmental time-series data collected by environmental sensors is cleaned, normalized, and reconstructed. The processed environmental time-series data is then input into a lightweight BERT model, and environmental feature vectors are extracted through a self-attention mechanism. The environmental feature vector is input into the first random forest classification model, and combined with preliminary constraints based on growth cycle information and growth stage rules, the current growth stage of Ganoderma lucidum is determined. The environmental feature vector and the current growth stage are input into the growth prediction model, and the growth suitability, growth rate range and growth stage transition time probability of Ganoderma lucidum are output as the growth prediction result. The Ganoderma lucidum image data acquired by the image acquisition device is input into the pest detection model based on the YOLO-PEST architecture and introducing a low-rank adaptive module to extract image feature vectors that represent the pest category, quantity and spatial distribution. The environmental feature vector, the current growth stage, the growth prediction result, and the image feature vector are concatenated to obtain a multimodal fusion feature; the current growth stage is used as a control signal, and the multimodal fusion feature is weighted through an attention mechanism to generate a multimodal fusion feature vector; The multimodal fusion feature vector is input into a fully connected prediction network, which outputs the pest and disease type and severity of Ganoderma lucidum.
2. The method as described in claim 1, characterized in that, The process involves cleaning, normalizing, and reconstructing the environmental time-series data collected by environmental sensors. The processed environmental time-series data is then input into a lightweight BERT model, where environmental feature vectors are extracted using a self-attention mechanism. This includes: The environmental time-series data is cleaned to remove outliers and fill in missing values to obtain environmental data of different dimensions. The cleaning includes outlier detection based on threshold rules and statistical characteristics, and filling in missing values using difference or historical mean. The environmental time series data with different dimensions are normalized to obtain normalized data in a uniform numerical range for each environmental time series data. A sliding window is used to reconstruct the normalized data at consecutive time points, converting the normalized data into time-series samples that meet a preset length, wherein the sliding window can cover at least one growth cycle; The time-series samples are input into the lightweight BERT model, and the environmental features are extracted through a self-attention mechanism. The lightweight BERT model is obtained by pruning based on a preset number of encoding layers and hidden layer dimensions.
3. The method as described in claim 1, characterized in that, The step of inputting the environmental feature vector into the first random forest classification model and combining it with preliminary constraints based on growth cycle information and growth stage rules to determine the current growth stage of Ganoderma lucidum includes: The current growth stage of Ganoderma lucidum is initially constrained based on the environmental feature vector, preset growth cycle information, and growth stage rules. The growth stage rules are determined based on Ganoderma lucidum cultivation procedures and historical production data. Based on the preliminary constraints, the environmental feature vector is input into the first random forest classification model to obtain the probability values corresponding to the multiple preset Ganoderma lucidum growth stages. The growth stage with the highest probability value is determined as the current growth stage of the Ganoderma lucidum.
4. The method as described in claim 1, characterized in that, The growth prediction model includes a second random forest model and a multilayer perceptron model; the step of inputting the environmental feature vector and the current growth stage into the growth prediction model, and outputting the growth suitability, growth rate range, and growth stage transition time probability of Ganoderma lucidum as the growth prediction result includes: The environmental feature vector and the current growth stage of Ganoderma lucidum are input into the second random forest model to predict the growth suitability and growth rate range of Ganoderma lucidum in the current growth stage. The environmental feature vector and the current growth stage of the Ganoderma lucidum are input into the multilayer perceptron model to predict the probability of the growth stage transition time of the Ganoderma lucidum. The growth prediction result of Ganoderma lucidum is constructed based on the growth suitability, the growth rate range and the probability of the growth stage transition time, wherein the growth prediction result is used to characterize the growth status and change trend of Ganoderma lucidum based on the environmental characteristics.
5. The method as described in claim 1, characterized in that, The method further includes: When training the pest detection model, a low-rank adaptive module is introduced into the backbone terminal layer and the key layer of the detection head to adjust the parameters.
6. The method as described in claim 1, characterized in that, The step of using the current growth stage as a control signal and weighting the multimodal fusion features through an attention mechanism to generate a multimodal fusion feature vector includes: The weights corresponding to each modality feature in the multimodal fusion feature are adjusted based on the current growth stage and the environmental feature vector using an attention mechanism, so as to obtain the adjusted weights. The multimodal fusion features are weighted based on the adjusted weights to obtain the multimodal fusion feature vector.
7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: Environmental data is collected in real time using a variety of environmental sensors. The environmental data includes at least air temperature, relative humidity, soil moisture content, carbon dioxide concentration, and light intensity. Each environmental data point is appended with a corresponding timestamp to form continuous environmental time-series data. The image acquisition device is used to periodically acquire image data of Ganoderma lucidum, wherein the image acquisition device and the various environmental sensors are time-calibrated through a unified time synchronization module; A corresponding timestamp is attached to the Ganoderma lucidum image data to achieve time synchronization calibration between the environmental time series data and the Ganoderma lucidum image data.
8. The method according to any one of claims 1 to 6, characterized in that, The pest and disease risk levels include at least low risk, medium risk, and high risk, and the method further includes: If the pest or disease level is determined to be low risk, the spraying device is activated to spray an agent at a first preset concentration based on a first time interval. If the pest or disease level is determined to be medium risk, the spraying device is activated to spray an agent at a second preset concentration based on a second time interval, wherein the second time interval is shorter than the first time interval and the second preset concentration is greater than the first preset concentration; If the pest or disease level is determined to be high risk, the spraying device is activated to spray an agent at a third preset concentration based on a third time interval, wherein the third time interval is shorter than the second time interval and the third preset concentration is greater than the second preset concentration.
9. A device for predicting diseases and pests of Ganoderma lucidum, characterized in that, The device includes: The first extraction module is used to clean, normalize and reconstruct the environmental time-series data collected by environmental sensors, and input the processed environmental time-series data into the lightweight BERT model to extract environmental feature vectors through the self-attention mechanism. The determination module is used to input the environmental feature vector into the first random forest classification model and, in combination with preliminary constraints based on growth cycle information and growth stage rules, determine the current growth stage of Ganoderma lucidum. The first prediction module is used to input the environmental feature vector and the current growth stage into the growth prediction model, and output the growth suitability, growth rate range and growth stage transition time probability of Ganoderma lucidum as the growth prediction result. The second extraction module is used to input the Ganoderma lucidum image data acquired by the image acquisition device into the pest detection model based on the YOLO-PEST architecture and introducing a low-rank adaptive module, and extract image feature vectors that characterize the pest category, quantity and spatial distribution. The generation module is used to concatenate the environmental feature vector, the current growth stage, the growth prediction result, and the image feature vector to obtain a multimodal fusion feature; using the current growth stage as a control signal, the multimodal fusion feature is weighted through an attention mechanism to generate a multimodal fusion feature vector; The second prediction module is used to input the multimodal fusion feature vector into the fully connected prediction network and output the disease and pest type and disease and pest level of Ganoderma lucidum.
10. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the pest and disease prediction method for Ganoderma lucidum as described in any one of claims 1-8.