CN117033533A - Multi-source map dynamic slicing and caching method and device - Google Patents

Multi-source map dynamic slicing and caching method and device Download PDF

Info

Publication number
CN117033533A
CN117033533A CN202310905453.8A CN202310905453A CN117033533A CN 117033533 A CN117033533 A CN 117033533A CN 202310905453 A CN202310905453 A CN 202310905453A CN 117033533 A CN117033533 A CN 117033533A
Authority
CN
China
Prior art keywords
map
slice
service
source
layer
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.)
Pending
Application number
CN202310905453.8A
Other languages
Chinese (zh)
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.)
Beijing Institute of Space Research Mechanical and Electricity
Original Assignee
Beijing Institute of Space Research Mechanical and Electricity
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 Beijing Institute of Space Research Mechanical and Electricity filed Critical Beijing Institute of Space Research Mechanical and Electricity
Priority to CN202310905453.8A priority Critical patent/CN117033533A/en
Publication of CN117033533A publication Critical patent/CN117033533A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Remote Sensing (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention relates to a method and a device for dynamically slicing and caching a multi-source map, wherein the method comprises the following steps: searching the map slice in the secondary cache according to the map slice access request of the user; dynamically slicing through a multi-source map server according to the service type of the map slice so as to obtain the map slice; and returning the acquired map slices to the user. According to the technical scheme, the slices are stored in the cache and the file, so that the map slice browsing speed can be greatly improved, and the map response time is accelerated; the map is sliced and cached in the memory and the file in real time by adopting a dynamic slice caching mode of the map, and when the map is accessed again, the map is directly obtained from the cache, so that the access efficiency is improved; and different map services can be registered to the multi-source map server, so that the problem of efficient map service of real-time, high-frequency and mass data and the problem of integration of multi-source and scattered third-party map services are solved.

Description

Multi-source map dynamic slicing and caching method and device
Technical Field
The embodiment of the invention relates to the technical field of map caching, in particular to a method and a device for dynamically slicing and caching a multi-source map.
Background
Slice maps are an efficient way to quickly access map services. Currently, popular online map services, such as Google Maps, mapBar, bingMaps, and the like, have relatively high browsing speed and concurrency requirements, and the requirement of quickly accessing a map is met by adopting a slice map mode. In the prior art, the slice map mostly adopts an offline map slicing technology, so that the slice generation is performed on the whole area at one time, the time consumption is long, and the temporary storage is more.
The dynamic map service is that when the client sends a request to the server to view the map service, the server generates a picture according to the request range and returns the picture to the client. If another client requests to view another map, the server generates a picture again and returns the picture to the client. Since these pictures are generated by the server after receiving the request, i.e. dynamically according to the request range, the speed is relatively slow, and the map may be seen after waiting for a relatively long time according to the network condition when accessing. The dynamic Map Service technology, such as Web Map Service (WMS), is inefficient in reading data and generating pictures after receiving a request, and can solve the problem of inefficiency after using caching, but when the amount of Map data is large, the problem of insufficient memory is caused.
The map slicing is to preprocess the service, cut the map into small blocks of slices, namely tiles (tiles), in advance under the designed scale level, that is, small blocks of pictures are stored on the server, so that when a request is received, the server can directly splice the generated tiles and return the tiles to the client, and the pictures are not generated dynamically in real time. The map slicing technology reduces the burden of a geographic information system (Geographic Information System, hereinafter referred to as a GIS) server and a database server, and is an effective way for improving the service quality of the network GIS. Particularly, for mass data, the browsing speed can be greatly improved by using the cache, the map response time is accelerated, and the user experience is finally improved.
There are many map slicing implementations currently, mainly an offline map slicing scheme and an online map slicing scheme. In the online Map slicing scheme, software such as GeoWebCache, tileCache is mature, and Map slicing and file storage are performed by using Web Map Service (WMS). The off-line map slicing scheme includes that internet maps such as a hundred-degree map, a high-altitude map and a sky map are sliced into all areas and levels and then distributed to the internet. Also, map data is sliced with slice software such as mapnik and saved to a file or database, and then the slice is released as a slice map service. However, the existing online map slicing technology only supports a single map service, such as geowebcam only supports wms map service. The convergence requirement of the multi-source map service cannot be met. The online map slice is also generated all slices at one time, so that the time for a plurality of slices is increased at any time, the problems can be solved by adopting the scheme of online map dynamic slice, the dynamic slice is sliced in real time, the slice time is not influenced by data updating according to the slice requirement.
Disclosure of Invention
Based on the above situation of the prior art, an object of the embodiments of the present invention is to provide a method and an apparatus for dynamic slicing and caching of a multi-source map, which are called in a unified slice map manner, and slices are stored in a cache and a file, so that the browsing speed of the slice of the map can be greatly improved, the response time of the map is accelerated, and meanwhile, a set of parameter conversion rules from the slice map to a specific map service is established, and different map services are registered to a multi-source map server, thereby realizing dynamic slicing and caching of the multi-source map.
To achieve the above object, according to one aspect of the present invention, there is provided a multi-source map dynamic slicing and caching method applied to a service manager, the method comprising the steps of:
s102, searching the map slices in the secondary cache according to a map slice access request of a user, and executing a step S106 when the matched map slices are searched;
s104, dynamically slicing through a multi-source map server according to the service type of the map slice so as to obtain the map slice, and storing the map slice into a secondary cache; wherein the multi-source map server comprises a map service provided by a plurality of different map data sources;
and S106, returning the acquired map slices to the user.
Further, searching the map slice in the secondary cache comprises the following steps:
s1021, searching the map slice in the memory cache, and if the map slice is acquired, executing step S106;
s1022, searching the slice file for the map slice, and if the map slice is acquired, executing step S106. Further, the slice file directory includes: a first layer cache root directory, a second layer data source name directory, a third layer work area name, a fourth layer map cache directory, a fifth layer color scheme directory, a sixth layer time sequence directory, a seventh layer projection coordinate system directory, an eighth layer different layer cache directory, and a ninth layer cache picture file name.
Further, the memory cache stores map slices according to a least recently used principle.
Further, according to the service type of the map slice, dynamic slice is performed by the multi-source map server, which comprises the following steps:
s1041, determining a corresponding data source and a map service type to which the data source belongs according to the name of the data source and the name parameter of the layer;
s1042, if the service type is network map WMS service, converting and calculating the slice parameters into bounding boxes of map slices as bbox parameters of the WMS according to the conversion relation between the map slice numbers and the longitudes and latitudes;
if the service type is map slice WMTS service, adopting WMTS slice rule;
if the service type is map slice TMS service, the TMS parameters need to overturn the y parameters;
if the service type is other map service, writing a script for generating required parameters by converting slice parameters according to the service parameter requirements, so as to generate other map service request parameters;
s1043, determining a multi-source map server according to the parameters and the data source, acquiring an address requested by the server, splicing the map service parameters, acquiring a corresponding map slice through http access, and caching the map slice to a designated directory to finish the map slice process.
Further, the corresponding multi-source map service is obtained according to the map slice request parameter, and the corresponding multi-source map service is obtained according to the data source name and the layer name of the map slice.
Further, the step S104 further includes:
and outputting a slice buffer newly-added event so that the buffer manager stores the slices in the buffer into slice files of the corresponding catalogue according to the monitored slice buffer newly-added event.
Further, the plurality of different map data sources provide a multi-source map service by registering with the multi-source map server; the registration information includes a data source, a layer list, and a parameter conversion rule.
According to another aspect of the present invention, there is provided a multi-source map dynamic slicing and caching apparatus applied to a service manager, the apparatus comprising:
the cache searching module is used for searching the map slice in the secondary cache according to the map slice access request of the user;
the multi-source map dynamic slicing module is used for carrying out dynamic slicing through a multi-source map server according to the service type of the map slice so as to obtain the map slice, and storing the map slice into a secondary cache; wherein the multi-source map server comprises a map service provided by a plurality of different map data sources;
and the output module is used for returning the acquired map slices to the user.
In summary, the embodiment of the invention provides a method and a device for dynamically slicing and caching a multi-source map, which are applied to a service manager, wherein the method comprises the following steps: searching the map slice in the secondary cache according to the map slice access request of the user; dynamically slicing through a multi-source map server according to the service type of the map slice so as to obtain the map slice, and storing the map slice into a secondary cache; and returning the acquired map slices to the user. According to the technical scheme, the slices are stored in the cache and the file in a unified slice map mode, so that the map slice browsing speed can be greatly improved, and the map response time is accelerated; the map is sliced and cached in the memory and the file in real time by adopting a dynamic slice caching mode of the map, and when the map is accessed again, the map is directly obtained from the cache, so that the map rendering time is shortened, and the access efficiency is improved; and a set of parameter conversion rules from the slice map to the specific map service is established so as to register different map services to the multi-source map server, when the slice is called, the corresponding map service is acquired according to the slice layer name, map service parameters are generated by the preset parameter conversion rules, and then the map service is requested to acquire the slice, so that the different map services are integrated into the service of the slice map uniformly. Therefore, the problem of efficient map service of real-time, high-frequency and mass data and the problem of integration of multi-source and scattered third-party map services are solved.
Drawings
FIG. 1 is a flow chart of a method for dynamic slicing and caching of a multi-source map according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for dynamic slicing and caching of a multi-source map according to another embodiment of the present invention;
fig. 3 is a schematic view of a slice file directory structure.
Detailed Description
The objects, technical solutions and advantages of the present invention will become more apparent by the following detailed description of the present invention with reference to the accompanying drawings. It should be understood that the description is only illustrative and is not intended to limit the scope of the invention. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the present invention.
It is to be noted that unless otherwise defined, technical or scientific terms used in one or more embodiments of the present invention should be taken in a general sense as understood by one of ordinary skill in the art to which the present invention belongs. The use of the terms "first," "second," and the like in one or more embodiments of the present invention does not denote any order, quantity, or importance, but rather the terms "first," "second," and the like are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
Whether to use dynamic map services or map slicing takes two problems into consideration, namely how often the map needs to be updated and how large the range of slices is. Since the slice represents a view of the map at a certain moment, the slice is most suitable for a map which is not changed frequently, such as a street map, a topography map, an image map, other basic maps and the like. If the data is changed frequently, the method of updating the slice periodically can be adopted, but if real-time data is needed to be represented, the method is not suitable for slicing a map, and is more suitable for dynamic map. Depending on the complexity of the map and the scope of the cut map, generating the slice may take a long time to complete, and if the frequently changing regions can be isolated for separate updating, the efficiency of reconstructing the slice may be greatly improved.
Map data are acquired faster and faster nowadays, and particularly, the frequency of acquiring monitoring data is higher and higher, for example, atmospheric quality monitoring data based on satellite images and prediction data based on grids, and these large-scale, real-time, high-frequency and massive raster data bring new challenges to map services. Under real-time and massive data, dynamic map service can be overloaded for memory, so that the map needs to be re-rendered for each request, the efficiency is low, the concurrence is low, the waiting time is long, and the user experience is poor. The map slicing is long enough for large-scale real-time data, and a user needs to wait for a certain time to browse, so that the map slicing is unsuitable for high-frequency monitoring data, the monitoring data needs to be displayed in real time, and the map slicing method cannot meet the requirements. Therefore, how to display the real-time high-frequency mass data in real time puts higher demands on map services.
In addition, the sources of the map are various, and the map data are scattered. In practical applications, map data issued by third parties are often used, and these third party map services have OGC standards, slice maps, arcGIS standards, and defined parameters of the third party map services are different from each other, which brings great trouble to the map services. The integration of the multi-source map service is beneficial to reducing development complexity and improving map access efficiency, so that the third-party map data is better utilized, and the expression of the map is enriched.
The following describes the technical scheme of the present invention in detail with reference to the accompanying drawings. Fig. 1 is a flowchart of a method for dynamically slicing and caching a multi-source map, which is applied to a service manager and includes the following steps:
and S102, searching the map slices in the secondary cache according to the map slice access request of the user, and executing step S106 when the matched map slices are searched. The user may issue a map slice access request through a service interface of the access service manager.
The map slice searching method comprises the following steps of:
s1021, searching the map slice in the memory cache, and if the map slice is acquired, executing step S106;
s1022, searching the slice file for the map slice, and if the map slice is acquired, executing step S106.
According to the map slice access request of the user, the service manager firstly searches the map slice in the secondary cache, obtains the slice in the memory cache, obtains the slice in the slice file, and returns to the user if the slice is obtained. And if the map slice is obtained from the memory cache and the slice file, performing dynamic slice through the multi-source map server. In the embodiment of the invention, the map slice secondary cache storage slice is formed by providing a memory and a file mode, and the slice can also be stored by adopting a memory and a database mode.
Because the common WMS server needs to read data and generate pictures after receiving the request, the efficiency is too low. In the embodiment of the invention, when the user access is received, the map slice is preferentially searched in the memory cache, if the user access is received, the user is returned, if the user does not search the map slice in the slice file, the dynamic map service (namely, a multi-source map server) is not needed to acquire the slice, the slice is immediately saved in the cache and the file after the dynamic map is acquired, and the dynamic map service is not needed to be accessed again for the next access, so that the time for reading data and generating pictures is reduced, and the efficiency is greatly improved.
S104, dynamically slicing through a multi-source map server according to the service type of the map slice so as to obtain the map slice, and storing the map slice into a secondary cache; the multi-source map server comprises a map service provided by a plurality of different map data sources, and the plurality of different map data sources provide the multi-source map service by registering with the multi-source map server; the registration information includes a data source, a layer list, and a parameter conversion rule.
The dynamic slicing is performed by the multi-source map server according to the service type of the map slice, and the method comprises the following steps:
s1041, determining a corresponding data source and a map service type to which the data source belongs according to a data source name (Server) and a layer name (layer) parameter, wherein the data source comprises a GeoServer, an offline file, MBTiles, an online map, an ArcGIS Server and the like.
S1042, if the service type is network map WMS service, converting and calculating slice parameters (x, y, z) into bounding boxes of map slices according to the conversion relation between map slice numbers and longitude and latitude as bbox parameters of the WMS service, wherein layer parameters (layers) of the WMS use layer names, and other parameters are defaulted, so that setting of network map WMS service request parameters is completed; if the service type is map slice WMTS/TMS service or offline map service such as offline files, MBTiles and the like, the embodiment of the invention adopts WMTS slice rule, so WMTS is directly requested. For TMS parameters, y parameters need to be overturned, and conversion is carried out according to a formula of y= (2^z) -y-1; if the service type is other map service, writing a script for converting the slice parameters (x, y, z) into the required parameters according to the service parameter requirements, thereby generating other map service request parameters.
S1043, determining a multi-source map server according to the parameters and the data source, acquiring an address (url) requested by the server, splicing the map service parameters, acquiring corresponding map slices through http access, and caching the map slices to a designated directory to finish the map slicing process.
In step S104, when there is no requested map slice in the secondary cache, a dynamic slice is performed by the multi-source map server. And acquiring the corresponding multi-source map service according to the map slice, judging the service type of the multi-source map service, and selecting different dynamic slice implementation methods according to the service type. And converting the map slice parameters into parameters required by the multi-source map service, and acquiring the returned dynamic map slice after requesting the service through a multi-source map service interface of the multi-source map server.
The step S104 further includes: and outputting a slice buffer newly-added event so that the buffer manager stores the slices in the buffer into slice files of the corresponding catalogue according to the monitored slice buffer newly-added event.
The embodiment of the invention adopts a map dynamic slicing scheme, and solves the problem that the online map slicing method cannot adapt to the requirements of data updating and high-frequency and real-time display of real-time data. Since data is often updated, acquired by means of a slice map, there is a need to re-slice at any time, thus increasing the time for many slices, ranging from minutes to hours, and real-time data needs to be displayed in real-time, which is not appropriate for such a long time. By using the technical scheme of the embodiment of the invention, the user obtains the slice by adopting the dynamic map service for the first time, and the slice is slightly slower for the second time, so that the slice is directly obtained from the cache, the speed is very high, the access of millisecond level can be achieved, and the requirements of various map data can be met. The embodiment of the invention also solves the problem that the prior single map architecture cannot meet the requirement of current multi-source data integration by using a multi-source map service management scheme. In complex systems or multi-system integration, map services are widely available and distributed among multiple map servers, and there are different map services such as ArcGIS' MapServer service, OGC standard map service, online map service, and the like. By adopting the scheme, the multi-source map service is integrated and unified into the standardized map slicing service through technologies of built-in multi-parameter conversion rules, data source registration, layer automatic registration and the like, so that the compatibility problem of different interfaces is avoided, and the limit of access times of an online map to interfaces can be avoided to a certain extent due to the addition of a secondary cache. The standardized slice map service greatly reduces the complexity of front-end development.
And S106, returning the acquired map slices to the user.
Fig. 2 is a flowchart of a method for dynamically slicing and caching a multi-source map according to another embodiment of the present invention. As shown in fig. 2, the method includes a main program portion, for example, implemented by a service manager; the map slice second-level buffer management part aims at buffering slices into a memory and a file, and realizes quick response of access, for example, by a buffer manager; and a multi-source map service management section implemented by, for example, a multi-source map server.
And after the user accesses the service manager interface, the main program part acquires the slice from the memory buffer, returns the acquired slice to the user, and finishes the calling, otherwise, the main program part is the next step. And searching a slice file from the file, returning the acquired slice to the user, and calling to finish, or else, acquiring the dynamic slice through the multi-source map service management part, and forwarding the request without the slice to the map service through parameter conversion so as to acquire the slice map. The principle of dynamic slicing is that a user only checks whether slicing is performed when accessing the slicing, the sliced data is returned directly, slicing processing is performed when the slicing is not performed, and if the map data is updated, the sliced data is deleted. The dynamic slice acquisition step is that in the first step, the multi-source map service is acquired through the data source name, the working area or service name and the layer name. And a second step of acquiring a parameter conversion rule and converting the parameters of the slice into parameters of the map service. And thirdly, requesting a map service and acquiring slice pictures.
The map slice secondary cache management can comprise file directory, slice storage, cache management and cache event monitoring. And after the multi-source map server performs dynamic slicing to obtain the map slices, performing memory storage, and then initiating a slice cache new event. And the monitor responds to the monitored slice buffer newly-added event to store the slices in the buffer into slice files of the corresponding catalogue.
The slice file directory structure is shown in fig. 3. Comprising the following steps:
a first layer: the cache root directory is used for storing different cache files. The cache root directory name may be any name. When generating a cache, the cache name is input to specify.
A second layer: a data source name directory. The default name format is: main. If multi-source data is added, the name of the data source is used as the directory name.
Third layer: workplace name. The service name of arcgis corresponds to the workspace of the geoserver, and the class name of the online map.
Fourth layer: the map caches the directory. The directory name format is the layer name of the map.
Fifth layer: color scheme catalogs. The directory is not by default, and is named by the parameter name style when defined by the user.
Sixth layer: a time series catalog. The directory is not by default, and is named by the parameter name time when defined by the user.
Seventh layer: and (5) projecting the coordinate system catalog. The default name is EPSG_3857, named according to the user-defined projection coordinate system.
Eighth layer: different levels of cache directories. The hierarchical directory name is the number of layers set. All map slice files at level 1 are saved under the 1 folder.
Ninth layer: the picture file name is cached. The format is as follows: col_row. Wherein Row represents the line number index of the buffer picture divided by the buffer block, col represents the column number index of the buffer picture divided by the buffer block, and postfix is the extension of the buffer picture file. In the above figures, the name is 1_0.png, 0 is the row number, 1 is the column number, and png is the extension of the picture.
The memory cache is stored in a key-value mode, and the name of the key value is: datasource_service_layer_styles_time_crs_z_x_y. Wherein datasource is the data source name, service is the work area or service name, layer is the layer name, styles is the color matching name, time is the time series, crs is the projection coordinate system, z is the hierarchy, x is the column number, and y is the row number. The value is a picture of the map slice. The memory cache stores slices according to the LRU (Least recently used ) principle, which is to eliminate data according to historical access records of the slices, and the core idea is that "if the slices are accessed recently, the probability of being accessed is higher as well). This means that if a slice is accessed frequently, it needs to be hit quickly, whereas a slice that is accessed infrequently is eliminated within the capacity overrun limit.
The cache event monitoring is to monitor the new slice adding condition of the memory cache. When a new slice is added, a storage operation is initiated to a thread queue in response to an Event, when the thread is executed, slice pictures are obtained from a memory cache through slice attributes and slice main key values stored by Event parameters, then a directory address of the slice is obtained and created, and finally the slice is stored in a directory.
The goal of multi-source map service management is to integrate multi-source, decentralized third party map services into a unified map slicing service. The multi-source map service management module comprises data source management, layer management and parameter conversion rules. The data source can support a ArcGIS, geoServer map Server, a SuperMap Server and other map servers, internet map service platforms such as a hundred-degree map, a Goldmap, a Tian map and a Google map, and other map slicing service platforms such as GeoWebPache. The map server data source supports automatic acquisition of the layer list and registration to the layer management. The system is internally provided with a plurality of conversion rules, supports map services such as WMS, WMTS, TMS and ArcGIS MapServer, and the user can also customize the rules.
When the system is started, a multi-source map server is started, a registered map service is received to the server, and the registered information comprises a data source, a layer list, a parameter conversion rule and the like. And then when the slice is dynamically cut, the map service information is acquired through the data source name, the working area or service name and the layer name, wherein the map service information comprises the data source information, the layer information and the parameter conversion rule. And finally, the dynamic slice requests url in the layer information according to new parameters generated by the parameter conversion rule, and a slice map is obtained.
The embodiment of the invention also provides a multi-source map dynamic slicing and caching device which is applied to the service manager, and the device comprises:
the cache searching module is used for searching the map slice in the secondary cache according to the map slice access request of the user;
the multi-source map dynamic slicing module is used for carrying out dynamic slicing through a multi-source map server according to the service type of the map slice so as to obtain the map slice, and storing the map slice into a secondary cache; wherein the multi-source map server comprises a map service provided by a plurality of different map data sources;
and the output module is used for returning the acquired map slices to the user.
The specific process of each module in the multi-source map dynamic slicing and caching device provided by the embodiment of the present invention to realize the functions is the same as each step of the multi-source map dynamic slicing and caching method provided by the embodiment of the present invention, and will not be described in detail here.
In summary, the embodiment of the invention relates to a method for dynamically slicing and caching a multi-source map, which is applied to a service manager, and the method comprises the following steps: searching the map slice in the secondary cache according to the map slice access request of the user; dynamically slicing through a multi-source map server according to the service type of the map slice so as to obtain the map slice, and storing the map slice into a secondary cache; and returning the acquired map slices to the user. According to the technical scheme, the slices are stored in the cache and the file in a unified slice map mode, so that the map slice browsing speed can be greatly improved, and the map response time is accelerated; the map is sliced and cached in the memory and the file in real time by adopting a dynamic slice caching mode of the map, and when the map is accessed again, the map is directly obtained from the cache, so that the map rendering time is shortened, and the access efficiency is improved; and a set of parameter conversion rules from the slice map to the specific map service is established so as to register different map services to the multi-source map server, when the slice is called, the corresponding map service is acquired according to the slice layer name, map service parameters are generated by the preset parameter conversion rules, and then the map service is requested to acquire the slice, so that the different map services are integrated into the service of the slice map uniformly. Therefore, the problem of efficient map service of real-time, high-frequency and mass data and the problem of integration of multi-source and scattered third-party map services are solved.
It should be understood that the above discussion of any of the embodiments is exemplary only and is not intended to suggest that the scope of the invention (including the claims) is limited to these examples; combinations of features of the above embodiments or in different embodiments are also possible within the spirit of the invention, steps may be implemented in any order and there are many other variations of the different aspects of one or more embodiments of the invention described above which are not provided in detail for the sake of brevity. The above detailed description of the present invention is merely illustrative or explanatory of the principles of the invention and is not necessarily intended to limit the invention. Accordingly, any modification, equivalent replacement, improvement, etc. made without departing from the spirit and scope of the present invention should be included in the scope of the present invention. Furthermore, the appended claims are intended to cover all such changes and modifications that fall within the scope and boundary of the appended claims, or equivalents of such scope and boundary.

Claims (9)

1. A method for dynamically slicing and caching a multi-source map, which is applied to a service manager, the method comprising the following steps:
s102, searching the map slices in the secondary cache according to a map slice access request of a user, and executing a step S106 when the matched map slices are searched;
s104, dynamically slicing through a multi-source map server according to the service type of the map slice so as to obtain the map slice, and storing the map slice into a secondary cache; wherein the multi-source map server comprises a map service provided by a plurality of different map data sources;
and S106, returning the acquired map slices to the user.
2. The method of claim 1, wherein searching the map slice in the secondary cache comprises the steps of:
s1021, searching the map slice in the memory cache, and if the map slice is acquired, executing step S106;
s1022, searching the slice file for the map slice, and if the map slice is acquired, executing step S106.
3. The method of claim 2, wherein the slice file directory comprises: a first layer cache root directory, a second layer data source name directory, a third layer work area name, a fourth layer map cache directory, a fifth layer color scheme directory, a sixth layer time sequence directory, a seventh layer projection coordinate system directory, an eighth layer different layer cache directory, and a ninth layer cache picture file name.
4. The method of claim 2, wherein the memory cache stores map slices according to a least recently used principle.
5. The method according to claim 1, wherein the dynamic slicing is performed by the multi-source map server according to the service type to which the map slice belongs, comprising the steps of:
s1041, determining a corresponding data source and a map service type to which the data source belongs according to the name of the data source and the name parameter of the layer;
s1042, if the service type is network map WMS service, converting and calculating the slice parameters into bounding boxes of map slices as bbox parameters of the WMS according to the conversion relation between the map slice numbers and the longitudes and latitudes;
if the service type is map slice WMTS service, adopting WMTS slice rule;
if the service type is map slice TMS service, the TMS parameters need to overturn the y parameters;
if the service type is other map service, writing a script for generating required parameters by converting slice parameters according to the service parameter requirements, so as to generate other map service request parameters;
s1043, determining a multi-source map server according to the parameters and the data source, acquiring an address requested by the server, splicing the map service parameters, acquiring a corresponding map slice through http access, and caching the map slice to a designated directory to finish the map slice process.
6. The method of claim 5, wherein obtaining the corresponding multi-source map service based on the map slice request parameter includes obtaining the corresponding multi-source map service based on the data source name and the layer name of the map slice.
7. The method according to claim 1, wherein the step S104 further comprises:
and outputting a slice buffer newly-added event so that the buffer manager stores the slices in the buffer into slice files of the corresponding catalogue according to the monitored slice buffer newly-added event.
8. The method of any of claims 1-7, wherein the plurality of different map data sources provide a multi-source map service by registering with a multi-source map server; the registration information includes a data source, a layer list, and a parameter conversion rule.
9. A multi-source map dynamic slicing and caching apparatus for use with a service manager, the apparatus comprising:
the cache searching module is used for searching the map slice in the secondary cache according to the map slice access request of the user;
the multi-source map dynamic slicing module is used for carrying out dynamic slicing through a multi-source map server according to the service type of the map slice so as to obtain the map slice, and storing the map slice into a secondary cache; wherein the multi-source map server comprises a map service provided by a plurality of different map data sources;
and the output module is used for returning the acquired map slices to the user.
CN202310905453.8A 2023-07-21 2023-07-21 Multi-source map dynamic slicing and caching method and device Pending CN117033533A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310905453.8A CN117033533A (en) 2023-07-21 2023-07-21 Multi-source map dynamic slicing and caching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310905453.8A CN117033533A (en) 2023-07-21 2023-07-21 Multi-source map dynamic slicing and caching method and device

Publications (1)

Publication Number Publication Date
CN117033533A true CN117033533A (en) 2023-11-10

Family

ID=88640450

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310905453.8A Pending CN117033533A (en) 2023-07-21 2023-07-21 Multi-source map dynamic slicing and caching method and device

Country Status (1)

Country Link
CN (1) CN117033533A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468691A (en) * 2015-11-17 2016-04-06 江苏省基础地理信息中心 Multisource tile map acquiring method and device
CN111159322A (en) * 2019-12-17 2020-05-15 广西交通设计集团有限公司 Dynamic slicing and server side caching method for map
CN113656527A (en) * 2021-08-20 2021-11-16 广州市规划和自然资源自动化中心(广州市基础地理信息中心) Map resource processing method and device, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468691A (en) * 2015-11-17 2016-04-06 江苏省基础地理信息中心 Multisource tile map acquiring method and device
CN111159322A (en) * 2019-12-17 2020-05-15 广西交通设计集团有限公司 Dynamic slicing and server side caching method for map
CN113656527A (en) * 2021-08-20 2021-11-16 广州市规划和自然资源自动化中心(广州市基础地理信息中心) Map resource processing method and device, computer equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
IDESKTOP: "地图瓦片目录结构", Retrieved from the Internet <URL:https://help.supermap.com/iDesktop/zh/tutorial/MapTiles/MapCacheFolder> *
SURPASSLIANG: "Web地图服务规范(WMS、WMTS、TMS)简析", Retrieved from the Internet <URL:https://huaweicloud.csdn.net/638f1346dacf622b8df8eb4e.html> *
孙世友 等: "大地图 测绘地理信息大数据理论与实践", 30 September 2017, 中国环境出版社, pages: 162 - 163 *

Similar Documents

Publication Publication Date Title
US20240031568A1 (en) Transferring system for huge and high quality images on network and method thereof
CN111723221B (en) Mass remote sensing data processing method and system based on distributed architecture
US10922339B2 (en) Portable globe creation for a geographical information system
CN111930767B (en) Multilayer cache-based vector tile real-time slicing and updating method
WO2011106415A2 (en) Portable globe creation for a geographical information system
CN103955533B (en) A kind of page tree data acquisition device based on buffer queue and method
CN115827907B (en) Cross-cloud multi-source data cube discovery and integration method based on distributed memory
CN111914041A (en) Power grid map vector data providing method
CN111460012A (en) Spark-based meteorological historical station leather-following data visualization method and system
CN111611222A (en) Data dynamic processing method based on distributed storage
CN117033533A (en) Multi-source map dynamic slicing and caching method and device
CN112395453A (en) Self-adaptive distributed remote sensing image caching and retrieval method
Guo et al. An Effective tile caching mechanism of UAV remote sensing map based on hilbert coding index
Yu et al. Realtime remote sensing image publishing system based on COG technology
CN117632972B (en) Map tile aggregate release method and device, electronic equipment and storage medium
CN115861513A (en) Data rendering method and device, computer and readable storage medium
CN116383143A (en) Method and device for publishing two-dimensional and three-dimensional map service of huge city space mass data
CN117688194A (en) Vector slice graph management method based on Redis cache
CN113889199A (en) Search engine and search method based on compound
CN111930876A (en) Geographic information system engine
KR20020053977A (en) Method and System for Web Geographical Information to Service Geographical Information of The Large Scale Vector Form

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