CN116611114A - Method for realizing encryption and offset of map raster data based on header file of image file - Google Patents

Method for realizing encryption and offset of map raster data based on header file of image file Download PDF

Info

Publication number
CN116611114A
CN116611114A CN202310868979.3A CN202310868979A CN116611114A CN 116611114 A CN116611114 A CN 116611114A CN 202310868979 A CN202310868979 A CN 202310868979A CN 116611114 A CN116611114 A CN 116611114A
Authority
CN
China
Prior art keywords
raster data
data
file
map
image
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
Application number
CN202310868979.3A
Other languages
Chinese (zh)
Other versions
CN116611114B (en
Inventor
虢建宏
王世金
徐颖
养松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Digital Space Beijing Technology Co ltd
Original Assignee
Digital Space Beijing Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Digital Space Beijing Technology Co ltd filed Critical Digital Space Beijing Technology Co ltd
Priority to CN202310868979.3A priority Critical patent/CN116611114B/en
Publication of CN116611114A publication Critical patent/CN116611114A/en
Application granted granted Critical
Publication of CN116611114B publication Critical patent/CN116611114B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/56Information retrieval; Database structures therefor; File system structures therefor of still image data having vectorial format
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication
    • G06F21/46Structures or tools for the administration of authentication by designing passwords or checking the strength of passwords
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Abstract

The application discloses a method for encrypting and offsetting raster data of a map by a header file based on an image file. The method comprises the following steps: layering map raster data by adopting a mean resampling method to form a pyramid structure with a certain layer number; converting map vector data into raster data by using a geographic information processing tool as a conversion tool, and superposing layers of the raster data converted by vector data with the same spatial resolution and raster data forming a pyramid structure to form raster layer data; dividing the raster pattern layer data into non-overlapping image blocks with the size being set; storing the tile images with set sizes as image file TIFF files; a digital password of at least three digits is set for a header file of the TIFF file. The embodiment of the application can realize coordinate encryption and offset processing when the map raster data is released outwards, and has the advantages of convenient operation process and high reliability.

Description

Method for realizing encryption and offset of map raster data based on header file of image file
Technical Field
The present application relates to the field of map data processing technologies, and in particular, to a method, an apparatus, an electronic device, and a computer readable storage medium for implementing map raster data encryption and offset based on a header file of an image file.
Background
At present, for research and publication of map products, one of the related requirements is that an offset algorithm must be used to offset the real coordinates of a map, for example, for an electronic map, the real coordinates of the electronic map need to be encrypted into "Mars coordinates" to be published and released. For related software with positioning and navigation functions, a security algorithm is also required to be added, and the output coordinate signals are converted into usable coordinates through the security algorithm.
However, it has been found that satellite image coordinates of some of the commercial map software currently in widespread use include true coordinates, in which case the data in such map software deviate from "Mars coordinates" and do not match. There is a case that, for a user group such as a travel fan or a quest fan who is used to use such commercial map software, due to mismatch of map data, it may not be able to be normally performed in some geographical areas while participating in some navigation positioning activities (such as a treasury seeking game, a positioning sharing game), and then a case may occur in which some users struggle to break encrypted "mars coordinates" in order to match the map data. In view of this situation, researchers in the field are required to propose more reliable, convenient and easy-to-use map data encryption and migration processing techniques.
Disclosure of Invention
In order to solve the technical problems in the prior art, embodiments of the present application provide a method, an apparatus, an electronic device, a computer readable storage medium, and a computer program product for implementing encryption and offset of map raster data based on a header file of an image file, which are used for solving at least one technical problem.
The embodiment of the application provides a method for realizing map raster data encryption and offset based on a header file of an image file, which comprises the following steps:
layering map raster data by adopting a mean resampling method to form a pyramid structure with a certain layer number; wherein, the bottom original image of the map raster data is taken as the first layer of the pyramid structure, and the geographic scope of the image representation of all layers of the pyramid structure is consistent;
converting map vector data into raster data by using a geographic information processing tool as a conversion tool, and superposing layers of the raster data converted by vector data with the same spatial resolution and raster data forming a pyramid structure to form raster layer data; wherein the vector data is consistent with the geographic scope represented by the raster data;
dividing the raster pattern layer data into non-overlapped image blocks with set sizes according to the sequence from top to bottom and from left to right, wherein the parts which are not enough to be set with the sizes form the image blocks with the set sizes through complementation;
storing the tile images with the set sizes as image file TIFF files, wherein the tile images belonging to the same level or the same area range are stored in the same TIFF file;
and setting a digital password of at least three digits for the header file of the TIFF file, wherein the first digit password and the second digit password correspond to the decryption password, the third digit password is used for controlling the coordinate offset of raster data, the first digit password and the second digit password are preset digits, and the third digit password is a digit or a random number determined when the password is set.
Optionally, the method according to the embodiment of the present application further includes inputting a digital password of the TIFF file when decrypting, wherein the first bit password and the second bit password are input correctly to decrypt the TIFF file, and the third bit password is input correctly to generate a coordinate offset for the spatial data.
Optionally, according to the method of an embodiment of the present application, the first cipher bit is any one of digits 0-9; the second bit password is any one of numbers 0-9; the third bit cipher is any one of numbers 0-9.
Optionally, according to the method of the embodiment of the present application, the higher the layer number of the pyramid is, the lower the image resolution is, and the method further includes: and determining the total layer number of the pyramid according to the required image coverage and image resolution.
Optionally, according to the method of the embodiment of the present application, layering the raster data to form a pyramid structure with 2 as a factor, taking an original image as a 0 th layer of the pyramid structure, dividing rows and columns of the 0 th layer image by 2 respectively, and obtaining a 1 st layer of the pyramid structure by adopting a mean resampling method; then, based on the pyramid of the layer 1, the layer 2 of the pyramid structure is obtained by adopting the same steps; and so on, the nth layer of the pyramid structure is obtained.
Alternatively, the set size includes 256 pels by 256 pels according to the method of an embodiment of the present application.
Alternatively, according to the method of the embodiment of the application, the total layer number of the pyramid is less than or equal to 15.
Alternatively, according to the method of the embodiment of the present application, the total offset amount of the coordinate offset is 300 meters to 500 meters.
The embodiment of the application provides a device for realizing map raster data encryption and offset based on a header file of an image file, which comprises the following components:
the layering module is used for layering the map raster data by adopting a mean resampling method to form a pyramid structure with a certain layer number; wherein, the bottom original image of the map raster data is taken as the first layer of the pyramid structure, and the geographic scope of the image representation of all layers of the pyramid structure is consistent;
the fusion module is used for converting map vector data into raster data by taking a geographic information processing tool as a conversion tool, and superposing layers of the raster data converted by the vector data with the same spatial resolution and raster data forming a pyramid structure to form raster layer data; wherein the vector data is consistent with the geographic scope represented by the raster data;
the dividing module is used for dividing the raster pattern layer data into non-overlapped image blocks with the set size according to the sequence from top to bottom and from left to right, wherein the part which is less than the set size forms the image block with the set size through complementation;
the storage module is used for storing the tile images with the set sizes into image file TIFF files, wherein the tile images belonging to the same level or the same area range are stored in the same TIFF file;
the setting module is used for setting a digital password with at least three digits for the header file of the TIFF file, wherein the first digit password and the second digit password correspond to the decryption password, the third digit password is used for controlling the coordinate offset of raster data, the first digit password and the second digit password are preset digits, and the third digit password is a digit or a random number determined when the password is set.
An embodiment of the present application provides an electronic device including a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, implements the steps of the method as described above.
Embodiments of the present application provide a computer readable storage medium having stored thereon computer program instructions which when executed by a processor perform the steps of the method as described above.
Embodiments of the present application provide a computer program product comprising computer program instructions which, when executed by a processor, implement the steps of the method as described above.
According to the embodiment of the application, based on the fusion technology of map vector data and raster data, the vector data is fixed in the raster data to form raster layer data, the raster layer data is divided into tile images and the tile images are stored in the image file, encryption and coordinate offset of the raster data are realized by setting a three-bit password for the header file of the image file, the password is set in the header file, the operation is simple and convenient, timely replacement is convenient, the cracking, imitation and anti-deviation correction difficulties of the password are large, and the reliability is high.
Drawings
In order to more clearly describe the technical solution of the embodiments of the present application, the following description briefly describes the drawings in the embodiments of the present application.
FIG. 1 is a schematic diagram of a system architecture of an embodiment of the present application;
FIG. 2 is a flow chart of a method for implementing map raster data encryption and migration based on a header file of an image file in accordance with an embodiment of the present application;
FIG. 3 is a flow chart of raster data coordinate shifting according to an embodiment of the present application;
FIG. 4 is a flow chart of TFFF file reading and displaying according to an embodiment of the present application;
FIG. 5 is a block diagram of a device for encrypting and offsetting raster data of a map based on a header file of an image file according to an embodiment of the present application;
fig. 6 is a schematic diagram of an electronic device for implementing a method for encrypting and offsetting map raster data based on a header file of an image file according to an embodiment of the present application.
Detailed Description
The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It will be appreciated that such embodiments are provided to make the principles and spirit of the application clear and thorough, and enabling those skilled in the art to better understand and practice the principles and spirit of the application. The exemplary embodiments provided herein are merely some, but not all embodiments of the application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the embodiments herein, are within the scope of the present application.
Embodiments of the present application relate to a terminal device and/or a server. Those skilled in the art will appreciate that embodiments of the application may be implemented as a system, apparatus, device, method, computer readable storage medium, or computer program product. Accordingly, the present disclosure may be embodied in at least one of the following forms: complete hardware, complete software, or a combination of hardware and software. According to embodiments of the present application, a method, apparatus, electronic device, computer-readable storage medium, and computer program product for implementing map raster data encryption and offset based on a header file of an image file are claimed. Fig. 1 shows a schematic diagram of a system architecture according to an embodiment of the application. As shown in fig. 1, the system includes a terminal device 102 and a server 104. Wherein the terminal device 102 may comprise at least one of: smart phones, tablet computers, notebook computers, desktop computers, smart televisions, various wearable devices, augmented reality AR devices, virtual reality VR devices, and the like. The terminal device 102 may be provided with a client, for example, the client may be a client that specifically performs a specific function (such as an app), or a client embedded with multiple kinds of applets (different functions), or may be a client that logs in through a browser. The user may operate on the terminal device 102, for example, the user may open a client installed on the terminal device 102 and input an instruction through a client operation, or the user may open a browser installed on the terminal device 102 and input an instruction through a browser operation. After the terminal device 102 receives the instruction input by the user, request information including the instruction is transmitted to the server 104. The server 104 performs a corresponding process after receiving the request information, and then returns the process result information to the terminal device 102. User instructions are completed through a series of data processing and information interaction.
In this document, terms such as first, second, third, etc. are used solely to distinguish one entity (or action) from another entity (or action) without necessarily requiring or implying any order or relationship between such entities (or actions).
The following briefly describes related concepts and technical terms, etc. that may be involved in the embodiments of the present application.
1. Vector data and raster data
In the vector data, the real world object and its state are expressed in terms of points, lines, planes, the object position is defined in terms of coordinates of the spatial position where it is located, and the state is expressed in terms of attributes. In raster data, real world objects and their states are expressed in terms of the raster rank they occupy, and the value of the raster is the attribute value of the expressed object.
2. Mars coordinate system
The Mars coordinate system is a security plug-in or SM module, which encrypts the true coordinates into false coordinates by adding random offsets, which are not linear and vary from place to place. The projection mode is used for distinguishing, and the method can be divided into GCJ-02 Web Mokato projection and GCJ-02 longitude and latitude projection. The mainstream Web map is almost always the Web mercator used today. Another GCJ02 longitude and latitude projection is to bias GCJ-02 based on WGS84 longitude and latitude. The BD09 longitude and latitude projection belongs to a coordinate system of a map adopted by an enterprise, is only suitable for related products of the map adopted by the enterprise, and is characterized in that GCJ-02 biasing is carried out on the basis of standard longitude and latitude, and a biasing algorithm of the map adopted by the enterprise is added, namely, biasing is carried out twice on the basis of standard longitude and latitude; the BD09 Web ink card holder projection also belongs to a coordinate system of a map adopted by an enterprise, and is characterized in that GCJ-02 biasing is carried out on the basis of a standard Web ink card holder, and a biasing algorithm of the map adopted by the enterprise is added, so that biasing is carried out twice on the basis of the Web ink card holder.
Fig. 2 is a flow chart of a method for encrypting and offsetting raster data of a map based on a header file of an image file according to an embodiment of the present application, the method includes the following steps:
s101: layering map raster data by adopting a mean resampling method to form a pyramid structure with a certain layer number; wherein, the bottom original image of the map raster data is taken as the first layer of the pyramid structure, and the geographic scope of the image representation of all layers of the pyramid structure is consistent;
s102: converting map vector data into raster data by using a geographic information processing tool as a conversion tool, and superposing layers of the raster data converted by vector data with the same spatial resolution and raster data forming a pyramid structure to form raster layer data; wherein the vector data is consistent with the geographic scope represented by the raster data;
s103: dividing the raster pattern layer data into non-overlapping image blocks with the set size according to the sequence from top to bottom and from left to right, wherein the part which is not enough to be set in size forms the image block with the set size by complementing;
s104: storing the tile images with set sizes as image file TIFF files, wherein the tile images belonging to the same level or the same area range are stored in the same TIFF file;
s105: and setting a digital password of at least three digits for the header file of the TIFF file, wherein the first digit password and the second digit password correspond to the decryption password, the third digit password is used for controlling the coordinate offset of raster data, the first digit password and the second digit password are preset digits, and the third digit password is a digit or a random number determined when the password is set.
According to the method for realizing map raster data encryption and offset based on the header file of the image file, vector data are fixed on raster data to form raster layer data, then the raster layer data are divided into tile images with the same size, the tile images are stored in the TIFF file, and the header file of the TIFF file is subjected to password setting to complete encryption and coordinate offset of the raster data. The TIFF file can fully utilize the commonalities of the current data file under the condition of not changing the storage mode of the image file data area, and the commonalities are expressed by a fixed file, so that not only is the program readable, but also the password can be set when an operator opens the file, thereby realizing raster image layer data encryption and coordinate offset, and the operation is concise and the use is convenient.
In some embodiments of the present application, a method for implementing map raster data encryption and offset based on a header file of an image file further includes inputting a digital password of the TIFF file when decrypting, wherein the TIFF file is decrypted when the first and second passwords are correctly input, and the spatial data is coordinate-offset when the third password is correctly input. That is, the data can be decrypted as long as the first two digits are correctly entered.
In some embodiments of the present application, the first cipher bit is any one of digits 0-9; the second bit password is any one of numbers 0-9; the third bit cipher is any one of numbers 0-9.
In some embodiments of the present application, the higher the layer number of the pyramid is, the lower the image resolution is, and the method further includes: and determining the total layer number of the pyramid according to the required image coverage and image resolution.
In some embodiments of the present application, the specific steps of layering raster data to form a pyramid structure are as follows:
layering raster data to form a pyramid structure taking 2 as a factor, taking an original image as a 0 th layer of the pyramid structure, dividing the row and column numbers of the 0 th layer image by 2 respectively, and obtaining a 1 st layer of the pyramid structure by adopting a mean resampling method; then, based on the pyramid of the layer 1, the layer 2 of the pyramid structure is obtained by adopting the same steps; and so on, the nth layer of the pyramid structure is obtained. In the embodiment of the application, the total layer number of the pyramid is less than or equal to 15, and the layer number of the pyramid is 12.
In some embodiments of the application, the set size comprises 256 pel by 256 pel.
In some embodiments of the application, the total offset of the coordinate offsets is 300 meters to 500 meters.
The method for realizing map raster data encryption and offset based on the header file of the image file, provided by the application, uses a vector data and raster data fusion technology to fix vector data on raster data to form raster layer data, and stores the last layer data in a TIFF file in a slicing way, and the method is characterized in that the TIFF file has good expansibility, convenient transplantation and strong modification, and the header file of the TIFF file is subjected to three-digit password setting to complete encryption and coordinate offset of raster data, thereby meeting the current requirement of permitting marketing of map products.
The implementation manner and technical advantages of the method for implementing map raster data encryption and offset based on the header file of the image file are described above through a plurality of embodiments, and specific processing procedures of the embodiments of the present application are described in detail below through specific examples.
Step one, layering raster data to form a pyramid structure. And sequentially resampling from the original image at the bottom layer of the pyramid to obtain the image at the next layer until the set layer number is reached, ending the sampling, gradually reducing the image resolution in the process, and enabling the geographical ranges represented by the images at all layers of the pyramid to be consistent. Specifically, a pyramid data structure taking 2 as a factor is adopted, an original image is taken as the bottommost layer of the pyramid, namely the 0 th layer, the row and the column number of the pyramid are divided by 2 respectively, and a mean resampling method is adopted to obtain the 1 st layer of the pyramid, wherein the resolution is one half of that of the 0 th layer; then, based on the pyramid of the layer 1, the layer 2 is obtained by adopting the same method; and so on, layers 3 and 4 are obtained as layer … …. The number of layers is determined according to the image coverage and image resolution, and the application requirements, and is generally not more than 15 layers.
And step two, merging the vector data and raster data of each layer into raster layer data. And determining the size and the coordinate system of the vector data conversion target grid element according to the resolution and the coordinates of the corresponding hierarchical grid data. The application adopts the ArcGIS software of the geographic information system for operation, and comprises the following specific steps: opening a geographic map Arcmap, adding raster data and vector data, selecting a conversion tool in a geographic processing tool ArcToolbox, converting the selected vector data into raster data, converting double-click elements into grids, selecting vector elements, clicking for determination, and converting. And after the conversion is successful, superposing the converted image layer with the raster data forming the pyramid structure to form raster image layer data. That is, the vector data "dot" like entity is represented by the grid pixel where the dot coordinate (x, y) is located; the vector data line entity is represented by a series of connected point coordinate pairs, when the grid structure is changed, a series of grid pixel points are filled between the point coordinate pairs besides changing the point coordinate pairs in the sequence into grid pixels, and the vector data line entity can also be obtained by a two-point linear equation; the vector data "face" entity converts to raster format, i.e., assigns corresponding numbers to all raster pixels within the vector polygon boundary, thereby forming a raster data array. And layering and rasterizing the vector data according to the method, and overlapping the rasterized layers with the original raster layers with the same spatial resolution layer by layer, namely a layering and fusing technology of the vector data and the raster data.
Step three: the raster layer data slice is a 256 pel by 256 pel tile image. The raster layer data slice is divided into tile images of 256 pixels by 256 pixels in size from top to bottom and from left to right in sequence. In order not to lose the information amount, the part of the image which is less than 256 pixels by 256 pixels is used for forming the tile image of 256 pixels by complement. The size of each tile image is 256 pixels multiplied by 256 pixels, so that the indexing, network transmission and disk reading/writing of image data are facilitated, and the number of corresponding slice images is calculated and loaded according to the information such as the area range and the resolution ratio when the images are displayed. The hierarchy of tile image construction is determined according to specific application requirements, and is generally not higher than 15 layers; the number of tile images builds tile data in power of 2 size.
Step four: the tile images are stored as TIFF, and the tile images of the same level or same area range are stored in the same TIFF file.
Step five: and setting a read password and a display password of the raster data. The raster data needs to be provided with a three-digit password, and the former two digits are passwords for decrypting the data and can be preset; the third bit is a code for controlling the offset of coordinates, which is generally set temporarily, and the total offset of coordinates is 300 m to 500 m, which is randomly generated.
Step six: during decryption, a three-digit password is input. In actual operation, the data can be decrypted when the first two passwords are correctly input, and the normal operation is not affected when the third password is incorrectly input.
Example 1
FIG. 3 schematically illustrates a flow chart of raster data coordinate shifting of an embodiment of the present application, as shown in FIG. 3:
(1) Initializing a system: reading a built-in key my 1, a key my 2, a total offset minimum value minD (mind=300) and a total offset maximum value maxD (maxd=500), and letting an offset p1=0 and an offset p2=0;
(2) Receiving passwords mm1 and mm2 input by a user and temporarily setting an offset control password k, and if the password accords with the secret key, generating a random offset which accords with the condition of a designated gradient range according to the offset control password k; if the data do not match, the data cannot be loaded, and the system is exited;
(3) Calculating basic offsets d1 and d2, d1=step×k+mind, step= (maxD-minD)/10, d1=d2 according to the offset control code K;
(4) Calculating the increase amounts d21 and d22 with respect to the base offset amount, d21=rand (1) ×step, d22=rand (1) ×step;
(5) Setting random parameters d31 and d32, d31=rand (1), d32=rand (1), and judging that the offset belongs to positive offset or negative offset according to the comparison result of the values of d31 and d32 and 0.5, namely the offset can be positive offset or negative offset, and the total offset interval isOr->The method comprises the steps of carrying out a first treatment on the surface of the If d31 > 0.5, p1=p1+d1+d21, if d31 < 0.5, p1=p1-d 1-d21; if d32 > 0.5, p2=p2+d2+d22, if d32 < 0.5, p2=p2-d2-d 22;
(6) The deviation values are calculated, and the deviation amounts p1 and p2 are output.
Example two
FIG. 4 schematically illustrates a TIFF file reading and displaying flow chart of an embodiment of the application, wherein the TIFF file header is first read, whether the TIFF file is a TIFF file is judged, if the TIFF file is not a TIFF file, the flow is ended, if the TIFF file is a TIFF file, the pointer count of the TIFF is read until all the TIFF file is read, then a 3-bit password is input, if the password is correct, whether the TIFF file has a palette is judged, if the TIFF file has the palette, image data is read, if the TIFF file is not the palette, then whether the image is a compressed image is judged, if the image is not the compressed image, the image is decompressed and displayed, finally a termination field is read, whether the image is a multiple image is judged, if the TIFF file is not a multiple image, the reading is ended, if the TIFF file is a multiple image, the pointer count is read again, and the steps are repeated until the reading is ended.
Correspondingly to the method provided by the present application, the present application also provides a device for establishing a surface texture datum plane based on a ground control point database, and fig. 5 schematically shows a structural schematic diagram of a device 100 for implementing map raster data encryption and offset based on a header file of an image file according to an embodiment of the present application, where the device 100 includes:
the layering module 110 is used for layering the map raster data by adopting a mean resampling method to form a pyramid structure with a certain layer number; wherein, the bottom original image of the map raster data is taken as the first layer of the pyramid structure, and the geographic scope of the image representation of all layers of the pyramid structure is consistent;
the fusion module 120 uses a geographic information processing tool as a conversion tool to convert map vector data into raster data, and performs superposition processing on a layer of the raster data converted by the vector data and raster data forming a pyramid structure with the same spatial resolution to form raster layer data; wherein the vector data is consistent with the geographic scope represented by the raster data;
a dividing module 130, configured to divide the raster layer data into non-overlapping image blocks with the set size according to a sequence from top to bottom and from left to right, where a portion less than the set size is complemented to form the image block with the set size;
a storage module 140, configured to store the tile images with the set sizes as an image file TIFF file, where the tile images belonging to the same level or the same area range are stored in the same TIFF file;
the setting module 150 is configured to set a digital password with at least three digits for a header file of the TIFF file, where the first digit and the second digit password correspond to a decryption password, the third digit password is used to control a coordinate offset of raster data, the first digit and the second digit password are preset digits, and the third digit password is a digit or a random number determined when the password is set.
The device for realizing encryption and offset of the raster data of the map based on the header file of the image file can be used for completing encryption and coordinate offset of the raster data, and is convenient to use and simple to operate.
The electronic device in the embodiment of the application can be user terminal equipment, a server, other computing devices and a cloud server. Fig. 6 shows a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application, where the electronic device may include a processor 601 and a memory 602 storing computer program instructions, where the processor 601 implements the flow or functions of any of the methods of the embodiments described above when executing the computer program instructions.
In particular, the processor 601 may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured as one or more integrated circuits that implement embodiments of the present application. Memory 602 may include mass storage for data or instructions. For example, the memory 602 may be at least one of: hard Disk Drive (HDD), read-only memory (ROM), random-access memory (RAM), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, universal serial bus (Universal Serial Bus, USB) Drive, or other physical/tangible memory storage device. As another example, the memory 602 may include removable or non-removable (or fixed) media. For another example, memory 602 may be internal or external to the integrated gateway disaster recovery device. The memory 602 may be a non-volatile solid state memory. In other words, generally the memory 602 includes a tangible (non-transitory) computer-readable storage medium (e.g., a memory device) encoded with computer-executable instructions and when the software is executed (e.g., by one or more processors) may perform the operations described by the methods of embodiments of the application. The processor 601 implements the flow or functions of any of the methods of the above embodiments by reading and executing computer program instructions stored in the memory 602.
In one example, the electronic device shown in fig. 6 may also include a communication interface 603 and a bus 610. The processor 601, the memory 602, and the communication interface 603 are connected to each other through a bus 610 and perform communication with each other. The communication interface 603 is mainly used to implement communications between modules, apparatuses, units, and/or devices in the embodiments of the present application. Bus 610 includes hardware, software, or both, and may couple components of the online data flow billing device to each other. For example, the bus may include at least one of: accelerated Graphics Port (AGP) or other graphics bus, enhanced Industry Standard Architecture (EISA) bus, front Side Bus (FSB), hyperTransport (HT) interconnect, industry Standard Architecture (ISA) bus, infiniBand interconnect, low Pin Count (LPC) bus, memory bus, micro channel architecture (MCa) bus, peripheral Component Interconnect (PCI) bus, PCI-Express (PCI-X) bus, serial Advanced Technology Attachment (SATA) bus, video electronics standards Association local (VLB) bus, or other suitable bus. Bus 610 may include one or more buses. Although embodiments of the application describe or illustrate a particular bus, embodiments of the application contemplate any suitable bus or interconnection.
In connection with the methods of the above embodiments, embodiments of the present application also provide a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the flow or function of any of the methods of the above embodiments.
In addition, the embodiment of the present application further provides a computer program product, where the computer program product stores computer program instructions, and the computer program instructions implement the flow or the function of any one of the methods in the above embodiments when the computer program instructions are executed by a processor.
The foregoing exemplarily describes the flow diagrams and/or block diagrams of methods, apparatus, systems, and computer program products according to embodiments of the present application, and describes various aspects related thereto. It will be understood that each block of the flowchart illustrations and/or block diagrams, or combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions, special purpose hardware which perform the specified functions or acts, and combinations of special purpose hardware and computer instructions. For example, these computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the present application, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit.
Functional blocks shown in the block diagrams of the embodiments of the present application can be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, a plug-in, a function card, or the like; when implemented in software, are the programs or code segments used to perform the required tasks. The program or code segments can be stored in a memory or transmitted over transmission media or communication links through data signals carried in carrier waves. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should be noted that the present application is not limited to the specific configurations and processes described above or shown in the drawings. The foregoing is merely specific embodiments of the present application, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working processes of the described system, apparatus, module or unit may refer to corresponding processes in the method embodiments, and need not be repeated. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art may conceive various equivalent modifications or substitutions within the technical scope of the present application, which are intended to be included in the scope of the present application.

Claims (11)

1. A method for implementing map raster data encryption and migration based on a header file of an image file, comprising:
layering map raster data by adopting a mean resampling method to form a pyramid structure with a certain layer number; wherein, the bottom original image of the map raster data is taken as the first layer of the pyramid structure, and the geographic scope of the image representation of all layers of the pyramid structure is consistent;
converting map vector data into raster data by using a geographic information processing tool as a conversion tool, and superposing layers of the raster data converted by vector data with the same spatial resolution and raster data forming a pyramid structure to form raster layer data; wherein the vector data is consistent with the geographic scope represented by the raster data;
dividing the raster pattern layer data into tile images which are not overlapped and have the set size according to the sequence from top to bottom and from left to right, wherein the part which is not enough to be the set size forms the tile image with the set size through complementation;
storing the tile images with the set sizes as image file TIFF files, wherein the tile images belonging to the same level or the same area range are stored in the same TIFF file;
and setting a digital password of at least three digits for the header file of the TIFF file, wherein the first digit password and the second digit password correspond to the decryption password, the third digit password is used for controlling the coordinate offset of raster data, the first digit password and the second digit password are preset digits, and the third digit password is a digit or a random number determined when the password is set.
2. The method for encrypting and offsetting map raster data based on a header file of an image file according to claim 1, further comprising inputting a digital password of said TIFF file when decrypting, wherein said first and second passwords are inputted correctly to decrypt the TIFF file, and wherein the third password is inputted correctly to offset coordinates of spatial data.
3. The method for realizing map raster data encryption and offset based on the header file of the image file according to claim 1, wherein the first bit cipher bit is any one of numbers 0 to 9; the second bit password is any one of numbers 0-9; the third bit cipher is any one of numbers 0-9.
4. The method for encrypting and offsetting map raster data based on a header file of an image file according to claim 1, wherein the higher the layer number of a pyramid is, the lower the image resolution is, the method further comprises: and determining the total layer number of the pyramid according to the required image coverage and image resolution.
5. The method for realizing map raster data encryption and migration based on the header file of the image file according to claim 1, wherein the raster data is layered to form a pyramid structure taking 2 as a factor, an original image is taken as a 0 th layer of the pyramid structure, the row and column numbers of the 0 th layer image are divided by 2 respectively, and a mean resampling method is adopted to obtain a 1 st layer of the pyramid structure; then, based on the pyramid of the layer 1, the layer 2 of the pyramid structure is obtained by adopting the same steps; and so on, the nth layer of the pyramid structure is obtained.
6. The method for encrypting and offsetting raster data over a header file of an image file according to claim 1, wherein said set size comprises 256 pels by 256 pels.
7. The method for encrypting and offsetting the raster data of the map based on the header file of the image file according to claim 1, wherein the total layer number of the pyramid is less than or equal to 15.
8. The method for encrypting and offsetting map raster data based on a header file of an image file according to claim 6, wherein the total offset of said coordinate offsets is 300 m to 500 m.
9. A device for encrypting and offsetting raster data of a map based on a header file of an image file, comprising:
the layering module is used for layering the raster data of the map by adopting a mean resampling method to form a pyramid structure with a certain layer number; the method comprises the steps of taking a bottom original image of raster data of a map as a first layer of a pyramid structure, wherein geographic ranges of image representations of all layers of the pyramid structure are consistent;
the fusion module is used for converting vector data of the map into raster data by taking a geographic information processing tool as a conversion tool, and superposing layers of the raster data converted by the vector data with the same spatial resolution and raster data forming a pyramid structure to form raster layer data; wherein the vector data is consistent with the geographic scope represented by the raster data;
the dividing module is used for dividing the raster pattern layer data into tile images which are not overlapped and have a set size according to the sequence from top to bottom and from left to right, wherein the part which is less than the set size forms the tile image with the set size through complementation;
the storage module is used for storing the tile images with the set sizes into image file TIFF files, wherein the tile images belonging to the same level or the same area range are stored in the same TIFF file;
the setting module is used for setting a digital password with at least three digits for the header file of the TIFF file, wherein the first digit password and the second digit password correspond to the decryption password, the third digit password is used for controlling the coordinate offset of raster data, the first digit password and the second digit password are preset digits, and the third digit password is a digit or a random number determined when the password is set.
10. An electronic device, the electronic device comprising: a processor and a memory storing computer program instructions; the electronic device, when executing the computer program instructions, implements the method of any of claims 1-8.
11. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon computer program instructions which, when executed by a processor, implement the method according to any of claims 1-8.
CN202310868979.3A 2023-07-17 2023-07-17 Method for realizing encryption and offset of map raster data based on header file of image file Active CN116611114B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310868979.3A CN116611114B (en) 2023-07-17 2023-07-17 Method for realizing encryption and offset of map raster data based on header file of image file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310868979.3A CN116611114B (en) 2023-07-17 2023-07-17 Method for realizing encryption and offset of map raster data based on header file of image file

Publications (2)

Publication Number Publication Date
CN116611114A true CN116611114A (en) 2023-08-18
CN116611114B CN116611114B (en) 2023-10-31

Family

ID=87678575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310868979.3A Active CN116611114B (en) 2023-07-17 2023-07-17 Method for realizing encryption and offset of map raster data based on header file of image file

Country Status (1)

Country Link
CN (1) CN116611114B (en)

Citations (9)

* Cited by examiner, † Cited by third party
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
CN102800041A (en) * 2012-06-11 2012-11-28 哈尔滨工程大学 Method for protecting integrity of digital vector map
CN105069020A (en) * 2015-07-14 2015-11-18 国家信息中心 3D visualization method and system of natural resource data
CN107508826A (en) * 2017-09-14 2017-12-22 阿里巴巴集团控股有限公司 Authentication method, device, VR terminals and VR service ends based on VR scenes
CN112035695A (en) * 2020-08-04 2020-12-04 东南大学 Spatial data encryption method suitable for mobile terminal
CN112579722A (en) * 2020-12-22 2021-03-30 北京航天世景信息技术有限公司 High-customization remote sensing image automatic rapid map cutting method
CN115098888A (en) * 2022-08-23 2022-09-23 北京帝测科技股份有限公司 Map data packet full-flow adaptive generation and encryption method, device and equipment
CN115470366A (en) * 2022-08-31 2022-12-13 湖南省第二测绘院 Tile-based remote sensing image storage method and system
CN115758429A (en) * 2022-12-07 2023-03-07 江苏省城市规划设计研究院有限公司 Planning result data encryption method with separated space and attribute information

Patent Citations (9)

* Cited by examiner, † Cited by third party
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
CN102800041A (en) * 2012-06-11 2012-11-28 哈尔滨工程大学 Method for protecting integrity of digital vector map
CN105069020A (en) * 2015-07-14 2015-11-18 国家信息中心 3D visualization method and system of natural resource data
CN107508826A (en) * 2017-09-14 2017-12-22 阿里巴巴集团控股有限公司 Authentication method, device, VR terminals and VR service ends based on VR scenes
CN112035695A (en) * 2020-08-04 2020-12-04 东南大学 Spatial data encryption method suitable for mobile terminal
CN112579722A (en) * 2020-12-22 2021-03-30 北京航天世景信息技术有限公司 High-customization remote sensing image automatic rapid map cutting method
CN115098888A (en) * 2022-08-23 2022-09-23 北京帝测科技股份有限公司 Map data packet full-flow adaptive generation and encryption method, device and equipment
CN115470366A (en) * 2022-08-31 2022-12-13 湖南省第二测绘院 Tile-based remote sensing image storage method and system
CN115758429A (en) * 2022-12-07 2023-03-07 江苏省城市规划设计研究院有限公司 Planning result data encryption method with separated space and attribute information

Also Published As

Publication number Publication date
CN116611114B (en) 2023-10-31

Similar Documents

Publication Publication Date Title
CN108961141A (en) Dual Zero watermarking method, system, storage medium and the server of map vector
WO2013153122A1 (en) Method and device for generating a code
EP3158556A1 (en) Methods and apparatus for cryptography
CN109379351B (en) Two-dimensional code encryption method, storage medium, equipment and system
CN112788195A (en) Image processing method, device and equipment
CN110232284B (en) Image encryption method and device
Punithavathi et al. Visual cryptography: A brief survey
CN113902135A (en) Sample data volume joint expansion method, device, equipment, system and storage medium
CN112989394B (en) Vector geographic data encryption and decryption method and system
CN116611114B (en) Method for realizing encryption and offset of map raster data based on header file of image file
CN108174053B (en) Decryption area limited image encryption method based on oriented area and playing card mapping
CN112529974A (en) Color visual password sharing method and device for binary image
CN113298687B (en) Watermark image adding method and device
CN102148686B (en) Character deformation-based graphical password authentication method
CN115082322B (en) Image processing method and device, and training method and device of image reconstruction model
CN111260532A (en) Private image encryption method and device, electronic equipment and computer readable storage medium
CN112399027A (en) Picture encryption and decryption method and device, storage medium and electronic equipment
Wang et al. A novel (n, n) secret image sharing scheme based on Sudoku
CN113158167B (en) Verification code implementation method, electronic equipment and computer readable storage medium
CN114430477A (en) Cross-network transmission and fusion method suitable for map symbol and annotation
CN109033863A (en) The encryption and decryption method and device of picture
CN113781287B (en) Watermark image processing method, watermark image processing device, electronic equipment and computer readable storage medium
CN112417478A (en) Data processing method, device, equipment and storage medium
CN117177017B (en) Video processing method, device, equipment and medium
CN112669068B (en) Market research data transmission method and system based on big data

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