A method for batch generation of variable grid samples based on multi / hyperspectral images and land cover data

By applying variable grids, simplified quick search, two-level block screening and double masking technologies in remote sensing technology, the problems of inconsistent labeling of remote sensing image sample data are solved, and high-quality diversity is generated The highly sensitive sample data improves the accuracy of geographic classification of remote sensing images.

CN118262191BActive Publication Date: 2024-11-05MINISTRY OF NATURAL RESOURCES LAND SATELLITE REMOTE SENSING APPL CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410163864.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-05
Publication Date
2024-11-05
Estimated Expiration
2044-02-05

AI Technical Summary

Technical Problem

In the prior art, the data labeling of remote sensing image samples is not uniform, the number of effective samples is insufficient, and the feature diversity is insufficient, resulting in the deep learning model's low accuracy and poor generalization of remote sensing image target recognition, making it difficult to meet the needs of intelligent interpretation and recognition of remote sensing images.

Method used

Using variable grid technology, simplified quick survey technology, two-stage block screening technology and dual masking technology, the remote sensing image sample data is generated based on multi-/hyperspectral remote sensing satellite images and surface coverage data to achieve different image resolutions , fast batch processing of image black edges and cloud coverage.

Benefits of technology

It realizes unified management, reuse and dynamic update of remote sensing image sample data, improves the diversity and richness of sample data, improves the accuracy of object classification of remote sensing images, and meets the sample requirements of remote sensing intelligent interpretation and identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118262191B_ABST
    Figure CN118262191B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for batch generation of variable grid samples based on multi / hyperspectral images and surface cover data. First, basic data is acquired and validity checked, including remote sensing satellite image data with accurate spatial registration and consistent spatial reference, geographic national conditions vector data, and county-level administrative division boundary vector data; secondly, a standard grid is generated based on the remote sensing satellite image data, and grid unit screening and land type label generation are performed in combination with geographic national conditions data and basic geographic information data; finally, sample images are sliced ​​and cyclically processed to obtain sample images. The method realizes a method for batch generation of training samples based on multi / hyperspectral remote sensing satellite image data, geographic national conditions vector data, and county-level administrative division boundary vector data, which ensures unified remote sensing image annotation and abundant effective sample numbers, can meet the diversity and richness of samples required for intelligent interpretation and recognition of remote sensing images, and improves the accuracy of remote sensing image ground object classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of remote sensing technology, and in particular to a method for batch generating variable grid samples based on multi / hyperspectral images and surface coverage data. Background Art

[0002] In recent years, with the rapid development of remote sensing technology and deep learning technology, remote sensing intelligent interpretation methods driven by large amounts of data have become an important technical support in the field of remote sensing applications, and are widely used in precision agriculture, natural resource surface element monitoring, geological disaster investigation and early warning, environmental monitoring and other fields.

[0003] Sample datasets play a very important role in data-driven monitoring and classification models. Large models driven by massive sample data have become a new research paradigm for remote sensing image information extraction, which puts forward higher requirements on the scale, quality, and diversity of sample data. Currently, common sample datasets mainly include scene recognition, land cover / use classification, thematic feature extraction, change detection, target detection, semantic segmentation, and other categories.

[0004] The sample labeling work of traditional human-computer interaction requires a lot of manpower and time. The labeling of some objects even requires higher knowledge and experience of professionals, which leads to the fact that the number of labeled samples in remote sensing images is often small. Therefore, the method of quickly batch generating AI training samples based on multispectral or hyperspectral remote sensing images and existing surface cover classification data is of great research value.

[0005] Usually, for remote sensing image sample datasets of specific regions or specific categories of targets, there are problems such as inconsistent remote sensing image annotations, insufficient number of effective samples, and insufficient feature diversity, which leads to low target recognition accuracy and poor generalization of deep learning network models on remote sensing images, which brings challenges to the training process of the generation model. Therefore, studying the batch generation method of variable grid samples based on multispectral, hyperspectral remote sensing satellite images and surface cover data has become an effective way to solve and expand the amount of sample data and sample diversity.

[0006] In response to the above problems, how to realize the method of batch generation of variable grid samples based on multi / hyperspectral images and surface cover classification data, and ensure the characteristics of unified remote sensing image annotation, abundant number of effective samples, strong diversity characteristics, strong timeliness and temporal characteristics of samples, meet the quantity and accuracy requirements of samples required for intelligent interpretation and recognition of remote sensing images, and improve the accuracy of remote sensing image ground object classification, is an urgent problem to be solved in sample generation work. Summary of the invention

[0007] The present invention applies variable grid technology, image simplification and quick-check technology, two-level block screening technology, and double mask technology to provide a method for batch generating variable grid samples based on multi / hyperspectral images and surface cover data, which can solve the problems of different image resolutions, image black edges, cloud coverage, and rapid batch generation of samples in applications.

[0008] Based on multispectral or hyperspectral remote sensing satellite images, combined with basic information such as surface cover survey classification data and basic geographic information data, technical research on remote sensing image processing, variable grid unit generation, two-level screening of surface cover patches, patch simplification and quick query, image double masking, sample data generation, etc. is carried out for typical first-level land features including vegetation, water bodies, rocks and minerals, soil, ice and snow permafrost, artificial targets, etc., and a set of remote sensing image sample batch generation technology system for remote sensing intelligent interpretation and recognition is constructed, which effectively promotes the unified management, reuse and dynamic updating of sample data.

[0009] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0010] The present invention provides a method for batch generating variable grid samples based on multi / hyperspectral images and land cover data, comprising the following steps:

[0011] Step 1, data acquisition and validity check, first, obtain the target remote sensing satellite image data, which can be a multispectral image or a hyperspectral image, read the metadata of the target remote sensing satellite image data, check the geographic spatial reference, spatial resolution, number of image bands, product level, imaging date, central geographic coordinates, geographic range and valid data area, and ensure that the input image is high-quality orthophoto data; secondly, obtain county-level administrative division boundary vector data and surface cover classification vector data, check whether the geographic spatial reference of the vector data is consistent with the target orthophoto data, check the validity of the vector geometry, and check whether the vector attributes contain the necessary attribute fields; finally, obtain the raster cloud mask file corresponding to the orthophoto, and check whether the geographic range and spatial reference are consistent with the target orthophoto;

[0012] Step 2, variable grid generation, for remote sensing satellite image data of different resolutions and sample training requirements, the grid unit size and grid overlap width can be set as needed to generate a grid vector file of specified specifications that completely covers the image, and its geographic spatial reference should be consistent with the target remote sensing satellite image;

[0013] Step 3, image effective area and mask generation, first, extract the coordinates of the four corner points of the image effective area from the metadata of the target remote sensing satellite image data to generate the image effective area polygon vector data; secondly, perform rasterization processing on the image effective area polygon vector data to form the image effective area raster mask file;

[0014] Step 4, screening of surface coverage spots, applying the spot simplification quick-check technology to speed up the screening process of surface coverage spots. First, check whether there is county-level administrative district vector data that has been simplified. If not, extract the outer rectangle of the administrative district spot in turn to generate the corresponding simplified county-level administrative district vector data; secondly, perform superposition analysis on the polygonal vector data of the effective area of ​​the image and the simplified county-level administrative division vector data to screen out the relevant administrative districts; then, traverse the relevant administrative districts, and for each administrative district, check whether there is surface coverage classification vector data that has been simplified. If not, extract the outer rectangle of the surface coverage spot in turn to generate the corresponding simplified surface coverage vector data; finally, traverse the relevant administrative districts, and for each administrative district, perform superposition analysis with the polygonal vector data of the effective area of ​​the image and the simplified surface coverage classification vector data of the administrative district to screen out the relevant simplified surface coverage spots, thereby retrieving the original surface coverage spots based on the identification number of the spots, and generating surface coverage spot vector data corresponding to the target remote sensing satellite image;

[0015] Step 5, generating a land class label image, setting rasterization parameters according to the geographic range, geographic spatial reference, spatial resolution of the target remote sensing satellite image, and the land class code of the surface coverage patch, performing rasterization processing on the screened surface coverage patch vectors, and generating a single-band land class label image corresponding to the target remote sensing satellite image; wherein the raster pixel value of the land class label image is the land class code of the surface coverage patch;

[0016] Step 6, mask processing of the land class label image, first, applying the image valid area raster mask file to mask the land class label image, so that the land class label image and the black edge of the target remote sensing satellite image have consistent corresponding classification values; secondly, applying the raster cloud mask file to mask the land class label image, so that the land class label image and the cloud coverage area of ​​the target remote sensing satellite image have consistent corresponding classification values;

[0017] Step 7, sample image slicing, traversing the variable grid, for each grid unit, according to the geographical scope of the grid unit, respectively cropping and outputting the slice unit of the target remote sensing satellite image and the slice unit of the masked land class label image of the specified geographical scope, so that the two constitute a sample image.

[0018] The data acquisition and validity check described in step 1 include data format requirements and data validity checks.

[0019] Data format requirements: Obtain multispectral image data in 4-band TIFF format with a spatial resolution better than 2 meters or hyperspectral image data in 166 or 330-band TIFF format with a spatial resolution of 30 meters. The file name must comply with the image naming specification for automatic search; obtain surface cover classification vector data. Due to its huge data volume, it needs to be stored in Shapefile format according to administrative regions, and its attribute field should at least contain an integer field named CLASSID to represent the land type code. Among them, there are land feature type patches. Data validity checks are performed on the patches, and geometric graphics are repaired to obtain county boundary administrative division boundary vector files as polygon Shapefiles; the above three types of files are spatially aligned, and the spatial reference is guaranteed to be consistent;

[0020] Data validity checks include:

[0021] (1) Short segment - a segment shorter than the length allowed by the system unit referenced by the control associated with the geometry;

[0022] (2) Empty geometry - the feature has no geometry or the SHAPE field is empty;

[0023] (3) Incorrect ring orientation - the ring of the surface is not oriented correctly (external ring - clockwise, internal ring - counterclockwise);

[0024] (4) Incorrect segment orientation - the orientation of the segments is inconsistent. The "end" point of segment i should be connected to the "start" point of segment i+1.

[0025] (5) Self-intersection - a face cannot intersect with itself;

[0026] (6) Non-closed loop - the "end" point of the last line segment in the loop must be connected to the "start" point of the first line segment;

[0027] (7) Empty Parts - A geometry has multiple parts, one of which is empty (has no geometry);

[0028] (8) Duplicate vertices - two or more vertices of the geometry have the same coordinates;

[0029] (9) Mismatched attributes - the Z coordinate or M coordinate of a line segment endpoint does not match the Z coordinate or M coordinate of the corresponding endpoint in the next line segment;

[0030] (10) Discontinuous part - a part of geometry consists of disconnected or discontinuous parts;

[0031] (11) Empty Z Value - One or more vertices of the geometry have an empty Z value (e.g., NaN).

[0032] For the spots in the vector file, the validity of the spot geometry data needs to be checked and should meet the specifications of the Shapefile format polygon feature class.

[0033] The validity check of the patch geometry data follows the rules of polygon validity defined by the OGC SFSQL standard: (1) polygon rings must be closed; (2) inner rings must be located inside outer rings; (3) rings cannot be self-intersecting (they cannot touch each other or cross each other); (4) rings cannot touch other rings except at a certain point.

[0034] The variable grid generation described in step 2 includes: customizing standard grid specifications based on remote sensing satellite image data; generating a grid that completely covers the image and meets the specifications; ensuring that there is an overlapping area of ​​a specified width between grid units; specifically:

[0035] For each scene of remote sensing satellite image data described in step 1, a grid that meets the specified specifications (such as 1024*1024 or 512*512, etc.) is generated, and it is ensured that the grid completely covers the image and there is an overlapping area of ​​the specified width between the grid cells; the grid cell size and the overlapping width between grids are input externally.

[0036] Among them, the image effective area and mask described in step 3 are generated, the image effective area vector is used for administrative area screening, and then the relevant surface coverage patches are screened, and the image effective area mask grid is used for mask processing of land class labels to make the land class labels consistent with the target remote sensing satellite image.

[0037] Among them, the surface coverage patch screening described in step 4 applies a two-level screening strategy and patch simplification and quick-checking technology. Due to the huge amount of surface coverage vector data, it is necessary to adopt the method of storing it in blocks by administrative area, using administrative area screening as the intermediate layer, thereby greatly reducing the spatial scope that needs to be searched, which is convenient for improving the efficiency of retrieval and analysis; since the screened patches need to be cropped when they are subsequently rasterized, the accuracy of the screening is not required to be high, and appropriately expanding the screening range has no effect on the accuracy of the results. It is necessary to simplify the patches, thereby greatly improving the efficiency of spatial retrieval.

[0038] Among them, the land class label image generated in step 5, for the screened surface coverage map input in this step, its geographical range should be greater than or equal to the geographical range of the target remote sensing satellite image; the integer field of CLASSID contained in the surface coverage map represents the land class code, and the land class code will be used as the grid pixel value of the corresponding position after the vector is rasterized.

[0039] Among them, the land class label image mask processing described in step 6 applies the double mask technology to solve the corresponding classification problem of the black edge of the target remote sensing satellite image and the corresponding classification problem of the cloud coverage of the target remote sensing satellite image, so that the subsequently generated classification samples eliminate the influence of the image black edge and cloud coverage.

[0040] The sample image slices described in step 7 are specifically as follows: each sample contains two TIFF format output files, and the file naming rules are N+7-digit latitude value+E+8-digit longitude value+_+8-digit date+LABEL.TIF (sample label) or N+7-digit latitude value+E+8-digit longitude value+_+8-digit date+IMAGE.TIF (sample image). The longitude and latitude values ​​in the file name are integer values ​​obtained by multiplying the original values ​​by 100,000. If the number of digits is insufficient, the value needs to be padded with zeros in front. The date in the file name is the imaging date of the target remote sensing satellite image.

[0041] The present invention provides a method for batch generating variable grid samples based on multi / hyperspectral images and surface cover data, and the advantages and effects are as follows: the method is based on multispectral / hyperspectral remote sensing satellite images, combined with existing surface cover classification data such as geographic national conditions monitoring, basic geographic information data and other materials, including primary typical land features such as vegetation, water bodies, soil, rock and minerals, ice and snow frozen soil, artificial targets, etc., and carries out technical research on remote sensing image processing, variable grid unit generation, two-level screening of surface cover patches, simplified patch quick check, image double masking, sample data generation, etc., to achieve automatic and intelligent batch generation of AI training samples based on remote sensing images and surface cover classification data, with the characteristic advantages of unified remote sensing image annotation, abundant number of effective samples, strong feature diversity, etc., and can meet and support the diversity and richness of samples and the accuracy of land feature attributes required for remote sensing intelligent interpretation and recognition tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 The following is a business process diagram of an embodiment of the present invention.

[0043] Figure 2 Schematic diagram of a variable grid according to an embodiment of the present invention.

[0044] Figure 3 Schematic diagram of a land type label image file according to an embodiment of the present invention.

[0045] Figure 4 Schematic diagram of a sample image slice file according to an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The present invention provides a method for batch generating variable grid samples based on multi / hyperspectral images and surface cover data. The method is based on remote sensing satellite image data with high spatial resolution or high spectral resolution, combined with existing surface cover classification data such as geographic national conditions monitoring, basic geographic information data and other materials, to realize automatic and intelligent batch generation of AI training samples based on remote sensing images and surface cover classification data. The method has the advantages of unified remote sensing image annotation, abundant effective sample quantity, strong feature diversity, etc., can meet the needs of diversity and richness of samples required for intelligent interpretation and identification of remote sensing images, and improve the accuracy of remote sensing image ground object classification.

[0047] The following is an example of a variable grid batch generation sample of high spatial resolution multispectral image data and surface cover classification data of Changxing County, Huzhou City, Zhejiang Province, combined with the accompanying drawings and embodiments to further illustrate the technical solution of the present invention. At the same time, the method and steps for generating hyperspectral image data samples based on high spectral resolution can be referred to for execution.

[0048] like Figure 1 As shown, the process of the embodiment of the present invention includes the following steps:

[0049] Step 1: Obtain remote sensing satellite image data, surface cover classification vector data, county-level administrative division boundary vector data and perform geometric validity check, which includes the following steps:

[0050] Step 1.1, obtain remote sensing satellite image data in 4-band TIFF format with a spatial resolution better than 2 meters. The file name conforms to the satellite image naming standard for easy automatic search; the data is a 2-meter resolution Gaofen-1 fused image orthophoto product;

[0051] Step 1.2: The above products are remote sensing satellite images that have been orthorectified, and have orthophoto projection properties and accurate geospatial information. The metadata of the data is read, where the metadata file is an XML file, and the corresponding geospatial reference, spatial resolution and other information are read by reading the element name. Among them, the geographic coordinate system is WGS84 coordinate system, the projection coordinate system is UTM coordinate system, the spatial resolution is 2m, the number of image bands is 4, the product level is single-scene fused image orthophoto product, the imaging date is June 24, 2021, the central geographic coordinates are 118.3E, 31.1N, and the geographical range is the southern area of ​​Taihu Lake, Huzhou City, Zhejiang Province. The longitudes and latitudes of the four corners of the valid data area are: the upper left corner is 31.28E, 119.84N, the upper right corner is 31.28E, 120.28N, the lower left corner is 30.89E, 119.84N, and the lower right corner is 20.89E, 120.28N. The above metadata information is complete and the format is correct.

[0052] Step 1.3, obtain county-level administrative division boundary vector data and surface cover classification vector data, the file format is Shapefile, according to the rules of polygon validity defined in the OGC SFSQL standard, check the data validity of the polygon patches contained in the vector data, and repair the invalid polygons; the data validity check method mainly includes the judgment of whether the coordinates of the first and last points of the ring are the same and the inclusion test of the ring and the point; if there are geometries that do not meet the requirements, the invalid geometries are repaired, that is, the buffer generation method is used to achieve the purpose of repairing the geometry: the buffer geometry is a brand new geometry, which is constructed by the offset line about the original geometry. If the original line is not offset (zero), the new geometry is constructed using the OGC topology rules, and the structure will be the same as the original geometry;

[0053] Step 1.4, obtain a remote sensing satellite image cloud mask file in a single-band TIFF format corresponding to the remote sensing satellite image data, where the pixel value of the cloud-covered area is the integer value of the cloud land class code, and the pixel value of the cloud-free area is 0. The file name conforms to the satellite image naming specification and ends with "_cloudmask" for automatic search;

[0054] Step 1.5, check whether the geographic scope and spatial reference of the above files meet the requirements, that is, the geographic scope of other files at least completely includes the geographic scope of the remote sensing satellite image, and the spatial reference is consistent with the remote sensing satellite image; if it meets the requirements, execute the next step. If the geographic scope does not meet the requirements, it is necessary to re-enter the data file that completely includes the geographic scope of the remote sensing satellite image. If the spatial reference is inconsistent, it is necessary to convert other files to the spatial reference of the remote sensing satellite image based on the spatial reference of the remote sensing satellite image until it fully meets the requirements and execute the next step.

[0055] Step 2: Generate a variable grid based on remote sensing satellite image data. For the current remote sensing satellite image data, customize the variable grid size to 1024*1024, generate a 1024*1024 grid, and ensure that the grid completely covers the image, and there is an overlapping area with a specified width of 100 pixels between grid cells, such as Figure 2 As shown;

[0056] Step 3, image effective area and mask generation, specifically includes the following steps:

[0057] Step 3.1, based on the latitude and longitude coordinates of the four corners of the effective area of ​​the target remote sensing satellite image data obtained in step 1.2, generate polygon vector data of the effective area of ​​the image, which is a quadrilateral vector, revealing the effective area range of the remote sensing satellite image data;

[0058] Step 3.2, rasterizing the generated image valid area polygon vector data, the specific process is: based on the target remote sensing satellite image, with the same geographic range, spatial reference, and pixel size, create a blank mask raster; for each pixel position of the blank mask raster, obtain the positional relationship with the image valid area polygon vector, the raster pixel value within the effective area boundary is 1, and the raster pixel value outside the effective area boundary is 0, forming an image valid area raster mask file;

[0059] Step 4: Screening of land cover patches, including the following steps:

[0060] Step 4.1, check whether there is county-level administrative district vector data after the map simplification processing. The simplified county-level administrative district vector data after the map simplification processing is rectangular vector data, which reveals the spatial scope of the county-level administrative district, facilitates subsequent rapid retrieval, and improves the processing speed. If it does not exist, extract the outer rectangle of the administrative district map in turn, that is, find the maximum and minimum points of longitude and latitude corresponding to the vector data in the X and Y directions respectively, and extend the four points along the X and Y directions as the four sides of the rectangle, so as to generate the corresponding simplified county-level administrative district vector data;

[0061] Step 4.2, superimposing and analyzing the polygon vector data of the effective area of ​​the image and the simplified county-level administrative division vector data, the specific process is: polygon intersection operation is performed on the polygons in the effective area of ​​the image and the polygons in the simplified county-level administrative division, the polygon intersection operation is realized by the operation of edge-polygon intersection and polygon-point inclusion, the administrative district polygons with intersection relationship are screened out, and finally the relevant administrative districts are formed;

[0062] Step 4.3, for each relevant administrative district, check whether there is land cover classification vector data after the simplified map spot processing. If not, extract the outer rectangle of the land cover map spot in turn, and process it in the same way as the outer rectangle of step 4.1 to generate the corresponding simplified land cover classification vector data;

[0063] Step 4.4, based on the simplified land cover classification vector data, complete the rapid retrieval and generate the land cover spot vector data. For each relevant administrative area, use the polygon vector data of the effective area of ​​the image and the simplified land cover classification vector data of the administrative area to perform overlay analysis (polygon intersection operation), screen out the relevant simplified land cover spots, and then retrieve the original land cover spots according to the identification number of the spots, and generate the land cover spot vector data corresponding to the target remote sensing satellite image;

[0064] Step 5, based on the remote sensing satellite image data, generate a land class label image. The surface coverage map vector described in step 4.4 is rasterized. The rasterization process is as follows: first, a blank grid is generated that is consistent with the geographical scope, spatial resolution, and geographic spatial reference of the remote sensing satellite image data; then, for each grid cell, the surface classification value of the corresponding position of the surface coverage map vector is obtained according to its spatial position, and the surface coverage type with the largest area is used as the surface coverage classification value of the grid cell. All grid cells are processed in turn, and finally a land class label image file is generated, whose raster pixel value is the land class code attribute value of the surface coverage map, such as Figure 3 As shown;

[0065] Step 6: Double mask processing is performed on the land label image file. The specific steps include the following:

[0066] Step 6.1, applying the effective area grid mask image of the image to perform mask processing on the land class label image, the specific process is: performing a "multiplication" operation on the land class label image and the effective area grid mask image, that is, when the effective area grid pixel value is 1, the land class label code of the pixel corresponding to the land class label image is kept unchanged, and when the effective area grid pixel value is 0, the pixel value corresponding to the land class label image is changed to 0; finally, the land class label image and the black edge of the target remote sensing satellite image have consistent corresponding classification values;

[0067] Step 6.2, applying the raster cloud mask image to perform mask processing on the land class label image, the specific process is: performing a "binarization" operation on the cloud mask image, assigning a value of 0 to the cloud area and a value of 1 to the cloudless area, and generating a binary cloud mask image; performing a "multiplication" operation on the binary cloud mask image and the land class label image, assigning a value of 0 to the cloud area corresponding to the land class label image, and keeping the original value unchanged for the cloudless area; performing an "addition" operation on the cloud mask image and the land class label image, assigning a value of the cloud mask image to the cloud area corresponding to the land class label image, and keeping the original value unchanged for the cloudless area; finally, the land class label image and the cloud coverage area of ​​the target remote sensing satellite image have consistent corresponding classification values;

[0068] Step 7: Generate sample image slices. For each grid cell of the variable grid, according to the geographic range of the grid cell, the slice units of the satellite image of the demonstration area and the slice units of the masked land class label image are cut and output respectively, and finally multiple sample images are obtained, such as Figure 4 shown.

[0069] In addition to the above embodiments, the present invention may also have other implementation modes. Any technical solution formed by equivalent replacement or equivalent transformation falls within the protection scope required by the present invention.

Claims

1. A method for batch generation of variable grid samples based on multi / hyperspectral images and land cover data, characterized in that: The following steps are involved: Step 1, data acquisition and validity check; including: acquiring target remote sensing satellite image data, reading metadata of the target remote sensing satellite image data, checking the geographic spatial reference, spatial resolution, number of image bands, product level, imaging date, central geographic coordinates, geographic range and valid data area, and ensuring that the input image is orthophoto data; acquiring county-level administrative division boundary vector data and surface cover classification vector data, checking whether the geographic spatial reference of the vector data is consistent with the target orthophoto data, checking the validity of vector geometric figures, and checking the attribute fields of vector attributes; acquiring a raster cloud mask file corresponding to the orthophoto, and checking whether the geographic range and spatial reference are consistent with the target orthophoto; The data format requirements are as follows: obtain multispectral image data in 4-band TIFF format with a spatial resolution better than 2 meters or hyperspectral image data in 166 or 330-band TIFF format with a spatial resolution of 30 meters. The file name needs to comply with the image naming specification for easy automatic search; obtain surface cover classification vector data, which needs to be stored in Shapefile format according to administrative regions, and its attribute field should at least contain an integer field named CLASSID representing the land class code; there are land feature type patches, and the data validity is checked for the patches, and the geometric figures are repaired to obtain the county boundary administrative division boundary vector file as a polygon Shapefile; perform spatial registration on the above files and ensure that the spatial reference is consistent; Step 2, variable grid generation: according to remote sensing satellite image data of different resolutions and sample training requirements, the grid unit size and grid overlap width are set as needed to generate a grid vector file of specified specifications that completely covers the image, and its geographic spatial reference should be consistent with the target remote sensing satellite image; Step 3, generating an image effective area and a mask; extracting the coordinates of the four corner points of the image effective area from the metadata of the target remote sensing satellite image data, generating polygonal vector data of the image effective area; rasterizing the polygonal vector data of the image effective area to form a raster mask file of the image effective area; Step 4: Screening of land cover spots; using simplified and quick-checking techniques to speed up the screening process of land cover spots; Among them, it is checked whether there is county-level administrative district vector data after the spot simplification processing, if not, the outer rectangle of the administrative district spot is extracted in turn to generate the corresponding simplified county-level administrative district vector data; the polygonal vector data of the effective area of ​​the image and the simplified county-level administrative division vector data are superimposed and analyzed to screen out the relevant administrative districts; then, the relevant administrative districts are traversed, and for each administrative district, it is checked whether there is surface coverage classification vector data after the spot simplification processing, if not, the outer rectangle of the surface coverage spot is extracted in turn to generate the corresponding simplified surface coverage vector data; the relevant administrative districts are traversed, and for each administrative district, the polygonal vector data of the effective area of ​​the image and the simplified surface coverage classification vector data of the administrative district are superimposed and analyzed to screen out the relevant simplified surface coverage spots, so as to retrieve the original surface coverage spots according to the identification number of the spots, and generate the surface coverage spot vector data corresponding to the target remote sensing satellite image; Step 5, generating a land class label image; according to the geographic scope, geographic spatial reference, spatial resolution of the target remote sensing satellite image, and the land class code of the surface coverage patch, rasterization parameters are set, and the screened surface coverage patch vectors are rasterized to generate a single-band land class label image corresponding to the target remote sensing satellite image; wherein the raster pixel value of the land class label image is the land class code of the surface coverage patch; Step 6, mask processing of the land class label image; using the image valid area raster mask file to mask the land class label image, so that the land class label image and the black edge of the target remote sensing satellite image have consistent corresponding classification values; using the raster cloud mask file to mask the land class label image, so that the land class label image and the cloud coverage area of ​​the target remote sensing satellite image have consistent corresponding classification values; specifically including the following steps: Step 6.1, applying the effective area grid mask image to the land class label image, the specific process is: multiplying the land class label image and the effective area grid mask image, that is, when the effective area grid pixel value is 1, the land class label code of the pixel corresponding to the land class label image is kept unchanged, and when the effective area grid pixel value is 0, the pixel value corresponding to the land class label image is changed to 0; finally, the land class label image and the black edge of the target remote sensing satellite image have consistent corresponding classification values; Step 6.2, apply the raster cloud mask image to perform mask processing on the land class label image. The specific process is as follows: binarize the cloud mask image, assign 0 to the cloud area and 1 to the cloudless area to generate a binary cloud mask image; multiply the binary cloud mask image and the land class label image, assign 0 to the cloud area of ​​the land class label image, and keep the original value of the cloudless area unchanged; add the cloud mask image and the land class label image, assign the land class code of the cloud mask image to the cloud area of ​​the land class label image, and keep the original value of the cloudless area unchanged; finally, the cloud coverage area of ​​the land class label image and the target remote sensing satellite image have consistent corresponding classification values; Step 7, sample image slicing; traverse the variable grid, and for each grid unit, according to the geographic range of the grid unit, cut and output the slice unit of the target remote sensing satellite image and the slice unit of the masked land class label image of the specified geographic range respectively, so that the two constitute a sample image.

2. The method for batch generating variable grid samples based on multi / hyperspectral images and land cover data according to claim 1, characterized in that: In step 1, data validity checks include: (1) Short segment - a segment shorter than the length allowed by the system unit referenced by the control associated with the geometry; (2) Empty geometry - has no geometry or the SHAPE field is empty; (3) Incorrect ring orientation - the rings of the surface are not oriented correctly, i.e., outer ring - clockwise, inner ring - counterclockwise; (4) Incorrect line segment orientation - the orientation of each line segment is inconsistent. The "end" point of line segment i should be connected to the "start" point of line segment i+1; (5) Self-intersection - a face cannot intersect with itself; (6) Non-closed loop - the "end" point of the last line segment in the loop must be connected to the "start" point of the first line segment; (7) Empty Parts - A geometry has multiple parts, one of which is empty and has no geometry; (8) Duplicate vertices - two or more vertices of the geometry have the same coordinates; (9) Mismatched attributes - the Z coordinate or M coordinate of a line segment endpoint does not match the Z coordinate or M coordinate of the corresponding endpoint in the next line segment; (10) Discontinuous part - a part of geometry consists of disconnected or discontinuous parts; (11) Empty Z Value - One or more vertices of the geometry have an empty Z value.

3. The method for batch generating variable grid samples based on multi / hyperspectral images and land cover data according to claim 1 or 2, characterized in that: For the spots in the vector file, the validity of the spot geometry data needs to be checked and should meet the specifications of the Shapefile format polygon feature class.

4. The method for batch generating variable grid samples based on multi / hyperspectral images and land cover data according to claim 3, characterized in that: The validity check of the patch geometry data follows the rules of polygon validity defined by the OGC SFSQL standard: (1) The rings of a polygon must be closed; (2) The inner ring must be inside the outer ring; (3) The rings cannot intersect with themselves, they cannot touch each other, and they cannot cross; (4) A ring cannot touch other rings except at a certain point.

5. The method for batch generating variable grid samples based on multi / hyperspectral images and land cover data according to claim 1, characterized in that: In step 2, variable grid generation includes: customizing standard grid specifications based on remote sensing satellite image data; generating a grid that completely covers the image and meets the specifications; ensuring that there is an overlapping area of ​​a specified width between grid cells; and the grid cell size and the overlapping width between grids are input externally.

6. The method for batch generating variable grid samples based on multi / hyperspectral images and land cover data according to claim 1, characterized in that: In step 3, the image effective area and mask are generated, the image effective area vector is used for administrative area screening, and then the relevant surface cover patches are screened, and the image effective area mask grid is used for mask processing of land class labels to make the land class labels consistent with the target remote sensing satellite image.

7. The method for batch generating variable grid samples based on multi / hyperspectral images and land cover data according to claim 1, characterized in that: In step 5, the geographical range of the screened surface coverage patch input in this step should be greater than or equal to the geographical range of the target remote sensing satellite image; the integer field of CLASSID contained in the surface coverage patch represents the land class code, which will be used as the raster pixel value of the corresponding position after the vector is rasterized.

8. The method for batch generating variable grid samples based on multi / hyperspectral images and land cover data according to claim 1, characterized in that: In step 7, specifically: each sample contains two output files in TIFF format, and the file naming rule is N+7-digit latitude value+E+8-digit longitude value+_+8-digit date+LABEL.TIF or N+7-digit latitude value+E+8-digit longitude value+_+8-digit date+IMAGE.TIF; the longitude and latitude values ​​in the file name are integer values ​​obtained by multiplying the original values ​​by 100,000, and if the number of digits is insufficient, zeros need to be added in front of the value, and the date in the file name is the imaging date of the target remote sensing satellite image.