Classification method of Inner Mongolia grassland based on multi-feature fusion self-attention mechanism

By adopting a self-attention mechanism of multi-feature fusion in the grassland type classification in Inner Mongolia, combining a classification model of one-dimensional convolutional neural network and a Transformer encoder structure, the problem of insufficient identification and inaccurate classification in grassland classification is solved, and high-precision grassland type recognition and classification are achieved.

CN116340838BActive Publication Date: 2025-04-11INNER MONGOLIA AGRICULTURAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310073968.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-07
Publication Date
2025-04-11
Estimated Expiration
2043-02-07

AI Technical Summary

Technical Problem

The prior art has problems such as time-consuming and laborious field sampling, insufficient identification, and insufficient classification in grassland classification, especially in the large-scale classification and multi-dimensional feature analysis of Inner Mongolia grasslands.

Method used

The classification method based on multi-feature fusion is adopted. By obtaining NDVI timing data, temperature and precipitation timing data, after feature fusion, the grassland type classification model is constructed using a one-dimensional convolutional neural network and a Transformer encoder structure to achieve high-precision identification of grassland type.

Benefits of technology

The accuracy of grassland type identification and classification accuracy are improved, the problems of time-consuming and labor-intensive field sampling and inaccurate identification of existing technology are solved, and high-precision classification of grassland types in Inner Mongolia is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116340838B_ABST
    Figure CN116340838B_ABST
Patent Text Reader

Abstract

The present invention discloses a classification method for Inner Mongolia grassland based on a self-attention mechanism of multi-feature fusion, by constructing an Inner Mongolia grassland grassland type classification model including a one-dimensional convolutional neural network structure, a Transformer encoder structure and a fully connected classification network structure; NDVI time series data, temperature time series data and precipitation time series data are processed respectively, and feature fusion is performed, the fused feature data are respectively input into the one-dimensional convolutional neural network and the Transformer encoder structure, the output feature data are spliced, and the feature data obtained after splicing are input into the fully connected classification network structure, and finally the Inner Mongolia grassland grassland classification result is output. The method solves the technical problems that field sampling and identification is time-consuming and labor-intensive, and the existing machine learning or deep learning methods are not accurate enough in grassland grassland type identification and classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of grassland type classification, and in particular to a classification method for Inner Mongolia grasslands based on a self-attention mechanism of multi-feature fusion. Background Art

[0002] Grassland is the largest ecosystem on land, and plays a vital role in human survival and development in the process of energy flow and material circulation. my country's Inner Mongolia Autonomous Region is located in the middle of the Eurasian grassland belt. The Inner Mongolia grassland has a large geographical space span and occupies an important position in the Eurasian grassland. It is an important ecological security guarantee in northern China and plays an irreplaceable role in protecting and improving the ecological environment of the Three North Regions (i.e., Northeast my country, northern North China and Northwest China) and even the whole country.

[0003] However, there are obvious differences in regional and seasonal changes in the Inner Mongolia grasslands, and under the influence of climate change, there are obvious differences in the zoning of grassland vegetation types in the Inner Mongolia grasslands. At the same time, in recent years, due to factors such as long-term overgrazing, reclamation and climate change, the grassland ecosystem function of the Inner Mongolia grasslands has declined. In order to better strengthen the protection of the Inner Mongolia grassland ecosystem, it is very important to identify and classify the grasslands in the Inner Mongolia grasslands so as to better adapt to local conditions and take targeted protection measures.

[0004] There are many existing grassland classification methods, but they have the following defects:

[0005] 1. The method of identifying grassland types by large-area field sampling has many limitations, such as large workload, long investigation time, and requires a lot of manpower and financial resources.

[0006] 2. The existing grassland classification methods in Inner Mongolia are mostly small-scale grassland type classifications, which lack integrity and large-scale classification. For example, it is impossible to classify various types of grasslands, such as temperate meadow grassland, temperate typical grassland, temperate desert grassland, typical meadow, alpine meadow, saline meadow, swampy meadow, forest, temperate desert, etc.

[0007] 3. Traditional grassland type identification methods mostly use ArcGIS tools, using single-feature NDVI, EVI, DEM and other indexes, combined with unsupervised classification methods or supervised classification machine learning methods to classify grassland types. This method uses remote sensing technology to monitor the distribution of ground plants, and relies on the remote sensing reflectivity of vegetation in the near-infrared, red, green and blue light bands to determine the vegetation coverage rate to classify grassland types. However, temperature and precipitation are the most basic influencing factors that determine the formation and development of grassland types. Only single-feature NDVI, EVI and DEM are considered, and there is a lack of analysis that integrates multi-dimensional feature information such as temperature and precipitation, which makes the grassland identification and classification method not very accurate.

[0008] 4. The classification method based on deep learning of image statistical analysis is prone to cause the phenomenon of different spectra for the same object and the same spectra for different objects, which can easily lead to inaccurate identification of grassland classification.

[0009] Therefore, it is necessary to provide a method for effectively identifying and accurately classifying grasslands in Inner Mongolia. Summary of the invention

[0010] The embodiment of the present application provides a classification method for Inner Mongolia grasslands based on a self-attention mechanism of multi-feature fusion, which is used to solve the technical problems that field sampling and identification are time-consuming and labor-intensive, and that existing machine learning or deep learning methods are not accurate enough in identifying grassland types and classifying them.

[0011] In view of this, the present application provides a classification method for Inner Mongolia grassland based on a self-attention mechanism of multi-feature fusion, comprising the following steps:

[0012] Step S1, making NDVI time series data set: obtain MOD09Q1 product from NASA official website, select relevant line number, use MRT preprocessing tool to make MOD09Q1_NDVI data;

[0013] Step S2, collection of grassland types in Inner Mongolia: Based on relevant grassland resource data maps, select a variety of different grassland type benchmarks in Inner Mongolia, and use the random sampling tool provided by ArcGIS software to generate various grassland type benchmark points in Inner Mongolia with longitude and latitude;

[0014] Step S3, constructing NDVI time series data: according to the MOD09Q1_NDVI data obtained in step S1, using the value extraction to point tool provided by ENVIClassic software, extract the NDVI values ​​of the same longitude and latitude as the grassland type benchmark point of Inner Mongolia grassland to obtain NDVI time series data;

[0015] Step S4, obtaining temperature time series data and precipitation time series data: selecting temperature and precipitation data of the same growing season as NDVI, using temperature time series data calculation formula and precipitation time series data calculation formula, calculating the average temperature time series data and average precipitation time series data of the same sampling date as MOD09Q1_NDVI, and then expanding the average temperature time series data and average precipitation time series data to obtain temperature time series data and precipitation time series data;

[0016] Step S5, data processing: including processing the NDVI time series data, the average temperature time series data and the average precipitation time series data respectively;

[0017] Step S6, feature fusion: performing feature fusion on the time series data obtained after processing in step S5 to obtain feature fused data;

[0018] Step S7, model construction: constructing a grassland type classification model for Inner Mongolia grassland using a one-dimensional convolutional neural network, a Transformer encoder structure, and a fully connected classification network;

[0019] Step S8, input model: input the data after feature fusion obtained in step S6 into the one-dimensional convolutional neural network and Transformer encoder structure in step S7 respectively, then concatenate the feature vectors output by the one-dimensional convolutional neural network and Transformer encoder structure, and finally enter the fully connected classification network to output the classification result of Inner Mongolia grassland.

[0020] Optionally, in step S5, processing the NDVI time series data includes: first performing gradient calculation on the NDVI time series data to obtain gradient data, and then performing data normalization processing on all the gradient data to obtain the NDVI gradient time series data.

[0021] Optionally, in step S5, processing the average temperature time series data and the average precipitation time series data includes performing maximum and minimum value normalization processing on the average temperature time series data and the average precipitation time series data, so that the range of the processed data values ​​is between 0-1.

[0022] Optionally, the data after feature fusion in step S6 is spliced ​​through the results of six 1DCNNs in the one-dimensional convolutional neural network and the multi-layer encoders in the Transformer encoder structure and then input into the fully connected classification network. The encoder includes a first residual block and a second residual block. The first residual block includes a multi-head attention mechanism, residual connection, and layer normalization, and the second residual block includes a feedforward neural network, residual connection, and layer normalization.

[0023] Optionally, it is characterized in that the fully connected classification network structure composed of the feedforward neural network includes an input layer, three linear layers, a Dropout layer and an output layer, and the Dropout ratio p=0.2.

[0024] Optionally, it also includes model training, training the Inner Mongolia grassland type classification model according to the gradient descent method, optimizing the weight parameters of the network, and finally obtaining a high-precision grassland classification model. Based on the model, the fused data is input to obtain the Inner Mongolia grassland classification result.

[0025] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0026] The classification method for Inner Mongolia grassland based on the self-attention mechanism of multi-feature fusion provided in this application is based on multiple time series features such as remote sensing vegetation index, temperature, and precipitation. The remote sensing vegetation index is processed and fused with climate factors to establish a grassland type classification model for Inner Mongolia grassland based on the self-attention mechanism of multi-feature fusion. The model can accurately identify and obtain high-precision grassland type classification.

[0027] The Inner Mongolia grassland classification model provided by this application utilizes multiple features and an attention mechanism to focus on the characteristics of grassland types in Inner Mongolia, providing a new reference for improving the identification of grassland types. The fused feature data is processed and spliced ​​through a one-dimensional convolutional neural network and a Transformer encoder structure, and then input into a fully connected classification network structure. The one-dimensional convolutional neural network is used for feature extraction, and the Transformer encoder structure learns the correlation between the input feature vectors, splices the results of the two, and enters the fully connected classification network training after fusing the features of the two, further improving the accuracy of classification. It solves the technical problems that field sampling and identification is time-consuming and laborious, and the existing machine learning or deep learning methods are not accurate enough in identifying grassland types and the classification is not precise enough. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A schematic diagram of the process of the Inner Mongolia grassland type classification method provided in the embodiment of the present application;

[0029] Figure 2 This is a structural diagram of the grassland type classification model of Inner Mongolia grassland provided in the embodiments of the present application;

[0030] Figure 3 This is a diagram of the single-layer model architecture of the Transformer encoder provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] In order to enable those skilled in the art to better understand the solution of the present application, 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 only 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 ordinary technicians in this field without creative work are within the scope of protection of this application.

[0032] NDVI (Normalized Difference Vegetation Index): It is an important indicator to characterize surface vegetation and a remote sensing indicator that reflects the status of land cover vegetation. It is defined as the quotient of the difference between the reflectance of the near-infrared channel and the visible light channel and their sum.

[0033] MODIS (Moderate Resolution Imaging Spectroradiometer): It is a large-scale space remote sensing instrument developed by NASA to understand global climate changes and the impact of human activities on the climate.

[0034] Transformer: A deep learning model based on self-attention mechanism;

[0035] NASA (National Aeronautics and Space Administration);

[0036] For easier understanding, see Figure 1 , an embodiment of a classification method for Inner Mongolia grassland based on a self-attention mechanism of multi-feature fusion provided by the present application includes:

[0037] Step S1, making NDVI time series data set: obtain MOD09Q1 product from NASA official website, select relevant line number, use MRT preprocessing tool to make MOD09Q1_NDVI data;

[0038] Step S2, collection of grassland types in Inner Mongolia: Based on relevant grassland resource data maps, select a variety of different grassland type benchmarks in Inner Mongolia, and use the random sampling tool provided by ArcGIS software to generate various grassland type benchmark points in Inner Mongolia with longitude and latitude;

[0039] Step S3, constructing NDVI time series data: according to the MOD09Q1_NDVI data obtained in step S1, using the value extraction to point tool provided by ENVIClassic software, extract the NDVI values ​​of the same longitude and latitude as the grassland type benchmark point of Inner Mongolia grassland to obtain NDVI time series data;

[0040] Step S4, obtaining temperature time series data and precipitation time series data: selecting temperature and precipitation data of the same growing season as NDVI, using temperature time series data calculation formula and precipitation time series data calculation formula, calculating the average temperature and average precipitation time series data of the same sampling date as MOD09Q1_NDVI, and then expanding the average temperature time series data and the average precipitation time series data to obtain temperature time series data and precipitation time series data;

[0041] Step S5, data processing: including processing the NDVI time series data, the average temperature time series data and the average precipitation time series data respectively;

[0042] Step S6, feature fusion: performing feature fusion on the time series data obtained after preprocessing in step S5 to obtain feature fused data;

[0043] Step S7, model construction: constructing a grassland type classification model for Inner Mongolia grasslands using a one-dimensional convolutional neural network, a Transformer encoder structure, and a fully connected classification network;

[0044] Step S8, input model: input the data after feature fusion obtained in step S6 into the one-dimensional convolutional neural network and the Transformer encoder structure in step S7 respectively, then concatenate the feature vectors output by the one-dimensional convolutional neural network and the Transformer encoder structure, and finally enter the fully connected classification network to output the classification result of the grassland in Inner Mongolia grassland;

[0045] Step S9, model training, training the Inner Mongolia grassland type classification model according to the gradient descent method to obtain a high-precision grassland classification model, and based on the model, input the fused data to obtain the Inner Mongolia grassland classification result.

[0046] It should be noted that the convolutional neural network is a multi-layer perceptron similar to an artificial neural network, which is connected by multiple neurons, and the neurons are responsible for information transmission. Compared with the traditional manual feature method, the convolutional neural network can ensure that the image remains unchanged after rotation, translation, and scaling during the feature extraction process. In addition, using the convolutional neural network as the backbone network to extract features can also help small target detectors to distinguish targets faster. Convolutional neural networks generally include convolutional layers, pooling layers, activation layers, fully connected layers, and batch normalization layers. Convolutional neural networks include three categories: one-dimensional convolution, two-dimensional convolution, and three-dimensional convolution. One-dimensional convolution is commonly used in sequence models. The grassland classification model of this application uses a one-dimensional convolutional neural network.

[0047] The Transformer structure consists of two parts: Encoder and Decoder. Encoder converts the input sequence into a fixed vector, while Decoder decodes the vector into an output sequence. In the model of this application, the Transformer Encoder structure is used.

[0048] The Transformer Encoder structure consists of multiple layers of encoders stacked together. The encoder contains two substructures, each consisting of two residual blocks. The first residual block includes a multi-head attention mechanism, residual connection, and layer normalization. The second residual block includes a feedforward neural network, residual connection, and layer normalization. The multi-head attention mechanism is used to capture the relationship between features, and the feedforward neural network further encodes learning. The superposition of multiple layers of encoders constitutes the Transformer Encoder structure.

[0049] The input of the multi-head attention mechanism is the feature vector matrix. The multi-head attention mechanism consists of multiple attention layers, and its output is the concatenation of the output of each attention layer. The core of multi-head attention is the parallel calculation of multiple Self-Attentions, not just one attention calculation. As the number of heads increases, each vector must be calculated with all Attentions to learn the dependencies within the sequence.

[0050] A fully connected network is also called a multi-layer feedforward neural network, which consists of an input layer, multiple hidden layers and an output layer. The signal propagates unidirectionally from the input layer to the output layer, and there is no loop or loop. The hidden layer is the layers other than the input layer and the output layer. A multi-layer feedforward neural network can approximate any continuous function and square integrable function with arbitrary precision, and can accurately implement any finite training sample set.

[0051] Step S1: Create NDVI time series dataset:

[0052] Obtain the MOD09Q1_2016 growing season (April-October) product from NASA's official website, select H25v03, H25v04, H25v05, H26v03, H26v04, H26v05, and H27v04 row numbers, and use the MRT preprocessing tool to generate MOD09Q1_NDVI data;

[0053] Step S2: Collection of grassland types in Inner Mongolia:

[0054] Based on the "1:100 China Grassland Resource Data Map" drawn by Soochow University of the Geographical Science Ecology Network, the "2010 Inner Mongolia Alxa League 1:700,000 Land Cover Dataset" of the National Glacier, Frozen Soil and Desert Science Data Center, and the "Inner Mongolia Autonomous Region 1km Land Cover Forest Type Data (2015)" of the National Science and Technology Basic Conditions Platform-National Earth System Science Data Center, ten types of Inner Mongolia grassland type benchmarks were selected, including temperate meadow steppe, temperate typical grassland, temperate desert steppe, typical meadow, alpine meadow, salt meadow, swampy meadow, forest, and temperate desert. The "Random Sampling" tool provided by ArcGIS software was used to generate various types of Inner Mongolia grassland type benchmarks with longitude and latitude.

[0055] Step S3: construct NDVI time series data:

[0056] According to the MOD09Q1_NDVI data obtained in step S1, the "Value Extraction to Point" tool provided by ENVI Classic software is used to extract the NDVI values ​​of the same longitude and latitude as the Inner Mongolia grassland type benchmark point to obtain the NDVI time series data.

[0057] Step S4: Acquisition of temperature time series data and precipitation time series data:

[0058] (1) Obtain temperature time series data. Select temperature data of the same growing season as NDVI from the daily value data of 36 meteorological stations in Inner Mongolia Autonomous Region of China Meteorological Network. Use the temperature time series calculation formula to calculate the average temperature data of the same sampling date as MOD09Q1_NDVI. Then, use the minimum coverage method to expand the average temperature data within 70 km of the meteorological station to obtain the temperature time series data of the same time node as the NDVI time series data.

[0059] Temperature time series calculation formula:

[0060]

[0061] (2) Obtain precipitation time series data. Select precipitation data of the same growing season as NDVI from the daily value data of 36 meteorological stations in Inner Mongolia Autonomous Region of China Meteorological Network. Use the precipitation time series calculation formula to calculate the average precipitation data of the same sampling date as MOD09Q1_NDVI. Then, use the minimum coverage method to expand the average precipitation data within 70 km of the meteorological station to obtain the precipitation time series data of the same time node as the NDVI time series data.

[0062] Precipitation time series calculation formula:

[0063]

[0064] In the above formula, time is a period of 8 days, Pre and Tem are the precipitation and average temperature of the day, in units of mm and degrees Celsius respectively. For example, the temperature data Pre on December 8 is the average temperature from December 1 to December 8.

[0065] At this point, we finally obtained the sequence data of NDVI, temperature, and precipitation at the same time nodes. The sequence is the time series data of the growing season from April to October. The time points of temperature and precipitation are consistent with the NDVI sampling time points. The sequence is the temperature, precipitation, and NDVI data information of 28 sequential time points at the sampling points.

[0066] Step S5: Data processing:

[0067] Since the value ranges of temperature and precipitation time series data vary greatly, they need to be standardized separately. For NDVI time series data, NDVI gradient time series data is obtained based on the NDVI time series data, and then standardized.

[0068] (1) Processing of NDVI time series data

[0069] The NDVI calculation formula is as follows:

[0070]

[0071] NDVI gradient calculation formula:

[0072]

[0073] Among them, NDVI t and NDVI t-1 represent the NDVI values ​​at time t and time t-1 respectively, X t and X t-1 Respectively represent the values ​​of two adjacent time points after discretization.

[0074] First, the NDVI time series data is gradient calculated according to the gradient calculation formula to obtain gradient data, and then the maximum and minimum normalization method is used to standardize all gradient data so that the data values ​​obtained after gradient calculation are between the range [0,1].

[0075] Specifically, for example, the original NDVI data: [0.10670.12970.14350.16110.15750.16730.13650.17320.21570.16360.17450.13970.15330.1450.15690.1715 0.14530.19380.260.25110.25310.24860.23670.21870.1870.16760.16250.1457], assuming that the sampling time of the first data 0.1067 is the 89th day of the year, the sampling time point of the second data 0.1297 is the 97th day, and the sampling time point of the third data 0.1435 is the 113th day, then the second data is calculated according to the NDVI gradient calculation formula,

[0076] Then we get:

[0077]

[0078] In this way, all NDVI gradient data are standardized to finally obtain NDVI gradient data.

[0079] (2) Processing of average temperature time series data

[0080] For the average temperature time series data, the maximum and minimum value normalization method is used for standardization processing, so that the range of the processed data values ​​is between [0,1].

[0081] Specifically, for example, the average temperature data sequence of a sampling point is [5.19.67512.962512.016.87513.62515.72514.92519.72519.020.9523.762524.9524.35 21.72523.562527.987526.312521.437519.462518.8517.737517.72516.7375 14.5625 11.9125 10.7125 3.3875], assuming that the highest value of all temperature data is 30 and the lowest is -13.9125, the maximum and minimum standardization formula is:

[0082]

[0083] Then the average temperature series data above is normalized to the maximum and minimum values ​​according to the formula:

[0084] [0.4329633 0.5371478 0.61201257 0.590094 0.7011102 0.6270994 0.67492175 0.6567037 0.766012 0.7495018 0.7939084 0.8579563 0.8849987 0.8713351 0.8115571 0.85340166 0.9541703 0.9160262 0.80500996 0.7600342 0.746086 0.7207515 0.72046685 0.697979 0.64844865 0.5881014 0.560774270.3939653].

[0085] (3) Processing of average precipitation time series data

[0086] For the average precipitation time series data, similar to the average temperature time series data, the maximum and minimum value normalization method is used for standardization processing, so that the range of the processed data values ​​is between [0,1].

[0087] Step S6: feature fusion:

[0088] The features of NDVI time series data, NDVI gradient time series data, average temperature time series data, and average precipitation time series data are fused to obtain a time series data set with four different features at each sampling point and at each time point. Assuming that the number of sampling points is 3000, the time series of the growing period from April to October is the 28 sequential time points mentioned above, and each time point has four features: temperature, precipitation, NDVI, and NDVI gradient. The dimension of the constructed time series data set is [3000, 28, 4].

[0089] Step S7: Model construction:

[0090] The Inner Mongolia grassland type model was constructed using a one-dimensional convolutional neural network, a Transformer encoder structure, and a fully connected classification network;

[0091] Step S8: Input model:

[0092] See also Figure 2 (Among them, the model input is NDVI, NDVI gradient, pre (precipitation), tem (temperature) time series data), input the model, input the feature fusion data into the one-dimensional convolutional neural network and Transformer encoder structure respectively, and then splice the results output by the convolutional neural network and Transformer encoder structure, and finally enter the fully connected classification network to output the grassland classification result:

[0093] (1) Assume that the fused dataset X is ([16, 28, 4]) (Note: 16 is the batch size (the number of samples selected for one training), 28 is the dimension of the time series, and 4 is the feature dimension), and input it into the convolutional neural network and Transformer encoder structure respectively.

[0094] (2) In a one-dimensional convolutional neural network, the data set X passes through a 1DCNN with window sizes of 3, 4, 5, 6, 7, and 8, and the output vector is X c1 , X c2 , X c3 , X c4 , X c5 , X c6 , and then concatenate the 6 different 1DCNN output vectors through the concatenation vector function to obtain the output vector X c , the splicing vector calculation formula is:

[0095] X c =Concat(X c1 ,X c2 ,X c3 ,X c4 ,X c5 ,X c6 )

[0096] Assuming that the output feature of the one-dimensional convolutional neural network is set to 70, and the maximum pooling layer with the same width as the convolution operation is used for pooling, the dimension of the convolutional network output of each window is (16, 70), and the dimension of the output result after splicing the 6 windows is (16, 420).

[0097] (3) Please refer to Figure 3, in the Transformer encoder structure, the dataset X is converted into a fixed vector representation.

[0098] The fused data set X is input into the Transformer encoder structure, and X enters the first layer of the encoder, that is, X first passes through the multi-head attention mechanism of the first residual block, and the output vector of the multi-head attention mechanism and the original input vector X are added and normalized to obtain the output result of the first residual block; the output result of the first residual block is input into the feedforward neural network of the second residual block, and the output result of the feedforward network and the output result of the first residual block are added and normalized to obtain the output result of the second residual block; after passing through multiple layers of encoders in turn, the output vector X is finally obtained. t .

[0099] (4) The output vector X obtained by the one-dimensional convolutional neural network c The output feature vector X obtained by the Transformer encoder structure t Splice to get X i Assume X t The data is of dimension ([16, 150]), X c and X t After vector splicing calculation formula:

[0100] X i =Concat(X c ,X t )

[0101] Then we get X i The data dimension is ([16, 570]).

[0102] (5)X i Enter the fully connected classification network. The concatenated feature vector X i The output vector of the input layer of the fully connected classification network structure is input to the hidden layer. Based on the technical solution of the present application, the hidden layer here is three linear layers (fully connected layers). After two linear layers, the dimensions are transformed to obtain the output vectors L1 and L2 respectively, and then after a linear layer, Dropout is added to this layer to randomly delete some units of the hidden layer, and finally the output result O is obtained. Assuming that the Dropout ratio is set to p = 0.2, that is, the probability of each neuron being discarded is 20%, then the dimension of the final output is ([16,10]), that is, the grassland types of Inner Mongolia grassland are divided into ten categories.

[0103] L1=σ(W h1 X i +b h1 )

[0104] L2=σ(Wh2 ρ(L1)+b h2 )

[0105] O=W0α(L2)+b0

[0106] Where W h1 , W h2 are the weight matrices corresponding to the L1 and L2 hidden layers, respectively, and b h1 , b h2 are the bias matrices of the L1 and L2 hidden layers, σ is the Tanh activation function, and ρ is the normalization function of BatchNorm1d. O represents the final output result, Wo represents the weight matrix of the output layer O, α represents the Dropout layer, and bo represents the bias matrix of the output layer.

[0107] The addition of Dropout helps to combat overfitting of neural networks. The randomness added by Dropout produces different training models, and different models produce different calculation results. These calculation results will theoretically fluctuate within a range and obey the distribution of the same specific mean, so the final training result is the average output of different models; at the same time, Dropout eliminates or weakens the association between neural unit nodes, reduces the dependence of the neural network on a single neural unit or unit group, and enhances the generalization ability of the model. Using the Dropout technique will also increase the number of iterations required for the neural network to converge, while reducing the time required for each iteration.

[0108] Step S9: Model training:

[0109] The grassland type classification model of Inner Mongolia grassland is trained according to the gradient descent method. The minimum value of the objective function is found through iteration, or the training is stopped after converging to the minimum value, so that the deviation between the output of the network model and the actual result is minimized. Finally, a high-precision grassland classification model is obtained. Based on this model, the fused data is input to obtain the grassland classification result of Inner Mongolia grassland.

[0110] The classification method for Inner Mongolia grassland based on the self-attention mechanism of multi-feature fusion provided in this application is based on multiple time series features such as remote sensing vegetation index, temperature, and precipitation. The remote sensing vegetation index is processed and fused with climate factors to establish a grassland type classification model for Inner Mongolia grassland based on the self-attention mechanism of multi-feature fusion. The model can accurately identify and obtain high-precision grassland type classification.

[0111] The Inner Mongolia grassland classification model provided by this application utilizes multiple features and an attention mechanism to focus on the characteristics of grassland types in Inner Mongolia grasslands, providing a new reference for improving the identification of grassland types. The fused feature data is processed and spliced ​​through a one-dimensional convolutional neural network and a Transformer encoder structure, and then input into a fully connected classification network structure. The one-dimensional convolutional neural network is used for feature extraction, and the Transformer encoder structure learns the correlation between the input feature vectors, splices the results of the two, and enters the fully connected classification network training after fusing the features of the two, further improving the accuracy of classification. It solves the technical problems that field sampling and identification is time-consuming and laborious, and the existing machine learning or deep learning methods are not accurate enough in grassland type identification and classification is not precise enough.

[0112] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A classification method for Inner Mongolia grassland based on multi-feature fusion self-attention mechanism, characterized by: The following steps are involved: Step S1, making NDVI time series data set: obtain MOD09Q1 product from NASA official website, select relevant line number, use MRT preprocessing tool to make MOD09Q1_NDVI data; Step S2, collection of grassland types in Inner Mongolia: Based on relevant grassland resource data maps, select a variety of different grassland type benchmarks in Inner Mongolia, and use the random sampling tool provided by ArcGIS software to generate various grassland type benchmark points in Inner Mongolia with longitude and latitude; Step S3, constructing NDVI time series data: according to the MOD09Q1_NDVI data obtained in step S1, using the value extraction to point tool provided by ENVIClassic software, extract the NDVI values ​​of the same longitude and latitude as the grassland type benchmark point of Inner Mongolia grassland to obtain NDVI time series data; Step S4, obtaining temperature time series data and precipitation time series data: selecting temperature and precipitation data of the same growing season as NDVI, using temperature time series data calculation formula and precipitation time series data calculation formula, calculating average temperature time series data and average precipitation time series data of the same sampling date as MOD09Q1_NDVI, and then expanding the average temperature time series data and the average precipitation time series data to obtain temperature time series data and precipitation time series data; Step S5, data processing: including processing the NDVI time series data, the average temperature time series data and the average precipitation time series data respectively; Step S6, feature fusion: performing feature fusion on the time series data obtained after processing in step S5 to obtain feature fused data; Step S7, model construction: constructing a grassland type classification model for Inner Mongolia grassland using a one-dimensional convolutional neural network, a Transformer encoder structure, and a fully connected classification network; Step S8, input model: input the data after feature fusion obtained in step S6 into the one-dimensional convolutional neural network and Transformer encoder structure in step S7 respectively, then concatenate the feature vectors output by the one-dimensional convolutional neural network and Transformer encoder structure, and finally enter the fully connected classification network to output the classification result of Inner Mongolia grassland.

2. The classification method of Inner Mongolia grassland based on the self-attention mechanism of multi-feature fusion according to claim 1 is characterized in that: In the step S5, the processing of the NDVI time series data includes: firstly performing gradient calculation on the NDVI time series data to obtain gradient data, and then performing data normalization processing on all the gradient data to obtain the NDVI gradient time series data.

3. The classification method of Inner Mongolia grassland based on the self-attention mechanism of multi-feature fusion according to claim 1 is characterized in that: In the step S5, processing the average temperature time series data and the average precipitation time series data includes performing maximum and minimum value normalization processing on the average temperature time series data and the average precipitation time series data, so that the range of the processed data values ​​is between 0-1.

4. The classification method of Inner Mongolia grassland based on multi-feature fusion self-attention mechanism according to claim 1 is characterized in that: The data after feature fusion in step S6 is spliced ​​through the results of the six 1DCNNs in the one-dimensional convolutional neural network and the multi-layer encoders in the Transformer encoder structure and then input into the fully connected classification network, the encoder includes a first residual block and a second residual block, the first residual block includes a multi-head attention mechanism, residual connection and layer normalization, and the second residual block includes a feedforward neural network, residual connection and layer normalization.

5. The classification method of Inner Mongolia grassland based on the self-attention mechanism of multi-feature fusion according to claim 4 is characterized in that: The fully connected classification network structure composed of the feedforward neural network includes an input layer, three linear layers, a Dropout layer and an output layer, and the Dropout ratio p=0.

2.

6. The classification method of Inner Mongolia grassland based on multi-feature fusion self-attention mechanism according to claim 1 is characterized in that: It also includes model training, which trains the grassland type classification model of Inner Mongolia grassland according to the gradient descent method, optimizes the weight parameters of the network, and finally obtains a high-precision grassland classification model. Based on this model, the fused data is input to obtain the grassland classification results of Inner Mongolia grassland.

Citation Information

Patent Citations

  • Landsat8 and MODIS fusion-construction high space-time resolution data identification autumn grain crop method

    CN104915674A

  • BP neural network GF-2 image forest classification method optimized by genetic algorithm

    CN111445023A