CN113821580A - Tile map service method - Google Patents

Tile map service method Download PDF

Info

Publication number
CN113821580A
CN113821580A CN202111106056.1A CN202111106056A CN113821580A CN 113821580 A CN113821580 A CN 113821580A CN 202111106056 A CN202111106056 A CN 202111106056A CN 113821580 A CN113821580 A CN 113821580A
Authority
CN
China
Prior art keywords
user
tile map
tile
map service
user request
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
CN202111106056.1A
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.)
Chengdu Planning and Natural Resources Information Center
Original Assignee
Chengdu Land And Resources Information Center
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 Chengdu Land And Resources Information Center filed Critical Chengdu Land And Resources Information Center
Priority to CN202111106056.1A priority Critical patent/CN113821580A/en
Publication of CN113821580A publication Critical patent/CN113821580A/en
Pending legal-status Critical Current

Links

Images

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/90Details of database functions independent of the retrieved data types
    • G06F16/907Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/909Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using geographical or spatial information, e.g. location
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Remote Sensing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a tile map service method, which comprises the following steps: s1: capturing a user request by using a gateway interceptor, and matching the user request belonging to the tile map service request according to a map gateway rule; s2: and analyzing the user request belonging to the tile map service request, extracting the spatial range and the user information of the tile map, and completing the tile map service according to the spatial range and the user information of the tile map. The invention designs a tile map service gateway method based on regional application and user authorization, realizes tile map service authorization access on the premise of not changing the existing tile map service, and has flexible process and good compatibility and portability. By combining with a gateway technology, the information of the map server at the rear end is shielded, the data security is improved, and potential safety hazards such as unauthorized application and data leakage of the tile map service are solved.

Description

Tile map service method
Technical Field
The invention belongs to the technical field of tile maps, and particularly relates to a tile map service method.
Background
The tile map service is a standard map service for providing a standard map service for accessing a map on demand for a user according to a slicing map service specification of an Open Source geographic information Foundation (Open Source geographic Foundation, which is a global non-profit organization and aims to support global cooperation and establish and popularize high-quality spatial information Open Source software), so that the front-end access speed is higher, the consumption of a rear-end server is lower, and the user experience is better. In the existing tile map service, all users can use a global map, so that potential safety hazards such as unauthorized information application, data leakage and the like are caused. At present, two common solutions are available, namely, the tile map service is respectively and independently issued according to areas, and the existing tile map service technical implementation method is modified to develop the customized tile map service. However, the tile map service is independently published according to the region, a plurality of tile map services exist in the same service, user management and authority configuration are complex, more hard disk storage space is needed, and slicing work is multiplied and time is consumed; the customized tile map service requires professional personnel to make customized development according to different requirements, and is complex in technology, long in implementation period and high in cost, and is not beneficial to comprehensive popularization and application.
Disclosure of Invention
The invention aims to solve the potential safety hazard problems of unauthorized application, data leakage and the like in the conventional tile map technology, and provides a tile map service method.
The technical scheme of the invention is as follows: a tile map service method includes the steps of:
s1: capturing a user request by using a gateway interceptor, and matching the user request belonging to the tile map service request according to a map gateway rule;
s2: and analyzing the user request belonging to the tile map service request, extracting the spatial range and the user information of the tile map, and completing the tile map service according to the spatial range and the user information of the tile map.
Further, in step S1, the map gateway rule includes:
the user request address is used for matching the configured user request address with the actual user request address;
before a user request is forwarded to a target server, deleting a path of the user request address from a layer 1 directory to an Nth directory according to a hierarchical directory N to form a new request address, and combining the target server and a request path prefix to realize mutual isolation of the user request address and the target server address and protect information of the target server from being leaked;
the target server, namely before the user request is forwarded to the target server, the IP and the port requested by the user are replaced by the IP and the port of the target server;
requesting a path prefix, namely automatically adding the prefix of user configuration information into a user request before the user request is forwarded to a target server to form final tile map service request information;
determining the execution sequence of the map gateway rules;
and the regular unique identification is composed of a fixed identification code, a tile map type and an 8-digit number.
Further, step S2 includes the following sub-steps:
s21: judging whether a user acquires metadata information of the tile map service when loading the tile map service in a user request belonging to the tile map service request, if so, entering a step S24, otherwise, entering a step S22;
s22: analyzing the user request to obtain user request information, and extracting user authorization content according to the user request information;
s23: judging whether the user passes the authorization authentication or not according to the user request information and the user authorization content, if so, entering a step S24, otherwise, entering a step S27;
s24: according to the map gateway rule, forwarding the user request to a target server, acquiring metadata information of the tile map service, and caching the metadata information after matching the metadata information with a rule unique identifier in the map gateway rule;
s25: calculating the space range of the tile map according to the cached metadata information and the tile information requested by the user;
s26: judging whether the space range of the tile map is separated from administrative region information of the user by using a space superposition method, if so, entering a step S27, and otherwise, entering a step S28;
s27: returning blank tiles for the user, and ending the tile map service;
s28: and sending the user request to a tile map target server according to the user request information, and returning the map tile requested by the user.
Further, the tile information requested by the user includes a Row number Row of each tile of the tile map service, a column number Col of each tile, and a zoom Level of the tile map service;
the space range of the tile map comprises a minimum X coordinate minX, a minimum Y coordinate minY, a maximum X coordinate maxX and a maximum Y coordinate maxY, and the calculation formulas are respectively as follows:
minX=Col×256×Resolution+originX
minY=originY-(Row+1)×256×Resolution
maxX=(Col+1)×256×Resolution+originX
maxY=originY-Row×256×Resolution
wherein Resolution represents the Resolution of the tile map service, originX represents the origin X coordinate of the tile map, and originY represents the origin Y coordinate of the tile map.
The invention has the beneficial effects that:
(1) the invention designs a tile map service gateway method based on regional application and user authorization, realizes tile map service authorization access on the premise of not changing the existing tile map service, and has flexible process and good compatibility and portability.
(2) By combining with a gateway technology, the information of the map server at the rear end is shielded, the data security is improved, and potential safety hazards such as unauthorized application and data leakage of the tile map service are solved.
Drawings
FIG. 1 is a flow chart of a tile map service method;
FIG. 2 is a flow chart of the tile map service gateway model.
Detailed Description
The embodiments of the present invention will be further described with reference to the accompanying drawings.
Before describing specific embodiments of the present invention, in order to make the solution of the present invention more clear and complete, the definitions of the abbreviations and key terms appearing in the present invention will be explained first:
tile map service request: when using the map service, the user sends an Http request to the map server to obtain a picture in a certain range under a specific scale.
The space superposition method comprises the following steps: the method is a method known in the art, is mainly used for comprehensive analysis of multiple thematic layers, and is a traditional spatial analysis means determined by the regional and multilevel characteristics of the GIS.
As shown in fig. 1, the present invention provides a tile map service method, including the following steps:
s1: capturing a user request by using a gateway interceptor, and matching the user request belonging to the tile map service request according to a map gateway rule;
s2: and analyzing the user request belonging to the tile map service request, extracting the spatial range and the user information of the tile map, and completing the tile map service according to the spatial range and the user information of the tile map.
In this embodiment of the present invention, in step S1, the map gateway rule includes:
the user request address is used for matching the configured user request address with the actual user request address;
mapping a hierarchical directory, namely deleting a path of a user request address from a 1 st-layer directory to an Nth-layer directory according to the hierarchical directory N before a user request is forwarded to a target server to form a new request address, and combining the target server and a request path prefix to realize mutual isolation of the user request address and the target server address; the target server and the real tile map service are protected from being attacked and safe;
the target server, namely before the user request is forwarded to the target server, the IP and the port requested by the user are replaced by the IP and the port of the target server; the method and the system have the advantages that the information such as IP (Internet protocol), ports and the like of the real tile map server can be hidden for users, the tile map server can be protected from being attacked, the safety of the tile map server is ensured, and meanwhile, after the tile map server is expanded or migrated, only the configuration information of the target server needs to be modified without modifying programs by the users, so that the flexibility of the map gateway is improved;
requesting a path prefix, namely automatically adding the prefix of user configuration information into a user request before the user request is forwarded to a target server to form final tile map service request information; the information such as the name and the layer of the real tile map service of the user is hidden, so that the map service is further ensured not to be attacked and is safer;
determining the execution sequence of the map gateway rules;
the rule unique identification is composed of a fixed identification code, a tile map type and an 8-digit number; the middle forms a unique number of the map gateway service, such as MapGate _ arcgistriecache _00000001, with an underlined combination.
In the embodiment of the present invention, step S2 includes the following sub-steps:
s21: judging whether a user acquires metadata information of the tile map service when loading the tile map service in a user request belonging to the tile map service request, if so, entering a step S24, otherwise, entering a step S22;
s22: analyzing the user request to obtain user request information, and extracting user authorization content according to the user request information;
s23: judging whether the user passes the authorization authentication or not according to the user request information and the user authorization content, if so, entering a step S24, otherwise, entering a step S27;
s24: according to the map gateway rule, forwarding the user request to a tile map target server, acquiring metadata information of the tile map service, and caching the metadata information after matching the metadata information with a rule unique identifier in the map gateway rule;
s25: calculating the space range of the tile map according to the cached metadata information and the tile information requested by the user;
s26: judging whether the space range of the tile map is separated from administrative region information of the user by using a space superposition method, if so, entering a step S27, and otherwise, entering a step S28;
s27: returning blank tiles for the user, and ending the tile map service; blank tiles are typically fixed-size transparent png pictures, such as 256 × 256 pixel png pictures; for each request, returning a blank tile; a blank tile refers to a tile that a user has no authority or data for;
s28: and sending the user request to a tile map target server according to the user request information, and returning the map tile requested by the user.
The user requests information: such as token, IP, tile row number, map zoom level, and tile column number.
The authorization content of the user: such as token validity check, user identification, administrative region to which the user belongs, TMS identification, whether IP is limited and current limiting request and other information.
The authorization authentication means whether the user has the right to use the map under the request, including whether the user can access the TMS, whether the token is legal, whether the IP is limited, whether the request is limited, and the like.
In the embodiment of the invention, the tile information requested by the user comprises the Row number Row of each tile of the tile map service, the column number Col of each tile and the zoom Level of the tile map service;
the space range of the tile map comprises a minimum X coordinate minX, a minimum Y coordinate minY, a maximum X coordinate maxX and a maximum Y coordinate maxY, and the calculation formulas are respectively as follows:
minX=Col×256×Resolution+originX
minY=originY-(Row+1)×256×Resolution
maxX=(Col+1)×256×Resolution+originX
maxY=originY-Row×256×Resolution
wherein Resolution represents the Resolution of the tile map service, originX represents the origin X coordinate of the tile map, and originY represents the origin Y coordinate of the tile map.
As shown in fig. 2, the tile map service gateway model applied by region, authorized by user, and configured flexibly has the following specific working flow:
s01: after the interceptor captures the user request, the map gateway judges whether the user request belongs to the TMS request according to the rule of the map gateway, and if the matching fails, the subsequent operation is executed according to the normal gateway service logic; otherwise, entering a map gateway model.
The map gateway rule is composed of a user request address, a mapping hierarchical directory, a target server, a request path prefix, a rule execution sequence and a rule unique identifier 6. The map gateway rules are shown in table 1.
TABLE 1
Figure BDA0003272342650000071
S02: and judging whether the user request is to acquire the metadata information of the TMS, if so, turning to S03, and otherwise, turning to S04. The TMS metadata information means that when a user loads a TMS map, the user needs to acquire the TMS metadata information first, so that the front-end map application can normally load and display the TMS map and calculate the space range of tiles requested by the user each time.
S03: and forwarding the user request to a target TMS server according to the map gateway rule, and returning the TMS metadata information to the user after acquiring the TMS metadata information. In order to reduce the times of invalid metadata requests and improve the efficiency, after TMS metadata is successfully acquired, a caching technology is adopted to cache the metadata information after the metadata information is matched with the unique identifier of the map gateway rule.
S04: and analyzing the user request, verifying and extracting user request information, such as token, IP, tile row number, map zooming level, tile column number and the like.
S04: and extracting user information and authorization content under the user according to the analyzed user request information, such as token validity check, user identification, administrative region to which the user belongs, TMS identification, whether IP is limited, whether the request is limited and the like.
S05: and judging whether the user has the authority to use the map under the request according to the user information and the authorization content thereof, wherein the authority includes whether the user can access the TMS, whether the token is legal, whether the IP is limited, whether the request is limited, and the like. If the authorization authentication fails, go to S07; otherwise go to S08.
S07: the blank tile is returned. Typically a fixed size transparent png picture, such as a 256 by 256 pixel png picture.
S08: and extracting TMS metadata information according to the unique identifier of the map gateway rule, and if the TMS metadata information is not found, acquiring the TMS map metadata information according to the map gateway rule.
S09: and calculating the space range of the map tile according to TMS metadata information, the map zoom level requested by the user and the tile row and column number.
S10: judging the spatial relationship between the tile spatial range requested by the user and the administrative district to which the user belongs by adopting a spatial superposition method according to the spatial range of the tile requested by the user and the information of the administrative district to which the user belongs, and if the tile spatial range requested by the user is separated from the administrative district to which the user belongs, turning to S07; otherwise, go to S11.
S11: and forwarding the user request to a TMS target server according to the user request information, and returning the map tile requested by the user.
The working principle and the process of the invention are as follows: the invention designs a tile map service gateway method which is applied according to regions, authorized according to users and flexibly configured by applying a gateway technology on the premise of not changing the existing tile map service. The method specifically comprises the following steps: after the user sends out the request, the gateway automatically matches according to the set user request rule, and after the rule matching is successful, the gateway automatically forwards the user request to the specified server, and returns the server execution result to the user. The map gateway is used for capturing the user request by adopting an interception technology after the gateway is matched with the user request, judging whether the request belongs to a tile map service request or not according to the rule of the map gateway, and entering the map gateway method if the request belongs to the tile map service request.
The invention has the beneficial effects that:
(1) the invention designs a tile map service gateway method based on regional application and user authorization, realizes tile map service authorization access on the premise of not changing the existing tile map service, and has flexible process and good compatibility and portability.
(2) By combining with a gateway technology, the information of the map server at the rear end is shielded, the data security is improved, and potential safety hazards such as unauthorized application and data leakage of the tile map service are solved.
It will be appreciated by those of ordinary skill in the art that the embodiments described herein are intended to assist the reader in understanding the principles of the invention and are to be construed as being without limitation to such specifically recited embodiments and examples. Those skilled in the art can make various other specific changes and combinations based on the teachings of the present invention without departing from the spirit of the invention, and these changes and combinations are within the scope of the invention.

Claims (4)

1. A tile map service method, comprising the steps of:
s1: capturing a user request by using a gateway interceptor, and matching the user request belonging to the tile map service request according to a map gateway rule;
s2: and analyzing the user request belonging to the tile map service request, extracting the spatial range and the user information of the tile map, and completing the tile map service according to the spatial range and the user information of the tile map.
2. The tile map service method of claim 1, wherein in step S1, the map gateway rules include:
the user request address is used for matching the configured user request address with the actual user request address;
mapping a hierarchical directory, namely deleting a path of a user request address from a 1 st-layer directory to an Nth-layer directory according to the hierarchical directory N before a user request is forwarded to a target server to form a new request address, and combining the target server and a request path prefix to realize mutual isolation of the user request address and the target server address;
the target server, namely before the user request is forwarded to the target server, the IP and the port requested by the user are replaced by the IP and the port of the target server;
requesting a path prefix, namely automatically adding the prefix of user configuration information into a user request before the user request is forwarded to a target server to form final tile map service request information;
determining the execution sequence of the map gateway rules;
and the regular unique identification is composed of a fixed identification code, a tile map type and an 8-digit number.
3. The tile map service method according to claim 1, wherein the step S2 includes the sub-steps of:
s21: judging whether a user acquires metadata information of the tile map service when loading the tile map service in a user request belonging to the tile map service request, if so, entering a step S24, otherwise, entering a step S22;
s22: analyzing the user request to obtain user request information, and extracting user authorization content according to the user request information;
s23: judging whether the user passes the authorization authentication or not according to the user request information and the user authorization content, if so, entering a step S24, otherwise, entering a step S27;
s24: according to the map gateway rule, forwarding the user request to a target server, acquiring metadata information of the tile map service, and caching the metadata information after matching the metadata information with a rule unique identifier in the map gateway rule;
s25: calculating the space range of the tile map according to the cached metadata information and the tile information requested by the user;
s26: judging whether the space range of the tile map is separated from administrative region information of the user by using a space superposition method, if so, entering a step S27, and otherwise, entering a step S28;
s27: returning blank tiles for the user, and ending the tile map service;
s28: and sending the user request to a tile map target server according to the user request information, and returning the map tile requested by the user.
4. The tile map service method of claim 3, wherein in the step S25, the tile information requested by the user includes a Row number Row of each tile of the tile map service, a column number Col of each tile, and a zoom Level of the tile map service;
the space range of the tile map comprises a minimum X coordinate minX, a minimum Y coordinate minY, a maximum X coordinate maxX and a maximum Y coordinate maxY, and the calculation formulas are respectively as follows:
minX=Col×256×Resolution+originX
minY=originY-(Row+1)×256×Resolution
maxX=(Col+1)×256×Resolution+originX
maxY=originY-Row×256×Regolution
wherein Resolution represents the Resolution of the tile map service, originX represents the origin X coordinate of the tile map, and originY represents the origin Y coordinate of the tile map.
CN202111106056.1A 2021-09-22 2021-09-22 Tile map service method Pending CN113821580A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111106056.1A CN113821580A (en) 2021-09-22 2021-09-22 Tile map service method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111106056.1A CN113821580A (en) 2021-09-22 2021-09-22 Tile map service method

Publications (1)

Publication Number Publication Date
CN113821580A true CN113821580A (en) 2021-12-21

Family

ID=78915095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111106056.1A Pending CN113821580A (en) 2021-09-22 2021-09-22 Tile map service method

Country Status (1)

Country Link
CN (1) CN113821580A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115061989A (en) * 2022-06-07 2022-09-16 云南省地矿测绘院有限公司 GIS data sharing method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741769A (en) * 2008-11-25 2010-06-16 华为终端有限公司 Redirection method for gateway and webpage
CN103001697A (en) * 2011-09-08 2013-03-27 华为数字技术(成都)有限公司 Communication method, system and device applied to scene of FCoE (fiber channel over Ethernet)
CN111666365A (en) * 2020-05-27 2020-09-15 北京地林伟业科技股份有限公司 Method for rapidly filtering and displaying electronic map service according to authorized area

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741769A (en) * 2008-11-25 2010-06-16 华为终端有限公司 Redirection method for gateway and webpage
CN103001697A (en) * 2011-09-08 2013-03-27 华为数字技术(成都)有限公司 Communication method, system and device applied to scene of FCoE (fiber channel over Ethernet)
CN111666365A (en) * 2020-05-27 2020-09-15 北京地林伟业科技股份有限公司 Method for rapidly filtering and displaying electronic map service according to authorized area

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈思 等: "地图服务引擎中虚拟电子围栏的实现方法" *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115061989A (en) * 2022-06-07 2022-09-16 云南省地矿测绘院有限公司 GIS data sharing method and system

Similar Documents

Publication Publication Date Title
US9542573B2 (en) Privacy server for protecting personally identifiable information
CN111698228B (en) System access authority granting method, device, server and storage medium
CN108064444B (en) Domain name resolution system based on block chain
KR101720160B1 (en) Authenticated database connectivity for unattended applications
US8032930B2 (en) Segregating anonymous access to dynamic content on a web server, with cached logons
CN107292183A (en) A kind of data processing method and equipment
CN108370391A (en) Shared multi-tenant domain name system (DNS) server for virtual network
US20100169479A1 (en) Apparatus and method for extracting user information using client-based script
JP5974079B2 (en) Global traffic management using changed hostnames
CN109690547A (en) For detecting the system and method cheated online
JP6543743B1 (en) Management program
US7761552B2 (en) Root node for integrating NAS of different user name spaces
CN105338016B (en) Data high-speed caching method and device and resource request response method and device
JP2021527858A (en) Location-based access to access-controlled resources
CN105516059A (en) Resource access control method and device
JPWO2016043120A1 (en) Information processing apparatus and cooperative distributed storage system
CN111367945A (en) Report query method, device, equipment and computer readable storage medium
CN113821580A (en) Tile map service method
CN104767678B (en) The method for routing realized in the content based on contents attribute in name in heart network
CN111985906A (en) Remote office system, method, device and storage medium
CN102685122A (en) Software protection method based on cloud server
US20220014357A1 (en) Secure data storage for anonymized contact tracing
CN104717208A (en) Method, equipment and system for fixing electronic data in real time by means of terminal feature information
Aulya et al. An authenticated passengers based on dynamic QR Code for Bandung Smart Transportation Systems
US20090192993A1 (en) Method and system for setting domain name and network device thereof

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
TA01 Transfer of patent application right

Effective date of registration: 20221110

Address after: No. 69, shuxiu West Road, Chengdu, Sichuan 610000

Applicant after: Chengdu Planning and Natural Resources Information Center

Address before: No. 69, shuxiu West Road, Chengdu, Sichuan 610000

Applicant before: Chengdu land and Resources Information Center

TA01 Transfer of patent application right