CN115190118A - Geographic data transmission method and system based on SM4 algorithm - Google Patents
Geographic data transmission method and system based on SM4 algorithm Download PDFInfo
- Publication number
- CN115190118A CN115190118A CN202210875413.9A CN202210875413A CN115190118A CN 115190118 A CN115190118 A CN 115190118A CN 202210875413 A CN202210875413 A CN 202210875413A CN 115190118 A CN115190118 A CN 115190118A
- Authority
- CN
- China
- Prior art keywords
- geographic data
- algorithm
- transmitted
- file
- encrypted
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 40
- 238000000034 method Methods 0.000 title claims abstract description 29
- 238000010586 diagram Methods 0.000 description 4
- 238000013507 mapping Methods 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- Theoretical Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Remote Sensing (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Information Transfer Between Computers (AREA)
- Storage Device Security (AREA)
Abstract
The invention relates to a geographic data transmission method and a system based on SM4 algorithm, relating to the field of geographic data processing, wherein the method comprises the following steps: acquiring 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; dividing geometric objects in a vector geographic data format file to be transmitted into a plurality of data blocks according to a set quantity: sequentially encrypting each data block by adopting an SM4 algorithm, and writing the encrypted data block into a corresponding position of the data block before encryption; and transmitting the encrypted vector geographic data format file to be transmitted to a preset target end in real time. The invention improves the safety of geographic data transmission.
Description
Technical Field
The invention relates to the technical field of geographic data, in particular to a geographic data transmission method and system based on an SM4 algorithm.
Background
The mapping geographic information data is used as an information value high place in the mapping business field, a large amount of important and sensitive information about the national civilians, such as map data, remote sensing data, navigation data and the like, is stored, and currently faces serious threats from various illegal attackers, so that the problem of severe geographic information data safety exists.
Disclosure of Invention
The invention aims to provide a geographic data transmission method and a geographic data transmission system based on an SM4 algorithm, which improve the security of geographic data transmission.
In order to achieve the purpose, the invention provides the following scheme:
a geographic data transmission method based on SM4 algorithm comprises the following steps:
acquiring 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;
dividing geometric objects in a vector geographic data format file to be transmitted into a plurality of data blocks according to a set number; sequentially encrypting each data block by adopting an SM4 algorithm, and writing the encrypted data block into a corresponding position of the data block before encryption; a data block comprises more than one of said geometric objects;
and transmitting the encrypted vector geographic data format file to be transmitted to a preset target end in real time.
Optionally, the vector geographic data format file to be transmitted is a Shapefile.
Optionally, the method further comprises:
obtaining a dbf file in the Shapefile file;
encrypting preset target attribute fields in the dbf file in the Shapefile file in sequence by adopting an SM4 algorithm, and replacing the preset target attribute fields before encryption with the encrypted preset target attribute fields to obtain an encrypted dbf file;
and transmitting the encrypted dbf file to a preset target end in real time while transmitting the encrypted vector geographic data format file to the preset target end in real time.
Optionally, the geometric objects comprise points, lines and faces.
The invention discloses a geographic data transmission system based on SM4 algorithm, comprising:
the first to-be-transmitted vector geographic data acquisition module is used for acquiring a vector geographic data format file to be transmitted;
the geometric object determining module is used for determining each geometric object in the vector geographic data format file to be transmitted through a GDAL (graphic language library);
the first encryption module is used for dividing geometric objects in the vector geographic data format file to be transmitted into a plurality of data blocks according to a set quantity; sequentially encrypting each data block by adopting an SM4 algorithm, and writing the encrypted data block into a corresponding position of the data block before encryption; a data block comprises more than one of said geometric objects;
and the data transmission module is used for transmitting the encrypted vector geographic data format file to be transmitted to a preset target end in real time.
Optionally, the vector geographic data format file to be transmitted is a Shapefile.
Optionally, the method further comprises:
the second to-be-transmitted vector geographic data acquisition module is used for acquiring a dbf file in the Shapefile file;
the second encryption module is used for sequentially encrypting the preset target attribute field in the dbf file in the Shapefile by adopting an SM4 algorithm, and replacing the preset target attribute field before encryption with the encrypted preset target attribute field to obtain an encrypted dbf file;
and the data transmission module is also used for transmitting the encrypted dbf file to a preset target end in real time.
Optionally, the geometric objects comprise points, lines and faces.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
the invention discloses a geographic data transmission method and a system based on SM4 algorithm, wherein geometric objects in a vector geographic data format file to be transmitted are divided into a plurality of data blocks according to a set number; sequentially encrypting each data block by adopting an SM4 algorithm, and writing the encrypted data block into a corresponding position of the data block before encryption; a data block comprises more than one geometric objects, and the safety of geographic data is improved under the condition that the using habit of a user and the format and the state of a computer storage and transmission file are not changed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required in the embodiments will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a first schematic flow chart of a geographic data transmission method based on an SM4 algorithm according to the present invention;
fig. 2 is a schematic flow diagram of a geographic data transmission method based on the SM4 algorithm according to the second embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating an attribute encryption process in a transmission vector geographic data format file according to the present invention;
fig. 4 is a schematic structural diagram of a geographic data transmission system based on the SM4 algorithm according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention aims to provide a geographic data transmission method and a system based on SM4 algorithm, which improve the security of geographic data transmission.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Fig. 1 is a schematic flow chart of a geographic data transmission method based on an SM4 algorithm of the present invention, fig. 2 is a schematic flow chart of a geographic data transmission method based on an SM4 algorithm of the present invention, and as shown in fig. 1-2, a geographic data transmission method based on an SM4 algorithm includes:
step 101: and acquiring a vector geographic data format file to be transmitted.
The vector geographic data format file to be transmitted is a shp file in a Shapefile.
The main file of sharefile is a shp file, and coordinate information and attribute information of vector data are recorded. The present invention encrypts the coordinate data and the attribute information of the vector data, respectively. The coordinate data records the real coordinate position of the ground object, and the encryption of the coordinate data is most important for the encryption of the geographic data.
The shp file is a file with a special data format, and the storage of geometric entities in the shp file has a certain structure. And positioning the position of each entity according to the structure of the geometric entities in the shp file to obtain the data block-based encryption method.
Step 102: and determining each geometric object in the vector geographic data format file to be transmitted through a GDAL library.
Step 103: dividing geometric objects in a vector geographic data format file to be transmitted into a plurality of data blocks according to a set number; sequentially encrypting each data block by adopting an SM4 algorithm, and writing the encrypted data block into the corresponding position of the data block before encryption; a data block comprises more than one of said geometric objects.
Wherein, step 103 specifically comprises:
and acquiring the number of geometric objects in the vector geographic data format file to be transmitted.
The set number is determined according to the number of geometric objects.
Dividing geometric objects in a vector geographic data format file to be transmitted into a plurality of data blocks according to a set number; and sequentially encrypting each data block by adopting an SM4 algorithm, and writing the encrypted data block into the corresponding position of the data block before encryption.
The encryption mode based on the data block only adopts bytes for operation, does not need to be converted into a double type, does not need to use the encrypted data to construct a geometric object, reduces the flow of data processing, and greatly improves the encryption efficiency of the shp file.
Step 104: and transmitting the encrypted vector geographic data format file to be transmitted to a preset target end in real time.
A geographic data transmission method based on SM4 algorithm further comprises: encrypting the attribute information, as shown in fig. 3, specifically includes the following steps:
obtaining a dbf file in the Shapefile file;
encrypting preset target attribute fields in the Shapefile and dbf files in sequence by adopting an SM4 algorithm, and replacing the preset target attribute fields before encryption with the encrypted preset target attribute fields to obtain encrypted dbf files;
and transmitting the encrypted vector geographic data format file to be transmitted to a preset target end in real time, and transmitting the encrypted dbf file to the preset target end in real time.
The geometric objects include points, lines, and faces.
The dbf file records attribute information of vector data and has a certain structure. One 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, the target attribute fields are encrypted, and the encryption safety is improved by combining the encryption of the attribute fields.
The encryption and decryption algorithm is realized by adopting C/C + + language and is packaged into an interface, so that the requirement of directly calling the encryption and decryption algorithm for use during data storage and transmission is met.
And presetting the decryption process of the target end as the reverse process of the encryption process.
Fig. 4 is a schematic structural diagram of a geographic data transmission system based on an SM4 algorithm, and as shown in fig. 4, a geographic data transmission system based on an SM4 algorithm includes:
a first vector geographic data to be transmitted obtaining module 201, configured to obtain a vector geographic data format file to be transmitted;
the geometric object determining module 202 is configured to determine, through a GDAL library, each geometric object in the vector geographic data format file to be transmitted;
the first encryption module 203 is configured to implement encryption of the vector geographic data format file to be transmitted by sequentially traversing each geometric object: sequentially encrypting each data block by adopting an SM4 algorithm, and writing the encrypted data block into a corresponding position of the data block before encryption;
and the data transmission module 204 is configured to transmit the encrypted vector geographic data format file to be transmitted to a preset target end in real time.
The vector geographic data format file to be transmitted is a shp file in a Shapefile.
A geographic data transmission system based on SM4 algorithm, further comprising:
the second vector geographic data acquisition module to be transmitted is used for acquiring a dbf file in the Shapefile;
the second encryption module is used for sequentially encrypting the preset target attribute field in the dbf file in the Shapefile by adopting an SM4 algorithm, and replacing the preset target attribute field before encryption with the encrypted preset target attribute field to obtain an encrypted dbf file;
the data transmission module 204 is further configured to transmit the encrypted dbf file to a preset target end in real time.
The geometric objects include points, lines, and faces.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
The principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.
Claims (8)
1. A geographic data transmission method based on SM4 algorithm is characterized by comprising the following steps:
acquiring 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;
dividing geometric objects in a vector geographic data format file to be transmitted into a plurality of data blocks according to a set number; sequentially encrypting each data block by adopting an SM4 algorithm, and writing the encrypted data block into a corresponding position of the data block before encryption; a data block comprises more than one of said geometric objects;
and transmitting the encrypted vector geographic data format file to be transmitted to a preset target end in real time.
2. The SM4 algorithm-based geographic data transmission method of claim 1, wherein the vector geographic data format file to be transmitted is a Shapefile middle-shp file.
3. The SM4 algorithm-based geographic data transmission method of claim 2, further comprising:
obtaining a dbf file in the Shapefile file;
encrypting preset target attribute fields in the Shapefile and dbf files in sequence by adopting an SM4 algorithm, and replacing the preset target attribute fields before encryption with the encrypted preset target attribute fields to obtain encrypted dbf files;
and transmitting the encrypted dbf file to a preset target end in real time while transmitting the encrypted vector geographic data format file to the preset target end in real time.
4. The SM4 algorithm-based geographic data transmission method according to claim 1, wherein the geometric objects comprise points, lines and faces.
5. A geographic data transmission system based on SM4 algorithm, comprising:
the first to-be-transmitted vector geographic data acquisition module is used for acquiring a vector geographic data format file to be transmitted;
the geometric object determining module is used for determining each geometric object in the vector geographic data format file to be transmitted through a GDAL (graphic language library);
the first encryption module is used for dividing geometric objects in the vector geographic data format file to be transmitted into a plurality of data blocks according to a set quantity; sequentially encrypting each data block by adopting an SM4 algorithm, and writing the encrypted data block into a corresponding position of the data block before encryption; a data block comprises more than one of said geometric objects;
and the data transmission module is used for transmitting the encrypted vector geographic data format file to be transmitted to a preset target end in real time.
6. The SM4 algorithm-based geographic data transmission system of claim 5, wherein the vector geographic data format file to be transmitted is a Shapefile-in-Shapefile-shp file.
7. The SM4 algorithm-based geographic data transmission system according to claim 6, further comprising:
the second vector geographic data acquisition module to be transmitted is used for acquiring a dbf file in the Shapefile;
the second encryption module is used for sequentially encrypting the preset target attribute field in the dbf file in the Shapefile by adopting an SM4 algorithm, and replacing the preset target attribute field before encryption with the encrypted preset target attribute field to obtain an encrypted dbf file;
and the data transmission module is also used for transmitting the encrypted dbf file to a preset target end in real time.
8. The SM4 algorithm-based geographic data transmission system of claim 5, wherein the geometric objects comprise points, lines and faces.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210875413.9A CN115190118B (en) | 2022-07-25 | 2022-07-25 | Geographic data transmission method and system based on SM4 algorithm |
ZA2022/09418A ZA202209418B (en) | 2022-07-25 | 2022-08-23 | Geographic data transmission method and system based on sm4 algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210875413.9A CN115190118B (en) | 2022-07-25 | 2022-07-25 | Geographic data transmission method and system based on SM4 algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115190118A true CN115190118A (en) | 2022-10-14 |
CN115190118B CN115190118B (en) | 2024-09-17 |
Family
ID=83520548
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210875413.9A Active CN115190118B (en) | 2022-07-25 | 2022-07-25 | Geographic data transmission method and system based on SM4 algorithm |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115190118B (en) |
ZA (1) | ZA202209418B (en) |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050285876A1 (en) * | 2004-06-29 | 2005-12-29 | Piotr Balaga | Composition of raster and vector graphics in geographical information systems |
US20060251246A1 (en) * | 2003-03-07 | 2006-11-09 | Yoshinori Matsui | Encryption device, decryption device, and data reproduction device |
CN103020544A (en) * | 2013-01-04 | 2013-04-03 | 南京师范大学 | Encryption and decryption method for shp line-surface graph layer data hierarchy |
CN103152339A (en) * | 2013-02-27 | 2013-06-12 | 南京师范大学 | Vector map data security transmission method based on digital envelope |
CN111988133A (en) * | 2020-08-18 | 2020-11-24 | 浪潮商用机器有限公司 | System SM4 encryption and decryption verification method, device, equipment and storage medium |
CN112217806A (en) * | 2020-09-23 | 2021-01-12 | 深圳杰微芯片科技有限公司 | Data transmission encryption method, server and storage medium |
CN112989394A (en) * | 2021-04-28 | 2021-06-18 | 南京吉印信息科技有限公司 | Vector geographic data encryption and decryption method and system |
CN113452688A (en) * | 2021-06-24 | 2021-09-28 | 山东三未信安信息科技有限公司 | Image encryption and decryption method and device based on SM4 and SM2 algorithms |
CN113641648A (en) * | 2021-08-18 | 2021-11-12 | 山东省计算中心(国家超级计算济南中心) | Distributed cloud security storage method, system and storage medium |
CN113901159A (en) * | 2021-09-29 | 2022-01-07 | 中南大学 | Vector data network transmission local encryption and decryption method based on multistage spatial index |
CN114285562A (en) * | 2021-12-27 | 2022-04-05 | 元心信息科技集团有限公司 | Data encryption method and device |
-
2022
- 2022-07-25 CN CN202210875413.9A patent/CN115190118B/en active Active
- 2022-08-23 ZA ZA2022/09418A patent/ZA202209418B/en unknown
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060251246A1 (en) * | 2003-03-07 | 2006-11-09 | Yoshinori Matsui | Encryption device, decryption device, and data reproduction device |
US20050285876A1 (en) * | 2004-06-29 | 2005-12-29 | Piotr Balaga | Composition of raster and vector graphics in geographical information systems |
CN103020544A (en) * | 2013-01-04 | 2013-04-03 | 南京师范大学 | Encryption and decryption method for shp line-surface graph layer data hierarchy |
CN103152339A (en) * | 2013-02-27 | 2013-06-12 | 南京师范大学 | Vector map data security transmission method based on digital envelope |
CN111988133A (en) * | 2020-08-18 | 2020-11-24 | 浪潮商用机器有限公司 | System SM4 encryption and decryption verification method, device, equipment and storage medium |
CN112217806A (en) * | 2020-09-23 | 2021-01-12 | 深圳杰微芯片科技有限公司 | Data transmission encryption method, server and storage medium |
CN112989394A (en) * | 2021-04-28 | 2021-06-18 | 南京吉印信息科技有限公司 | Vector geographic data encryption and decryption method and system |
CN113452688A (en) * | 2021-06-24 | 2021-09-28 | 山东三未信安信息科技有限公司 | Image encryption and decryption method and device based on SM4 and SM2 algorithms |
CN113641648A (en) * | 2021-08-18 | 2021-11-12 | 山东省计算中心(国家超级计算济南中心) | Distributed cloud security storage method, system and storage medium |
CN113901159A (en) * | 2021-09-29 | 2022-01-07 | 中南大学 | Vector data network transmission local encryption and decryption method based on multistage spatial index |
CN114285562A (en) * | 2021-12-27 | 2022-04-05 | 元心信息科技集团有限公司 | Data encryption method and device |
Also Published As
Publication number | Publication date |
---|---|
CN115190118B (en) | 2024-09-17 |
ZA202209418B (en) | 2022-11-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109451006B (en) | Data transmission method, device, server and computer storage medium | |
US9525670B2 (en) | Computer product, recording medium, communications apparatus, and communications method | |
CN108959430B (en) | Advertisement promotion data acquisition method, device and equipment | |
CN116132602B (en) | Carrier rocket image acquisition system, method, equipment and storage medium | |
CN112073444B (en) | Data set processing method and device and server | |
CN111597250B (en) | Visualization method of block chain system | |
CN113568994A (en) | Real data acquisition method based on grid tile map | |
CN115098888A (en) | Map data packet full-flow adaptive generation and encryption method, device and equipment | |
CN115146285A (en) | File encryption and decryption method and device | |
Qiu et al. | High-payload reversible watermarking scheme of vector maps | |
CN108229190B (en) | Transparent encryption and decryption control method, device, program, storage medium and electronic equipment | |
CN110650191A (en) | Data read-write method of distributed storage system | |
CN103955488A (en) | Method of sharing lines of electronic map, sharing end and receiving end | |
CN114386059A (en) | Webpage text confusion anti-crawler method and device, electronic equipment and storage medium | |
CN109856651A (en) | A kind of position data compression method and system based on dipper system | |
CN115190118B (en) | Geographic data transmission method and system based on SM4 algorithm | |
CN113268456B (en) | File processing method, system, equipment and computer readable storage medium | |
CN109598137B (en) | Method and system for safely processing data | |
CN107315970B (en) | Sensitive data interaction method and device | |
CN115189962B (en) | Geographic data point-by-point transmission method and system based on SM4 algorithm | |
CN112182603B (en) | Anti-crawler method and device | |
CN111815723B (en) | Data encryption method and device | |
CN109448821B (en) | Network transmission method of digital orthophoto map | |
CN114996663A (en) | Picture processing method, storage medium and computer terminal | |
US8307460B2 (en) | Method and apparatus for getting content information when DRM agent and rendering application are implemented on separate devices |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |