A method for storing custom remote sensing image metadata

By building metadata tables and information tables in the database and customizing the inclusion specifications, the problem of inefficient storage of traditional remote sensing image metadata is solved, and the inclusion of new types of data is achieved dynamically supporting the inclusion of new types of data is improved, and the inclusion efficiency and data accuracy are improved.

CN115033569BActive Publication Date: 2025-05-02ZHEJIANG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210622792.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-02
Publication Date
2025-05-02
Estimated Expiration
2042-06-02

AI Technical Summary

Technical Problem

Traditional remote sensing image metadata storage is inefficient, and every time a new type of remote sensing data is added, the inclusion program needs to be modified, resulting in code redundancy.

Method used

By building metadata tables and metadata information tables in the database, customizing the inclusion specifications, dynamically supporting new types of remote sensing image metadata entry is achieved. The specific steps include building a metadata table and information table, decompressing and quality checking of remote sensing data files, parsing and importing metadata information, and uploading the data files through FTP.

Benefits of technology

It realizes dynamic support for new types of remote sensing image metadata entry without modifying the incoming program, which improves the incoming efficiency, ensures the accuracy of data, and improves the rational utilization of database storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115033569B_ABST
    Figure CN115033569B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for customizing remote sensing image metadata storage. The steps are as follows: 1) based on remote sensing image metadata and storage requirements, customize storage specifications, realize batch naming of metadata table fields and addition of metadata information tables; 2) create a workspace, pre-process the original data, and identify the erroneous data; 3) based on the storage specifications, perform quality inspection on the decompressed data and identify the missing data; 4) parse the remote sensing image metadata information, instantiate the corresponding remote sensing data metadata information operation class, and import the metadata information into the database table; 5) establish a connection with the FTP designated server, open the transmission channel, and upload the remote sensing data to the designated location of the FTP server. The present invention has very important practical application value for the storage of remote sensing image metadata.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of remote sensing data management, and in particular relates to a method for storing user-defined remote sensing image metadata. Background Art

[0002] Remote sensing image data storage is to import the processed remote sensing data and related metadata into the corresponding position of the database. Remote sensing image metadata is a summary and extraction of remote sensing data features, and plays an important role in remote sensing data sharing and application. Using metadata, users can quickly and effectively understand, locate, and evaluate geographic data. According to the actual needs of remote sensing data applications, remote sensing metadata includes information such as satellites, sensors, cloud cover, imaging time, and geographic range of remote sensing images.

[0003] Traditional remote sensing image metadata storage and warehousing requires first parsing the metadata file, developing a warehousing procedure, extracting metadata information and encapsulating it into objects, and finally writing the persistence layer objects into the database. Different metadata files have structural heterogeneity and semantic heterogeneity, so for traditional warehousing, every time a new type of remote sensing data is added, the warehousing procedure needs to be constantly modified and the code needs to be added, resulting in code redundancy and low warehousing efficiency. Summary of the invention

[0004] The purpose of the present invention is to overcome the existing deficiencies and provide a method for storing user-defined remote sensing image metadata, so that users can customize specifications in the database and complete data storage.

[0005] To achieve the purpose of the present invention, the technical solution provided is as follows:

[0006] A method for storing custom remote sensing image metadata. Its steps are as follows:

[0007] S1: For each type of remote sensing data to be stored, a corresponding metadata table is constructed in the database based on the remote sensing image metadata and storage requirements, and the fields in the metadata table are batch named. At the same time, a metadata information table is constructed to store the storage specifications of each metadata table.

[0008] S2: Create a workspace, copy the original remote sensing data package to be stored in the workspace, decompress the original remote sensing data package to obtain the decompressed remote sensing data file, and mark the error data package that has decompression error and stop storing it;

[0009] S3: Based on the storage specifications stored in the metadata information table, the decompressed remote sensing data file is quality checked, and if the quality check fails, the file is marked and storage is stopped;

[0010] S4: After passing the quality check, find the metadata file in the decompressed remote sensing data file, parse the remote sensing image metadata information, and import the metadata information into the corresponding metadata table in the database by instantiating the corresponding remote sensing data metadata information operation class;

[0011] S5: After the metadata information is imported, a connection is established with the specified FTP server, a transmission channel is opened, and the remote sensing data file is uploaded to the specified location of the FTP server.

[0012] Preferably, the specific method of step S1 is as follows:

[0013] S11: For each type of remote sensing data to be stored in the database, a corresponding metadata table is created in the database, wherein the metadata table contains a basic information field and a metadata node field, the basic information field is used to store the overview information of the stored remote sensing data, the metadata node field is used to store all metadata node information that needs to be extracted and stored, and the metadata node field name in the metadata table needs to be consistent with the node name in the metadata file corresponding to the remote sensing data type;

[0014] S12: After each metadata table is created, a row of records needs to be added to the metadata information table, and the remote sensing data type name, the corresponding metadata table name, and the corresponding storage specification are recorded in the row of records. Only the original remote sensing data that meets the storage specification can be stored; wherein the storage specification at least includes the original data naming specification and the metadata naming specification expressed by regular expressions;

[0015] Preferably, the specific method of step S2 is as follows:

[0016] S21: creating a workspace for remote sensing data processing, and after the workspace is established, copying the original remote sensing data package to be stored into the workspace;

[0017] S22: Call the decompression process in the workspace to decompress the original remote sensing data package to form a series of remote sensing data files, and record the process return value. If a decompression error occurs, the compressed package with the decompression error is marked and the storage is stopped.

[0018] Preferably, the decompression process is 7za.exe.

[0019] Preferably, the specific method of step S3 is as follows:

[0020] S31: firstly, the file format of the remote sensing raw data packet is judged by matching the name of the remote sensing raw data packet with the regular expression of the raw data naming specification field in each record row in the metadata information table. If the match is successful, the current remote sensing data type is identified based on the remote sensing data type name in the matching record row, and subsequent data storage is allowed;

[0021] S32: Perform a metadata integrity check on the decompressed remote sensing data file. The detection method is: use the regular expression of the metadata naming specification field in the matching record line to filter out the metadata file that meets the storage format from all remote sensing data files, and then parse out the set of all metadata node names in the metadata file. According to the metadata table name in the matching record line, determine the corresponding metadata table from the database, and use the determined metadata table as a reference to determine whether the set of all metadata node names obtained by parsing contains all the metadata node fields required in the metadata table. If so, the metadata integrity check passes. If not, it means that the metadata file lacks necessary metadata node information, the metadata integrity check fails, and the missing metadata node fields are marked and storage is stopped.

[0022] Preferably, when parsing the set of all metadata node names in the metadata file, it is necessary to determine the file type based on the suffix name of the metadata file, and then select the corresponding parsing method for classification parsing.

[0023] Preferably, the specific method of step S4 is as follows:

[0024] S41: When the decompressed remote sensing data file passes the quality check, the metadata file is parsed according to the metadata node field requirements in the corresponding metadata table to obtain all metadata node information;

[0025] S42: Instantiate the corresponding remote sensing data metadata information operation class, and import the metadata information into the metadata table.

[0026] Preferably, in S42, a metadata operation object is constructed based on the parsed metadata information, the key-value pair information of the Dictionary is converted into the attribute value of the class, and the metadata information is stored in the metadata table using an SQL insert statement.

[0027] Preferably, in step S5, the storage location of the remote sensing data file is determined according to the original data naming specification, and the file transfer is completed based on the File Transfer Protocol (FTP).

[0028] Preferably, in step S5, when uploading the remote sensing data file to the FTP server, the original remote sensing data package in the workspace directory and the corresponding metadata file and thumbnail need to be uploaded.

[0029] Compared with the prior art, the present invention has the following beneficial effects:

[0030] The present invention uses a metadata information table and a metadata table to customize the warehousing specification, and realizes dynamic support for new types of remote sensing image metadata warehousing without modifying the warehousing program. The present invention verifies the format of the acquired remote sensing data and the integrity of the corresponding metadata before warehousing, and then uploads it after determining that the acquired data meets the requirements, thereby avoiding data errors caused by data damage during the acquisition process and ensuring data accuracy. The present invention proposes a new method for parsing metadata, which uses the metadata table as a standard to classify and parse multiple types of metadata, providing a new idea for data warehousing. The import function of the present invention automatically stores all data, and on the basis of quickly realizing automatic data warehousing, it also improves the reasonable utilization rate of storage space in the database. The present invention provides a demonstration and mixed reference for customizing remote sensing image metadata warehousing. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 This is a flow chart of the method for storing custom remote sensing image metadata;

[0032] Figure 2 This is an example of GF6 remote sensing image metadata table;

[0033] Figure 3 Requirements for storing GF6 remote sensing image data.

[0034] Figure 4 This is the decompressed file of GF6 remote sensing image data. DETAILED DESCRIPTION

[0035] The present invention will be further described and illustrated below in conjunction with the accompanying drawings and specific implementation methods.

[0036] like Figure 1 As shown in FIG. 1 , it is a flow chart of the method for storing custom remote sensing image metadata provided by the present invention, and its main steps include 5 steps, namely S1 to S5:

[0037] S1: For each type of remote sensing data to be stored in the database, a corresponding metadata table is constructed in the database based on the remote sensing image metadata and storage requirements, and the fields in the metadata table are named in batches. At the same time, a metadata information table is constructed to store the custom storage specifications of each metadata table.

[0038] S2: Create a workspace, and copy the original remote sensing data package to be stored into the workspace, decompress the original remote sensing data package to obtain the decompressed remote sensing data file, and mark the erroneous data package that has decompression error and stop storing it.

[0039] S3: Based on the storage specifications stored in the metadata information table, the decompressed remote sensing data file is quality checked. If the quality check fails, the file is marked and storage is stopped.

[0040] S4: After passing the quality check, find the metadata file in the decompressed remote sensing data file, parse the remote sensing image metadata information, and import the metadata information into the corresponding metadata table in the database by instantiating the corresponding remote sensing data metadata information operation class.

[0041] S5: After the metadata information is imported, a connection is established with the specified FTP server, a transmission channel is opened, and the remote sensing data file is uploaded to the specified location of the FTP server.

[0042] The specific implementation of S1 to S5 in this embodiment and their effects are described in detail below.

[0043] First, the remote sensing image files are organized in the form of compressed packages, which contain remote sensing image metadata files in XML format and text format. Metadata information is stored in the leaf nodes of the XML document tree and in text files. Custom specifications are implemented with the help of regular expressions. Regular expressions are a logical formula for string operations, which use some pre-defined specific characters and the combination of these specific characters to form a "regular string". This "regular string" is used to express a filtering logic for the string.

[0044] In step S1 of this embodiment, according to the metadata file and the storage requirements, the metadata table and storage specifications are established according to S11-S12:

[0045] S11: For each type of remote sensing data to be stored in the database, a corresponding metadata table is created in the database, wherein the metadata table contains basic information fields and metadata node fields. The basic information field is used to store the overview information of the stored remote sensing data, and the metadata node field is used to store all metadata node information that needs to be extracted and stored in the database, and the metadata node field name in the metadata table needs to be consistent with the node name in the metadata file corresponding to the remote sensing data type.

[0046] As a specific implementation form of this embodiment, when a new metadata table is created in the database, the table stores the metadata node information that the user needs to extract. Each data table must include the following five basic information fields, as shown below:

[0047] Field name: ID; Type: int; Not allowed to be empty, primary key; Purpose: record the name of the original compressed package;

[0048] Field name: Name; Type: text; Purpose: record the name of the original remote sensing data compression package;

[0049] Field name: QRST_CODE; Type: text; Purpose: to record the unique identifier of the entry record;

[0050] Field name: ImportTime; Type: timestamp; Purpose: record the import time;

[0051] Field name: Size; Type: float; Purpose: to record the file size of the original remote sensing data compression package;

[0052] In addition to the above five basic information fields, the names of other fields in the data table must be consistent with the node names in the metadata file. If a data type has multiple different sensors, and the metadata node names corresponding to each sensor cannot be unified, multiple data tables can be created. Taking GF6 data as an example, the metadata table is as follows: Figure 2 shown.

[0053] S12: After each metadata table is created, a row of records needs to be added to the metadata information table. This row of records records the name of the remote sensing data type, the corresponding metadata table name, and the corresponding storage specifications. Only the original remote sensing data that meets the storage specifications can be stored; wherein the storage specifications at least include the original data naming specifications and the metadata naming specifications expressed by regular expressions.

[0054] As a specific implementation form of this embodiment, the fields of the metadata information table are as follows.

[0055] Field id: numeric increment;

[0056] Field dataname: remote sensing data type name;

[0057] Field tablename: the name of the metadata table of remote sensing data;

[0058] Field nameexpression: the original data naming specification, usually expressed as a regular expression, uniquely identifies the original data;

[0059] Field xmlname: metadata naming specification, expressed as a regular expression;

[0060] Field thumbnailname: thumbnail naming convention, expressed as a regular expression. If there is no thumbnail, this field can be left blank.

[0061] Field viewname: the view corresponding to the data table;

[0062] Field xmlcount: indicates the number of metadata files corresponding to a row of records. If a compressed package corresponds to two records, but a record only corresponds to one metadata file, the value of the field xmlcount should be filled in as 1.

[0063] In this embodiment, step S2 is divided into two steps: creating a workspace and preprocessing. The specific method is as follows:

[0064] S21: Remote sensing data is stored in a distributed virtual space and is pushed directly by the satellite data center. In order to ensure the integrity of the original data and the normal data push, the process of parsing remote sensing data needs to be carried out in a separate space. The workspace is created by the data storage system according to unified specifications, mainly realizing the preprocessing of remote sensing data, data quality inspection and other processes. The workspace appears as an intermediate file and will be deleted by the program after the storage is completed. After the workspace is established, the original remote sensing data package to be stored is copied to the workspace to continue the preprocessing process.

[0065] S22: Preprocessing mainly refers to the process of decompressing raw data. Raw remote sensing data is stored in the form of compressed packages. In order to parse remote sensing metadata information, it must be decompressed and analyzed. Therefore, the decompression process can be called in the workspace to decompress the compressed package of the raw remote sensing data package to form a series of remote sensing data files, and the process return value is recorded at the same time. If a decompression error occurs, the compressed package with decompression error is marked and storage is stopped.

[0066] As a specific implementation form in this embodiment, the remote sensing data decompression can be divided into single decompression and double decompression according to the type of original remote sensing data. The original data compression package ending with .tar.gz is double decompression, and the file ending with .tar\.zip\.gz ​​is single decompression. Of course, the specific number of decompressions needs to be selected according to the specific situation of the compression package. Decompression can be achieved by using the process resource specified by the StartInfo attribute of the Process component, enabling the 7za.exe file, and recording the process return value at the same time, marking the compression package with decompression error, and stopping storage if the decompression error occurs.

[0067] In this embodiment, step S3 mainly determines whether the format of the acquired remote sensing data is correct, and calculates and determines the integrity of the metadata corresponding to the remote sensing data. When the format of the remote sensing data is correct and the corresponding metadata is complete, it is determined that the remote sensing data and the corresponding metadata meet the requirements. The specific method is as follows:

[0068] S31: Determine whether the format of the remote sensing data is correct based on the actual needs of the remote sensing data application and the requirements of the database design. In one embodiment, it is determined whether the remote sensing data is in the remote sensing data format, usually determining whether it is a valid remote sensing image file format. The file format determination is to match the name of the remote sensing original data packet with the regular expression of the original data naming specification field in each record row in the metadata information table (i.e., the nameexpression field in the custom storage specification of the metadata information table). If the match is successful, the current remote sensing data type is identified based on the remote sensing data type name in the matching record row, and subsequent data storage is allowed.

[0069] S32: Perform a metadata integrity check on the decompressed remote sensing data file. The detection method is: use the regular expression of the metadata naming specification field in the matching record row (i.e., the xmlname field in the custom storage specification of the metadata information table) to filter out metadata files that meet the storage format from all remote sensing data files, and then parse out the set of all metadata node names in the metadata file. According to the metadata table name in the matching record row, determine the corresponding metadata table from the database, and use the determined metadata table as a reference to determine whether the set of all metadata node names obtained by parsing contains all the metadata node fields required in the metadata table. If so, the metadata integrity check passes. If not, it means that the metadata file lacks necessary metadata node information, the metadata integrity check fails, the missing metadata node fields are marked and storage is stopped.

[0070] It should be noted that when parsing the set of all metadata node names in the metadata file, it is necessary to determine the file type according to the suffix of the metadata file, and then select the corresponding parsing method for classification parsing. As a specific implementation form of this embodiment, the specific method of the above S32 is as follows:

[0071] S321: Classify and parse the remote sensing image metadata file to obtain metadata node information.

[0072] Metadata with suffixes such as ".xml", ".kml", ".safe" and other metadata that conforms to the XML format recursively extracts the XPath of all leaf nodes in the XML tree corresponding to the metadata file. Specifically, first load the URL of the file containing the XML document into the instance of the XmlDocument class to obtain the child nodes of all nodes. Then pass the child nodes as parameters to the recursive method. If the current node is a leaf node and not a comment node, the node name is added to the result set. Otherwise, recursively access each child node of the current node until the names of all leaf nodes are added to the result list.

[0073] Text files with suffixes such as ".txt" and ".workreport" can be parsed using the StreamReader class to perform character-based data read and write operations. Each time a line of characters is read from the current stream, the read string is split according to the "=" symbol, the left side of the symbol is the node name, and the right side is the node value, and the node name is put into the collection.

[0074] S322: Parse the information in the metadata table. The fields in the metadata table are determined based on the actual working conditions of the corresponding remote sensing data and are the basis for integrity detection. Determine the metadata table based on the value of the tablename field corresponding to the data in the metadata information table. Use SQL statements to query metadata information.

[0075] S323: Based on the database metadata table information, determine whether the metadata node information is complete. If it is incomplete, it means that the metadata lacks the necessary node information, the metadata integrity check fails, and the record lacks fields. If it meets the requirements, the metadata information is complete and continues to be stored.

[0076] In this embodiment, the specific method of step S4 is as follows:

[0077] S41: When the decompressed remote sensing data file passes the quality check, the metadata file is parsed according to the metadata node field requirements in the corresponding metadata table to obtain all metadata node information. It should be noted that the metadata table corresponding to the remote sensing data file and the metadata file to be parsed therein have been determined in step S3.

[0078] The parsing method of the above metadata file also needs to be selected according to its file type. Specifically: if the metadata conforms to the XML format, it is parsed with the help of the XmlDocument class. XmlDocument regards XML as a tree structure and builds the tree structure of the document in memory. Specifically, the XmlDocument instance loads the URL of the XML file, uses the key in the metadata table as the standard, uses the root.GetElementsByTagName method, and matches the list of all descendant elements, obtains the concatenated value of the node and all its child nodes, converts the specified string representation to an equivalent type according to the metadata table field type, and adds the specified node name and node concatenation value to the dictionary, where the key represents the node name and the value represents the node concatenation value.

[0079] If the metadata is in text format, it is parsed with the help of StreamReader class, which reads characters from byte stream in a specific encoding. Before each reading, it is necessary to determine whether the current stream position is at the end of the stream. If it reaches the end of the input stream, the read value is null. If it is not the end of the stream, a line of characters will be read from the current stream and the data will be returned as a string. The returned string is split by the "=" symbol and stored in parts. At the same time, the node value is equivalently converted and added to the dictionary, where the key represents the node name and the value represents the node value.

[0080] S42: Instantiate the corresponding remote sensing data metadata information operation class and import the metadata information into the metadata table. Specifically, based on the parsed metadata information, construct a metadata operation object, convert the key-value pair information of the dictionary into the attribute value of the class, and use the SQL insert statement to store the metadata information into the metadata table. As a specific implementation form of this embodiment, the "insert into metadata table name node name value node value" statement can be used to store the metadata information into the metadata table.

[0081] In this embodiment, the specific method of step S5 is as follows:

[0082] The storage location of remote sensing data files is determined according to the naming convention of the original data, and file transfer is mainly based on the file transfer protocol (FTP). The remote sensing location is generally stored in the form of "host IP\data type\sensor\year\month\day". File transfer uses the FTP protocol to ensure the reliable and efficient transmission of massive remote sensing data. The FTP server is connected through the user name and password to achieve user authentication. At the same time, the use of FTP transmission encryption strengthens the security of remote sensing data transmission. FTP allows users to communicate with another host in the form of file operations. It uses two TCP connections between the two communicating hosts, one virtual connection is used for control information, and the other TCP connection is used for data transmission. The file transfer protocol is a protocol for two computers to transfer files on a TCP / IP network. FTP is one of the earliest protocols used on TCP / IP networks and the INTERNET. It belongs to the application layer of the network protocol group. The FTP client can send commands to the server to download files, upload files, and create or change directories on the server.

[0083] When uploading remote sensing data files to the FTP server, at least the original remote sensing data package in the FTP upload workspace directory must be used to move it into the comprehensive database. At the same time, the metadata files and thumbnails corresponding to the original remote sensing data package can also be uploaded to the comprehensive database on the FTP server according to the actual business scenario needs. Specifically, in the decompressed directory, the metadata files that have passed the quality inspection are moved into the comprehensive database to complete the metadata file storage. In the decompressed directory, if the number of thumbnails that have passed the quality inspection is one, it means that the image used for retrieval is the same as the original image. The original image is copied to the comprehensive database, and the renamed image is placed in the retrieval location. The naming is determined according to the QRST_CODE value of the data. If the number of thumbnails that have passed the quality inspection is greater than one, it means that the data provides the original image and the image for retrieval. The retrieval image is generally a thumbnail with the "thumb" suffix. After renaming it, copy it to the retrieval image location, and copy the other thumbnails to the comprehensive database to complete the thumbnail storage.

[0084] The following is an application of the method for storing custom remote sensing image metadata described in S1 to S5 above to a specific example to demonstrate its specific implementation.

[0085] Example

[0086] The present invention is described in detail below by taking the newly added Gaofen No. 6 data as an example, and the specific steps are as follows:

[0087] 1) According to the above step S1, create a new metadata table prod_gf6 based on the remote sensing image metadata file. The result is as follows Figure 2 The metadata file and thumbnail are specified as Figure 3 As shown in Table 1, fill in the metadata information table according to the storage requirements.

[0088] 2) According to the above step S2, create a workspace and copy the original data to the workspace. The import program starts the process, calls the 7za.exe decompression tool, decompresses the compressed package of Gaofen No. 6 for the second time, and records the decompression return value. The decompressed file is as follows Figure 4 shown.

[0089] 3) According to the aforementioned step S3, the quality of the files after decompression by Gaofen-6 is checked to see whether the decompressed folder exists, whether the compressed package of the remote sensing image matches the regular expression of the nameexpression field, whether the node name of the XML file is complete, and whether both thumbnails exist.

[0090] 4) According to the above step S4, the "GF6_PMS_E34.7_N32.1_20190222_L1A1119850156.xml" file is parsed, the metadata information operation class MetaDataAll is instantiated, and the metadata information is stored in the database.

[0091] 5) According to the aforementioned step S5, the original compressed package, thumbnail and XML file are placed in the designated location of the comprehensive database to complete the storage of remote sensing data.

[0092] Table 1 Metadata information table

[0093]

[0094] The above-described embodiment is only a preferred solution of the present invention, but it is not intended to limit the present invention. A person skilled in the relevant technical field may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, any technical solution obtained by equivalent replacement or equivalent transformation falls within the protection scope of the present invention.

Claims

1. A method for storing custom remote sensing image metadata, characterized in that Its steps are as follows: S1: For each type of remote sensing data to be stored, a corresponding metadata table is constructed in the database based on the remote sensing image metadata and storage requirements, and the fields in the metadata table are batch named. At the same time, a metadata information table is constructed to store the storage specifications of each metadata table. S2: Create a workspace, copy the original remote sensing data package to be stored in the workspace, decompress the original remote sensing data package to obtain the decompressed remote sensing data file, and mark the error data package that has decompression error and stop storing it; S3: Based on the storage specifications stored in the metadata information table, the decompressed remote sensing data file is quality checked, and if the quality check fails, the file is marked and storage is stopped; S4: After passing the quality check, find the metadata file in the decompressed remote sensing data file, parse the remote sensing image metadata information, and import the metadata information into the corresponding metadata table in the database by instantiating the corresponding remote sensing data metadata information operation class; S5: After the metadata information is imported, a connection is established with the FTP designated server, a transmission channel is opened, and the remote sensing data file is uploaded to the designated location of the FTP server; The specific method of step S1 is as follows: S11: For each type of remote sensing data to be stored in the database, a corresponding metadata table is created in the database, wherein the metadata table contains a basic information field and a metadata node field, the basic information field is used to store the overview information of the stored remote sensing data, the metadata node field is used to store all metadata node information that needs to be extracted and stored, and the metadata node field name in the metadata table needs to be consistent with the node name in the metadata file corresponding to the remote sensing data type; S12: After each metadata table is created, a row of records needs to be added to the metadata information table. This row of records records the name of the remote sensing data type, the corresponding metadata table name, and the corresponding storage specifications. Only the original remote sensing data that meets the storage specifications can be stored; wherein the storage specifications at least include the original data naming specifications and the metadata naming specifications expressed by regular expressions.

2. The method for storing user-defined remote sensing image metadata according to claim 1, characterized in that: The specific method of step S2 is as follows: S21: creating a workspace for remote sensing data processing, and after the workspace is established, copying the original remote sensing data package to be stored into the workspace; S22: Call the decompression process in the workspace to decompress the original remote sensing data package to form a series of remote sensing data files, and record the process return value. If a decompression error occurs, the compressed package with the decompression error is marked and the storage is stopped.

3. The method for storing user-defined remote sensing image metadata according to claim 1, characterized in that: The decompression process is 7za.exe.

4. The method for storing user-defined remote sensing image metadata according to claim 1, characterized in that: The specific method of step S3 is as follows: S31: firstly, the file format of the remote sensing raw data packet is judged by matching the name of the remote sensing raw data packet with the regular expression of the raw data naming specification field in each record row in the metadata information table. If the match is successful, the current remote sensing data type is identified based on the remote sensing data type name in the matching record row, and subsequent data storage is allowed; S32: Perform a metadata integrity check on the decompressed remote sensing data file. The detection method is: use the regular expression of the metadata naming specification field in the matching record line to filter out the metadata file that meets the storage format from all remote sensing data files, and then parse out the set of all metadata node names in the metadata file. According to the metadata table name in the matching record line, determine the corresponding metadata table from the database, and use the determined metadata table as a reference to determine whether the set of all metadata node names obtained by parsing contains all the metadata node fields required in the metadata table. If so, the metadata integrity check passes. If not, it means that the metadata file lacks necessary metadata node information, the metadata integrity check fails, and the missing metadata node fields are marked and storage is stopped.

5. The method for storing user-defined remote sensing image metadata according to claim 4, characterized in that: When parsing the set of all metadata node names in a metadata file, it is necessary to determine the file type based on the suffix name of the metadata file, and then select the corresponding parsing method for classification parsing.

6. The method for storing user-defined remote sensing image metadata according to claim 1, characterized in that: The specific method of step S4 is as follows: S41: When the decompressed remote sensing data file passes the quality check, the metadata file is parsed according to the metadata node field requirements in the corresponding metadata table to obtain all metadata node information; S42: Instantiate the corresponding remote sensing data metadata information operation class, and import the metadata information into the metadata table.

7. The method for storing user-defined remote sensing image metadata according to claim 6, characterized in that: In the above S42, based on the parsed metadata information, a metadata operation object is constructed, the key-value pair information of the Dictionary is converted into the attribute value of the class, and the metadata information is stored in the metadata table using an SQL insert statement.

8. The method for storing user-defined remote sensing image metadata according to claim 1, characterized in that: In step S5, the storage location of the remote sensing data file is determined according to the original data naming specification, and the file transfer is completed based on the File Transfer Protocol (FTP).

9. The method for storing user-defined remote sensing image metadata according to claim 8, characterized in that: In step S5, when uploading the remote sensing data file to the FTP server, the original remote sensing data package in the workspace directory and the corresponding metadata file and thumbnail need to be uploaded.

Citation Information

Patent Citations

  • Processing method of mass remote sensing image metadata with high concurrency

    CN109145155A

  • Massive remote sensing data processing method and system based on distributed architecture

    CN111723221A