A method and device for controlling spatial data with a custom range

By establishing an association between permission level information and permission range coordinates, the problems of difficulty in permission control and data fragmentation in existing technologies are solved, efficient spatial data management and control is achieved, and data production and maintenance costs are reduced.

CN114238935BActive Publication Date: 2025-09-16SHANGHAI SHUHUI SYST TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111320529.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-09
Publication Date
2025-09-16
Estimated Expiration
2041-11-09

AI Technical Summary

Technical Problem

In existing technologies, it is difficult to control permissions through the token mechanism, client maintenance is inconvenient, and the field screening method increases the cost of data production, updating and maintenance. At the same time, dividing data by administrative regions leads to fragmentation and redundancy.

Method used

Establish an association between permission level information and permission range coordinates, pre-publish a custom range map service through the gateway service, determine the request type and assign the target permission processor based on the permission level information, obtain the target spatial data within the permission range, and avoid the token mechanism and field screening.

Benefits of technology

It achieves efficient management and control of spatial data, reduces the workload of client maintenance and updates, avoids data fragmentation and redundancy, and reduces the cost of data production, updating and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114238935B_ABST
    Figure CN114238935B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for controlling spatial data within a user-defined range, establishing a first association relationship between permission level information and permission range coordinates, establishing a second association relationship between users and permission level information, and obtaining a request format of the request when a target user requests a spatial data map service; determining a request type based on the request format, assigning a target permission processor based on the request type, and obtaining target spatial data within the permission range corresponding to the request based on the target permission processor and the second association relationship. The above process realizes the control of spatial data by establishing an association relationship between permission level information and users and permission range coordinates, no longer using a token mechanism and field screening to control permissions, and no longer requiring segmentation of slice services and image data, thereby avoiding the inconvenience of client maintenance and token update, data fragmentation, and redundancy, and reducing the cost of data production, update, and maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method and device for controlling spatial data within a user-defined range. Background Art

[0002] In the process of planning and informatization construction, GIS systems pay more and more attention to the security and permission control of spatial data and services. Currently, the security control of spatial data is usually carried out from two dimensions:

[0003] (1) Sharing spatial data in the form of map services often involves sensitive data, and it is not desirable for the service to be accessible and used by everyone;

[0004] (2) After the service is shared, user permissions need to be controlled according to administrative units (spatial scope). For example, users of the municipal bureau can access data for the entire city, users of the district bureau can only access data within the district, and users of streets and towns can only use data within the street and town.

[0005] For the first requirement, although permissions can be controlled through the token mechanism, it is difficult for the application system to distinguish different user roles, and it is also inconvenient for the client to maintain and update tokens. The second requirement is more complicated. One method is to add an administrative district field to the data and control it through field filtering, which greatly increases the cost of data production, updating, and maintenance. At the same time, it is powerless for slicing services, image data, etc. If the data is divided according to administrative districts, it will cause data fragmentation and redundancy. Summary of the Invention

[0006] In view of this, the present invention provides a method and device for controlling spatial data with a custom range, which is used to solve the problem of controlling permissions through a token mechanism in the existing technology. However, it is difficult for the application system to distinguish different user roles, and it is also inconvenient for the client to maintain and update tokens; or by adding administrative district fields to the data and controlling through field screening, which greatly increases the cost of data production, updating, and maintenance. At the same time, it is powerless for slicing services, image data, etc. If the data is divided according to administrative districts, it will cause data fragmentation and redundancy. The specific plan is as follows:

[0007] A method for managing spatial data using a custom range is applied to a gateway service, pre-publishing a custom range map service based on permission level information, and establishing a first association between the permission level information and permission range coordinates, wherein the custom range map service includes at least one permission range coordinate. The method includes:

[0008] Establishing a second association between the user and permission level information, wherein the permission level information includes: permission level and permission code;

[0009] When receiving a target user's request for a spatial data map service, obtaining a request format of the request;

[0010] Based on the request format, the request type is determined, a target permission processor is allocated based on the request type, and target spatial data within the permission range corresponding to the request is obtained based on the target permission processor and the second association relationship, wherein the target permission processor is at least one of a slice map service permission processor, a dynamic map service permission processor, a query data service permission processor, and a layer request service permission processor.

[0011] The above method, optionally, when the target permission processor is the slice map service permission processor, obtaining the target spatial data corresponding to the request based on the target permission processor and the second association relationship includes:

[0012] Determining the permission level information based on the second association relationship;

[0013] intercepting metadata information and an original image in the request and calculating a spatial range of the original image, wherein the metadata information corresponds to the spatial data map service;

[0014] Determine an authority coordinate range based on the first association relationship and the authority level information, and determine an intersection coordinate range of the spatial range and the authority coordinate range;

[0015] Calculating relative screen coordinates based on the permission coordinate range and the intersection coordinate range;

[0016] Target metadata information corresponding to the original image is acquired based on the metadata information, and the original image is intercepted based on the target metadata information and the relative screen coordinates to obtain a result image.

[0017] The above method, optionally, when the target permission processor is a dynamic map service permission processor, obtaining the target spatial data corresponding to the request based on the target permission processor and the second association relationship includes:

[0018] Determining the permission level information based on the second association relationship;

[0019] intercepting metadata information, an original image, and a spatial range of the original image in the request, wherein the metadata information corresponds to the spatial data map service;

[0020] Determining an authority coordinate range based on the first association relationship and the authority level information, and determining an intersection coordinate range based on a topological relationship between the spatial range and the authority coordinate range;

[0021] Calculating relative screen coordinates based on the spatial range and size information of the original image;

[0022] The original image is captured based on the relative screen coordinates and the metadata information to obtain a result image.

[0023] Optionally, in the above method, when the target permission processor is a query data service permission processor, obtaining target spatial data corresponding to the request based on the target permission processor and the second association relationship includes:

[0024] Determining the permission level information based on the second association relationship;

[0025] intercepting metadata information and request query scope in the request;

[0026] Determining a permission coordinate range based on the first association relationship and the permission level information, and determining an intersection coordinate range based on a topological relationship between the request query range and the permission coordinate range;

[0027] The intersection coordinate range is used as a request parameter to request the spatial data map service to obtain target data within the user's authority range.

[0028] Optionally, in the above method, when the target permission processor is a layer request service permission processor, obtaining target spatial data corresponding to the request based on the target permission processor and the second association relationship includes:

[0029] Determining the permission level information based on the second association relationship;

[0030] intercepting metadata information in the request, and obtaining a map range and a full map range based on the metadata information;

[0031] Determine an authority coordinate range based on the first association relationship and the authority level information, and determine the map range, the intersection map range of the full map range and the authority coordinate range, and the intersection full map range;

[0032] Result data is determined based on the intersection map extent and the intersection full map extent.

[0033] A device for customizing spatial data management and control, applied to a gateway service, pre-publishing a custom range map service based on permission level information, and establishing a first association between the permission level information and permission range coordinates, wherein the custom range map service includes at least one permission range coordinate. The device includes:

[0034] An establishing module, configured to establish a second association between the user and permission level information, wherein the permission level information includes: permission level and permission code;

[0035] An acquisition module, configured to acquire a request format of a spatial data map service request received from a target user;

[0036] A determination and acquisition module is used to determine the request type based on the request format, allocate a target permission processor based on the request type, and obtain target spatial data within the permission range corresponding to the request based on the target permission processor and the second association relationship, wherein the target permission processor is at least one of a slice map service permission processor, a dynamic map service permission processor, a query data service permission processor, and a layer request service permission processor.

[0037] In the above-mentioned device, optionally, when the target permission processor is the slice map service permission processor, the determination and acquisition module includes:

[0038] a first level information determining unit, configured to determine the permission level information based on the second association relationship;

[0039] a first interception unit, configured to intercept metadata information and an original image in the request and simultaneously calculate a spatial range of the original image, wherein the metadata information corresponds to the spatial data map service;

[0040] a first coordinate range determining unit, configured to determine an authority coordinate range based on the first association relationship and the authority level information, and determine an intersection coordinate range of the spatial range and the authority coordinate range;

[0041] a first calculation unit, configured to calculate relative screen coordinates based on the permission coordinate range and the intersection coordinate range;

[0042] The first interception unit is configured to obtain target metadata information corresponding to the original image based on the metadata information, and intercept the original image based on the target metadata information and the relative screen coordinates to obtain a result image.

[0043] In the above-mentioned device, optionally, when the target permission processor is a dynamic map service permission processor, the determination and acquisition module includes:

[0044] a second level information determining unit, configured to determine the permission level information based on the second association relationship;

[0045] a second interception unit, configured to intercept metadata information, an original image, and a spatial range of the original image in the request, wherein the metadata information corresponds to the spatial data map service;

[0046] a second coordinate range determining unit, configured to determine an authority coordinate range based on the first association relationship and the authority level information, and determine an intersection coordinate range based on a topological relationship between the spatial range and the authority coordinate range;

[0047] a second calculation unit, configured to calculate relative screen coordinates based on the spatial range and size information of the original image;

[0048] The second interception unit is configured to intercept the original image based on the relative screen coordinates and the metadata information to obtain a result image.

[0049] In the above-mentioned device, optionally, when the target permission processor is a query data service permission processor, the determination and acquisition module includes:

[0050] a third level information determining unit, configured to determine the permission level information based on the second association relationship;

[0051] a third interception unit, configured to intercept metadata information and a request query scope in the request;

[0052] a third coordinate range determining unit, configured to determine a permission coordinate range based on the first association relationship and the permission level information, and determine an intersection coordinate range based on a topological relationship between the request query range and the permission coordinate range;

[0053] The first result data determining unit is configured to use the intersection coordinate range as a request parameter to request the spatial data map service and obtain target data within a user authority range.

[0054] In the above-mentioned device, optionally, when the target permission processor is a layer request service permission processor, the determination and acquisition module includes:

[0055] a fourth level information determining unit, configured to determine the permission level information based on the second association relationship;

[0056] a fourth interception unit, configured to intercept metadata information in the request, and obtain a map range and a full map range based on the metadata information;

[0057] a fourth coordinate range determining unit, configured to determine an authority coordinate range based on the first association relationship and the authority level information, and determine a map range and an intersection full map range of the map range, the full map range, and the authority coordinate range;

[0058] The second result data determining unit is used to determine result data based on the intersection map range and the intersection full map range.

[0059] Compared with the prior art, the present invention has the following advantages:

[0060] The present invention discloses a method and device for controlling spatial data within a user-defined range, establishing a first association relationship between permission level information and permission range coordinates, including: establishing a second association relationship between a user and permission level information, and obtaining a request format of the request when a target user requests a spatial data map service; determining a request type based on the request format, allocating a target permission processor based on the request type, and obtaining target spatial data within the permission range corresponding to the request based on the target permission processor and the second association relationship. The above process realizes the control of spatial data by establishing an association relationship between permission level information and user and permission range coordinates, no longer using a token mechanism and field screening to control permissions, and no longer requiring segmentation of slice services and image data, thereby avoiding the inconvenience of client maintenance and token update, data fragmentation, and redundancy, thereby reducing the cost of data production, update, and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0062] Figure 1 A flow chart of a method for controlling spatial data within a custom range disclosed in an embodiment of the present invention;

[0063] Figure 2 This is a structural block diagram of a device for customizing range management and control of spatial data provided by the present invention. DETAILED DESCRIPTION

[0064] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0065] The present invention discloses a method and device for controlling spatial data within a custom range, which is applied to the control of spatial data in a Geographic Information System (GIS). Currently, spatial data is usually controlled from two dimensions:

[0066] (1) Sharing spatial data in the form of map services often involves sensitive data, so it is not desirable for the service to be accessible and used by everyone;

[0067] (2) After the service is shared, user permissions need to be controlled according to administrative units (spatial scope). For example, users of the municipal bureau can access data for the entire city, users of the district bureau can only access data within the district, and users of streets and towns can only use data within the street and town.

[0068] For the first requirement, although permissions can be controlled through the token mechanism, it is difficult for the application system to distinguish different user roles, and it is also inconvenient for the client to maintain and update tokens. The second requirement is more complicated. One method is to add an administrative district field to the data and control it through field filtering. This greatly increases the cost of data production, updating, and maintenance. At the same time, it is powerless for slicing services, image data, etc. If the data is divided according to administrative districts, it will cause data fragmentation and redundancy.

[0069] In response to the above problems, the present invention proposes a method for customizing the range of spatial data management. The method is located between the GIS server and the client, and matches user permissions with resources to ensure that users can only obtain authorized spatial data each time they request. The method is applied to the gateway service, and a custom range map service is pre-published based on the permission level information. The custom range map service establishes a first association between the permission level information and the permission range coordinates, wherein the custom range map service includes at least one permission range coordinate. The execution process of the method is as follows: Figure 1 As shown, the steps include:

[0070] S101: Establish a second association between a user and permission level information, wherein the permission level information includes: permission level and permission code;

[0071] In an embodiment of the present invention, a first association relationship is established between the permission level information and the permission range coordinates, wherein the permission range coordinates are used to limit the area matching the permission level information, and the area corresponds to the spatial data. Furthermore, a second association relationship is established between the permission level information and the corresponding user to ensure that there is an area matching each user, wherein the permission level information includes: permission level and permission code, wherein the permission level can be provincial authority, municipal authority or district authority, etc., and the permission code can be the code of a specific province, city or district.

[0072] S102: upon receiving a request from a target user for a spatial data map service, obtaining a request format of the request;

[0073] In an embodiment of the present invention, when a target user requests a spatial data map service, a request format of the request is obtained, wherein the request format can be obtained by a preset identifier or other preferred methods.

[0074] S103. Determine the request type based on the request format, assign a target permission processor based on the request type, and obtain target spatial data within the permission range corresponding to the request based on the target permission processor and the second association relationship, wherein the target permission processor is at least one of a slice map service permission processor, a dynamic map service permission processor, a query data service permission processor, and a layer request service permission processor.

[0075] In an embodiment of the present invention, a request type is pre-assigned to each request format. Preferably, each request type corresponds to a target permission processor, wherein the request types include: slice map service request, dynamic map service request, query data service request and layer service request. Preferably, the slice map service request corresponds to the slice map service permission processor, the dynamic map service corresponds to the dynamic map service permission processor, the query data service corresponds to the query data service permission processor, and the layer service request corresponds to the layer request service permission processor.

[0076] Furthermore, target spatial data corresponding to the request is obtained based on the target permission processor and the second association relationship, wherein the target permission processor is at least one of a slice map service permission processor, a dynamic map service permission processor, a query data service permission processor, and a layer request service permission processor.

[0077] The present invention discloses a method for controlling spatial data within a custom range, establishing a first association relationship between permission level information and permission range coordinates, including: establishing a second association relationship between a user and permission level information, and obtaining a request format of the request when a target user requests a spatial data map service; determining a request type based on the request format, allocating a target permission processor based on the request type, and obtaining target spatial data within the permission range corresponding to the request based on the target permission processor and the second association relationship. The above process realizes the control of spatial data by establishing an association relationship between permission level information and user and permission range coordinates, no longer using a token mechanism and field screening to control permissions, and no longer requiring segmentation of slice services and image data, thereby avoiding the inconvenience of client maintenance and token update, data fragmentation, and redundancy, thereby reducing the cost of data production, update, and maintenance.

[0078] In the embodiment of the present invention, after the gateway service intercepts the map service request for permission information, it first obtains the permission range from the published custom range map service according to the permission information, and then performs different processing according to the content of the request. The specific processing process is as follows:

[0079] (1) If the result of the map service request is an image, forward the request to obtain the image, and then process the image content according to the permission range coordinates, retaining only the content within the permission range;

[0080] (2) If the result of the map service request is to query data, add the permission range condition to the request parameters to filter out the data outside the permission range;

[0081] (3) If it is only the metadata information of the map service, no processing will be done;

[0082] In an embodiment of the present invention, when the target permission processor is the slice map service permission processor, the processing flow for obtaining the target spatial data corresponding to the request based on the target permission processor and the second association relationship is as follows:

[0083] 1.1 Determining permission level information matching the target user based on the second association relationship;

[0084] 1.2 Intercept the metadata information and original image in the request and calculate the spatial extent of the original image. The metadata information corresponds to the custom range map service and is obtained based on the metadata URL in the request. The Redis memory database is searched for metadata information for the service. If not, the service metadata information is requested and stored in Redis. The metadata information includes: service origin, number of rows and columns, and slice level information of the map service.

[0085] 1.3 Obtain the permission coordinate range from the published permission service based on the permission level information obtained in 1.1;

[0086] 1.4 Forward the map service request intercepted in 1.2 and obtain the requested original image and the spatial range of the original image;

[0087] 1.5 Determine the topological relationship between the spatial range of the original image and the authorized coordinate range. If there is no spatial intersection, return a blank image. Otherwise, proceed to the following steps based on the obtained intersection coordinate range. The topological relationship is determined as follows:

[0088] Based on the spatial range of the original image and the permission coordinate range, that is, the custom range (with a coordinate system), the spatial topological relationship can be determined through the coordinates.

[0089] 1.6 Searching for metadata information of the original image level currently requested from the permission level information obtained in 1.2, wherein the metadata information includes: slice level, resolution, and scale;

[0090] 1.7 Calculate the permission range coordinates from the intersection coordinate range obtained in 1.3 and 1.5. The permission range coordinates are the relative screen coordinates of the lower left corner of each original image. The specific calculation process is as follows:

[0091] Based on the coordinate range (x range, y range) of the image, and the width and length of the image, the conversion relationship between screen pixels and geographic coordinates is calculated. The screen coordinates can be calculated by multiplying this conversion relationship with the coordinates.

[0092] 1.8 uses the screen range corresponding to the target metadata information calculated in 1.6 to capture the original image obtained in 1.4, and directly returns the final result image. The capture process can be directly captured by calling a dedicated image processing interface.

[0093] In an embodiment of the present invention, when the target permission processor is a dynamic map service permission processor, the processing flow for obtaining the target spatial data corresponding to the request based on the target permission processor and the second association relationship is as follows:

[0094] 2.1 Determining permission level information matching the target user based on the second association relationship;

[0095] 2.2 Intercept the metadata information, original image, and spatial extent of the original image in the request, wherein the metadata information corresponds to the spatial data map service and is obtained based on the metadata URL in the request. Check whether the metadata information of the service exists in the Redis memory library. If not, request the service metadata information and store it in Redis. The metadata information includes: service origin, number of rows and columns, and slice level information of the map service. The original image is obtained based on the metadata URL.

[0096] 2.3 Determine the permission coordinate range based on the first association relationship and the permission level information in 2.1;

[0097] 2.4 Obtain the topological relationship between the spatial range and the authority coordinate range. If there is no spatial intersection, return a blank image. Otherwise, continue with the following steps based on the obtained intersection coordinate range. The processing process of the topological relationship is the same as that in 1.5 and will not be repeated here.

[0098] 2.5 Based on the spatial range obtained in 2.2 and the length and width of the image obtained in 2.2, the authority range coordinates are calculated based on the above information for the relative screen coordinates of each lower left corner. The calculation process of the relative screen coordinates is the same as the processing process in 1.7 and will not be repeated here.

[0099] 2.6 Based on the relative screen coordinates and the metadata information, the original image is intercepted to obtain a result image, and the result image is directly returned. The interception process can be directly intercepted by calling a special image processing interface.

[0100] In an embodiment of the present invention, when the target permission processor is a query data service permission processor, the processing flow for obtaining the target spatial data corresponding to the request based on the target permission processor and the second association relationship is as follows:

[0101] 3.1 Determining permission level information matching the target user based on the second association relationship;

[0102] 3.2 Intercept the metadata information and query scope in the request, where the metadata information is obtained based on the metadata URL in the request, and search the Redis memory library to see if the metadata information of the service exists. If not, request the service metadata information and store it in Redis. The metadata information includes: service origin, number of rows and columns, and slice level information of the map service;

[0103] 3.3 Determine the permission coordinate range based on the first association relationship and the permission level information in 3.1;

[0104] 3.4 If the requested query range obtained in 3.2 is not empty, the intersection of the requested query range and the authority coordinate range in 3.3 is used as the intersection coordinate range; if the requested query range is empty, the authority coordinate range is used as the intersection coordinate range;

[0105] 3.5 Add the intersection coordinate range obtained in 3.4 to the original request as a new request, request the spatial data map service, obtain the target data within the user's permission range, and return the obtained result directly.

[0106] In an embodiment of the present invention, when the target permission processor is a layer request service permission processor, the processing flow of obtaining target spatial data corresponding to the request based on the target permission processor and the second association relationship includes:

[0107] 4.1 Determining permission level information matching the target user based on the second association relationship;

[0108] 4.2 Intercept the metadata information in the request and obtain the map extent and full map extent based on the metadata information. The metadata information is obtained based on the metadata URL in the request. The Redis memory database is searched for metadata information of the service. If not, the service metadata information is requested and stored in Redis. The metadata information includes: service origin, number of rows and columns, and tile level information of the map service.

[0109] 4.3 Determine the permission coordinate range based on the first association relationship and the permission level information, and determine the map range, the intersection map range of the full map range and the permission coordinate range, and the intersection full map range;

[0110] 4.4 Replace the full map extent and map extent in the service metadata information obtained in 4.2 with the intersection map extent and intersection full map extent obtained in 4.3, and return the result data directly to the client.

[0111] In the embodiment of the present invention, the method no longer uses a token mechanism to control permissions, thereby avoiding problems such as difficulty in distinguishing user roles and inconvenient client maintenance and token updates; no field screening is used to avoid changing the original data, and adding administrative district attributes to the data can reduce the cost of data production, updating, and maintenance; for slice services and image data, there is no need to divide the data according to administrative districts, resulting in data fragmentation and redundancy.

[0112] Furthermore, all management and control in the method are run on the server side, realizing true management and control with high security. The method supports multiple platforms and can be well supported on both the Web side and the mobile side. The maintenance and implementation workload of the method is small. The method supports multiple GIS platforms, such as ArcGIS and Supermap. Furthermore, since the engine of the method is deployed between the server and the client, it has no impact on the original data and therefore does not affect the integrity of the original data.

[0113] Based on the above-mentioned method for controlling spatial data within a custom range, an embodiment of the present invention further provides a device for controlling spatial data within a custom range. The device is applied to a gateway service, pre-publishes a custom range map service based on permission level information, and establishes a first association relationship between the permission level information and the permission range coordinates. The custom range map service includes at least one permission range coordinate. The structural block diagram of the device is shown in FIG. Figure 2 As shown, the device includes:

[0114] Establishing module 201 , obtaining module 202 and determining and obtaining module 203 .

[0115] in,

[0116] The establishing module 201 is used to establish a second association relationship between the user and the permission level information, wherein the permission level information includes: permission level and permission code;

[0117] The acquisition module 202 is configured to acquire the request format of a spatial data map service request received from a target user;

[0118] The determination and acquisition module 203 is used to determine the request type based on the request format, allocate a target permission processor based on the request type, and obtain target spatial data within the permission range corresponding to the request based on the target permission processor and the second association relationship, wherein the target permission processor is at least one of a slice map service permission processor, a dynamic map service permission processor, a query data service permission processor, and a layer request service permission processor.

[0119] The present invention discloses a device for controlling spatial data within a custom range, establishing a first association relationship between permission level information and permission range coordinates, including: establishing a second association relationship between a user and permission level information, and obtaining a request format of the request when a target user requests a spatial data map service; determining a request type based on the request format, allocating a target permission processor based on the request type, and obtaining target spatial data within the permission range corresponding to the request based on the target permission processor and the second association relationship. The above process realizes the control of spatial data by establishing an association relationship between permission level information and user and permission range coordinates, no longer using a token mechanism and field screening to control permissions, and no longer requiring segmentation of slice services and image data, thereby avoiding the inconvenience of client maintenance and token update, data fragmentation, and redundancy, thereby reducing the cost of data production, update, and maintenance.

[0120] In the embodiment of the present invention, when the target permission processor is the slice map service permission processor, the determination and acquisition module 203 includes:

[0121] a first level information determination unit 204 , a first interception unit 205 , a first coordinate range determination unit 206 , a first calculation unit 207 , and a first clipping unit 208 .

[0122] in,

[0123] The first level information determining unit 204 is configured to determine the permission level information based on the second association relationship;

[0124] The first interception unit 205 is configured to intercept the metadata information and the original image in the request and calculate the spatial range of the original image, wherein the metadata information corresponds to the spatial data map service;

[0125] The first coordinate range determining unit 206 is configured to determine an authority coordinate range based on the first association relationship and the authority level information, and determine an intersection coordinate range of the spatial range and the authority coordinate range;

[0126] The first calculation unit 207 is configured to calculate relative screen coordinates based on the permission coordinate range and the intersection coordinate range;

[0127] The first interception unit 208 is configured to obtain target metadata information corresponding to the original image based on the metadata information, and intercept the original image based on the target metadata information and the relative screen coordinates to obtain a result image.

[0128] In the embodiment of the present invention, when the target permission processor is a dynamic map service permission processor, the determination and acquisition module 203 includes:

[0129] A second level information determination unit 209 , a second interception unit 210 , a second coordinate range determination unit 211 , a second calculation unit 212 , and a second clipping unit 213 .

[0130] in,

[0131] The second level information determining unit 209 is configured to determine the permission level information based on the second association relationship;

[0132] The second interception unit 210 is configured to intercept metadata information, an original image, and a spatial range of the original image in the request, wherein the metadata information corresponds to the spatial data map service;

[0133] The second coordinate range determining unit 211 is configured to determine a permission coordinate range based on the first association relationship and the permission level information, and determine an intersection coordinate range based on a topological relationship between the spatial range and the permission coordinate range;

[0134] The second calculating unit 212 is configured to calculate relative screen coordinates based on the spatial range and size information of the original image;

[0135] The second interception unit 213 is configured to intercept the original image based on the relative screen coordinates and the metadata information to obtain a result image.

[0136] In the embodiment of the present invention, when the target permission processor is a query data service permission processor, the determination and acquisition module 203 includes:

[0137] a third level information determination unit 214 , a third interception unit 215 , a third coordinate range determination unit 216 , and a first result data determination unit 217 .

[0138] The third level information determining unit 214 is configured to determine the permission level information based on the second association relationship;

[0139] The third interception unit 215 is used to intercept the metadata information and the request query range in the request;

[0140] The third coordinate range determining unit 216 is configured to determine a permission coordinate range based on the first association relationship and the permission level information, and determine an intersection coordinate range based on a topological relationship between the request query range and the permission coordinate range;

[0141] The first result data determining unit 217 is configured to use the intersection coordinate range as a request parameter to request the spatial data map service and obtain target data within the user's authority range.

[0142] In the embodiment of the present invention, when the target permission processor is a layer request service permission processor, the determination and acquisition module 203 includes:

[0143] a fourth level information determination unit 218 , a fourth interception unit 219 , a fourth coordinate range determination unit 220 , and a second result data determination unit 221 .

[0144] in,

[0145] The fourth level information determining unit 218 is configured to determine the permission level information based on the second association relationship;

[0146] The fourth interception unit 219 is configured to intercept metadata information in the request and obtain the map range and the full map range based on the metadata information;

[0147] The fourth coordinate range determining unit 220 is configured to determine an authority coordinate range based on the first association relationship and the authority level information, and determine an intersection map range and an intersection full map range of the map range, the full map range, and the authority coordinate range;

[0148] The second result data determining unit 221 is configured to determine result data based on the intersection map range and the intersection full map range.

[0149] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similarities between the various embodiments can be referred to in conjunction with each other. For device embodiments, since they are generally similar to method embodiments, their description is relatively simple, and for relevant details, reference can be made to the description of the method embodiments.

[0150] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0151] The above is a detailed introduction to the method and device for custom range control of spatial data provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for controlling spatial data by customizing a range, characterized in that: Applied to a gateway service, a custom range map service is pre-published based on permission level information, and a first association relationship between the permission level information and permission range coordinates is established, wherein the custom range map service includes at least one permission range coordinate. The method includes: Establishing a second association between the user and permission level information, wherein the permission level information includes: permission level and permission code; When receiving a target user's request for a spatial data map service, obtaining a request format of the request; Determine a request type based on the request format, assign a target permission processor based on the request type, and obtain target spatial data within a permission range corresponding to the request based on the target permission processor and the second association relationship, wherein the target permission processor is at least one of a tile map service permission processor, a dynamic map service permission processor, a query data service permission processor, and a layer request service permission processor; Wherein, in a case where the target permission processor is a dynamic map service permission processor, obtaining target spatial data corresponding to the request based on the target permission processor and the second association relationship includes: determining the permission level information based on the second association relationship; intercepting metadata information, an original image, and a spatial range of the original image in the request, wherein the metadata information corresponds to the spatial data map service; Determining a permission coordinate range based on the first association relationship and the permission level information, and determining an intersection coordinate range based on a topological relationship between the spatial range and the permission coordinate range; Calculating relative screen coordinates based on the spatial range and size information of the original image; The original image is captured based on the relative screen coordinates and the metadata information to obtain a result image.

2. The method according to claim 1, characterized in that In a case where the target permission processor is the slice map service permission processor, obtaining target spatial data corresponding to the request based on the target permission processor and the second association relationship includes: Determining the permission level information based on the second association relationship; intercepting metadata information and an original image in the request and calculating a spatial range of the original image, wherein the metadata information corresponds to the spatial data map service; Determine an authority coordinate range based on the first association relationship and the authority level information, and determine an intersection coordinate range of the spatial range and the authority coordinate range; Calculating relative screen coordinates based on the permission coordinate range and the intersection coordinate range; Target metadata information corresponding to the original image is acquired based on the metadata information, and the original image is intercepted based on the target metadata information and the relative screen coordinates to obtain a result image.

3. The method according to claim 1, characterized in that In a case where the target permission processor is a query data service permission processor, obtaining target spatial data corresponding to the request based on the target permission processor and the second association relationship includes: Determining the permission level information based on the second association relationship; intercepting metadata information and request query scope in the request; Determining a permission coordinate range based on the first association relationship and the permission level information, and determining an intersection coordinate range based on a topological relationship between the request query range and the permission coordinate range; The intersection coordinate range is used as a request parameter to request the spatial data map service to obtain target data within the user's authority range.

4. The method according to claim 1, wherein In a case where the target permission processor is a layer request service permission processor, obtaining target spatial data corresponding to the request based on the target permission processor and the second association relationship includes: Determining the permission level information based on the second association relationship; intercepting metadata information in the request, and obtaining a map range and a full map range based on the metadata information; Determine an authority coordinate range based on the first association relationship and the authority level information, and determine the map range, the intersection map range of the full map range and the authority coordinate range, and the intersection full map range; Result data is determined based on the intersection map extent and the intersection full map extent.

5. A device for controlling spatial data with a custom range, characterized in that: Applied to a gateway service, a custom range map service is pre-published based on permission level information, a first association relationship between the permission level information and permission range coordinates is established, wherein the custom range map service includes at least one permission range coordinate, and the apparatus includes: An establishing module, configured to establish a second association between the user and permission level information, wherein the permission level information includes: permission level and permission code; An acquisition module, configured to acquire a request format of a spatial data map service request received from a target user; a determination and acquisition module, configured to determine a request type based on the request format, assign a target permission processor based on the request type, and acquire target spatial data within a permission range corresponding to the request based on the target permission processor and the second association relationship, wherein the target permission processor is at least one of a tile map service permission processor, a dynamic map service permission processor, a query data service permission processor, and a layer request service permission processor; Wherein, when the target permission processor is a dynamic map service permission processor, the determination and acquisition module includes: a second level information determining unit, configured to determine the permission level information based on the second association relationship; a second interception unit, configured to intercept metadata information, an original image, and a spatial range of the original image in the request, wherein the metadata information corresponds to the spatial data map service; a second coordinate range determining unit, configured to determine an authority coordinate range based on the first association relationship and the authority level information, and determine an intersection coordinate range based on a topological relationship between the spatial range and the authority coordinate range; a second calculation unit, configured to calculate relative screen coordinates based on the spatial range and size information of the original image; The second interception unit is configured to intercept the original image based on the relative screen coordinates and the metadata information to obtain a result image.

6. The device according to claim 5, characterized in that In the case where the target permission processor is the slice map service permission processor, the determination and acquisition module includes: a first level information determining unit, configured to determine the permission level information based on the second association relationship; a first interception unit, configured to intercept metadata information and an original image in the request and simultaneously calculate a spatial range of the original image, wherein the metadata information corresponds to the spatial data map service; a first coordinate range determining unit, configured to determine an authority coordinate range based on the first association relationship and the authority level information, and determine an intersection coordinate range of the spatial range and the authority coordinate range; a first calculation unit, configured to calculate relative screen coordinates based on the permission coordinate range and the intersection coordinate range; The first interception unit is configured to obtain target metadata information corresponding to the original image based on the metadata information, and intercept the original image based on the target metadata information and the relative screen coordinates to obtain a result image.

7. The device according to claim 5, characterized in that In the case where the target permission processor is a query data service permission processor, the determination and acquisition module includes: a third level information determining unit, configured to determine the permission level information based on the second association relationship; a third interception unit, configured to intercept metadata information and a request query scope in the request; a third coordinate range determining unit, configured to determine a permission coordinate range based on the first association relationship and the permission level information, and determine an intersection coordinate range based on a topological relationship between the request query range and the permission coordinate range; The first result data determining unit is configured to use the intersection coordinate range as a request parameter to request the spatial data map service and obtain target data within a user authority range.

8. The device according to claim 7, characterized in that In the case where the target permission processor is a layer request service permission processor, the determination and acquisition module includes: a fourth level information determining unit, configured to determine the permission level information based on the second association relationship; a fourth interception unit, configured to intercept metadata information in the request, and obtain a map range and a full map range based on the metadata information; a fourth coordinate range determining unit, configured to determine an authority coordinate range based on the first association relationship and the authority level information, and determine a map range and an intersection full map range of the map range, the full map range, and the authority coordinate range; The second result data determining unit is used to determine result data based on the intersection map range and the intersection full map range.

Citation Information

Patent Citations

  • Space service authority control method and system

    CN108924115A

  • Map dynamic cutting method and device and storage medium

    CN111611338A