Remote sensing image feature extraction and classification method based on contrast learning method

By using a feature representation spatial imbalance assessment and control mechanism, the problem of class imbalance in remote sensing images is solved, achieving stable alignment of features of small class samples and model rebalancing, thereby improving classification accuracy and robustness.

CN121121482BActive Publication Date: 2026-03-31HUNAN CHUANGXIN WEILI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-11
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In remote sensing image feature extraction and classification, the imbalance of feature space caused by the imbalance of sample class distribution, especially the dilution of features and blurring of boundaries of small class samples, causes the model to lose stability and universality in class discrimination.

Method used

By introducing a feature representation space imbalance assessment and control mechanism, multi-scale, geometric, radial and cross-modal consistency enhancement is adopted. Combined with similarity measurement, neighborhood topology analysis and temporal statistics, a rebalanced batch generator is generated to perform closed-loop update of embedding stream and classifier head training to calibrate the classifier.

Benefits of technology

It effectively alleviates the problems of extreme class imbalance and hard negative sample contamination, improves the discriminative power and boundary clarity of minor class features, maintains classification accuracy and generalization performance, and has online adaptive adjustment and long-term stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121121482B_ABST
    Figure CN121121482B_ABST
Patent Text Reader

Abstract

The application discloses a remote sensing image feature extraction and classification method based on a contrast learning method, and particularly relates to the technical field of remote sensing image feature extraction and classification. Through multi-level similarity measurement, neighborhood topology analysis and time series statistics on embedded flow, the method can capture class frequency deviation and cross-class confusion intensity in real time, thereby constructing a fine class imbalance and hard negative sample pollution representation, so that the model has dynamic perception ability for potential imbalance risk. Training control instructions generated based on the feature representation space imbalance evaluation index directly act on the sampling quota, contrast temperature / margin, negative sample screening and memory queue management, thereby remodeling the composition and gradient contribution of positive and negative sample pairs from the source, enabling small class samples to obtain stable and sufficient feature alignment opportunities, while avoiding being excessively diluted by false constraints. In the process of closed-loop updating of embedded flow and classification head, the dynamic rebalancing of the feature space is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of remote sensing image feature extraction and classification technology, and more specifically, to a remote sensing image feature extraction and classification method based on contrastive learning. Background Technology

[0002] In contrastive learning-based remote sensing image feature extraction and classification methods, models typically rely on a large number of positive and negative sample pairs to drive the discriminative construction of the feature space. However, in remote sensing scenarios, the distribution of sample categories is often extremely imbalanced, with the number of large-category samples (such as water bodies and farmland) far exceeding that of small-category samples (such as roads and facilities). This imbalance directly leads to a bias in the negative sample sampling process, causing the model to more frequently extract samples from large categories as negative examples during training. At the same time, the bias amplified by the imbalance significantly increases the proportion of "hard negative samples," that is, samples that are highly similar to the target category in spectral or spatial structure but have different labels are frequently added to the contrastive loss as negative examples. In this case, the negative sample constraint, which should help distinguish between classes, instead excessively widens the feature distance between small categories and similar categories, causing the features of small categories to be gradually diluted and their boundaries blurred. As training iterations accumulate, this effect, caused by imbalance and further amplified by hard negative sample contamination, exhibits positive feedback, ultimately leading to an overall imbalance in the feature representation space. That is, features of small class samples are submerged, and dominant features of large classes are over-aggregated, causing the model to lose stability and universality in class discrimination. Summary of the Invention

[0003] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a remote sensing image feature extraction and classification method based on contrastive learning, in order to solve the problems mentioned in the background art.

[0004] To achieve the above objectives, the present invention provides the following technical solution:

[0005] The remote sensing image feature extraction and classification method based on contrastive learning includes the following steps:

[0006] Spatiotemporal alignment and spectral normalization are performed on the original remote sensing images to generate a standardized dataset;

[0007] The standardized dataset is hierarchically partitioned and multi-scale, geometric, radiative, and cross-modal consistency enhancements are applied to generate enhanced sample convection.

[0008] The process of enhancing sample-to-stream input representation extraction and contrastive projection is combined with maintaining a memory queue to generate an embedding stream.

[0009] The embedded stream is subjected to similarity measurement, nearest neighbor topology construction, and batch / global statistical aggregation to generate a statistical volume;

[0010] The statistical data is summed by class frequency and time-series smoothing, and combined with neighborhood similarity discrimination to generate class imbalance information and hard negative sample contamination information.

[0011] By fusing class imbalance information with hard negative sample contamination information, a feature representation space imbalance assessment model is constructed, generating a feature representation space imbalance assessment index and training control instructions.

[0012] The training control instructions are applied to the sampling quota, contrast temperature / margin, negative sample screening, and memory queue quota to generate a rebalanced batch generator. The batches generated by the rebalanced batch generator are used to update the embedding stream in a closed loop, and to train and calibrate the classifier head to generate a deployment-ready calibrated classifier and adaptive inference stream.

[0013] In a preferred embodiment, the enhanced sample-to-stream input representation extraction and contrastive projection process is combined with the maintenance of a memory queue to generate an embedding stream, as follows:

[0014] Receive enhanced sample convection and group it by modality, temporal phase and ground object candidate to generate batch convection;

[0015] The batch convection is registered pixel-level and geometrically according to modality and temporal phase to generate aligned batches;

[0016] Perform spectral domain consistency correction and local contrast normalization on the aligned batches, and output the preprocessed tensors;

[0017] The preprocessed tensor is applied with geometrically perceptual filtering and multi-scale context pooling to generate structured feature maps;

[0018] The structured feature map is fed into a multi-scale hybrid encoder and cross-modal interactive attention operation is performed to generate the original embedding representation;

[0019] The original embedding representation is mapped to the contrast representation space via a lightweight projection head and then normalized to generate the projected embedding.

[0020] The projection embedding is written to the sharded memory queue and the queue management is triggered: quota constraints, representativeness replacement, temporal decay and sample backtracking verification are performed to generate an updated memory queue and candidate negative sample pool;

[0021] The candidate negative sample pool is merged with the projected embedding of the current batch, and the intra-batch and cross-batch similarity distributions are calculated to generate a similarity statistics table.

[0022] The similarity statistics table is used to identify high similarity pairs, perform neighborhood consistency tests and confidence scores, and label suspicious high similarity pairs as hard negative, semi-difficult or suspected contamination, generating a set of labeled embeddings.

[0023] Split the labeled set of embeddings into streams based on confidence level and output them as embedding streams.

[0024] In a preferred embodiment, the calculation of intra-batch and cross-batch similarity distributions specifically includes the following steps:

[0025] Let the projected embedding vectors of the current batch be denoted as set Q, and the projected embedding vectors in the candidate negative sample pool be denoted as set K;

[0026] For each query vector q∈Q, the dot product similarity is calculated with other vectors in set Q in turn to obtain the intra-batch similarity distribution;

[0027] At the same time, for each query vector q∈Q, the dot product similarity is calculated with all vectors in set K to obtain the cross-batch similarity distribution;

[0028] The intra-batch similarity distribution and cross-batch similarity distribution are normalized by probability to obtain the final similarity distribution result.

[0029] In a preferred embodiment, the embedded stream is batch-normalized and noise-suppressed to generate a normalized embedded stream;

[0030] The normalized embedding stream is used to calculate the sample similarity matrix within each training batch, generating the batch similarity matrix;

[0031] The batch similarity matrix is ​​sparsified and pseudo-similarity is suppressed by applying a preset similarity distribution threshold to generate a sparse similarity map.

[0032] The sparse similarity graph is used to construct symmetric nearest neighbor connections by applying the adaptive k-nearest neighbor criterion, thereby generating a nearest neighbor topology.

[0033] Perform multi-scale connectivity and local density analysis on the neighboring topology to identify core nodes, edge nodes and isolated noise points, and generate local cluster indexes and node attribute annotations.

[0034] The local cluster index and node attribute annotations are used to calculate the prototype vector and intra-cluster statistics for each cluster, generating a set of cluster prototypes and cluster statistics.

[0035] The cluster prototype sets are matched across batches and prototype association and trajectory tracking are performed along the time axis to generate cross-batch prototype trajectories and class center drift metrics.

[0036] The cross-batch prototype trajectory, class center drift metric, nearest neighbor confusion intensity, neighborhood density, and subclass crowding are aggregated to generate batch-level and global-level statistics.

[0037] In a preferred embodiment, the batch similarity matrix is ​​sparsified and pseudo-similarity is suppressed by a preset similarity distribution threshold to generate a sparse similarity map, as follows:

[0038] The batch similarity matrix is ​​scanned locally to extract the similarity distribution of each sample among its neighboring samples, and a local similarity curve is generated.

[0039] The local similarity curve is fitted to a multimodal distribution and the difference between the background noise peak and the main peak is estimated to generate a background noise threshold.

[0040] The background noise threshold and the adaptive quantile threshold of the global similarity histogram are weighted and fused to generate a hybrid threshold function;

[0041] Applying a hybrid threshold function to the batch similarity matrix eliminates low-confidence edges and preserves significant similarity relationships, generating a preliminary sparse matrix.

[0042] The initial sparse matrix is ​​subjected to pseudo-similarity detection to identify abnormally high similarity edges caused by appearance noise, lighting disturbance or spatial redundancy, and a pseudo-similarity candidate set is generated.

[0043] The pseudo-similarity candidate set is jointly judged with neighborhood consistency, geographical proximity and cross-modal consistency to eliminate false high similarity edges and generate a pseudo-similarity suppression matrix;

[0044] The pseudo-similarity suppression matrix is ​​combined with the initial sparse matrix to form the final sparse similarity map.

[0045] In a preferred embodiment, the statistical data is summed by class frequency and smoothed over time, and combined with neighborhood similarity discrimination to generate class imbalance information and hard negative sample contamination information, as follows:

[0046] For each cluster in the statistical body, calculate the number of samples, the average similarity within the cluster, and the divergence within the class to generate basic cluster-level indicators;

[0047] Cluster-level basic indicators are exponentially smoothed and aggregated along the time series using sliding window methods to generate a time-stationary frequency-like distribution.

[0048] The time-stable class frequency distribution is compared with the global sample proportion to calculate the class imbalance measure, including the deviation of the subclass proportion, distribution entropy and inter-class density ratio, which are used as the measure of class imbalance information.

[0049] Cross-analysis is performed on the similarity matrix between samples within a cluster and neighboring clusters to identify highly similar cross-class sample pairs and anomalous edge samples, resulting in a candidate list of hard negative samples.

[0050] The hard negative sample contamination coefficient is obtained by weighted fusion of the hard negative sample candidate list with cluster prototype drift, neighborhood density and inter-class confusion intensity, and is used as a measure of hard negative sample contamination information.

[0051] In a preferred embodiment, class imbalance information and hard negative sample contamination information are fused to construct a feature representation space imbalance assessment model, generating a feature representation space imbalance assessment index and training control instructions, as follows:

[0052] The various metrics in the class imbalance information and hard negative sample contamination information are dedimensionalized to generate a dimensionless index vector.

[0053] By combining the dimensionless index vector with the corresponding weight coefficients, an evaluation index for the imbalance of the feature representation space is generated: ,in As a feature characterizing spatial imbalance assessment index, For class imbalance information and hard negative sample contamination information, the first Dimensionless value of a metric. These are the weighting coefficients for the corresponding metrics, and Greater than 0, ;

[0054] The feature representation space imbalance evaluation index is analyzed into training regulation primitives to generate a set of control primitives;

[0055] The set of control primitives is jointly pruned along with computational constraints, latency budgets, and stability boundaries to generate executable training control instructions.

[0056] The technical effects and advantages of this invention are as follows:

[0057] 1. This invention, by introducing a feature representation space imbalance assessment and control mechanism within a contrastive learning framework, effectively alleviates the widespread problem of extreme class imbalance and the resulting hard negative sample contamination in remote sensing images. On one hand, by performing multi-level similarity measurement, neighborhood topology analysis, and temporal statistics on the embedding stream, it can capture class frequency deviation and cross-class confusion intensity in real time, thereby constructing a refined representation of class imbalance and hard negative sample contamination, enabling the model to dynamically perceive potential imbalance risks. On the other hand, the training control instructions generated based on the feature representation space imbalance assessment index directly affect sampling quotas, contrast temperature / margin, negative sample screening, and memory queue management, fundamentally reshaping the composition and gradient contribution of positive and negative sample pairs. This allows small class samples to obtain stable and sufficient feature alignment opportunities while avoiding excessive dilution due to erroneous constraints. Dynamic rebalancing of the feature space is achieved during the closed-loop update of the embedding stream and classification head, significantly improving the discriminative power and boundary clarity of small class features, suppressing excessive aggregation of large class features, and ensuring the interpretability and robustness of prediction probabilities through a calibration mechanism. It not only maintains higher classification accuracy and generalization performance in remote sensing scenarios with extremely unbalanced and complex backgrounds, but also has the ability to adapt and adjust online and evolve stably over a long period of time, providing a more reliable and efficient solution for the intelligent analysis and application deployment of remote sensing images. Attached Figure Description

[0058] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings;

[0059] Figure 1 This is a flowchart of a method according to an embodiment of the present invention. Detailed Implementation

[0060] 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.

[0061] Example: Figure 1 The present invention provides a remote sensing image feature extraction and classification method based on contrastive learning, comprising the following steps:

[0062] Spatiotemporal alignment and spectral normalization are performed on the original remote sensing images to generate a standardized dataset;

[0063] The standardized dataset is hierarchically partitioned and multi-scale, geometric, radiative, and cross-modal consistency enhancements are applied to generate enhanced sample convection.

[0064] The process of enhancing sample-to-stream input representation extraction and contrastive projection is combined with maintaining a memory queue to generate an embedding stream.

[0065] The embedded stream is subjected to similarity measurement, nearest neighbor topology construction, and batch / global statistical aggregation to generate a statistical volume;

[0066] The statistical data is summed by class frequency and time-series smoothing, and combined with neighborhood similarity discrimination to generate class imbalance information and hard negative sample contamination information.

[0067] By fusing class imbalance information with hard negative sample contamination information, a feature representation space imbalance assessment model is constructed, generating a feature representation space imbalance assessment index and training control instructions.

[0068] The training control instructions are applied to the sampling quota, contrast temperature / margin, negative sample screening, and memory queue quota to generate a rebalanced batch generator. The batches generated by the rebalanced batch generator are used to update the embedding stream in a closed loop, and to train and calibrate the classifier head to generate a deployment-ready calibrated classifier and adaptive inference stream.

[0069] Spatiotemporal alignment and spectral normalization are performed on the original remote sensing images to generate a standardized dataset, as detailed below:

[0070] Read and parse the original image and metadata to generate the original image and complete observation metadata;

[0071] Sensor calibration and radiometric transformation (including DN→brightness / TOA→BOA or preliminary estimation of surface reflectance based on the radiative transfer model) are performed on the original image and complete observation metadata to generate a radiometrically annotated image.

[0072] Atmospheric correction and spectral response calibration are performed on the radiometrically annotated images (using physical radiative transfer or pseudo-invariant feature constraint methods) to generate ground reflectance images;

[0073] Geometric registration and orthorectification are performed on ground reflectance images, elevation data, and sensor RPC / control points to generate geo-registered images;

[0074] The geo-registered images are finely matched with corresponding points and registered at the sub-pixel level according to multiple sensors / multi-temporal phases to generate a common reference raster group.

[0075] The common reference grid group will perform cloud and aerosol masking and detection (combining spectral threshold, temporal consistency and learned detection algorithms) to generate a masked set of available pixels and a missing mask;

[0076] The masked set of available pixels is subjected to noise suppression and artifact repair (including stripe removal, speckle / speckle filtering, and multi-scale learning interpolation filling) to generate a continuous and spectrally consistent image sequence.

[0077] Continuous and spectrally consistent image sequences are subjected to cross-sensor spectral response function matching and spectral band resampling (combining pseudo-invariant targets and spectral deconvolution / regression correction) to generate a spectral band consistent image set and an inter-spectral adjustment coefficient table.

[0078] The spectral-uniformed image set is subjected to local and global brightness normalization (combining PIF-driven local histogram matching and spatial illumination regularization) to generate brightness-spectral normalized images and normalized metadata.

[0079] The brightness-spectral normalized image is resampled, pyramided, and sliced ​​according to the target training resolution, and a spatial index and multi-scale slice set are generated.

[0080] The multi-scale slice set is calculated and quality assessment metrics (including cloud coverage, effective pixel ratio, SNR, and registration residual) are added to generate a slice set with quality labels and a quality report.

[0081] The quality-labeled slice set and quality report are formatted and indexed to generate a standardized dataset that can be directly used for subsequent augmentation, sampling and representation learning.

[0082] The standardized dataset is hierarchically partitioned and enhanced with multi-scale, geometric, radial, and cross-modal consistency measures to generate enhanced sample convection, as detailed below:

[0083] Read the standardized dataset and define a hierarchical strategy based on region, time, sensor, label sparsity and expected task accuracy to generate a hierarchical index list;

[0084] The stratified index list is used as a sampling criterion to perform stratified extraction on the standardized dataset, generating stratified subsets that cover the feature distribution of each level.

[0085] The hierarchical subsets are resampled at multiple scales according to the target training resolution and an image pyramid is constructed (including sub-pixel resampling and point spread function correction) to generate a multi-scale image pyramid.

[0086] Apply structure-preserving geometric transformations (such as affine transformation, random rotation, local elastic deformation, and subpixel translation) to the multi-scale image pyramid to generate a geometrically enhanced sample set.

[0087] Apply physically sensed radiative perturbations (such as solar zenith angle simulation, sensor gain and noise simulation, spectral response perturbation and spectral band drift simulation) to the geometrically enhanced sample set to generate a radiative perturbation sample set.

[0088] The radiation perturbation sample group is subjected to texture and noise processing (including speckle / strip simulation and denoising-restoration process, local contrast fidelity and multi-scale filtering) to generate a perturbation sample group with consistent spectrum and texture.

[0089] Perturbation sample groups with consistent spectrum and texture are mapped and registered across sensors based on sensor spectral response mapping tables or trained mode conversion functions to form cross-modal consistent sample pairs.

[0090] By combining cross-modal consistent sample pairs with samples from different times in the same region and changing masks for temporal consistency pairing, cross-modal-temporal stable sample pairs are generated.

[0091] Semantic fidelity verification is performed on cross-modal-temporal stable sample pairs (based on pre-trained feature distance, uncertainty threshold and geometric consistency test), high confidence / low confidence samples are screened and labeled, and high confidence enhanced sample confluence and low confidence candidate set are generated;

[0092] The high-confidence augmented sample confluence is compared with the historical embedding or memory queue to identify and label potential pseudo-positive samples and hard negative sample candidates, and to generate an augmented sample pair pool and a list of contamination candidates.

[0093] The augmented sample pool is configured with sampling strategies based on class frequency, modality proportion and time window weight (including oversampling of minor classes, quota restrictions on major classes, and semi-hard sampling strategy for negative samples) to generate augmented sample confluences for training.

[0094] The training augmented sample convection is appended with item-by-item quality metadata (registration confidence, spectral consistency score, temporal stability score, pseudo-positive / contamination label), and the augmented sample convection and its statistical reports are output for subsequent feature learning, imbalance assessment and scheduling.

[0095] The process of enhancing sample-to-stream input representation extraction and contrastive projection, and maintaining a memory queue, will generate an embedding stream, as detailed below:

[0096] Receive enhanced sample convection and group it by modality, temporal phase and ground object candidate to generate batch convection;

[0097] The batch convection is registered pixel-level and geometrically according to modality and temporal phase to generate aligned batches;

[0098] Perform spectral domain consistency correction and local contrast normalization on the aligned batches, and output the preprocessed tensors;

[0099] The preprocessed tensor is applied with geometrically perceptual filtering and multi-scale context pooling to generate structured feature maps;

[0100] The structured feature map is fed into a multi-scale hybrid encoder (a mixture of convolution and self-attention) and cross-modal interactive attention operations are performed to generate the original embedding representation;

[0101] The original embedding representation is mapped to the contrast representation space via a lightweight projection head and then normalized to generate the projected embedding.

[0102] The projection embedding is written to the sharded memory queue and the queue management is triggered: quota constraints, representativeness replacement, temporal decay and sample backtracking verification are performed to generate an updated memory queue and candidate negative sample pool;

[0103] The candidate negative sample pool is merged with the projected embedding of the current batch, and the intra-batch and cross-batch similarity distributions are calculated to generate a similarity statistics table.

[0104] The specific steps for calculating the intra-batch and cross-batch similarity distributions are as follows:

[0105] Let the projected embedding vectors of the current batch be denoted as set Q, and the projected embedding vectors in the candidate negative sample pool be denoted as set K;

[0106] For each query vector q∈Q, the dot product similarity is calculated with other vectors in set Q (excluding query vector q) to obtain the intra-batch similarity distribution;

[0107] At the same time, for each query vector q∈Q, the dot product similarity is calculated with all vectors in set K to obtain the cross-batch similarity distribution;

[0108] The intra-batch similarity distribution and cross-batch similarity distribution are normalized by probability (e.g., softmax) to obtain the final similarity distribution result, which is used for subsequent positive-negative contrast constraints and hard negative sample identification.

[0109] The similarity statistics table is used to identify high similarity pairs, perform neighborhood consistency tests and confidence scores, and label suspicious high similarity pairs as hard negative, semi-difficult or suspected contamination, generating a set of labeled embeddings.

[0110] The labeled embedding set is split into streams based on confidence level and output as an embedding stream for subsequent statistical aggregation and imbalance assessment.

[0111] The embedded stream is subjected to similarity measurement, nearest neighbor topology construction, and batch / global statistical aggregation to generate a statistical volume;

[0112] The embedded stream is batch-normalized and noise-suppressed to generate a normalized embedded stream;

[0113] The normalized embedding stream is used to compute the sample similarity matrix (based on dot product similarity) within each training batch, generating the batch similarity matrix;

[0114] The batch similarity matrix is ​​sparsified and pseudo-similarity is suppressed by applying a preset similarity distribution threshold to generate a sparse similarity map, as follows:

[0115] The batch similarity matrix is ​​scanned locally to extract the similarity distribution of each sample among its neighboring samples, and a local similarity curve is generated.

[0116] The local similarity curve is fitted to a multimodal distribution and the difference between the background noise peak and the main peak is estimated to generate a background noise threshold.

[0117] The background noise threshold and the adaptive quantile threshold of the global similarity histogram are weighted and fused to generate a hybrid threshold function;

[0118] Applying a hybrid threshold function to the batch similarity matrix eliminates low-confidence edges and preserves significant similarity relationships, generating a preliminary sparse matrix.

[0119] The initial sparse matrix is ​​subjected to pseudo-similarity detection to identify abnormally high similarity edges caused by appearance noise, lighting disturbance or spatial redundancy, and a pseudo-similarity candidate set is generated.

[0120] The pseudo-similarity candidate set is jointly judged with neighborhood consistency, geographical proximity and cross-modal consistency to eliminate false high similarity edges and generate a pseudo-similarity suppression matrix;

[0121] The pseudo-similarity suppression matrix is ​​combined with the preliminary sparse matrix to form the final sparse similarity map;

[0122] The sparse similarity graph is used to construct symmetric nearest neighbor connections by applying the adaptive k-nearest neighbor criterion, thereby generating a nearest neighbor topology.

[0123] Perform multi-scale connectivity and local density analysis on the neighboring topology to identify core nodes, edge nodes and isolated noise points, and generate local cluster indexes and node attribute annotations.

[0124] The local cluster index and node attribute annotations are used to calculate the prototype vector and intra-cluster statistics (sample count, intra-cluster average similarity, intrinsic divergence, etc.) for each cluster, generating a set of cluster prototypes and cluster statistics;

[0125] The cluster prototype sets are matched across batches and prototype association and trajectory tracking are performed along the time axis to generate cross-batch prototype trajectories and class center drift metrics.

[0126] The class center drift metric is obtained by normalized weighted fusion of average displacement, instantaneous velocity, and directional offset;

[0127] The cross-batch prototype trajectory, class center drift metric, and nearest neighbor confusion intensity, neighborhood density, and subclass crowding are aggregated to generate batch-level and global-level statistics.

[0128] The logic for obtaining the strength of the nearest neighbor confusion pair is as follows:

[0129] For each sample, its k nearest neighbors in the embedding space can be identified by the adaptive k-nearest neighbor criterion. It is determined whether each neighbor belongs to a different category from the sample. If it does, it is considered a confusion pair. The nearest neighbor confusion strength of the sample can be obtained by averaging the similarity values ​​of the sample with all the confusion neighbors.

[0130] The logic for obtaining the neighborhood density is as follows:

[0131] For each sample, the average similarity among its k neighbors is calculated as the neighborhood density of the local embedding space;

[0132] The logic for obtaining the crowding level of the subclass is as follows:

[0133] For each subclass sample, calculate the percentage of its k neighbors that belong to the major class; average the percentages of all subclass samples to obtain the subclass crowding degree.

[0134] The statistical data is summarized by class frequency and smoothed over time, and combined with neighborhood similarity discrimination to generate class imbalance information and hard negative sample contamination information, as detailed below:

[0135] For each cluster in the statistical body, calculate the number of samples, the average similarity within the cluster, and the divergence within the class to generate basic cluster-level indicators;

[0136] Cluster-level basic indicators are exponentially smoothed and aggregated along the time series using sliding window methods to generate a time-stationary frequency-like distribution.

[0137] The time-stable class frequency distribution is compared with the global sample proportion to calculate the class imbalance measure, including the deviation of the subclass proportion, distribution entropy and inter-class density ratio, which are used as the measure of class imbalance information.

[0138] Cross-analysis is performed on the similarity matrix between samples within a cluster and neighboring clusters to identify highly similar cross-class sample pairs and anomalous edge samples, resulting in a candidate list of hard negative samples.

[0139] The hard negative sample contamination coefficient is obtained by weighted fusion of the candidate list of hard negative samples with cluster prototype drift, neighborhood density, and inter-class confusion intensity. This coefficient is used as a measure of hard negative sample contamination information. The specific steps are as follows:

[0140] The hard negative sample candidate list is compared with the corresponding cluster prototype, and the drift magnitude of each candidate sample relative to the cluster center is calculated.

[0141] The sample drift index is correlated with the local density of candidate samples in the neighborhood to generate a drift-density composite index, which is used to evaluate the representativeness and anomaly of the sample in the local distribution.

[0142] Cross-analysis is performed between the drift-density composite index and the similarity distribution of candidate samples across class neighborhoods to calculate the inter-class confusion intensity (which can be obtained using the nearest neighbor confusion pair intensity method), which is used to measure the risk of classification confusion that a sample may cause.

[0143] By weighting and integrating sample drift, neighborhood density and inter-class confusion intensity, a comprehensive and reliable hard negative sample contamination coefficient is generated, which reflects the potential impact of each candidate sample as a hard negative sample.

[0144] A feature representation space imbalance assessment model is constructed by fusing class imbalance information with hard negative sample contamination information, generating a feature representation space imbalance assessment index and training control instructions, as detailed below:

[0145] The various metrics in the class imbalance information and hard negative sample contamination information are dedimensionalized to generate a dimensionless index vector (common methods include Min-Max normalization and Z-Score standardization, which are selected according to the actual situation and will not be elaborated here).

[0146] By combining the dimensionless index vector with the corresponding weight coefficients, an evaluation index for the imbalance of the feature representation space is generated: ,in As a feature characterizing spatial imbalance assessment index, For class imbalance information and hard negative sample contamination information, the first Dimensionless value of a metric. These are the weighting coefficients for the corresponding metrics, and Greater than 0, ;

[0147] It should be noted that, The settings can be adjusted according to the actual situation. For example, the expert weighting method can be adopted, which involves inviting experts in relevant fields to determine the weight coefficients of each indicator through professional opinion surveys and comprehensive evaluations.

[0148] The feature representation space imbalance evaluation index is parsed into training regulation primitives, generating a set of control primitives (including sampling quota target, contrast temperature and margin interval, negative sample screening intensity, memory queue quota upper limit, prototype alignment weight and pseudo-label confidence threshold), as follows:

[0149] The feature representation spatial imbalance assessment index is divided into intervals and mapped to generate risk level labels (e.g., low / medium / high imbalance risk), and segment thresholds are set to ensure the interpretability and controllability of the mapping.

[0150] Align risk level labels with historical training performance and target performance metrics to generate a risk-performance correspondence table (e.g., high imbalance risk usually corresponds to a decrease in subclass recall and an increase in boundary confusion rate).

[0151] Apply the risk-performance mapping table to the sampling schedule to generate sampling quota targets (increase the sampling weight of minor categories when the risk is high, and maintain global balanced sampling when the risk is low).

[0152] By associating risk level labels with inter-class similarity distribution, a contrast loss temperature and margin range are generated (the temperature is appropriately reduced and the margin is increased when the risk is high, so as to amplify the distinguishability between the minor class and the nearest neighbor class).

[0153] The risk level label is matched with the threshold of the contamination coefficient of hard negative samples to generate the negative sample screening intensity (enhancing the screening intensity when the contamination coefficient is high, eliminating highly confusing samples, and retaining more difficult samples to improve the discriminative power when the contamination coefficient is low).

[0154] Align risk level labels with embedding space capacity pressure to generate a memory queue quota limit (tighten the queue when there is high risk to avoid pollution accumulation, and loosen the queue when there is low risk to maintain diversity).

[0155] The risk level label is correlated with the prototype drift magnitude to generate prototype alignment weights (increase the weights when the drift intensifies to stabilize the class center, and decrease the weights when the drift is stable to preserve dynamic adaptability).

[0156] By combining risk level labels with pseudo-label consistency metrics, a pseudo-label confidence threshold is generated (the threshold is increased at high risk to reduce noisy pseudo-labels, and decreased at low risk to expand training coverage).

[0157] The sampling quota target, the comparison temperature and margin interval, the negative sample screening intensity, the upper limit of the memory queue quota, the prototype alignment weight and the pseudo-label confidence threshold are summarized to generate a complete set of control primitives, which are used for the generation and pruning of subsequent training control instructions.

[0158] The set of control primitives is jointly pruned along with computational constraints, latency budgets, and stability boundaries to generate executable training control instructions, as follows:

[0159] Align the set of control primitives with the computational constraint table to generate a computational feasibility mapping table (e.g., when the sampling quota is too high and causes insufficient video memory, automatically compress the quota ratio; when the memory queue quota limit exceeds the storage limit, dynamically reduce the queue capacity).

[0160] By combining the computational feasibility mapping table with the latency budget model, a latency-load adaptation table is generated (e.g., limiting the frequency of calculating excessively high pseudo-label confidence thresholds when inference latency is tight; reducing the frequency of dynamic adjustment of contrast margins when training latency is limited).

[0161] The latency-load adaptation table is compared with the stability boundary to generate fluctuation risk detection results (e.g., identifying potential unstable factors such as frequent switching of sampling quotas, excessive jitter in negative sample screening intensity, and excessively rapid adjustment of contrast temperature).

[0162] The volatility risk detection results are cross-corrected with the set of control primitives to generate a stability constraint control set (the correction introduces an upper limit for the rate of increase, an upper limit for the rate of decrease, and a minimum holding time to ensure that the control variable does not oscillate repeatedly in a short period of time).

[0163] The stability constraint control set is fitted to the performance target curve to generate a performance-constraint balance instruction table (used to maximize the overall convergence speed and classification accuracy while ensuring training stability).

[0164] The performance-constraint balancing instruction table is trimmed and merged to generate the final executable training control instruction (this instruction can be directly applied to sampling allocation, loss function parameter update, negative sample selection mechanism and memory queue maintenance, to achieve online closed-loop adaptive adjustment of the training process).

[0165] Training control commands are applied to sampling quotas, contrast temperature / margins, negative sample screening, and memory queue quotas to generate a rebalanced batch generator. The batches generated by the rebalanced batch generator are used to update the embedding stream in a closed loop, and to train and calibrate the classifier head, generating a deployment-ready calibrated classifier and adaptive inference stream, as detailed below:

[0166] The training control instructions are decomposed into a set of execution parameters, generating an executable list of sampling quota targets, temperature and margin intervals, negative sample screening intensity, memory queue quota upper limit, prototype alignment weight and pseudo-label confidence threshold;

[0167] The executable list is mapped to a rebalanced sampling quota table, generating quota upper / lower limits based on category, phase, and modality, as well as the minimum sub-category percentage and maximum major category percentage within the batch;

[0168] Align the rebalanced sampling quota table with the difficult case curve and similarity topology to generate batch composition targets (including subclass priority, semi-difficult sample ratio, cross-temporal coverage and spatial decorrelation constraints).

[0169] The batch composition target is combined with the negative sample screening intensity and the contamination threshold to generate a sample selection list (two-level filtering is performed on high-contamination candidates: first, they are eliminated according to the contamination intensity, and then they are filled back using a semi-difficult replacement strategy).

[0170] Align the sample selection list with the memory queue quota limit to generate an available sample pool (set quotas by category and modality; perform aging and replacement on expired and highly contaminated items; reserve cold start quotas for scarce subcategories).

[0171] The available sample pool is bound to temperature and margin ranges to generate a loss configuration scheme (lowering temperature and increasing margin when imbalance is high; widening temperature and converging margin when imbalance is low; enabling adaptive margin enhancement for frequently confused neighbor classes).

[0172] The loss configuration scheme and available sample pool are orchestrated into a rebalanced batch generator to generate batch streams that meet quota, difficulty and diversity constraints (ensuring lower limits of subclasses within batches, cross-modal mixing ratios and geographic sparsity; and solidifying random species to reproduce experiments).

[0173] The batches generated by the rebalanced batch generator are fed into the contrastive learning and prototype alignment process to generate an updated embedding stream (using gradient accumulation and momentum update; adding context-aware local consistency constraints for minor class samples).

[0174] The updated embedding stream is subjected to neighbor boundary shaping and intra-cluster compaction to generate a discriminative embedding set (improving the separation strength of highly confusing neighbors; applying a light denoising shrinkage to small clusters to stabilize class centers).

[0175] The discriminative embedding set is used to train the classification head to generate the initial classifier (introducing cost-sensitive weights and mild label smoothing; enabling a higher weight early learning rate and a longer cold start period for minor classes).

[0176] The initial classifier is calibrated with probabilities and thresholds to generate a deployment-ready calibrated classifier (using temperature scaling and class bias correction; setting class decision thresholds and rejection thresholds under target recall-precision constraints).

[0177] By combining a deployed, calibrated classifier with inference-time augmentation strategies, online confidence monitoring, and lightweight rebalanced sampling, an adaptive inference flow is generated (selecting the lowest-cost augmentation on the inference side based on latency budget; increasing the resilience of minor class thresholds and reducing negative example confidence propagation when imbalance increases; and suspending high-risk false label injection and queue expansion when contamination increases).

[0178] This invention effectively alleviates the widespread problem of extreme class imbalance and hard negative sample contamination in remote sensing images by introducing a feature representation space imbalance assessment and control mechanism within a contrastive learning framework. On one hand, by performing multi-level similarity measurement, neighborhood topology analysis, and temporal statistics on the embedding stream, it can capture class frequency deviation and cross-class confusion intensity in real time, thereby constructing a refined representation of class imbalance and hard negative sample contamination, enabling the model to dynamically perceive potential imbalance risks. On the other hand, the training control instructions generated based on the feature representation space imbalance assessment index directly affect sampling quotas, contrast temperature / margin, negative sample screening, and memory queue management, fundamentally reshaping the composition and gradient contribution of positive and negative sample pairs. This allows small class samples to obtain stable and sufficient feature alignment opportunities while avoiding excessive dilution due to erroneous constraints. Dynamic rebalancing of the feature space is achieved during the closed-loop update of the embedding stream and classification head, significantly improving the discriminative power and boundary clarity of small class features, suppressing excessive aggregation of large class features, and ensuring the interpretability and robustness of prediction probabilities through a calibration mechanism. It not only maintains higher classification accuracy and generalization performance in remote sensing scenarios with extremely unbalanced and complex backgrounds, but also has the ability to adapt and adjust online and evolve stably over a long period of time, providing a more reliable and efficient solution for the intelligent analysis and application deployment of remote sensing images.

[0179] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0180] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0181] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A remote sensing image feature extraction and classification method based on a contrast learning method, characterized in that: The method comprises the following steps: Performing spatio-temporal alignment and spectral normalization on the original remote sensing image to generate a standardized dataset; Dividing the standardized dataset into layers and applying multi-scale, geometric, radiation, and cross-modal consistency enhancement to generate enhanced sample pairs; Inputting the enhanced sample pairs into a representation extraction and contrast projection process and maintaining a memory queue to generate an embedding stream; Performing similarity measurement, neighbor topology construction, and batch and global statistical aggregation on the embedding stream to generate a statistical body; Performing class frequency summary and time series smoothing on the statistical body and combining neighborhood similarity discrimination to generate class imbalance information and hard negative sample pollution information; Fusing the class imbalance information and the hard negative sample pollution information to build a feature representation space imbalance evaluation model to generate a feature representation space imbalance evaluation index and a training regulation instruction; Applying the training regulation instruction to the sampling quota, contrast temperature and margin, negative sample screening, and memory queue quota to generate a rebalanced batch generator; Using the batch generated by the rebalanced batch generator to update the embedding stream in a closed loop, and training and calibrating the classification head to generate a deployment-ready calibrated classifier and adaptive inference stream; Inputting the enhanced sample pairs into a representation extraction and contrast projection process and maintaining a memory queue to generate an embedding stream, specifically as follows: Receiving the enhanced sample pairs and grouping them by modality, time phase, and ground object candidate to generate a batch pair stream; Performing pixel-level and geometric registration on the batch pair stream by modality and time phase to generate an aligned batch; Performing spectral domain consistency correction and local contrast normalization on the aligned batch to output a preprocessed tensor; Applying geometric perception filtering and multi-scale context pooling to the preprocessed tensor to generate a structured feature map; Inputting the structured feature map into a multi-scale hybrid encoder and performing cross-modal interactive attention operation to generate an original embedding representation; Mapping the original embedding representation to a contrast representation space through a lightweight projection head and performing vector normalization to generate a projected embedding; Writing the projected embedding into a fragmented memory queue and triggering queue management: performing quota constraints, representative replacement, time decay, and sample backtracking verification to generate an updated memory queue and a candidate negative sample pool; Merging the candidate negative sample pool and the projected embedding of the current batch and calculating the intra-batch and cross-batch similarity distribution to generate a similarity statistics table; Performing high similarity pair identification, neighborhood consistency verification, and confidence scoring on the similarity statistics table, and labeling suspicious high similarity pairs as hard negatives, semi-difficult, or suspected pollution to generate a labeled embedding set; Splitting the labeled embedding set by confidence and outputting it as an embedding stream.

2. The method of claim 1, wherein the method is based on a contrastive learning method. The calculation of the intra-batch and cross-batch similarity distribution is specifically as follows: Let the projected embedding vectors of the current batch be denoted as set Q, and the projected embedding vectors in the candidate negative sample pool be denoted as set K; For each query vector q ∈ Q, perform dot product similarity calculation with other vectors in set Q to obtain the intra-batch similarity distribution; At the same time, for each query vector q ∈ Q, perform dot product similarity calculation with all vectors in set K to obtain the cross-batch similarity distribution; Normalize the intra-batch and cross-batch similarity distributions by probability to obtain the final similarity distribution result. 3.The method of claim 1, wherein the method comprises: Performing batch-intra-standardization and noise suppression on the embedding stream to generate a normalized embedding stream; The normalized embedding stream calculates the similarity matrix between samples in each training batch to generate a batch similarity matrix; The batch similarity matrix is sparsified and pseudo-similarity suppressed with a preset similarity distribution threshold to generate a sparse similarity graph; The sparse similarity graph is applied to the adaptive k-neighborhood criterion to construct a symmetrical neighborhood connection to generate a neighborhood topology; The neighborhood topology is analyzed for multi-scale connectivity and local density to identify core nodes, edge nodes, and isolated noise points to generate a local cluster index and node attribute label; The local cluster index and node attribute label are used to calculate the prototype vector and intra-cluster statistics of each cluster to generate a cluster prototype set and cluster statistics; The cluster prototype set is matched between batches and the prototypes are associated and tracked along the time axis to generate cross-batch prototype trajectories and class center drift metrics; The cross-batch prototype trajectories and class center drift metrics are aggregated with neighborhood confusion pair strength, neighborhood density, and small class crowding to generate batch-level and global-level statistics.

4. The method of claim 3, wherein the method is characterized in that: The batch similarity matrix is sparsified and pseudo-similarity suppressed with a preset similarity distribution threshold to generate a sparse similarity graph, as follows: The batch similarity matrix is scanned for local neighborhood to extract the similarity distribution of each sample on adjacent samples to generate a local similarity curve; The local similarity curve is fitted as a multi-modal distribution and the difference between the background noise peak and the main peak is estimated to generate a background noise threshold; The background noise threshold and the adaptive quantile threshold of the global similarity histogram are fused to generate a hybrid threshold function; The hybrid threshold function is applied to the batch similarity matrix to eliminate low-confidence edges and retain significant similarity relationships to generate a preliminary sparse matrix; The preliminary sparse matrix is detected for pseudo-similarity to identify abnormally high similarity edges caused by appearance noise, lighting disturbance, or spatial redundancy to generate a pseudo-similarity candidate set; The pseudo-similarity candidate set is jointly judged for neighborhood consistency, geographical proximity, and cross-modal consistency to remove false high similarity edges to generate a pseudo-similarity suppression matrix; The pseudo-similarity suppression matrix is combined with the preliminary sparse matrix to form the final sparse similarity graph.

5. The method of claim 3, wherein the method is characterized by: The statistics are summarized for class frequency and time series smoothing and combined with neighborhood similarity discrimination to generate class imbalance information and hard negative sample pollution information, as follows: Calculate the number of samples, intra-cluster average similarity, and intra-class scatter for each cluster in the statistics to generate cluster-level basic indicators; Exponentially smooth and sliding window aggregate the cluster-level basic indicators along the time series to generate a time-stable class frequency distribution; Compare the time-stable class frequency distribution with the global sample proportion to calculate the class imbalance metrics, including small class proportion deviation, distribution entropy, and inter-class density ratio, which are used as the class imbalance information metrics; Cross-analyze the similarity matrix between intra-cluster samples and neighborhood clusters to identify high-similarity cross-class sample pairs and abnormal edge samples to obtain a hard negative sample candidate list; Weighted fusion of the hard negative sample candidate list with cluster prototype drift, neighborhood density, and inter-class confusion strength obtains the hard negative sample pollution coefficient, which is used as the hard negative sample pollution information metric.

6. The method of claim 5, wherein the method is based on a contrastive learning method. The class imbalance information and the hard negative sample pollution information are fused to construct a feature representation space imbalance evaluation model, and a feature representation space imbalance evaluation index and a training regulation instruction are generated, specifically as follows: The dimensionless index vector is generated by performing dimensionless processing on each metric index in the class imbalance information and the hard negative sample pollution information. Combining the dimensionless index vector with the corresponding weight coefficients, a feature representation space imbalance evaluation index is generated: wherein is the feature representation space imbalance evaluation index, is the de-dimensioned value of the th metric index in the class imbalance information and hard negative sample pollution information, is the weight coefficient corresponding to the metric index, and is greater than 0, ; The feature representation space imbalance evaluation index is analyzed into a training regulation primitive to generate a control primitive set. The control primitive set is jointed with the computing power constraint, the time delay budget and the stability boundary to generate an executable training regulation instruction.

Citation Information

Patent Citations

  • Small sample remote sensing scene image classification method based on manifold mixed interpolation and contrast learning

    CN114202694A

  • Deep medical image clustering method based on multi-scale structure learning

    CN114743037A