Grain condition prediction processing method and system based on time sequence large model, and storage medium

By using a grain condition prediction method based on a time-series large model, combined with training and pruning of historical data from the grain storage area, the problem of grain storage facilities being unable to predict future grain conditions has been solved, achieving efficient and accurate grain condition prediction and resource conservation.

CN120952268AActive Publication Date: 2025-11-14ZHEJIANG SUPCON INFORMATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511468501.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-15
Publication Date
2025-11-14
Estimated Expiration
2045-10-15

AI Technical Summary

Technical Problem

Existing grain depot monitoring systems are unable to predict future grain conditions, resulting in irreversible damage to grain quality when abnormalities are triggered, leading to economic losses.

Method used

A grain condition prediction method based on a time-series large model is adopted. By training a pre-trained general time-series large model in combination with historical data of the reservoir area, the time-series characteristics of grain conditions are captured, and redundant parameters are removed through structured pruning to reduce model complexity.

Benefits of technology

It improves the accuracy of future grain condition forecasts, reduces model complexity and computational resource consumption, and improves operational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120952268A_ABST
    Figure CN120952268A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of grain depot storage management, in particular to a grain condition prediction processing method and system based on a time sequence large model and a storage medium, and the method comprises the steps: obtaining grain condition data of a to-be-predicted grain depot area; inputting the grain condition data into a grain condition prediction model for prediction processing to obtain a grain condition prediction result of the to-be-predicted grain depot area, the grain condition prediction model being obtained based on training of a time sequence large model, and in the training process, performing structured pruning processing on the time sequence large model based on a model training set to obtain a grain condition prediction result of the to-be-predicted grain depot area; according to the historical grain condition data of any grain storage area in a model training set, performing model fine tuning on the time sequence large model after the structured pruning processing, wherein the model training set comprises the historical grain condition data of a plurality of different grain storage areas; and regulating and controlling the ventilation time, the fumigation period and the temperature and humidity of the to-be-predicted grain storage area in advance based on the grain condition prediction result. Therefore, the model can capture the time sequence characteristics and change rules of the grain condition data, so that the future grain condition data can be accurately predicted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of grain depot storage management technology, and in particular to a grain condition prediction and processing method, system and storage medium based on a time-series large model. Background Technology

[0002] In the grain storage sector, grain quality and safety, along with storage cost control, are the core management objectives. Mold growth and pest infestation in grain piles are two key issues affecting grain storage safety. With the development of storage technology, existing grain condition management has gradually shifted from traditional manual inspections to automated control models.

[0003] Current grain depots generally employ a sensor network and basic control architecture, revolving around a real-time monitoring and passive response model. However, their monitoring targets are already occurring environmental anomalies (such as excessive temperature or increased pest populations), rather than future risks. Grain spoilage and pest infestation are gradual processes; for example, it takes 3-7 days for grain temperature to rise from the normal range to the mold threshold, and 1-2 weeks for pests to go from low activity to large-scale reproduction. By the time monitoring data triggers the threshold, irreversible damage to grain quality has already occurred (such as localized mold causing grain discoloration and decreased germination rate), making it impossible to recover the losses. Therefore, a predictive method for grain conditions is urgently needed for monitoring and maintaining grain depots. Summary of the Invention

[0004] (a) Technical problems to be solved In view of the above-mentioned shortcomings and deficiencies of the prior art, this application provides a grain condition prediction and processing method, system and storage medium based on a time-series large model. It solves the technical problem that the architecture of sensor network and basic control cannot predict future grain conditions, resulting in irreversible damage to grain quality and economic losses when monitoring data triggers a threshold.

[0005] (II) Technical Solution To achieve the above objectives, the main technical solutions adopted in this application include: In a first aspect, embodiments of this application provide a grain condition prediction processing method based on a time-series large model, including: Obtain grain condition data for the grain storage area to be predicted; The grain condition data of the grain storage area to be predicted is input into a pre-trained grain condition prediction model for prediction processing to obtain the grain condition prediction result of the grain storage area to be predicted. The grain condition prediction model is trained based on a time series large model. During the training of the time series large model, the time series large model is subjected to structured pruning based on a pre-configured model training set. The structured pruning time series large model is then fine-tuned based on the historical grain condition data of any grain storage area in the model training set. The model training set includes historical grain condition data of multiple different grain storage areas. Based on the grain condition forecast results, the ventilation time, fumigation cycle, and temperature and humidity of the grain storage area to be predicted are adjusted in advance.

[0006] Optionally, in a specific embodiment, the process of performing structured pruning on the large temporal model includes: Identify the fully connected layers in the aforementioned time-series large model that require pruning. Based on a pre-set low-rank dimension, a first low-rank matrix and a second low-rank matrix are inserted into a fully connected layer that needs pruning to update the temporal large model. The first low-rank matrix has a dimension of input feature dimension × low-rank dimension, and the second low-rank matrix has a dimension of low-rank dimension × output feature dimension. Historical grain condition data from multiple different grain storage areas are input into the updated time-series large model for training. The update gradients corresponding to the first low-rank matrix and the second low-rank matrix are obtained through backpropagation algorithm. Based on the update gradients corresponding to the first low-rank matrix and the second low-rank matrix, some model parameters in the time-series large model are removed.

[0007] Optionally, in a specific embodiment, an updated temporal large model is obtained by updating the first output relationship of the fully connected layer after inserting the first low-rank matrix and the second low-rank matrix, wherein the first output relationship is the sum of the first product and the second product, the first product is the product of the input of the fully connected layer and the initial weights of the model, and the second product is the product of the first low-rank matrix and the second low-rank matrix.

[0008] Optionally, in a specific embodiment, when inputting historical grain condition data from multiple different grain storage areas into the updated time-series large-scale model for training, the historical grain condition data for each grain storage area is divided into training windows to obtain short-term window data and long-term window data, wherein... The short-term window data is input into the updated time series large model for training, and the first gradient corresponding to the first low-rank matrix and the second gradient corresponding to the second low-rank matrix are obtained through the backpropagation algorithm. The first low-rank matrix is ​​updated based on the first gradient to obtain the corresponding first increment matrix, and the second low-rank matrix is ​​updated based on the second gradient to obtain the corresponding second increment matrix. The first increment matrix and the second increment matrix are inserted into the fully connected layer that needs pruning to perform a second update on the time series model; The long-term window data is input into the second-updated time-series model for training, and the update gradients corresponding to the first low-rank matrix and the second low-rank matrix are obtained through the backpropagation algorithm.

[0009] Optionally, in a specific embodiment, the temporal model after a second update is obtained by updating the input-output relationship of the fully connected layer after inserting the first increment matrix and the second increment matrix, wherein the input-output relationship is the sum of the product of the first increment matrix and the second increment matrix and the first output relationship.

[0010] Optionally, in a specific embodiment, some model parameters in the time-series large model are removed based on the update gradients corresponding to the first low-rank matrix and the second low-rank matrix, including: The importance of each model parameter is determined based on the update gradient corresponding to the first low-rank matrix and the update gradient corresponding to the second low-rank matrix. Based on the importance of each model parameter, a structured parameter group is constructed, and the group importance of the structured parameter group is calculated. Model parameters whose group importance is lower than a preset importance threshold are removed.

[0011] Optionally, in a specific embodiment, when removing some model parameters, the model parameters in the four fully connected layers of the attention layer are grouped together according to the heads with the same functional localization to construct a structured parameter group. The model parameters in the three fully connected layers of FFN are divided according to the channels responsible for the same feature to construct a structured parameter set; The importance of all model parameters in each structured parameter group is weighted and summed to obtain the corresponding group importance.

[0012] Optionally, in a specific embodiment, when removing some model parameters, the model parameters in the attention layer and FFN layer are grouped according to the parameter type of all parameters in the historical grain condition parameters, and the importance of all model parameters in each group is weighted and summed to obtain the corresponding group importance.

[0013] Secondly, embodiments of this application provide a grain condition prediction and processing system based on a time-series large model, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the aforementioned grain condition prediction and processing method based on a time-series large model.

[0014] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described grain condition prediction processing method based on a time-series large model.

[0015] (III) Beneficial Effects This application presents a grain condition prediction method based on a time-series large model. By training a pre-trained general time-series large model in conjunction with historical data from grain storage areas, the model can capture the temporal characteristics and changing patterns of grain condition data, thereby making the prediction of future grain condition data more accurate. Furthermore, structured pruning can remove redundant parameters and channels in the general time-series large model that are irrelevant to grain condition prediction, reducing model complexity, making the model more lightweight, improving operating efficiency, and reducing unnecessary consumption of computational resources. Attached Figure Description

[0016] Figure 1 A flowchart of a grain condition prediction method based on a time-series large model provided in this application embodiment; Figure 2 This is a schematic diagram of the structured pruning process provided in an embodiment of this application. Detailed Implementation

[0017] To better explain and facilitate understanding of this application, the following detailed description of the application is provided in conjunction with the accompanying drawings and specific embodiments.

[0018] In the grain storage sector, ensuring grain quality and safety while controlling storage costs are core objectives, while mold and pests pose the main threats to grain safety. Although grain depots have shifted from manual inspections to an automated model based on sensor networks and basic control, this model focuses on real-time monitoring and passive response, only able to act on environmental anomalies that have already occurred (such as excessive temperature or increased pests). Mold and pests are gradual processes (it takes 3-7 days for grain temperature to rise to the mold threshold, and 1-2 weeks for large-scale pest reproduction). By the time the threshold is triggered, the grain quality has already been irreversibly damaged. Therefore, a grain condition prediction solution is urgently needed.

[0019] The grain condition prediction method based on a time-series large model provided in this application can accurately capture the time-series characteristics and change patterns of grain conditions by training a pre-trained general time-series large model combined with historical data of the storage area, thereby improving the accuracy of future grain condition prediction. At the same time, redundant parameters and channels are removed through structured pruning, which reduces the complexity of the model and achieves lightweighting, thereby improving operating efficiency and reducing the consumption of computing resources.

[0020] To better understand the above technical solutions, exemplary embodiments of this application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application can be understood more clearly and thoroughly, and that the scope of this application can be fully conveyed to those skilled in the art.

[0021] This application provides a method for grain condition prediction based on a large time-series model, such as... Figure 1 As shown, it includes: S1. Obtain grain condition data for the grain storage area to be predicted; S2. Input the grain condition data of the grain storage area to be predicted into the pre-trained grain condition prediction model for prediction processing to obtain the grain condition prediction result of the grain storage area to be predicted. The grain condition prediction model is trained based on a time series large model. During the training of the time series large model, the time series large model is subjected to structured pruning based on a pre-configured model training set. The structured pruning time series large model is fine-tuned based on the historical grain condition data of any grain storage area in the model training set. The model training set includes historical grain condition data of multiple different grain storage areas. S3. Based on the grain condition prediction results, the ventilation time, fumigation cycle, and temperature and humidity of the grain storage area to be predicted are adjusted in advance.

[0022] Optionally, the process of performing structured pruning on the large temporal model, such as... Figure 2 As shown, it includes: S21. Determine the fully connected layers in the time series model that require pruning. S22. Based on the pre-set low-rank dimension, insert the first low-rank matrix and the second low-rank matrix into the fully connected layer that needs pruning to update the temporal large model, wherein the dimension of the first low-rank matrix is ​​the input feature dimension × low-rank dimension, and the dimension of the second low-rank matrix is ​​the low-rank dimension × output feature dimension. S23. Input historical grain condition data from multiple different grain storage areas into the updated time-series large model for training, and obtain the update gradients corresponding to the first low-rank matrix and the second low-rank matrix through the backpropagation algorithm, and remove some model parameters in the time-series large model based on the update gradients corresponding to the first low-rank matrix and the second low-rank matrix.

[0023] Furthermore, by updating the first output relationship of the fully connected layer after inserting the first low-rank matrix and the second low-rank matrix, an updated temporal large model is obtained, wherein the first output relationship is the sum of the first product and the second product, the first product is the product of the input of the fully connected layer and the initial weights of the model, and the second product is the product of the first low-rank matrix and the second low-rank matrix.

[0024] Specifically, for the fully connected layers in the large temporal model that need pruning, two low-rank matrices are inserted according to a pre-set low-rank dimension. The first low-rank matrix has the dimension of [input feature dimension × low-rank dimension], and the second low-rank matrix has the dimension of [low-rank dimension × output feature dimension]. Among them, the low-rank dimension is much smaller than the original input / output feature dimension (e.g., reduced from 2048 to 64). The incremental change of the original high-rank weight is approximated by the product of the first low-rank matrix and the second low-rank matrix.

[0025] Reconstruct the input-output relationship of the fully connected layer: ; Where O represents the output of the fully connected layer. The initial weights are pre-set, Y is the first low-rank matrix, E is the second low-rank matrix, and Y·E is the low-rank matrix product. While preserving the capabilities of the original model, learnable parameter increments are introduced through the low-rank matrices, and x is the input to the fully connected layer.

[0026] Input historical grain condition data into the updated model to calculate the first loss value. (For example, in the case of prediction error), backpropagation is used to update only the gradients of the low-rank matrices Y and E: The first gradient is: That is, the gradient of the first low-rank matrix; the second gradient is... , which is the gradient of the second low-rank matrix.

[0027] Fixed initial weights during calculation It is not differentiable, ensuring that correlations in the task are captured only through low-rank matrices.

[0028] The importance of model parameters can be evaluated based on the gradient and weight values ​​of the first low-rank matrix, for example, by: , ; in, Let be the element in the i-th row and j-th column of the first low-rank matrix. Let be the element in the i-th row and j-th column of the second low-rank matrix. The first loss value L S For Y i,j The partial derivatives, First loss value right The partial derivatives of, Importance ) represents the importance of the element in the i-th row and j-th column of the first low-rank matrix. The importance of the element in the i-th row and j-th column of the second low-rank matrix is ​​represented by ).

[0029] The contribution of each parameter (including initial weights and low-rank matrix elements) in the fully connected layer to the model output is comprehensively evaluated.

[0030] Set an importance threshold and remove parameters below the threshold (such as weight elements with low contribution or low-rank matrix elements). The pruned model weights are the sum of the initial weights and the product of the retained low-rank matrix. ,in, These are the weights of the pruned model. For the pre-set initial weights, This is the first low-rank matrix after parameter removal. This is the second low-rank matrix after parameter removal.

[0031] This application reduces the parameter size through low-rank matrix factorization, significantly reducing the computational and storage requirements of the model after pruning, making it suitable for deployment on edge devices in grain depots. Fixed initial weights ensure the basic capabilities of the model, and low-rank matrices focus on learning task-specific features, balancing pruning efficiency and prediction accuracy.

[0032] Furthermore, historical grain condition data is input into the updated time-series large model to obtain the corresponding loss value. Then, through backpropagation, the first gradient corresponding to the first low-rank matrix and the second gradient corresponding to the second low-rank matrix are obtained. Based on the first and second gradients, the importance of each model parameter in the time-series large model is determined, including: Based on pre-set sliding time windows of different scales, any historical grain condition data is divided into training windows, which are then divided into short-term window data and long-term window data. Input the short-term window data into the updated time series model to obtain the corresponding first loss value, and obtain the first gradient corresponding to the first low-rank matrix and the second gradient corresponding to the second low-rank matrix through the backpropagation algorithm. The first low-rank matrix is ​​updated based on the first gradient to obtain the corresponding first increment matrix, and the second low-rank matrix is ​​updated based on the second gradient to obtain the corresponding second increment matrix. For all fully connected layers that have inserted the first low-rank matrix and the second low-rank matrix, insert the first increment matrix and the second increment matrix, and update the second input-output relationship of the fully connected layers after insertion; the second input-output relationship is the product of the first increment matrix and the second increment matrix, and the sum of the first output relationship. The long-term window data is input into the second updated time series model to obtain the corresponding second loss value. Then, the third gradient corresponding to the first low-rank matrix and the fourth gradient corresponding to the second low-rank matrix are obtained through the backpropagation algorithm. The importance of each model parameter in the time series model is obtained based on the third and fourth gradients. The calculation of the third and fourth gradients is achieved by fixing the initial weights and ensuring that the first and second increment matrices are not differentiable.

[0033] Furthermore, by updating the input-output relationship of the fully connected layer after inserting the first increment matrix and the second increment matrix, a second-updated temporal model is obtained, wherein the input-output relationship is the sum of the product of the first increment matrix and the second increment matrix and the first output relationship.

[0034] Specifically, to balance the short-term fluctuations in grain condition data (such as sudden increases in daily grain temperature) with long-term trends (such as seasonal mold cycles), a sliding time window strategy is adopted: Short-term window data: typically includes high-frequency sampling data from the past few days to a week (such as grain temperature and humidity records every hour), focusing on capturing short-term sudden changes (such as a rapid drop in grain temperature after ventilation, or short-term activity of pests); long-term window data: covers low-frequency sampling data from several weeks to several months (such as statistical values ​​every day), focusing on extracting long-term trends (such as an overall rise in grain temperature in summer, or periodic fluctuations in humidity during the rainy season).

[0035] The core value of dual-window partitioning lies in the fact that by training with data at different time scales, the evaluation of the importance of model parameters can simultaneously cover both short-term response capability and long-term predictive capability, thus avoiding evaluation bias caused by a single window.

[0036] The model is trained using short-term window data, and an incremental matrix is ​​generated through gradient calculation to achieve preliminary optimization of the low-rank matrix. Short-term window data is input into a time series model that inserts into a low-rank matrix to obtain the difference between the predicted and actual values ​​(the first loss value, such as risk-weighted mean square error), which reflects the model's prediction accuracy for short-term grain condition fluctuations. Through the backpropagation algorithm, the first gradient of the loss function with respect to the first low-rank matrix (Y) and the second gradient of the second low-rank matrix (E) are calculated. The larger the absolute value of the gradient, the more significant the impact of the corresponding low-rank matrix element on the short-term prediction accuracy.

[0037] Based on the preset learning rate (η) and gradient descent, the low-rank matrix is ​​updated to obtain the increment matrix: First increment matrix (△Y): The second increment matrix (△E): Where η is the learning rate. For the first gradient, The second gradient is used to control the update magnitude (e.g., in the grain situation scenario, it is usually set to 1e-4), and the negative sign indicates that it is adjusted in the direction of loss reduction.

[0038] The second input-output relationship of the fully connected layer is adjusted as follows: That is, in the initial weight In addition to the original low-rank matrix product, an incremental matrix product is added, enabling the model to adapt to short-term changes in grain conditions.

[0039] Based on the model with the updated incremental matrix, the third / fourth gradient is calculated through long-term window data training to ultimately determine the importance of the parameters: Long-term window data is input into the model inserted into the increment matrix to obtain a second loss value (such as time-series trend-weighted loss), reflecting the model's prediction accuracy of long-term grain condition trends; the gradient is calculated through backpropagation, but the following parameters must be fixed and not differentiable: initial weights. (To ensure the fundamental capabilities of the pre-trained model are not compromised), the first / second increment matrices (to avoid short-term optimization results affecting long-term feature learning). Finally, the third gradient of the first low-rank matrix is ​​obtained. ) and the fourth gradient of the second low-rank matrix ( ),in This is the second loss value. The third gradient, It is the fourth gradient.

[0040] By combining the third / fourth gradients with the values ​​of the low-rank matrix elements, the importance of each parameter can be evaluated, such as: , ,in, Let be the element in the i-th row and j-th column of the first low-rank matrix. Let be the element in the i-th row and j-th column of the second low-rank matrix. The second loss value right The partial derivatives, The second loss value right The partial derivatives of, Importance ) represents the importance of the element in the i-th row and j-th column of the first low-rank matrix. The importance of the element in the i-th row and j-th column of the second low-rank matrix is ​​represented by ).

[0041] The higher the importance, the greater the contribution of the parameter to the prediction of long-term grain conditions, and it should be retained as a priority when pruning.

[0042] This application's embodiments optimize the model's response to sudden grain conditions through a short-term window and focus on trend capture through a long-term window, making the parameter importance assessment more comprehensive. By fixing the initial weights and incremental matrix, it ensures that the long-term gradient calculation only reflects the contribution of the low-rank matrix to the core features, avoiding noise interference. The gradient update strategy enables the low-rank matrix to adapt to the time-varying characteristics of grain condition data, balancing the model's flexibility and stability.

[0043] Optionally, in a specific embodiment, some model parameters in the time-series large model are removed based on the update gradients corresponding to the first low-rank matrix and the second low-rank matrix, including: The importance of each model parameter is determined based on the update gradient corresponding to the first low-rank matrix and the update gradient corresponding to the second low-rank matrix. Based on the importance of each model parameter, a structured parameter group is constructed, and the group importance of the structured parameter group is calculated. Model parameters whose group importance is lower than a preset importance threshold are removed.

[0044] Furthermore, when removing some of the model parameters, the model parameters in the four fully connected layers of the attention layer are grouped together according to the heads with the same functional localization, in order to construct a structured parameter group. The model parameters in the three fully connected layers of FFN are divided according to the channels responsible for the same feature to construct a structured parameter set; The importance of all model parameters in each structured parameter group is weighted and summed to obtain the corresponding group importance.

[0045] Furthermore, when removing some model parameters, the model parameters in the attention layer and FFN layer are grouped according to the parameter type of all parameters in the historical grain condition parameters, and the importance of all model parameters in each group is weighted and summed to obtain the corresponding group importance.

[0046] Specifically, for the two core components of the time-series large model (attention layer and FFN layer), parameter groups are constructed based on the principles of functional consistency and feature correlation to ensure that each parameter group undertakes an independent and complete functional module: The attention layer captures feature correlations across different dimensions through multiple parallel attention heads (such as the coupling relationship between grain temperature and humidity, and pests and...). (Concentration Correlation), the grouping rules are as follows: The allocation objects are the four fully connected layers in the attention layer: Query, Key, Value, and Out. The grouping criterion is to group the heads with the same functional positioning in the four fully connected layers together. For example, the third head is responsible for generating the query vector of grain temperature features in the Query layer, the key vector of grain temperature features in the Key layer, the value vector of grain temperature features in the Value layer, and the attention output integration of grain temperature features in the Out layer. The parameters of these four heads together constitute the grain temperature feature attention group. The parameters within each group are composed of all the parameters of the four sub-modules: Query_head_i, Key_head_i, Value_head_i, and Out_head_i, ensuring that the group can independently complete the attention calculation of a certain feature dimension.

[0047] Feedforward Networks (FFNs) enhance features through channel transformations (e.g., mapping raw grain condition features to a high-dimensional space and then compressing them). The grouping rules are as follows: the grouping objects are the three fully connected layers in the FFN: Gate, Up (dimensionality increase), and Down (dimensionality reduction); the grouping criterion is to group the channels responsible for processing the same feature within these three fully connected layers together. For example, the fifth channel controls the activation intensity of pest features in the Gate layer, is responsible for the high-dimensional mapping of pest features in the Up layer, and is responsible for the low-dimensional output of pest features in the Down layer. The parameters of these three channels together constitute the pest feature FFN group; the parameters within each group consist of all parameters from the three sub-modules: Gate_channel_j, Up_channel_j, and Down_channel_j, ensuring that the group can independently complete the fully connected transformation of a specific feature.

[0048] The core value of this approach through grouping is to avoid random pruning from damaging the integrity of the model's functional modules (e.g., removing Query_head_i while keeping Key_head_i would cause attention calculation to fail). Structured grouping ensures that the remaining parameters after pruning can still form complete functional units.

[0049] After the parameter sets are constructed, it is necessary to quantify the overall importance of each set to the model's predictions. The calculation logic is as follows: Single-parameter importance collection: Extract the importance values ​​of all model parameters within the group (calculated earlier by multiplying the gradient with the parameter value); Weighted summation rule: Weight allocation is based on the functional priority of parameters within the group. For example, in the attention layer, the parameter weight of Out_head (0.3) is higher than that of Query_head (0.25), Key_head (0.25), and Value_head (0.2). Since the Out layer is responsible for integrating attention results, it has a greater impact on the output, so the weights are summed.

[0050] Based on the model compression objective (e.g., reducing parameter size by 50%) and prediction accuracy constraints (e.g., grain temperature prediction MAE not exceeding 0.5℃), a preset group importance threshold (e.g., 0.3) is set. Pruning execution: Remove all parameter groups whose importance is below the threshold, for example: If the group importance of the low-frequency feature attention group is 0.2 (<0.3), it means that the group has limited contribution to grain condition prediction, and the head parameters corresponding to the Query, Key, Value, and Out layers contained in it can be removed as a whole. If the group importance of the redundant environment feature FFN group is 0.15 (<0.3), then the corresponding channel parameters of its Gate, Up, and Down layers are removed as a whole; The remaining parameter group retains the complete attention calculation and FFN conversion functions to ensure that the model can output grain condition prediction results normally. Only functional modules that have a small impact on prediction accuracy are removed.

[0051] The embodiments provided in this application avoid model function breakage caused by pruning by grouping functions together, solve the problem of sudden drop in model performance after traditional random pruning, and filter and remove models by group, reducing the amount of computation for parameter-by-parameter judgment, and adapting to the needs of efficient pruning for large models.

[0052] Optionally, in a specific embodiment, based on the importance of each model parameter, a structured parameter group is constructed and group importance is calculated. Groups with importance below a preset importance threshold are removed, including: Based on the parameter types of all parameters in the historical grain condition parameters, the model parameters in the attention layer and FFN layer are grouped to construct structured parameter groups. The importance of all model parameters in each structured parameter group is weighted and summed to obtain the corresponding group importance, and groups with importance lower than the preset importance threshold are removed.

[0053] This embodiment uses the parameter types in historical grain condition data as the grouping basis, directly linking model parameters with actual monitoring indicators to ensure that each group of parameters specifically serves a particular type of grain condition characteristic. The grouping logic is as follows: The attention layer is responsible for capturing the correlations between different grain condition parameters (such as the correlation between grain temperature and humidity). The correlation between concentration and pests), grouping rules are as follows: Grouping criteria based on the type of historical grain condition parameters (such as grain temperature, humidity, etc.). (Concentration, pest index, grain moisture, etc.); grouping method: all heads in the attention layer that specifically handle a certain type of parameter and their corresponding fully connected layer parameters are grouped together. For example, the pest parameter group includes all parameters used to capture pest activity patterns, pests and... Concentration-dependent attention hand parameter.

[0054] Each set of parameters directly corresponds to a grain condition indicator with a clear physical meaning, and its importance reflects the contribution of the indicator to the overall forecast.

[0055] The FFN layer is responsible for feature enhancement of single grain condition parameters (such as mapping the original grain temperature data to advanced features such as temperature change rate and temperature-humidity coupling features). The grouping rules are similar to those of the attention layer.

[0056] This embodiment directly binds the model parameters to the physical indicators of grain condition monitoring, making the pruning decisions more interpretable (such as removing the external lighting group because this parameter has a weak impact on changes inside the grain pile), and is more in line with the business understanding of grain depot managers.

[0057] Optionally, in a specific embodiment, the future grain condition data includes: predicted surface grain temperature, predicted bottom grain temperature, predicted humidity, predicted pest index, predicted external temperature, predicted internal temperature, predicted dew point difference, predicted grain temperature, and predicted weather. Based on future grain condition data, we plan the future ventilation time, fumigation cycle, cooling and dehumidification strategies for the grain storage area to be predicted, including: When the predicted difference between the surface grain temperature and the bottom grain temperature is greater than 4℃ and the predicted dew point difference is less than 3℃, nighttime forced ventilation will be activated. Downward ventilation is activated when the difference between the predicted outside temperature and the predicted inside temperature is greater than 5 degrees Celsius and the predicted humidity is less than 65%. When the predicted pest index is >0.8, the predicted indoor temperature is 18~30℃, and the indoor grain concentration is <3000ppm, low concentration of phosphine is released. When the predicted pest index is >0.8, the predicted indoor temperature is 18~30℃, and the indoor grain concentration is >3000ppm, high-concentration fumigation should be initiated. When the predicted outside temperature is >30℃ and the predicted grain temperature is ≤20℃, start the grain cooler; When a cold wave is predicted and the grain temperature is predicted to be ≤5℃, ventilation should be carried out using natural temperature differences.

[0058] Specifically, ventilation control: If the predicted surface grain temperature is greater than the bottom grain temperature by 4°C and the dew point difference is less than 3°C, start nighttime forced ventilation (22:00-6:00). If the predicted temperature difference in the entire warehouse is greater than 5°C and the humidity is less than 65%, start downdraft ventilation and adjust the fan speed.

[0059] Fumigation for pest control: If the predicted pest index is >0.8 and the predicted temperature is 18-30℃ & <3000ppm, low-concentration phosphine is released; if the predicted pest index is >0.8 and the predicted temperature is 18-30℃ & ≥3000ppm, high-concentration fumigation is initiated.

[0060] Temperature and humidity control: If the predicted outside temperature is >30℃ and the target grain temperature is ≤20℃, start the grain cooler; if the predicted cold wave weather is ≤5℃ and the target grain temperature is ≤5℃, use natural temperature difference for ventilation; if the predicted temperature difference of a certain layer of the grain pile is ≥8℃ / 24h, stop ventilation and start local turning.

[0061] The predicted values ​​(temperature, grain pile, environment, humidity, etc.) Preventive control is carried out using concentration and pest activity index as input models.

[0062] This application provides a grain condition prediction method based on a time-series large model. By training a pre-trained general time-series large model combined with historical data from the storage area, it can accurately capture the time-series characteristics and changing patterns of grain conditions, thereby improving the accuracy of future grain condition predictions. At the same time, redundant parameters and channels are removed through structured pruning, reducing model complexity and achieving lightweighting, which improves operating efficiency and reduces computational resource consumption.

[0063] Furthermore, embodiments of this application provide a grain condition prediction system based on a time-series large model, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the aforementioned grain condition prediction method based on a time-series large model.

[0064] In addition, embodiments of this application provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described grain condition prediction method based on a time-series large model.

[0065] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0066] In this application, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0067] In this application, unless otherwise expressly specified and limited, "above" or "below" the second feature can mean that the first and second features are in direct contact, or that they are in indirect contact through an intermediate medium. Furthermore, "above," "on top of," and "over" the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.

[0068] In the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0069] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make modifications, alterations, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A grain condition prediction and processing method based on a time-series large model, characterized in that, include: Obtain grain condition data for the grain storage area to be predicted; The grain condition data of the grain storage area to be predicted is input into a pre-trained grain condition prediction model for prediction processing to obtain the grain condition prediction result of the grain storage area to be predicted. The grain condition prediction model is trained based on a time series large model. During the training of the time series large model, the time series large model is subjected to structured pruning based on a pre-configured model training set. The structured pruning time series large model is then fine-tuned based on the historical grain condition data of any grain storage area in the model training set. The model training set includes historical grain condition data of multiple different grain storage areas. Based on the grain condition forecast results, the ventilation time, fumigation cycle, and temperature and humidity of the grain storage area to be predicted are adjusted in advance.

2. The grain condition prediction and processing method based on a large time-series model according to claim 1, characterized in that, The process of performing structured pruning on the large temporal model includes: Identify the fully connected layers in the aforementioned time-series large model that require pruning. Based on a pre-set low-rank dimension, a first low-rank matrix and a second low-rank matrix are inserted into a fully connected layer that needs pruning to update the temporal large model. The first low-rank matrix has a dimension of input feature dimension × low-rank dimension, and the second low-rank matrix has a dimension of low-rank dimension × output feature dimension. Historical grain condition data from multiple different grain storage areas are input into the updated time-series large model for training. The update gradients corresponding to the first low-rank matrix and the second low-rank matrix are obtained through backpropagation algorithm. Based on the update gradients corresponding to the first low-rank matrix and the second low-rank matrix, some model parameters in the time-series large model are removed.

3. The grain condition prediction and processing method based on a large time-series model according to claim 2, characterized in that, The updated temporal model is obtained by updating the first output relationship of the fully connected layer after inserting the first low-rank matrix and the second low-rank matrix. The first output relationship is the sum of the first product and the second product. The first product is the product of the input of the fully connected layer and the initial weights of the model. The second product is the product of the first low-rank matrix and the second low-rank matrix.

4. The grain condition prediction and processing method based on a large time-series model according to claim 3, characterized in that, When training the updated time-series large-scale model by inputting historical grain condition data from multiple different grain storage areas, the historical grain condition data for each grain storage area is divided into training windows to obtain short-term window data and long-term window data. The short-term window data is input into the updated time series large model for training, and the first gradient corresponding to the first low-rank matrix and the second gradient corresponding to the second low-rank matrix are obtained through the backpropagation algorithm. The first low-rank matrix is ​​updated based on the first gradient to obtain the corresponding first increment matrix, and the second low-rank matrix is ​​updated based on the second gradient to obtain the corresponding second increment matrix. The first increment matrix and the second increment matrix are inserted into the fully connected layer that needs pruning to perform a second update on the time series model; The long-term window data is input into the second-updated time-series model for training, and the update gradients corresponding to the first low-rank matrix and the second low-rank matrix are obtained through the backpropagation algorithm.

5. The grain condition prediction and processing method based on a large time-series model according to claim 4, characterized in that, By updating the input-output relationship of the fully connected layer after inserting the first increment matrix and the second increment matrix, a time series model after a second update is obtained, wherein the input-output relationship is the sum of the product of the first increment matrix and the second increment matrix and the first output relationship.

6. The grain condition prediction and processing method based on a large time-series model according to any one of claims 2-5, characterized in that, Based on the update gradients corresponding to the first low-rank matrix and the second low-rank matrix, some model parameters in the large time-series model are removed, including: The importance of each model parameter is determined based on the update gradient corresponding to the first low-rank matrix and the update gradient corresponding to the second low-rank matrix. Based on the importance of each model parameter, a structured parameter group is constructed, and the group importance of the structured parameter group is calculated. Model parameters whose group importance is lower than a preset importance threshold are removed.

7. The grain condition prediction and processing method based on a large time-series model according to claim 6, characterized in that, When removing some of the model parameters, the model parameters in the four fully connected layers of the attention layer are grouped together according to the heads with the same function of localization to construct a structured parameter group. The model parameters in the three fully connected layers of FFN are divided according to the channels responsible for the same feature to construct a structured parameter set; The importance of all model parameters in each structured parameter group is weighted and summed to obtain the corresponding group importance.

8. The grain condition prediction and processing method based on a time-series large model according to claim 6, characterized in that, When removing some model parameters, the model parameters in the attention layer and FFN layer are grouped according to the parameter type of all parameters in the historical grain condition parameters, and the importance of all model parameters in each group is weighted and summed to obtain the corresponding group importance.

9. A grain condition prediction and processing system based on a time-series large model, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the grain condition prediction processing method based on a time-series large model as described in any one of claims 1-8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the grain condition prediction processing method based on a time-series large model as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Grain storage ventilation temperature prediction method for optimizing CNN-BiGRU-Attention network model based on IPSO algorithm

    CN116720620A

  • Complex dynamic system multi-task model fine tuning method based on low-rank adaptation and token pruning

    CN118643876A

  • Fine adjustment method and device of large model, electronic equipment, medium and product

    CN120562521A

  • System and method for low rank field-weighted factorization machine and application thereof in content recommendation

    US20250095024A1

  • Low-rank adaptation of neural network models

    WO2022245502A1