A geographic data transmission method and system based on SM4 algorithm

The SM4 algorithm is used to encrypt geographical data in blocks and encrypt attribute information, which solves the problem of security threats during the transmission of geographical information data and achieves high security of data transmission.

CN115190118BActive Publication Date: 2024-09-17CHINESE ACAD OF SURVEYING & MAPPING
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210875413.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-25
Publication Date
2024-09-17
Estimated Expiration
2042-07-25

AI Technical Summary

Technical Problem

There are serious security threats during the transmission process of geographical information data, and the encryption security of the data needs to be improved.

Method used

The SM4 algorithm is used to encrypt the geometric objects in the vector geographical data format file in blocks, and the encrypted data blocks are written to the original location. At the same time, the attribute information is encrypted to ensure the security of the data during transmission.

Benefits of technology

Without changing user usage habits and computer storage and transmission file formats, the security of geographical data is significantly improved and the security of data transmission is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115190118B
    Figure CN115190118B
Patent Text Reader

Abstract

The present invention relates to a geographic data transmission method and system based on SM4 algorithm, and relates to the field of geographic data processing. The method comprises: obtaining a vector geographic data format file to be transmitted; determining each geometric object in the vector geographic data format file to be transmitted through a GDAL library; dividing the geometric objects in the vector geographic data format file to be transmitted into a plurality of data blocks according to a set number; encrypting each of the data blocks in turn using the SM4 algorithm, and writing the encrypted data blocks into the corresponding positions of the data blocks before encryption; and transmitting the encrypted vector geographic data format file to be transmitted to a preset target end in real time. The present invention improves the security of geographic data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of geographic data technology, and in particular to a geographic data transmission method and system based on SM4 algorithm. Background Art

[0002] As a high-value information in the surveying and mapping business field, surveying and mapping geographic information data stores a large amount of important and sensitive information related to the national economy and people's livelihood, such as map data, remote sensing data, and navigation data. It is currently facing serious threats from various illegal attackers and has severe geographic information data security issues. Summary of the invention

[0003] The purpose of the present invention is to provide a geographic data transmission method and system based on the SM4 algorithm, thereby improving the security of geographic data transmission.

[0004] To achieve the above object, the present invention provides the following solutions:

[0005] A geographic data transmission method based on SM4 algorithm, comprising:

[0006] Get the vector geographic data format file to be transmitted;

[0007] Determine each geometric object in the vector geographic data format file to be transmitted through the GDAL library;

[0008] Divide the geometric objects in the vector geographic data format file to be transmitted into a plurality of data blocks according to a set number; encrypt each of the data blocks in turn using the SM4 algorithm, and write the encrypted data blocks into the corresponding positions of the data blocks before encryption; one data block includes more than one geometric object;

[0009] The encrypted vector geographic data format file to be transmitted is transmitted to a preset target end in real time.

[0010] Optionally, the vector geographic data format file to be transmitted is a .shp file in a Shapefile file.

[0011] Optionally, it also includes:

[0012] Obtain the .dbf file in the Shapefile file;

[0013] The preset target attribute fields in the .dbf file in the Shapefile file are encrypted in sequence using the SM4 algorithm, and the preset target attribute fields after encryption are replaced with the preset target attribute fields before encryption to obtain the encrypted .dbf file;

[0014] The encrypted vector geographic data format file to be transmitted is transmitted to the preset target end in real time, and at the same time, the encrypted .dbf file is transmitted to the preset target end in real time.

[0015] Optionally, the geometric objects include points, lines and surfaces.

[0016] The present invention discloses a geographic data transmission system based on SM4 algorithm, comprising:

[0017] A first module for acquiring vector geographic data to be transmitted, used for acquiring a file in a format of vector geographic data to be transmitted;

[0018] A geometric object determination module, used for determining each geometric object in the vector geographic data format file to be transmitted through the GDAL library;

[0019] The first encryption module is used to divide the geometric objects in the vector geographic data format file to be transmitted into a plurality of data blocks according to a set number; encrypt each of the data blocks in turn using the SM4 algorithm, and write the encrypted data blocks into the corresponding positions of the data blocks before encryption; one data block includes more than one geometric object;

[0020] The data transmission module is used to transmit the encrypted vector geographic data format file to be transmitted to a preset target end in real time.

[0021] Optionally, the vector geographic data format file to be transmitted is a .shp file in a Shapefile file.

[0022] Optionally, it also includes:

[0023] A second vector geographic data acquisition module to be transmitted is used to acquire a .dbf file in the Shapefile file;

[0024] The second encryption module is used to encrypt the preset target attribute fields in the .dbf file in the Shapefile file in sequence by using the SM4 algorithm, and replace the preset target attribute fields before encryption with the encrypted preset target attribute fields to obtain the encrypted .dbf file;

[0025] The data transmission module is also used to transmit the encrypted .dbf file to the preset target end in real time.

[0026] Optionally, the geometric objects include points, lines and surfaces.

[0027] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0028] The present invention discloses a geographic data transmission method and system based on SM4 algorithm, which divides geometric objects in a vector geographic data format file to be transmitted into multiple data blocks according to a set number; encrypts each data block in turn using the SM4 algorithm, and writes the encrypted data block into the corresponding position of the data block before encryption; a data block includes more than one geometric object, and the security of geographic data is improved without changing the user's usage habits and the computer storage and transmission file format and status. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0030] Figure 1 A schematic diagram of a geographic data transmission method based on the SM4 algorithm of the present invention Figure 1 ;

[0031] Figure 2 A schematic diagram of a geographic data transmission method based on the SM4 algorithm of the present invention Figure 2 ;

[0032] Figure 3 A schematic diagram of the attribute encryption process in a file in a vector geographic data format transmitted by the present invention;

[0033] Figure 4 This is a schematic diagram of the structure of a geographic data transmission system based on the SM4 algorithm of the present invention. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] The purpose of the present invention is to provide a geographic data transmission method and system based on the SM4 algorithm, thereby improving the security of geographic data transmission.

[0036] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0037] Figure 1A schematic diagram of a geographic data transmission method based on the SM4 algorithm of the present invention Figure 1 , Figure 2 A schematic diagram of a geographic data transmission method based on the SM4 algorithm of the present invention Figure 2 ,like Figure 1-2 As shown, a geographic data transmission method based on the SM4 algorithm includes:

[0038] Step 101: Obtain a vector geographic data format file to be transmitted.

[0039] The vector geographic data format file to be transmitted is a .shp file in the Shapefile file.

[0040] The main file of Shapefile is .shp file, which records the coordinate information and attribute information of vector data. The present invention encrypts the coordinate data and attribute information of vector data respectively. Coordinate data records the real coordinate position of the object, and encrypting coordinate data is the most important for encrypting geographic data.

[0041] The .shp file is a file with a special data format. The storage of geometric entities in the .shp file has a certain structure. According to the structure of geometric entities in the .shp file, the position of each entity is located and the encryption method based on data blocks is obtained.

[0042] Step 102: Determine each geometric object in the vector geographic data format file to be transmitted through the GDAL library.

[0043] Step 103: Divide the geometric objects in the vector geographic data format file to be transmitted into multiple data blocks according to the set number; use the SM4 algorithm to encrypt each data block in turn, and write the encrypted data block into the corresponding position of the data block before encryption; a data block includes more than one geometric object.

[0044] Wherein, step 103 specifically includes:

[0045] Gets the number of geometric objects in the vector geographic data format file to be transmitted.

[0046] The number of settings is determined based on the number of geometric objects.

[0047] The geometric objects in the vector geographic data format file to be transmitted are divided into multiple data blocks according to the set number; the SM4 algorithm is used to encrypt each data block in turn, and the encrypted data block is written into the corresponding position of the data block before encryption.

[0048] The encryption method based on data blocks of the present invention only uses bytes for operation, does not need to be converted into double type, and does not need to use the encrypted data to construct geometric objects, which reduces the data processing process and greatly improves the encryption efficiency of the .shp file.

[0049] Step 104: The encrypted vector geographic data format file to be transmitted is transmitted to a preset target end in real time.

[0050] A geographic data transmission method based on the SM4 algorithm also includes: encrypting the attribute information, such as Figure 3 As shown, the specific steps include:

[0051] Obtain the .dbf file in the Shapefile file;

[0052] The preset target attribute fields in the .dbf file in the Shapefile file are encrypted in sequence using the SM4 algorithm, and the preset target attribute fields after encryption are replaced with the preset target attribute fields before encryption to obtain the encrypted .dbf file;

[0053] The encrypted vector geographic data format file to be transmitted is transmitted to the preset target end in real time, and at the same time, the encrypted .dbf file is transmitted to the preset target end in real time.

[0054] The geometric objects include points, lines and surfaces.

[0055] .dbf files record the attribute information of vector data and have a certain structure. A vector data may have one or more attributes. In the attribute encryption of vector data, all attribute fields are extracted, the fields to be encrypted can be customized, and the target attribute fields are encrypted. Combined with the encryption of attribute fields, the security of encryption is improved.

[0056] The above encryption and decryption algorithms are implemented in C / C++ language and encapsulated into an interface to meet the needs of directly calling the encryption and decryption algorithms for data storage and transmission.

[0057] The decryption process of the preset target end is the inverse process of the above encryption process.

[0058] Figure 4 FIG. 1 is a schematic diagram of a geographic data transmission system based on the SM4 algorithm of the present invention. Figure 4 As shown, a geographic data transmission system based on SM4 algorithm includes:

[0059] The first vector geographic data to be transmitted acquisition module 201 is used to acquire a format file of the vector geographic data to be transmitted;

[0060] The geometric object determination module 202 is used to determine each geometric object in the vector geographic data format file to be transmitted through the GDAL library;

[0061] The first encryption module 203 is used to encrypt the vector geographic data format file to be transmitted by traversing each of the geometric objects in turn: encrypt each of the data blocks in turn using the SM4 algorithm, and write the encrypted data block into the corresponding position of the data block before encryption;

[0062] The data transmission module 204 is used to transmit the encrypted vector geographic data format file to be transmitted to a preset target end in real time.

[0063] The vector geographic data format file to be transmitted is a .shp file in the Shapefile file.

[0064] A geographic data transmission system based on SM4 algorithm, further comprising:

[0065] A second vector geographic data acquisition module to be transmitted is used to acquire a .dbf file in the Shapefile file;

[0066] The second encryption module is used to encrypt the preset target attribute fields in the .dbf file in the Shapefile file in sequence by using the SM4 algorithm, and replace the preset target attribute fields before encryption with the encrypted preset target attribute fields to obtain the encrypted .dbf file;

[0067] The data transmission module 204 is also used to transmit the encrypted .dbf file to a preset target end in real time.

[0068] The geometric objects include points, lines and surfaces.

[0069] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0070] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A geographic data transmission method based on SM4 algorithm, It is characterized in that include: Get the vector geographic data format file to be transmitted; The vector geographic data format file to be transmitted is a .shp file in a Shapefile file; Encrypt the coordinate data and attribute information of the vector data respectively; Determine each geometric object in the vector geographic data format file to be transmitted through the GDAL library; According to the structure of geometric entities in the .shp file, the position of each entity is located, and the encryption method based on data blocks is obtained: the geometric objects in the vector geographic data format file to be transmitted are divided into multiple data blocks according to the set number; Using the SM4 algorithm to encrypt each of the data blocks in turn, and writing the encrypted data blocks into the corresponding positions of the data blocks before encryption; a data block includes more than one of the geometric objects; Transmitting the encrypted vector geographic data format file to be transmitted to a preset target end in real time; The geographic data transmission method based on the SM4 algorithm further includes: Obtain the .dbf file in the Shapefile file; In the attribute encryption of vector data, all attribute fields are extracted, the fields to be encrypted are customized, and the target attribute fields are encrypted: the preset target attribute fields in the .dbf file in the Shapefile file are encrypted in sequence using the SM4 algorithm, and the preset target attribute fields after encryption are replaced with the preset target attribute fields before encryption to obtain the encrypted .dbf file; The encrypted vector geographic data format file to be transmitted is transmitted to the preset target end in real time, and the encrypted .dbf file is transmitted to the preset target end in real time; Divide the geometric objects in the vector geographic data format file to be transmitted into multiple data blocks according to the set number, including: Get the number of geometric objects in the vector geographic data format file to be transmitted; The number of settings is determined based on the number of geometric objects.

2. The geographic data transmission method based on the SM4 algorithm according to claim 1, It is characterized in that The geometric objects include points, lines and surfaces.

3. A geographic data transmission system based on SM4 algorithm, It is characterized in that include: A first module for acquiring vector geographic data to be transmitted, used for acquiring a file in a format of vector geographic data to be transmitted; The vector geographic data format file to be transmitted is a .shp file in a Shapefile file; Encrypt the coordinate data and attribute information of the vector data respectively; A geometric object determination module, used for determining each geometric object in the vector geographic data format file to be transmitted through the GDAL library; The first encryption module is used to locate the position of each entity according to the structure of the geometric entities in the .shp file, and derive an encryption method based on data blocks: the geometric objects in the vector geographic data format file to be transmitted are divided into a plurality of data blocks according to a set number; Using the SM4 algorithm to encrypt each of the data blocks in turn, and writing the encrypted data blocks into the corresponding positions of the data blocks before encryption; a data block includes more than one of the geometric objects; A data transmission module, used for transmitting the encrypted vector geographic data format file to be transmitted to a preset target end in real time; The geographic data transmission system based on the SM4 algorithm further includes: A second vector geographic data acquisition module to be transmitted is used to acquire a .dbf file in the Shapefile file; The second encryption module is used to extract all attribute fields in the attribute encryption of vector data, customize the fields to be encrypted, and encrypt the target attribute fields: use the SM4 algorithm to encrypt the preset target attribute fields in the .dbf file in the Shapefile file in turn, and replace the preset target attribute fields before encryption with the encrypted preset target attribute fields to obtain the encrypted .dbf file; The data transmission module is also used to transmit the encrypted .dbf file to the preset target end in real time; Divide the geometric objects in the vector geographic data format file to be transmitted into multiple data blocks according to the set number, including: Get the number of geometric objects in the vector geographic data format file to be transmitted; The number of settings is determined based on the number of geometric objects.

4. The geographic data transmission system based on the SM4 algorithm according to claim 3, It is characterized in that The geometric objects include points, lines and surfaces.