The implementation method that a kind of spatial class business datum GISization based on cloud computing is served and system
Technical field
The present invention relates to webmaster, business support technical field, particularly spatial class business datum GISization clothes implementation method and system.
Background technology
Cloud computing is a kind of payment and using forestland of service, approximates IaaS (namely infrastructure serve), PaaS (namely platform serves), SaaS (namely software serve).
GIS-Geographic Information System (Geographical Information System, GIS) be a kind of DSS of basis, there is provided based on the browsing of spatial data, inquire about, analyze and interactive function, webmaster, business support system obtain extensive application, carry the types of applications of various network, business datum, for routine work provides important support.
But each system platform need repeat sole investment and build GIS sub-platform in the application at present, various spatial class business datum dispersion application, cannot be that other system platform is used, and Existential Space class business datum and map datum dispersion application, the problems such as renewal, security control difficulty, application and development cost are high.And public map system (as Google Maps) is all namely outer online at Internet-at present, only has the Map Services on basis, required various spatial class business datums can not be provided for each application system; Further, the various application system being deployed in Intranet is due to network security, and basic portion is deployed in Intranet truce district, cannot freely safety access and use public map system on Internet; Also there is the problems such as longitude and latitude accuracy is not high in the public map system on Internet.
For this reason, a kind of spatial class business datum GISization based on cloud computing implementation method of serving and system are arisen at the historic moment.Prior art is divided into two kinds, and one provides service by map server for specific upper layer application, comprises GIS engine and the application-specific module based on IE or Client client; Be the public WEB map system on Internet, be made up of GIS engine, WEB application assembly, development interface.
Existing by map server for specific upper layer application provides the technology of service to there is following defect: cannot be shared by other system platform, spatial class business datum and map datum dispersion application, upgrade, security control difficulty, large concurrent big data quantity service ability cannot flexible expansion, application and development cost high.
There is following defect in the public WEB map system on existing Internet: public map system (as Google Maps) is all namely outer online at Internet-, only have the Map Services on basis, required various spatial class business datums can not be provided for each application system; Further, the various application system being deployed in Intranet is due to network security, and basic portion is deployed in Intranet truce district, cannot freely safety access and use public map system on Internet; Also there is the problems such as longitude and latitude accuracy is not high in the public map system on Internet.
The present invention be exactly to realize can sharing for each system platform of Intranet, accurately, the cloud service of controlled, that there is flexible expansion ability various spatial class business datum GISization application.
Summary of the invention
In order to the present invention be exactly to realize can sharing for each system platform of Intranet, accurately, the cloud service of controlled, that there is flexible expansion ability various spatial class business datum GISization application, the invention provides implementation method and system that a kind of spatial class business datum GISization based on cloud computing serves.
The present invention adopts following technical scheme:
The invention provides the system that a kind of spatial class business datum GISization based on cloud computing serves to comprise:
A), middleware, described middleware comprises client display middleware and GIS cloud service middleware;
Client display middleware:
There is provided the assembly encapsulated that can be presented in each system webpage, and it is two-way alternately various to provide JavaScript api interface to realize, makes map and spatial class business datum can by the transparent use of other each system platforms;
Client display middleware according to the map slice size achieves the rasterizing of the whole province's map, and the numbering of each grid is cut into slices with map, spatial class business datum cuts into slices and associates;
Client display middleware comprises map initialization, the initialization of spatial class business datum, basic operation, point/line/face operation, event-driven, geometrical analysis, terrestrial reference search, changes city, sectional drawing, test module;
GIS cloud service middleware:
Be responsible for providing base map service function, and according to the request that other application systems are submitted to, carry out after geography information is combined to process, returns to client display middleware and being presented to the data submitted to, there is provided map datum and spatial class business datum caching function, to improve response speed simultaneously; Control of authority function is provided, control and management is carried out to the spatial class service data visitation authority of other system platform;
B), VoldeMort Distributed Parallel Computing layer;
Distributive parallel computation framework VoldeMort is structured on multiple server node (can adopt blade or the PC Server of low cost, smoothly can add node), by map slice of data and the various spatial class business slice of data of Key-Value Store (key-value stores) the management rasterizing of VoldeMort, the different piece distributed storage of whole slice of data on a different server, possesses the concurrent and inquiry velocity of outstanding inquiry, and automatic redundancy backup (backup quantity can be arranged) can be carried out to slice of data, the basis ensureing data security obtains Computationally efficient, concurrent user number and throughput,
C) storage engines (BDB) can, be inserted;
For store and management map slice of data and various spatial class business slice of data, provide and can dial slotting sequence support, provide complicated distributed Key-Value Store (key-value stores) to support.It receives the storage resource request of " spatial class service data acquisition and GISization definition/slicing treatment layer " module, and spatial class business slice of data is carried out distributed storage;
D), spatial class service data acquisition and GISization definition/slicing treatment layer;
By the data in various interface collection, synchronous various general class resource and operation system, and GISization standard definition, rasterizing slicing treatment and storage are carried out to it;
Spatial class service data acquisition: support the data gathered by various ways such as WebService/DB/FTP/XML/ northbound interfaces in various general class resource and operation system, the acquisition granularity definable, and provide from monitoring maintenance function;
GISization standard definition: the GIS attribute definition of seeking unity of standard to spatial class business datum, comprises display size, mark, suggestion content when Show Styles, different map display level;
Rasterizing slicing treatment: client display middleware according to the map slice size achieves the rasterizing of the whole province's map, and each grid is numbered, this module is according to the upper left of grid, the longitude and latitude of bottom right angle point longitude and latitude and business datum, every class business datum and grid are set up corresponding relation, and all generic same attribute business datum in a grid is carried out serializing packing process, then using a serializing bag as a section, and carry out classifying and numbering, set up the corresponding relation between map grid numbering and slice number, then distributed storage is carried out by memory module, this spatial class business datum rasterizing slicing treatment mechanism, can ensure only can be efficient by grid numbering, all spatial class business datums in disposable acquisition grid, it is special in business datum amount is large, than traditional directory mode, there is clear superiority,
E), memory module: by calling the memory interface of VoldeMort, the spatial class business slice of data after rasterizing slicing treatment resume module is carried out distributed storage.
The invention provides the implementation method that a kind of spatial class business datum GISization based on cloud computing serves and comprise following steps:
1) empty GIS business datum is loaded: initiate to load spatial class service data request to GIS cloud service middleware by Javascript api interface;
2) GIS business datum initialization: spatial class business datum initialization module receives the spatial class service data object of GIS cloud service middleware passback;
3) GIS service data request authentication: GIS cloud service middleware receives the spatial class business datum initialization request of client display middleware, first carry out authentication by the request legitimacy of authorization code to its business datum of the application system transmitted, application system authorization code and client ip address are recorded in authentication daily record simultaneously; After authentication is passed through, process, if authentication is not passed through, then directly return " illegal traffic request of data " message and show middleware to client;
4) GIS spatial class business slice of data request: the slice of data numbering obtaining spatial class business datum, request is initiated to spatial class business slice of data caching management module, the slice of data object that passback exists and the slice of data numbering do not existed, the slice of data do not existed if having, then initiate slice of data request to VoldeMort Distributed Parallel Computing layer, after obtaining all slice of datas, Crosslinking Mechanisms class business data processing module processes; If slice of data not, then the direct slice of data object Crosslinking Mechanisms class business data processing module by buffer memory processes;
5) GIS spatial class business slice of data cache management: receive the spatial class business slice of data request that spatial class business slice of data request module is initiated, whether there is corresponding slice of data in inquiry local cache, the slice of data object of existence and the slice of data that do not exist are numbered and returns to spatial class business slice of data request module;
6) GIS spatial class business data processing: analytic space class business slice of data object, obtain subobject wherein, all properties data with a spatial class business object are merged, rebuild the service data object example that comprises the attribute data of all requests, and this service data object example is packed, then return to client display middleware, business datum layer can be built on map, thus GISization spacial flex class business datum; Non-caching service data object example is passed to spatial class business slice of data caching management module simultaneously and carries out buffer memory and manage, for ensureing upgrading in time of some non-space class data by this module;
7) VoldeMort Distributed Parallel Computing layer map slice of data request process: the spatial class business slice of data request module of GIS cloud service middleware initiates inquiry request by the API of VoldeMort, after VoldeMort receives request, by Distributed Parallel Computing engine, distributed treatment is carried out to request, multiple node extracts required data, be combined into a complete data, and return to the spatial class business slice of data request module of GIS cloud service middleware.
Beneficial effect of the present invention is: the present invention adopts cloud computing technology, solving existing each application platform GIS subsystem cannot be other system platform problem used, solve and public map system (as Google Maps) at present on Internet can not provide required various spatial class business datums for each application system simultaneously, and cannot by the freely access of safety and the problem of use.
Further, make each application platform can when without the need to gather, the non-spatial attributes data such as physics, logic, business, performance, alarm using and operate various spatial class business datum that can be transparent.
Accompanying drawing explanation
Fig. 1 is the present invention for other each system platforms provide system and the schematic flow sheet of cloud service.
The schematic flow sheet of the loading map provided in other application system requests of Fig. 2 the present invention
The schematic flow sheet of the loading spatial class business datum provided in other application system requests of Fig. 3 the present invention
System handling process schematic diagram during Fig. 4 user's dragging/convergent-divergent map
Embodiment
Below in conjunction with accompanying drawing, the invention will be further described.
Embodiment 1
Load map
Fig. 2 shows other application system requests service provided by the invention, loads the flow process of map, is described in detail as follows:
1.1 load maps: other application systems client display middleware after embedding its webpage (namely other application systems show the example of middleware in its page creation client by Javascript api interface) by reference, initiate to load such map requests to the client display middleware in the present invention by Javascript api interface, load such map requests mode and comprise in central point and map denotation rank, in central point and map denotation ratio, in districts and cities and map denotation rank, in districts and cities and map denotation ratio, show map by indication range; When initiating to load such map requests request, need the exclusive authority code of delivery applications system assignment simultaneously.
1.2 map initialization: after client display middleware obtains the request of application system transmission, the map denotation scope of the map denotation parameter definition of transmitting according to " 1.1 maps load " and display level, obtain all grid numberings in indication range and corresponding map section filename, then cut into slices filename array, application system authorization code and client ip address for parameter with map, initiate map section file request to " GIS cloud service middleware ".
Map initialization module receives " GIS cloud service middleware " map slice of data object of returning, and the grid numbering of cutting into slices corresponding is according to the map inserted corresponding grid, thus is spliced into a complete map picture and shows; " illegal request " message that if map initialization module receives " GIS cloud service middleware " returns, then play window display " illegal map service request " message, reminding user.
1.3 map application authentications: the map initialization request receiving client display middleware in the middle of GIS cloud service, first carry out authentication by the authorization code of the application system transmitted to its legitimacy, application system authorization code and client ip address are recorded in authentication daily record simultaneously; After authentication is passed through, submit to " 1.4 map slice of data request " module processes, if authentication is not passed through, then directly return " illegal map service request " message and show middleware to client, and application system webpage be hit by a bullet window remind.
1.4 map slice of data requests: according to the map section filename array of this request, first request is initiated to " 1.5 map slice of data cache management " module, the map slice of data object that the passback of " 1.5 map slice of data cache management " module exists and the map section filename do not existed, the map section do not existed if having, then initiate map section file request to " VoldeMort Distributed Parallel Computing layer ", after obtaining the section of all maps, " 1.6 maps processing " module is handed over to process; If not map section, then direct by map slice of data object hand over " 1.6 maps processing " module process.
1.5 map slice of data cache managements: receive the map section request that " 1.4 map slice of data request " module is initiated, whether there is the map slice of data of respective file name in inquiry local cache, filename of the map slice of data object of existence and the map that do not exist being cut into slices returns to " 1.4 map slice of data request " module.
1.6 maps processing: with each map section filename, file, upper left and bottom right angle point longitude and latitude, whether be data cached for parameter establishment map slice of data object instance, the map slice of data object instance of all requests is packed, then return to " client display middleware ", can completely be spliced into the map picture needed for a width and show; Non-caching map slice of data object instance is passed to " 1.5 map slice of data cache management " module simultaneously and carries out buffer memory and manage by this module.
1.7VoldeMort Distributed Parallel Computing layer map slice of data request process: " 1.4 map slice of data request " module of GIS cloud service middleware initiates inquiry request by the API of VoldeMort, after VoldeMort receives request, by " Distributed Parallel Computing engine ", distributed treatment is carried out to request, data on multiple node needed for (on server) extraction, be combined into a complete data, and return to " 1.4 map slice of data request " module of GIS cloud service middleware.
Embodiment 2
2 load spatial class business datum
Fig. 3 shows other application system requests service provided by the invention, loads the flow process of spatial class business datum, is described in detail as follows:
2.1 load spatial class business datum: other application systems can while 1.1 loading such map requests send, or load successfully at map, initiate to load spatial class service data request to GIS cloud service platform by JavascriptAPI interface, required parameter comprises business datum classification (as base station), data attribute (as physical/logical/business/performance/alarm), territorial scope (control its user to allow application system and can only check that it has the business datum in authority region).
2.2 spatial class business datum initialization: after client display middleware obtains the request of application system transmission, obtain all grids numbering (being called: grid numbering collection 1) in the territorial scope of transmission in " 2.1 load spatial class business datum " request, number (being called: grid numbering collection 2) with grid of obtaining in " 1.2 map initialization " to compare, get grid numbering (being called: grid numbering collection 3) in its common factor, then by grid numbering collection 3, business datum classification (as base station), attribute (as physical/logical/business/performance/alarm) and application system authorization code, client ip address is as parameter, spatial class service data request is initiated to " GIS cloud service middleware ".
Spatial class business datum initialization module receives the spatial class service data object that " GIS cloud service middleware " returns, first business datum in the territorial scope that do not transmit in " 2.1 load spatial class business datum " request is rejected, then corresponding according to spatial class business datum grid numbering, and the longitude and latitude of the spatial class business datum returned according to latitude and longitude coordinates corresponding to each grid and " GIS cloud service middleware ", calculate its corresponding display position on grid, and with point (or icon), line, the form in face comprehensively presents, thus GISization spacial flex class business datum is (as represented base station with form of icons, and whether have alarm with different icons mark base station), if spatial class business datum initialization module receives " illegal request " message that " GIS cloud service middleware " returns, then play window display " illegal traffic request of data " message, reminding user.
2.3 service data request authentications: GIS cloud service middleware receives the spatial class business datum initialization request of client display middleware, first carry out authentication by the request legitimacy of authorization code to its business datum of the application system transmitted, application system authorization code and client ip address are recorded in authentication daily record simultaneously; Authentication is by rear (application system can access this business datum), " 2.4 spatial class business slice of data request " module is submitted to process, if authentication is not passed through, then directly return " illegal traffic request of data " message and show middleware to client, and application system webpage be hit by a bullet window remind.
2.4 spatial class business slice of data requests: according to the grid numbering array of this request, business datum classification (as base station), attribute (as physical/logical/business/performance/alarm), first (each slice of data is a serializing bag to obtain the slice of data numbering of spatial class business datum, multiple space service data object (as multiple base station object) is comprised in each sequence, " rasterizing slicing treatment " module of module that detailed section mechanism is shown in " spatial class service data acquisition and GISization definition/slicing treatment layer "), request is initiated to " 2.5 spatial class business slice of data cache management " module, the slice of data object that the passback of " 2.5 spatial class business slice of data cache management " module exists and the slice of data numbering do not existed, the slice of data do not existed if having, then initiate slice of data request to " VoldeMort Distributed Parallel Computing layer ", after obtaining all slice of datas, " 2.6 spatial class business data processing " module is handed over to process, if slice of data not, then direct " 2.6 spatial class business data processing " module of being handed over by the slice of data object of buffer memory processes.
2.5 spatial class business slice of data cache managements: receive the spatial class business slice of data request that " 2.4 spatial class business slice of data request " module is initiated, whether there is corresponding slice of data in inquiry local cache, the slice of data object of existence and the slice of data that do not exist are numbered and returns to " 2.4 spatial class business slice of data request " module.
2.6 spatial class business data processings: analytic space class business slice of data object, obtain subobject (as multiple base station object) wherein, all properties data with a spatial class business object are carried out merging (because the data of generic different attribute are in different slice of data objects, " rasterizing slicing treatment " module of module that detailed section mechanism is shown in " spatial class service data acquisition and GISization definition/slicing treatment layer "), rebuild the service data object example that comprises the attribute data of all requests, and this service data object example is packed, then return to " client display middleware ", business datum layer can be built on map, thus GISization spacial flex class business datum, non-caching service data object example passes to by this module simultaneously " 2.5 spatial class business slice of data cache management ", and module is carried out buffer memory and manages, for ensureing upgrade in time (as the alarm) of some non-space class data, the business datum of all buffer memorys is all given tacit consent to 15 minutes effective (can arrange effective time).
2.7VoldeMort Distributed Parallel Computing layer map slice of data request process: " 2.4 spatial class business slice of data request " module of GIS cloud service middleware initiates inquiry request by the API of VoldeMort, after VoldeMort receives request, by " Distributed Parallel Computing engine ", distributed treatment is carried out to request, data on multiple node needed for (on server) extraction, be combined into a complete data, and return to " 2.4 spatial class business slice of data request " module of GIS cloud service middleware.
Embodiment 3
3 dragging/convergent-divergent maps
Fig. 4 shows system handling process during user's dragging/convergent-divergent map, is described in detail as follows:
3.1 dragging/convergent-divergent maps: user, to the dragging of map or zoom operations, is the operation performed on client display middleware, application system does not need to send any request to the client display middleware in the present invention again.
3.2 fundamental operation process: user is to the dragging of map or zoom operations, change map denotation scope, thus change show grid, fundamental operation processing module obtains show grid according to new map denotation scope, judge whether that new spatial class business slice of data needs request, if having, then transfer to " 3.3 map slice of data heavy duty " and " 3.4 business slice of data heavy duty " module to process simultaneously, otherwise, only transfer to " 3.3 map slice of data heavy duty " module to process.
3.3 map slice of data heavy duties: obtain corresponding map section filename according to new show grid, then filename array, application system authorization code and client ip address is cut into slices for parameter with map, initiate map section file request to " GIS cloud service middleware ", follow-up processing flow is same as the handling process of 2.4 map slice of data requests, 1.5 map slice of data cache managements, 1.6 maps processing, 1.7VoldeMort Distributed Parallel Computing layer map slice of data request processing module.
Map slice of data heavy duty module receives " GIS cloud service middleware " map slice of data object of returning, and the grid numbering of cutting into slices corresponding is according to the map inserted corresponding grid, thus is spliced into a complete map picture and shows;
3.4 business slice of data heavy duties: using grid numbering collection, business datum classification (as base station), attribute (as physical/logical/business/performance/alarm) and application system authorization code, client ip address as parameter, initiate spatial class service data request to " GIS cloud service middleware ", follow-up processing flow is same as the handling process of 2.4 spatial class business slice of data requests, 2.5 spatial class business slice of data cache managements, 2.6 spatial class business data processings, 2.7VoldeMort Distributed Parallel Computing sheaf space class business slice of data request processing module.
Business slice of data heavy duty module receives the spatial class service data object that " GIS cloud service middleware " returns, first the business datum not in setting territorial scope is rejected, then corresponding according to spatial class business datum grid numbering, and the longitude and latitude of the spatial class business datum returned according to latitude and longitude coordinates corresponding to each grid and " GIS cloud service middleware ", calculate its corresponding display position on grid, and comprehensively present GISization spatial class business datum with the form in point (or icon), line, face.