Soil organic matter classification model training method, device, equipment and medium

Through the soil organic matter classification model training method, image source data and vegetation index data are used, combined with machine learning and deep learning technology, the accuracy and applicability of soil organic matter inversion mapping are solved, and efficient, accurate classification and improvement of soil organic matter is achieved. Wide applicability.

CN119131525APending Publication Date: 2024-12-13URBAN RURAL INST (GUANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411166797.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing soil organic matter inversion mapping methods have problems such as large manual workload, low accuracy, small applicable area and limited universality. In particular, the spectral index method requires detailed spectral characteristics research, and is affected by the changes in spectral data, resulting in the mapping effect. The difference is big.

Method used

A soil organic matter classification model training method is adopted. By collecting data in the preset area, the image source data and vegetation index images are obtained, and the machine learning model is trained using soil sample data and vegetation index data to generate machine learning result maps as pseudo-labels. Further train the soil organic matter classification model, combine multi-model fusion and deep learning technology, optimize the model and enhance the data set, and improve classification accuracy and robustness.

Benefits of technology

It has achieved comprehensive and practical improvement in soil organic matter inversion mapping, can quickly and automatically classify soil organic matter, improve the accuracy and reliability of classification results, and is suitable for a wider range of areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131525A_ABST
    Figure CN119131525A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of soil organic matter classification, and discloses a soil organic matter classification model training method, device, equipment and medium, and the method comprises the steps: carrying out the data collection of a preset region, and obtaining the image source data and vegetation index image of the preset region; training a to-be-trained machine learning model by using the soil sample data and the corresponding vegetation index data to obtain the machine learning model; inputting the image source data and the vegetation index image into the machine learning model to generate a machine learning result graph; wherein the machine learning result graph represents a soil organic matter classification result based on machine learning; and taking the machine learning result graph as a pseudo label, and training a to-be-trained soil organic matter classification model according to the image source data and the vegetation index image to obtain the soil organic matter classification model. The soil organic matter classification device has the beneficial effect that soil organic matters can be rapidly and automatically classified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of soil organic matter classification, and in particular to a soil organic matter classification model training method, device, equipment and medium. Background Art

[0002] Currently, there are two main methods for soil organic matter mapping based on remote sensing images: soil organic matter inversion mapping based on spectral indices and soil mapping based on machine learning and statistics. These methods usually expand data features by adding environmental covariates to improve mapping accuracy.

[0003] However, these methods have some challenges: the manual workload is large, especially in the spectral index method, which requires detailed spectral feature research; the mapping accuracy is sometimes low and is affected by the change of spectral data; the applicable area is small and it is easy to overfit locally; the universality of the method is limited, and the effect varies greatly depending on the region and conditions. Therefore, despite some progress, further research and improvement are still needed to improve the comprehensiveness and applicability of the method. Summary of the invention

[0004] The present application provides a soil organic matter classification model training method, device, equipment and medium, which solves the technical problem of low comprehensiveness and practicality of current soil organic matter inversion mapping, and achieves the technical effect of improving the comprehensiveness and practicality of soil organic matter inversion mapping.

[0005] In order to achieve the above objectives, the main technical solutions adopted in this application include:

[0006] In a first aspect, an embodiment of the present application provides a soil organic matter classification model training method, the method comprising:

[0007] Collecting data for a preset area to obtain image source data and vegetation index images of the preset area;

[0008] Using soil sample data and its corresponding vegetation index data to train the machine learning model to be trained, to obtain a machine learning model;

[0009] Inputting the image source data and the vegetation index image into the machine learning model to generate a machine learning result graph; wherein the machine learning result graph represents the soil organic matter classification result based on machine learning;

[0010] The machine learning result graph is used as a pseudo label, and the soil organic matter classification model to be trained is trained according to the image source data and the vegetation index image to obtain a soil organic matter classification model.

[0011] The present embodiment provides a soil organic matter classification model training method, which can obtain comprehensive regional information and vegetation health status by collecting data from a preset area, obtaining image source data and vegetation index images. Then, the soil sample data and the corresponding vegetation index data are used to train the machine learning model, and the relationship between soil properties (such as organic matter content) and vegetation index data can be established. The machine learning model can learn how to associate vegetation index data with soil properties, thereby realizing the classification and prediction of soil organic matter. Then the image source data and vegetation index image are input into the trained machine learning model, and the generated machine learning result graph can be used as a pseudo-label to enhance the scale of the data set, and the soil organic matter classification model is further trained based on the image source data and vegetation index image, so as to improve the accuracy and robustness of the classification model and realize a more extensive and accurate classification of soil organic matter. This embodiment can not only quickly and automatically classify soil organic matter, but also improve the accuracy and reliability of the classification results by optimizing the model and enhancing the data set.

[0012] Optionally, there are multiple machine learning models, and the step of inputting the image source data and the vegetation index image into the machine learning model to generate a machine learning result graph includes:

[0013] For any machine learning model, a preselected soil organic matter classification result corresponding to each pixel point on the image of the preset area is obtained according to the image source data and the vegetation index image;

[0014] For each pixel point, selecting the pre-selected soil organic matter classification result with the largest number of occurrences as the target soil organic matter classification result corresponding to the pixel point;

[0015] The target soil organic matter classification results corresponding to each pixel point are integrated to generate the machine learning result graph.

[0016] This embodiment uses a variety of machine learning models to process image source data and vegetation index images, and predicts the soil organic matter classification results for each pixel. Since different models may have different ways of extracting and processing data features, this multi-model fusion method helps to improve the accuracy and reliability of classification. By counting the prediction results of different models for the same pixel, and selecting the result with the most occurrences as the final target soil organic matter classification result. This method can reduce the error in the prediction of a single model and improve the accuracy of the final classification result by integrating the prediction results of multiple models. Finally, the target soil organic matter classification results of each pixel are integrated into a machine learning result map, showing the distribution of soil organic matter in the preset area.

[0017] Optionally, the machine learning model includes at least one of a random forest, a support vector machine or a neural network.

[0018] Optionally, the machine learning result graph is used as a pseudo label, and a soil organic matter classification model to be trained is trained according to the image source data and the vegetation index image to obtain a soil organic matter classification model, including:

[0019] Inputting the image source data and the vegetation index image into the soil organic matter classification model to be trained to generate a deep learning result graph;

[0020] Constructing a cross entropy loss function based on the similarity between the pseudo-label and the deep learning result graph;

[0021] Using the soil sample data to verify the deep learning result graph, and constructing a verification loss function;

[0022] The soil organic matter classification model to be trained is trained based on the cross entropy loss function and the verification loss function to obtain the soil organic matter classification model.

[0023] This embodiment uses image source data and vegetation index images to input into the soil organic matter classification model to be trained (such as a convolutional neural network). The model can automatically extract features related to soil organic matter content (such as spectral features, texture features, etc.) from the image data and generate a deep learning result graph. The constructed cross entropy loss function is used to measure the difference between the deep learning result graph predicted by the model and the pseudo label, and the constructed verification loss function can measure the difference between the deep learning result graph predicted by the model and the soil sample data (true label). By combining the cross entropy loss function and the verification loss function to form a composite loss function, the training model is guided by back propagation, and the finally obtained trained soil organic matter classification model can achieve efficient and accurate soil organic matter classification.

[0024] Optionally, the step of inputting the image source data and the vegetation index image into the soil organic matter classification model to be trained to generate a deep learning result graph includes:

[0025] Overlaying the image source data and the vegetation index image to generate an overlay data graph;

[0026] Using the CNN-based residual network in the soil organic matter classification model to be trained, extracting local features from the superimposed data graph to obtain a local feature graph;

[0027] Using the pre-trained SegFormer module in the soil organic matter classification model to be trained, extracting global features from the superimposed data graph to obtain a global feature graph;

[0028] The local feature map and the global feature map are jointly processed, and the jointly processed feature map is classified using the SoftMax module in the soil organic matter classification model to be trained to generate the deep learning result map.

[0029] This embodiment integrates the information of the image source data and the vegetation index image through an overlay data map to generate an overlay data map containing multi-dimensional information, thereby providing more comprehensive geographic information. By extracting local features through the residual network in CNN, detailed features in the overlay data map, such as edges and textures, can be efficiently extracted. These local features can effectively capture the small-scale information in the image, which is helpful for the subsequent analysis and classification of details. Using the pre-trained SegFormer module, the global context information of the overlay data map can be captured to obtain a global feature map. Jointly processing the local feature map and the global feature map can fuse local detail information and global context information, which helps to improve the accuracy and robustness of the model in classification tasks. Classification through the SoftMax module can map the features of each pixel to a specific category, and generate a deep learning result map, which provides a detailed division of soil organic matter categories and improves the accuracy of classification.

[0030] Optionally, the local feature extraction includes local deep feature extraction and local shallow feature extraction; the local feature extraction is performed on the superimposed data graph using a residual network based on CNN in the soil organic matter classification model to be trained to obtain a local feature graph, including:

[0031] Using the CNN-based residual network in the soil organic matter classification model to be trained, extracting the local deep features from the superimposed data graph to obtain an initial local deep feature graph;

[0032] The ASPP module is used to expand the receptive field of the initial local deep feature map, and the result after the receptive field expansion is upsampled to obtain the target local deep feature map;

[0033] Using the CNN-based residual network in the soil organic matter classification model to be trained, extracting the local shallow features from the superimposed data graph to obtain a target local shallow feature graph;

[0034] The target local deep feature map and the target local shallow feature map are merged to obtain the local feature map.

[0035] This embodiment uses a residual network based on CNN to process the superimposed data map, which can extract abstract deep features in the image. These features often capture complex patterns and texture information in the data, thereby improving the ability to understand the high-level structure in the data. Using the ASPP module to expand the receptive field of the initial local deep feature map can effectively capture features of different scales. By extracting shallow features from the superimposed data map based on the residual network of CNN, detailed information in the image, such as edges and high-frequency textures, can be captured. These shallow features provide detailed information in the image, which plays an important role in fine discrimination in classification tasks. The target local deep feature map is merged with the target local shallow feature map, and the deep abstract features and shallow detailed features can be integrated. Through channel cascading or feature splicing, the generated local feature map contains both deep high-level information and shallow detailed information, which helps to comprehensively utilize information at different levels and ultimately optimizes the accuracy and effect of soil organic matter classification.

[0036] Optionally, the training the soil organic matter classification model to be trained based on the cross entropy loss function and the validation loss function to obtain the soil organic matter classification model includes:

[0037] Multiplying the cross entropy loss function and the verification loss function to obtain a mixed loss function;

[0038] The soil organic matter classification model to be trained is trained using the mixed loss function to obtain the soil organic matter classification model.

[0039] This embodiment multiplies the cross entropy loss function and the validation loss function to generate a mixed loss function. This processing method can ensure that the soil organic matter classification model not only optimizes the fit to the training data during the training process, but also takes into account the generalization ability on the validation data. In this way, the mixed loss function pays attention to the performance of the training and validation stages at the same time, avoiding the risk of overfitting the soil organic matter classification model only on the training data. The simultaneous optimization of the training set and the validation set is achieved, avoiding the limitations that may exist in a traditional loss function, thereby effectively improving the overall performance of the soil organic matter classification model.

[0040] In a second aspect, an embodiment of the present application provides a soil organic matter classification model training device, the device comprising:

[0041] A data acquisition module is used to collect data from a preset area and obtain image source data and vegetation index images of the preset area;

[0042] A machine learning module, used to train a machine learning model to be trained using soil sample data and its corresponding vegetation index data to obtain a machine learning model;

[0043] A machine learning result graph generating module, used for inputting the image source data and the vegetation index image into the machine learning model to generate a machine learning result graph;

[0044] The soil organic matter classification module is used to use the machine learning result image as a pseudo label, and train the soil organic matter classification model to be trained according to the image source data and the vegetation index image to obtain the soil organic matter classification model.

[0045] The present embodiment provides a soil organic matter classification model training device, which can obtain comprehensive regional information and vegetation health status by collecting data from a preset area, obtaining image source data and vegetation index images. Then, the soil sample data and the corresponding vegetation index data are used to train the machine learning model, and the relationship between soil properties (such as organic matter content) and vegetation index data can be established. The machine learning model can learn how to associate vegetation index data with soil properties, thereby realizing the classification and prediction of soil organic matter. Then the image source data and vegetation index image are input into the trained machine learning model, and the generated machine learning result graph can be used as a pseudo-label to enhance the scale of the data set, and the soil organic matter classification model is further trained based on the image source data and vegetation index image, so as to improve the accuracy and robustness of the classification model and realize a more extensive and accurate classification of soil organic matter. This embodiment can not only quickly and automatically classify soil organic matter, but also improve the accuracy and reliability of the classification results by optimizing the model and enhancing the data set.

[0046] Optionally, there are multiple machine learning models, and the machine learning result graph generating module includes:

[0047] A pre-selection classification unit, for obtaining, for any machine learning model, a pre-selected soil organic matter classification result corresponding to each pixel point on the image of the preset area according to the image source data and the vegetation index image;

[0048] A target classification unit, for selecting, for each pixel point, a pre-selected soil organic matter classification result with the largest number of occurrences as a target soil organic matter classification result corresponding to the pixel point;

[0049] The machine learning result generating unit is used to integrate the target soil organic matter classification results corresponding to each pixel point to generate the machine learning result graph.

[0050] This embodiment uses a variety of machine learning models to process image source data and vegetation index images, and predicts the soil organic matter classification results for each pixel. Since different models may have different ways of extracting and processing data features, this multi-model fusion method helps to improve the accuracy and reliability of classification. By counting the prediction results of different models for the same pixel, and selecting the result with the most occurrences as the final target soil organic matter classification result. This method can reduce the error in the prediction of a single model and improve the accuracy of the final classification result by integrating the prediction results of multiple models. Finally, the target soil organic matter classification results of each pixel are integrated into a machine learning result map, showing the distribution of soil organic matter in the preset area.

[0051] Optionally, the machine learning model includes at least one of a random forest, a support vector machine or a neural network.

[0052] Optionally, the soil organic matter classification module comprises:

[0053] A deep learning result generating unit, used for inputting the image source data and the vegetation index image into the soil organic matter classification model to be trained to generate a deep learning result graph;

[0054] A cross entropy loss function construction unit, used to construct a cross entropy loss function based on the similarity between the pseudo label and the deep learning result graph;

[0055] A verification loss function construction unit, used to verify the deep learning result graph using the soil sample data and construct a verification loss function;

[0056] The organic matter classification model unit is used to train the soil organic matter classification model to be trained based on the cross entropy loss function and the verification loss function to obtain the soil organic matter classification model.

[0057] This embodiment uses image source data and vegetation index images to input into the soil organic matter classification model to be trained (such as a convolutional neural network). The model can automatically extract features related to soil organic matter content (such as spectral features, texture features, etc.) from the image data and generate a deep learning result graph. The constructed cross entropy loss function is used to measure the difference between the deep learning result graph predicted by the model and the pseudo label, and the constructed verification loss function can measure the difference between the deep learning result graph predicted by the model and the soil sample data (true label). By combining the cross entropy loss function and the verification loss function to form a composite loss function, the training model is guided by back propagation, and the finally obtained trained soil organic matter classification model can achieve efficient and accurate soil organic matter classification.

[0058] Optionally, the deep learning result generating unit includes:

[0059] Overlaying the image source data and the vegetation index image to generate an overlay data graph;

[0060] Using the CNN-based residual network in the soil organic matter classification model to be trained, extracting local features from the superimposed data graph to obtain a local feature graph;

[0061] Using the pre-trained SegFormer module in the soil organic matter classification model to be trained, extracting global features from the superimposed data graph to obtain a global feature graph;

[0062] The local feature map and the global feature map are jointly processed, and the jointly processed feature map is classified using the SoftMax module in the soil organic matter classification model to be trained to generate the deep learning result map.

[0063] This embodiment integrates the information of the image source data and the vegetation index image through an overlay data map to generate an overlay data map containing multi-dimensional information, thereby providing more comprehensive geographic information. By extracting local features through the residual network in CNN, detailed features in the overlay data map, such as edges and textures, can be efficiently extracted. These local features can effectively capture the small-scale information in the image, which is helpful for the subsequent analysis and classification of details. Using the pre-trained SegFormer module, the global context information of the overlay data map can be captured to obtain a global feature map. Jointly processing the local feature map and the global feature map can fuse local detail information and global context information, which helps to improve the accuracy and robustness of the model in classification tasks. Classification through the SoftMax module can map the features of each pixel to a specific category, and generate a deep learning result map, which provides a detailed division of soil organic matter categories and improves the accuracy of classification.

[0064] Optionally, the local feature extraction includes local deep feature extraction and local shallow feature extraction; the local feature extraction is performed on the superimposed data graph using a residual network based on CNN in the soil organic matter classification model to be trained to obtain a local feature graph, including:

[0065] Using the CNN-based residual network in the soil organic matter classification model to be trained, extracting the local deep features from the superimposed data graph to obtain an initial local deep feature graph;

[0066] The ASPP module is used to expand the receptive field of the initial local deep feature map, and the result after the receptive field expansion is upsampled to obtain the target local deep feature map;

[0067] Using the CNN-based residual network in the soil organic matter classification model to be trained, extracting the local shallow features from the superimposed data graph to obtain a target local shallow feature graph;

[0068] The target local deep feature map and the target local shallow feature map are merged to obtain the local feature map.

[0069] This embodiment uses a residual network based on CNN to process the superimposed data map, which can extract abstract deep features in the image. These features often capture complex patterns and texture information in the data, thereby improving the ability to understand the high-level structure in the data. Using the ASPP module to expand the receptive field of the initial local deep feature map can effectively capture features of different scales. By extracting shallow features from the superimposed data map based on the residual network of CNN, detailed information in the image, such as edges and high-frequency textures, can be captured. These shallow features provide detailed information in the image, which plays an important role in fine discrimination in classification tasks. The target local deep feature map is merged with the target local shallow feature map, and the deep abstract features and shallow detailed features can be integrated. Through channel cascading or feature splicing, the generated local feature map contains both deep high-level information and shallow detailed information, which helps to comprehensively utilize information at different levels and ultimately optimizes the accuracy and effect of soil organic matter classification.

[0070] Optionally, the organic matter classification model unit comprises:

[0071] Multiplying the cross entropy loss function and the verification loss function to obtain a mixed loss function;

[0072] The soil organic matter classification model to be trained is trained using the mixed loss function to obtain the soil organic matter classification model.

[0073] This embodiment multiplies the cross entropy loss function and the validation loss function to generate a mixed loss function. This processing method can ensure that the soil organic matter classification model not only optimizes the fit to the training data during the training process, but also takes into account the generalization ability on the validation data. In this way, the mixed loss function pays attention to the performance of the training and validation stages at the same time, avoiding the risk of overfitting the soil organic matter classification model only on the training data. The simultaneous optimization of the training set and the validation set is achieved, avoiding the limitations that may exist in a traditional loss function, thereby effectively improving the overall performance of the soil organic matter classification model.

[0074] In a third aspect, an embodiment of the present application provides a computer device, including:

[0075] A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the above-mentioned soil organic matter classification model training method by executing the computer instructions.

[0076] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable a computer to execute the soil organic matter classification model training method described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0078] Figure 1 An application scenario diagram of a soil organic matter classification model training method provided in an embodiment of the present application;

[0079] Figure 2 A flow chart of a soil organic matter classification model training method provided in an embodiment of the present application;

[0080] Figure 3 A flowchart of step S5 provided in an embodiment of the present application;

[0081] Figure 4 A flowchart of step S7 provided in an embodiment of the present application;

[0082] Figure 5 A flowchart of step S71 provided in an embodiment of the present application;

[0083] Figure 6 A flowchart of step S713 provided in an embodiment of the present application;

[0084] Figure 7 A flowchart of step S77 provided in an embodiment of the present application;

[0085] Figure 8 A framework diagram of a soil organic matter classification model training device provided in an embodiment of the present application;

[0086] Fig. 9 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0087] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0088] At present, remote sensing mapping of soil organic matter is mainly divided into two strategies: based on spectral index and based on machine learning and statistics. The method based on spectral index relies on detailed research on the correlation between soil organic matter and spectral characteristics of surface species. It takes a lot of time and expertise to construct the inversion index, and is affected by the "same object, different spectra, same spectrum, different objects" in spectral data, so the overall accuracy needs to be improved.

[0089] The method based on machine learning and statistics introduces machine learning into geographic mapping tasks, and achieves high-precision mapping by analyzing sample characteristics. However, since soil samples are usually small sample data, it is easy to cause overfitting in local areas. Although some scholars have incorporated environmental variables and statistical knowledge into the model to improve accuracy and obtain better results in the local area, overall, this method still fails to deeply mine the characteristic information of the sample, and thus has certain limitations in universality.

[0090] This manual provides a soil organic matter classification model training method, which can be applied to Figure 1 See the application scenario shown in Figure 1 In the machine learning stage of soil organic matter inversion, due to the limited soil sample data, the measured soil sample data and the corresponding vegetation index data are used to model the model using methods with high tolerance for small sample data such as random forest, support vector machine and traditional neural network. First, the machine learning model for inverting organic matter content is obtained through these machine learning methods. Then, the image source data and vegetation index image are input into these machine learning models to perform soil organic matter inversion of regional images. The output result adopts a voting mechanism, that is, the classification result with the most occurrences is used as the target soil organic matter classification result of the pixel point to generate a machine learning result map. Subsequently, these machine learning result maps are added as pseudo labels to the soil organic matter classification model based on deep learning for modeling training.

[0091] In the deep learning stage, the image source data and the vegetation index image are first superimposed to generate a new superimposed data map. Then, the local information of the superimposed data map is extracted using a CNN-based residual network. This process is divided into two stages: local deep feature extraction and local shallow feature extraction. The convolution kernel size is 3×3, and ASPP is used to expand the receptive field of deep information to more fully explore the spatial association of the data. The local deep feature map and the local shallow feature map are merged to output a local feature map with a size of 1 / 4 of the original image.

[0092] The global feature extraction uses the pre-trained SegFormer module, which first transforms the data dimension through 1×1 convolution, and then extracts a global feature map of 1 / 4 the size of the original image. Next, the local feature map and the global feature map are processed jointly, and the feature map size is restored to the same size as the input data through upsampling. Finally, the SoftMax module is used to classify the results and output the deep learning result map.

[0093] The cross entropy loss function is calculated between the deep learning result graph and the pseudo-label graph, and the soil sample data is used to verify the deep learning result graph, that is, the classification results extracted from the deep learning result graph are compared with the accuracy of the soil sample data row. The product of the verification loss function and the cross entropy loss function is calculated to obtain a mixed loss function that reflects the effect of the soil organic matter classification model. The soil organic matter classification model construction process is guided by back propagation, and finally the optimal soil organic matter classification model is formed and applied to the subsequent soil organic matter inversion task.

[0094] According to an embodiment of the present application, an embodiment of a soil organic matter classification model training method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0095] In this embodiment, a soil organic matter classification model training method is provided. Figure 2 A flow chart of a soil organic matter classification model training method provided in an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0096] Step S1, collecting data for a preset area to obtain image source data and vegetation index images of the preset area.

[0097] Specifically, the image source data comes from different remote sensing satellites, such as Landsat, Sentinel, MODIS, etc., which can provide image data with different resolutions and different spectral ranges. Vegetation index images include Normalized Difference Vegetation Index (NDVI) or Enhanced Vegetation Index (EVI), which are calculated through remote sensing image data and are used to reflect the growth status and coverage of vegetation.

[0098] Step S3, using the soil sample data and its corresponding vegetation index data to train the machine learning model to be trained, to obtain a machine learning model.

[0099] The soil sample data includes the organic matter content of the soil. The pixels corresponding to the soil sample data are initially divided into three basic levels according to their organic matter content: high (>5%), medium (2-5%), and low (<2%). For soils with high organic matter content, they are further subdivided at geometric intervals of 5%. This means: first-class high organic matter content soil: 5-10%; second-class high organic matter content soil: 10-20%; third-class high organic matter content soil: 20-35%; and so on, and can be further subdivided as needed. For each soil sample or pixel, the above classification standard is applied according to its measured organic matter content to determine its level.

[0100] Vegetation index data is obtained through remote sensing technology, such as NDVI or EVI. In order to establish a common index machine learning dataset, it is necessary to match the location information (such as longitude and latitude or other geographic coordinates) of each soil sample data point with the vegetation index data at the corresponding location.

[0101] Specifically, for each matched soil sample data point, soil properties such as organic matter content are extracted from the soil sample data as features, and NDVI or EVI are extracted from the matched vegetation index data as target variables or other features. An appropriate machine learning model is selected to learn the relationship between soil sample data and vegetation index data to classify soil organic matter, and an optimized machine learning model is trained to achieve the expansion of small sample data. The machine learning model here can be selected as random forest, support vector machine, traditional neural network, etc.

[0102] Step S5, inputting the image source data and the vegetation index image into the machine learning model to generate a machine learning result graph; wherein the machine learning result graph represents the soil organic matter classification result based on machine learning.

[0103] Specifically, the image source data and vegetation index image are input into the machine learning model. Since the machine learning model has learned how soil sample data and vegetation index data affect classification results such as organic matter content during training, the machine learning model will classify the soil organic matter in the preset area according to the image source data and vegetation index image, and finally present a machine learning result map, reflecting the classification of organic matter in different soil areas.

[0104] Step S7, using the machine learning result image as a pseudo label, and training the soil organic matter classification model to be trained according to the image source data and the vegetation index image to obtain a soil organic matter classification model.

[0105] Specifically, pseudo-labeling is a semi-supervised learning technique that uses the model's own prediction results as labels to train the model, which helps improve the performance of the model when there is a lack of a large amount of labeled data. The image source data and vegetation index images are combined with the generated pseudo-labels to form an enhanced data set, which is input into the soil organic matter classification model to be trained. The model parameters are adjusted through the optimization algorithm, and the performance of the model is evaluated through independent validation sets and test sets to improve the model's prediction accuracy for soil organic matter distribution. The soil organic matter classification model finally trained can be applied to a wider range of areas to achieve rapid, efficient and automated classification of soil organic matter.

[0106] The present embodiment provides a soil organic matter classification model training method, which can obtain comprehensive regional information and vegetation health status by collecting data from a preset area, obtaining image source data and vegetation index images. Then, the soil sample data and the corresponding vegetation index data are used to train the machine learning model, and the relationship between soil properties (such as organic matter content) and vegetation index data can be established. The machine learning model can learn how to associate vegetation index data with soil properties, thereby realizing the classification and prediction of soil organic matter. Then the image source data and vegetation index image are input into the trained machine learning model, and the generated machine learning result graph can be used as a pseudo-label to enhance the scale of the data set, and the soil organic matter classification model is further trained based on the image source data and vegetation index image, so as to improve the accuracy and robustness of the classification model and realize a more extensive and accurate classification of soil organic matter. This embodiment can not only quickly and automatically classify soil organic matter, but also improve the accuracy and reliability of the classification results by optimizing the model and enhancing the data set.

[0107] Figure 3 The flowchart of step S5 provided in the embodiment of the present application, wherein there are multiple machine learning models, the process may include the following steps:

[0108] Step S51, for any machine learning model, obtain a preselected soil organic matter classification result corresponding to each pixel point on the image of the preset area according to the image source data and the vegetation index image.

[0109] Specifically, there are multiple machine learning models, including random forests, support vector machines, and traditional neural networks. First, ensure that the image source data and the vegetation index image have the same spatial resolution and registration (alignment), and preprocess the data, including noise reduction, thin cloud processing, shadow processing, geometric correction, etc., to ensure data quality. Then, extract features related to soil organic matter content from the image source data, such as spectral features, texture features, etc. Extract features reflecting the growth status of vegetation from the vegetation index image, such as the normalized vegetation index (NDVI) or the enhanced vegetation index (EVI). For any trained machine learning model, it is applied to each pixel in the data set, and the pre-selected soil organic matter classification result of each pixel is predicted based on the feature data of its image source data and the vegetation index of the vegetation index image.

[0110] Step S53: for each pixel point, select the pre-selected soil organic matter classification result with the largest number of occurrences as the target soil organic matter classification result corresponding to the pixel point.

[0111] Specifically, multiple different machine learning models are used to process the same image source data and vegetation index image to obtain the soil organic matter classification results of each pixel in the preset area by each machine learning model. Then all the prediction results of each pixel are counted, and the number of occurrences of each classification result is counted. For each pixel, the classification result with the most occurrences is selected as the target soil organic matter classification result of the pixel. This means that the classification result is the result of consensus of multiple machine learning models and has higher reliability.

[0112] Step S55, integrating the target soil organic matter classification results corresponding to each pixel point to generate the machine learning result graph.

[0113] Specifically, the classification results of all pixel points are integrated according to their spatial positions to generate a machine learning result map, which shows the distribution of soil organic matter in the preset area and the probability distribution of the classification results at each pixel point.

[0114] and Figure 2Compared with the embodiment shown, this embodiment uses multiple machine learning models to process the image source data and vegetation index images, and predicts the soil organic matter classification results for each pixel. Since different models may have different ways of extracting and processing data features, this multi-model fusion method helps to improve the accuracy and reliability of classification. By counting the prediction results of different models for the same pixel, and selecting the result with the most occurrences as the final target soil organic matter classification result. This method can reduce the error in the prediction of a single model and improve the accuracy of the final classification result by integrating the prediction results of multiple models. Finally, the target soil organic matter classification results of each pixel are integrated into a machine learning result graph, showing the distribution of soil organic matter in the preset area.

[0115] In some embodiments, the machine learning model includes at least one of a random forest, a support vector machine, or a neural network.

[0116] Figure 4 The flowchart of step S7 provided in the embodiment of the present application may include the following steps:

[0117] Step S71, inputting the image source data and the vegetation index image into the soil organic matter classification model to be trained to generate a deep learning result graph.

[0118] Specifically, image source data and vegetation index images are input into the soil organic matter classification model to be trained. The soil organic matter classification model is a deep learning model, such as a convolutional neural network (CNN). The model can learn the relationship between image source data and soil organic matter content. The deep learning model automatically extracts features in the image data through its multi-layer structure. These features may include spectral features and texture features related to soil organic matter content. The features are then analyzed to generate a deep learning result map. Each pixel on the deep learning result map has a probability distribution of the classification result.

[0119] Step S73, constructing a cross entropy loss function based on the similarity between the pseudo label and the deep learning result graph.

[0120] Specifically, the probability estimate of soil organic matter classification for each pixel will be displayed on the deep learning result map, and the probability estimate of soil organic matter classification for each pixel will also be displayed on the pseudo-label. Here, the pseudo-label is used as the true label of the unlabeled data for further training of the soil organic matter classification model. Therefore, it is necessary to construct a cross-entropy loss function to measure the difference between the predicted probability distribution output by the soil organic matter classification model and the pseudo-label. If the predicted probability distribution of the soil organic matter classification model is exactly the same as the pseudo-label, then the cross-entropy loss function is zero, indicating that the prediction of the soil organic matter classification model is perfect. On the contrary, if the predicted probability distribution is very different from the pseudo-label, the cross-entropy loss function will be very large, indicating that there is a large error in the prediction of the soil organic matter classification model. During the training process, by minimizing the cross-entropy loss function, the soil organic matter classification model learns how to adjust its parameters to improve the accuracy of the prediction. For example, gradient descent or other optimization algorithms can be used to update the weights and biases of the model according to the gradient of the loss function, with the goal of making the predicted probability distribution as close to the pseudo-label as possible, thereby minimizing the value of the cross-entropy loss function.

[0121] Step S75, using the soil sample data to verify the deep learning result graph and construct a verification loss function.

[0122] Specifically, in order to evaluate the performance of the soil organic matter classification model, a validation loss function needs to be constructed. This validation loss function usually also adopts the cross entropy loss function, which can measure the difference between the probability distribution predicted by the model and the soil sample data (true label). By minimizing the validation loss function, the model can be adjusted to better match the true label of the sample data. The model is optimized using the validation loss function. During the training process, the parameters of the soil organic matter classification model are updated through back propagation and gradient descent algorithms to reduce the prediction error and improve the accuracy of the model.

[0123] Step S77, training the soil organic matter classification model to be trained based on the cross entropy loss function and the verification loss function to obtain the soil organic matter classification model.

[0124] Specifically, the cross entropy loss function and the validation loss function are combined to form a composite loss function. This composite loss function takes into account the performance of the soil organic matter classification model on both the training set and the validation set to ensure that the model not only performs well on the training data, but also generalizes on unseen data. The soil organic matter classification model is trained using the training data (including labeled soil sample data and pseudo labels generated from unlabeled data). In each iteration, the value of the composite loss function is calculated, and the parameters of the soil organic matter classification model are updated through the back-propagation algorithm. If the validation loss does not decrease significantly over multiple consecutive training cycles, the training process is stopped.

[0125] and Figure 2 Compared with the embodiment shown, this embodiment uses image source data and vegetation index images to be input into the soil organic matter classification model to be trained (such as a convolutional neural network). The model can automatically extract features related to the soil organic matter content (such as spectral features, texture features, etc.) from the image data and generate a deep learning result graph. The constructed cross entropy loss function is used to measure the difference between the deep learning result graph predicted by the model and the pseudo label, and the constructed verification loss function can measure the difference between the deep learning result graph predicted by the model and the soil sample data (true label). By combining the cross entropy loss function and the verification loss function to form a composite loss function, and guiding the training model through back propagation, the finally obtained trained soil organic matter classification model can achieve efficient and accurate soil organic matter classification.

[0126] Figure 5 The flowchart of step S71 provided in the embodiment of the present application may include the following steps:

[0127] Step S711, superimposing the image source data and the vegetation index image to generate a superimposed data graph.

[0128] Specifically, the image source data and vegetation index image are registered to ensure their consistency in geographic space, including cropping, scaling or transformation of images so that they are aligned in the same spatial frame. The image source data and vegetation index image are standardized to make the pixel value ranges of different data sources consistent. The image source data and vegetation index image are integrated together through pixel-level superposition, which can be achieved through simple data fusion technology, that is, the N-dimensional image source data and the M-dimensional vegetation index image are superimposed into a (N+M)-dimensional superimposed data map.

[0129] Step S713, using the CNN-based residual network in the soil organic matter classification model to be trained, extracting local features from the superimposed data graph to obtain a local feature graph.

[0130] The Residual Network (ResNet) uses its internal convolutional layers to extract local features in the superimposed data graph and obtain local feature maps. The core of the residual network is the residual block, each of which consists of multiple convolutional layers, batch normalization layers, and activation function layers. These layers are responsible for extracting local features of the input data. In each convolutional layer, the convolution operation captures local features of the superimposed data graph, such as edges, textures, etc., through filters to obtain local feature maps.

[0131] Specifically, based on the residual network of CNN, local feature extraction of the superimposed data graph can refer to the DeepLab network, and image segmentation can be performed by effectively combining deep and shallow features. In the process of local information extraction, the DeepLab network structure divides the information into two stages: shallow information and deep information, which helps the model to more fully explore the spatial association of the data. In the shallow information extraction stage, a smaller convolution kernel (such as 3×3) is usually used to capture the local detail features of the image. These features contain high-frequency information such as edges and textures. The deep information extraction stage uses the advanced features in the deep network, which have a large receptive field and can capture the semantic information in the image. In DeepLab, the ASPP (Atrous Spatial Pyramid Pooling) module of the atrous convolution can be used to extract deep information. The ASPP module captures features of different scales through convolutions with different expansion rates, thereby expanding the receptive field. The extracted shallow information and deep information are fused, and feature integration is usually achieved through a 1×1 convolution operation. Finally, the integrated features are restored to the same size as the original image through upsampling to form a local feature map.

[0132] Step S715, using the pre-trained SegFormer module in the soil organic matter classification model to be trained, perform global feature extraction on the superimposed data graph to obtain a global feature graph.

[0133] Specifically, since the SegFormer module is a pre-trained model for three-channel images, a 1×1 convolutional layer is needed to transform the dimension of the superimposed data graph to match the input requirements of the model. Load the pre-trained SegFormer module, which has been trained on a large-scale dataset and has learned rich feature representations. SegFormer uses the characteristics of its Transformer architecture to capture global context information and obtain a global feature map.

[0134] Step S717, jointly process the local feature map and the global feature map, and classify the jointly processed feature map using the SoftMax module in the soil organic matter classification model to be trained to generate the deep learning result map.

[0135] Specifically, the local feature map and the global feature map are processed jointly. This usually involves superimposing or concatenating the feature maps to integrate the information in the two feature maps. In addition, if the size of the feature map is smaller than the original input data, an upsampling technique (such as transposed convolution or nearest neighbor interpolation) is used to adjust the feature map to the same size as the input data. The integrated feature map is input into the classifier, usually using the SoftMax module as the classifier, to generate a deep learning result map, in which each pixel has a probability score corresponding to each category.

[0136] and Figure 4 Compared with the embodiment shown, this embodiment integrates the information of the image source data and the vegetation index image through an overlay data map to generate an overlay data map containing multi-dimensional information, thereby providing more comprehensive geographic information. By extracting local features through the residual network in CNN, detail features such as edges and textures in the overlay data map can be efficiently extracted. These local features can effectively capture the small-scale information in the image, which is helpful for the subsequent analysis and classification of details. Using the pre-trained SegFormer module, the global context information of the overlay data map can be captured to obtain a global feature map. Jointly processing the local feature map and the global feature map can fuse local detail information and global context information, which helps to improve the accuracy and robustness of the model in classification tasks. Classification through the SoftMax module can map the features of each pixel to a specific category, and generate a deep learning result map, which provides a detailed division of soil organic matter categories and improves the accuracy of classification.

[0137] Figure 6 The flowchart of step S713 provided in the embodiment of the present application, wherein the local feature extraction includes local deep feature extraction and local shallow feature extraction; the process may include the following steps:

[0138] Step S7131, using the CNN-based residual network in the soil organic matter classification model to be trained, performing the local deep feature extraction on the superimposed data map to obtain an initial local deep feature map.

[0139] Specifically, the stacked data graph is processed using a residual network based on a convolutional neural network (CNN) to extract initial local deep feature maps. These deep features usually contain abstract representations of the stacked data graph and can capture more complex patterns and texture information.

[0140] Step S7133, using the ASPP module to expand the receptive field of the initial local deep feature map, and upsampling the result after the receptive field expansion to obtain the target local deep feature map.

[0141] Specifically, the Atrous Spatial Pyramid Pooling (ASPP) module is used to process the initial local deep feature map to expand the receptive field of the model. ASPP can capture features of different scales through convolution kernels with different expansion rates, thereby effectively extracting multi-scale and multi-level information. The result after the receptive field expansion is restored to the original image size or the required size through upsampling to obtain the target local deep feature map.

[0142] Step S7135, using the CNN-based residual network in the soil organic matter classification model to be trained, performing the local shallow feature extraction on the superimposed data map to obtain a target local shallow feature map.

[0143] Specifically, a CNN-based residual network is used to extract a local shallow feature map of the target. The local shallow feature map of the target usually contains high-frequency information of the image, such as edges and details.

[0144] Step S7137, merging the target local deep feature map and the target local shallow feature map to obtain the local feature map.

[0145] Specifically, the target local deep feature map and the target local shallow feature map are merged, usually through channel cascading or feature splicing, with the aim of integrating the complementary information in the deep and shallow features. The merged feature map is called a local feature map, which contains both deep abstract features and shallow detailed features.

[0146] and Figure 5 Compared with the embodiment shown, this embodiment uses a residual network based on CNN to process the superimposed data map, which can extract abstract deep features in the image. These features often capture complex patterns and texture information in the data, thereby improving the ability to understand high-level structures in the data. Using the ASPP module to expand the receptive field of the initial local deep feature map can effectively capture features of different scales. By extracting shallow features from the superimposed data map based on the residual network of CNN, detailed information in the image, such as edges and high-frequency textures, can be captured. These shallow features provide detailed information in the image, which plays an important role in fine discrimination in classification tasks. Merging the target local deep feature map with the target local shallow feature map can integrate deep abstract features and shallow detail features. Through channel cascading or feature splicing, the generated local feature map contains both deep high-level information and shallow detail information, which helps to comprehensively utilize information at different levels and ultimately optimizes the accuracy and effect of soil organic matter classification.

[0147] Figure 7 The flowchart of step S77 provided in the embodiment of the present application may include the following steps:

[0148] Step S771, multiplying the cross entropy loss function and the verification loss function to obtain a hybrid loss function.

[0149] Specifically, the cross entropy loss function and the validation loss function are multiplied to obtain a hybrid loss function, which can simultaneously consider the model's fit on the training set and its generalization ability on the validation set.

[0150] Step S773, using the mixed loss function to train the soil organic matter classification model to be trained to obtain the soil organic matter classification model.

[0151] Specifically, the value of the mixed loss function is used to back-propagate the parameters of the soil organic matter classification model and calculate the gradient of each parameter. Use gradient descent or more advanced optimizers (such as Adam, RMSprop, etc.) to update the model parameters according to the calculated gradient. Until the performance of the soil organic matter classification model on the validation set no longer improves, or reaches the preset number of training cycles, a trained soil organic matter classification model is obtained.

[0152] and Figure 4 Compared with the embodiment shown, this embodiment multiplies the cross entropy loss function and the validation loss function to generate a mixed loss function. This processing method can ensure that the soil organic matter classification model not only optimizes the fit to the training data during the training process, but also considers the generalization ability on the validation data. In this way, the mixed loss function pays attention to the performance of the training and validation stages at the same time, avoiding the risk of overfitting the soil organic matter classification model only on the training data. The simultaneous optimization of the training set and the validation set is achieved, avoiding the limitations that may exist in a traditional loss function, thereby effectively improving the overall performance of the soil organic matter classification model.

[0153] Accordingly, please refer to Figure 8 , a framework diagram of a soil organic matter classification model training device provided in an embodiment of the present application, the device comprising:

[0154] The data acquisition module 101 is used to collect data from a preset area and obtain image source data and vegetation index images of the preset area;

[0155] The machine learning module 103 is used to train the machine learning model to be trained using the soil sample data and the corresponding vegetation index data to obtain the machine learning model;

[0156] A machine learning result graph generating module 105 is used to input the image source data and the vegetation index image into the machine learning model to generate a machine learning result graph;

[0157] The soil organic matter classification module 107 is used to use the machine learning result image as a pseudo label, and train the soil organic matter classification model to be trained according to the image source data and the vegetation index image to obtain a soil organic matter classification model.

[0158] In some embodiments, the machine learning model is multiple, and the machine learning result graph generation module 105 includes:

[0159] A pre-selection classification unit, for obtaining, for any machine learning model, a pre-selected soil organic matter classification result corresponding to each pixel point on the image of the preset area according to the image source data and the vegetation index image;

[0160] A target classification unit, for selecting, for each pixel point, a pre-selected soil organic matter classification result with the largest number of occurrences as a target soil organic matter classification result corresponding to the pixel point;

[0161] The machine learning result generating unit is used to integrate the target soil organic matter classification results corresponding to each pixel point to generate the machine learning result graph.

[0162] In some embodiments, the machine learning model includes at least one of a random forest, a support vector machine, or a neural network.

[0163] In some embodiments, the soil organic matter classification module 107 includes:

[0164] A deep learning result generating unit, used for inputting the image source data and the vegetation index image into the soil organic matter classification model to be trained to generate a deep learning result graph;

[0165] A cross entropy loss function construction unit, used to construct a cross entropy loss function based on the similarity between the pseudo label and the deep learning result graph;

[0166] A verification loss function construction unit, used to verify the deep learning result graph using the soil sample data and construct a verification loss function;

[0167] The organic matter classification model unit is used to train the soil organic matter classification model to be trained based on the cross entropy loss function and the verification loss function to obtain the soil organic matter classification model.

[0168] In some embodiments, the deep learning result generating unit includes:

[0169] Overlaying the image source data and the vegetation index image to generate an overlay data graph;

[0170] Using the CNN-based residual network in the soil organic matter classification model to be trained, extracting local features from the superimposed data graph to obtain a local feature graph;

[0171] Using the pre-trained SegFormer module in the soil organic matter classification model to be trained, extracting global features from the superimposed data graph to obtain a global feature graph;

[0172] The local feature map and the global feature map are jointly processed, and the jointly processed feature map is classified using the SoftMax module in the soil organic matter classification model to be trained to generate the deep learning result map.

[0173] In some embodiments, the local feature extraction includes local deep feature extraction and local shallow feature extraction; the local feature extraction of the superimposed data graph using the residual network based on CNN in the soil organic matter classification model to be trained to obtain a local feature graph includes:

[0174] Using the CNN-based residual network in the soil organic matter classification model to be trained, extracting the local deep features from the superimposed data graph to obtain an initial local deep feature graph;

[0175] The ASPP module is used to expand the receptive field of the initial local deep feature map, and the result after the receptive field expansion is upsampled to obtain the target local deep feature map;

[0176] Using the CNN-based residual network in the soil organic matter classification model to be trained, extracting the local shallow features from the superimposed data graph to obtain a target local shallow feature graph;

[0177] The target local deep feature map and the target local shallow feature map are merged to obtain the local feature map.

[0178] In some embodiments, the organic matter classification model unit comprises:

[0179] Multiplying the cross entropy loss function and the verification loss function to obtain a mixed loss function;

[0180] The soil organic matter classification model to be trained is trained using the mixed loss function to obtain the soil organic matter classification model.

[0181] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0182] A soil organic matter classification model training device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0183] See also Fig. 9 , Fig. 9 A schematic diagram of the structure of a computer device provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 10 is taken as an example.

[0184] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0185] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0186] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0187] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0188] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0189] The embodiment of the present application also provides a computer-readable storage medium. The above method according to the embodiment of the present application can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0190] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0191] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0192] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0193] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0194] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0195] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0196] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0197] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0198] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

[0199] Although the embodiments of the present application have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A soil organic matter classification model training method, characterized in that: The method comprises: Collecting data for a preset area to obtain image source data and vegetation index images of the preset area; Using soil sample data and its corresponding vegetation index data to train the machine learning model to be trained, to obtain a machine learning model; Inputting the image source data and the vegetation index image into the machine learning model to generate a machine learning result graph; wherein the machine learning result graph represents the soil organic matter classification result based on machine learning; The machine learning result graph is used as a pseudo label, and the soil organic matter classification model to be trained is trained according to the image source data and the vegetation index image to obtain a soil organic matter classification model.

2. The method according to claim 1, characterized in that There are multiple machine learning models, and the image source data and the vegetation index image are input into the machine learning model to generate a machine learning result graph, including: For any machine learning model, a preselected soil organic matter classification result corresponding to each pixel point on the image of the preset area is obtained according to the image source data and the vegetation index image; For each pixel point, selecting the pre-selected soil organic matter classification result with the largest number of occurrences as the target soil organic matter classification result corresponding to the pixel point; The target soil organic matter classification results corresponding to each pixel point are integrated to generate the machine learning result graph.

3. The method according to claim 1 or 2, characterized in that: The machine learning model includes at least one of a random forest, a support vector machine, or a neural network.

4. The method according to claim 1, characterized in that The method uses the machine learning result graph as a pseudo label, and trains the soil organic matter classification model to be trained according to the image source data and the vegetation index image to obtain the soil organic matter classification model, including: Inputting the image source data and the vegetation index image into the soil organic matter classification model to be trained to generate a deep learning result graph; Constructing a cross entropy loss function based on the similarity between the pseudo-label and the deep learning result graph; Using the soil sample data to verify the deep learning result graph, and constructing a verification loss function; The soil organic matter classification model to be trained is trained based on the cross entropy loss function and the verification loss function to obtain the soil organic matter classification model.

5. The method according to claim 4, characterized in that The step of inputting the image source data and the vegetation index image into the soil organic matter classification model to be trained to generate a deep learning result graph includes: Overlaying the image source data and the vegetation index image to generate an overlay data graph; Using the CNN-based residual network in the soil organic matter classification model to be trained, extracting local features from the superimposed data graph to obtain a local feature graph; Using the pre-trained SegFormer module in the soil organic matter classification model to be trained, extracting global features from the superimposed data graph to obtain a global feature graph; The local feature map and the global feature map are jointly processed, and the jointly processed feature map is classified using the SoftMax module in the soil organic matter classification model to be trained to generate the deep learning result map.

6. The method according to claim 5, characterized in that The local feature extraction includes local deep feature extraction and local shallow feature extraction; the local feature extraction is performed on the superimposed data graph using the residual network based on CNN in the soil organic matter classification model to be trained to obtain a local feature graph, including: Using the CNN-based residual network in the soil organic matter classification model to be trained, extracting the local deep features from the superimposed data graph to obtain an initial local deep feature graph; The ASPP module is used to expand the receptive field of the initial local deep feature map, and the result after the receptive field expansion is upsampled to obtain the target local deep feature map; Using the CNN-based residual network in the soil organic matter classification model to be trained, extracting the local shallow features from the superimposed data graph to obtain a target local shallow feature graph; The target local deep feature map and the target local shallow feature map are merged to obtain the local feature map.

7. The method according to claim 4, characterized in that The step of training the soil organic matter classification model to be trained based on the cross entropy loss function and the verification loss function to obtain the soil organic matter classification model includes: Multiplying the cross entropy loss function and the verification loss function to obtain a mixed loss function; The soil organic matter classification model to be trained is trained using the mixed loss function to obtain the soil organic matter classification model.

8. A soil organic matter classification model training device, characterized in that: The device comprises: A data acquisition module is used to collect data from a preset area and obtain image source data and vegetation index images of the preset area; A machine learning module, used to train a machine learning model to be trained using soil sample data and its corresponding vegetation index data to obtain a machine learning model; A machine learning result graph generating module, used for inputting the image source data and the vegetation index image into the machine learning model to generate a machine learning result graph; The soil organic matter classification module is used to use the machine learning result image as a pseudo label, and train the soil organic matter classification model to be trained according to the image source data and the vegetation index image to obtain the soil organic matter classification model.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the soil organic matter classification model training method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the soil organic matter classification model training method according to any one of claims 1 to 7.