Intelligent identification method for multi-coupling obstacle soil based on hyperspectral layered fusion CNN model
Patent Information
- Application Number
- CN202611140959.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-10-30
AI Technical Summary
当前土壤障碍检测分为两类手段:一是实验室理化检测,精度高但采样、消解、化验流程冗长,成本高,无法实现大范围地块连续监测;二是光谱智能识别技术
[0048]1、本基于高光谱分层融合CNN模型的多耦合障碍土壤智能识别方法,利用高光谱成像设备采集多耦合障碍土壤高光谱数据,构建浅层普通卷积、深层空洞卷积双分支分层融合CNN网络,自动化提取光谱特征,实现同步输出土壤障碍组合类型、障碍轻重分级及定量指标反演结果,多类型复合障碍识别准确率显著提升,满足农田多耦合障碍土壤快速、高精度识别,解决了现有土壤障碍识别技术中存在的仅能识别单一障碍、无法识别复合耦合障碍、人工特征筛选主观性强、田间环境干扰大、样本不均衡导致识别精度不足、泛化能力弱等问题,实现对农田多类型耦合障碍土壤的高精度识别与精准定量监测,适用于农田耕层土壤盐渍化、酸化、板结及重金属复合污染等多类型单一与耦合障碍的大面积快速诊断与分级评价;
Smart Images

Figure CN123016198A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of non-destructive testing of soil spectra, deep learning and agricultural remote sensing, specifically a method for intelligent identification of multi-coupling barrier soil using a hyperspectral hierarchical fusion CNN model. Background Technology
[0002] Soil acidification, salinization, compaction, and heavy metal accumulation are all typical soil obstacles that directly inhibit crop root development and reduce soil productivity. In actual field environments, soil obstacles rarely exist in isolation; they are generally coupled and superimposed in multiple ways. For example, low-lying areas may exhibit salinization accompanied by soil compaction, while farmland near industrial and mining areas may show acidification coupled with mild heavy metal pollution. The destructive effect of compound obstacles on soil structure and fertility is far greater than that of single obstacles, making it a core challenge in farmland management. Current soil obstacle detection methods fall into two categories: one is laboratory physicochemical testing, which offers high accuracy but involves lengthy sampling, digestion, and analysis processes, resulting in high costs and making continuous monitoring of large-scale plots impossible; the other is spectral intelligent recognition technology.
[0003] Existing publicly available solutions mostly employ models such as SVM, random forest, and single-branch CNN, which only build recognition models for a single type of obstacle, such as salinity, acidification, or heavy metals, resulting in significant shortcomings. Learning only the spectral response patterns of a single obstacle fails to capture the mixed and shifted feature fingerprints of multiple obstacles superimposed, making it easy to miss or misclassify complex coupled obstacles. Traditional solutions rely on manual selection of sensitive bands, which is highly subjective and easily loses the weak cross-band correlation features generated by the coupling of multiple obstacles. Field sampling datasets suffer from sample imbalance, with the number of single obstacle samples far exceeding the number of coupled obstacle samples. Models trained using conventional cross-entropy loss are biased towards simpler samples, significantly reducing the accuracy of complex obstacle recognition. Field surface residues, soil moisture content, and uneven particle size can cause baseline drift and scattering interference, and conventional single preprocessing methods have limited noise reduction effects. Summary of the Invention
[0004] The purpose of this invention is to provide a method for intelligent identification of multi-coupled obstacle soil using a hyperspectral hierarchical fusion CNN model, in order to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for intelligent identification of multi-coupled obstacle soil using a hyperspectral hierarchical fusion CNN model, comprising the following steps:
[0006] S1. Acquisition of Hyperspectral Data of Soil with Multiple Coupled Barriers: Select typical farmland cultivation areas, and on a sunny and cloudless day, use drones equipped with hyperspectral imaging equipment to conduct full-area aerial photography of the 0-20cm topsoil layer of the target farmland. Collect visible-near-infrared full-area hyperspectral image data of healthy soil, single-barrier soil, and multi-type coupled barrier soil. Simultaneously carry out field grid sampling and laboratory physicochemical testing to obtain barrier index data such as soil pH, infertility, salinity, bulk density, porosity, and heavy metal content.
[0007] S2. Hyperspectral image data preprocessing: The collected raw soil hyperspectral data were subjected to three layers of wavelet denoising, baseline correction, multivariate scattering correction, standardization and normalization preprocessing using the db3 wavelet basis to remove spectral noise and baseline shift interference caused by soil moisture, gravel, straw residue, and uneven illumination in the field, so as to obtain standardized and clean hyperspectral data.
[0008] S3. Determination of full-band input scheme: Use full-band hyperspectral data as model input, without pre-screening spectral bands, and determine full-band parameters;
[0009] S4. Construct a soil coupling obstacle recognition model based on dual-branch hierarchical fusion CNN and improved MixMatch semi-supervised learning: Use a dual-branch hierarchical fusion CNN composed of shallow convolution and deep dilated convolution as the main feature extraction backbone, construct a dual-branch structure, and build a semi-supervised recognition framework by combining a small amount of accurately labeled soil obstacle data and a large amount of unlabeled hyperspectral data from the field.
[0010] S5. Dataset Labeling and Sample Balance Construction: Based on the national standard for soil obstacle classification, spectral samples are labeled, and label types are set for healthy soil, single saline-alkali obstacle, single acidification obstacle, single compaction obstacle, single heavy metal obstacle, saline-alkali-compaction coupling, acidification-heavy metal coupling, and barren-compaction coupling, to construct a multi-category, multi-coupled soil obstacle labeling dataset.
[0011] S6. Model Feature Fusion and Iterative Training: The dual-branch CNN extracts explicit single obstacle features and implicit coupled features respectively, performs feature splicing and fusion, and optimizes the model training process by combining the focus loss function to suppress the overfitting problem of single obstacle samples. Based on the focus loss, the weight of easily classified samples is dynamically reduced, forcing the model to focus on difficult-to-classify samples for training, thereby improving the model's ability to identify a small number of coupled obstacle samples.
[0012] S7. Intelligent identification and detection of soil obstacles in the field: Input the pre-processed hyperspectral image data of the cultivated land to be tested into the trained optimal identification model, automatically identify the type of soil obstacle, coupling combination mode and obstacle level, output the spatial distribution location and quantitative inversion results of soil obstacles, and complete the overall assessment of the soil obstacle status of cultivated land in the region.
[0013] Preferably, the soil coupling barrier identification model combines a hierarchical fusion CNN with an improved MixMatch semi-supervised learning method, using a two-branch hierarchical fusion CNN as the main feature extraction backbone, and introducing a focus loss function on the basis of traditional MixMatch loss to improve the soil sample imbalance problem.
[0014] Preferably, the main steps of dataset labeling and sample balancing include:
[0015] S5.1 Construct a dual-branch CNN network and generate labeled data. Build a dual-branch feature extraction network with shallow convolution + pooling and deep dilated convolution. Based on the extracted feature bands most sensitive to multiple coupling barriers in soil, create labels. Soil samples with coupling barriers such as salinity, compaction, infertility, acidification, and heavy metal superimposed are labeled as "coupled barrier soil," single barrier samples are labeled as "single barrier soil," and healthy soil samples are labeled as "healthy soil." Input the original hyperspectral data into the dual-branch CNN network, output shallow explicit features and deep implicit coupling features, and complete dimensional splicing and fusion to obtain the comprehensive spectral features of the samples.
[0016] S5.2 Labeled Data Feature Augmentation: For the labeled composite features extracted by the two-branch CNN, a random augmentation is performed to maintain consistency with the unlabeled data processing flow. The labeled data feature expression is as follows:
[0017]
[0018] in, It is labeled data after feature augmentation. It is the i-th labeled soil spectral composite feature extracted by a two-branch CNN. It is the soil barrier label corresponding to the sample. It is the number of labeled data samples;
[0019] S5.3 Unlabeled Data Feature Augmentation: For unlabeled raw soil hyperspectral data u, a two-branch CNN is first input to extract comprehensive features, and then K random augmentations are applied to generate highly reliable implicit coupling feature pseudo-labels, thereby improving the model's generalization ability. The expression for unlabeled data augmentation is:
[0020]
[0021] in, It is unlabeled composite feature data after random augmentation. It is a comprehensive feature of unlabeled soil spectra extracted by a two-branch CNN. It is the number of random augmentations;
[0022] S5.4. Generate an average pseudo-label. After completing the prediction of the unlabeled comprehensive feature input model that underwent K enhancements in the previous step, an average pseudo-label is generated using an averaging method. The expression for generating the average pseudo-label is:
[0023]
[0024] in, It is the average predicted probability of unlabeled soil samples. It refers to the number of augmentations performed on the unlabeled samples. It is the composite characteristic of unlabeled soil after random augmentation. This is the prediction function of a model with a two-branch hierarchical fusion CNN as its backbone;
[0025] S5.5. Use Sharpen sharpening to improve the confidence of pseudo-labels, reduce the entropy of predicted pseudo-labels, highlight high-probability soil obstacle categories, and make the predicted probability distribution more obvious. The expression for Sharpen sharpening is:
[0026]
[0027] in, These are the sharpened pseudo-labels for the j-th soil sample. It is an unlabeled soil sample The average predicted probability, Temperature parameters for temperature sharpening. This refers to the number of categories in the soil classification task;
[0028] S5.6 Feature and Label Fusion: Labeled and unlabeled data, along with their sharpened pseudo-labels, are fused using linear interpolation in a linear mixture manner to further improve the model's generalization ability and training stability. The fusion expression is as follows:
[0029]
[0030] in, It is the mixed input spectral feature data. It is the CNN comprehensive feature after random augmentation of the i-th sample in the labeled data. Let y be the labeled label of the i-th sample in the labeled data, and y be the mixed labeled data. It is the comprehensive feature extracted by CNN from the j-th sample in the unlabeled data. It is the pseudo-label after sharpening the j-th sample. It is the dynamic mixing coefficient.
[0031] Preferably, the main steps in constructing the soil coupling barrier identification model include:
[0032] S4.1 Calculate the supervised loss for labeled data to ensure the model learns the correct classification features on labeled soil sample data. The expression for calculating the supervised loss for labeled data is as follows:
[0033]
[0034] in, It is a loss of supervision. The quantity of labeled soil data. It is the cross-entropy loss function;
[0035] S4.2 Calculate the unsupervised loss for unlabeled data to ensure consistent predictions for the augmented version of the model on unlabeled soil data. The expression for calculating the unsupervised loss for unlabeled data is as follows:
[0036]
[0037] in, Losses due to non-monitoring It is the amount of unlabeled soil data. It refers to the number of augmentations for each unlabeled soil sample;
[0038] S4.3. Introduce the focus loss function and construct the total loss function. The model is optimized through the collaborative optimization of supervised and unsupervised consistency losses. The focus loss (FL) is introduced to reduce the training weights of a large number of simple, single obstacle samples and increase the training weights of a small number of coupled obstacle samples. The supervised loss, unsupervised loss, and focus loss are weighted and fused together. The model parameters are optimized collaboratively using a small amount of labeled data and a large amount of unlabeled data. The total loss expression is as follows:
[0039]
[0040] in, It is the total loss function. It is a loss of supervision. These are the weighting coefficients for unsupervised loss. Losses due to non-monitoring This is the focus loss, used to balance the training weights of single soil obstacle and coupled obstacle samples;
[0041] S4.4 Update the relevant parameters of the dual-splitting CNN network by backpropagation based on the total loss function, and iterate the training until the model accuracy converges, so that the multi-coupled obstacle soil recognition model can achieve the best recognition effect.
[0042] Preferably, the dual-branch hierarchical fusion CNN uses a combination of shallow convolution and deep dilated convolution to adaptively learn and select the feature combinations that contribute most to obstacle recognition from full-band data during training, without the need for manually preset sensitive bands.
[0043] Preferably, the full-band hyperspectral image adopts the 400-2500nm visible-near infrared full-domain band with a spectral resolution better than 10nm. After preprocessing in S2, it is directly input into the dual-branch hierarchical fusion CNN model constructed in S4 for training and recognition.
[0044] Preferably, the soil coupling barrier identification model construction introduces a focus loss function to improve the soil sample class imbalance problem, and collaboratively completes the training and parameter optimization of the multi-coupling barrier soil identification model.
[0045] Preferably, the intelligent identification method for multi-coupled obstacle soil also includes three-dimensional visualization of intelligent identification of multi-coupled obstacle soil. By applying three-dimensional visualization software, setting three-dimensional visualization parameters for intelligent identification of multi-coupled obstacle soil, and based on the intelligent identification and detection data of soil obstacles in the field, the spatial distribution of soil obstacles is visualized in three dimensions to generate a three-dimensional dynamic evolution of the overall status of soil obstacles in the cultivated land of the region.
[0046] Preferably, the hyperspectral image preprocessing includes radiometric calibration, atmospheric correction, geometric correction, bad line / bad pixel repair, spectral smoothing and scattering correction, and dimensionality reduction / feature enhancement to eliminate sensor, atmospheric and geometric distortion interference and restore the true surface reflectance spectrum.
[0047] Compared with the prior art, the beneficial effects of the present invention are:
[0048] 1. This intelligent identification method for multi-coupled obstacle soil based on a hyperspectral hierarchical fusion CNN model utilizes hyperspectral imaging equipment to collect hyperspectral data of multi-coupled obstacle soil. It constructs a dual-branch hierarchical fusion CNN network with shallow ordinary convolution and deep dilated convolution to automatically extract spectral features and simultaneously output soil obstacle combination types, obstacle severity classification, and quantitative index inversion results. The accuracy of identifying multiple types of composite obstacles is significantly improved, meeting the requirements for rapid and high-precision identification of multi-coupled obstacle soil in farmland. This method solves problems existing in current soil obstacle identification technologies, such as the inability to identify single obstacles, the inability to identify composite coupled obstacles, strong subjectivity in manual feature selection, significant interference from the field environment, insufficient identification accuracy due to sample imbalance, and weak generalization ability. It achieves high-precision identification and accurate quantitative monitoring of multi-type coupled obstacle soil in farmland, and is suitable for large-area rapid diagnosis and classification evaluation of multiple types of single and coupled obstacles in farmland topsoil, including salinization, acidification, compaction, and heavy metal composite pollution.
[0049] 2. This method for intelligent identification of multi-coupled soil obstacles based on a hyperspectral hierarchical fusion CNN model applies a dual-branch hierarchical CNN structure to the field of soil coupling obstacle identification. It extracts the explicit spectral features of a single obstacle and the implicit correlation features of coupled obstacles, filling the technical gap that traditional models cannot accurately identify complex soil coupling obstacles and closely matches the distribution characteristics of real soil obstacles in the field.
[0050] 3. This intelligent soil identification method for multiple coupling obstacles based on a hyperspectral hierarchical fusion CNN model adopts an improved MixMatch semi-supervised learning framework and relies on massive unlabeled hyperspectral data for training, which significantly reduces the cost of manual annotation of soil samples. At the same time, a focus loss is added on the basis of the standard MixMatch loss to specifically solve the problem of imbalance in farmland soil samples and significantly improve the accuracy of coupling obstacle identification.
[0051] 4. This intelligent soil identification method for multiple coupling obstacles based on a hyperspectral hierarchical fusion CNN model uses end-to-end deep learning to automatically mine spectral features, eliminating the need for manual screening of sensitive bands, avoiding the subjective bias caused by manual screening, and resulting in stronger model generalization ability.
[0052] 5. This intelligent soil identification method based on a hyperspectral hierarchical fusion CNN model with multiple coupling barriers adopts db3 wavelet three-layer noise reduction combined with MSC multivariate scattering correction joint preprocessing to suppress spectral interference caused by field moisture, straw and gravel, thereby improving the stability of field measured spectral data.
[0053] 6. This intelligent identification method for multi-coupled obstacle soil based on hyperspectral hierarchical fusion CNN model can achieve one-time full-coverage detection of the entire cultivated land area when equipped with UAV hyperspectral equipment. The detection efficiency is far higher than that of traditional laboratory physicochemical detection. It is suitable for large-scale field operation scenarios such as the third national soil census, normalized dynamic monitoring of cultivated land, and precise improvement of obstacle soil in zones. Attached Figure Description
[0054] Figure 1 This is an overall flowchart of the method of the present invention;
[0055] Figure 2 This is a flowchart showing the detailed sub-steps of model construction for the soil coupling barrier identification model in this invention;
[0056] Figure 3 This is a diagram of the dual-branch CNN network architecture in this invention. Detailed Implementation
[0057] 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.
[0058] In the description of this invention, it should be noted that the terms "upper," "lower," "inner," "outer," "front end," "rear end," "both ends," "one end," and "the other end," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0059] like Figures 1 to 3 As shown, this embodiment of the intelligent soil identification method for multiple coupled barriers based on a hyperspectral hierarchical fusion CNN model includes the following steps:
[0060] S1. Acquisition of Hyperspectral Data of Soil with Multiple Coupled Barriers: Select typical farmland cultivation areas, and on a sunny and cloudless day, use drones equipped with hyperspectral imaging equipment to conduct full-area aerial photography of the 0-20cm topsoil layer of the target farmland. Collect visible-near-infrared full-area hyperspectral image data of healthy soil, single-barrier soil, and multi-type coupled barrier soil. Simultaneously carry out field grid sampling and laboratory physicochemical testing to obtain barrier index data such as soil pH, infertility, salinity, bulk density, porosity, and heavy metal content.
[0061] S2. Hyperspectral image data preprocessing: The collected raw soil hyperspectral data were subjected to three layers of wavelet denoising, baseline correction, multiplicative scattering correction (MSC), standardization and normalization preprocessing using the db3 wavelet basis to remove spectral noise and baseline shift interference caused by soil moisture, gravel, straw residue, and uneven illumination in the field, so as to obtain standardized and clean hyperspectral data.
[0062] S3. Determination of full-band input scheme: Full-band hyperspectral data is used as model input. No spectral bands are pre-screened. The full-band parameters are determined. The spectral features of coupling barriers often manifest as weak correlation information across bands, rather than being concentrated in a single sensitive band. Full-band input can retain the above-mentioned implicit coupling fingerprints to the maximum extent and avoid the loss of key features due to manual screening.
[0063] S4. Construct a soil coupling obstacle recognition model based on dual-branch hierarchical fusion CNN and improved MixMatch semi-supervised learning: Use a dual-branch hierarchical fusion CNN composed of shallow convolution and deep dilated convolution as the main feature extraction backbone, construct a dual-branch structure, and build a semi-supervised recognition framework by combining a small amount of accurately labeled soil obstacle data and a large amount of unlabeled hyperspectral data from the field.
[0064] S5. Dataset Labeling and Sample Balance Construction: Based on the national standard for soil obstacle classification, spectral samples are labeled, and label types are set for healthy soil, single saline-alkali obstacle, single acidification obstacle, single compaction obstacle, single heavy metal obstacle, saline-alkali-compaction coupling, acidification-heavy metal coupling, and barren-compaction coupling, to construct a multi-category, multi-coupled soil obstacle labeling dataset.
[0065] S6. Model Feature Fusion and Iterative Training: The dual-branch CNN extracts explicit single obstacle features and implicit coupled features respectively, performs feature splicing and fusion, and optimizes the model training process by combining the focus loss function to suppress the overfitting problem of single obstacle samples. Based on the focus loss, the weight of easily classified samples is dynamically reduced, forcing the model to focus on difficult-to-classify samples for training, thereby improving the model's ability to identify a small number of coupled obstacle samples.
[0066] S7. Intelligent identification and detection of soil obstacles in the field: Input the pre-processed hyperspectral image data of the cultivated land to be tested into the trained optimal identification model, automatically identify the type of soil obstacle, coupling combination mode and obstacle level, output the spatial distribution location and quantitative inversion results of soil obstacles, and complete the overall assessment of the soil obstacle status of cultivated land in the region.
[0067] This invention addresses the shortcomings of existing soil spectral identification technologies, which can only identify single soil obstacles and cannot identify coupled complex obstacles such as salinity-compactment and acidification-heavy metals that are widely present in the field. Furthermore, the low accuracy of complex obstacle identification is caused by manual screening of spectral features and uneven sample distribution.
[0068] Specifically, the soil coupling barrier identification model combines a hierarchical fusion CNN with an improved MixMatch semi-supervised learning method. It uses a two-branch hierarchical fusion CNN as the backbone for feature extraction and introduces a focus loss function on the basis of traditional MixMatch loss to improve the soil sample imbalance problem.
[0069] Furthermore, the main steps of dataset labeling and sample balancing include:
[0070] S5.1 Construct a dual-branch CNN network and generate labeled data. Build a dual-branch feature extraction network with shallow convolution + pooling and deep dilated convolution. Based on the extracted feature bands most sensitive to multiple coupling barriers in soil, create labels. Soil samples with coupling barriers such as salinity, compaction, infertility, acidification, and heavy metal superimposed are labeled as "coupled barrier soil," single barrier samples are labeled as "single barrier soil," and healthy soil samples are labeled as "healthy soil." Input the original hyperspectral data into the dual-branch CNN network, output shallow explicit features and deep implicit coupling features, and complete dimensional splicing and fusion to obtain the comprehensive spectral features of the samples.
[0071] S5.2 Labeled Data Feature Augmentation: For the labeled composite features extracted by the two-branch CNN, a random augmentation is performed to maintain consistency with the unlabeled data processing flow. The labeled data feature expression is as follows:
[0072]
[0073] in, It is labeled data after feature augmentation. It is the i-th labeled soil spectral composite feature extracted by a two-branch CNN. It is the soil barrier label corresponding to the sample. It is the number of labeled data samples;
[0074] S5.3 Unlabeled Data Feature Augmentation: For unlabeled raw soil hyperspectral data u, a two-branch CNN is first input to extract comprehensive features, and then K random augmentations are applied to generate highly reliable implicit coupling feature pseudo-labels, thereby improving the model's generalization ability. The expression for unlabeled data augmentation is:
[0075]
[0076] in, It is unlabeled composite feature data after random augmentation. It is a comprehensive feature of unlabeled soil spectra extracted by a two-branch CNN. It is the number of random augmentations;
[0077] S5.4. Generate an average pseudo-label. After completing the prediction of the unlabeled comprehensive feature input model that underwent K enhancements in the previous step, an average pseudo-label is generated using an averaging method. The expression for generating the average pseudo-label is:
[0078]
[0079] in, It is the average predicted probability of unlabeled soil samples. It refers to the number of augmentations performed on the unlabeled samples. It is the composite characteristic of unlabeled soil after random augmentation. This is the prediction function of a model with a two-branch hierarchical fusion CNN as its backbone;
[0080] S5.5. Use Sharpen sharpening to improve the confidence of pseudo-labels, reduce the entropy of predicted pseudo-labels, highlight high-probability soil obstacle categories, and make the predicted probability distribution more obvious. The expression for Sharpen sharpening is:
[0081]
[0082] in, These are the sharpened pseudo-labels for the j-th soil sample. It is an unlabeled soil sample The average predicted probability, Temperature parameters for temperature sharpening. This refers to the number of categories in the soil classification task;
[0083] S5.6 Feature and Label Fusion: Labeled and unlabeled data, along with their sharpened pseudo-labels, are fused using linear interpolation in a linear mixture manner to further improve the model's generalization ability and training stability. The fusion expression is as follows:
[0084]
[0085] in, It is the mixed input spectral feature data. It is the CNN comprehensive feature after random augmentation of the i-th sample in the labeled data. Let y be the labeled label of the i-th sample in the labeled data, and y be the mixed labeled data. It is the comprehensive feature extracted by CNN from the j-th sample in the unlabeled data. It is the pseudo-label after sharpening the j-th sample. It is the dynamic mixing coefficient.
[0086] Furthermore, the main steps in constructing the soil coupling barrier identification model include:
[0087] S4.1 Calculate the supervised loss for labeled data to ensure the model learns the correct classification features on labeled soil sample data. The expression for calculating the supervised loss for labeled data is as follows:
[0088]
[0089] in, It is a loss of supervision. The quantity of labeled soil data. It is the cross-entropy loss function;
[0090] S4.2 Calculate the unsupervised loss for unlabeled data to ensure consistent predictions for the augmented version of the model on unlabeled soil data. The expression for calculating the unsupervised loss for unlabeled data is as follows:
[0091]
[0092] in, Losses due to non-monitoring It is the amount of unlabeled soil data. It refers to the number of augmentations for each unlabeled soil sample;
[0093] S4.3. Introducing the focus loss function and constructing the total loss function: The traditional MixMatch algorithm only optimizes the model through the joint optimization of supervised loss and unsupervised consistency loss, without considering the problem of class imbalance. The farmland soil dataset has the characteristics of a large number of single obstacle samples and a scarcity of coupled obstacle samples. Therefore, this invention introduces an additional focus loss FL to reduce the training weight of a large number of simple single obstacle samples and increase the training weight of a small number of coupled obstacle samples. By weighted fusion of supervised loss, unsupervised loss and focus loss, the model parameters are jointly optimized using a small amount of labeled data and a large amount of unlabeled data. The total loss expression is as follows:
[0094]
[0095] in, It is the total loss function. It is a loss of supervision. These are the weighting coefficients for unsupervised loss. Losses due to non-monitoring This is the focus loss, used to balance the training weights of single soil obstacle and coupled obstacle samples;
[0096] S4.4 Update the relevant parameters of the dual-splitting CNN network by backpropagation based on the total loss function, and iterate the training until the model accuracy converges, so that the multi-coupled obstacle soil recognition model can achieve the best recognition effect.
[0097] Furthermore, the dual-branch hierarchical fusion CNN, through a combination of shallow convolution and deep dilated convolution, adaptively learns from full-band data and selects the feature combinations that contribute most to obstacle recognition during training. It does not require manual pre-setting of sensitive bands, and can efficiently process full-band data and achieve adaptive feature learning.
[0098] Furthermore, the full-band hyperspectral imagery uses the 400-2500nm visible-near-infrared full-domain band with a spectral resolution better than 10nm. After preprocessing by S2, it is directly input into the dual-branch hierarchical fusion CNN model constructed by S4 for training and recognition.
[0099] Furthermore, the soil coupling obstacle identification model introduces a focus loss function to improve the imbalance of soil sample categories, collaboratively completes the training and parameter optimization of multi-coupling obstacle soil identification models, breaks through the linear limitation of single factors, and achieves accurate decoupling of obstacle factors, global optimal convergence, and significantly improved interpretability of governance decisions through multi-source data and algorithm linkage, avoiding attribution bias or omission caused by independent modeling of a single model.
[0100] Furthermore, the intelligent identification method for multi-coupled obstacle soil also includes three-dimensional visualization of intelligent identification of multi-coupled obstacle soil. By applying three-dimensional visualization software and setting three-dimensional visualization parameters for intelligent identification of multi-coupled obstacle soil, the spatial distribution of soil obstacles is visualized in three dimensions based on field soil obstacle intelligent identification and detection data. This generates a three-dimensional dynamic evolution of the overall status of soil obstacles in the region's cultivated land, breaking through the limitations of two-dimensional planes, accurately revealing the vertical heterogeneity and spatial correlation of obstacle factors, and significantly improving identification accuracy, quantitative accuracy, and the scientific nature of governance decisions.
[0101] Furthermore, the hyperspectral image preprocessing includes radiometric calibration, atmospheric correction, geometric correction, bad line / bad pixel repair, spectral smoothing and scattering correction, and dimensionality reduction / feature enhancement to eliminate sensor, atmospheric and geometric distortion interference and restore the true surface reflectance spectrum.
[0102] The method of this invention is as follows: A drone equipped with a hyperspectral imaging device is used to conduct full-area aerial photography of the 0-20cm topsoil layer of the target farmland, collecting visible-near-infrared full-area hyperspectral image data of healthy soil, soil with a single obstacle, and soil with multiple coupled obstacles. Simultaneously, field grid sampling and laboratory physicochemical testing are carried out to obtain obstacle index data such as soil pH, infertility, salinity, bulk density, porosity, and heavy metal content. Hyperspectral data of soil with multiple coupled obstacles are also obtained. The collected hyperspectral image data is preprocessed to obtain standardized and clean hyperspectral data. The full-band hyperspectral data is used as model input. A two-branch hierarchical fusion CNN composed of shallow convolution and deep dilated convolution is used as the feature extraction backbone to construct a two-branch structure. A semi-supervised recognition framework is built by combining a small amount of precisely labeled soil obstacle data with a large amount of unlabeled field hyperspectral data. A soil coupling obstacle recognition model based on a two-branch hierarchical fusion CNN and improved MixMatch semi-supervised learning is constructed. The samples are labeled to construct a multi-category, multi-coupled soil obstacle labeled dataset. A dual-branch CNN is used to extract explicit single obstacle features and implicit coupled features, which are then stitched and fused. The model training process is optimized using a focus loss function to suppress overfitting of single obstacle samples. Based on focus loss, the weights of easily classified samples are dynamically reduced, forcing the model to focus on difficult-to-classify samples during training, improving the model's ability to identify a small number of coupled obstacle samples. Feature fusion and iterative training are performed. Preprocessed hyperspectral image data of the farmland to be tested is input into the trained optimal recognition model to automatically determine the soil obstacle type, coupling combination mode, and obstacle level. The spatial distribution location and quantitative inversion results of the soil obstacles are output, completing the overall assessment of the soil obstacle status of the regional farmland. The spatial distribution of soil obstacles is visualized in three dimensions, generating a three-dimensional dynamic evolution of the overall soil obstacle status of the regional farmland. This invention utilizes a UAV equipped with a 400–2500nm... Hyperspectral imaging equipment collects the spectrum of topsoil. Wavelet denoising combined with multiplicative scattering correction (MSC) is used to eliminate spectral noise caused by straw, moisture and gravel in the field. A two-branch hierarchical fusion CNN network with shallow ordinary convolution and deep dilated convolution is constructed to extract the explicit spectral features of a single obstacle and the implicit coupling features of multiple obstacles. A focal loss function is introduced to balance the difference in the number of samples of a single obstacle and coupled obstacles. After the model is trained, the soil obstacle combination type, obstacle severity classification and quantitative index inversion results can be output simultaneously after the spectrum of the area to be measured is input into the model.
[0103] This invention automatically extracts spectral features without human intervention, significantly improving the accuracy of identifying multiple types of complex obstacles. It is suitable for large-scale field operations such as the Third National Soil Survey, dynamic monitoring of arable land quality, and precise improvement of obstacle soil zones.
[0104] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for intelligent identification of multi-coupled obstacle soil using a hyperspectral hierarchical fusion CNN model, characterized by: Includes the following steps: S1. Acquisition of Hyperspectral Data of Soil with Multiple Coupled Barriers: Select typical farmland cultivation areas, and on a sunny and cloudless day, use drones equipped with hyperspectral imaging equipment to conduct full-area aerial photography of the 0-20cm topsoil layer of the target farmland. Collect visible-near-infrared full-area hyperspectral image data of healthy soil, single-barrier soil, and multi-type coupled barrier soil. Simultaneously carry out field grid sampling and laboratory physicochemical testing to obtain barrier index data such as soil pH, infertility, salinity, bulk density, porosity, and heavy metal content. S2. Hyperspectral image data preprocessing: The collected raw soil hyperspectral data were subjected to three layers of wavelet denoising, baseline correction, multivariate scattering correction, standardization and normalization preprocessing using the db3 wavelet basis to remove spectral noise and baseline shift interference caused by soil moisture, gravel, straw residue, and uneven illumination in the field, so as to obtain standardized and clean hyperspectral data. S3. Determination of full-band input scheme: Use full-band hyperspectral data as model input, without pre-screening spectral bands, and determine full-band parameters; S4. Construct a soil coupling obstacle recognition model based on dual-branch hierarchical fusion CNN and improved MixMatch semi-supervised learning: Use a dual-branch hierarchical fusion CNN composed of shallow convolution and deep dilated convolution as the main feature extraction backbone, construct a dual-branch structure, and build a semi-supervised recognition framework by combining a small amount of accurately labeled soil obstacle data and a large amount of unlabeled hyperspectral data from the field. S5. Dataset Labeling and Sample Balance Construction: Based on the national standard for soil obstacle classification, spectral samples are labeled, and label types are set for healthy soil, single saline-alkali obstacle, single acidification obstacle, single compaction obstacle, single heavy metal obstacle, saline-alkali-compaction coupling, acidification-heavy metal coupling, and barren-compaction coupling, to construct a multi-category, multi-coupled soil obstacle labeling dataset. S6. Model Feature Fusion and Iterative Training: The dual-branch CNN extracts explicit single obstacle features and implicit coupled features respectively, performs feature splicing and fusion, and optimizes the model training process by combining the focus loss function to suppress the overfitting problem of single obstacle samples. Based on the focus loss, the weight of easily classified samples is dynamically reduced, forcing the model to focus on difficult-to-classify samples for training, thereby improving the model's ability to identify a small number of coupled obstacle samples. S7. Intelligent identification and detection of soil obstacles in the field: Input the pre-processed hyperspectral image data of the cultivated land to be tested into the trained optimal identification model, automatically identify the type of soil obstacle, coupling combination mode and obstacle level, output the spatial distribution location and quantitative inversion results of soil obstacles, and complete the overall assessment of the soil obstacle status of cultivated land in the region.
2. The intelligent soil identification method for multiple coupled obstacles based on a hyperspectral hierarchical fusion CNN model according to claim 1, characterized in that: The soil coupling barrier identification model combines a hierarchical fusion CNN with an improved MixMatch semi-supervised learning method. It uses a two-branch hierarchical fusion CNN as the main feature extraction backbone and introduces a focus loss function on the basis of traditional MixMatch loss to improve the soil sample imbalance problem.
3. The intelligent soil identification method for multiple coupled obstacles based on a hyperspectral hierarchical fusion CNN model according to claim 1, characterized in that: The main steps of dataset labeling and sample balancing include: S5.1 Construct a dual-branch CNN network and generate labeled data. Build a dual-branch feature extraction network with shallow convolution + pooling and deep dilated convolution. Based on the extracted feature bands most sensitive to multiple coupling barriers in soil, create labels. Soil samples with coupling barriers such as salinity, compaction, infertility, acidification, and heavy metal superimposed are labeled as "coupled barrier soil," single barrier samples are labeled as "single barrier soil," and healthy soil samples are labeled as "healthy soil." Input the original hyperspectral data into the dual-branch CNN network, output shallow explicit features and deep implicit coupling features, and complete dimensional splicing and fusion to obtain the comprehensive spectral features of the samples. S5.2 Labeled Data Feature Augmentation: For the labeled composite features extracted by the two-branch CNN, a random augmentation is performed to maintain consistency with the unlabeled data processing flow. The labeled data feature expression is as follows: in, It is labeled data after feature augmentation. It is the i-th labeled soil spectral composite feature extracted by a two-branch CNN. It is the soil barrier label corresponding to the sample. It is the number of labeled data samples; S5.3 Unlabeled Data Feature Augmentation: For unlabeled raw soil hyperspectral data u, a two-branch CNN is first input to extract comprehensive features, and then K random augmentations are applied to generate highly reliable implicit coupling feature pseudo-labels, thereby improving the model's generalization ability. The expression for unlabeled data augmentation is: in, It is unlabeled composite feature data after random augmentation. It is a comprehensive feature of unlabeled soil spectra extracted by a two-branch CNN. It is the number of random augmentations; S5.
4. Generate an average pseudo-label. After completing the prediction of the unlabeled comprehensive feature input model that underwent K enhancements in the previous step, an average pseudo-label is generated using an averaging method. The expression for generating the average pseudo-label is: in, It is the average predicted probability of unlabeled soil samples. It refers to the number of augmentations performed on the unlabeled samples. It is the composite characteristic of unlabeled soil after random augmentation. This is the prediction function of a model with a two-branch hierarchical fusion CNN as its backbone; S5.
5. Use Sharpen sharpening to improve the confidence of pseudo-labels, reduce the entropy of predicted pseudo-labels, highlight high-probability soil obstacle categories, and make the predicted probability distribution more obvious. The expression for Sharpen sharpening is: in, This is a sharpened pseudo-label for the j-th soil sample. It is an unlabeled soil sample The average predicted probability, Temperature parameters for temperature sharpening. This refers to the number of categories in the soil classification task; S5.6 Feature and Label Fusion: Labeled and unlabeled data, along with their sharpened pseudo-labels, are fused using linear interpolation in a linear mixture manner to further improve the model's generalization ability and training stability. The fusion expression is as follows: in, It is the mixed input spectral feature data. It is the CNN comprehensive feature after random augmentation of the i-th sample in the labeled data. Let y be the labeled label of the i-th sample in the labeled data, and y be the mixed labeled data. It is the comprehensive feature extracted by CNN from the j-th sample in the unlabeled data. It is the pseudo-label after sharpening the j-th sample. It is the dynamic mixing coefficient.
4. The intelligent soil identification method for multiple coupled obstacles based on a hyperspectral hierarchical fusion CNN model according to claim 1, characterized in that: The main steps in constructing the soil coupling barrier identification model include: S4.1 Calculate the supervised loss for labeled data to ensure the model learns the correct classification features on labeled soil sample data. The expression for calculating the supervised loss for labeled data is as follows: in, It is a loss of supervision. The quantity of labeled soil data. It is the cross-entropy loss function; S4.2 Calculate the unsupervised loss for unlabeled data to ensure consistent predictions for the augmented version of the model on unlabeled soil data. The expression for calculating the unsupervised loss for unlabeled data is as follows: in, Losses due to non-monitoring It is the amount of unlabeled soil data. It refers to the number of augmentations for each unlabeled soil sample; S4.
3. Introduce the focus loss function and construct the total loss function. The model is optimized through the collaborative optimization of supervised and unsupervised consistency losses. The focus loss (FL) is introduced to reduce the training weights of a large number of simple, single obstacle samples and increase the training weights of a small number of coupled obstacle samples. The supervised loss, unsupervised loss, and focus loss are weighted and fused together. The model parameters are optimized collaboratively using a small amount of labeled data and a large amount of unlabeled data. The total loss expression is as follows: in, It is the total loss function. It is a loss of supervision. These are the weighting coefficients for unsupervised loss. Losses due to non-monitoring This is the focus loss, used to balance the training weights of single soil obstacle and coupled obstacle samples; S4.4 Update the relevant parameters of the dual-splitting CNN network by backpropagation based on the total loss function, and iterate the training until the model accuracy converges, so that the multi-coupled obstacle soil recognition model can achieve the best recognition effect.
5. The intelligent soil identification method for multiple coupled obstacles based on a hyperspectral hierarchical fusion CNN model according to claim 1, characterized in that: The dual-branch hierarchical fusion CNN uses a combination of shallow convolution and deep dilated convolution to adaptively learn and select the feature combinations that contribute most to obstacle recognition from full-band data during training, without the need for manually preset sensitive bands.
6. The intelligent soil identification method for multiple coupled obstacles based on a hyperspectral hierarchical fusion CNN model according to claim 1, characterized in that: The full-band hyperspectral image uses the 400-2500nm visible-near infrared full-domain band with a spectral resolution better than 10nm. After preprocessing in S2, it is directly input into the dual-branch hierarchical fusion CNN model constructed in S4 for training and recognition.
7. The intelligent soil identification method for multiple coupled obstacles based on a hyperspectral hierarchical fusion CNN model according to claim 1, characterized in that: The soil coupling barrier identification model is constructed by introducing a focus loss function to improve the imbalance of soil sample categories, and collaboratively completes the training and parameter optimization of the multi-coupling barrier soil identification model.
8. The intelligent soil identification method for multiple coupled obstacles based on a hyperspectral hierarchical fusion CNN model according to claim 1, characterized in that: The method for intelligent identification of multi-coupled obstacle soil also includes three-dimensional visualization of intelligent identification of multi-coupled obstacle soil. It applies three-dimensional visualization software, sets three-dimensional visualization parameters for intelligent identification of multi-coupled obstacle soil, and visualizes the spatial distribution of soil obstacles in three dimensions based on field soil obstacle intelligent identification and detection data, generating a three-dimensional dynamic evolution of the overall status of soil obstacles in the cultivated land of the region.
9. The intelligent soil identification method for multiple coupled obstacles based on a hyperspectral hierarchical fusion CNN model according to claim 1, characterized in that: The hyperspectral image preprocessing includes radiometric calibration, atmospheric correction, geometric correction, bad line / bad pixel repair, spectral smoothing and scattering correction, and dimensionality reduction / feature enhancement to eliminate sensor, atmospheric and geometric distortion interference and restore the true surface reflectance spectrum.
