A machine learning model training method for smart agriculture
Patent Information
- Application Number
- CN202611124088.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-13
AI Technical Summary
[0010]本发明要解决的技术问题是:现有面向智慧农业的机器学习模型训练方法,难以同时克服跨地域部署时因环境噪声与作物本征特征相互耦合而导致的模型泛化能力骤降问题,以及模型部署后随作物生长周期推移产生时序概念漂移时,采用全量重训练成本过高、采用常规在线微调又容易导致灾难性遗忘的问题,从而无法以较低成本、较低算力的方式支撑模型在多地域、多生长阶段场景下的持续可靠部署
[0019]1.本发明通过特征正交解耦表征机制,使模型的下游决策仅依赖于作物本征特征,从而达到即使不重新采集新地区大规模标注数据,模型跨域泛化精度也能得到提升的技术效果;
Smart Images

Figure CN122905015A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of interdisciplinary technology of artificial intelligence and smart agriculture, specifically a method for training machine learning models for smart agriculture. Background Technology
[0002] With the widespread application of IoT sensors, drone remote sensing, and satellite remote sensing technologies in agricultural production, multi-source heterogeneous agricultural data can be collected on a large scale and at low cost. This multi-source heterogeneous agricultural data includes visible light images, multispectral images, soil moisture data, and meteorological time-series data. Meanwhile, deep learning models such as convolutional neural networks and Transformers have been widely used in tasks such as crop pest and disease identification, crop growth and yield prediction, and intelligent water and fertilizer decision-making. The basic training paradigm is as follows: collect labeled data, construct a deep neural network, minimize the task loss function through the backpropagation algorithm to update the network parameters, and finally obtain a model that can be used for inference deployment. In addition, techniques such as few-shot learning, transfer learning, and continuous learning have been introduced to alleviate the problems of insufficient labeled data and performance degradation after model deployment. Among them, the elastic weight solidification method in continuous learning measures the importance of parameters through the Fisher information matrix, thereby constraining the magnitude of changes to important parameters when the model learns new tasks.
[0003] The closest existing technical solution to this invention is: directly collect agricultural images and meteorological data of a single region and a single growth stage, manually label them to form a training set, then build an end-to-end deep neural network, directly input the original multimodal data into the network backbone, without making explicit distinction between environmental and crop attributes of the input features, and train the classification head or regression head through cross-entropy loss or mean square error loss to obtain a disease identification or growth prediction model.
[0004] After the model is trained and deployed, if it needs to be migrated to a new region or to cope with a new growth stage, two approaches are usually taken: one is to use a small amount of labeled data from the new scene to fine-tune all or part of the network parameters; the other is to collect a sufficient amount of labeled data from the new scene and then retrain the model.
[0005] The existing technical solutions have the following drawbacks. First, the existing solutions encode environmental background features and crop intrinsic features in the same feature space. During the training process, the model will inevitably learn environmental statistical patterns that are strongly correlated with the shooting location. Since there is a false correlation between this pattern and the task label in the training set, the model will use it as part of the decision-making basis.
[0006] When the model is deployed to a new region with drastically different environmental statistical patterns, the spurious correlations that were previously relied upon become invalid, and the decision weights of the crop's intrinsic characteristics are insufficient. This ultimately leads to a significant decrease in the model's recognition or prediction accuracy in the new region. Secondly, the existing scheme adopts a static training paradigm, where the parameters obtained from a single training run remain fixed after deployment. Due to the strong temporal and irreversible nature of crop growth, the distribution of phenotypic and disease characteristics at different growth stages continues to change. Static models, lacking an update mechanism, gradually become unable to adapt to the data distribution at new stages, resulting in a decline in accuracy over time.
[0007] If full retraining is used to make up for this problem, a large amount of labeled data needs to be collected again, which will consume a lot of computing power and time, making it difficult to meet the timeliness requirements of agricultural production.
[0008] If conventional online fine-tuning is adopted instead, since the fine-tuning process does not distinguish the importance of parameters, the gradient update of the new stage data will significantly cover the parameters that are key to the features of the old stage, thus causing catastrophic amnesia and causing the model to lose its ability to identify general pathological features or early growth stage features.
[0009] Therefore, existing machine learning model training methods for smart agriculture cannot simultaneously overcome the problem of a sharp drop in model generalization ability caused by the coupling of environmental noise and crop intrinsic characteristics when deployed across regions, as well as the problem of training costs and forgetting risks when the model drifts with the crop growth cycle after deployment. A new training method is urgently needed to solve these problems. Summary of the Invention
[0010] The technical problem this invention aims to solve is that existing machine learning model training methods for smart agriculture struggle to simultaneously overcome the problem of a sharp drop in model generalization ability caused by the coupling of environmental noise and crop intrinsic characteristics when deploying across regions, as well as the problem of high cost of full retraining and the tendency to cause catastrophic forgetting when the model undergoes temporal concept drift as the crop growth cycle progresses after deployment. As a result, these methods cannot support the continuous and reliable deployment of models in multiple regions and growth stages with low cost and low computing power.
[0011] To address the aforementioned technical problems, this invention provides a method for training machine learning models for smart agriculture, comprising:
[0012] Acquire agricultural data collected from multiple geographical locations and multiple crop growth stages, including visible light images, multispectral images, and meteorological time-series data;
[0013] The agricultural data is clustered according to geographic location tags and crop growth stage tags to obtain multiple meta-task data subsets, each of which corresponds to a combination scenario of environment and crop.
[0014] For samples in the aforementioned meta-task data subset, the crop intrinsic features of the samples are extracted by a crop feature encoder, and the environment-specific features of the samples are extracted by an environment feature encoder. The crop intrinsic features and the environment-specific features are located in two independent feature subspaces, respectively.
[0015] The orthogonal constraint loss is calculated based on the crop intrinsic features and the environment specific features. The mutual information constraint loss between the crop intrinsic features and the environment specific features is calculated through a mutual information estimation network. The crop intrinsic features are input into the downstream task head to obtain the task loss. The task loss, the orthogonal constraint loss and the mutual information constraint loss are weighted and summed to obtain the total training loss.
[0016] On multiple subsets of meta-task data, an inner loop gradient update is performed on the shared parameters of the model based on the total training loss to obtain task-specific parameters corresponding to each subset of meta-task data. The query loss is calculated on the query set of the corresponding subset of meta-task data using the task-specific parameters. The query losses of multiple subsets of meta-task data are aggregated to calculate the outer loop meta-gradient relative to the shared parameters. The shared parameters are updated according to the outer loop meta-gradient. The above process is repeated until a preset convergence condition is met to obtain the meta-learning initialization parameters.
[0017] Based on the meta-learning initialization parameters, a deployment model is obtained and deployed to the target scene. During the operation of the deployment model, when a preset scene change event is detected, a small sample dataset consisting of newly labeled samples and pseudo-labeled samples is acquired. The diagonal Fisher information matrix of the parameters of the deployment model is estimated based on historical task data. The dynamic regularization coefficient is calculated based on the phenological interval between the current growth stage and the growth stage at the time of the last model update. The new task loss is calculated based on the small sample dataset, and the elastic weight solidification loss is calculated by combining the diagonal Fisher information matrix and the dynamic regularization coefficient. The new task loss and the elastic weight solidification loss are added to obtain the fine-tuning total loss. The parameters of the deployment model are updated by gradient based on the fine-tuning total loss to achieve incremental adaptive update of the deployment model.
[0018] Compared with the prior art, the beneficial effects of the present invention by adopting the above technical solution are as follows:
[0019] 1. This invention uses a feature orthogonal decoupling representation mechanism to make the downstream decision of the model depend only on the intrinsic features of the crop, thereby achieving the technical effect of improving the cross-domain generalization accuracy of the model even without re-collecting large-scale labeled data in new regions.
[0020] 2. This invention utilizes an incremental meta-learning mechanism based on prior knowledge of geographical location and crop phenology to enable the model to obtain parameter initializations that are sensitive to environmental and crop changes during the meta-training stage, thereby shortening the model's adaptation cycle in new scenarios.
[0021] 3. This invention uses a phenological period gating elastic weight solidification mechanism to enable the model to quickly adapt to new growth stages using only a small number of newly labeled samples during the deployment phase. At the same time, it suppresses the catastrophic forgetting of historical phenological period characteristics, thereby reducing the cloud training cost and edge device communication overhead of smart agriculture models and improving the model's ability to be continuously and reliably deployed in multi-regional and multi-growth stage scenarios. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the overall system process in an embodiment of the present invention;
[0023] Figure 2 This is a schematic diagram of the dual-branch orthogonal decoupling encoder process in an embodiment of the present invention;
[0024] Figure 3 This is a schematic diagram of the meta-learning training process in an embodiment of the present invention. Detailed Implementation
[0025] The following is in conjunction with the appendix Figure 1-3 The specific embodiments of the present invention will be further described below. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.
[0026] To make the technical solution and advantages of the present invention clearer, the present invention will be further described in detail below with reference to specific embodiments. The machine learning model training method for smart agriculture provided by the present invention is generally divided into two main parts: feature orthogonal decoupling and meta-learning in the training stage, and phenological gating incremental adaptive learning in the deployment stage. The two together constitute a model training and continuous update system that can operate in a closed loop.
[0027] In the data preparation stage, visible light images, multispectral images, and meteorological time-series data are collected through various means such as field sensors, drones, satellite remote sensing, and weather stations to form a multi-source heterogeneous agricultural dataset. The collected data are automatically clustered according to geographic location labels and crop growth stage labels. Data with similar geographic locations and the same or similar growth stages are grouped into the same subset, resulting in multiple meta-task data subsets. Each meta-task data subset represents a specific combination of environment and crop scenario and is the basic unit for subsequent meta-learning inner-loop training and outer-loop evaluation. In a specific embodiment, the clustering process can use a joint feature vector composed of geographic location coordinates and phenological period numbers, and divide the data samples through a preset distance metric to finally obtain several meta-task data subsets. Each meta-task data subset is further divided into a support set and a query set. The support set is used for inner-loop task specialization training, and the query set is used for outer-loop meta-gradient evaluation.
[0028] For samples in each subset of the task data, two deep neural network branches with the same structure but independent parameters are constructed: a crop feature encoder and an environmental feature encoder. Both use convolutional neural networks as the backbone network. For input samples, the crop feature encoder and the environmental feature encoder extract features respectively. The features extracted by the crop feature encoder are called crop intrinsic features, which reflect information directly related to the crop's physiological state, such as leaf texture, lesion morphology, and plant structure.
[0029] The features extracted by the environmental feature encoder are called environmental specific features, which reflect information related to the shooting location and climate conditions, such as light intensity, soil background color, and shading conditions. The above two types of features are spanned into two independent vector subspaces, namely the crop intrinsic feature subspace and the environmental specific feature subspace.
[0030] To minimize the correlation between crop intrinsic characteristics and environment-specific characteristics, this invention introduces an orthogonal penalty term. The transpose of the crop intrinsic characteristic matrix is multiplied by the environment-specific characteristic matrix, and the square of the Frobenius norm of the resulting product matrix is used as the orthogonal constraint loss. The specific calculation method is as follows:
[0031] ;
[0032] in, This represents the crop intrinsic feature matrix after batch stacking;
[0033] This represents the environment-specific feature matrix after batch stacking;
[0034] This represents the transpose of the crop intrinsic eigenvalue matrix;
[0035] The smaller the value of the orthogonal constraint loss, the weaker the linear correlation between the intrinsic characteristics of crops and the specific characteristics of the environment, meaning that the two are closer to orthogonality in the feature space.
[0036] Building upon this foundation, the present invention further introduces a mutual information minimization constraint. An additional mutual information estimation network is used to calculate the upper bound of the mutual information between crop intrinsic features and environment-specific features. This upper bound is used as the mutual information constraint loss, further suppressing information leakage between the two types of features from the perspective of nonlinear statistical dependence. The mutual information estimation network can adopt a multilayer perceptron structure, taking the concatenated vector of crop intrinsic features and environment-specific features as input and outputting an estimated value of the upper bound of mutual information. This estimated value is used as the mutual information constraint loss in the calculation of the total loss.
[0037] Only crop intrinsic features are input into the downstream task head to calculate the task loss. The task loss can be the cross-entropy loss corresponding to the disease classification task or the mean squared error loss corresponding to the growth prediction task. Environmental specific features do not participate in the downstream task decision-making and are only used for adversarial decoupling constraint calculation. The task loss, orthogonal constraint loss, and mutual information constraint loss are weighted and summed to form the total training loss.
[0038] ;
[0039] in, This indicates losses in downstream tasks;
[0040] This represents the aforementioned orthogonal constraint loss;
[0041] This represents the aforementioned mutual information constraint loss;
[0042] This represents the weighting coefficient corresponding to the orthogonal constraint loss, which takes a value of 0.5 in a specific embodiment;
[0043] The weight coefficients corresponding to the mutual information constraint loss are represented, and in a specific embodiment, they are set to 0.3. Both are used to balance the performance of downstream tasks and the degree of feature decoupling.
[0044] After constructing the orthogonal decoupling representation mechanism, this invention further employs an incremental meta-learning mechanism with agro-biological-climate constraints to train the model, and divides the clustered data into the first... The subset of data for each meta-task is denoted as The optimization objective of meta-learning is to find a set of shared initial parameters that are sensitive to changes in the environment and crops, so that they can achieve good performance on each subset of meta-task data after a small number of gradient updates. Specifically, this is expressed as follows:
[0045] ;
[0046] in, The shared parameters of the model include those of the aforementioned orthogonal decoupled encoder and the downstream task head.
[0047] This represents the optimal initialization parameters obtained after the meta-training converges.
[0048] This represents the total number of meta-task data subsets participating in this round of meta-training;
[0049] Indicates the first Each meta-task data subset corresponds to a data subset under a specific combination of region and growth stage;
[0050] The model represents the subset of meta-task data. The loss function on the query set;
[0051] This represents the inner loop learning rate, which in a specific embodiment is taken as 0.01.
[0052] Indicates the parameter Operators for finding gradients.
[0053] Specifically, in each round of meta-training, several data subsets are first sampled from multiple meta-task data subsets to form a training batch. In a specific embodiment, eight meta-task data subsets are sampled in each batch.
[0054] Then, for each sampled subset of meta-task data, gradient descent is performed on the shared parameters based on the total training loss on its support set for a preset number of times. In a specific embodiment, the preset number of times is five steps, to obtain the task-specific parameters corresponding to the subset of meta-task data.
[0055] Next, the query loss is calculated on the corresponding query set using the task-specific parameters. The query losses of multiple meta-task data subsets are then aggregated, and the outer loop meta-gradient relative to the shared parameters is calculated.
[0056] Then, the shared parameters are updated based on the gradient of the outer loop element;
[0057] The above process is repeated until the meta-training loss converges or the preset training round limit is reached. Finally, meta-learning initialization parameters that are sensitive to changes in the environment and crops are output. Compared with the parameters obtained by conventional end-to-end training, the meta-learning initialization parameters obtained through the above meta-training process have a faster adaptation speed when facing a small number of samples in new regions or new growth stages.
[0058] After the model completes the aforementioned training and obtains the deployment model based on meta-learning initialization parameters, the deployment model is deployed to the target scene and enters the phenological gating elastic weight solidification incremental update process in the deployment phase. During the deployment and operation, the model continuously monitors the local area and crop growth stage information. When a preset scene change event is detected, the incremental adaptive process is triggered. The scene change event includes changes in the deployment environment and changes in the crop growth stage. After triggering, a small number of newly labeled samples in the new scene are collected, and the current model is used to infer the new scene samples. Pseudo-labeled samples with confidence levels not lower than a preset threshold are selected. In a specific embodiment, the preset threshold is set to 0.9. The newly labeled samples and pseudo-labeled samples together constitute a small sample dataset.
[0059] Subsequently, the diagonal Fisher information matrix of the current model parameters is estimated based on historical task data. Specifically, the expected square of the gradient of the model parameters on the log-likelihood function is calculated using historical task data. This expected square is then used as the element of the corresponding position in the diagonal Fisher information matrix to measure the importance of the corresponding parameter to historical regional and phenological characteristics. Simultaneously, considering the irreversible temporal characteristics of crop growth, this invention dynamically calculates the regularization coefficient, i.e., the phenological attenuation factor, based on the phenological interval between the current growth stage and the growth stage at the time of the last model update. The specific calculation method is as follows:
[0060] ;
[0061] in, This represents the initial regularization strength hyperparameter, which takes the value of one thousand in a specific embodiment;
[0062] This represents the decay rate hyperparameter, which takes a value of 0.05 in a specific embodiment.
[0063] This represents the interval between the current phenological stage and the phenological stage at the time of the last model update. It can be characterized by the daily cumulative difference in growth degree or the difference in growth stage number. The larger the phenological interval, the more significant the new growth period that the crop has entered, which is significantly different from the historical stage. At this time, the phenological decay factor decreases accordingly, allowing the model to update the parameters more significantly to fully adapt to the characteristics of the new stage.
[0064] The smaller the phenological interval, the greater the phenological attenuation factor, which imposes stronger constraints on parameter variations in order to preserve the memory of common characteristics of adjacent phenological periods.
[0065] Based on the diagonal Fisher information matrix and the phenological attenuation factor, an elastic weighted solidification loss is constructed:
[0066] ;
[0067] in, This indicates the first element on the diagonal of the Fisher information matrix. One element;
[0068] This indicates the number of times the update has been fine-tuned. One parameter;
[0069] This indicates the state before the fine-tuning update, i.e., the state after the previous round of solidification. One parameter;
[0070] The aforementioned phenological attenuation factor is represented by the sum of the new task loss calculated based on a small sample dataset and the elastic weight fixation loss, resulting in the total fine-tuning loss during the deployment phase:
[0071] ;
[0072] in, The model represents a small sample dataset in a new scenario. Task loss;
[0073] The aforementioned elastic weight solidification loss is represented by minimizing the total fine-tuning loss. The parameters of the deployed model are updated with a preset number of steps. In a specific embodiment, the preset number of steps is a small number of steps, not exceeding fifty steps. The model can then adapt to new regions or new growth stages, while effectively suppressing catastrophic forgetting of historical common pathological features. After fine-tuning, the updated parameters are solidified as new historical baseline parameters. The diagonal Fisher information matrix is then re-estimated or cumulatively updated in conjunction with the small sample dataset of this round, serving as the baseline for the next round of incremental adaptive updates. This process is repeated to achieve continuous adaptation of the model throughout the entire crop growth cycle and during cross-regional deployment.
[0074] To further illustrate the complete implementation process of this invention, a specific embodiment is given below. Assume a smart agriculture service platform needs to train and continuously deploy a machine learning model for rice disease identification, covering multiple geographical regions and multiple growth stages of rice. First, the platform collects visible light images, multispectral images, and meteorological time-series data for each region and growth stage using field sensors, drones, satellite remote sensing, and weather stations. The data is then automatically clustered according to geographical location labels and growth stage labels to obtain several meta-task data subsets. Next, a crop feature encoder and an environmental feature encoder are constructed. For samples in each meta-task data subset, crop intrinsic features and environmental specific features are extracted. Orthogonal constraint loss, mutual information constraint loss, and disease classification task loss are calculated, and a weighted sum is obtained to obtain the total training loss. Incremental meta-learning training is then conducted based on this loss to obtain a model that can effectively detect environmental and crop variations. Sensitive meta-learning initialization parameters are used to obtain the deployment model, which is then deployed to an edge computing device in a certain region. After rice enters the heading stage, the platform detects a change in the growth stage and triggers an incremental adaptive process: a small sample dataset is constructed by collecting a small number of newly labeled samples and combining them with high-confidence pseudo-label samples; the diagonal Fisher information matrix is estimated based on historical task data; the phenological decay factor is calculated based on the phenological interval between the heading stage and the growth stage at the time of the last update; an elastic weight solidification loss is constructed and combined with the new task loss to obtain a fine-tuned total loss; and a small number of gradient updates are performed on the deployment model to achieve rapid adaptation to the characteristics of diseases during the heading stage, while retaining the ability to identify the characteristics of diseases in the previous growth stages. When the deployment model is migrated to a new region with very different environmental statistical patterns, the same incremental adaptive process is triggered to achieve low-cost and rapid adaptation in cross-regional scenarios.
[0075] In another embodiment of the present invention, the feature decoupling step can be replaced by domain adversarial training instead of the aforementioned orthogonal constraint loss and mutual information constraint loss. Specifically, a gradient inversion layer and a domain discriminator are connected after the environmental feature encoder branch. Through adversarial training, the features extracted by the environmental feature encoder cannot be distinguished by the domain discriminator to determine their region. At the same time, the features extracted by the crop feature encoder retain discriminative information that is beneficial to downstream tasks, thereby achieving the same effect of decoupling environmental noise from crop intrinsic features.
[0076] In another embodiment of the present invention, the continuous adaptation step in the deployment phase can be replaced by a continuous learning method based on memory playback instead of the aforementioned elastic weight solidification mechanism. Specifically, a historical representative sample cache pool is maintained inside the model. When fine-tuning the model using a small sample dataset of a new scenario, representative samples from each phenological period in history are simultaneously extracted from the cache pool to participate in gradient updates. By training with a mixture of new and old samples, the catastrophic forgetting of historical features by the model can be suppressed. This also achieves the technical effect of low cost and continuous adaptation to the drift of agricultural time series concepts.
[0077] It should be noted that the crop feature encoder, environmental feature encoder, mutual information estimation network, and downstream task head in this invention can all be implemented using appropriate deep neural network structures according to specific application scenarios. Based on the disclosure of this invention, those skilled in the art can make adaptive adjustments to the network structure, hyperparameter values, and training details according to actual needs, and all such adjustments should fall within the protection scope of this invention. The training method provided by this invention can be deployed on a cloud server for meta-training, and the meta-learning initialization parameters can be sent to edge computing devices. The edge computing devices complete the incremental update of phenological gating elastic weights during the deployment phase locally, requiring only the upload of a small number of model parameter increments without uploading the original agricultural data, thereby reducing cloud training costs and edge device communication overhead while ensuring data privacy.
[0078] Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, any modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the protection scope defined by the claims of the present invention.
Claims
1. A method for training a machine learning model for smart agriculture, characterized in that, include: Acquire agricultural data collected from multiple geographical locations and multiple crop growth stages, including visible light images, multispectral images, and meteorological time-series data; The agricultural data is clustered according to geographic location tags and crop growth stage tags to obtain multiple meta-task data subsets, each of which corresponds to a combination scenario of environment and crop. For samples in the aforementioned meta-task data subset, the crop intrinsic features of the samples are extracted by a crop feature encoder, and the environment-specific features of the samples are extracted by an environment feature encoder. The crop intrinsic features and the environment-specific features are located in two independent feature subspaces, respectively. The orthogonal constraint loss is calculated based on the crop intrinsic characteristics and the environment-specific characteristics, and the mutual information constraint loss between the crop intrinsic characteristics and the environment-specific characteristics is calculated through a mutual information estimation network. The crop intrinsic characteristics are input into the downstream task head to obtain the task loss; The total training loss is obtained by weighted summing of the task loss, the orthogonality constraint loss, and the mutual information constraint loss. On multiple subsets of the meta-task data, an inner loop gradient update is performed on the shared parameters of the model based on the total training loss to obtain the task-specific parameters corresponding to each subset of the meta-task data. The query loss is calculated on the query set of the corresponding meta-task data subset using the task specialization parameters. The query losses of multiple meta-task data subsets are aggregated. The outer loop meta gradient relative to the shared parameters is calculated. The shared parameters are updated according to the outer loop meta gradient. Repeat the inner loop gradient update and outer loop meta gradient update until the preset convergence condition is met to obtain the meta-learning initialization parameters. Based on the meta-learning initialization parameters, a deployment model is obtained, and the deployment model is deployed to the target scenario. During the operation of the deployment model, the geographical location information and crop growth stage information of the deployment model are continuously monitored. The current geographical location information and current growth stage information are compared with the geographical location information and growth stage information recorded during the last model update. When the comparison result meets the preset judgment conditions for scene change events, a small sample dataset is obtained. The scene change events include changes in the deployment environment and changes in the crop growth stage. The small sample dataset is composed of newly labeled samples and pseudo-labeled samples. The pseudo-labeled samples are samples with a confidence level not lower than a preset threshold. The diagonal Fisher information matrix is used to estimate the parameters of the deployment model based on historical mission data. Based on the phenological interval between the current growth stage and the growth stage at the time of the last model update, the dynamic regularization coefficient is calculated according to the negative exponential decay relationship between the dynamic regularization coefficient and the phenological interval. The larger the phenological interval, the smaller the value of the dynamic regularization coefficient; the smaller the phenological interval, the larger the value of the dynamic regularization coefficient. The new task loss is calculated based on the small sample dataset. The elastic weight solidification loss is calculated by combining the diagonal Fisher information matrix and the dynamic regularization coefficient. The new task loss is added to the elastic weight solidification loss to obtain the fine-tuning total loss. Gradient updates are performed on the parameters of the deployment model based on the fine-tuned total loss to achieve incremental adaptive updates of the deployment model; The dynamic regularization coefficient exhibits a negative exponential decay relationship with the phenological interval; the larger the phenological interval, the smaller the value of the dynamic regularization coefficient. The smaller the phenological interval, the larger the value of the dynamic regularization coefficient.
2. The method according to claim 1, characterized in that, The step of calculating the orthogonal constraint loss based on the crop intrinsic features and the environment-specific features includes: multiplying the transpose matrix of the crop intrinsic features with the environment-specific feature matrix, calculating the square of the Frobenius norm of the resulting product matrix, and using it as the orthogonal constraint loss. The smaller the value of the orthogonal constraint loss, the weaker the linear correlation between the crop intrinsic features and the environment-specific features.
3. The method according to claim 1, characterized in that, The step of calculating the mutual information constraint loss between the crop intrinsic features and the environment-specific features using a mutual information estimation network includes: estimating an upper bound of the mutual information between the crop intrinsic features and the environment-specific features using the mutual information estimation network, using the upper bound as the mutual information constraint loss, and suppressing the nonlinear statistical dependency between the crop intrinsic features and the environment-specific features by minimizing the mutual information constraint loss.
4. The method according to claim 1, characterized in that, The crop feature encoder and the environmental feature encoder employ two deep neural network branches with identical structures and independent parameters, with convolutional neural networks as the backbone network of each deep neural network branch.
5. The method according to claim 1, characterized in that, The inner loop gradient update refers to performing gradient descent on the shared parameters a preset number of times based on the total training loss on the support set of the meta-task data subset to obtain the task-specific parameters. The outer loop meta-gradient update refers to updating the shared parameters based on the gradient of the sum of query set losses of multiple meta-task data subsets relative to the shared parameters.
6. The method according to claim 1, characterized in that, The method of estimating the diagonal Fisher information matrix of the parameters of the deployment model based on historical task data includes: calculating the expected square of the gradient of the parameters of the deployment model on the log-likelihood function using historical task data, and using the expected square of the gradient as the element at the corresponding position of the diagonal Fisher information matrix, wherein the element is used to characterize the importance of the corresponding parameter to the characteristics of the historical region and historical growth stage.
7. The method according to claim 1, characterized in that, After performing gradient updates on the parameters of the deployed model based on the fine-tuned total loss, the method further includes: fixing the updated parameters as new historical baseline parameters, and re-estimating the diagonal Fisher information matrix in combination with the small sample dataset of this round, as the baseline for the next round of incremental adaptive updates.
8. A machine learning model training device for smart agriculture, characterized in that, include: The data acquisition and meta-task partitioning module is used to acquire agricultural data collected from multiple geographical locations and multiple crop growth stages, and to cluster the agricultural data according to geographical location labels and crop growth stage labels to obtain multiple meta-task data subsets. The orthogonal decoupled feature representation module is used to extract crop intrinsic features and environment-specific features from samples in the subset of the meta-task data through a crop feature encoder and an environment feature encoder, and to calculate orthogonal constraint loss and mutual information constraint loss based on the crop intrinsic features and the environment-specific features, and to obtain the total training loss by combining the task loss. The incremental meta-learning training module is used to perform inner loop gradient update and outer loop meta gradient update on multiple meta-task data subsets based on the total training loss to obtain meta-learning initialization parameters. The phenological gated elastic weight solidification incremental adaptive module is used to deploy the deployment model obtained based on the meta-learning initialization parameters to the target scene, and when a preset scene change event is detected, acquire a small sample dataset, estimate the diagonal Fisher information matrix of the parameters of the deployment model, calculate the dynamic regularization coefficient according to the phenological interval, and perform incremental adaptive updates on the parameters of the deployment model by combining the small sample dataset, the diagonal Fisher information matrix and the dynamic regularization coefficient.
9. 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 machine learning model training method for smart agriculture as described in any one of claims 1 to 8.