A plant species distribution prediction method and system based on multi-modal contrast learning

By employing a multimodal contrastive learning method, combining multimodal data for deep semantic fusion and cross-modal alignment, the spatial precision and accuracy issues of plant species distribution prediction were resolved, achieving efficient and stable species distribution prediction.

CN122391893APending Publication Date: 2026-07-14SOUTHEAST UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SOUTHEAST UNIV
Filing Date
2026-06-05
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing methods for predicting plant species distribution have failed to effectively combine visual images with multi-source data such as environmental variables for deep semantic fusion, resulting in low spatial precision and accuracy.

Method used

A multimodal contrastive learning approach is adopted. By acquiring multimodal environmental data and plant functional trait data, visual feature encoding and environmental feature encoding are performed. The cross-modal contrastive learning model is used to align and optimize the environmental embedding matrix and species trait embedding matrix in a unified vector space, outputting a grid species similarity matrix. Threshold determination is performed based on the optimal existence determination threshold to obtain the plant species distribution prediction results.

Benefits of technology

It improves the spatial precision and accuracy of plant species distribution prediction. By unifying embedding expression and co-prediction, it reduces the impact of differences in baseline occurrence rates and enhances the stability of rare species prediction and the robustness of threshold learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122391893A_ABST
    Figure CN122391893A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for predicting plant species distribution based on multimodal contrastive learning, relating to the field of plant species distribution prediction technology. The method includes: acquiring multimodal environmental data and plant functional trait data; encoding visual features and environmental features in the multimodal environmental data to obtain encoded visual features and environmental features; performing deep feature fusion on the encoded visual features and environmental features to obtain an environmental embedding matrix; encoding embedding vectors in the plant functional trait data to obtain a species trait embedding matrix; inputting the environmental embedding matrix and the species trait embedding matrix into a pre-trained cross-modal contrastive learning model to output a grid-based species similarity matrix; and performing threshold determination on the grid-based species similarity matrix based on a preset optimal existence threshold to obtain the plant species distribution prediction result for each grid, thereby improving the spatial accuracy and precision of plant species distribution prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of plant species distribution prediction technology, specifically a plant species distribution prediction method and system based on multimodal comparative learning. Background Technology

[0002] Currently, the main technical approaches in the field of species distribution prediction modeling are as follows: Single-species distribution models (SDM): These are represented by techniques such as MaxEnt (maximum entropy model), GLM (generalized linear model), RandomForest, and Boosted Regression Tree. These methods are based on machine learning algorithms, using a single species as an independent modeling unit. They utilize species presence or absence data and environmental variables to fit the species' ecological niche and predict its spatial distribution probability. Multi-Species Joint Distribution Model (JSDM): Typical examples include Hierarchical Modelling of Species Communities. This type of method is based on a Bayesian framework of multivariate hierarchical generalized linear mixed-effects models, which can simultaneously integrate multi-source data such as species abundance, missing data, environmental variables, and phylogenetic relationships. A single model can support both single-species prediction and simultaneous estimation of multiple species distributions, comprehensively reflecting the combined influence of niche theory, interspecific associations, and phylogenetic conservation on species distribution.

[0003] However, existing methods for predicting plant species distribution do not include a method that performs deep semantic fusion of visual images and multi-source data such as environmental variables, and then combines cross-modal semantic feature alignment before making predictions. This results in low spatial precision and accuracy in predicting plant species distribution. Summary of the Invention

[0004] To address the shortcomings mentioned in the background art, the present invention aims to provide a method and system for predicting plant species distribution based on multimodal contrastive learning.

[0005] Firstly, the objective of this invention can be achieved through the following technical solution: a method for predicting plant species distribution based on multimodal contrastive learning, the method comprising the following steps: Acquire multimodal environmental data and plant functional trait data, wherein the multimodal environmental data includes remote sensing image data and multidimensional environmental variable data, and the plant functional trait data is generated based on plant functional trait theory; Visual feature encoding and environmental feature encoding are performed on multimodal environmental data to obtain encoded visual features and environmental features. Deep feature fusion is then performed on the encoded visual features and environmental features to obtain an environmental embedding matrix. Embedding vector encoding is performed on plant functional trait data to obtain a species trait embedding matrix. The environmental embedding matrix and the species trait embedding matrix are input into a pre-trained cross-modal contrastive learning model, and the output is a grid species similarity matrix, which represents the degree of suitability of the environment and species in each grid. The similarity matrix of the grid species is thresholded based on a preset optimal existence threshold to obtain the predicted distribution of plant species for each grid.

[0006] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the cross-modal contrastive learning model aligns and optimizes the environment embedding matrix and the species trait embedding matrix in a unified vector space through cross-modal contrastive learning. The training of the cross-modal contrastive learning model uses a multivariate contrastive loss function to promote the increase of positive sample similarity and the decrease of negative sample similarity. The positive samples are grid and species combinations with real co-occurrence relationships, and the negative samples are grid and species combinations without co-occurrence relationships.

[0007] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the environment embedding matrix and the species trait embedding matrix are embedded and mapped to the same dimension by a corresponding mapping network of the environment embedding matrix and the species trait embedding matrix through a multilayer perceptron and a residual block structure; the environment embedding matrix and the species trait embedding matrix after being mapped to the same dimension are L2 normalized to obtain the normalized environment embedding matrix and the species trait embedding matrix.

[0008] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: calculating the grid species similarity matrix, as follows: Based on the normalized environment embedding matrix and species trait embedding matrix, the environment embedding vector of the grid is calculated for all candidate grids, and the species trait embedding vector of the species is calculated for all candidate species. The grid species similarity matrix is ​​then constructed by calculating the vector dot product or cosine similarity. in, This represents the similarity score between the i-th grid and the j-th species. For the environment embedding vector of the i-th grid, Let j be the trait embedding vector of the j-th species. This represents the L2 norm of the mesh embedding vector, i.e., the vector magnitude.

[0009] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the visual feature encoding and environmental feature encoding of the multimodal environment data includes: The remote sensing image data is processed by encoding visual features using the SwinTransformer deep feature extraction model based on the visual Transformer architecture to obtain encoded visual features. For each sub-modality of the multidimensional environmental variable data, a sub-encoder with a multi-layer fully connected neural network structure is constructed. Each sub-modality variable is mapped to a fixed-dimensional sub-embedding vector to obtain the encoded environmental features. Fusion methods that perform deep feature fusion of encoded visual features and environmental features include one or more of the following: splicing fusion, attention-weighted fusion, modal-gated fusion, and conditional modulation fusion.

[0010] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the calculation process of the preset optimal existence determination threshold, as follows: Using a pre-defined grid species existence matrix as a supervisory label, and after filtering and weighting the grid species existence matrix, a correction sample is generated. The grid species similarity matrix is ​​converted into an existence probability matrix. Based on the existence probability matrix and the correction sample, a multi-strategy threshold search is performed on each species to obtain the optimal existence determination threshold.

[0011] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the process of generating the corrected sample, as follows: The study scope grid set for the calibration phase is determined, the green space grid is combined with the grids with observation records, the species richness index of the actual survey grids is statistically analyzed, and the grids are divided into high survey intensity grids and low survey intensity grids according to the preset quantile threshold. After extracting the environmental variable matrix and performing standardization and dimensionality reduction, the environmental similarity index of each grid is calculated. A negative sample sampling requirement function based on environmental similarity is constructed, and the spatial neighborhood set of the actual survey grid is calculated to generate a background candidate grid pool. For each species, a positive sample grid set is constructed, and positive samples are excluded from high-intensity grids, low-intensity grids, and background candidate grids to form a mutually exclusive negative sample candidate pool. The target number of negative samples is determined according to the preset negative sample ratio and minimum negative sample number constraints. Weighted sampling without replacement is performed according to the stratification weight and environmental sampling requirement weight to generate a negative sample set. The positive sample grid set and the negative sample set are merged, and the corrected samples are output.

[0012] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: in the grid species existence matrix, rows represent grids and columns represent target species, and an element value of 1 indicates that the grid contains a corresponding species, and a value of 0 indicates that the grid does not contain a corresponding species.

[0013] Secondly, in order to achieve the above objectives, this invention discloses a plant species distribution prediction system based on multimodal contrastive learning, comprising: The data acquisition module is used to acquire multimodal environmental data and plant functional trait data. The multimodal environmental data includes remote sensing image data and multidimensional environmental variable data, and the plant functional trait data is generated based on plant functional trait theory. The data encoding module is used to encode visual features and environmental features of multimodal environmental data to obtain encoded visual features and environmental features. The encoded visual features and environmental features are then fused with deep features to obtain an environmental embedding matrix. The module also performs embedding vector encoding on plant functional trait data to obtain a species trait embedding matrix. The data processing module is used to input the environment embedding matrix and the species trait embedding matrix into a pre-trained cross-modal contrastive learning model and output a grid species similarity matrix, which represents the degree of suitability of the environment and species in each grid. The prediction output module is used to perform threshold determination on the grid species similarity matrix based on a preset optimal existence determination threshold, and obtain the plant species distribution prediction results for each grid.

[0014] The beneficial effects of this invention are: This invention achieves unified embedding and collaborative prediction of environmental variables and species functional traits; it reduces the impact of differences in baseline occurrence rates on the judgment results and improves the stability of rare species prediction by introducing a prevalence correction and species-specific threshold determination strategy; it enhances the reliability of samples in the threshold learning stage by constructing a correction sample mechanism based on survey intensity stratification and environmental similarity adjustment; and it improves the robustness and generalization ability of threshold determination by combining a multi-strategy threshold search and cross-validation mechanism. Ultimately, it achieves efficient, stable, and scalable inference of urban-scale grid-level species composition, thereby improving the spatial accuracy and precision of plant species distribution prediction. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Figure 1 This is a schematic diagram of the method flow of the present invention; Figure 2 This is a schematic diagram of the system structure of the present invention.

[0016] Figure 3 This is a graph showing the results of the model ablation experiment of this invention.

[0017] Figure 4 This is a diagram showing the prediction results of the model for representative species in this invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] Example 1: like Figure 1 As shown, a plant species distribution prediction method based on multimodal contrastive learning is presented, which includes the following steps: S101: Acquire multimodal environmental data and plant functional trait data, wherein the multimodal environmental data includes remote sensing image data and multidimensional environmental variable data, and the plant functional trait data is generated based on plant functional trait theory; The acquisition of multimodal environmental data specifically includes: screening and acquiring common high-precision, multi-band remote sensing data (such as Landsat 8, Sentinel-2, etc.) within the study area; screening requirements include cloud cover less than 10% and shooting time in summer (June-October); acquiring climate variable data (including temperature, precipitation, light intensity, and air quality); acquiring soil physical and chemical property data (including soil pH, organic carbon content, organic carbon density, total nitrogen, total phosphorus, sand, silt, bulk density, etc.); acquiring topographic data (DEM, slope, and aspect, etc.); unifying the projection and spatial resolution of various data (e.g., 100m × 100m) and cropping to the boundary of the study area to generate standardized raster data. In this example, Sentinel-2 remote sensing image data with a resolution of 10m and the other types of data mentioned above are acquired for the study area. All environmental variables are uniformly resampled to a resolution of 20m, and then spatially cropped, normalized, and other operations are performed to output the standardized environmental tensor.

[0020] The collection of plant functional trait data specifically includes: collecting a list of key species in the study area; retrieving relevant textual materials such as Wikipedia, Baidu Encyclopedia, and Flora of China to obtain representative species' taxonomic (order, family, genus, and species, etc.), morphological (life form, height, leaf and flower color, etc.), ecological (habitat type, altitude, soil type, light and water conditions, etc.), phenological (flowering period, fruiting period, etc.), and main uses of key plant functional traits; and then organizing and standardizing the structured plant trait data semantically through preset text construction rules or large language models to generate species-specific natural language description text, and generating calculable and fixed-dimensional high-dimensional embedding vectors for subsequent embedding mapping and species distribution modeling.

[0021] In this example, the target species list within the research scope is first defined based on regional biodiversity atlases and lists of common native species to ensure the relevance and rationality of species selection. Furthermore, to enhance the distinguishability of functional trait expressions among different species and improve the accuracy of descriptions of different plant functional traits, the aforementioned structured plant trait data is textualized using pre-defined natural language construction rules. The text construction follows a sequence: Latin scientific name as the primary element, followed by family and genus information as species identification, and then core morphological features such as life form. Subsequently, trait information is aggregated in segments according to morphological, ecological, phenological, and utilization attributes to form a natural language description text containing the comprehensive functional characteristics of the species.

[0022] The pre-defined grid species existence matrix is ​​based on the obtained species list of the study area. It collects, matches and integrates field survey or citizen science observation data, and combines the obtained grid multidimensional environmental variable data to complete the construction of the grid-species existence matrix and the supervision label data sample pairs.

[0023] Specifically, it includes: We searched mainstream citizen science data websites such as GBIF (Global Biodiversity Information Facility), iNaturalist, and Plant Intelligence to extract observation records of target species within the study area to supplement the coverage of the field survey data and improve data completeness. Based on the spatial location information of each sample, we constructed a grid-species binary existence matrix, where rows represent grids and columns represent target species. An element value of 1 indicates that the corresponding species exists in the grid, and 0 indicates that the corresponding species does not exist in the grid. We collected grid coordinate data and matched the corresponding environmental variables of the grid to form grid × species supervision label data pairs and model training sample pairs.

[0024] Spatial cross-validation group construction To avoid overfitting caused by spatial autocorrelation, a spatial grouping verification mechanism is constructed.

[0025] Specifically, it includes: Spatial clustering is performed based on the relationship between grid spatial coordinates to generate spatial block numbers; the GroupKFold method is used to divide the training and testing sets and construct a number index to ensure that data from the same spatial block does not appear in the training and testing sets at the same time; the training index and the testing index are output.

[0026] S102: Visual feature encoding and environmental feature encoding are performed on multimodal environmental data to obtain encoded visual features and environmental features. The encoded visual features and environmental features are then fused with deep features to obtain an environmental embedding matrix. Embedding vector encoding is performed on plant functional trait data to obtain a species trait embedding matrix. Visual feature encoding and environmental feature encoding of multimodal environmental data include: The remote sensing image data is processed by encoding visual features using the SwinTransformer deep feature extraction model based on the visual Transformer architecture to obtain encoded visual features. For each sub-modality of the multidimensional environmental variable data, a sub-encoder with a multi-layer fully connected neural network structure is constructed. Each sub-modality variable is mapped to a fixed-dimensional sub-embedding vector to obtain the encoded environmental features. Fusion methods that perform deep feature fusion of encoded visual features and environmental features include one or more of the following: splicing fusion, attention-weighted fusion, modal-gated fusion, and conditional modulation fusion.

[0027] Specifically, it includes: The study integrates multidimensional environmental data of the research area and maps it to a unified latent space representation, outputting a fixed-dimensional environmental embedding vector for each grid.

[0028] Environmental variables are divided into subsets of remote sensing variables, climate variables, soil variables, and topographic variables according to the data representation dimension. For each sub-modality, a sub-encoder with a multi-layer fully connected neural network structure is constructed, including a linear mapping layer, a non-linear activation function layer, an optional regularization layer, several hidden layers, and a residual connection layer. The variables of each sub-modality are mapped to fixed-dimensional sub-embedding vectors.

[0029] In this example, environmental features from different sources are input into the corresponding sub-encoders for representation learning. Let the input of the m-th environmental modality be X. m Its sub-encoders consist of 2–3 layers of fully connected networks, using ReLU, GELU, or SiLU activation functions. The mapping process of each sub-encoder can be represented as: in, The hidden layer representation of the m-th mode in layer l; This represents the number of network layers in the sub-encoder. For nonlinear activation functions, ReLU, GELU, or SiLU can be used; and These represent the weight matrix and bias term of the remote sensing feature projection layer, respectively; This is the sub-embedding vector corresponding to this mode. Embed its dimensions.

[0030] Furthermore, to further extract the complex environmental characteristics of suitable habitats for species, the Swin Transformer, a deep feature extraction model based on the visual Transformer architecture, is used as the deep feature extractor for remote sensing images. The preprocessed multi-channel remote sensing images are input into the model, and the output is a fixed-dimensional environmental embedding vector for subsequent species distribution modeling. Let the multi-channel remote sensing image patch corresponding to the i-th grid be denoted as . Then its remote sensing representation can be expressed as: in, This indicates the Swing Transformer encoder. Its model parameters, This is the output m-dimensional remote sensing image embedding vector. Subsequently, the remote sensing embedding vector is further mapped to a unified environment representation space via a projection layer, and the calculation method is consistent with that of each submodule.

[0031] Multidimensional environmental data fusion and spatial embedding The output of each sub-encoder , , , The sub-embedding vectors are fused into a unified context embedding representation. ; Specifically, it includes: Several commonly used methods in multimodal data fusion are available, namely: concat fusion (features directly concatenated and compressed after projection layer); attention-weighted fusion (attention fusion) (multimodal data are normalized and then weighted and summed); gated fusion (modal-wise fusion) (generating gating coefficients for each modality to achieve selective fusion of information per modality or per dimension); and FiLM conditional modulation fusion (feature-wise linear modulation) (generating dimensional modulation parameters based on conditional modalities to linearly modulate the main modality). The fusion method of each modal sub-embedding vector can be expressed as: in, Represents the integrated environment embedding vector. Represents the multimodal fusion function This indicates vector fusion.

[0032] Plant functional trait coding and spatial embedding Natural language description text is generated based on the constructed species functional trait dataset, and the trait text for each species is embedded with vector encoding.

[0033] Specifically, it includes: The generated natural language description text of plant functional traits is input into various pre-trained text embedding models for vectorization encoding, outputting high-dimensional embedding vectors with fixed dimensions for quantifying species functional trait features. The generated embedding vectors are uniformly subjected to L2 normalization to ensure the comparability of vectors from different species in the same metric space, ensuring the consistency and numerical stability of subsequent cross-modal alignment and cosine similarity calculation. The optimal species trait embedding vectors are mapped to a feature space with the same dimension as the environment embedding vectors through linear mapping or a trainable projection layer, realizing isomorphic representation of the species side and the environment side, so that the two types of embedding vectors meet the requirements of similarity calculation and comparative learning in a unified space, thereby supporting multimodal joint modeling and species distribution prediction tasks.

[0034] In this example, to improve the stability and discriminative power of species functional trait representation, this embodiment employs multiple pre-trained text embedding models for comparative experiments, and selects the optimal model as the final species embedding vector generation model through a unified encoding and evaluation process. The model library includes, but is not limited to: the BGE-M3 model, which focuses on semantic modeling of long multilingual texts and is suitable for comprehensive descriptive texts containing complex structured trait information; the BGE-Large model, which focuses on high-dimensional semantic discriminative expression capabilities and is beneficial for enhancing the discrimination of fine-grained functional differences; the Multilingual-E5-Large model and the GTE-Multilingual-Base model, which focus on cross-lingual consistent semantic alignment; and the MPNet model, which focuses on general semantic similarity calculation and has mature and stable semantic matching performance. All of the above models are publicly available pre-trained models with fixed embedding output dimensions, suitable for large-scale text semantic encoding tasks. Through multi-model comparison and automatic optimization mechanisms, representational biases caused by a single model can be effectively avoided, improving the expression accuracy and generalization ability of species functional trait embeddings in multi-species distribution modeling.

[0035] Vector embedding matrix storage and output of environmental and trait data: The environment embedding matrix and the trait embedding matrix are stored in a unified manner to form the basic data for cross-modal embedding alignment.

[0036] Specifically, it includes: Output the environmental data embedding matrix with the optimal fusion method and the trait data embedding matrix with the best trait discrimination; verify the consistency of the dimensions of the two types of embedding vectors; establish a spatial unit index and species index mapping table to realize fast retrieval of environmental vectors and species vectors; store the embedding matrix and index mapping in the form of a structured file as the basic data for subsequent cross-modal similarity calculation and multi-species distribution prediction.

[0037] S103: Input the environment embedding matrix and species trait embedding matrix into the pre-trained cross-modal contrastive learning model, and output the grid species similarity matrix, which represents the degree of suitability of the environment and species in each grid. Cross-modal contrastive learning models align and optimize the environment embedding matrix and species trait embedding matrix in a unified vector space through cross-modal contrastive learning. The training of the cross-modal contrastive learning model uses a multivariate contrastive loss function to promote the increase of positive sample similarity and the decrease of negative sample similarity. The positive samples are grid and species combinations with real co-occurrence relationships, and the negative samples are grid and species combinations without co-occurrence relationships.

[0038] The environmental embedding matrix and the species trait embedding matrix are mapped to the same dimension by a multilayer perceptron and residual block structure. The environmental embedding matrix and the species trait embedding matrix after being mapped to the same dimension are then L2 normalized to obtain the normalized environmental embedding matrix and the species trait embedding matrix.

[0039] Among them, the embedding consistency and normalization preprocessing process is as follows: Preprocessing of the environment and trait embedding vectors is performed to ensure the stability of subsequent training.

[0040] Specifically, it includes: Examine the dimensions of the two embedding vectors. If the dimensions are inconsistent, use a multilayer perceptron and residual block structure to embed the corresponding mapping networks (environment side and trait side) to the same dimension d. Perform L2 normalization on the mapped embedding vectors to obtain unit length vectors. Output the processed two-class vector embedding datasets.

[0041] in, This represents the i-th environment embedding vector. Let be the trait embedding vector of the j-th species.

[0042] Construction of positive and negative samples and division of training data Based on the constructed grid-species existence matrix, a grid-species relationship index is established and positive and negative sample data pairs are constructed; the training and validation datasets are divided using spatial block cross-validation.

[0043] Specifically, it includes: Training sample pairs are constructed based on the observation matrix Y, i.e., when Yi,j=1, (i,j) is a positive sample pair, otherwise it is a negative sample pair; a set of species that actually appear is constructed for each grid; during the training process, grids and species are sampled in batches to form positive sample pairs (true co-occurrence relationships) and negative sample pairs (non-co-occurrence relationships) within the batch, so as to improve training efficiency and expand the coverage of negative samples; the study area is divided into spatial data blocks of specific side lengths according to grid coordinates, and they are randomly assigned to K folds to reduce the impact of spatial autocorrelation on the training data; Cross-modal contrastive learning training: For each grid i, it is compared with the set of positive sample species P(i) for learning. A multivariate contrastive loss function is used to promote the improvement of positive sample similarity and the decrease of negative sample similarity, thereby achieving cross-modal alignment.

[0044] Depending on the training settings, training losses can be selected from similarity difference loss (SDLoss), information noise contrast loss (InfoNCE), multi-label supervised contrast loss (MulSupConLoss), or multi-positive sample contrast loss (MultiPosLoss) for experimental comparison to improve the matching and discrimination ability between environmental grids and plant species. Regularization constraints such as uniformity, variance, and covariance can be superimposed to avoid the collapse of the embedded representation. During training, data augmentation strategies such as adding noise to environmental features, feature dropout, feature obfuscation, and multi-view sampling can be combined to improve the model's generalization ability to the heterogeneity of urban ecological environment. In the model optimization process, strategies such as learning rate preheating and cosine annealing scheduling, gradient pruning, and early stopping mechanism can be used simultaneously to improve training stability and reproducibility. Batch training experiments were conducted for different fusion modes, loss functions and hyperparameter combinations. The Top-K recall, precision, hit rate, NDCG, MRR and MAP of each validation set were recorded. The optimal values ​​of the above indicators were achieved through multiple adjustments. The hyperparameters at this time were selected and the optimal configuration was output to obtain the final required model as a cross-modal contrastive learning model. The process of constructing a cross-modal contrastive learning model is as follows: A cross-modal contrastive learning model is used to learn the potential matching relationship between grid environment representations and plant functional trait representations. This includes basic network selection, construction of environment-side and species-side encoding networks, shared projection space and normalization processing, cross-modal similarity learning, and training optimization. The environment-side encoding network maps the environment embedding matrix obtained in step S102 to an environmental latent representation, and the species-side encoding network maps the species trait embedding matrix obtained in step S102 to a species latent representation. Both are mapped to the same dimension through a shared projection space and then normalized using L2 for similarity learning.

[0045] Specifically, it includes: ① Basic Network Selection: The environment-side encoding network and species-side encoding network can be selected from one or more of the following: multilayer perceptron, residual multilayer perceptron, TabTransformer, FT-Transformer, graph convolutional network, graph attention network, convolutional neural network, or visual Transformer. Among them, multilayer perceptron and residual multilayer perceptron are suitable for fixed-dimensional structured embedding vectors; TabTransformer and FT-Transformer are suitable for tabular data with clear field structures and complex variable interactions; convolutional neural network and visual Transformer are suitable for raw remote sensing image patches or multi-band image sequences; graph convolutional network and graph attention network are suitable for graph structure data with clear spatial adjacency relationships, ecological diffusion relationships, or species co-occurrence relationships.

[0046] In this embodiment, since the aforementioned steps have already converted the multimodal environmental data and plant functional trait data into fixed-dimensional embedding vectors, the model input is represented as a structured high-dimensional vector rather than the original image or graph-structured data. Therefore, a dual-tower residual multilayer perceptron network is preferred as the base network. The reasons for this choice are as follows: First, the dual-tower structure can maintain the independent modeling capabilities of the environmental and species representations, avoiding the mixing of modal information caused by directly splicing two types of heterogeneous features. The parameters of the two networks are independent of each other, but the output dimension remains consistent. Second, the residual multilayer perceptron is suitable for processing fixed-dimensional high-dimensional representation vectors and can learn the nonlinear matching relationship between environmental conditions and species functional traits. Third, the dual-tower structure supports matrix matching calculations for all grids and all candidate species after training, making it suitable for large-scale grid species suitability inference tasks.

[0047] ② Constructing environment-side and species-side coding networks: Both the environment-side coding network and the species-side coding network include an input linear mapping layer, a layer normalization layer, a GELU activation function layer, a Dropout layer, a residual coding block, and an output projection layer.

[0048] For the initial environment embedding vector of the i-th grid The environment-side coding network outputs a latent representation of the environment: For the initial trait embedding vector of the j-th species The species-side encoding network outputs the species latent representation: Specifically, the input embedding vector is first projected onto the hidden dimension space through an input linear mapping layer, and then processed by layer normalization, GELU activation function, and Dropout regularization. Subsequently, high-order nonlinear features are extracted through residual coding blocks, and then mapped to a preset shared embedding dimension through an output projection layer. The residual coding blocks are used to enhance the expressive power of deep nonlinear layers while preserving the original embedding information, thereby alleviating the gradient decay and representation degradation problems during the training process of deep networks.

[0049] In this example, the two-sided encoding networks also adopt the residual multilayer perceptron structure, with the hidden dimension set to 1024, the final output embedding dimension set to 512, the number of residual coding blocks set to 2, the dropout rate set to 0.2, and the activation function used to be GELU.

[0050] ③ Shared Embedding Space Mapping and Normalization: To ensure that the environment-side representation and the species-side representation have a consistent metric basis, the model maps them to a unified d-dimensional shared latent space. Subsequently, L2 normalization is performed on the two types of output vectors to obtain unit-length vectors, which are distributed on a unit hypersphere; the processed vectors are then output as embedded datasets.

[0051] in, This represents the normalized latent representation of the environment after the i-th environment embedding vector is used. Let be the normalized latent representation of species traits after the trait embedding vector of the j-th species is normalized. This represents the L2 norm.

[0052] ④ Construction of positive and negative samples: Based on the grid-species existence matrix, grid-species supervised sample pairs are constructed. That is, when Yi,j=1, (i,j) is a positive sample pair, otherwise it is a negative sample pair. For each grid, a set of species that actually appear is constructed. During the training process, grid and species combinations are sampled in batches to form positive sample pairs (real co-occurrence relationship) and negative sample pairs (non-co-occurrence relationship) within the batch, so as to improve training efficiency and expand the coverage of negative samples. In order to reduce the impact of spatial autocorrelation on training data, the study area can be divided into spatial data blocks of specific side lengths according to grid coordinates and randomly assigned to K folds.

[0053] ⑤ Cross-modal contrastive learning training: For each grid or grid i, it is paired with the set of positive sample species P(i) to form a cross-modal positive sample pair, and non-co-occurring species or candidate background species are paired with negative sample pairs. Grid-species matching scores are calculated based on the normalized environmental latent representation and species trait latent representation, and a temperature coefficient is introduced to scale the similarity distribution to enhance the model's ability to distinguish between high-similarity positive samples and low-similarity negative samples. During training, a multivariate contrastive loss function is used to optimize model parameters, ensuring that truly co-occurring grid-species pairs are close to each other in the shared embedding space, while non-co-occurring or low-fitness grid-species pairs are far apart, thereby achieving cross-modal alignment between environmental representation and species trait representation.

[0054] The training loss function can be selected based on the sample organization and task objective, including Similarity-Difference Loss (SDLoss), Noise Contrast Estimation Loss (InfoNCE Loss), Multi-label Supervised Contrastive Loss (MulSupConLoss), or Multi-positive Contrastive Loss (MultiPosLoss). Specifically, when each grid corresponds to only a single positive sample species, InfoNCE loss or Similarity-Difference Loss can be used; when multiple real-occurring species or multiple highly suitable species exist in the same grid, Multi-label Supervised Contrastive Loss or Multi-positive Contrastive Loss is preferred to adapt to the ecological characteristics of multi-species coexistence in urban plant communities and improve the model's ability to discriminate species matching relationships in complex grids.

[0055] The matching score between the normalized environmental potential representation and the species potential representation is calculated as follows: in, To control the smoothness of the similarity distribution, in this example, the temperature coefficient is set to 0.10.

[0056] ⑥ Anti-collapse regularization constraints and training optimization: To avoid problems such as embedding space collapse, representation dimension degradation, or excessive concentration of prediction results on a few high-frequency species during model training, an anti-collapse regularization term is superimposed on the main contrastive learning loss; data augmentation strategies such as environmental feature noise addition, feature dropout, feature obfuscation, and multi-view sampling can also be combined to improve the model's generalization ability to the heterogeneity of urban ecological environment; during the model optimization process, strategies such as learning rate preheating and cosine annealing scheduling, gradient pruning, and early stopping mechanism can be used simultaneously to improve training stability and reproducibility.

[0057] The total loss of the model can be expressed as: in, This represents the main contrastive learning loss. Represents the uniformity regularization term. This represents the variance regularization term. Represents the covariance regularization term; , , These represent the weights of the corresponding regularization terms.

[0058] In this example, the weights for the uniformity regularization term and variance regularization term are set to 0.08, and the weights for the covariance regularization term are set to 0.03. The model is trained using the AdamW optimizer with an initial learning rate of 1×10⁻⁶. −4 The minimum learning rate is set to 1×10. −6 The weight decay coefficient is set to 5×10. −5 The learning rate scheduling uses a combination of linear preheating and cosine annealing decay, with 10 preheating rounds. The maximum number of training rounds is set to 200, the batch size to 128, the gradient clipping threshold to 1.0, and the early stopping patience value to 15. The noise coefficients for remote sensing features, climate features, and soil features are set to 0.10, the feature dropout ratio to 0.20, the mixup parameter to 0.4, and the mixup ratio to 0.3.

[0059] ⑦ Model Selection and Optimal Model Output: Model training employs spatial block cross-validation to divide the training and validation sets. Specifically, the study area is divided into several spatial blocks based on grid spatial coordinates, and a grouped cross-validation method is used for training-validation partitioning to ensure that samples within the same spatial block do not appear simultaneously in the training and validation sets, thereby reducing the impact of spatial autocorrelation on model performance evaluation results.

[0060] Model evaluation focuses on grid-species matching ordination performance, with evaluation metrics including Recall@K, Precision@K, NDCG@K, MRR, and MAP. Recall@K evaluates whether actual species are ranked among the top K candidate species; Precision@K evaluates the proportion of actual species among the top K candidate species; NDCG@K evaluates the quality of the actual species' position in the predicted ordination results; and MRR and MAP evaluate the model's overall ordination performance for positive sample species. Recall@20 or a comprehensive ordination metric is preferred as the primary evaluation metric.

[0061] Batch ablation experiments were conducted for different environmental fusion modes, loss function types, and key hyperparameter combinations, and ranking evaluation metrics were recorded on each fold validation set. Based on the average performance and cross-fold stability of each experimental group in cross-validation, the hyperparameter combination with high overall ranking performance and low fluctuation on the validation set was selected as the final model configuration. After training, the model with the best ranking performance on the validation set was used as the final cross-modal comparative learning model, and the model weights, environmental-side encoding network parameters, species-side encoding network parameters, optimizer state, learning rate scheduler state, training configuration, optimal hyperparameter combination, and validation set evaluation metrics were saved to ensure consistency in subsequent grid species similarity matrix construction, model inference, and experimental reproduction.

[0062] like Figure 3 As shown, in this example, five loss function experiments were set up: InfoNCE, MulSupCon, SD_Loss, SD_Loss_AC, and MultiPos. Batch ablation was performed using different data fusion modes to compare the impact of different training strategies on grid species matching performance. During single-fold training, the optimal checkpoint was finally saved in the 6th training epoch, corresponding to a validation set Recall@20=0.7381, MRR=0.4981, and MAP=0.3023. In the cross-fold ablation experiment comparison, after considering the average performance of each fold, the optimal configuration was the InfoNCE loss function and the full data splicing fusion strategy, with an average Recall@20 of 0.7038. The former reflects the best checkpoint performance in a single training cycle, while the latter reflects the average generalization performance of this model configuration under spatial cross-validation. Based on these results, this configuration was determined as the final cross-modal contrastive learning model configuration in this embodiment and used for subsequent grid species similarity matrix construction.

[0063] ⑧ Construction of the grid species similarity matrix: After completing cross-modal contrastive learning training, the matching relationship between environment embedding and trait embedding is output based on the best trained model.

[0064] Specifically, it includes: Based on the normalized environment embedding matrix Z env ∈R N×d With species trait embedding matrix Z trait ∈R M×d Load the best model checkpoints obtained from training, calculate the environment embedding vector for all candidate grids, calculate the species embedding vector for all candidate species, and construct the grid species similarity matrix by calculating the vector dot product or cosine similarity to form the degree of suitability between a species' trait and the grid's environmental elements: in, This represents the similarity score between the i-th grid and the j-th species; For the environment embedding vector of the i-th grid, Let be the trait embedding vector of the j-th species.

[0065] S104: Convert the grid species similarity matrix into existence probability, perform threshold determination based on the preset optimal existence determination threshold, and obtain the plant species distribution prediction results for each grid.

[0066] Similarity result loading, existence probability score conversion and popularity correction The grid species similarity matrix generated after training is converted into an existence probability p that can be used for threshold determination. i,j The spatial representation is then used, and a popularity correction transformation is performed on this basis to reduce the impact of differences in species baseline occurrence rates on the determination results.

[0067] Specifically, it includes: For each species j, the score vectors corresponding to all grids are read in batches; preferably, the similarity scores are converted into a probability space representation after nonlinear mapping using the Sigmoid function or Platt scaling calibration method; considering that there are significant differences in the baseline occurrence rate of different species in the supervised data, the Favourability transformation based on the probability advantage ratio and the prior advantage ratio is introduced to reduce the impact of species popularity (baseline occurrence rate) on threshold determination, thereby obtaining a comparable threshold space under different baseline rate conditions; The popularity correction formula is as follows: Where: P(i,j) is the occurrence probability obtained by Sigmoid mapping; Prev_j is the prior occurrence rate of the species; F(i,j) is the corrected existence tendency value.

[0068] Threshold search requires correction sample determination Taking into account factors such as differences in survey intensity, environmental similarity constraints, and spatial neighborhood representativeness, a calibration sample set is constructed for threshold search to reduce the risk of missed observations and improve the quality of supervised samples, thereby achieving binary determination of species presence based on similarity.

[0069] Specifically, it includes: The study scope grid set for the calibration phase is determined, with green space grids and grids with existing observation records being preferentially merged. Species richness indices for the actual survey grids are statistically analyzed, and the grids are divided into high-intensity and low-intensity grids based on preset quantile thresholds. Environmental variable matrices within the study scope are extracted, and after standardization and dimensionality reduction, environmental similarity indices for each grid are calculated. A negative sample sampling demand function based on environmental similarity is constructed to reduce the negative sample sampling intensity of grids with high environmental similarity and increase the negative sample sampling intensity of grids with low environmental similarity. The spatial neighborhood set of the actual survey grids is calculated to generate a background candidate grid pool. A positive sample grid set is constructed for each species, and positive samples are excluded from high-intensity, low-intensity, and background candidate grids to form a mutually exclusive negative sample candidate pool. The target number of negative samples is determined based on preset negative sample ratios and minimum negative sample quantity constraints. Weighted sampling without replacement is performed according to stratification weights and environmental sampling demand weights to generate a negative sample set. Positive and negative sample records are merged, and a calibration sample data table is output for subsequent threshold search and stratified cross-validation.

[0070] Multi-strategy threshold search and optimal threshold determination Based on the obtained existence probability matrix P and the matrix F after Favourability correction, a multi-strategy threshold search is performed on each species using the obtained corrected samples to determine the optimal existence determination threshold.

[0071] Specifically, it includes: Extract the probability vector and favourability vector for each species; construct a candidate threshold set, preferably using a unique value set or interval equidistant sampling method to generate the candidate threshold sequence; perform binarization judgment on each candidate threshold, converting continuous probability or favourability values ​​into existence prediction results; under the cross-validation framework, search for candidate thresholds based on training subsets or calibration subsets, and calculate evaluation indicators such as sensitivity, specificity, precision, true skill statistic (TSS), F1 (F1-Score), Cohen's Kappa coefficient (Kappa), and area under the working characteristic curve (AUC) on the corresponding validation subset; maximize TSS as the criterion for determining the preferred threshold, or maximize F1 or maximize Kappa as alternative judgment strategies depending on application requirements.

[0072] In this implementation, to improve the generalization stability of threshold selection and reduce the risk of overfitting caused by sample imbalance and random partitioning, a K-fold stratified cross-validation method is used for each species to ensure that the ratio of positive to negative samples is approximately consistent in each fold. The threshold search process is repeated in each fold training subset, and the mean and standard deviation of each evaluation index are recorded. Finally, the threshold that maximizes the average TSS of cross-validation is selected as the optimal existence threshold for that species. The calculation formula is as follows: Sensitivity and Specificity are calculated based on the validation samples.

[0073] Considering spatial autocorrelation, this embodiment uses the spatial grouping index constructed in step one to perform K-fold spatial cross-validation (e.g., K=5). The average TSS value of the candidate thresholds is calculated in each fold, and the threshold that maximizes the average TSS is selected as the optimal threshold for that species. in, This represents the TSS value obtained by species j when a candidate threshold t is used in the k-th fold validation; This represents the average TSS of the candidate threshold in the K-fold verification.

[0074] Species-level threshold library generation and batch existence determination Based on the optimal threshold selection results, a species-level threshold library is generated in batches, and based on this threshold library, the existence of species and the species composition are determined at the grid scale for the entire study area.

[0075] Specifically, it includes: The threshold results for each species in stratified cross-validation are summarized. The cross-validation mean and standard deviation of the threshold for each strategy are calculated. The final threshold for each species is selected according to a preset optimization rule, with the threshold corresponding to the strategy with the largest TSS cross-validation mean being selected as the final threshold. A species-level threshold library is constructed, recording species identification, final threshold, corresponding evaluation index, and sample size information. The species existence probability matrix of the entire study area grid is loaded. For each grid i and species j, when the species occurrence probability F(i,j) is greater than the final threshold t... j The existence of species can be determined; for each grid, all species determined to exist are aggregated to generate a grid-scale predicted species list; for low-sample species whose species-level thresholds cannot be stably determined, Top-K ranking results are used as supplementary candidate species, rather than as high-confidence binary existence determinations; a grid-level maximum predicted species number constraint parameter is introduced to limit the maximum number of predicted species in a single grid, avoiding overly dense species sets that exceed ecologically reasonable ranges; under the conditions of threshold determination and quantity constraints, the final grid-scale species composition results are output; a result file including grid identifiers, predicted species sets, predicted species numbers, and the source of the determination strategy is generated for subsequent spatial analysis, community construction, and ecological structure assessment.

[0076] like Figure 3 As shown, to verify the effectiveness of the cross-modal contrastive learning model described in this application in predicting plant species distribution, this implementation conducts batch comparative experiments on different loss functions, feature fusion methods, and feature input combinations under the same training data, validation data, and spatial grouping cross-validation conditions. Specifically, focusing on the matching relationship between grid environment representation and plant functional trait representation, five types of loss functions—InfoNCE, MulSupCon, SD_Loss, SD_Loss_AC, and MultiPos—are set up for experiments. Among them, InfoNCE is used to enhance the contrast and distinction ability between positive sample grid species pairs and negative sample grid species pairs; MulSupCon is used to adapt to multi-label supervision scenarios where multiple real-occurring species correspond to the same grid; SD_Loss and SD_Loss_AC are used to constrain the representation distance between similar and different samples; and MultiPos is used to handle the multi-positive sample matching relationship where multiple positive sample species exist in the same grid. At the same time, the grid-species matching ranking performance under different configurations is compared by combining different fusion methods such as feature splicing fusion, cross-attention fusion, self-attention fusion, and gating fusion.

[0077] In the experiment, the performance of grid species matching and ranking was used as the evaluation objective, and Average Recall@20 was preferred as the main evaluation index. This index characterizes the average ability to successfully recall real-world species among the top 20 candidate species output by the model; the higher the value, the stronger the model's ability to identify the suitability relationship between the grid environment and the target plant species. As shown in the figure, there are significant differences in Average Recall@20 under different model configurations. Among them, the model using the InfoNCE loss function, concat feature concatenation and fusion method, and incorporating all feature information achieved the best performance, with an Average Recall@20 of approximately 0.7038, which is higher than other comparison configurations. This result indicates that in the basic plant species distribution prediction task, the InfoNCE loss can effectively shorten the distance between real co-occurring grid species pairs in the shared embedding space and widen the distance between non-co-occurring or low-suitability grid species pairs, thereby improving the model's ability to discriminate plant suitability relationships. Furthermore, the comparison results of different fusion methods show that the full-feature splicing fusion scheme performs better overall, indicating that the unified fusion of remote sensing features, climate features, soil features, and topographic features can more completely express the correspondence between grid environmental conditions and species ecological adaptability. Compared with schemes that do not introduce geographical environmental features, only use partial features, or use a single attention fusion mechanism, the method described in this application can simultaneously utilize multimodal environmental information and plant functional trait information, thereby improving the accuracy of grid species matching and ranking.

[0078] like Figure 4 As shown, to verify the predictive ability of the proposed method for basic distribution under different plant types, this implementation selected 30 representative plant species from urban green spaces and surrounding natural habitats in a certain city as evaluation objects, and used the true skill statistic (TSS), F1 score, and Kappa coefficient to quantitatively evaluate the prediction results. The species include common ornamental plants and landscape plants in urban greening, as well as native, cultivated, and escaped plants with certain observational records or ecological indication significance within the study area.

[0079] The results show that the proposed method achieved relatively stable predictive performance for most species. Specifically, the F1 scores for species such as cedar, pecan, wild cabbage, holly, firethorn, and juniper all exceeded 0.82, indicating that the model can effectively balance precision and recall. The TSS for cedar reached 0.8213 and the Kappa reached 0.7725, while the TSS for holly, firethorn, and juniper were close to or exceeded 0.78, and the Kappa exceeded 0.73, indicating that the model has good discriminative ability and predictive consistency in distinguishing between the presence and absence of species. For widely cultivated or niche-rich species such as osmanthus, mimosa, wild chrysanthemum, and hollyhock, their TSS and Kappa were relatively low, but the F1 scores remained above 0.68, indicating that the model still has a certain ability to identify samples containing these species.

[0080] Overall, this application improves the discriminative ability and threshold determination stability of species distribution prediction by integrating multi-source environmental information, remote sensing features and semantic embedding of plant functional traits, and by using cross-modal contrastive learning to enhance the matching relationship between grid environment and target species. It also shows good predictive applicability for different life forms such as trees, shrubs, herbs and ground cover plants, and can provide a reliable model basis for spatial distribution mapping of plant species in the study area, inference of species composition at the grid scale and subsequent ecological structure analysis.

[0081] Example 2: To achieve the above objective, such as Figure 2 As shown, based on Embodiment 1, this invention discloses a plant species distribution prediction system based on multimodal contrastive learning, comprising: Data acquisition module 11 is used to acquire multimodal environmental data and plant functional trait data. The multimodal environmental data includes remote sensing image data and multidimensional environmental variable data, and the plant functional trait data is generated based on plant functional trait theory. Data encoding module 12 is used to encode visual features and environmental features of multimodal environmental data to obtain encoded visual features and environmental features. The encoded visual features and environmental features are then fused with deep features to obtain an environmental embedding matrix. Embedding vector encoding is performed on plant functional trait data to obtain a species trait embedding matrix. Data processing module 13 is used to input the environment embedding matrix and species trait embedding matrix into a pre-trained cross-modal contrastive learning model and output a grid species similarity matrix, wherein the grid species similarity matrix represents the degree of suitability of the environment and species in each grid. The prediction output module 14 is used to perform threshold determination on the grid species similarity matrix based on a preset optimal existence determination threshold, and obtain the plant species distribution prediction result for each grid.

[0082] Based on the same inventive concept, this invention also provides a computer device, comprising: one or more processors, and a memory for storing one or more computer programs; the programs include program instructions, and the processor executes the program instructions stored in the memory. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, used to implement one or more instructions, specifically for loading and executing one or more instructions stored in a computer storage medium to implement the above-described method.

[0083] It should be further explained that, based on the same inventive concept, the present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, performs the above-described method. This storage medium can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0084] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0085] The foregoing has shown and described the basic principles, main features, and advantages of this disclosure. Those skilled in the art should understand that this disclosure is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of this disclosure. Various changes and modifications can be made to this disclosure without departing from its spirit and scope, and all such changes and modifications fall within the scope of this disclosure as claimed.

Claims

1. A method for predicting plant species distribution based on multimodal contrastive learning, characterized in that, The method includes the following steps: Acquire multimodal environmental data and plant functional trait data, wherein the multimodal environmental data includes remote sensing image data and multidimensional environmental variable data, and the plant functional trait data is generated based on plant functional trait theory; Visual feature encoding and environmental feature encoding are performed on multimodal environmental data to obtain encoded visual features and environmental features. Deep feature fusion is then performed on the encoded visual features and environmental features to obtain an environmental embedding matrix. Embedding vector encoding is performed on plant functional trait data to obtain a species trait embedding matrix. The environmental embedding matrix and the species trait embedding matrix are input into a pre-trained cross-modal contrastive learning model, and the output is a grid species similarity matrix, which represents the degree of suitability of the environment and species in each grid. The similarity matrix of the grid species is thresholded based on a preset optimal existence threshold to obtain the predicted distribution of plant species for each grid.

2. The plant species distribution prediction method based on multimodal contrastive learning according to claim 1, characterized in that, The cross-modal contrastive learning model optimizes the alignment of the environment embedding matrix and the species trait embedding matrix in a unified vector space through cross-modal contrastive learning. The training of the cross-modal contrastive learning model uses a multivariate contrastive loss function to promote the increase of positive sample similarity and the decrease of negative sample similarity. The positive samples are grid and species combinations with real co-occurrence relationships, and the negative samples are grid and species combinations without co-occurrence relationships.

3. The plant species distribution prediction method based on multimodal contrastive learning according to claim 2, characterized in that, The environmental embedding matrix and species trait embedding matrix are embedded and mapped to the same dimension through a multilayer perceptron and residual block structure. The environmental embedding matrix and species trait embedding matrix after being mapped to the same dimension are then L2 normalized to obtain the normalized environmental embedding matrix and species trait embedding matrix.

4. The plant species distribution prediction method based on multimodal contrastive learning according to claim 3, characterized in that, The calculation of the grid species similarity matrix is ​​as follows: Based on the normalized environment embedding matrix and species trait embedding matrix, the environment embedding vector of the grid is calculated for all candidate grids, and the species trait embedding vector of the species is calculated for all candidate species. The grid species similarity matrix is ​​then constructed by calculating the vector dot product or cosine similarity. in, This represents the similarity score between the i-th grid and the j-th species. For the environment embedding vector of the i-th grid, Let j be the trait embedding vector of the j-th species. This represents the L2 norm of the mesh embedding vector, i.e., the vector magnitude.

5. The plant species distribution prediction method based on multimodal contrastive learning according to claim 1, characterized in that, The visual feature encoding and environmental feature encoding of multimodal environmental data include: The remote sensing image data is processed by encoding visual features using the SwinTransformer deep feature extraction model based on the visual Transformer architecture to obtain encoded visual features. For each sub-modality of the multidimensional environmental variable data, a sub-encoder with a multi-layer fully connected neural network structure is constructed. Each sub-modality variable is mapped to a fixed-dimensional sub-embedding vector to obtain the encoded environmental features. Fusion methods that perform deep feature fusion of encoded visual features and environmental features include one or more of the following: splicing fusion, attention-weighted fusion, modal-gated fusion, and conditional modulation fusion.

6. The plant species distribution prediction method based on multimodal contrastive learning according to claim 1, characterized in that, The calculation process for the preset optimal existence determination threshold is as follows: Using a pre-defined grid species existence matrix as a supervisory label, and after filtering and weighting the grid species existence matrix, a correction sample is generated. The grid species similarity matrix is ​​converted into an existence probability matrix. Based on the existence probability matrix and the correction sample, a multi-strategy threshold search is performed on each species to obtain the optimal existence determination threshold.

7. The plant species distribution prediction method based on multimodal contrastive learning according to claim 6, characterized in that, The process of generating the calibration sample is as follows: The study scope grid set for the calibration phase is determined, the green space grid is combined with the grids with observation records, the species richness index of the actual survey grids is statistically analyzed, and the grids are divided into high survey intensity grids and low survey intensity grids according to the preset quantile threshold. After extracting the environmental variable matrix and performing standardization and dimensionality reduction, the environmental similarity index of each grid is calculated. A negative sample sampling demand function based on environmental similarity is constructed, and the spatial neighborhood set of the actual survey grid is calculated to generate a background candidate grid pool. For each species, a positive sample grid set is constructed, and positive samples are excluded from the high-intensity grid, low-intensity grid and background candidate grid to form a mutually exclusive negative sample candidate pool; the target number of negative samples is determined according to the preset negative sample ratio and minimum negative sample number constraints; weighted sampling without replacement is performed according to the stratification weight and environmental sampling requirement weight to generate a negative sample set; the positive sample grid set and the negative sample set are merged to output the corrected sample.

8. The plant species distribution prediction method based on multimodal contrastive learning according to claim 7, characterized in that, In the grid species existence matrix, rows represent grids and columns represent target species. An element value of 1 indicates that the grid contains a corresponding species, and a value of 0 indicates that the grid does not contain a corresponding species.

9. A plant species distribution prediction system based on multimodal contrastive learning, employing the plant species distribution prediction method based on multimodal contrastive learning as described in any one of claims 1 to 8, characterized in that, include: The data acquisition module is used to acquire multimodal environmental data and plant functional trait data. The multimodal environmental data includes remote sensing image data and multidimensional environmental variable data, and the plant functional trait data is generated based on plant functional trait theory. The data encoding module is used to encode visual features and environmental features of multimodal environmental data to obtain encoded visual features and environmental features. The encoded visual features and environmental features are then fused with deep features to obtain an environmental embedding matrix. The module also performs embedding vector encoding on plant functional trait data to obtain a species trait embedding matrix. The data processing module is used to input the environment embedding matrix and the species trait embedding matrix into a pre-trained cross-modal contrastive learning model and output a grid species similarity matrix, which represents the degree of suitability of the environment and species in each grid. The prediction output module is used to perform threshold determination on the grid species similarity matrix based on a preset optimal existence determination threshold, and obtain the plant species distribution prediction results for each grid.

10. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, The memory stores a computer program that can run on a processor. When the processor loads and executes the computer program, it employs a plant species distribution prediction method based on multimodal contrastive learning as described in any one of claims 1 to 8.