The geographic information data Space Expanding and encryption method of a kind of mobile client database
Technical field
The invention belongs to database technical field, and in particular to open up in a kind of geographic information data space of mobile client database
Exhibition and encryption method.
Background technology
With the development of science and technology, it is more and more common for information system to survey and draw geographic information data, due to mapping ground
The confidentiality of information data is managed, government department proposes higher requirement to the confidentiality of standalone version management information system data,
And the operating system such as Android, iOS that mobile phone in the market uses mostly, navigator and data recorder use mostly
Windows CE operating systems, all it is to be managed by file mostly, data use stored in clear, and this mode is between data
It is all weaker in terms of contact, analysis and security control, so application of the geographic information data in mobile client database is limited, and
In domestic or even international geomatics industry, all there has been no the small-sized commercial database system for solving encryption and Space Expanding.
The content of the invention
In view of the above-mentioned deficiencies in the prior art, the technical problem to be solved by the present invention is that provide a kind of mobile terminal number
According to the geographic information data Space Expanding and encryption method in storehouse, its method and step is simple, functional, stable, effectively anti-
Data diffusion is stopped, has had a wide range of application, using effect is good, is easy to promote the use of.
In order to solve the above technical problems, the technical solution adopted by the present invention is:A kind of geography information of mobile client database
Data space is expanded and encryption method, it is characterised in that this method comprises the following steps:
Step 1: data acquisition and nuclear interface standardizing:Data processing equipment receives total powerstation or aerocamera collects
Geographic information data, and be transferred to mobile end equipment;Mobile end equipment receives geographic information data and by Spatial data query
In function and the SQL statement of Analysis of spatial relations function implantation standard;
Step 2: data operation request:Mobile end equipment connects mobile client database by SQL statement, carries out data behaviour
Ask, SQL statement is mapped to internal grammar analysis module into attribute data operation module and spatial data operation module performs
The work of SQL statement request;
Step 3: data manipulation, detailed process are:
Step 301, data are kept in:Mobile terminal equipment calls data temporary storage module to the data that are newly received in step 1 with
The form of tables of data is cached, and the tables of data includes the attribute data and spatial data of data object;
Step 302, by operation influenceed data analysis:Mobile terminal equipment calls are influenceed data analysis module and basis by operation
The work for the SQL statement request completed in step 2, judges all attributes influenceed by operation in the tables of data in step 301
Data and spatial data;
Step 303, data structure building:In the equipment calls data structure building module difference generation step 302 of mobile terminal
The attribute data and the data structure of spatial data analyzed;Wherein, the data structure of attribute data is B-tree structures, B-
For tree structures to data file request data in the form of the data block of fixed size, the size of the data block is 512~65536
Individual byte;The data structure of spatial data is R-tree structures;
Step 304, data buffer storage:Mobile terminal equipment calls data cache module and according to the data structure in step 303
Carry out data buffer storage;Wherein, page cache is passed through to attribute data and performs reading and writing and caching data block, there is provided rollback and
Atomic commitment is abstracted, and manages the locking of data file;Reading and writing and caching are performed by MBR caches to spatial data;
Step 305, data encryption:Mobile terminal equipment calls data encryption module adds to attribute data and spatial data
Close operation;
Data 306, data storage:Mobile terminal equipment calls data memory module is by the data after step 305 is encrypted
Store in mobile client database.
The geographic information data Space Expanding and encryption method of a kind of above-mentioned mobile client database, it is characterised in that:Step
The size of data block described in rapid 303 is 1024 bytes.
The geographic information data Space Expanding and encryption method of a kind of above-mentioned mobile client database, it is characterised in that:Step
Mobile end equipment also calls spatial data Analysis of spatial relations module to enter the spatial relationship of spatial data geometric figure in rapid 304
Row is analyzed and analysis result is stored.
The geographic information data Space Expanding and encryption method of a kind of above-mentioned mobile client database, it is characterised in that:Institute
State spatial data geometric figure spatial relationship include it is equal, intersecting, mutually from, abut, include, include and overlap.
The geographic information data Space Expanding and encryption method of a kind of above-mentioned mobile client database, it is characterised in that:Step
Mobile end equipment also calls spatial data spatial relationship spatial analysis module to close the space of spatial data geometric figure in rapid 304
System carries out spatial analysis and spatial analysis result is stored.
The geographic information data Space Expanding and encryption method of a kind of above-mentioned mobile client database, it is characterised in that:Step
Spatial relationship progress spatial analysis in rapid 304 to spatial data geometric figure includes buffer zone analysis, convex closure is analyzed or stacked
Analysis.
The geographic information data Space Expanding and encryption method of a kind of above-mentioned mobile client database, it is characterised in that:Step
Mobile terminal equipment calls data encryption module and use replace box and behaviour are encrypted to attribute data and spatial data in rapid 305
Make.
The geographic information data Space Expanding and encryption method of a kind of above-mentioned mobile client database, it is characterised in that:Step
Equipment calls data encryption module in mobile terminal attribute data and spatial data is encrypted operation in rapid 305, generates data page,
The data page generated in step 305 storage is arrived mobile client database by mobile terminal equipment calls data memory module in step 306
In.
The geographic information data Space Expanding and encryption method of a kind of above-mentioned mobile client database, it is characterised in that:Step
Equipment calls data encryption module in mobile terminal attribute data and spatial data is encrypted operation in rapid 305, generates data page
Detailed process be:
Step I, obtain user cipher and mobile device hardware code;
Step II, encrypted after user cipher is encrypted by hashing algorithm with mobile device hardware code using AES256
Algorithm is merged, and produces encryption key;
Step III, encryption key merged with attribute data or spatial data using paging replacement algorithm, and used
AES256 AESs are encrypted.
The geographic information data Space Expanding and encryption method of a kind of above-mentioned mobile client database, it is characterised in that:Institute
It is computer to state data processing equipment, and the mobile end equipment is mobile phone, navigator or data recorder.
The present invention has advantages below compared with prior art:
1st, mobile client database of the invention is expanded with advanced encryption mechanism and geospatial analysis in the world
Mini-relational type database product.
2nd, the present invention possess spatial operation, spatial analysis, network analysis, password encryption and it is compact the features such as, be especially suitable for
Mobile terminal is applied by GML data storage and analysis.
3rd, resource occupation of the present invention is few, and data processing and spatial analysis functions are but very powerful, is the letter of all trades and professions
Breathization is built, geography information valued added applications and service industry provide a set of perfect database solution, can be driven each
The development of each industry of row.
4th, the present invention is not only solving spatial analysis and storage of the geographic information data in mobile terminal, and combines advanced
Encryption mechanism to data encryption, effectively prevent data diffusion, contain the abuse of illegal user, protection data production
The legitimate interests of unit.
In summary, the inventive method step is simple, functional, stable, effectively prevent data diffusion, application
Scope is wide, and using effect is good, is easy to promote the use of.
Below by drawings and examples, technical scheme is described in further detail.
Brief description of the drawings
Fig. 1 is the method flow block diagram of the present invention.
Embodiment
As shown in figure 1, the geographic information data Space Expanding and encryption method of the mobile client database of the present invention, including it is following
Step:
Step 1: data acquisition and nuclear interface standardizing:Data processing equipment receives total powerstation or aerocamera collects
Geographic information data, and be transferred to mobile end equipment;Mobile end equipment receives geographic information data and by Spatial data query
In function and the SQL statement of Analysis of spatial relations function implantation standard;Mobile terminal database access can so had unified
, succinct access interface;
Step 2: data operation request:Mobile end equipment connects mobile client database by SQL statement, carries out data behaviour
Ask, SQL statement is mapped to internal grammar analysis module into attribute data operation module and spatial data operation module performs
The work of SQL statement request;
Step 3: data manipulation, detailed process are:
Step 301, data are kept in:Mobile terminal equipment calls data temporary storage module to the data that are newly received in step 1 with
The form of tables of data is cached, and the tables of data includes the attribute data and spatial data of data object;
Step 302, by operation influenceed data analysis:Mobile terminal equipment calls are influenceed data analysis module and basis by operation
The work for the SQL statement request completed in step 2, judges all attributes influenceed by operation in the tables of data in step 301
Data and spatial data;When it is implemented, SQL statement is sentence specified in SQL99 standards, data manipulation is SQL99 standards
Specified in data manipulation, including:SELECT, data row and column is retrieved from database table;INSERT, added to database table
New data row;DELETE, data row is deleted from database table;UPDATE, update the data the data in the table of storehouse.
Step 303, data structure building:In the equipment calls data structure building module difference generation step 302 of mobile terminal
The attribute data and the data structure of spatial data analyzed;Wherein, the data structure of attribute data is B-tree structures, B-
For tree structures to data file request data in the form of the data block of fixed size, the size of the data block is 512~65536
Individual byte;The data structure of spatial data is R-tree structures;Attribute data is physically divided into size identical block, and
Some B-tree are logically divided into, improve the efficiency that data query is shown.R-tree is sent out from B-tree to hyperspace
Exhibition generation, is indexed for spatial data structure.
Step 304, data buffer storage:Mobile terminal equipment calls data cache module and according to the data structure in step 303
Carry out data buffer storage;Wherein, reading and writing and data cached are performed by page cache (Page Cache) to attribute data
Block, there is provided rollback and atomic commitment it is abstract, and manage the locking of data file;MBR caches are passed through to spatial data
(MBR Cache) performs reading and writing and caching;
By introducing spatial data R-tree and MBR Cache, enable to be more effectively carried out spatial relationship point
Analysis and spatial data access.
Step 305, data encryption:Mobile terminal equipment calls data encryption module adds to attribute data and spatial data
Close operation;
Data 306, data storage:Mobile terminal equipment calls data memory module is by the data after step 305 is encrypted
Store in mobile client database.
In the present embodiment, the size of data block described in step 303 is 1024 bytes.
In the present embodiment, mobile end equipment also calls spatial data Analysis of spatial relations module to space number in step 304
Analyzed according to the spatial relationship of geometric figure and analysis result is stored.
In the present embodiment, the spatial relationship of the spatial data geometric figure include it is equal, intersecting, mutually from, adjacent, bag
Contain, include and overlap.
In the present embodiment, mobile end equipment also calls spatial data spatial relationship spatial analysis module to sky in step 304
Between the spatial relationship of data geometric figure spatial analysis and spatial analysis result is stored.
In the present embodiment, spatial analysis is carried out including buffering to the spatial relationship of spatial data geometric figure in step 304
Area's analysis, convex closure analysis or Overlap Analysis.
In the present embodiment, in step 305 mobile terminal equipment calls data encryption module and using displacement box to attribute data
Operation is encrypted with spatial data.
In the present embodiment, mobile terminal equipment calls data encryption module is entered to attribute data and spatial data in step 305
Row cryptographic operation, data page is generated, the number that mobile terminal equipment calls data memory module will generate in step 305 in step 306
According to page storage into mobile client database.
In the present embodiment, mobile terminal equipment calls data encryption module is entered to attribute data and spatial data in step 305
Row cryptographic operation, the detailed process for generating data page are:
Step I, obtain user cipher and mobile device hardware code;
Step II, encrypted after user cipher is encrypted by hashing algorithm with mobile device hardware code using AES256
Algorithm is merged, and produces encryption key;
Step III, encryption key merged with attribute data or spatial data using paging replacement algorithm, and used
AES256 AESs are encrypted.AES256 AESs can rapidly encrypting and decrypting, be easily achieved on a variety of platforms, speed
Degree is fast, realizes simply, and only needs seldom memory, and it is as data encryption standards of new generation, in security, cost and calculation
Its excellent performance is all confirmed in method and realization;The use of box is replaced, the difference uniformity and deviation from linearity for making ciphertext all reach
Comparatively ideal state, improves the ability for resisting various attacks, can resist all known attack.
In the present embodiment, the data processing equipment is computer, and the mobile end equipment is mobile phone, navigator or electronics
Handbook.
In summary, attribute data is physically divided into default 1024 byte-sizeds identical block by the present invention, patrols
Some B-tree are divided on volume so that each corresponding B-tree of table, and spatial data and attribute data are as a note
Address book stored improves the efficiency that data query is shown in same table.Different types of data use different data processings
Mode, for space vector data, dynamically spatial-data index R-tree and MBR Cache is introduced, is allowed to more efficiently carry out sky
Between relationship analysis and GML data storage.Data are encrypted in bottom using AES256, and we add displacement box on its basis, will
After user cipher is encrypted by hashing algorithm and application hardware code is using producing real encryption key after algorithm fusion, then
It is encrypted with data using paging replacement algorithm, replaces the use of box, the difference uniformity and deviation from linearity for making ciphertext all reach
Comparatively ideal state has been arrived, has improved the ability for resisting various attacks, all known attacks can be resisted.
The design of the present invention meets technology development need, functional, stable, has a wide range of application, especially for
The professional domains such as agricultural projects, Management offorestry, territory monitoring, disaster alarm, road traffic, land investigation, water pollution monitoring, in sky
Between have incomparable advantage in terms of data analysis, evaluation and aid decision, embedded spatial data encryption mechanism of new generation,
Effectively contain the abuse of illegal user, protect mapping geographic information data production firm and the conjunction using unit
Method interests.
It is described above, only it is presently preferred embodiments of the present invention, not the present invention is imposed any restrictions, it is every according to the present invention
Any simple modification, change and the equivalent structure change that technical spirit is made to above example, still fall within skill of the present invention
In the protection domain of art scheme.