Prediction method of salt tolerance of alfalfa based on artificial intelligence

Through dynamic segmented normalization and end-to-end dual-stream time series processing architecture, the problem of difficulty in capturing plant salt stress responses in traditional methods was solved, efficient prediction of alfalfa salt tolerance was achieved, and the accuracy and adaptability of the model were improved.

CN120579073BActive Publication Date: 2025-09-30QUFU NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511086083.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-05
Publication Date
2025-09-30
Estimated Expiration
2045-08-05

AI Technical Summary

Technical Problem

Traditional methods make it difficult to evaluate the plant response to salt stress in real time. Conventional models cannot effectively capture the delayed physiological mechanism between soil salinity and plant response, ignore key physiological turning points, and lead to inaccurate salt tolerance predictions.

Method used

A dynamic segmented normalization method is used to process bimodal time series data, and an end-to-end two-stream time series processing architecture is constructed, including a cross-modal interactive coding layer, a multi-scale feature pyramid module, a gated recombination module, a feature distillation module and a bidirectional gating unit. Soil conductivity and chlorophyll features are fused through gradient mutation detection and gating mechanism to construct a multi-scale feature pyramid, dynamically compress feature dimensions, and perform salt tolerance classification.

Benefits of technology

It effectively retains the temporal local characteristics of salt stress response, enhances the ability to capture cross-modal correlation patterns, improves the accuracy and discrimination of salt tolerance prediction, and can adaptively process stress responses at different time scales.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120579073B_ABST
    Figure CN120579073B_ABST
Patent Text Reader

Abstract

The present invention relates to an artificial intelligence-based alfalfa salt tolerance prediction method, belonging to the field of data processing and prediction technology. The method comprises the following steps: collecting bimodal time series data of alfalfa to construct a data set; processing the bimodal time series data using a dynamic segmented normalization method to obtain normalized bimodal time series data; constructing an alfalfa salt tolerance prediction model, comprising a cross-modal interactive coding layer, a multi-scale feature pyramid module, a gated recombination module, a feature distillation module, a bidirectional gating unit, and a classification module; training the model using the normalized bimodal time series data to obtain a trained model; and synchronously collecting soil electrical conductivity and relative chlorophyll content for newly collected alfalfa monitoring data, performing normalization processing, and inputting the data into the trained model to obtain a prediction result. The present invention can effectively enhance the accuracy and discriminative power of salt tolerance classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data processing and prediction, and in particular relates to an artificial intelligence-based method for predicting salt tolerance of alfalfa. Background Art

[0002] In current agricultural production, soil salinization is becoming increasingly serious and has become a major factor restricting the improvement of crop yield and quality. As a high-quality forage, alfalfa's salt tolerance is directly related to its feasibility and economic benefits in saline-alkali soils. However, plant salt tolerance is regulated by multiple physiological and biochemical mechanisms and is highly complex and dynamic. Traditional methods that rely on manual observation and endpoint measurement are not only inefficient but also difficult to assess in real time the plant's response to salt stress, hindering the progress of salt-tolerant breeding and precision management. With the development of intelligent sensing and artificial intelligence technologies, it has become possible to model plant stress responses using multimodal time series data.

[0003] Chinese invention patent publication number CN117114144B proposes an artificial intelligence-based method and system for predicting rice salt-alkali tolerance. The method includes data acquisition, data preprocessing, neural network design, establishment of a slack-variable SVM model, SVM parameter search, and real-time operation. This scheme uses frequency division and variation steps to adjust parameters based on probability and random numbers during the search process. It also introduces radial basis kernel functions and slack variables, while considering the balance between slack variables and model parameters to achieve model regularization and optimization. Furthermore, it defines nonlinear functions to adjust inertia weights and acceleration coefficients, balancing speed and exploration capability at different stages of the search process to improve search accuracy and convergence speed.

[0004] The above technical solutions have the following problems that still need to be further resolved: conventional Min-Max or Z-Score methods process global data and cannot highlight the impact of sudden changes in conductivity on plant physiological responses, which can easily lead to inaccurate judgment of response delays; conventional CNN or LSTM models mostly input conductivity and chlorophyll data independently, and fail to establish a delayed physiological mechanism connection between soil salinity and plant responses, making it difficult to identify cross-modal events; commonly used fixed-window convolution or pooling operations are prone to ignore short-term mutations at the minute level or slow trends at the hour level when facing multi-scale responses, limiting the model's ability to identify different stress stages; methods such as PCA or Bi-GRU treat all time points with equal weights, and cannot highlight the importance of physiological turning points such as stomatal closure and a cliff-like drop in chlorophyll, affecting the final classification effect. Summary of the Invention

[0005] In order to solve the above problems, the present invention is implemented through the following technical solutions:

[0006] The present invention provides an artificial intelligence-based method for predicting salt tolerance of alfalfa, comprising the following steps:

[0007] Step 1: Collect bimodal time series data of alfalfa to construct a dataset for salt tolerance prediction of alfalfa; the bimodal time series data of alfalfa includes soil electrical conductivity data and chlorophyll relative content data;

[0008] Step 2: Use dynamic segmentation normalization method to process bimodal time series data. Dynamically divide the time series data segments based on gradient mutation detection, which can effectively retain the mutation characteristics of the salt stress response area and obtain normalized bimodal time series data.

[0009] Step 3: Construct a prediction model for alfalfa salt tolerance. The model uses an end-to-end dual-stream time series processing architecture, including a cross-modal interactive encoding layer, a multi-scale feature pyramid module, a gated recombination module, a feature distillation module, a bidirectional gating unit, and a classification module. The model is trained using normalized bimodal time series data to obtain a trained model.

[0010] Step 4: For the newly collected alfalfa monitoring data, soil conductivity and chlorophyll relative content are collected simultaneously, and then after normalization, they are input into the trained model to obtain the prediction results.

[0011] Furthermore, in step 2, the gradient of the soil conductivity data at each sampling time point is calculated, and points where the absolute value of the gradient is greater than the threshold are detected as mutation points based on the adaptively determined gradient threshold. These mutation points are used to dynamically segment the soil conductivity data into multiple segment sets, so that the segments are dense in areas with drastic gradient changes and sparse in areas with gentle gradient changes. The formula is as follows:

[0012] ,

[0013] in, Indicates the A segmented collection of soil conductivity data and dynamically generated integration intervals; is the index number of the soil conductivity data segment, ; is the total number of segments; Indicates the sampling time point index; represents the gradient of soil conductivity data at time point t; Represents the absolute value operator; is the adaptive gradient threshold; similarly, the segmented set of chlorophyll relative content data is obtained.

[0014] Furthermore, for each segmented set of soil conductivity data and chlorophyll relative content data, the mean and variance of each segment are calculated respectively, and then the mean and variance of the segment are used to normalize the original data in the corresponding segment to obtain the normalized bimodal time series data.

[0015] Furthermore, under salt stress, there is a key physiological correlation between the increase in soil conductivity and the decrease in the relative content of chlorophyll. However, conventional convolutional neural networks usually process soil conductivity and chlorophyll relative content time series independently, ignoring this cross-modal physiological correlation. The independent processing method cannot effectively capture key stress response patterns such as "a sudden increase in conductivity leads to a decrease in chlorophyll", making it difficult for the model to identify the cross-modal correlation features contained in early salt stress. The present invention adopts a cross-modal interactive coding layer to dynamically fuse the feature representations of soil conductivity and chlorophyll relative content through a gating mechanism, thereby enhancing the model's ability to capture salt stress correlation patterns, and performing cross-modal feature interaction enhancement coding through the cross-modal interactive coding layer:

[0016] A one-dimensional convolution operation is applied to the normalized soil conductivity data and the normalized chlorophyll relative content data, and a nonlinear transformation is performed using the ReLU activation function to obtain the feature representation matrix of the soil conductivity data and the feature representation matrix of the chlorophyll relative content data; the feature representation matrix of the soil conductivity data and the feature representation matrix of the chlorophyll relative content data are concatenated in the channel dimension, and a gating weight matrix is ​​generated by the Sigmoid function. The gating weight matrix is ​​used to weight the interaction features transformed by the hyperbolic tangent function to obtain the cross-modal interaction feature matrix.

[0017] Furthermore, the response of plants to salt stress has multi-scale characteristics, ranging from minute-level ion penetration to hour-level photosynthetic inhibition. Conventional average pooling or maximum pooling operations will lose fine-grained temporal information when processing temporal features, resulting in the early weak signals of salt stress being easily submerged, and the model cannot effectively capture the stress response characteristics at different time scales. The present invention constructs a multi-scale feature pyramid module to fuse features of different time granularities while retaining the original interaction details, adaptively fusing multi-scale information; multi-scale temporal feature pyramid fusion is performed through the multi-scale feature pyramid module:

[0018] The cross-modal interaction feature matrix is ​​subjected to one-dimensional average pooling operations with different pooling kernel sizes to obtain feature matrices representing hourly time scales, mesoscale time scales, and minute time scales. The feature matrices of different time scales are spliced ​​in the channel dimension, and the spliced ​​multi-scale features are weightedly fused through the scale attention weight matrix. The results are then added to the original cross-modal interaction feature matrix after weighting through the residual connection weight matrix to obtain the pyramid fusion feature matrix.

[0019] Furthermore, the salt stress effect includes slow long-term cumulative trends and rapid instantaneous shock fluctuations. Conventional recursive networks have difficulty separating low-frequency trend terms from high-frequency fluctuation terms in time series features, resulting in the model being unable to accurately distinguish between the continuous salt accumulation effect and sudden ion penetration transient events, thereby reducing the accuracy of stress stage identification. The present invention decouples and reorganizes spatiotemporal features through a gated reorganization module:

[0020] The pyramid fusion feature matrix is ​​processed using a trainable low-pass filter to separate the low-frequency trend term that characterizes the slowly changing salt accumulation effect; the low-frequency trend term is subtracted from the pyramid fusion feature matrix to obtain the high-frequency fluctuation term that characterizes the transient events of sudden ion penetration; the sigmoid function is applied to the low-frequency trend term to obtain the trend term gating weight matrix, and the fluctuation term gating weight matrix is ​​calculated from this weight matrix. These two gating weight matrices are then used to weight the low-frequency trend term and the high-frequency fluctuation term, respectively, and the weighted results are added together to obtain the recombinant fusion feature.

[0021] Furthermore, the recombinant fusion feature dimension is high, and direct input into the classifier is prone to overfitting. Conventional dimensionality reduction methods such as principal component analysis or autoencoders cannot adaptively retain the key features of salt stress response. In addition, the fixed-ratio pooling operation ignores the differences in information density between different samples, which may cause weak stress signals to be lost. The present invention adopts a feature distillation module to dynamically calculate the compression ratio through information entropy to achieve adaptive distillation and dimensionality reduction of features, while retaining key information while compressing the dimension. The present invention performs hierarchical feature distillation compression through the feature distillation module:

[0022] The L2 norm of the feature vector of the recombinant fusion feature at each time step is calculated, and the relative importance probability of the feature at each time step corresponding to the convolution time series length is calculated based on these L2 norm values. Then, these probabilities are used to calculate the information entropy of the entire recombinant fusion feature, which is used to quantify the overall information density of the feature map. According to the information entropy of the recombinant fusion feature and the convolution time series length, the maximum number of feature activation values ​​that need to be retained for each sample is adaptively calculated. For each channel of the recombinant fusion feature, the top-ranked maximum activation value is retained, and the rest are set to zero. The filtered features are compressed in the channel dimension using a learnable distillation weight matrix, and transformed using the ReLU activation function to obtain a distillation feature matrix.

[0023] Furthermore, salt tolerance classification requires capturing both the long-term cumulative effects of salt stress and the short-term physiological responses. However, conventional bidirectional recurrent neural networks give equal weight to all time-step features, diluting the discriminant contribution of key response nodes. Furthermore, their fixed weight aggregation mechanism is difficult to adapt to the differences in response rhythms of different plants. The present invention performs gated weighted feature fusion through a bidirectional gating unit:

[0024] A bidirectional GRU network is used to process the normalized soil conductivity data from the forward and reverse directions respectively, and the forward GRU hidden state and reverse GRU hidden state of each time point are extracted. The forward GRU hidden state and reverse GRU hidden state of each time point are concatenated, and the context vector of that time point is obtained by transforming the feature fusion weight matrix and the hyperbolic tangent function. The Sigmoid function is applied to each context vector to generate the time point weight. The average of the weighted context vectors of all time points is calculated to obtain the aggregated feature vector.

[0025] Furthermore, in order to integrate the cumulative effects of long-term salt stress with multi-scale cross-modal features for salt tolerance classification, conventional splicing or weighted averaging methods cannot capture the deep nonlinear interactions between the two types of features and ignore the key details of spatiotemporal sensitivity in the distilled feature matrix, resulting in blurred classification boundaries. The present invention constructs a classification module based on a dual-channel gated fusion classification mechanism. It uses dynamic gating to screen the time-sensitive regions of the distilled feature matrix and uses tensor contraction operations to achieve high-order fusion of heterogeneous features. Finally, the probability distribution is calculated through class-aware projection. The specific steps are as follows:

[0026] The aggregated feature vectors are used to generate a spatiotemporal gating weight matrix, which is then used to perform element-level screening on the distillation feature matrix to retain local features that are highly correlated with the long-term salt stress pattern, thereby obtaining a gated screening distillation feature matrix. The aggregated feature vectors and the gated screening distillation feature matrix are fused through high-order tensor contraction to generate a joint representation vector. The score of each salt tolerance level is calculated using the class-related weight matrix and normalized into a probability distribution to obtain the predicted class probability of the model.

[0027] Furthermore, a multi-task joint loss function is used to optimize the model training, including classification loss and cross-modal feature alignment loss. The classification loss and cross-modal feature alignment loss are weighted and added according to the alignment loss weight coefficient to obtain the total loss of model training; the model training adopts a small batch gradient descent strategy to calculate the gradient based on the total loss and update the learnable parameters.

[0028] The advantages of the present invention are:

[0029] Based on the gradient mutation detection method, the present invention adaptively segments the soil conductivity and chlorophyll relative content data into time series to avoid global normalization from masking key mutation signals and retain the temporal local characteristics of stress events; the soil conductivity and chlorophyll characteristics are fused through a gating mechanism to capture the cross-modal lagged correlation of "a sudden increase in conductivity leading to a decrease in chlorophyll" and establish a physiological mechanism-driven correlation feature representation; a feature pyramid structure from minute to hour level is constructed, and a scale attention mechanism is adopted to realize adaptive fusion and dynamic weight adjustment of stress responses at different time scales; based on the dynamic compression of information entropy and the gated fusion strategy, the retention of key period features and the high-order fusion of heterogeneous information are realized, effectively enhancing the accuracy and discrimination of salt tolerance classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0031] Figure 1 is a flow chart of the steps of the method of the present invention;

[0032] Figure 2 It is a visualization diagram of the dual-modal time series data and salt stress events of the present invention;

[0033] Figure 3 Analysis of the cross-modal association gating mechanism of the present invention;

[0034] Figure 4 Contribution analysis of the model components of the present invention;

[0035] Figure 5 To compare the response characteristics of different technologies under different salt stress scenarios;

[0036] Figure 6 Comparison of salt tolerance classification performance of different models of the present invention. DETAILED DESCRIPTION

[0037] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments derived by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0038] In this embodiment, Figure 1 As shown, the present invention provides a method for predicting salt tolerance of alfalfa based on artificial intelligence, which specifically comprises the following steps:

[0039] S1. Collect dual-modal time series data and construct datasets for alfalfa

[0040] A salt stress experiment on alfalfa potted plants was carried out in a greenhouse controlled environment, and bimodal time series data were collected as model input.

[0041] Soil conductivity data is collected through embedded sensors to continuously monitor the salt concentration in the root layer at a frequency of once per minute. Simultaneously, a fixed chlorophyll meter is used to measure the relative chlorophyll content of the leaves in the middle of the plant at a fixed point every day. The data is collected continuously throughout the entire growth cycle, which is about 90 days.

[0042] Data annotation was performed by agricultural experts based on the final biomass decline rate of alfalfa and the salt damage symptoms of its leaves, which were divided into five salt tolerance levels, corresponding to five classification categories. The salt tolerance level decreased from 1 to 5, with 1 indicating high salt tolerance and 5 indicating extreme sensitivity, forming an original data set with time series data and category labels.

[0043] All samples were randomly divided into training data set and validation data set in a ratio of 7:3. The training data set contained 70% of the samples for model parameter optimization, and the validation data set contained 30% of the samples for hyperparameter adjustment and early stopping judgment, ensuring that both data sets covered all salt tolerance levels and had consistent distribution ratios.

[0044] S2. Normalize the bimodal time series data

[0045] Soil conductivity and chlorophyll content data for alfalfa have different dimensionality and temporal fluctuation characteristics. Soil conductivity reflects the intensity of salt stress, while chlorophyll content represents physiological responses. Their sampling frequencies fluctuate asynchronously and are prone to mutation under salt stress. Conventional global normalization methods, such as Min-Max normalization, ignore local dynamic changes in the data, obscuring key mutational features in salt-stress response regions and potentially distorting features due to dimensional differences.

[0046] The present invention uses a dynamic segmented normalization method to process the original soil conductivity and chlorophyll relative content data, and dynamically divides the time series data segments based on gradient mutation detection, which can effectively retain the mutation characteristics of the salt stress response area. The specific steps are as follows:

[0047] 1) Time series segmentation based on gradient mutation

[0048] The gradient of the soil conductivity data at each sampling time point is calculated, and points where the absolute value of the gradient is greater than the threshold are detected as mutation points based on the adaptively determined gradient threshold. These mutation points are used to dynamically segment the soil conductivity data into multiple segment sets, so that the segments are dense in areas with drastic gradient changes and sparse in areas with gentle gradient changes, which can be expressed as:

[0049] ,

[0050] Where, Indicates the A segmented collection of soil conductivity data and dynamically generated integration intervals; Indicates the sampling time point index; It represents the soil conductivity data gradient at the tth time point, which is calculated by discrete difference approximation. The calculation method is expressed as , characterizes the strain rate; For the The original value of soil conductivity at a time point, in dS / m, with a dimension of ; The length of the soil conductivity time series is set according to the length of the original sampling data and is ; For the The original value of soil conductivity at each time point; is the adaptive gradient threshold, which takes the 95% quantile of the data gradient distribution; Represents the absolute value operator.

[0051] It should be noted that the adaptive gradient threshold The 95% quantile of the gradient distribution of the value data refers to the 95% quantile of the absolute value distribution of the entire soil conductivity data gradient, which is the gradient of the soil conductivity data at the tth time point. All time points are traversed to form a data set, and then the 95% percentile value of the data set is taken as the threshold to ensure that the mutation point detection is only targeted at the 5% high-value areas with significant deviations in the gradient distribution to avoid noise interference.

[0052] It should also be noted that when the adaptive gradient threshold When taking the 95% quantile of the gradient distribution of the data, The term captures only the 5% high-value areas with significant anomalies in the gradient distribution, making the segmentation density positively correlated with the intensity of the gradient change. The segments are dense where the gradient is severe, and the sampling resolution is automatically improved during the period of rapid salt accumulation. When stress causes violent fluctuations in conductivity, dense segmentation enables subsequent normalization to independently process each stress event, avoiding mutual contamination of features from different stress stages. While retaining the true stress mutation, it avoids interference caused by small fluctuations such as sensor noise.

[0053] 2) Perform segmented normalization calculation

[0054] For each segment set of soil conductivity data and chlorophyll relative content data, the mean and variance of each segment are calculated respectively, and then the mean and variance of the segment are used to normalize the original data in the corresponding segment, which is expressed as:

[0055] ,

[0056] ,

[0057] Where, Represents the normalized Characteristic values ​​of soil conductivity sampling points; Indicates the The mean value of the soil conductivity segment is calculated as follows: ; Indicates the The variance of each soil conductivity segment is calculated as: ; is the index number of the soil conductivity data segment, ; is the total number of segments; Indicates the Soil conductivity data segment collection The number of elements in Soil conductivity data segment collection The number of sampling points included; Represents the normalized The characteristic value of the chlorophyll relative content sampling point; Chlorophyll relative content sampling point index, ; is the total number of sampling points for chlorophyll relative content data, which is set according to the length of the original sampling data and is set to ; For the The relative chlorophyll content at each time point is the original chlorophyll value, dimensionless; Indicates the The mean of the chlorophyll relative content segments; is the index number of the chlorophyll relative content data segment, ; is the total number of segments of chlorophyll relative content; Indicates the The variance of the relative chlorophyll content segment; Represents a small constant to prevent division by zero, which can be .

[0058] It should be noted that, similar to the application of the gradient mutation detection method to soil conductivity data, the gradient mutation detection method is applied to the chlorophyll relative content data to generate a segmented set, and then the mean of the original values ​​of all chlorophyll relative contents in the segment is calculated to obtain the mean of the chlorophyll relative content segment. .

[0059] It should also be noted that, similar to the application of the gradient mutation detection method to soil conductivity data, the gradient mutation detection method is applied to the chlorophyll relative content data to generate a segmented set, and then the variance of the original values ​​of all chlorophyll relative contents in the segment is calculated to obtain the variance of the chlorophyll relative content segment. .

[0060] It should also be noted that segmented normalization can achieve local dimensional decoupling, eliminating dimensional differences within the same segment while allowing different segments to retain their respective numerical distribution characteristics. For example, although the conductivity values ​​during the salinity stability period and the mutation period differ greatly, they are mapped to similar intervals after segmented normalization. In addition, chlorophyll data are segmented separately to avoid physiological response breaks caused by forced segmentation of the chlorophyll sequence at soil conductivity mutation points.

[0061] In one embodiment, Figure 2 As shown, dual-modal time series data and salt stress events are displayed. The figure shows the dual-modal data characteristics processed by the technology of the present invention, and intuitively presents the dynamic correlation between soil conductivity and chlorophyll content. The figure does not directly compare with other technologies, but provides a basis for the necessity of data processing of the present invention by visualizing the original data form. It can be seen that the unit of the dual-modal time series data for 90 days is dS / m (deci-Siemens / meter), which shows the dynamic changes of salt concentration. Five salt stress events are marked in the figure (red dotted lines), and their intensity is quantified by text annotation. The chlorophyll relative content curve (green) shows the plant The physiological response of plants shows a significant decline after the salt stress event (the purple dotted line marks the starting point of the response), and the response is delayed by about three to five days. By quantifying the lagged correlation of bimodal data, it is clearly shown that after the soil conductivity changes, the chlorophyll response has a typical delay of about 3-4 days. Cross-modal lagged correlation is the core processing object of this invention. Dynamic segmented normalization can retain the mutation characteristics of salt stress events (conductivity pulses), and the cross-modal interactive coding layer captures such lagged response patterns through a gating mechanism. The data in the figure proves that salt changes are strongly correlated with physiological responses but are asynchronous. Conventional methods of independently processing bimodal data find it difficult to capture such characteristics.

[0062] S3. Salt tolerance prediction model construction and data processing

[0063] S301. Define salt tolerance prediction model

[0064] The salt tolerance prediction model adopts an end-to-end dual-stream time series processing architecture. The model takes the normalized soil conductivity time series and the chlorophyll relative content time series as parallel inputs. First, the cross-modal interaction coding layer extracts modal-specific features and establishes physiological associations. Then, the multi-scale feature pyramid module fuses the stress response patterns from hour to minute levels. The gated recombination module then decouples the salt accumulation trend and instantaneous fluctuation characteristics. The feature distillation module then dynamically compresses the feature dimensions based on information entropy. The bidirectional gating unit then aggregates the long-term salt stress effect characteristics. Finally, the dual-channel gated fusion classification mechanism outputs the salt tolerance probability distribution.

[0065] S302: The cross-modal interaction coding layer performs cross-modal feature interaction enhancement coding.

[0066] Under salt stress, there is a key physiological correlation between the increase in soil electrical conductivity and the decrease in relative chlorophyll content. However, conventional convolutional neural networks usually process soil electrical conductivity and chlorophyll relative content time series independently, ignoring this cross-modal physiological correlation. The independent processing method cannot effectively capture key stress response patterns such as "a sudden increase in electrical conductivity leading to a decrease in chlorophyll", making it difficult for the model to identify the cross-modal correlation characteristics contained in early salt stress.

[0067] The present invention adopts a cross-modal interactive coding layer and dynamically fuses the characteristic representations of soil electrical conductivity and chlorophyll relative content through a gating mechanism to enhance the model's ability to capture salt stress association patterns. The specific steps are as follows:

[0068] 1) Perform dual-modal feature extraction

[0069] A one-dimensional convolution operation is applied to the normalized soil conductivity data and the normalized chlorophyll relative content data, and a nonlinear transformation is performed using the ReLU activation function to obtain the feature representation matrix of the soil conductivity data and the feature representation matrix of the chlorophyll relative content data, which are expressed as:

[0070] ,

[0071] ,

[0072] Where, Represents the feature representation matrix of soil conductivity data, with dimensions ; The feature representation matrix representing the relative chlorophyll content data has the dimension ; The number of channels for convolution operation can be set to 64; is the convolution time series length of soil electrical conductivity data, which is the same as the convolution time series length of chlorophyll relative content data; Represents a one-dimensional convolution operation. For example, the convolution kernel size can be set to 5 and the stride to 2. Represents normalized soil conductivity data, with dimensions of , yes Corresponding to Elements at a point in time; Represents the normalized chlorophyll relative content data, with dimensions of , yes Corresponding to Elements at a point in time; The convolution kernel weights representing the soil conductivity convolution operation are trainable parameters, such as setting the number of output channels to ; The convolution kernel weights representing the relative chlorophyll content convolution operation are trainable parameters, such as setting the number of output channels to ; The bias vector representing the soil conductivity convolution operation is a trainable parameter; The bias vector representing the convolution operation of the relative chlorophyll content is a trainable parameter; represents the rectified linear unit activation function.

[0073] It should be noted that dual-modal feature extraction achieves modality-specific perception. The convolution kernel of soil conductivity focuses on capturing step changes, such as salt penetration, while the convolution kernel of chlorophyll focuses on slowly decreasing trends, such as photosynthetic inhibition, to avoid feature confusion caused by shared weights. Xiang He Although the item uses standard convolution operation, the input data has local stationarity due to the pre-stage segmented normalization. Under this premise, conventional convolution has the ability to mine the characteristics of the "salt shock-recovery cycle". When the conductivity characteristic shows a pulse waveform and the chlorophyll shows a slope decrease, it is automatically associated with a typical stress response pattern.

[0074] 2) Conduct gated cross-modal interaction

[0075] The feature representation matrix of soil conductivity data and the feature representation matrix of chlorophyll relative content data are spliced ​​in the channel dimension, and a gating weight matrix is ​​generated by the Sigmoid function. The gating weight matrix is ​​used to weight the interaction features transformed by the hyperbolic tangent function to obtain the cross-modal interaction feature matrix, which is expressed as:

[0076] ,

[0077] Where, is the Sigmoid activation function; is the cross-modal interaction feature matrix, with dimension ; Represents the channel dimension splicing operation; is the gate weight matrix, which is a learnable parameter; is the first interaction weight matrix, which is a learnable parameter; is the second interaction weight matrix, which is a learnable parameter; is the hyperbolic tangent function; Represents the element-wise multiplication operator.

[0078] It should be noted that The gating weight generated by the term approaches 1 when the conductivity suddenly increases and the chlorophyll decreases synchronously, indicating an enhanced signal, and approaches 0 during a single-mode fluctuation, indicating noise suppression. When the conductivity increases but the chlorophyll does not respond, the gating automatically weakens the feature contribution of this period.

[0079] In one embodiment, Figure 3 As shown, a cross-modal correlation gating mechanism analysis was conducted to verify the working efficiency of the gating mechanism in the cross-modal interaction encoding layer. Three sets of correlation data were used to demonstrate the synchronization of gating weights and bimodal gradient changes. The experimental data used a three-layer structure to intuitively demonstrate the gating mechanism. The unit of soil conductivity gradient (upper layer) is dS / m·min (decisimeters / meter·minute), and the red dashed line marks the gradient threshold. A significant positive gradient appeared at event points (such as sampling index 20 / 45 / 70), reflecting a sudden increase in salinity. The unit of chlorophyll gradient (middle layer) is SPAD / min (relative chlorophyll content / minute), and the red dashed line marks the response threshold. A significant negative gradient appeared at the same event point, indicating a decrease in chlorophyll. The gating weight (lower layer) jumped to above 0.8 (up to 0.95) at the event point where the bimodal gradients changed synchronously, while it remained between 0.3-0.5 in the non-event area. This proves that the gating mechanism can automatically identify the correlation pattern of "sudden increase in conductivity leading to decrease in chlorophyll" and strengthen feature interaction when the event occurs.

[0080] S303, multi-scale feature pyramid module performs multi-scale temporal feature pyramid fusion

[0081] Plant responses to salt stress have multi-scale characteristics, ranging from minute-level ion penetration to hour-level photosynthetic inhibition. Conventional average pooling or maximum pooling operations will lose fine-grained temporal information when processing temporal features, causing weak signals in the early stages of salt stress to be easily submerged, and the model cannot effectively capture the stress response characteristics at different time scales.

[0082] The present invention constructs a multi-scale feature pyramid module, fuses features of different time granularities and retains the original interaction details, and adaptively fuses multi-scale information. The specific steps are as follows:

[0083] 1) Perform multi-scale feature extraction

[0084] The cross-modal interaction feature matrix is ​​subjected to one-dimensional average pooling operations with different pooling kernel sizes to obtain feature matrices representing hourly time scales, mesoscale time scales, and minute time scales, which are expressed as:

[0085] ,

[0086] ,

[0087] ,

[0088] Where, Represents the hourly time scale feature matrix, with dimension , for example, setting the pooling kernel size to 16; Represents the mesoscale time characteristic matrix, with dimension , for example, setting the pooling kernel size to 8; Represents the minute-level time scale feature matrix, with dimension , for example, setting the pooling kernel size to 4; Indicates a round-down operation; Represents a one-dimensional average pooling operation; Indicates the pooling window size in time steps.

[0089] It should be noted that the pooling window size is set to explore the multi-scale characteristics of cross-modal data in the time series direction, such as the small-scale kernel capturing the synchronization of conductivity transients and chlorophyll fluorescence oscillations, and the large-scale kernel correlating the long-term salinity mean with the chlorophyll trend.

[0090] 2) Perform scale attention fusion

[0091] The feature matrices of different time scales are spliced ​​in the channel dimension, and the spliced ​​multi-scale features are weighted and fused through the scale attention weight matrix. The result is added to the original cross-modal interaction feature matrix weighted by the residual connection weight matrix to obtain the pyramid fusion feature matrix, which is expressed as:

[0092] ,

[0093] Where, is the scale attention weight tensor with dimension , normalized by the softmax function, yes No. Rank The elements of the column represent the The feature in The attention weight of each scale, The calculation method is expressed as: ; is the scale index, Corresponding to the feature matrix ; is the scale correlation matrix No. Rank Column element, indicating the Features and The strength of the association between the scales; is the scale correlation matrix, and the calculation method is expressed as ; is the natural exponential function; Represents the residual connection weight matrix, which is a trainable parameter; is the first scale correlation parameter matrix, with dimension , is a trainable parameter; is the second scale correlation parameter matrix, with dimension , is a trainable parameter; is the implicit dimension. For example, when the number of neurons in the hidden layer is set to 50, the implicit dimension is 50. for The transpose of is the pyramid fusion feature matrix, with dimension .

[0094] It should be noted that the scale correlation matrix is ​​obtained by The calculation method is obtained, so that It can dynamically adjust to the stress signal characteristics at different stages. When a slight change in conductivity is detected, the weight of minute-level features is automatically increased. When chlorophyll continues to decline, the contribution of day-level features is enhanced.

[0095] S304, gated reorganization module performs spatiotemporal feature decoupling and reorganization

[0096] The salt stress effect includes slow long-term cumulative trends and rapid instantaneous shock fluctuations. Conventional recursive networks find it difficult to separate low-frequency trend terms from high-frequency fluctuation terms in time series characteristics, resulting in the model being unable to accurately distinguish between the continuous salt accumulation effect and sudden ion penetration instantaneous events, thereby reducing the accuracy of stress stage identification.

[0097] The present invention uses a gated recombinant module to decouple the trend component and the fluctuation component in the feature, and dynamically recombines them through a gating mechanism to enhance the characterization capability, effectively distinguishing and integrating the features of different dynamic processes, which can be expressed as:

[0098] 1) Extract low-frequency trend items

[0099] The pyramid fusion feature matrix is ​​processed using a trainable low-pass filter to separate the low-frequency trend term that represents the slowly changing salt accumulation effect, which is expressed as:

[0100] ,

[0101] Where, It is a low-pass filter with a finite impulse response structure, and the filter coefficients are updated by the gradient descent algorithm; is the cutoff frequency in , the corresponding period is The cumulative effect of salt stress in minutes can be taken as ; is a low-frequency trend term, representing the slowly changing cumulative effect of salt, with a dimension of .

[0102] It should be noted that the low-pass filter is implemented through a finite impulse response structure. Specifically, the filter coefficient vector is defined as , the length of the filter coefficient vector is the time window length of the low-pass filter, initialized to the standard low-pass filter cutoff frequency , and the filter coefficient vector As a learnable parameter, update the input pyramid fusion feature matrix through gradient descent , the boundary processing uses zero filling, and the output is a low-frequency trend item .

[0103] It should also be noted that the low-pass filter in conventional signal processing is used to retain the low-frequency components in the signal and suppress the high-frequency components. Its function is to smooth the signal and remove noise or high-frequency disturbances. In the present invention, the acquisition of the low-frequency trend term is achieved by low-pass filtering the pyramid fusion feature matrix, which can produce a stress mode decoupling effect and automatically filter out the periodic changes in conductivity caused by day and night temperature fluctuations in salinized farmland, retaining only the monotonic upward trend of salt accumulation. Moreover, the cutoff frequency It is set to align with the physiological cycle, with 0.1 Hz corresponding to a 10-minute cycle to match the typical time lag of ion transport across membranes.

[0104] 2) Calculate high-frequency fluctuations

[0105] Subtract the low-frequency trend term from the pyramid fusion feature matrix to obtain the high-frequency fluctuation term that characterizes the sudden ion penetration transient event, which is expressed as:

[0106] ,

[0107] Where, is a high-frequency fluctuation term, which characterizes the sudden ion penetration transient event, and its dimension is .

[0108] 3) Perform gated adaptive recombination

[0109] Apply the Sigmoid function to the low-frequency trend term to obtain the trend term gating weight matrix, and use this weight matrix to calculate the fluctuation term gating weight matrix. Then use these two gating weight matrices to weight the low-frequency trend term and high-frequency fluctuation term respectively, and add the weighted results to obtain the recombined fusion feature, which is expressed as:

[0110] ,

[0111] Where, is the trend term gating weight matrix, which is calculated by applying the Sigmoid activation function to the low-frequency trend term. The calculation method is expressed as: ; is the fluctuation term gating weight matrix, The calculation method is expressed as: ; A matrix of all 1s, ensuring element-wise calculation , normalize the gating weights; is the trend gating parameter matrix, which is a learnable parameter used to calculate the gating weight and has a dimension of ; is the recombinant fusion feature, and the dimension is .

[0112] It should be noted that the definition The constraints can be maintained during the salt stabilization period. When it approaches 0, the recombination fusion feature Focusing on high-frequency fluctuations, such as stomatal opening and closing, during periods of rapid salinity changes, When it approaches 1, the trend is strengthened, and adaptive feature resource allocation can improve the utilization efficiency of limited channel capacity.

[0113] S305, feature distillation module performs hierarchical feature distillation compression

[0114] The recombinant fusion features have a high dimension, and directly inputting them into the classifier can easily lead to overfitting. Conventional dimensionality reduction methods such as principal component analysis or autoencoders cannot adaptively retain the key features of salt stress response. In addition, fixed-ratio pooling operations ignore the differences in information density between different samples, which may lead to the loss of weak stress signals.

[0115] This paper adopts a feature distillation module to dynamically calculate the compression ratio through information entropy, realizes adaptive distillation dimensionality reduction of features, and retains key information while compressing the dimension. The specific steps are as follows:

[0116] 1) Calculate feature information entropy

[0117] Calculate the L2 norm of the feature vector of the recombined fusion feature at each time step, and calculate the relative importance probability of the feature at each time step corresponding to the convolution time series length based on these L2 norm values. Then use these probabilities to calculate the information entropy of the entire recombined fusion feature, which is used to quantify the overall information density of the feature map, expressed as:

[0118] ,

[0119] Where, is the characteristic probability distribution function, Characterization The relative importance of the features of each time step is calculated as ; Recombination fusion characteristics Middle The feature vector of each time step, i.e., the recombined fusion feature The matrix List; is the L2 norm; Recombination fusion characteristics The matrix Column, indicating the All feature channels of time steps; Recombination fusion characteristics The matrix Column, indicating the All feature channels of time steps; It is the information entropy, which quantifies the overall information density of the feature map. The unit is bits. The larger the value, the more dispersed the information distribution.

[0120] Required explanation yes, Item and It can be regarded as information density, quantifying the uniformity of the temporal and spatial information distribution of the feature map. In plant stress response, it can automatically identify key response time windows. For example, the information entropy of the time period when chlorophyll drops sharply increases, so that subsequent compression will prioritize retaining the characteristics of these moments.

[0121] 2) Determine the dynamic compression ratio

[0122] According to the information entropy of the recombined fusion features and the convolution time series length, the maximum number of feature activation values ​​that need to be retained for each sample is adaptively calculated, which is expressed as:

[0123] ,

[0124] Where, is the dynamic compression ratio, the maximum number of feature activation values ​​retained in each channel, satisfying .

[0125] It should be noted that The term is the normalized entropy, which measures the proportion of actual information to the maximum potential. Reflecting the compressible space, in the mildly stressed sample, The item is small, the features are concentrated in a few time periods, and the dynamic compression ratio Automatic reduction achieves efficient compression, retains more features in severely stressed samples, implements adaptive compression, and avoids the accidental deletion of weak stress signals by fixed-ratio compression.

[0126] 3) Perform feature distillation and dimensionality reduction

[0127] For each channel of the recombined fusion feature, the top-ranked maximum activation value is retained and the rest are set to zero. Then, the learned distillation weight matrix is ​​applied to the filtered features to compress the channel dimension and transformed using the ReLU activation function to obtain the distillation feature matrix, which is expressed as:

[0128] ,

[0129] Where, Indicates feature filtering operation, retaining the previous The maximum activation value, and the rest are set to zero. Targeting recombination characteristics Each channel retains the previous The maximum activation value, the rest are set to zero; is the distillation weight matrix, which is a learnable parameter to achieve channel dimension compression; is the distillation feature matrix, with dimension ; Channel compression dimension, for example, set to the number of channels for convolution operation 0.5 times and round down.

[0130] S306, bidirectional gating unit performs gated weighted feature fusion

[0131] Salt tolerance classification requires capturing both the long-term cumulative effects of salt stress and short-term physiological responses. However, conventional bidirectional recurrent neural networks give equal weight to all time-step features, resulting in the dilution of the discriminant contribution of key response nodes. At the same time, its fixed weight aggregation mechanism is difficult to adapt to the differences in response rhythms of different plants.

[0132] The present invention uses a bidirectional gating unit to obtain an aggregated feature vector and strengthens the classification contribution of key time points through a gating weighting mechanism. The specific steps are as follows:

[0133] 1) Perform bidirectional time series feature extraction

[0134] Use the bidirectional GRU network to process the normalized soil conductivity data from the forward and reverse directions respectively, and extract the forward GRU hidden state and reverse GRU hidden state at each time point, which are expressed as:

[0135] ,

[0136] ,

[0137] Where, Represents the normalized Characteristic values ​​of soil conductivity sampling points; is the forward GRU hidden state at the t-th time point; is the forward GRU hidden state at the t-1th time point; is the reverse GRU hidden state at the t-th time point; is the reverse GRU hidden state at the t+1th time point; For gated recurrent units, for example, set the hidden layer dimension to 64.

[0138] 2) Perform gated weighted feature aggregation

[0139] The forward GRU hidden state and the reverse GRU hidden state at each time point are concatenated, and the context vector at that time point is obtained by transforming the feature fusion weight matrix and the hyperbolic tangent function. Then, the Sigmoid function is applied to each context vector to generate the time point weight. The average of the weighted context vectors of all time points is calculated to obtain the aggregated feature vector, which is expressed as:

[0140] ,

[0141] ,

[0142] Where, is the context vector after fusing bidirectional features at the t-th time point; It is a vector concatenation operation; is the feature fusion weight matrix, which is a learnable parameter; is the gate weight matrix, which is a learnable parameter; is the aggregated feature vector with dimension ; is the aggregate feature vector When the hidden layer dimension of the gated recurrent unit is 64, the aggregated feature vector The dimension is 128.

[0143] It should be noted that when calculating the aggregated feature vector, first This calculation method integrates the two-way features and then The method strengthens the contribution of key time points. Different from the conventional BiGRU that treats all moments equally, the method of the present invention can enhance the weight of physiological turning points in salt stress response, such as the starting moment of stomatal closure, so that the model only needs a small number of key frames to make decisions, greatly improving the computational efficiency.

[0144] S307, the classification module performs class probability calculation

[0145] In order to integrate the cumulative effects of long-term salt stress with multi-scale cross-modal features for salt tolerance classification, conventional splicing or weighted averaging methods cannot capture the deep nonlinear interactions between the two types of features, and ignore the key details of spatiotemporal sensitivity in the distilled feature matrix, resulting in blurred classification boundaries.

[0146] This paper constructs a classification module based on a dual-channel gated fusion classification mechanism. It uses dynamic gating to screen the time-sensitive regions of the distilled feature matrix, and uses tensor shrinkage operations to achieve high-order fusion of heterogeneous features. Finally, it calculates the probability distribution through class-aware projection. The specific steps are as follows:

[0147] 1) Perform distillation feature matrix temporal gating screening

[0148] The spatiotemporal gating weight matrix is ​​generated using the aggregated feature vectors, and the spatiotemporal gating weight matrix is ​​used to perform element-wise screening on the distillation feature matrix, retaining local features that are highly correlated with the long-term salt stress pattern. The gated screening distillation feature matrix is ​​obtained, which is expressed as:

[0149] ,

[0150] ,

[0151] Where, is the spatiotemporal gating weight matrix, dimension ; is a third-order gating parameter tensor, which is a learnable parameter with dimension ; is the gated implicit dimension, which is the intermediate dimension reduction in the process of generating the spatiotemporal gating weight matrix and can be set to ; is the gated projection matrix, which is a learnable parameter with a dimension of ; Represents the product operation of the tensor along the first-order modulus, Represents the product operation of the tensor along the second-order module; The gated screening distillation feature matrix has the dimension .

[0152] It should be noted that, unlike conventional matrix multiplication, Term through the third-order gating parameter tensor Implementing Aggregate Feature Vectors With the gated projection matrix When forced memory effects are observed in predictions, the aggregate feature vector is characterized. It includes historical high-salinity information, automatically blocks features of the current normal period through gating, and focuses on searching for features that indicate recurrence of stress.

[0153] 2) Perform heterogeneous feature tensor fusion

[0154] The aggregated feature vector and the gated filtered distillation feature matrix are fused by high-order tensor contraction to generate a joint representation vector, which is expressed as:

[0155] ,

[0156] Where, is a joint representation vector with dimension ; The dimension of the joint representation vector can be set to 64; is a fourth-order fusion tensor, a learnable parameter, and its dimension is ; Represents matrix column vectorization operation; is the fusion bias vector, which is a learnable parameter.

[0157] 3) Perform class-aware probability projection

[0158] The score of each salt tolerance level is calculated through the class-related weight matrix and normalized to a probability distribution to obtain the predicted class probability of the model, which is expressed as:

[0159] ,

[0160] ,

[0161] Where, For the The classification scores of the categories; For the The classification score of each category; c is the category index, representing the salt tolerance grade number, ; is the category index different from c; for The transpose of is the class-related second-order weight matrix, which is a learnable parameter with dimension ; is the class-related first-order weight vector, which is a learnable parameter for The transpose of is the class-related bias scalar, which is a learnable parameter; Indicates that the sample belongs to The probability of a salt tolerance level.

[0162] It should be noted that the class-related second-order weight matrix High-order interactions between modeled features, such as the coupling strength between conductivity mutations and chlorophyll decrease, break through the limitations of linear classifiers. In the classification of similar salt tolerance levels, such as level 2 to level 3, the class-related second-order weight matrix automatically captures nonlinear discriminant features such as "conductivity fluctuation frequency", making the decision boundary more in line with physiological laws.

[0163] S308. Loss function calculation

[0164] The salt tolerance classification of alfalfa suffers from problems such as unbalanced sample distribution and fuzzy decision boundaries between classes. The conventional cross-entropy loss function is overly biased towards high-frequency classes and has difficulty effectively distinguishing similar stress levels. In addition, a single loss function cannot constrain the consistency of the physiological responses of soil electrical conductivity and relative chlorophyll content.

[0165] This paper adopts the calculation method of multi-task joint loss function to solve the problems of class imbalance and inter-class ambiguity, while constraining the consistency of the two modalities in the feature space and strengthening the physiological correlation under salt stress. The specific steps are as follows:

[0166] 1) Calculate classification loss

[0167] According to the model-predicted probability of the sample belonging to each salt tolerance level and the true category label of the sample, combined with the category weight adjustment coefficient and the focal loss modulation factor, the classification loss for optimizing the salt tolerance level prediction is calculated, which is expressed as:

[0168] ,

[0169] Where, represents the classification loss, which is used to optimize the prediction of salt tolerance grade; Indicates that the model predicts that the sample belongs to The probability of each category; Represents the true category label of the sample, which is in one-hot encoding form; Indicates the The weight adjustment coefficient of each category is calculated as follows: ; It represents the median of the sample frequencies of all categories; Indicates the first The frequency of the sample of the category, that is, The frequency of occurrence of each category; Represents the focal loss modulation factor, which is used to reduce the loss weight of easy-to-separate samples and can be set to 2.

[0170] 2) Perform cross-modal feature alignment constraints

[0171] The feature vectors of the samples are extracted from the soil conductivity branch and the chlorophyll relative content branch respectively, and the average Euclidean distance between the two feature vectors of all samples in the same batch is calculated as the cross-modal feature alignment loss, which is expressed as:

[0172] ,

[0173] Where, represents the cross-modal feature alignment loss; Indicates the number of batch training samples; represents the sample index in the batch, ; Indicates the The soil conductivity branch feature vector of each sample is extracted from the cross-modal interaction coding layer, specifically by the feature representation matrix of the soil conductivity data Perform global average pooling to compress the time series dimension; Indicates the The chlorophyll relative content branch feature vector of each sample is extracted from the cross-modal interaction coding layer, specifically by the feature representation matrix of the chlorophyll relative content data. It is obtained by performing global average pooling to compress the time series dimension.

[0174] It should be noted that Forced soil conductivity branch eigenvector Branch eigenvectors of chlorophyll relative content Aligning in the embedding space, encoding the biological prior that "increased salt levels will inevitably lead to a decrease in chlorophyll", makes the feature space learned by the model consistent with physiological and pathological conditions.

[0175] 3) Perform multi-task loss integration

[0176] The classification loss and cross-modal feature alignment loss are weighted and added according to the alignment loss weight coefficient to obtain the total loss of model training, which is expressed as:

[0177] ,

[0178] Where, is the total loss, which is the total loss of model training; Represents the alignment loss weight coefficient, which can adjust the cross-modal constraint strength and can be set to 0.3.

[0179] S309, model iterative training and stop condition judgment

[0180] The model training adopts a small batch gradient descent strategy, with 32 samples input per batch, based on the total loss Compute gradients and update learnable parameters.

[0181] During the training process, the classification accuracy and loss value changes on the validation dataset are monitored in real time. When the validation loss does not decrease for 10 consecutive training rounds, the current optimal model parameters are automatically saved. If the validation loss does not decrease for 20 consecutive rounds or the total number of training rounds reaches the preset upper limit, which can be set to 2000 times, the training is terminated immediately and rolled back to the optimal parameter state.

[0182] After training is completed, the model with the highest performance in the validation set is selected as the final prediction model to ensure the generalization ability of the model and avoid overfitting.

[0183] In one embodiment, Figure 4 As shown in the figure, the contribution of model components is analyzed to quantify the contribution of each module to the final performance. The necessity of module collaborative design is verified through 6 sets of columnar data. The bar chart shows the component superposition effect (the vertical axis is the classification accuracy). For the performance of basic components, single modules such as cross-modal interaction encoding and multi-scale pyramid fusion did not exceed 87%, while the performance of the complete model reached 92%, which is significantly higher than the optimal single module, proving that there is a synergistic enhancement effect between modules. In addition, it can be found that the feature distillation module brings the largest single-step performance improvement, and the complete model breaks through the performance bottleneck through component complementarity.

[0184] In one embodiment, the salt stress response characteristics of different technologies were compared. Under three levels of salt stress, light, medium, and heavy, the response speed and accuracy of the four technologies were compared. The core performance indicators of the triple subgraph are shown in Table 1:

[0185] Table 1 Comparison of salt stress response characteristics of different technologies

[0186]

[0187] The experimental results show that Figure 5 As shown, in the mild stress, moderate stress and severe stress scenarios, the present invention can respond faster than the comparison technology and has smaller fluctuations than the comparison technology, which proves that the method of the present invention has strong robustness.

[0188] In one embodiment, Figure 6As shown in the figure, the salt tolerance classification performance comparison of different models was analyzed, and the classification accuracy of the four models on five salt tolerance levels of alfalfa (level 1 high salt tolerance to level 5 extremely sensitive) was evaluated. The F1 scores (an indicator for comprehensive evaluation of classification accuracy and recall rate) of each model at different levels were displayed using a grouped bar chart. The horizontal axis is the salt tolerance level and the vertical axis is the F1 score range (0.6-1.0). The experimental results show that the independent convolutional neural network (independent CNN) has the lowest performance, the independent long short-term memory network (independent LSTM) has improved, and the hybrid of convolutional neural network and long short-term memory network has a better performance. The model (CNN-LSTM hybrid) was further improved, and this technology's models took the lead in all aspects. All models performed well at extreme levels (levels 1 and 5), but their discrimination ability dropped significantly at intermediate levels (levels 2-4). This technology maintained an F1 score of over 0.80 at the difficult intermediate levels (levels 2-4), and achieved excellent performance close to 0.94 at level 5 (extremely sensitive), indicating that the physiological association mechanism of "sudden increase in conductivity leading to decrease in chlorophyll" established by the cross-modal interactive coding layer and the minute-to-hour stress response patterns captured by multi-scale pyramid fusion played an important role.

[0189] S4. Prediction of salt tolerance of alfalfa

[0190] For the newly collected alfalfa monitoring data, soil electrical conductivity and chlorophyll relative content were collected synchronously using the method described in S1, and then dynamically segmented and normalized according to the S2 process. The processed dual-modal time series data were then input into the trained salt tolerance prediction model.

[0191] The salt tolerance prediction model sequentially performs cross-modal interactive encoding (S302), multi-scale pyramid fusion (S303), gated feature reorganization (S304), feature distillation (S305) and bidirectional gated feature aggregation (S306), and finally outputs the probability distribution of five salt tolerance levels through the classification module (S307), and takes the category corresponding to the maximum probability as the final prediction result.

[0192] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or substitute equivalents for some of the technical features. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A method for predicting salt tolerance of alfalfa based on artificial intelligence, characterized in that: The following steps are involved: S1. Collecting bimodal time series data of alfalfa to construct a dataset for predicting salt tolerance of alfalfa; the bimodal time series data of alfalfa includes soil electrical conductivity data and chlorophyll relative content data; S2. Use dynamic segmentation normalization method to process bimodal time series data. Dynamically divide the time series data segments based on gradient mutation detection to obtain normalized bimodal time series data. The specific process is as follows: The gradient of the soil conductivity data at each sampling time point is calculated, and points where the absolute value of the gradient is greater than the threshold are detected as mutation points based on the adaptively determined gradient threshold. These mutation points are used to dynamically segment the soil conductivity data into multiple segment sets, making the segments dense in areas with drastic gradient changes and sparse in areas with gentle gradient changes. The formula is as follows: , in, Indicates the A segmented collection of soil conductivity data and dynamically generated integration intervals; is the index number of the soil conductivity data segment, ; is the total number of segments; Indicates the sampling time point index; represents the gradient of soil conductivity data at time point t; Represents the absolute value operator; is the adaptive gradient threshold; similarly, the segmented set of chlorophyll relative content data is obtained; For each segmented set of soil conductivity data and chlorophyll relative content data, the mean and variance of each segment are calculated respectively, and then the original data in the corresponding segment are normalized using the mean and variance of the segment to obtain the normalized bimodal time series data; S3. Construct a prediction model for alfalfa salt tolerance. The model uses an end-to-end dual-stream time series processing architecture, including a cross-modal interactive encoding layer, a multi-scale feature pyramid module, a gated recombination module, a feature distillation module, a bidirectional gating unit, and a classification module. The model is trained using normalized dual-modal time series data to obtain a trained model. S4. For the newly collected alfalfa monitoring data, soil conductivity and chlorophyll relative content are collected simultaneously, and then normalized and input into the trained model to obtain the prediction results.

2. The method for predicting salt tolerance of alfalfa based on artificial intelligence according to claim 1, wherein Enhanced encoding of cross-modal feature interactions through the cross-modal interaction encoding layer: A one-dimensional convolution operation is applied to the normalized soil conductivity data and the normalized chlorophyll relative content data, and a nonlinear transformation is performed using the ReLU activation function to obtain the feature representation matrix of the soil conductivity data and the feature representation matrix of the chlorophyll relative content data; the feature representation matrix of the soil conductivity data and the feature representation matrix of the chlorophyll relative content data are concatenated in the channel dimension, and a gating weight matrix is ​​generated by the Sigmoid function. The gating weight matrix is ​​used to weight the interaction features transformed by the hyperbolic tangent function to obtain the cross-modal interaction feature matrix.

3. The method for predicting salt tolerance of alfalfa based on artificial intelligence according to claim 2, wherein: The multi-scale feature pyramid module performs multi-scale temporal feature pyramid fusion: The cross-modal interaction feature matrix is ​​subjected to one-dimensional average pooling operations with different pooling kernel sizes to obtain feature matrices representing hourly time scales, mesoscale time scales, and minute time scales. The feature matrices of different time scales are spliced ​​in the channel dimension, and the spliced ​​multi-scale features are weightedly fused through the scale attention weight matrix. The results are then added to the original cross-modal interaction feature matrix after weighting through the residual connection weight matrix to obtain the pyramid fusion feature matrix.

4. The method for predicting salt tolerance of alfalfa based on artificial intelligence according to claim 3, wherein: The gated reorganization module performs spatiotemporal feature decoupling and reorganization: A trainable low-pass filter is used to process the pyramid fusion feature matrix to separate the low-frequency trend term that represents the slowly changing salt accumulation effect. The low-frequency trend term is subtracted from the pyramid fusion feature matrix to obtain the high-frequency fluctuation term that represents the sudden ion penetration transient event. The sigmoid function is applied to the low-frequency trend term to obtain the trend term gating weight matrix, and the fluctuation term gating weight matrix is ​​calculated from the weight matrix. Then, these two gating weight matrices are used to weight the low-frequency trend term and the high-frequency fluctuation term respectively, and the weighted results are added together to obtain the recombined fusion feature.

5. The method for predicting salt tolerance of alfalfa based on artificial intelligence according to claim 4, wherein: The feature distillation module performs hierarchical feature distillation compression: The L2 norm of the feature vector of the recombinant fusion feature at each time step is calculated, and the relative importance probability of the feature at each time step corresponding to the convolution time series length is calculated based on these L2 norm values. Then, these probabilities are used to calculate the information entropy of the entire recombinant fusion feature, which is used to quantify the overall information density of the feature map. According to the information entropy of the recombinant fusion feature and the convolution time series length, the maximum number of feature activation values ​​that need to be retained for each sample is adaptively calculated. For each channel of the recombinant fusion feature, the top-ranked maximum activation value is retained, and the rest are set to zero. The filtered features are compressed in the channel dimension using a learnable distillation weight matrix, and transformed using the ReLU activation function to obtain a distillation feature matrix.

6. The method for predicting salt tolerance of alfalfa based on artificial intelligence according to claim 5, wherein: The bidirectional gating unit performs gated weighted feature fusion: A bidirectional GRU network is used to process the normalized soil conductivity data from the forward and reverse directions respectively, and the forward GRU hidden state and reverse GRU hidden state of each time point are extracted. The forward GRU hidden state and reverse GRU hidden state of each time point are concatenated, and the context vector of that time point is obtained by transforming the feature fusion weight matrix and the hyperbolic tangent function. The Sigmoid function is applied to each context vector to generate the time point weight. The average of the weighted context vectors of all time points is calculated to obtain the aggregated feature vector.

7. The method for predicting salt tolerance of alfalfa based on artificial intelligence according to claim 6, wherein: The classification module performs class probability calculations: The aggregated feature vectors are used to generate a spatiotemporal gating weight matrix, which is then used to perform element-level screening on the distillation feature matrix to retain local features that are highly correlated with the long-term salt stress pattern, thereby obtaining a gated screening distillation feature matrix. The aggregated feature vectors and the gated screening distillation feature matrix are fused through high-order tensor contraction to generate a joint representation vector. The score of each salt tolerance level is calculated using the class-related weight matrix and normalized into a probability distribution to obtain the predicted class probability of the model.

8. The method for predicting salt tolerance of alfalfa based on artificial intelligence according to claim 7, wherein: The model is optimized and trained using a multi-task joint loss function, including classification loss and cross-modal feature alignment loss. The classification loss and cross-modal feature alignment loss are weighted and added according to the alignment loss weight coefficient to obtain the total loss of model training. The model training adopts a mini-batch gradient descent strategy to calculate the gradient based on the total loss and update the learnable parameters.