A multi-modal intelligent agricultural perception model cross-region migration method and device
By employing cross-modal anchoring and conditional domain adversarial alignment, the problem of multi-factor coupled domain shift in agricultural cross-regional model migration was solved, achieving effective model adaptation of the target domain with a small number of labeled samples, while maintaining environmental perception and physical verifiability.
Patent Information
- Application Number
- CN202611674093.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-28
- Publication Date
- 2026-11-27
AI Technical Summary
In the migration of agricultural cross-regional models, due to the complex domain shift problem caused by multi-factor coupling, existing technologies are unable to effectively solve the model adaptation difficulties caused by differences in spectral characteristics, light and climate differences, crop phenological deviations, and sensor drift.
By acquiring image and sensor data from the source and target domains, cross-modal anchoring processing and conditional mutual information minimization are performed. A domain discriminator is used for conditional domain adversarial alignment, and alignment is achieved through phenological stage weighted maximum mean difference distribution. This process yields category prototypes to enable cross-regional migration.
With only a small number of labeled samples required in the target domain, it effectively eliminates the multi-factor coupled domain shift caused by soil spectrum, light and climate, crop phenology and sensor drift, while preserving environmental perception capabilities and physical verifiability.
Smart Images

Figure CN123179111A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of deep learning technology, and in particular to a method and apparatus for cross-regional migration of a multimodal smart agriculture perception model. Background Technology
[0002] The core challenge in cross-regional model transfer for agricultural scenarios lies in the complex domain shift problem caused by multi-factor coupling. First, different soil types exhibit significant differences in spectral characteristics. For example, the yellow-brown soil in area A and the brick-red soil in area B show drastically different spectral reflectance patterns in the visible and near-infrared bands, causing a systematic domain shift in image background features. Second, regional differences in illumination and climate further amplify inter-domain bias. Strong ultraviolet radiation and high humidity in tropical regions can cause nonlinear distortions in image saturation, contrast, and sensor response curves. Simultaneously, there is a strong coupling effect between illumination conditions and soil surface characteristics, resulting in differentiated spectral characteristics of the same soil type under different illuminations. Furthermore, cross-latitude phenological deviations in crops lead to feature mismatch. The growth rhythms of the same crop variety exhibit significant phase differences at different latitudes. For example, the heading period of the same rice variety can differ by more than 20 days between areas A and B, causing images acquired at the same calendar time to correspond to different growth stages, making crop morphology and color characteristics incomparable. Meanwhile, environmental sensors such as field temperature and humidity, soil pH, and light intensity experience systematic measurement drift under different climatic conditions, making it impossible to directly align and compare source and target domain sensor data. More importantly, these influencing factors do not act independently but form a complex coupling relationship: changes in light intensity alter the appearance of the soil image, while phenological differences change the light response characteristics of the crop canopy. This complex domain shift caused by the interplay of multiple factors is the core reason why general domain adaptive methods are ineffective in solving the problem of cross-regional agricultural migration. Summary of the Invention
[0003] This disclosure provides a method and apparatus for cross-regional migration of a multimodal smart agriculture sensing model, in order to at least solve the above-mentioned technical problems existing in the prior art.
[0004] According to a first aspect of this disclosure, a method for cross-regional migration of a multimodal smart agriculture sensing model is provided, the method comprising: Source domain samples and target domain samples are acquired, both of which include image data and sensor data; wherein the number of labeled samples in the target domain samples is less than the number of labeled samples in the source domain samples. Based on the image data and the sensor data, the initial image environment features, task features, and phenological stage probabilities are obtained; Perform cross-modal anchoring processing on the initial image environment features, semantically align the initial image environment features with the sensor-measured environment variables, and reconstruct the visually perceptible environment variables from the initial image environment features to obtain target image environment features with physical environment semantics. Under the constraints of task labels and phenological stage probabilities, the task features and the target image environment features are subjected to conditional mutual information minimization processing to obtain purified task features. Based on the environmental features of the target image and the probability of the phenological stage, the conditional matching weight between the source domain sample and the target domain sample is determined; Using the purified task features as input, a domain discriminator is combined with the conditional matching weights to perform conditional domain adversarial alignment on the purified task features to obtain the first adapted task features. Based on the phenological stage probability, the first adaptation task features are aligned according to the maximum mean difference distribution weighted by the phenological stage to obtain the second adaptation task features. The second adaptation task features corresponding to the labeled samples in the target domain samples are aggregated by category to obtain category prototypes for each category. Based on the category prototype and the sample to be predicted, the prediction result is obtained.
[0005] According to a second aspect of this disclosure, a device for cross-regional migration of a multimodal smart agriculture sensing model is provided, the device comprising: The data acquisition module is used to acquire source domain samples and target domain samples, both of which include image data and sensor data; wherein the number of labeled samples in the target domain samples is less than the number of labeled samples in the source domain samples. The feature extraction module is used to obtain initial image environment features, task features, and phenological stage probabilities based on the image data and the sensor data. The cross-modal anchoring module is used to perform cross-modal anchoring processing on the initial image environment features, semantically align the initial image environment features with the sensor-measured environment variables, and reconstruct the visually perceptible environment variables from the initial image environment features to obtain target image environment features with physical environment semantics. The feature purification module is used to minimize the conditional mutual information between the task features and the target image environment features under the constraints of task labels and phenological stage probabilities, so as to obtain purified task features. The matching weight determination module is used to determine the conditional matching weight between the source domain sample and the target domain sample based on the environmental features of the target image and the phenological stage probability. The domain adversarial alignment module is used to perform conditional domain adversarial alignment processing on the purified task features by using the purified task features as input to the domain discriminator and combining the conditional matching weights to obtain the first adapted task features. The phenological weighted distribution alignment module is used to perform maximum mean difference distribution alignment processing on the first adaptation task features based on the phenological stage probability to obtain the second adaptation task features. The prototype construction module is used to perform mean aggregation on the second adaptation task features corresponding to the labeled samples in the target domain samples according to the category, so as to obtain category prototypes for each category. The prediction module is used to obtain prediction results based on the category prototype and the sample to be predicted.
[0006] According to a third aspect of this disclosure, an electronic device is provided, comprising: At least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the methods described in this disclosure.
[0007] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the methods described in this disclosure.
[0008] This scheme has at least the following beneficial effects: By decoupling image and sensor data into task features, image environment features, and phenological stage probabilities, and anchoring image environment features across modalities using sensor-measured environmental variables, the environmental features extracted from the image possess verifiable physical semantics; by minimizing the conditional mutual information between task features and image environment features under the constraints of task labels and phenological stage probabilities, redundant environmental information in task features that is unrelated to task category and phenological stage is reduced; by determining the conditional matching weights based on the target image environment features and phenological stage probabilities, the domain discriminator performs conditional domain adversarial alignment of task features only among samples with similar conditions, avoiding forced alignment of environmental features and phenological features; by aligning according to the maximum mean difference distribution weighted by phenological stage, the task feature distribution offset caused by phenological phase difference is eliminated; and by using only the second-fit task features to aggregate by category mean to obtain the category prototype, environmental noise is avoided from mixing into the category prototype. Therefore, this scheme enables cross-regional migration of agricultural multimodal perception models with only a small number of labeled samples required in the target domain. It effectively eliminates the coupling domain shift caused by multiple factors such as soil spectrum, light and climate, crop phenology and sensor drift, while preserving environmental perception capabilities and physical verifiability.
[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0010] The above and other objects, features, and advantages of this disclosure will become readily apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. Several embodiments of this disclosure are illustrated in the drawings by way of example and not limitation, in which: In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
[0011] Figure 1 A schematic diagram illustrating the implementation process of a method for cross-regional migration of a multimodal smart agriculture sensing model according to an embodiment of this disclosure is shown. Figure 2 A schematic diagram of the composition structure of a multimodal smart agriculture sensing model cross-regional migration device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0012] To make the objectives, features, and advantages of this disclosure more apparent and understandable, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.
[0013] To address the challenge of effectively eliminating multi-factor coupled domain shifts in cross-regional agricultural scenarios, this field primarily employs transfer learning methods based on Adversarial Domain Alignment (DANN), distribution correction methods based on Maximum Mean Difference (MMD), few-shot learning methods based on Prototypical Networks, and schemes combining these three approaches. However, all of these methods suffer from fundamental flaws: DANN implicitly suppresses domain information by deceiving the discriminator, failing to guarantee the purity of domain-invariant features from an information theory perspective. Furthermore, its attempt to uniformly align the entire feature space ignores the fact that environmental features such as soil color and light intensity are inherently domain-dependent, and forced alignment can impair the classifier's ability to distinguish fine-grained crop physiological characteristics. It also lacks the ability to decompose multi-factor coupled shifts, failing to differentiate between soil color changes caused by light variations and leaf color changes caused by diseases. MMD, as a global distribution alignment metric, cannot distinguish which dimensions of the feature space's distribution shift are caused by environmental differences and which by crop physiological differences, potentially leading to the erroneous elimination of meaningful inter-class differences during the alignment process. Moreover, the choice of kernel function lacks a physical basis in agricultural scenarios. Prototype networks assume that the feature space has good domain invariance, but do not provide any mechanism to guarantee this premise. When the environmental background of the target domain sample differs significantly from that of the source domain, environmental noise will be mixed in the prototype, resulting in a significant decrease in classification accuracy. Although the combination of DANN, MMD and prototype networks uses the three in series, there is a lack of organic coupling between the modules. They are optimized independently without a unified optimization objective. Moreover, all modules operate on the same feature space without structural decomposition and differentiation of features, which leads to an inherent conflict between the domain alignment process and the classification task. At the same time, it does not utilize the field sensor data available in agricultural scenarios as physical constraint signals for domain adaptation.
[0014] To address the aforementioned technical problems, the first aspect of this disclosure provides a method for cross-regional migration of a multimodal smart agriculture sensing model, such as... Figure 1 As shown, the method includes the following steps: Step 101: Obtain source domain samples and target domain samples. Both source domain samples and target domain samples include image data and sensor data. The number of labeled samples in the target domain samples is less than the number of labeled samples in the source domain samples.
[0015] The source domain samples are agricultural sensing data collected in the source region, containing image data and sensor data, and with labeled samples. The target domain samples are agricultural sensing data collected in the target region, containing image data and sensor data, and with labeled samples. Both the source and target domain samples include image data and sensor data. The image data consists of visible light images of crops taken in the field, and the sensor data consists of environmental variables such as air temperature, air humidity, soil moisture, soil pH, and light intensity collected by field environmental sensors.
[0016] The number of labeled samples in the source domain is greater than the number of labeled samples in the target domain, meaning the target domain provides only a small number of labeled samples for model adaptation. For example, the source domain could be approximately 50,000 labeled samples collected from a strawberry base in Nanjing, while the target domain could be approximately 20 labeled samples collected from an intercropping strawberry base in Hainan. The smaller number of labeled samples in the target domain compared to the source domain allows this method to achieve cross-regional model transfer under the condition of limited labeling costs in the target domain.
[0017] It should be noted that the image data and sensor data in the source domain samples and target domain samples are synchronously collected paired data. That is, in each set of samples, the image data and sensor data correspond to the crop status and environmental conditions of the same plot at the same time, so that the initial image environmental features, task features and phenological stage probabilities can be obtained based on the image data and sensor data in subsequent steps.
[0018] Step 102: Based on image data and sensor data, obtain the initial image environment features, task features, and phenological stage probabilities.
[0019] In this process, feature extraction and feature decoupling are performed on image data and sensor data respectively, and the information contained in image data and sensor data is mapped to a structured feature space to obtain three types of feature representations: initial image environment features, task features, and phenological stage probabilities.
[0020] The initial image environment features are feature representations extracted from image data that characterize the environmental conditions in which crops grow, including environmental semantics such as soil appearance, light conditions, and background information. These initial image environment features are generated independently of the image data, meaning their generation process does not rely on sensor data, thus avoiding the direct copying of sensor information to the environmental features.
[0021] Task features are feature representations extracted from image and sensor data that characterize agronomic task-related information, including semantics related to classification decisions such as disease type and growth level. Task features are generated based on fused information from image and sensor data to comprehensively utilize task-related discriminative information from both modalities.
[0022] Phenological stage probability is a characteristic representation of the probability distribution of a crop's growth stage. It is calculated based on accumulated temperature models and sensor data and is used to describe the current phenological stage of a crop. The phenological stage probability has a definite physical meaning, with each component representing the probability that a sample belongs to the corresponding phenological stage.
[0023] Step 103: Perform cross-modal anchoring processing on the initial image environment features, semantically align the initial image environment features with the sensor-measured environment variables, and reconstruct the visually perceptible environment variables from the initial image environment features to obtain target image environment features with physical environment semantics.
[0024] Since the initial image environmental features are generated solely from the image encoding path, they may learn appearance information unrelated to the real environment. Therefore, they need to be supervised and constrained by environmental variables measured by field sensors. Specifically, the initial image environmental features are first mapped to the same semantic space as the sensor-measured environmental variables via a projection network. Then, using the standardized sensor-measured environmental variables after a fixed linear mapping as anchor points, the projected image environmental features are supervised and anchored through cross-modal anchoring loss to ensure semantic consistency between the two. Simultaneously, the initial image environmental features are required to reconstruct visually perceptible environmental variables, such as light intensity, canopy moisture, surface humidity, and shadow coverage. For auxiliary environmental variables statistically related to changes in image appearance, such as air temperature, soil moisture content, and soil pH, auxiliary prediction constraints are applied. Through the combined effect of cross-modal anchoring and reconstruction constraints, the initial image environmental features are endowed with explicit physical environmental semantics.
[0025] Step 104: Under the constraints of task labels and phenological stage probabilities, conditional mutual information minimization processing is performed on task features and target image environmental features to obtain purified task features.
[0026] Under the constraints of task labels and phenological stage probabilities, conditional mutual information minimization is performed on task features and target image environmental features to reduce redundant environmental information in task features that is irrelevant to the task category and phenological stage. The reason for not directly and unconditionally minimizing the mutual information between task features and environmental features is that environmental factors such as temperature, humidity, and light intensity may themselves contain information related to the task label; unconditional suppression might discard useful discriminative information. Therefore, this step minimizes the mutual information under the given task label and phenological stage probabilities, removing only redundant environmental information unrelated to the category and phenology. The processing is performed domain-specifically: in the source domain, the source domain conditional mutual information loss is calculated based on the task label and phenological stage probabilities of the labeled samples; in the target domain, for samples whose pseudo-label confidence meets preset conditions, the target domain conditional mutual information loss is calculated based on the pseudo-label and phenological stage probabilities to avoid erroneous pseudo-label contamination of the estimation. After a weighted sum of the two losses, a contrastive logarithmic ratio upper bound is used for differentiability estimation and minimization. The variational approximation network and encoder are alternately optimized to finally obtain the purified task features.
[0027] Step 105: Based on the environmental features of the target image and the probability of phenological stages, determine the conditional matching weights between the source domain samples and the target domain samples.
[0028] Based on the environmental features of the target image and the probability of phenological stages, conditional matching weights are determined between source and target domain samples to measure their similarity in environmental and phenological conditions, thereby limiting the sample range for subsequent domain adversarial alignment. Specifically, the physical environment projection obtained by processing the target image environmental features through a projection network and then performing stopping gradient processing is concatenated with the phenological stage probability to form a conditional vector. Here, sensor-anchored physical environment projections are used instead of the original environmental latent variables to prevent regional identifiers such as soil color and background texture from dominating the matching distance. Then, based on the distance between the source and target domain conditional vectors, the original conditional matching weights are calculated using a Gaussian kernel function. Top-K sparsification is then applied to these original conditional matching weights, retaining the top K source domain nearest neighbors for each target domain sample in the matching weight ranking. The matching quality is determined based on the average original weights of these K source domain nearest neighbors. When the matching quality is below a preset threshold, automatic alignment for that target domain sample is paused, and its decision confidence is reduced, ultimately yielding the final conditional matching weights.
[0029] Step 106: Using the domain discriminator with the purified task features as input, and combining the conditional matching weights, the purified task features are subjected to conditional domain adversarial alignment processing to obtain the first adapted task features.
[0030] A domain discriminator, using purified task features as input, performs conditional domain adversarial alignment on the purified task features, incorporating conditional matching weights, to obtain the first adapted task features. The domain discriminator only receives the purified task features, excluding target image environmental features and phenological stage probabilities. This prevents the discriminator from using environmental or phenological differences to distinguish domain origins, forcing it to rely solely on the task features themselves. The conditional domain adversarial alignment is performed using conditional matching weights: first, the matching strength of each sample is determined based on the conditional matching weights and matching quality. This matching strength is then used to weight the domain adversarial loss, applying stronger adversarial pressure to samples with source domain neighbors and matching quality meeting preset conditions, while reducing the alignment weight for samples lacking source domain neighbors to avoid forced alignment introducing negative transfer. Subsequently, a gradient inversion layer is used to train the purified task features for domain adversarial training, making the task features of the source and target domains indistinguishable on sample pairs with similar conditions. Meanwhile, task classification is performed based on the purified task features to obtain the classification gradient. When the domain adversarial gradient conflicts with the classification gradient, the domain adversarial gradient is projected to the orthogonal direction of the classification gradient to avoid domain adversarial alignment from impairing classification performance.
[0031] Step 107: Based on the phenological stage probability, the first adaptation task features are aligned according to the maximum mean difference distribution weighted by the phenological stage to obtain the second adaptation task features.
[0032] Step 106, the conditional domain adversarial alignment, primarily addresses local shifts caused by both environmental and phenological factors, while this step specifically addresses distribution biases caused by phenological misalignment. Specifically, it first calculates the effective sample size for both the source and target domains at each phenological stage based on the phenological stage probability; the effective sample size is the sum of the probabilities for that phenological stage. Then, it calculates the stage weight for each phenological stage based on the effective sample size and applies a two-way validity gating to the stage weights, requiring that the effective sample size for both the source and target domains at the corresponding phenological stage be greater than a preset threshold. If the sample size for any domain at a certain phenological stage is insufficient, that stage does not participate in alignment. Finally, it performs weighted maximum mean difference alignment on the first adaptation task features of the source and target domains using the stage weights, ensuring that distribution correction is performed between samples at the same or similar phenological stages. Soft stage probability weighting ensures that distribution correction is performed between samples at the same or similar phenological stages, and overlapping stage probabilities provide a smooth transition.
[0033] Step 108: Aggregate the second adaptation task features corresponding to the labeled samples in the target domain samples by category to obtain the category prototypes for each category.
[0034] The category prototype is the representative representation of each category in the task feature space, obtained by averaging the second-adaptation task features of labeled samples belonging to the same category. Here, only the second-adaptation task features are used to calculate the category prototype, excluding environmental or phenological features, thus avoiding the contamination of environmental noise and phenological differences. The obtained category prototype is used for subsequent classification of samples to be predicted. During deployment, the system continuously collects unlabeled samples from the target domain and selectively updates the category prototype through a multi-layered filtering mechanism, including pseudo-label generation, environmental consistency checks, image sensor environmental estimation consistency checks, and momentum updates.
[0035] Step 109: Based on the category prototype and the sample to be predicted, obtain the prediction result.
[0036] First, based on the image and sensor data of the sample to be predicted, the task features of the sample to be predicted are obtained in the same manner as in step 102. Then, the similarity between the task features and the prototypes of each category is calculated, and the prediction result is obtained based on the similarity. The category corresponding to the prototype with the highest similarity is the prediction result. During the inference stage, the confidence of the prediction result can also be calibrated based on the deviation between the target image environment features of the sample to be predicted and the known environment distribution. When the deviation continues to exceed a preset threshold, active learning is triggered and the category prototypes are selectively updated. The known environment distribution is the target image environment feature distribution of the source domain sample.
[0037] This scheme decouples image and sensor data into task features, image environment features, and phenological stage probabilities, and anchors image environment features across modalities using sensor-measured environmental variables, giving the extracted environmental features verifiable physical semantics. By minimizing the conditional mutual information between task features and image environment features under the constraints of task labels and phenological stage probabilities, redundant environmental information irrelevant to task category and phenological stage is reduced. Conditional matching weights are determined based on target image environment features and phenological stage probabilities, enabling the domain discriminator to perform conditional domain adversarial alignment of task features only among samples with similar conditions, avoiding forced alignment of environmental and phenological features. Alignment based on the maximum mean difference distribution weighted by phenological stage eliminates task feature distribution offsets caused by phenological phase differences. Finally, by aggregating only the second-fit task features by category mean to obtain the category prototype, environmental noise is avoided from mixing into the category prototype.
[0038] Therefore, this scheme enables cross-regional migration of agricultural multimodal perception models with only a small number of labeled samples required in the target domain. It effectively eliminates the coupling domain shift caused by multiple factors such as soil spectrum, light and climate, crop phenology and sensor drift, while preserving environmental perception capabilities and physical verifiability.
[0039] In another embodiment of this disclosure, initial image environment features, task features, and phenological stage probabilities are obtained based on image data and sensor data, including: encoding image data using an image encoder to obtain image features, and encoding sensor data using a sensor encoder to obtain sensor features; generating initial image environment features based on the image features, wherein the initial image environment features are generated solely from the image encoding path; generating sensor environment features based on the sensor data, wherein the sensor environment features are generated solely from the sensor encoding path; performing weighted fusion of image features and sensor features based on modal reliability weights to obtain fused features, and obtaining task features based on the fused features; and calculating phenological stage probabilities based on the accumulated temperature model and sensor data; wherein the sensor environment features are used to determine the sensor modal reliability weights in the modal reliability weights.
[0040] First, image data is encoded using an image encoder to obtain image features, and sensor data is encoded using a sensor encoder to obtain sensor features. Let the source domain dataset be... The target domain dataset is ,in ; For the source domain Image data of one sample; For the source domain Sensor data for each sample; For the source domain Task labels for each sample; This represents the number of samples in the source domain. For the target domain Image data of one sample; For the target domain Sensor data for each sample; For the target domain Task labels for each sample; Number of samples in the target domain. Image encoder. and sensor encoder Output image features respectively and sensor features .in, For image data, it represents the source domain image data or target domain image data input to the image encoder; for 3D real vector space, The dimension of the image features; For sensor data, it represents the source domain sensor data or target domain sensor data input to the sensor encoder; for 3D real vector space, Dimensions of sensor features.
[0041] Then, initial image environment features are generated based on image features, which are generated solely from the image encoding path. Specifically, the initial image environment features... It is generated only from the image branch and does not touch the sensor encoding path. The initial image environment features characterize environmental semantics such as soil appearance, lighting conditions, and background information extracted from the image data; This is an image context branch network used to generate initial image context features from image features; Image features; for 3D real vector space, This represents the dimension of the initial image environment features. The purpose of this design is to cut off the shortcut of directly copying sensor information to environment features, ensuring that the subsequent technical logic of extracting environment features from the image and supervising them with sensor data holds true, rather than directly copying sensor information to the environment branch. If image environment features are allowed to be generated directly from sensor data, the model will take a shortcut, directly copying sensor readings instead of truly learning environmental information such as soil color and light intensity from the image, causing the model to fail to function properly in scenarios lacking sensors.
[0042] Simultaneously, sensor environment features are generated based on sensor data; these features are generated solely from the sensor encoding path. Specifically, sensor environment features... It is generated only from the sensor branch and does not touch the image encoding path. For sensor environment characteristics, characterize the environmental semantics of sensor data; This is a sensor environment branch network used to generate sensor environment features from sensor data; For sensor data; for 3D real vector space, This represents the dimension of sensor environmental features. After training with reconstruction loss, stable sensor environmental semantics are obtained from these features, which can be used for sensor reliability assessment. When the reconstruction loss of sensor environmental features increases abnormally, it indicates that the sensor data pattern deviates from the normal range, potentially indicating a sensor malfunction.
[0043] Next, image features and sensor features are weighted and fused based on modal reliability weights to obtain fused features, and task features are obtained based on these fused features. Specifically, the fused features... Task characteristics .in, The image modality reliability weight represents the reliability of the image modality under the current environmental conditions; Image features; The sensor modal reliability weights characterize the reliability of the sensor modes under current environmental conditions. Sensor characteristics; This is a fusion function used to fuse image features weighted by image modality reliability weights and sensor features weighted by sensor modality reliability weights into a fused feature. ; This is a task branch network used to generate task features from fused features; for 3D real vector space, This represents the dimension of task features. Task features encode agronomic task characteristics such as disease type and growth level, and are used for classification decision-making, prototype calculation, and domain adversarial alignment.
[0044] In agricultural scenarios, the reliability of different modalities varies under different environmental conditions. Therefore, modal reliability weights are used to directly evaluate the reliability of each modality based on multi-source indicators, without the need for additional training. These multi-source indicators include sensor time series continuity, image sensor reconstruction residuals, and physical upper and lower bound constraints. Table 1 shows the various indicators and their impact on reliability. Table 1
[0045] The reliability scores for each indicator are calculated based on the above metrics, and modal weights are obtained after normalization. Specifically, the sensor-side reliability indicators and the image-side reliability indicators are concatenated into a multi-source reliability indicator vector. ,in It includes at least one of the following: sensor time series continuity, sensor self-reconfiguration residual, and physical upper and lower bound constraints. It includes at least one of the following: image overexposure, image blur, and residual image environment feature reconstruction. The modal reliability weight is... ,in It is an adjustable weight vector that can be initialized empirically or trained with fault enhancement, i.e., artificially simulating faults such as sensor drift, data loss, and image overexposure, and fine-tuning it according to the known fault degree. Corresponding sensor modal reliability weights, The corresponding image modality reliability weights, the sum of which is 1. In the initial training phase, when the reliability weights have not undergone fault enhancement training, let... .
[0046] Modal reliability weights are used for gated multimodal fusion, i.e. Task features are generated based on fused features, and reliability weights are then formally incorporated into the computation chain. When multiple indicators simultaneously point to sensor anomalies, the sensor modal reliability weights... Automatic reduction reduces the model's reliance on unreliable sensor data.
[0047] Finally, the probability of phenological stages was calculated based on the accumulated temperature model and sensor data. The accumulated temperature model is as follows: ,in, As of the date t The accumulated temperature value per day, that is, from the sowing date up to the current date t Daily effective accumulated temperature; τ For the summation index, indicating the starting date from the sowing date. up to the current date t Every day between; The crop reference temperature and These represent the daily maximum and minimum temperatures. Probability of phenological stage. Each component This indicates that the current sample belongs to the first... The probability of phenological stages. The probability of phenological stages has a definite physical meaning and is used for subsequent sample condition matching and staged MMD weight calculation.
[0048] Among them, sensor environment features are used to determine the sensor modal reliability weights in the modal reliability weights. Specifically, the output result obtained by reconstructing the sensor environment features... The deviation between the sensor's measured environmental variables and the standardized sensor data, known as the sensor self-reconstruction residual, serves as one of the indicators of modal reliability weights. When the sensor self-reconstruction residual abnormally increases, it indicates that the sensor data pattern deviates from the normal range, leading to a decrease in the sensor modal reliability weights and a reduction in the model's reliance on sensor data. Therefore, sensor environmental characteristics influence modal reliability weights through the sensor self-reconstruction residuals, thereby affecting the generation of fused features and task features, and ultimately enabling sensor environmental characteristics to play a practical role in subsequent processing.
[0049] In summary, this embodiment achieves the acquisition of initial image environmental features, task features, and phenological stage probabilities through multimodal independent coding, feature decoupling, modal reliability weighted fusion, and accumulated temperature model calculation. The image environmental features are generated only by the image coding path, the sensor environmental features are generated only by the sensor coding path, and the sensor environmental features affect the modal reliability weights through the sensor self-reconstruction residuals, thereby affecting the generation of task features.
[0050] In another embodiment of this disclosure, the modal reliability weights include sensor modal reliability weights and image modal reliability weights. Based on these modal reliability weights, image features and sensor features are weighted and fused to obtain fused features. This includes determining sensor modal reliability weights and image modal reliability weights based on at least one of sensor time series continuity, sensor self-reconstruction residuals, image sensor cross-modal reconstruction residuals, and physical upper and lower bound constraints. The sensor self-reconstruction residual is the deviation between the output result obtained from the reconstruction of sensor environmental features and the standardized sensor measured environmental variables. The image sensor cross-modal reconstruction residual is the deviation between the environmental variable corresponding to the sensor measured environmental variable output from the initial image environmental feature reconstruction and the sensor measured environmental variable. Sensor time series continuity is the degree to which sensor readings change continuously within a reasonable range without abrupt changes. Physical upper and lower bound constraints are the degree to which sensor readings are within a physically possible range. Using the obtained sensor modal reliability weights and image modal reliability weights, image features and sensor features are weighted and fused to obtain fused features.
[0051] First, based on at least one of the following: sensor time series continuity, sensor self-reconstruction residual, image sensor cross-modal reconstruction residual, and physical upper and lower bound constraints, sensor modal reliability weights and image modal reliability weights are determined. These four indicators reflect the reliability of sensor data and image data from different perspectives. Any one of them can be used individually, or multiple indicators can be used in combination to comprehensively evaluate the reliability of each modality.
[0052] Here, the sensor self-reconstruction residual is the deviation between the output obtained by reconstructing the sensor's environmental characteristics and the standardized sensor-measured environmental variables. Specifically, the sensor's environmental characteristics... Reconstructed network via sensors Processing yields the reconstructed sensor input. The sensor self-reconstruction residual is ,in This is to standardize the measured environmental variables of the sensor. When the sensor self-reconstruction residual abnormally increases, it indicates that the sensor data mode deviates from the normal range, which may indicate sensor failure or sensor drift, and the sensor modal reliability weight is reduced accordingly.
[0053] The cross-modal reconstruction residual of an image sensor is the deviation between the environmental variable output from the initial image environmental feature reconstruction, which corresponds to the sensor's measured environmental variables, and the sensor's measured environmental variables. Specifically, the initial image environmental features... Network reconfigured by the environment Processing yields reconstructed environment variables. The image sensor cross-modal reconstruction residual is ,in This refers to the environmental variables corresponding to the actual environmental variables measured by the sensor. When the cross-modal reconstruction residual of the image sensor increases abnormally, it indicates a systematic deviation between the image-predicted environmental quantities and the sensor's measured values. Possible causes include sensor malfunction leading to reading shifts, or abnormal image quality causing failure in environmental feature extraction. This indicator reflects the reliability of both the image mode and the sensor mode.
[0054] Sensor time series continuity refers to the degree to which sensor readings change continuously within a reasonable range without abrupt changes. In agricultural scenarios, sensor readings typically change continuously over time. If discontinuous jumps or abrupt changes occur, it indicates that the sensor may be subject to interference or malfunction, reducing its reliability.
[0055] Physical upper and lower limits define the extent to which sensor readings fall within their physically possible range. Each sensor reading has its own physically possible range; for example, air temperature typically ranges from -40°C to 60°C, and soil pH typically ranges from 0 to 14. If a sensor reading exceeds its physically possible range, it indicates a sensor malfunction or abnormal data, reducing sensor reliability.
[0056] Based on at least one of the four indicators mentioned above, calculate the reliability score for each indicator, and then normalize it to obtain the sensor modal reliability weight and the image modal reliability weight. The modal reliability weight can be expressed as... ,in This is a vectorized representation of multi-source reliability metrics. The weight vector is adjustable and can be initialized empirically or trained using fault enhancement techniques. This involves artificially simulating faults such as sensor drift, data loss, and image overexposure, and then fine-tuning it to the known degree of fault. In the initial training phase, when the reliability weights have not undergone fault enhancement training, the following settings are used: .
[0057] Then, using the obtained sensor modal reliability weights and image modal reliability weights, the image features and sensor features are weighted and fused to obtain the fused features. Specifically, the fused features... ,in For image features, For sensor characteristics, For image modal reliability weights, For sensor modal reliability weights. Task characteristics. Based on the fusion feature generation, the reliability weight is then formally incorporated into the calculation chain. When multiple indicators simultaneously point to sensor anomalies, the sensor modal reliability weight... Automatic reduction reduces the model's reliance on unreliable sensor data; when image quality is abnormal, the image modal reliability weights are adjusted. Automatic reduction decreases the model's reliance on unreliable image data. Through this method, fused features can be dynamically adjusted based on the actual reliability of each modality, improving the robustness of task features in complex field environments.
[0058] In another embodiment of this disclosure, cross-modal anchoring processing is performed on the initial image environment features to semantically align the initial image environment features with the sensor-measured environment variables, and to reconstruct the initial image environment features into visually perceptible environment variables to obtain target image environment features with physical environment semantics. This includes: mapping the initial image environment features to the same semantic space as the sensor-measured environment variables via a projection network; using the result of standardized sensor-measured environment variables after fixed linear mapping and stopping gradient processing as anchor points; and performing supervised anchoring of the projected image environment features through cross-modal anchoring loss; processing the initial image environment features through an environment reconstruction network; applying strong supervised reconstruction to the directly visually supervised environment variables; and applying weak supervised auxiliary prediction to the statistically relevant auxiliary environment variables to obtain the target image environment features; wherein, the cross-modal anchoring loss and the image environment reconstruction loss jointly constrain the physical semantics of the initial image environment features.
[0059] First, the initial image environment features are mapped to the same semantic space as the sensor-measured environment variables via a projection network. Using the standardized sensor-measured environment variables after fixed linear mapping and stopping gradient processing as anchor points, supervised anchoring of the projected image environment features is performed through a cross-modal anchoring loss. The cross-modal anchoring loss is... ,in Projection networks for image environment features, For a fixed linear mapping matrix, This is the standardized vector of measured environmental variables. This indicates that the gradient has stopped.
[0060] It's important to note that the sensor side uses standardized environmental variables mapped to a fixed linear path as anchor points, rather than learning a separate sensor projection network with greater degrees of freedom. This is to ensure the anchored target has stable semantics. If a learnable projection network were also used on the sensor side, it might drift into arbitrary representation spaces during joint optimization with the image-side projection network, causing the anchored target to lose its physical meaning. Using a fixed linear path... Subsequently, the anchored target remains a deterministic function of standardized measured environmental variables, semantically stable and interpretable. (Stopping gradient) Its function is to prevent the anchored target on the sensor side from being biased by the gradient on the image side, and to ensure that the anchored target always faithfully reflects the actual environmental variables measured by the sensor.
[0061] Secondly, the initial image environment features are processed by an environment reconstruction network. Strongly supervised reconstruction is applied to directly visually supervised environment variables, while weakly supervised prediction is applied to statistically relevant auxiliary environment variables to obtain the target image environment features. The environment variables are divided into two categories, and their relationship with the image and the supervision method are shown in Table 2 below: Table 2
[0062] For the first type of directly visually supervised variables, it is required that the initial image environment features can be accurately reconstructed, i.e. Strong supervision and reconstruction losses are .in, The reconstructed output of the environmental variables that can be directly visually supervised is obtained by reconstructing the environmental features of the initial image; Reconstructing the network for visual environmental variables; These are measured values of environmental variables that can be directly visually supervised; these variables are directly related to the appearance of the image. For example, light intensity directly determines the overall brightness of the image, canopy moisture directly reflects the reflective properties of the leaf surface, and shadow coverage is directly manifested as the distribution of dark areas in the image. Therefore, they can be directly inferred from RGB images, and it is reasonable to apply enhanced supervision to their reconstruction.
[0063] For the second type of statistically relevant auxiliary variables, the initial image environmental features are used by the auxiliary prediction head to estimate environmental variables related to changes in image appearance, and the prediction error is used to provide weak supervision. The loss for weakly supervised prediction is .in, The predicted output is the statistically relevant auxiliary environmental variables estimated by the auxiliary prediction head based on the initial image environmental features; As an auxiliary prediction head, it is used to estimate statistically relevant auxiliary environmental variables related to changes in image appearance from initial image environmental features; To statistically determine the measured values of relevant auxiliary environmental variables, i.e. the standardized true values of statistically relevant auxiliary environmental variables; these variables are statistically related to changes in the appearance of the image, but are not directly visible in the image. For example, air temperature itself does not appear directly in the image, but high temperature is often accompanied by appearance features such as leaf curling and color changes. Therefore, image environmental features can predict air temperature to a certain extent, but the prediction accuracy is limited. Therefore, weak supervision is applied to assist prediction.
[0064] Total environmental reconfiguration loss is ,in These are the weighting coefficients for auxiliary variables. Because the predictive accuracy of auxiliary variables is lower than that of variables that can be directly visually supervised, their weighting coefficients... Set it to less than 1 to reduce the impact of auxiliary variable prediction errors on the overall environmental reconstruction loss.
[0065] In this model, cross-modal anchoring loss and image environment reconstruction loss jointly constrain the physical semantics of the initial image environment features. Cross-modal anchoring loss constrains the initial image environment features from a semantic alignment perspective, requiring them to align with the sensor-measured environmental variables in the semantic space after projection. Image environment reconstruction loss constrains the initial image environment features from a physical verifiability perspective, requiring them to be able to reconstruct visually perceptible environmental variables. The combined effect of these two factors verifies the model's ability to extract physical environment information from agricultural images. Since the initial image environment features are generated solely from the image, cross-modal anchoring and visual environment reconstruction together ensure that they possess physical environment semantics, resulting in target image environment features used for subsequent conditional mutual information minimization, conditional matching weight determination, and decision credibility calibration during the inference stage.
[0066] In addition, sensor environmental characteristics Similarly, independent training objectives are needed to maintain stable semantics, and supervision is provided by reconstructing sensor inputs, i.e. Sensor reconstruction loss is Sensor environment features, after being trained using sensor reconstruction loss, yield stable sensor environment semantics, which can be used for sensor reliability assessment. When the sensor reconstruction loss increases abnormally, it indicates that the sensor data pattern deviates from the normal range, potentially indicating a sensor malfunction, and the sensor modal reliability weights are correspondingly reduced. The anchoring target for image environment features directly uses standardized environment variables through a fixed linear mapping. The structure is simpler and the semantics are more stable. Since the image environment features are generated only from the image, cross-modal anchoring and visual environment reconstruction jointly validate the model's ability to extract physical environment information from agricultural images.
[0067] In another embodiment of this disclosure, under the constraints of task labels and phenological stage probabilities, conditional mutual information minimization processing is performed on task features and target image environment features to obtain purified task features. This includes estimating and minimizing the conditional mutual information between source domain task features and source domain target image environment features based on the task labels and phenological stage probabilities of labeled samples in the source domain samples, resulting in source domain conditional mutual information loss; and estimating and minimizing the conditional mutual information between target domain task features and target domain target image environment features based on pseudo-labels and phenological stage probabilities for samples whose pseudo-label confidence meets preset conditions, resulting in target domain conditional mutual information loss. The pseudo-labels are the predicted labels obtained by classification processing of unlabeled samples in the target domain samples. The source domain conditional mutual information loss and the target domain conditional mutual information loss are weighted and summed to obtain the total conditional mutual information loss. The total conditional mutual information loss is differentiably estimated and minimized using the upper bound of the contrast logarithm ratio, and the variational approximation network and encoder are alternately optimized to obtain purified task features.
[0068] First, it should be noted that this embodiment does not unconditionally minimize the mutual information between task features and target image environmental features because it considers the true causal relationship of agricultural tasks. For tasks such as growth grading and stress diagnosis, temperature, humidity, and light intensity may contain effective information related to the task labels. For example, high humidity environments are more likely to induce certain diseases, and strong light intensity may directly affect crop growth grades. If the mutual information between task features and environmental features is minimized unconditionally, this effective environmental information related to the task labels may be discarded, which would actually impair classification performance. Therefore, this embodiment minimizes mutual information under the constraints of task labels and phenological stage probabilities, reducing only redundant environmental information in the task features that is unrelated to the task category and phenological stage.
[0069] Due to differences in label availability between the source and target domains, conditional mutual information is calculated separately for each domain.
[0070] In the source domain, based on the task labels and phenological stage probabilities of the labeled samples in the source domain, the conditional mutual information between the source domain task features and the source domain target image environment features is estimated and minimized, resulting in the source domain conditional mutual information loss. The source domain conditional mutual information loss is... ,in, This is an estimate of the conditional mutual information; For source domain task characteristics, For the environmental features of the source domain target image, Label the samples in the source domain with task labels. This represents the phenological stage probability of the source domain. Since the source domain samples have real task labels, conditional mutual information can be directly calculated based on these labels.
[0071] In the target domain, for samples where the false label confidence meets preset conditions, the conditional mutual information between the target domain task features and the target domain target image environment features is estimated and minimized based on the false label and phenological stage probability, resulting in the target domain conditional mutual information loss. The target domain conditional mutual information loss is... ,in, The number of samples in the target domain. For indicator functions, This indicates that only those with the maximum predicted probability exceeding the threshold are considered. Calculations were performed on the samples. For target domain samples j Task characteristics; For target domain samples j Target image environmental features; These are pseudo-labels for the target domain samples. The probability of phenological stages in the target domain is given. The pseudo-labels are the predicted labels obtained from unlabeled samples in the target domain after classification. Conditional mutual information is calculated only for high-confidence pseudo-label samples in the target domain to avoid erroneous pseudo-labels contaminating the mutual information estimation and causing deviations in the mutual information minimization direction.
[0072] The total conditional mutual information loss is obtained by weighted summing of the source domain conditional mutual information loss and the target domain conditional mutual information loss. The total conditional mutual information loss is... ,in These are the target domain weight coefficients; The source domain conditional mutual information loss represents the estimated conditional mutual information between the source domain task features and the source domain target image environment features, given the task label and phenological stage probability of the samples labeled in the source domain samples. It is used to reduce redundant environmental information in the source domain task features that is irrelevant to the task category and phenological stage. Since the reliability of the target domain pseudo-labels is lower than that of the source domain true labels, the weight coefficient of the target domain conditional mutual information loss is set to less than 1 to reduce the impact of the target domain estimation error on the total loss. In the early stages of training, only the source domain conditional mutual information is calculated. Once the target domain pseudo-labels are stable, the target domain part is gradually added to avoid the unreliable pseudo-labels in the early stages of training causing an incorrect direction for minimizing mutual information.
[0073] A contrastive logarithmic ratio upper bound is used to perform differentiable estimation and minimization of the total conditional mutual information loss. The variational approximation network and encoder are alternately optimized to obtain the cleaned task features. The contrastive logarithmic ratio upper bound is a method for differentiable estimation of mutual information; its core idea is to use a variational approximation network... By approximating the conditional distribution, the estimation of mutual information is transformed into a differentiable contrast-log ratio form. CLUB training employs an alternating optimization strategy: first updating the variational approximation network... Make it approximate the conditional distribution, and then fix it. The encoder is updated to minimize the upper bound of the conditional mutual information. Through alternating optimization, the variational approximation network gradually approximates the true conditional distribution, and the encoder gradually reduces the conditional mutual information between the task features and the target image environment features, ultimately obtaining the cleaned task features.
[0074] Furthermore, to prevent feature degradation during mutual information minimization, this embodiment also prevents feature collapse through the following joint constraints: Environment Reconstruction Constraints. The target image's environmental features must be able to reconstruct the measured environmental parameters, preventing them from degenerating into constants; task classification constraints. The task features must be able to perform the classification task and prevent them from degenerating into task-irrelevant constants; cross-modal anchoring constraints. The target image environmental features, after projection, must be aligned with the sensor-measured environmental variables to prevent the target image environmental features from degenerating into arbitrary representations unrelated to physical measurements. These three constraints work together to ensure that each feature branch maintains its effective representational capability during the mutual information minimization process.
[0075] In another embodiment of this disclosure, the conditional matching weights between source domain samples and target domain samples are determined based on the environmental features of the target image and the probability of phenological stages. This includes: processing the environmental features of the target image through a projection network and then performing stopping gradient processing to obtain a physical environment projection, which is then concatenated with the probability of phenological stages to obtain a conditional vector; calculating the original conditional matching weights based on the distance between the source domain conditional vectors and the target domain conditional vectors using a Gaussian kernel function; performing Top-K sparsification on the original conditional matching weights, retaining the top K nearest neighbors of the source domain for each target domain sample in the matching weight ranking; determining the matching quality based on the average original weights of the K nearest neighbors of the source domain; and pausing automatic alignment for the target domain sample and reducing its decision confidence when the matching quality is lower than a preset threshold to obtain the conditional matching weights.
[0076] First, the physical environment projection obtained by processing the environmental features of the target image through a projection network and then through stopping gradient processing is concatenated with the phenological stage probability to obtain a conditional vector. The conditional vector is... ,in For projection networks, For the environmental features of the target image, For phenological stages, This indicates that the gradient has stopped.
[0077] It's important to note that the conditional vector uses a sensor-anchored physical environment projection, rather than the original environmental latent variables. The target image's environmental features may contain regional identifiers such as soil color and background texture. If the original environmental latent variables are used directly to calculate the matching distance, even if the actual environmental conditions of samples from Nanjing and Hainan are similar, differences in soil color could lead to excessively large distances, causing the match to fail. The physical environment projection mapped by the projection network constrains the environmental features to the physical environment semantic space, reflecting actual environmental conditions such as light intensity and soil moisture, thereby enhancing the physical interpretability of the matching conditions. The purpose of stopping the gradient is to ensure that environmental and phenological features are not affected by domain adversarial gradients, guaranteeing that the calculation of conditional matching weights is independent of the domain adversarial training process.
[0078] Secondly, based on the distance between the source domain condition vector and the target domain condition vector, the original condition matching weights are calculated using a Gaussian kernel function. The original condition matching weights are... ,in For source domain samples The condition vector, For target domain samples The condition vector, This is a bandwidth parameter. The closer the conditions are, the greater the weight of the original condition matching; the greater the difference in conditions, the smaller the weight of the original condition matching. To prevent all matching weights from approaching zero and causing alignment failure when the condition differences are too large, the bandwidth parameter... The bandwidth is dynamically determined based on the median of the cross-domain conditional distance for the current batch, enabling adaptive bandwidth adjustment.
[0079] Then, Top-K sparsification is performed on the original conditional matching weights, retaining the top K nearest neighbors from the source domain for each target domain sample based on its matching weight. The purpose of Top-K sparsification is to avoid diluting the alignment signal with a large number of weakly matched samples. Without sparsification, each target domain sample might generate matching weights with all source domain samples, where the alignment signals of a large number of weakly matched samples would overwhelm the alignment signals of a few strongly matched samples, leading to a decrease in alignment quality. By retaining the top K nearest neighbors from the source domain, only the source domain samples with the closest conditions participate in subsequent alignment, improving the purity of the alignment signal.
[0080] Finally, the matching quality is determined based on the average original weights of the K nearest neighbors in the source domain. When the matching quality is lower than a preset threshold, automatic alignment of the target domain sample is paused, and its decision confidence is reduced, resulting in conditional matching weights. The matching quality is... , indicating target domain samples The average original weights of the K source domain nearest neighbors, where, For source domain samples With target domain samples The original conditional matching weights between them. The gating indicator is... ,in The preset threshold is used for the target domain samples. For source domain samples The normalized allocation weights are ,in This is the stable term in the denominator.
[0081] This approach separates matching quality from gating. First, the original matching quality of the target domain samples is defined, then the gating is determined based on this quality, and finally, normalized nearest neighbor weights are used for allocation. This preserves both the allocation relationship between which samples are matched and the quality information of the matching confidence. When the best matching quality of the target domain samples falls below a threshold... When the condition is not automatically aligned, it indicates that the target domain sample lacks similar samples in the source domain. Instead, its decision confidence is reduced, and active learning is triggered. Forced alignment might incorrectly transfer features from samples with significant differences in conditions from the source domain to the target domain sample, introducing negative transfer. Through matching quality gating, the conditional matching weights adaptively reflect the alignability of each target domain sample, yielding the final conditional matching weights, which are used to control the alignment strength of each sample in subsequent conditional adversarial alignment processing.
[0082] In another embodiment of this disclosure, a domain discriminator with purified task features as input is used to perform conditional domain adversarial alignment processing on the purified task features in combination with conditional matching weights to obtain a first adapted task feature. This includes: inputting the purified task features into the domain discriminator; performing domain adversarial training on the purified task features through a gradient inversion layer to obtain a domain adversarial gradient; determining the matching strength of each sample based on the conditional matching weights and matching quality, and weighting the domain adversarial loss with the matching strength; performing task classification processing based on the purified task features to obtain a classification gradient; and when the domain adversarial gradient conflicts with the classification gradient direction, projecting the domain adversarial gradient onto the orthogonal direction of the classification gradient to obtain the first adapted task feature.
[0083] First, the purified task features are input into the domain discriminator. A gradient inversion layer is then used to train the purified task features for domain adversarial training, yielding the domain adversarial gradient. The domain discriminator only receives the purified task features and does not accept environmental features or phenological stage probabilities from the target image. This design is because if environmental or phenological features are input into the domain discriminator, even with gradient blocking, the discriminator might still directly determine the domain label from the condition variable itself. This is because the condition variable itself retains domain-related information; for example, the soil color and phenological stage differ between Nanjing and Hainan. The discriminator can distinguish the domain origin without examining the task features, resulting in the task features not receiving an effective alignment signal. Therefore, in this embodiment, the domain discriminator only uses the task features as input, and the condition variable indirectly controls the alignment weights of each sample through matching weights, rather than being directly input into the discriminator.
[0084] Conditional domain adversarial approaches employ minimax optimization: ,in This represents the encoding path for generating task features, including the image encoder, sensor encoder, task branch network, and fusion module. Domain discriminator. By maximizing this objective to learn task features that distinguish between the source and target domains, the task encoder minimizes this objective through a gradient inversion layer, forcing task features to become domain indistinguishable on sample pairs with similar conditions.
[0085] Secondly, the matching strength of each sample is determined based on the conditional matching weights and matching quality, and the domain adversarial loss is weighted according to the matching strength. The domain adversarial loss of conditional matching is... ,in, This represents the number of samples in the source domain. , Samples from the source domain and target domain samples The matching strength is determined by the conditional matching weight and the matching quality; For domain discriminator; For source domain samples Task characteristics; For target domain samples The task characteristics are as follows: For samples with source domain nearest neighbors and matching quality meeting preset conditions, the matching strength is higher, applying stronger domain adversarial pressure; for samples lacking source domain nearest neighbors, the matching strength is lower, reducing the alignment weight. In this way, domain adversarial alignment only occurs between samples with similar conditions, avoiding forced alignment that introduces negative transfer. The matching strength of a source domain sample is determined by the quality weighted average of the target domain samples it matches.
[0086] Then, task classification is performed based on the purified task features to obtain the classification gradient. This task classification process ensures that the task features can perform the classification task; the classification gradient is the gradient of the task classification loss with respect to the fused features, i.e. , For source domain supervised classification loss, cross-entropy loss is adopted; The fusion feature is obtained by modal reliability weighted fusion of image features and sensor features.
[0087] Finally, when the domain adversarial gradient conflicts with the classification gradient direction, the domain adversarial gradient is projected onto the orthogonal direction of the classification gradient to obtain the first adaptive task feature. Let the domain adversarial gradient be... , The domain adversarial loss is conditional matching; the classification gradient is... When two gradient directions conflict (i.e., the inner product is negative), the adversarial gradient is projected onto the orthogonal direction of the classification gradient. This rule only performs projection correction when gradients conflict; it does not intervene when the two gradient directions are consistent. As a gradient update rule rather than a loss term, it avoids the computation of second-order gradients. The significance of conflict projection lies in the fact that the goal of adversarial alignment is to make task features indistinguishable across similar sample pairs, while the goal of task classification is to make task features discriminative. These two goals may conflict. Without intervention, the adversarial gradient may destroy the discriminative information required for task classification, leading to a decrease in classification performance. By projecting the adversarial gradient onto the orthogonal direction of the classification gradient, adversarial alignment only operates in directions that do not interfere with classification, thus protecting task classification performance while achieving domain alignment. After the above processing, the first adapted task features are obtained for subsequent staged distribution alignment processing.
[0088] In another embodiment of this disclosure, based on the phenological stage probability, the first adaptation task features are aligned using a weighted maximum mean difference distribution based on the phenological stage to obtain the second adaptation task features. This includes: calculating the effective sample size of the source domain and the target domain in each phenological stage based on the phenological stage probability, where the effective sample size is the sum of the probabilities of that phenological stage; calculating the stage weight of each phenological stage based on the effective sample size, and applying a two-way validity gating to the stage weights so that the effective sample size of the source domain and the target domain in the corresponding phenological stage is greater than a preset threshold; and performing weighted maximum mean difference alignment on the first adaptation task features of the source domain and the target domain using the stage weights, so that the distribution correction is performed between samples in the same or similar phenological stages to obtain the second adaptation task features.
[0089] First, it should be noted that the conditional domain adversarial alignment process in step 106 primarily addresses local shifts caused by both environmental and phenological factors, while this step specifically addresses distribution biases caused by phenological misalignment. The growth rhythms of the same crop variety exhibit significant phase differences at different latitudes. For example, the heading stage of the same rice variety may differ by more than 20 days between Nanjing and Hainan, resulting in images taken on the same calendar day corresponding to completely different phenological stages. Directly aligning the distribution of all samples might misalign samples from the heading stage in Nanjing with those from the tillering stage in Hainan, introducing new distribution biases. Therefore, this step, based on the probability of phenological stages, only performs distribution correction between samples at the same or similar phenological stages.
[0090] First, based on the phenological stage probabilities, the effective sample size of the source and target domains in each phenological stage is calculated. The effective sample size is the sum of the probabilities for that phenological stage. The source domain in each phenological stage... The effective sample size is The target domain is in the phenological stage. The effective sample size is ,in Represents source domain samples Belongs to the phenological stage The probability, Represents target domain samples Belongs to the phenological stage The probability of phenological stages. Since the probability of phenological stages is a soft probability distribution, each sample contributes to each phenological stage. Therefore, the effective sample size is the sum of probabilities rather than the sample count, which can smoothly reflect the actual sample size of each phenological stage.
[0091] Secondly, the stage weights for each phenological stage are calculated based on the effective sample size, and a two-way validity gating is applied to the stage weights to ensure that the effective sample size of the source and target domains in the corresponding phenological stage is greater than a preset threshold. The stage weights are... ,in For the stable term in the denominator, and These are the minimum effective sample size thresholds for the source and target domains, respectively. This is an indicator function.
[0092] It's important to note that the two-way validity gating requires both the source and target domains to have a valid sample size greater than a preset threshold at the corresponding phenological stage. This is to ensure the effectiveness of cross-domain stage alignment. If only the source domain has sufficient samples at a certain phenological stage while the target domain lacks sufficient samples at that stage, effective cross-domain stage alignment cannot be achieved. Forced alignment may incorrectly transfer features from the source domain at that stage to samples from other stages in the target domain. The two-way validity gating ensures that only phenological stages where both the source and target domains have sufficient samples participate in alignment. When either domain is at a certain stage... When there are insufficient samples, this stage does not participate in alignment.
[0093] Then, the first adaptation task features in the source and target domains are weighted by maximum mean difference alignment using stage weights, ensuring that distribution correction is performed between samples from the same or similar phenological stages, resulting in the second adaptation task features. The weighted maximum mean difference loss is... ,in, K This represents the total number of phenological stages. k Index for phenological stages; The number of source domain samples participating in the current batch calculation; The number of target domain samples participating in the current batch calculation; For the feature mapping of the regenerated Hilbert space, For source domain samples The first characteristic of the adapted task, For target domain samples The first characteristic of the adaptation task.
[0094] The purpose of soft-stage probability weighting is to ensure that each sample is not rigidly assigned to a specific phenological stage, but rather distributed across multiple phenological stages probabilistically. Through probability weighting, the first adaptation task feature of a sample contributes to the distribution alignment of the corresponding stage according to its probability of belonging to each phenological stage, ensuring that distribution correction is performed between samples in the same or similar phenological stages. Stage probability overlap provides a smooth transition, avoiding the discontinuity in boundary sample alignment caused by rigid stage divisions. After the above processing, the second adaptation task feature is obtained, which is used for subsequent category prototype calculations.
[0095] In another embodiment of this disclosure, a prediction result is obtained based on the category prototype and the sample to be predicted, including obtaining the task features of the sample to be predicted based on the image data and sensor data of the sample to be predicted; calculating the similarity between the task features and each category prototype, and obtaining the prediction result based on the similarity.
[0096] First, based on the image data and sensor data of the sample to be predicted, the task features of the sample to be predicted are obtained. The image data and sensor data of the sample to be predicted are processed in the same way as in step 102, that is, the image data is encoded by an image encoder to obtain image features, and the sensor data is encoded by a sensor encoder to obtain sensor features. The image features and sensor features are then weighted and fused based on modal reliability weights to obtain fused features, and the task features to be predicted are obtained based on the fused features. The task features to be predicted and the task features obtained in step 102 are in the same feature space, thereby ensuring the comparability between the task features to be predicted and the category prototype.
[0097] Secondly, the similarity between the features of the task to be tested and the prototypes of each category is calculated, and the prediction result is obtained based on the similarity. The category prototype is the representative representation of each category obtained by aggregating the mean of the second adapted task features corresponding to the labeled samples in the target domain samples according to the category in step 108, that is... ,in, For category k The category prototype, that is, the category in the target domain. k The mean of the second adaptation task features of the labeled samples; For the category in the target domain Support set; To support the collection The Middle i The second adaptation task features of each labeled sample; To support the collection The Middle i The task labels of the labeled samples. The similarity between the features of the task to be tested and the prototypes of each category can be calculated based on Euclidean distance, and the classification probability is . ,in The features of the test task for the sample to be predicted. The temperature parameter is used. The category corresponding to the prototype with the highest similarity is the prediction result.
[0098] Since the category prototype is calculated solely based on the second-adaptation task features, without using environmental or phenological features, and the task features to be tested are generated only based on task branches, the prediction process is unaffected by environmental noise and phenological differences. Even if the sample to be predicted comes from a target region with different environmental conditions than the source region, as long as its task features to be tested are close to the second-adaptation task features of the labeled samples in the target region in the task feature space, accurate prediction results can be obtained.
[0099] During deployment, the system continuously collects unlabeled samples from the target domain and selectively updates the category prototype through a multi-layered filtering mechanism. Specifically, this includes: Step 1, pseudo-label generation: using the current prototype for classification, the category with the highest probability is selected as the pseudo-label, adopted only when the highest probability exceeds a threshold; Step 2, environment consistency check: verifying that the image environment features of the new sample are consistent with the image environment features of existing samples in the target category; Step 3, image-sensor environment estimation consistency: checking whether the environment parameters reconstructed from the image environment features are consistent with the sensor's measured environment parameters; Step 4, momentum update: after all the above conditions are met, the prototype is updated using momentum, i.e. ,in, For the updated number The category prototype; For the previous version The category prototype; η This is a momentum coefficient used to control the retention ratio of the category prototype before and after the update; This represents the task features to be tested for new samples. Through the aforementioned multi-layered filtering mechanism, the category prototype can continuously evolve during deployment, adapting to environmental changes in the target region, while avoiding the contamination of the category prototype by erroneous pseudo-labels.
[0100] During the inference phase, the confidence level of the prediction results can be calibrated based on the deviation between the target image environmental features of the sample to be predicted and the known environmental distribution. The decision confidence level is... ,in, k Indexed by task category; The features of the test task for the sample to be predicted; Environmental features of the target image of the sample to be predicted Distribution to known environments The minimum Mahalanobis distance, To calibrate the intensity coefficients, the known environment distribution is the distribution of environmental features of the target image from the source domain samples. When the environmental conditions of the sample to be predicted are significantly different from all environmental conditions seen by the model, the model automatically reduces its decision confidence. When the deviation continues to exceed a preset threshold, active learning is triggered and the category prototype is selectively updated. For high-confidence samples, the prototype is automatically updated using pseudo-labels, while for low-confidence samples, manual annotation is requested before updating the prototype and the known environment distribution.
[0101] In another embodiment of this disclosure, the training process of the above-mentioned multimodal perception model cross-regional migration method can adopt a joint optimization objective and a phased training strategy to unify task-environment-phenological features decoupling, sensor-anchored environmental feature supervision, conditional mutual information minimization, conditional matching domain adversarial alignment, phased distribution correction of phenological perception, and prototype network classification into a complete optimization framework.
[0102] Specifically, the overall loss function is .in, For source domain supervised classification loss, cross-entropy loss is adopted; To minimize the loss of conditional mutual information, domain-specific calculation is performed, and the calculation method is consistent with the conditional mutual information minimization process described in step 104. The domain adversarial loss for conditional matching is calculated in the same way as the conditional domain adversarial alignment process described in step 106. The staged MMD loss is weighted by the probability of phenological stages, and its calculation method is consistent with the alignment processing of the maximum mean difference distribution weighted by phenological stages described in step 107. To reconstruct environmental parameter loss from image environmental features, For cross-modal anchoring loss, The loss is due to the reconstruction of sensor environmental features. All three are consistent with the cross-modal anchoring processing and environmental feature supervision described in step 103. The target domain prototype classification loss is consistent with the category prototype calculation and prediction described in steps 108 and 109. Loss due to memory replay; Losses were monitored during the phenological stage; For hyperparameters. It should be noted that the conflict gradient projection correction process described in step 106 is not added to the overall loss function as a loss term, but is executed as a gradient update rule during backpropagation. That is, when the domain adversarial gradient conflicts with the classification gradient direction, the domain adversarial gradient is projected to the orthogonal direction of the classification gradient. This rule only performs projection correction when gradients conflict, and does not intervene when the two gradient directions are consistent. It is used as a gradient update rule rather than a loss term, thus avoiding the calculation of the second-order gradient.
[0103] To support continuous migration across multiple regions and prevent catastrophic amnesia, a memory replay mechanism is also introduced. A memory bank is maintained. It stores representative original samples and corresponding labels for each adapted region, including image data and sensor data. When adapting to a new region, it samples from the memory, regenerates task features using the current encoder, and applies replay constraints. ,in, Loss due to memory replay; Image data of samples in the memory bank; Sensor data for samples in the memory bank; y represents the task label of the sample in the memory bank; CE is the cross-entropy loss function, used to measure the difference between the classifier's prediction and the task label; For classifiers, The current encoder includes an image encoder, a sensor encoder, and a fusion module. This refers to a batch of samples randomly sampled from the memory. Since the replay samples are re-encoded with features by the current encoder, this constraint simultaneously constrains both the encoder and the classifier, effectively preventing the model from forgetting learned regional knowledge when adapting to new regions. If the original image cannot be saved for storage or privacy reasons, a compressed representation of the image or key patches can be saved as an alternative, but it must be ensured that it can be re-encoded by the current encoder during replay.
[0104] The training process is divided into four stages. The first stage is the source domain pre-training stage, which uses only the source domain. The first stage involves training the image encoder, sensor encoder, task branch network, and classifier on the source domain. Modal reliability weights are initialized to equal weights, enabling the model to acquire basic feature extraction and classification capabilities on the source domain data. The second stage is a decoupled training stage, where joint optimization is performed on the source domain data. The training process involves a feature decoupling structure, an environment reconstruction network, a sensor environment branch, and a phenological stage encoder. During training, the network is first trained through... To enable the sensor branches to learn stable environmental semantics, CLUB employs alternating optimization: first, it updates the variational approximation network to approximate the conditional distribution; then, it fixes the variational approximation network and updates the encoder to minimize the upper bound of the conditional mutual information. In this stage, only source domain data is used for computation. The third stage is the conditional domain adaptation stage, which introduces unlabeled target domain data for joint optimization. The adversarial gradient of the domain is corrected according to the conflict projection rule, the bandwidth parameter in the conditional matching weights is determined adaptively in batches, and the conditional mutual information of the target domain is gradually added after the pseudo-labels stabilize. The fourth stage is the small sample adaptation stage, which uses a small number of labeled samples in the target domain to calculate the prototype of the task feature category and jointly optimize. The prototype update employs a pseudo-label-driven multi-layer filtering mechanism, including pseudo-label generation, environmental consistency check, sensor environment estimation consistency check, and momentum update, enabling the model to achieve accurate classification performance in the target region.
[0105] A second aspect of this disclosure provides a device for cross-regional migration of a multimodal smart agriculture sensing model, such as... Figure 2 As shown, the device includes: The data acquisition module is used to acquire source domain samples and target domain samples, both of which include image data and sensor data; wherein the number of labeled samples in the target domain samples is less than the number of labeled samples in the source domain samples. The feature extraction module is used to obtain initial image environment features, task features, and phenological stage probabilities based on the image data and the sensor data. The cross-modal anchoring module is used to perform cross-modal anchoring processing on the initial image environment features, semantically align the initial image environment features with the sensor-measured environment variables, and reconstruct the visually perceptible environment variables from the initial image environment features to obtain target image environment features with physical environment semantics. The feature purification module is used to minimize the conditional mutual information between the task features and the target image environment features under the constraints of task labels and phenological stage probabilities, so as to obtain purified task features. The matching weight determination module is used to determine the conditional matching weight between the source domain sample and the target domain sample based on the environmental features of the target image and the phenological stage probability. The domain adversarial alignment module is used to perform conditional domain adversarial alignment processing on the purified task features by using the purified task features as input to the domain discriminator and combining the conditional matching weights to obtain the first adapted task features. The phenological weighted distribution alignment module is used to perform maximum mean difference distribution alignment processing on the first adaptation task features based on the phenological stage probability to obtain the second adaptation task features. The prototype construction module is used to perform mean aggregation on the second adaptation task features corresponding to the labeled samples in the target domain samples according to the category, so as to obtain category prototypes for each category. The prediction module is used to obtain prediction results based on the category prototype and the sample to be predicted.
[0106] The multimodal sensing model cross-regional migration device and the above-mentioned multimodal sensing model cross-regional migration method in this embodiment are derived from a technical concept. The specific implementation method can be referred to the implementation method, and will not be repeated here.
[0107] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this disclosure can be achieved, and this is not limited herein.
[0108] Furthermore, 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. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise explicitly specified.
[0109] The above are merely specific embodiments of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A method for cross-regional migration of a multimodal smart agriculture sensing model, characterized in that, The method includes: Source domain samples and target domain samples are acquired, both of which include image data and sensor data; wherein the number of labeled samples in the target domain samples is less than the number of labeled samples in the source domain samples. Based on the image data and the sensor data, the initial image environment features, task features, and phenological stage probabilities are obtained; Perform cross-modal anchoring processing on the initial image environment features, semantically align the initial image environment features with the sensor-measured environment variables, and reconstruct the visually perceptible environment variables from the initial image environment features to obtain target image environment features with physical environment semantics. Under the constraints of task labels and phenological stage probabilities, the task features and the target image environment features are subjected to conditional mutual information minimization processing to obtain purified task features. Based on the environmental features of the target image and the probability of the phenological stage, the conditional matching weight between the source domain sample and the target domain sample is determined; Using the purified task features as input, a domain discriminator is combined with the conditional matching weights to perform conditional domain adversarial alignment on the purified task features to obtain the first adapted task features. Based on the phenological stage probability, the first adaptation task features are aligned according to the maximum mean difference distribution weighted by the phenological stage to obtain the second adaptation task features. The second adaptation task features corresponding to the labeled samples in the target domain samples are aggregated by category to obtain category prototypes for each category. Based on the category prototype and the sample to be predicted, the prediction result is obtained.
2. The method according to claim 1, characterized in that, The process of obtaining initial image environment features, task features, and phenological stage probabilities based on the image data and the sensor data includes: The image data is encoded using an image encoder to obtain image features, and the sensor data is encoded using a sensor encoder to obtain sensor features. An initial image environment feature is generated based on the image features, and the initial image environment feature is generated solely from the image encoding path; Sensor environment features are generated based on the sensor data, and these sensor environment features are generated solely from the sensor encoding path. The image features and sensor features are weighted and fused based on modal reliability weights to obtain fused features, and the task features are obtained based on the fused features. The probability of phenological stages is calculated based on the accumulated temperature model and the sensor data. The sensor environment features are used to determine the sensor modal reliability weights in the modal reliability weights.
3. The method according to claim 2, characterized in that, The modal reliability weights include sensor modal reliability weights and image modal reliability weights; The weighted fusion of the image features and the sensor features based on modal reliability weights to obtain fused features includes: Based on at least one of sensor time series continuity, sensor self-reconstruction residual, image sensor cross-modal reconstruction residual, and physical upper and lower limit constraints, determine sensor modal reliability weights and image modal reliability weights. Wherein, the sensor self-reconstruction residual is the deviation between the output result obtained by reconstructing the sensor environmental characteristics and the standardized sensor measured environmental variables; The image sensor cross-modal reconstruction residual is the deviation between the environmental variable output by the initial image environmental feature reconstruction, which corresponds to the sensor's measured environmental variable, and the sensor's measured environmental variable. The continuity of the sensor time series refers to the degree to which the sensor readings change continuously within a reasonable range without any abrupt changes; The physical upper and lower limits are the degree to which the sensor readings are within the physically possible range; The obtained sensor modal reliability weights and image modal reliability weights are used to perform weighted fusion of the image features and the sensor features to obtain the fused features.
4. The method according to claim 1, characterized in that, The step of performing cross-modal anchoring processing on the initial image environment features, semantically aligning the initial image environment features with sensor-measured environmental variables, and reconstructing visually perceptible environmental variables from the initial image environment features to obtain target image environment features with physical environment semantics includes: The initial image environment features are mapped to the same semantic space as the sensor measured environment variables through a projection network. The results of standardized sensor measured environment variables after fixed linear mapping and stopping gradient processing are used as anchor points. The projected image environment features are supervised and anchored through cross-modal anchoring loss. The initial image environment features are processed by an environment reconstruction network. Strong supervision reconstruction is applied to environmental variables that can be directly visually supervised, and weak supervision auxiliary prediction is applied to statistically related auxiliary environmental variables to obtain the target image environment features. The cross-modal anchoring loss and the image environment reconstruction loss jointly constrain the physical semantics of the initial image environment features.
5. The method according to claim 1, characterized in that, Under the constraints of task labels and phenological stage probabilities, the conditional mutual information minimization process is performed on the task features and the target image environment features to obtain the purified task features, including: In the source domain, based on the task labels and phenological stage probabilities of the labeled samples in the source domain samples, the conditional mutual information between the source domain task features and the source domain target image environment features is estimated and minimized to obtain the source domain conditional mutual information loss. In the target domain, for samples whose pseudo-label confidence meets the preset conditions, based on the pseudo-label and the phenological stage probability, the conditional mutual information between the target domain task features and the target domain target image environment features is estimated and minimized to obtain the target domain conditional mutual information loss. The pseudo-label is the predicted label obtained by classification processing of unlabeled samples in the target domain. The total conditional mutual information loss is obtained by weighted summing of the source domain conditional mutual information loss and the target domain conditional mutual information loss. The total conditional mutual information loss is estimated and minimized by using the upper bound of the contrast logarithm ratio. The variational approximation network and encoder are alternately optimized to obtain the purified task features.
6. The method according to claim 1, characterized in that, The step of determining the conditional matching weights between the source domain samples and the target domain samples based on the target image environmental features and the phenological stage probability includes: The physical environment projection obtained by processing the target image environmental features through a projection network and then through stopping gradient processing is concatenated with the phenological stage probability to obtain a conditional vector. The original conditional matching weights are calculated using a Gaussian kernel function based on the distance between the source domain conditional vector and the target domain conditional vector. The original conditional matching weights are subjected to Top-K sparsity processing, and the top K source domain nearest neighbors of each target domain sample are retained according to the matching weight sorting. The matching quality is determined based on the average original weights of the K source domain nearest neighbors. When the matching quality is lower than a preset threshold, automatic alignment of the target domain sample is paused and its decision confidence is reduced to obtain the conditional matching weights.
7. The method according to claim 6, characterized in that, The process of using a domain discriminator with the purified task features as input, combined with the conditional matching weights, to perform conditional domain adversarial alignment processing on the purified task features to obtain the first adapted task features includes: The purified task features are input into the domain discriminator, and the purified task features are trained on the domain adversarial layer to obtain the domain adversarial gradient. The matching strength of each sample is determined based on the conditional matching weights and the matching quality, and the domain adversarial loss is weighted by the matching strength. Based on the purified task characteristics, task classification is performed to obtain a classification gradient. When the domain adversarial gradient conflicts with the classification gradient direction, the domain adversarial gradient is projected onto the orthogonal direction of the classification gradient to obtain the first adaptive task feature.
8. The method according to claim 1, characterized in that, The step of aligning the first adaptation task features with the maximum mean difference distribution weighted by phenological stage based on the phenological stage probability to obtain the second adaptation task features includes: Based on the phenological stage probabilities, the effective sample size of the source domain and the target domain in each phenological stage is calculated respectively, and the effective sample size is the sum of the probabilities of that phenological stage. The stage weights of each phenological stage are calculated based on the effective sample size, and a two-way validity gating is applied to the stage weights so that the effective sample size of the source domain and the target domain in the corresponding phenological stage is greater than a preset threshold. The first adaptation task features of the source domain and the target domain are weighted and aligned by the stage weights to achieve maximum mean difference, so that the distribution correction is performed between samples of the same or similar phenological stages, thereby obtaining the second adaptation task features.
9. The method according to claim 1, characterized in that, The process of obtaining prediction results based on the category prototype and the sample to be predicted includes: Based on the image data and sensor data of the sample to be predicted, the characteristics of the task to be predicted of the sample are obtained. Calculate the similarity between the features of the task to be tested and the prototypes of each category, and obtain the prediction result based on the similarity.
10. A multimodal smart agriculture sensing model cross-regional migration device, characterized in that, The device includes: The data acquisition module is used to acquire source domain samples and target domain samples, both of which include image data and sensor data; wherein the number of labeled samples in the target domain samples is less than the number of labeled samples in the source domain samples. The feature extraction module is used to obtain initial image environment features, task features, and phenological stage probabilities based on the image data and the sensor data. The cross-modal anchoring module is used to perform cross-modal anchoring processing on the initial image environment features, semantically align the initial image environment features with the sensor-measured environment variables, and reconstruct the visually perceptible environment variables from the initial image environment features to obtain target image environment features with physical environment semantics. The feature purification module is used to minimize the conditional mutual information between the task features and the target image environment features under the constraints of task labels and phenological stage probabilities, so as to obtain purified task features. The matching weight determination module is used to determine the conditional matching weight between the source domain sample and the target domain sample based on the environmental features of the target image and the phenological stage probability. The domain adversarial alignment module is used to perform conditional domain adversarial alignment processing on the purified task features by using the purified task features as input to the domain discriminator and combining the conditional matching weights to obtain the first adapted task features. The phenological weighted distribution alignment module is used to perform maximum mean difference distribution alignment processing on the first adaptation task features based on the phenological stage probability to obtain the second adaptation task features. The prototype construction module is used to perform mean aggregation on the second adaptation task features corresponding to the labeled samples in the target domain samples according to the category, so as to obtain category prototypes for each category. The prediction module is used to obtain prediction results based on the category prototype and the sample to be predicted.
