Distributed vector slicing method and apparatus, computer device, and storage medium
By dividing and distributing the initial vector data space, multiple spatial partitions are generated and vector slices are performed, solving the problem that a single device cannot handle massive vector data and achieving efficient vector data slicing and display rendering.
Patent Information
- Application Number
- CN202210908430.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-07-29
AI Technical Summary
The CPU and memory resources of a single computer device cannot support vector tiling of massive spatial data, resulting in high vector data processing costs and reducing the practicality and convenience of the vector tiling process.
By defining an initial vector data space, dividing it into multiple spatial partitions, and using a distributed method to perform vector slicing on spatial elements within the spatial partitions, multiple vector tiles are generated, thus achieving distributed slicing of large-scale vector data.
It effectively reduces the cost of vector data processing, improves the practicality and convenience of the vector slicing process, and enhances the display and rendering efficiency and flexibility of vector data.
Smart Images

Figure CN115147553B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of big data processing technology, specifically to a distributed vector slicing method, apparatus, computer device, and storage medium. Background Technology
[0002] With the widespread adoption of mobile internet devices and the development of satellite positioning technology, massive amounts of data containing spatial information have been generated, such as GPS trajectory point data for taxis and location reporting data from applications in terminals. Visualizing spatial data can intuitively display the spatial distribution and detailed location information of the data on a map, making it an important tool for spatial data analysis.
[0003] In related technologies, spatial data such as points, lines, and surfaces are also called vector data. To improve the visualization efficiency of vector data, the industry has proposed the concept of vector tiling. Specifically, given a set of spatial features F, a minimum level, and a maximum level, the calculation process of generating vector tiles for all levels between (and including) the minimum and maximum levels is called vector tiling.
[0004] In this approach, the central processing unit (CPU) and memory resources of a single computer device cannot support vector slicing of massive spatial data. Summary of the Invention
[0005] This disclosure aims to at least partially address one of the technical problems in the related art.
[0006] Therefore, the purpose of this disclosure is to propose a distributed vector slicing method, apparatus, computer equipment, and storage medium that can realize distributed slicing of large-scale vector data, effectively reduce the cost of vector data processing, and thus effectively improve the practicality and convenience of the vector slicing process.
[0007] The distributed vector tiling method proposed in the first aspect of this disclosure includes: determining an initial vector data space, wherein the initial vector data space includes: multiple vector data; dividing the initial vector data space to generate multiple spatial partitions, wherein the spatial partitions include: multiple spatial features, and the spatial features describe the attribute information corresponding to the vector data in the corresponding spatial partitions; and performing vector tiling on the spatial features in the multiple spatial partitions based on a distributed method to obtain multiple vector tiles.
[0008] The distributed vector slicing method proposed in the first aspect of this disclosure determines an initial vector data space, which includes multiple vector data. The initial vector data space is then divided to generate multiple spatial partitions, each of which includes multiple spatial features. Each spatial feature describes the attribute information corresponding to the vector data in its respective spatial partition. Then, based on a distributed method, vector slicing is performed on the spatial features in the multiple spatial partitions to obtain multiple vector tiles. This enables distributed slicing of large-scale vector data, effectively reducing the cost of vector data processing and thus significantly improving the practicality and convenience of the vector slicing process.
[0009] The distributed vector tiling apparatus proposed in the second aspect of this disclosure includes: a determining module for determining an initial vector data space, wherein the initial vector data space includes multiple vector data; a generating module for dividing the initial vector data space to generate multiple spatial partitions, wherein the spatial partitions include multiple spatial features, and the spatial features describe the attribute information corresponding to the vector data in the corresponding spatial partitions; and a first processing module for performing vector tiling on the spatial features in the multiple spatial partitions based on a distributed method to obtain multiple vector tiles.
[0010] The distributed vector slicing apparatus proposed in the second aspect of this disclosure determines an initial vector data space, which includes multiple vector data, and divides the initial vector data space to generate multiple spatial partitions. Each spatial partition includes multiple spatial features, which describe the attribute information corresponding to the vector data in the respective spatial partition. Then, based on a distributed method, vector slicing is performed on the spatial features in the multiple spatial partitions to obtain multiple vector tiles. Thus, distributed slicing of large-scale vector data can be realized, which can effectively reduce the cost of vector data processing and thus effectively improve the practicality and convenience of the vector slicing process.
[0011] The computer device proposed in the third aspect of this disclosure includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the distributed vector slicing method proposed in the first aspect of this disclosure.
[0012] The fourth aspect of this disclosure provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the distributed vector slicing method as proposed in the first aspect of this disclosure.
[0013] A fifth aspect of this disclosure provides a computer program product in which, when instructions are executed by a processor, the distributed vector slicing method as described in a first aspect of this disclosure is performed.
[0014] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description
[0015] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which:
[0016] Figure 1 This is a flowchart illustrating a distributed vector slicing method proposed in an embodiment of this disclosure;
[0017] Figure 2 This is a schematic diagram of a one-pixel matrix proposed in an embodiment of this disclosure;
[0018] Figure 3 This is a schematic diagram of a vector pyramid proposed in an embodiment of this disclosure;
[0019] Figure 4 This is a schematic diagram of vector tile coordinates and numbering proposed in an embodiment of this disclosure;
[0020] Figure 5 This is a flowchart illustrating a distributed vector slicing method proposed in another embodiment of this disclosure;
[0021] Figure 6 This is a flowchart illustrating a distributed vector slicing method proposed in another embodiment of this disclosure;
[0022] Figure 7 This is a schematic diagram of a quadtree structure and spatial partitioning proposed in an embodiment of this disclosure;
[0023] Figure 8 This is a flowchart illustrating a distributed vector slicing method proposed in another embodiment of this disclosure;
[0024] Figure 9 This is a flowchart illustrating a distributed vector slicing method proposed in another embodiment of this disclosure;
[0025] Figure 10 This is a schematic diagram of coordinate transformation of absolute spatial coordinates proposed in an embodiment of this disclosure;
[0026] Figure 11 This is a flowchart illustrating a distributed vector slicing method proposed in another embodiment of this disclosure;
[0027] Figure 12 This is a flowchart illustrating a distributed vector slicing method proposed in another embodiment of this disclosure;
[0028] Figure 13This is a schematic diagram of a spatial element in different tile layers according to an embodiment of this disclosure;
[0029] Figure 14 This is a schematic diagram of an upper layer slice proposed in an embodiment of this disclosure;
[0030] Figure 15 This is a schematic diagram of the structure of a distributed vector slicing device according to an embodiment of this disclosure;
[0031] Figure 16 This is a schematic diagram of the structure of a distributed vector slicing device according to another embodiment of this disclosure;
[0032] Figure 17 A block diagram of an exemplary computer device suitable for implementing embodiments of the present disclosure is shown. Detailed Implementation
[0033] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are used only to explain this disclosure, and should not be construed as limiting this disclosure. Rather, embodiments of this disclosure include all variations, modifications, and equivalents falling within the spirit and scope of the appended claims.
[0034] Figure 1 This is a schematic flowchart of a distributed vector slicing method proposed in an embodiment of this disclosure.
[0035] It should be noted that the execution subject of the distributed vector slicing method in this embodiment is a distributed vector slicing device, which can be implemented by software and / or hardware. The device can be configured in a computer device, which may include, but is not limited to, a terminal, a server, etc., such as a mobile phone, a PDA, etc.
[0036] This disclosure can be applied to display rendering scenarios. The vector data can specifically be, for example, spatial trajectory point data or position point data, or other vector data carrying spatial information. The function of vector slicing is to convert the spatial coordinates of the vector data into pixel coordinates that are convenient for rendering on the display. Then, the connection between spatial coordinate points is represented as a jump between pixel coordinates. Finally, the pixel coordinates, jump information, and non-spatial attributes are encoded to obtain vector tiles. That is, the vector data carrying spatial information is converted into vector tiles suitable for display rendering on the display. Alternatively, this disclosure can also be applied to any other possible scenarios where vector data carrying spatial information is converted into vector tiles, without limitation.
[0037] like Figure 1As shown, this distributed vector slicing method includes:
[0038] S101: Determine the initial vector data space, wherein the initial vector data space includes: multiple vector data.
[0039] Vectors can be used to describe quantities that have both magnitude and direction (such as velocity and acceleration in physics). Vector data can refer to internal data stored in a computer device in a vector structure, or it can refer to data whose position and / or shape are represented by x-axis and y-axis coordinates in a rectangular coordinate system (such as map graphics, geographic entities, etc.).
[0040] The vector data space refers to a data space formed by multiple vector data, which can be based on pixels as the basic unit. The initial vector data space can refer to the vector data space obtained by the execution subject of this embodiment of the disclosure and not processed by the distributed vector slicing method.
[0041] In some embodiments, determining the initial vector data space may involve pre-establishing a communication link between the execution entity of this disclosure embodiment and the big data server, and determining the initial vector data space based on the relevant information of the vector data issued by the big data server. Alternatively, a vector data collection device may be used to acquire vector data, and the obtained vector data may be transmitted to a pre-trained machine learning model to determine the initial vector data space, and then transmitted to the execution entity of this disclosure embodiment. No limitation is imposed on this method.
[0042] It is understandable that the display granularity corresponding to the initial vector data space may be a fixed value, which cannot meet the different display granularity requirements in various application scenarios. Therefore, this embodiment of the disclosure determines the initial vector data space, triggers subsequent steps, divides the initial vector data space to generate multiple spatial partitions, and performs vector slicing on the spatial elements in the multiple spatial partitions based on a distributed method to obtain multiple vector tiles in different tile levels. This can yield multiple vector tiles corresponding to different display granularities, which can facilitate subsequent personalized display rendering and effectively improve the applicability of the obtained vector tiles.
[0043] S102: Divide the initial vector data space to generate multiple spatial partitions. Each spatial partition includes multiple spatial features, which describe the attribute information corresponding to the vector data in the respective spatial partition.
[0044] Spatial partitioning can refer to the initial vector data space being divided according to a pre-configured partitioning criteria to obtain multiple sub-data spaces. These multiple spatial partitions can be multiple pixel matrices with the same length and width.
[0045] It is understandable that when the number of pixels in a single pixel matrix increases, the clarity of the display rendering will increase accordingly, while when the number of pixels in a single pixel matrix decreases, the clarity of the display rendering will decrease accordingly.
[0046] In this embodiment of the disclosure, in order to facilitate the location and analysis of spatial elements in the initial vector data space, the initial vector data space can be divided into multiple pixel matrices (typically, when the length and width of a pixel matrix in the display of an electronic device are 4096 pixels, it can meet the recognition requirements of the human eye without making the human eye perceive jagged edges).
[0047] For example, such as Figure 2 As shown, Figure 2 This is a schematic diagram of a pixel matrix proposed in an embodiment of the present disclosure. The upper left corner is the origin of the coordinate system, a single pixel is the basic unit, Pixel-x is the positive x-axis, Pixel-y is the positive y-axis, and a square with a side length of 4096 pixels is taken as the pixel matrix. Of course, other rectangles with arbitrary length and width combinations can also be selected as the pixel matrix according to the application scenario, and there is no limitation on this.
[0048] Spatial features (SF) refer to objects represented by vector data within a spatial partition. A spatial feature can consist of one or more pixels and includes a spatial attribute (geom) and multiple non-spatial attributes (such as material properties and uses). The geom represents the spatial information of the feature, and its types include point, line string, polygon, multipoint, multiline string, and multipolygon. A spatial feature can be represented as sf =<geom,others> , where others represent the non-spatial attributes of spatial elements.
[0049] Among them, attribute information can include spatial attributes and non-spatial attributes corresponding to the aforementioned spatial elements.
[0050] In some embodiments of this disclosure, the initial vector data space is divided to generate multiple spatial partitions. This can be done by first obtaining the distributed environment information of the execution subject of the embodiments of this disclosure, and then dividing the initial vector data space based on the distributed environment information to obtain multiple spatial partitions. Alternatively, the initial vector data space can be input into a pre-trained spatial partitioning model to obtain multiple spatial partitions, and then transmitted to the execution subject of the embodiments of this disclosure. No limitation is imposed on this method.
[0051] S103: Based on a distributed method, spatial elements in multiple spatial partitions are vector-sliced to obtain multiple vector tiles.
[0052] Distributed methods can refer to an algorithm in a computer system that can be used to decompose a relatively large initial problem into multiple relatively small parts, process each of the multiple relatively small parts to obtain multiple processing results, and then combine and analyze the multiple processing results to obtain the result of the initial problem.
[0053] It is understandable that the spatial elements in the application scenario may contain a lot of information, and it may take a long time to perform overall analysis. Therefore, the embodiments of this disclosure perform vector tiling on spatial elements in multiple spatial partitions based on a distributed method, which can effectively improve the flexibility and efficiency of the vector tiling process.
[0054] Vector tiles can refer to files obtained after encoding, compressing, and other processing of spatial elements projected onto the aforementioned pixel matrix.
[0055] Understandably, to achieve visualization effects at different granularities, spatial elements can be displayed in hierarchical levels, from 0 to n (where n is an integer and can be configured according to the application scenario). At the i-th (0≤i≤n) level, the entire spatial range is uniformly divided into 2x ... i 4 portions in total i Each grid contains spatial elements that can be projected into a pixel matrix and encoded into a vector tile. The collection of vector tiles across all tile levels can be called a vector pyramid.
[0056] like Figure 3 As shown, Figure 3 This is a schematic diagram of a vector pyramid proposed in an embodiment of this disclosure. The vector pyramid is divided into four layers. As the zoom level decreases, the number of vector tiles decreases, the spatial range corresponding to a single vector tile increases, the number of spatial elements it contains increases, and the display granularity increases. Conversely, as the zoom level increases, the number of tiles increases, the spatial range corresponding to a single vector tile decreases, the number of spatial elements it contains decreases, and the display granularity decreases. It is understood that... Figure 3 The dark tiles contained in layers 1, 2, and 3 correspond to the same spatial range.
[0057] In this embodiment of the disclosure, to facilitate locating the position of a vector tile within the vector pyramid, the coordinates of the vector tile are defined as T =<rowNum,colNum,zoomLevel> Where zoomLevel (0≤zoomLevel≤n) represents the tile's level, and rowNum (0≤rowNum<2) represents the tile's layer. zoomLevel ) and colNum (0≤colNum<2) zoomLevel ) represent the row number and column number of the tile at that level, respectively, such as Figure 4 As shown, Figure 4 This is a schematic diagram of vector tile coordinates and numbering proposed in an embodiment of this disclosure, where row is the row number and col is the column number. Within any level i (0≤i≤n), a pre-configured space filling curve (e.g., ...) is used for the vector tile. Figure 4 (The polyline connecting the vector tiles in the zoomLevel=1 and zoomLevel=2 tile levels) ranges from 0 to 4. i The numbering rule, which uses -1 for numbering, can possess the following properties:
[0058] Let z be the number of the vector tile t in layer i. Then the spatial range represented by t in layer i+1 is represented by 4 vector tiles, numbered z×4, z×4+1, z×4+2, and z×4+3 respectively. For example... Figure 3 The numbering of the green tiles in the middle 1st and 2nd floors.
[0059] For example, in this embodiment of the disclosure, the distributed vector slicing method can be implemented based on a computing engine (Spark). Spark can use Resilient Distributed Datasets (RDDs) to represent the entire dataset. An RDD consists of multiple independent functions (partitions). A partition contains multiple data entries. Spark executes a batch of task sets in parallel on a distributed cluster. A task is responsible for performing computations on the data in a partition.
[0060] In this embodiment, an initial vector data space is determined, which includes multiple vector data. The initial vector data space is then divided to generate multiple spatial partitions, each of which includes multiple spatial features. Each spatial feature describes the attribute information corresponding to the vector data in its respective spatial partition. Then, vector slicing is performed on the spatial features in the multiple spatial partitions using a distributed method to obtain multiple vector tiles. This enables distributed slicing of large-scale vector data, effectively reducing the cost of vector data processing and thus significantly improving the practicality and convenience of the vector slicing process.
[0061] Figure 5 This is a flowchart illustrating a distributed vector slicing method proposed in another embodiment of this disclosure.
[0062] like Figure 5 As shown, this distributed vector slicing method includes:
[0063] S501: Determine the initial vector data space, wherein the initial vector data space includes: multiple vector data.
[0064] For a detailed description of S501, please refer to the above embodiments, which will not be repeated here.
[0065] S502: Determine the target tile level, wherein the target tile level describes the level in the vector pyramid corresponding to the first vector tile, and the first vector tile belongs to multiple vector tiles.
[0066] Here, tile level refers to any level in the vector pyramid, while target tile level can be the tile level in the vector pyramid to be spatially partitioned, as determined by the application scenario in this embodiment of the disclosure.
[0067] The first vector tile can be a vector tile pre-determined from the initial vector space according to the application scenario, and can be used as a reference to determine the target tile level from the vector pyramid.
[0068] In this embodiment of the disclosure, the target tile level can be determined based on a pre-configured distributed environment, combined with the structural features of the vector pyramid, or any other possible method can be used to determine the target tile level, without any limitation.
[0069] S503: Divide the initial vector data space according to the target tile level to generate multiple spatial partitions.
[0070] In this embodiment of the disclosure, the process of dividing the initial vector data space differs at different levels of the vector pyramid. Therefore, by determining the target tile level according to the application scenario, this embodiment of the disclosure can provide a reliable reference for the subsequent division of the initial vector data space.
[0071] In other words, after determining the initial vector data space, the present invention can determine the target tile level, wherein the target tile level describes the level in the vector pyramid corresponding to the first vector tile. The first vector tile belongs to multiple vector tiles. Then, the initial vector data space is divided according to the target tile level to generate multiple spatial partitions. Thus, when the initial vector data space is divided based on the vector pyramid and the target tile level, the resulting multiple spatial partitions can be made to fit the application scenario of the distributed method, thereby effectively improving the processing effect of the distributed method.
[0072] S504: Perform load balancing on the spatial partitions to obtain the target spatial partition.
[0073] Here, load refers to the number of spatial elements contained in the aforementioned spatial partition, while load balancing processing can refer to processing multiple spatial partitions according to a pre-configured processing method and the load level of each spatial partition to obtain the target spatial partition.
[0074] The target space partition refers to the multiple space partitions with relatively balanced loads obtained after the above space partitions have undergone load balancing processing.
[0075] It is understood that in the initial vector data space mentioned above, there may be multiple spatial features, and the distribution of these features may be random. After dividing the initial vector data space and generating multiple spatial partitions, the number of intersections between each spatial partition and spatial features may differ. These differences may affect the overall generation rate of subsequent vector tiles. Therefore, this embodiment of the present disclosure can effectively improve the balance of the number of spatial features among the multiple target spatial partitions by performing load balancing processing on the spatial partitions, thereby effectively improving the efficiency of generating vector tiles based on the target spatial partitions.
[0076] In this embodiment of the disclosure, load balancing processing is performed on the spatial partition to obtain the target spatial partition. This can be achieved by inputting the spatial partition into a pre-trained load balancing processing machine model to perform load balancing processing on the spatial partition to obtain the target spatial partition, which is then transmitted to the execution entity of this embodiment. Alternatively, a third-party load balancing processing device can be used to perform load balancing processing on the spatial partition to obtain the target spatial partition, which is then transmitted to the execution entity of this embodiment. No limitation is imposed on this method.
[0077] Optionally, in some embodiments, load balancing processing is performed on the spatial partitions to obtain target spatial partitions. This can be achieved by determining skewed and balanced spatial partitions from multiple spatial partitions, performing target processing on the skewed spatial partitions to obtain processed spatial partitions, and then using the balanced and processed spatial partitions as multiple target spatial partitions. Thus, when skewed and balanced spatial partitions are determined from multiple spatial partitions, i.e., when spatial partitions with a large number of spatial elements and those with a small number of spatial elements are distinguished and determined from multiple spatial partitions, the targeting and reliability of the subsequent target processing process can be effectively improved. Target processing on skewed spatial partitions can effectively reduce the number of spatial elements in the skewed spatial partitions, and can effectively improve the balance of the number of spatial elements between the obtained processed spatial partitions and balanced spatial partitions.
[0078] Among them, a tilted spatial partition can refer to a spatial partition with a large number of intersecting spatial elements among the above-mentioned spatial partitions; while a balanced spatial partition can refer to a spatial partition with a small number of intersecting spatial elements among the above-mentioned spatial partitions.
[0079] Among them, target processing can refer to pre-configured processing measures for tilted spatial partitions, which can effectively adjust the load of spatial elements in tilted spatial partitions.
[0080] The processed spatial partition can refer to multiple spatial partitions obtained by the above-mentioned skewed spatial partition after target processing. The processed spatial partition and the above-mentioned balanced partition should meet the pre-configured load balancing conditions.
[0081] S505: Based on a distributed method, vector slicing is performed on spatial elements in multiple target spatial partitions to obtain multiple vector tiles.
[0082] In this embodiment of the disclosure, during the parallel processing of multiple spatial partitions to obtain multiple vector tiles based on a distributed method, the time consumed by the entire parallel operation depends on the spatial partition with the slowest vector slicing rate. Therefore, this embodiment of the disclosure can effectively improve the load balance among the multiple target spatial partitions by performing load balancing processing on the spatial partitions to obtain the target spatial partitions, thereby avoiding the vector slicing rate of a single spatial partition from affecting the overall vector slicing rate and effectively improving the execution efficiency of the distributed vector slicing process.
[0083] In other words, after determining multiple spatial partitions, the embodiments of this disclosure can perform load balancing on the spatial partitions to obtain target spatial partitions. Then, based on a distributed method, vector tiling is performed on the spatial elements in the multiple target spatial partitions to obtain multiple vector tiles. Since the number of spatial elements in the multiple spatial partitions may vary greatly, load balancing on the spatial partitions can effectively improve the balance of the number of spatial elements in the multiple target spatial partitions, avoid the excessive number of spatial elements in some spatial partitions from affecting the vector tiling speed, and thus effectively improve the execution efficiency of the distributed vector tiling process.
[0084] In this embodiment, by dividing the initial vector data space based on the vector pyramid and target tile hierarchy, the resulting multiple spatial partitions can be tailored to the application scenario of the distributed method, thereby effectively improving the processing performance of the distributed method. Since the number of spatial elements in the resulting multiple spatial partitions may vary significantly, load balancing of the spatial partitions can effectively improve the balance of the number of spatial elements in the resulting multiple target spatial partitions, preventing some spatial partitions from having too many spatial elements and affecting the vector tiling speed, thus effectively improving the execution efficiency of the distributed vector tiling process. When skewed and balanced spatial partitions are determined from the multiple spatial partitions, that is, when spatial partitions with a large number of spatial elements and those with a small number of spatial elements are distinguished and identified, the targeting and reliability of subsequent target processing can be effectively improved. Target processing of skewed spatial partitions can effectively reduce the number of spatial elements in the skewed spatial partitions, effectively improving the balance of the number of spatial elements between the processed spatial partitions and the balanced spatial partitions.
[0085] Figure 6 This is a flowchart illustrating a distributed vector slicing method proposed in another embodiment of this disclosure.
[0086] like Figure 6 As shown, this distributed vector slicing method includes:
[0087] S601: Determine the initial vector data space, wherein the initial vector data space includes: multiple vector data.
[0088] S602: Divide the initial vector data space to generate multiple spatial partitions. Each spatial partition includes multiple spatial features, which describe the attribute information corresponding to the vector data in the respective spatial partition.
[0089] For a detailed description of S601 and S602, please refer to the above embodiments, which will not be repeated here.
[0090] S603: Determine multiple data skewnesses corresponding to multiple spatial partitions, wherein the data skewness is used to describe the quantitative comparison between multiple spatial elements in the corresponding spatial partition and sample spatial elements.
[0091] Data skewness can refer to the ratio and / or difference between multiple spatial elements in a spatial partition and the sample spatial elements, and there are no restrictions on this.
[0092] Here, the sample spatial elements can refer to multiple spatial elements extracted from multiple spatial partitions by the execution entity of this embodiment according to pre-configured extraction rules. It is understood that the number of sample spatial elements can effectively characterize the overall average level of the number of spatial elements in each spatial partition.
[0093] Therefore, when multiple data skewnesses are determined for each of the multiple spatial partitions, the resulting multiple data skewnesses can effectively characterize the quantitative comparison between multiple spatial elements in the corresponding spatial partitions and sample spatial elements, providing a reliable reference for the subsequent determination of skewed spatial partitions and balanced spatial partitions.
[0094] S604: Based on the data skewness, determine the skewed spatial partition and the balanced spatial partition from multiple spatial partitions.
[0095] In this embodiment of the disclosure, since the obtained data skewness can effectively characterize the quantitative comparison between multiple spatial elements in the corresponding spatial partition and the sample spatial elements, the accuracy and reliability of the determination process can be effectively improved when skewed spatial partitions and balanced spatial partitions are determined from multiple spatial partitions based on the data skewness.
[0096] In this embodiment of the disclosure, determining skewed spatial partitions and balanced spatial partitions from multiple spatial partitions based on data skewness can be achieved by inputting multiple spatial partitions and their corresponding data skewnesses into a pre-trained machine learning model to determine skewed and balanced spatial partitions from the multiple spatial partitions, and then transmitting the results to the execution entity of this embodiment of the disclosure. Alternatively, mathematical methods can be used to determine skewed and balanced spatial partitions from multiple spatial partitions based on data skewness, and there is no limitation on this method.
[0097] Optionally, in some embodiments, the skewed spatial partition and the balanced spatial partition are determined from multiple spatial partitions based on the data skewness. This can be achieved by designating the spatial partition to which the data skewness belongs as the skewed spatial partition if the data skewness is greater than a skewness threshold, and designating the spatial partition to which the data skewness belongs as the balanced spatial partition if the data skewness is less than or equal to the skewness threshold. Since the skewness threshold can be configured according to the application scenario, the determination of the skewed spatial partition and the balanced spatial partition among multiple spatial partitions can be achieved by analyzing and comparing the skewness of multiple spatial partitions in combination with the skewness threshold, which can effectively improve the flexibility and adaptability of the determination process.
[0098] The skewness threshold can be a threshold value selected within the range of data skewness values, used as a reference to determine skewed and balanced spatial partitions from multiple spatial partitions. This skewness threshold can be obtained by performing feature analysis based on relevant characteristics in the distributed processing of big data statistics, or it can be configured in advance based on user configuration instructions, without any restrictions.
[0099] In other words, after determining multiple spatial partitions, this embodiment of the present disclosure can determine multiple data skewnesses corresponding to each of the multiple spatial partitions. The data skewness is used to describe the quantitative comparison between multiple spatial elements in the corresponding spatial partition and the sample spatial elements. Then, based on the data skewness, skewed spatial partitions and balanced spatial partitions are determined from the multiple spatial partitions. Thus, the obtained multiple data skewnesses can effectively characterize the spatial element load of the corresponding multiple spatial partitions and can provide a valid reference for the determination process of skewed spatial partitions and balanced spatial partitions, thereby effectively improving the reliability and rationality of the determination process.
[0100] S605: Based on the spatial elements in the slanted spatial partition, a sample vector data space is formed.
[0101] The sample vector data space refers to the vector data space formed based on the spatial elements in the aforementioned tilted spatial partition.
[0102] It is understandable that the spatial elements in the aforementioned skewed spatial partitions are heavily loaded, which may affect the execution efficiency of this distributed vector tiling method. When a sample vector data space is formed based on the spatial elements in the skewed spatial partitions, the resulting sample vector data space can provide a reliable reference for the subsequent iterative update process.
[0103] S606: Iteratively update the initial vector data space based on the sample vector data space until the spatial elements in the spatial partition after the iterative update meet the set conditions, and use the updated spatial partition as the processed spatial partition.
[0104] Among them, iterative update can refer to vector slicing of the skewed spatial partitions in the initial vector data space based on the sample vector data space when there are skewed spatial partitions in the initial vector data space.
[0105] The set conditions can be pre-configured according to the application scenario and used as a reference to determine whether a spatial partition is a skewed partition.
[0106] In this embodiment of the disclosure, by iteratively updating the initial vector data space according to the sample vector data space, the number of spatial elements in the skewed spatial partition can be effectively reduced, thereby effectively improving the balance between the processed spatial partition and the balanced partition.
[0107] In other words, after determining the skewed spatial partition and the balanced spatial partition from multiple spatial partitions based on the data skewness in the embodiments of this disclosure, a sample vector data space can be formed based on the spatial elements in the skewed spatial partition. Then, the initial vector data space is iteratively updated based on the sample vector data space until the spatial elements in the spatial partition after the iterative update meet the set conditions. The updated spatial partition is then used as the processed spatial partition. Since the number of spatial elements in some skewed spatial partitions is large during the distributed vector slicing process, a single update process cannot meet the requirements of the distributed vector slicing method for spatial partition balance. Therefore, when the initial vector data space is iteratively updated based on the sample vector data space until the spatial elements in the spatial partition after the iterative update meet the set conditions, the load balancing effect of the skewed spatial partition can be effectively improved, thereby maximizing the load balancing between the processed spatial partitions.
[0108] like Figure 7 As shown, Figure 7 This is a schematic diagram of a quadtree structure and spatial partitioning proposed in an embodiment of the present disclosure. A quadtree is constructed with the spatial range G of the spatial coordinate system as the root node, serving as the data structure for organizing the vector pyramid. The quadtree's zoomLevel corresponds to the level of the vector pyramid, and each node of the quadtree corresponds to each vector tile in the vector pyramid, such as... Figure 7 As shown, the number of each node is also the number of the corresponding vector tile.
[0109] When performing distributed vector slicing, spatial partitioning is performed using the p-th level of the quadtree, generating 4 p Each spatial partition consists of spatial elements that make up a Spark partition. Figure 7 Taking p=2, the entire spatial range can be divided into 4 2 = 16 spatial partitions.
[0110] Let maxLevel be the highest level in the vector pyramid and minLevel be the lowest level. All spatial partitions are computed in parallel in a distributed environment to obtain lower-level vector tiles, where level i of the lower-level tiles satisfies p≤i≤maxLevel. Then, the spatial elements in level p are aggregated layer by layer to obtain upper-level vector tiles, where level i of the upper-level tiles satisfies minLevel≤i. <p。
[0111] For example, given the spatial coordinate range G, the spatial feature set F, the minimum tile level minLevel, the maximum tile level maxLevel, the target tile level p, and the tilt threshold δ, load balancing can be performed as follows: Extract a spatial feature sample set F' from set F; set the spatial range of the root node Root to G, and the sample set of the root node to F'; partition Root to generate a p-layer quadtree structure, with a total of 4 leaf nodes. p Each leaf node corresponds to a spatial partition, and all leaf nodes form a set T of spatial partitions. Each partition t∈T contains spatial feature samples that intersect with it, with the number of samples being t.count. The data skewness of the partition is t.δ = t.count ÷ |F'|, where |F'| is the total number of samples. The partitions in set T are divided according to their respective data skewness. Partitions with skewness greater than δ are assigned to set T1, called the skewed spatial partition set; partitions with skewness less than δ are assigned to set T2, called the balanced spatial partition set. For each skewed spatial partition t'∈T1, it is used as a new root node, and vector slicing is recursively performed on the second line, returning the spatial features of the skewed spatial partition t'. For each balanced spatial partition t”∈T1, lower-level slicing can be performed in parallel using Spark to generate vector tiles from level p to maxLevel, and the spatial features of each spatial partition t” are returned. Upper-level slicing is performed on the spatial features returned from the skewed and balanced spatial partitions, generating all vector tiles from level minLevel to p, and the spatial features of the root node are returned.
[0112] S607: Treat the balanced spatial partition and the processed spatial partition as multiple target spatial partitions.
[0113] S608: Based on a distributed method, vector slicing is performed on spatial features in multiple target spatial partitions to obtain multiple vector tiles.
[0114] For a detailed description of S607 and S608, please refer to the above embodiments, which will not be repeated here.
[0115] In this embodiment, multiple data skewnesses corresponding to multiple spatial partitions are determined. These data skewnesses describe the quantity comparison between multiple spatial elements in the corresponding spatial partition and the sample spatial elements. Based on the data skewnesses, skewed and balanced spatial partitions are determined from the multiple spatial partitions. Thus, the obtained multiple data skewnesses can effectively characterize the spatial element load of the corresponding spatial partitions, providing a valid reference for the determination process of skewed and balanced spatial partitions, thereby effectively improving the reliability and rationality of the determination process. Since some skewed spatial partitions have a large number of spatial elements in the distributed vector tiling process, a single update process cannot meet the spatial partition balance requirements of this distributed vector tiling method. Therefore, when the initial vector data space is iteratively updated based on the sample vector data space until the spatial elements in the updated spatial partitions meet the set conditions, the load balancing effect of the skewed spatial partitions can be effectively improved, thereby maximizing the load balance between the processed spatial partitions. Since the tilt threshold can be configured according to the application scenario, when the tilt of multiple spatial partitions is analyzed and compared with the tilt threshold, the tilted spatial partitions and balanced spatial partitions in multiple spatial partitions can be determined, which can effectively improve the flexibility and adaptability of the determination process.
[0116] Figure 8 This is a flowchart illustrating a distributed vector slicing method proposed in another embodiment of this disclosure.
[0117] like Figure 8 As shown, this distributed vector slicing method includes:
[0118] S801: Determine the initial vector data space, wherein the initial vector data space includes: multiple vector data.
[0119] S802: Determine the target tile level, wherein the target tile level describes the level in the vector pyramid corresponding to the first vector tile, and the first vector tile belongs to multiple vector tiles.
[0120] S803: Divide the initial vector data space according to the target tile level to generate multiple spatial partitions.
[0121] S804: Perform load balancing on the spatial partitions to obtain the target spatial partition.
[0122] For a detailed description of S801-S804, please refer to the above embodiments, which will not be repeated here.
[0123] S805: Determine the first tile level from multiple levels, wherein the first tile level is higher than the target tile level.
[0124] The first tile level can refer to any tile level in the vector pyramid with a higher number of layers than the target tile level; there are no restrictions on this.
[0125] In this embodiment of the disclosure, the spatial range corresponding to a single vector tile in the first tile level is smaller than the spatial range corresponding to a single vector tile in the target tile level. Therefore, when the first tile level is determined from multiple levels, subsequent steps can be triggered to perform vector slicing on the spatial elements of the target tile level and the first tile level based on a distributed method. This makes the resulting multiple vector slices suitable for application scenarios with high display granularity requirements but small display spatial range.
[0126] S806: Based on a distributed method, vector slicing is performed on the spatial features of the target tile level and the first tile level to obtain multiple vector tiles.
[0127] In this embodiment of the disclosure, a distributed method is used to perform vector slicing on the spatial elements of the target tile level and the first tile level. The resulting first tile level has a large number of vector tiles, and the spatial range corresponding to a single vector tile is small, resulting in a finer display granularity, which is suitable for application scenarios with high display granularity requirements. The resulting target tile level has a relatively small number of vector tiles, and the spatial range corresponding to a single vector tile is large, resulting in a coarser display granularity, which is suitable for application scenarios with a large display spatial range and low display granularity requirements.
[0128] Optionally, in some embodiments, the number of first tile levels is multiple. Vector slicing is performed on the spatial elements of the target tile level and the first tile level using a distributed method to obtain multiple vector tiles. This can be achieved by determining the first largest tile level among multiple first tile levels, performing vector slicing on the spatial elements of the first largest tile level using a distributed method, obtaining multiple vector tiles corresponding to the spatial elements of the first largest tile level, and then performing layer-by-layer aggregation on the multiple vector tiles corresponding to the spatial elements of the target tile level. Thus, during the layer-by-layer aggregation process on the multiple vector tiles corresponding to the spatial elements of the first largest tile level, vector tiles corresponding to each tile level between the first largest tile level and the target tile level can be obtained, realizing the lower-level slicing in the vector slicing process. This allows users to flexibly select the vector tiles of the corresponding tile level according to their needs for the clarity of spatial elements in the vector tiles.
[0129] The first maximum tile level can refer to the first tile level with the largest number of layers among multiple first tile levels. The number of layers of the first maximum tile level can be configured according to user configuration instructions.
[0130] It is understandable that in the vector pyramid, the vector tile labeled 1 in the zoomLevel=1 level and the four vector tiles labeled 4, 5, 6, and 7 in the zoomLevel=2 level represent spatial elements within the same spatial range. The aggregation process can refer to performing an aggregation operation on the four vector tiles labeled 4, 5, 6, and 7 in the zoomLevel=2 level to obtain the vector tile labeled 1 in the zoomLevel=1 level. Therefore, recursively executing the above steps can yield all vector tiles with a layer number less than the first maximum tile level.
[0131] In other words, after performing load balancing on the spatial partitions to obtain the target spatial partitions, the embodiments of this disclosure can determine the first tile level from multiple levels, wherein the first tile level is higher than the target tile level. Then, based on a distributed method, vector slicing is performed on the spatial elements of the target tile level and the first tile level to obtain multiple vector tiles. Since the first tile level is higher than the target tile level, and the clarity of the spatial elements of each tile in each tile level in the vector pyramid will increase with the increase of the level, when vector slicing is performed on the spatial elements of the target tile level and the first tile level based on a distributed method, the vector slices corresponding to the first tile level can meet the user's need for higher clarity of spatial elements compared with the vector slices of the target tile level.
[0132] S807: Determine a second tile level from multiple levels, wherein the second tile level is lower than the target tile level.
[0133] The second tile level can refer to any tile level in the vector pyramid with a number of layers less than the target tile level; there are no restrictions on this.
[0134] In this embodiment of the disclosure, the spatial range corresponding to a single vector tile in the second tile level is larger than the spatial range corresponding to a single vector tile in the target tile level. Therefore, when the second tile level is determined from multiple levels, subsequent steps can be triggered to perform vector slicing on the spatial elements of the target tile level and the second tile level based on a distributed method. This makes the resulting multiple vector slices suitable for application scenarios with low display granularity requirements but large display spatial range.
[0135] S808: Aggregate multiple vector tiles at the target tile level to obtain multiple vector tiles corresponding to the spatial elements at the second tile level.
[0136] In this embodiment of the disclosure, a distributed method is used to perform vector slicing on the spatial elements of the target tile level and the second tile level. The resulting second tile level has fewer vector tiles, and each vector tile corresponds to a larger spatial range, resulting in a coarser display granularity, which is suitable for application scenarios with a larger display spatial range. Conversely, the resulting target tile level has a relatively larger number of vector tiles, and each vector tile corresponds to a smaller spatial range, resulting in a finer display granularity, which is suitable for application scenarios that require higher display granularity but have a smaller display spatial range.
[0137] Optionally, in some embodiments, the second tile level has multiple levels. Multiple vector tiles of the target tile level are aggregated to obtain multiple vector tiles corresponding to the spatial elements of the second tile level. This can be achieved by performing layer-by-layer aggregation on the multiple vector tiles of the target tile level to obtain multiple vector tiles corresponding to the spatial elements of each second tile level. Thus, during the layer-by-layer aggregation process on the multiple vector tiles of the target tile level, vector tiles corresponding to each tile level between the second tile level and the target tile level can be obtained, enabling upper-level slicing in the vector slicing process and thus meeting the requirement for the number of vector tiles in the application scenario.
[0138] In other words, in this embodiment of the present disclosure, after vector slicing the spatial features of the target tile level and the first tile level based on a distributed method to obtain multiple vector tiles, a second tile level can be determined from multiple levels, wherein the second tile level is lower than the target tile level. The multiple vector tiles of the target tile level are aggregated to obtain multiple vector tiles corresponding to the spatial features of the second tile level. Since the second tile level is lower than the target tile level, and the number of each tile in each tile level in the vector pyramid decreases as the tile level decreases, the number of multiple vector tiles corresponding to the spatial features of the second tile level will be less than the number of multiple vector tiles corresponding to the spatial features of the target tile level, which can effectively avoid the problem of too many vector tiles affecting work efficiency.
[0139] In this embodiment, a first tile level is determined from multiple levels, where the first tile level is higher than the target tile level. Then, a distributed method is used to perform vector slicing on the spatial features of the target tile level and the first tile level, resulting in multiple vector tiles. Since the first tile level is higher than the target tile level, and the clarity of spatial features in each tile level within the vector pyramid increases with the level, the vector slices corresponding to the first tile level obtained by performing vector slicing on the spatial features of the target tile level and the first tile level using a distributed method can meet the user's need for higher clarity of spatial features compared to the vector slices of the target tile level. During the layer-by-layer aggregation process of multiple vector tiles corresponding to the spatial features of the first maximum tile level, vector slices corresponding to each tile level between the first maximum tile level and the target tile level can be obtained, thus realizing the lower-level slicing in the vector slicing process. This allows users to flexibly select the vector tiles of the corresponding tile level according to their own needs for the clarity of spatial features in the vector tiles. A second tile level is determined from multiple levels, where the second tile level is lower than the target tile level. Multiple vector tiles from the target tile level are aggregated to obtain multiple vector tiles corresponding to the spatial features of the second tile level. Since the second tile level is lower than the target tile level, and the number of tiles in each tile level of the vector pyramid decreases as the tile level decreases, the number of multiple vector tiles corresponding to the spatial features of the second tile level will be less than the number corresponding to the spatial features of the target tile level. This effectively avoids an excessive number of vector tiles affecting work efficiency. During the layer-by-layer aggregation process of multiple vector tiles from the target tile level, vector tiles corresponding to each tile level between the second tile level and the target tile level can be obtained, enabling upper-level slicing in the vector slicing process and thus meeting the application scenario's requirement for the number of vector tiles.
[0140] Figure 9 This is a flowchart illustrating a distributed vector slicing method proposed in another embodiment of this disclosure.
[0141] like Figure 9 As shown, this distributed vector slicing method includes:
[0142] S901: Determine the initial vector data space, wherein the initial vector data space includes: multiple vector data.
[0143] S902: Determine the target tile level, wherein the target tile level describes the level in the vector pyramid corresponding to the first vector tile, and the first vector tile belongs to multiple vector tiles.
[0144] S903: Divide the initial vector data space according to the target tile level to generate multiple spatial partitions.
[0145] S904: Perform load balancing on the spatial partitions to obtain the target spatial partition.
[0146] S905: Determine the first tile level from multiple levels, wherein the first tile level is higher than the target tile level.
[0147] S906: Determine the first largest tile level among multiple first tile levels.
[0148] For a detailed description of S901-S906, please refer to the above embodiments, which will not be repeated here.
[0149] S907: Based on a distributed method, determine the absolute spatial coordinates of spatial elements in the first maximum tile level, where the absolute spatial coordinates indicate the spatial coordinates corresponding to the world coordinate system.
[0150] Here, the world coordinate system can refer to the initial coordinate space used for graphic transformation. Absolute spatial coordinates can refer to the coordinate information of spatial elements in the first largest tile level within the world coordinate system.
[0151] This embodiment of the disclosure determines the absolute spatial coordinates of spatial elements in the first maximum tile level, which can trigger subsequent steps to perform coordinate transformation on the absolute spatial coordinates to obtain the first pixel coordinates of the spatial elements in the first maximum tile level. This provides a reliable reference for the subsequent generation of multiple vector tiles corresponding to the spatial elements in the first maximum tile level, and can effectively improve the accuracy of the obtained vector tiles.
[0152] S908: Perform coordinate transformation on the absolute spatial coordinates to obtain the first pixel coordinates of the spatial elements in the first maximum tile level, where the first pixel coordinates indicate the coordinates in the pixel matrix corresponding to the vector tile.
[0153] The first pixel coordinate can refer to the coordinates in the pixel matrix corresponding to the vector tile, obtained by transforming the absolute spatial coordinates obtained above.
[0154] In this embodiment of the disclosure, the coordinate transformation of the absolute spatial coordinates to obtain the first pixel coordinates of the spatial elements in the first maximum tile level can be performed by inputting the absolute spatial coordinates and relevant information in the first maximum tile level into a pre-trained coordinate transformation model to obtain the first pixel coordinates and transmitting them to the execution subject of this embodiment of the disclosure. Alternatively, an engineering method can be used to perform coordinate transformation on the absolute spatial coordinates to obtain the first pixel coordinates of the spatial elements in the first maximum tile level. There is no limitation on this.
[0155] Optionally, in some embodiments, performing coordinate transformation on the absolute spatial coordinates to obtain the first pixel coordinates of the spatial elements in the first maximum tile level can be achieved by determining a reference vector tile, wherein the reference vector tile corresponds to a reference pixel matrix. The coordinate transformation on the absolute spatial coordinates yields the reference pixel coordinates of the spatial elements in the first maximum tile level, where the reference pixel coordinates indicate the coordinates corresponding to the reference pixel matrix where the reference vector tile is located. The reference pixel coordinates are then translated to obtain the first pixel coordinates of the spatial elements in the first maximum tile level. Therefore, determining the reference vector tile effectively improves the specificity of the reference pixel matrix corresponding to the reference vector tile; performing coordinate transformation on the absolute spatial coordinates effectively improves the applicability of the obtained reference pixel coordinates of the spatial elements in the first maximum tile level; and then performing translation on the reference pixel coordinates effectively improves the efficiency of generating multiple vector tiles based on the obtained first pixel coordinates.
[0156] Here, the reference vector tile can refer to any vector tile in the first largest tile level that intersects with a spatial feature. The reference pixel matrix can refer to the reference pixel matrix corresponding to the reference vector tile.
[0157] The reference pixel coordinates can refer to the coordinates of a spatial element in the reference pixel matrix, with a single pixel as the basic unit.
[0158] For example, such as Figure 10 As shown, Figure 10 This is a schematic diagram of coordinate transformation of absolute spatial coordinates proposed in an embodiment of the present disclosure. For a spatial point element sf, it has absolute coordinates (x1, y1) based on the coordinate origin o1 (with the x and y directions as positive directions respectively) and relative coordinates (x2, y2) based on the coordinate origin o2 of the tile title (with the title-x and title-y directions as positive directions respectively). The conversion of absolute coordinates to relative coordinates can refer to the process of converting the coordinates of the spatial element sf from (x1, y1) to (x2, y2).
[0159] Given the range G of the entire spatial coordinate system, its representation Figure 4 Given the spatial range of the root node, the spatial range of any node in the quadtree can be calculated. Let... Figure 10 The spatial range of medium-dark tiles is<minx,maxx,miny,maxy> Then the absolute coordinates of point o2 relative to the origin o1 are (minx, maxy). The formula for calculating the relative coordinates of spatial element sf is: x2 = x1 - minx; y2 = maxy - y1.
[0160] Before encoding, the spatial features in a tile need to be converted into the pixel matrix of that tile. The origin of the pixel coordinates of feature sf and the relative origin o2 are the same point, and the pixel coordinates of a tile in the x and y directions are both from 0 to 4096.
[0161] The spatial length Pixel is obtained by calculating the spatial length Δx and width Δy of the tile. x = Δx ÷ 4096 and width (Pixel) y =Δy÷4096, then the formula for calculating the pixel coordinates corresponding to sf is: Pixel sf-x = x2 ÷ Pixel x Pixel sf-y =y2÷Pixel y .
[0162] S909: Generate multiple vector tiles corresponding to the spatial features of the first maximum tile level based on the first pixel coordinates.
[0163] In other words, after determining the first maximum tile level among multiple first tile levels, this embodiment of the present disclosure can determine the absolute spatial coordinates of spatial elements in the first maximum tile level based on a distributed method. The absolute spatial coordinates indicate spatial coordinates corresponding to the world coordinate system. A coordinate transformation is performed on the absolute spatial coordinates to obtain the first pixel coordinates of the spatial elements in the first maximum tile level. The first pixel coordinates indicate coordinates corresponding to the pixel matrix where the vector tile is located. Based on the first pixel coordinates, multiple vector tiles corresponding to the spatial elements in the first maximum tile level are generated. Therefore, when the absolute spatial coordinates of spatial elements in the first maximum tile level are determined based on a distributed method, the obtained absolute spatial coordinates can effectively characterize the position information of the spatial elements in the first maximum tile level. A coordinate transformation of the absolute spatial coordinates can accurately characterize the coordinates of the spatial elements corresponding to the pixel matrix where the vector tiles are located. Then, based on the first pixel coordinates, multiple vector tiles corresponding to the spatial elements in the first maximum tile level are generated, which can effectively improve the accuracy of the multiple vector tiles corresponding to the spatial elements in the first maximum tile level.
[0164] S910: Generate multiple first pixel tuples corresponding to multiple spatial features, wherein the first pixel tuple includes: the coordinates of the first pixel.
[0165] The first pixel tuple can be a combination of the coordinates of the first pixel and the reference origin corresponding to those coordinates.
[0166] This embodiment generates multiple first pixel tuples corresponding to multiple spatial elements, which can effectively represent the coordinate information of the corresponding spatial elements and provide reliable data support for the subsequent first-processed pixel coordinates.
[0167] S911: Translate multiple first pixel coordinates to obtain multiple first processed pixel coordinates. The multiple first processed pixel coordinates correspond to the same reference pixel coordinate origin, which is the coordinate origin in the reference pixel matrix.
[0168] Translation processing can refer to performing coordinate transformation on the coordinates of the first pixel in multiple first pixel tuples so that the coordinates of the multiple processed first pixel correspond to the same reference pixel coordinate origin.
[0169] It is understandable that the origin of the reference pixel coordinates of the first pixel tuples corresponding to different spatial elements may differ, and these differences will affect the subsequent aggregation process. Therefore, in this embodiment, multiple first pixel coordinates are translated to obtain multiple first processed pixel coordinates, which can effectively improve the uniformity of the obtained multiple first processed pixel coordinates.
[0170] S912: Aggregate multiple first-processed pixel coordinates to obtain first aggregated pixel coordinates.
[0171] The first aggregated pixel coordinates can refer to the multiple pixel coordinates obtained by aggregating the aforementioned multiple first processed pixel coordinates.
[0172] In this embodiment of the disclosure, the first aggregated pixel coordinates can correspond to the spatial feature coordinates of the target tile level, thereby providing a reliable reference for the subsequent generation of multiple vector tiles corresponding to the spatial features of the target tile level.
[0173] S913: Generate multiple vector tiles corresponding to the spatial features of the target tile level based on the coordinates of the first aggregated pixel.
[0174] In this embodiment of the disclosure, when multiple vector tiles corresponding to the spatial features of the target tile level are generated based on the first aggregated pixel coordinates, that is, multiple vector tiles corresponding to the spatial features of the target tile level are obtained based on the pixel coordinate information in the higher-level tile levels of the vector pyramid, the lower-level slicing of the spatial features can be realized.
[0175] In other words, after generating multiple vector tiles corresponding to spatial elements of the first maximum tile level based on the first pixel coordinates, this embodiment can generate multiple first pixel tuples corresponding to the multiple spatial elements. Each first pixel tuple includes: first pixel coordinates; multiple first pixel coordinates are translated to obtain multiple processed first pixel coordinates; the multiple processed first pixel coordinates correspond to the same reference pixel coordinate origin, which is the origin of the reference pixel matrix; the multiple processed first pixel coordinates are aggregated to obtain first aggregated pixel coordinates; and then multiple vector tiles corresponding to spatial elements of the target tile level are generated based on the first aggregated pixel coordinates. Therefore, generating multiple first pixel tuples corresponding to multiple spatial elements effectively reduces data redundancy. Furthermore, translating and aggregating the first pixels provides reliable technical support for obtaining the first aggregated pixel coordinates, thereby effectively improving the accuracy of the multiple vector tiles obtained from the first aggregated pixel coordinates.
[0176] S914: Determine a second tile level from multiple levels, wherein the second tile level is lower than the target tile level.
[0177] For a detailed description of S914, please refer to the above embodiments, which will not be repeated here.
[0178] S915: Generate multiple second pixel tuples corresponding to multiple spatial features of the target tile level, wherein the second pixel tuple includes: second pixel coordinates.
[0179] The second pixel coordinate can refer to the pixel coordinate of the spatial element in the target tile level.
[0180] The second pixel tuple may include the coordinates of the second pixel and the origin of the reference pixel coordinates corresponding to the second pixel coordinates.
[0181] This embodiment generates multiple second pixel tuples corresponding to multiple spatial elements at the target tile level. The resulting second pixel tuples can effectively represent the coordinate information of the corresponding spatial elements, providing reliable data support for the subsequent second-processed pixel coordinates.
[0182] S916: Translate multiple second pixel coordinates to obtain multiple processed second pixel coordinates. The multiple processed second pixel coordinates correspond to the same reference pixel coordinate origin, which is the origin of the coordinates in the reference pixel matrix.
[0183] It is understandable that the origin of the reference pixel coordinates for the second pixel tuples corresponding to different spatial elements may also differ. These differences will affect the subsequent aggregation process. Therefore, in this embodiment, multiple second pixel coordinates are translated to obtain multiple processed second pixel coordinates, which can effectively improve the uniformity of the obtained multiple processed second pixel coordinates.
[0184] S917: Aggregate multiple second-processed pixel coordinates to obtain second aggregated pixel coordinates.
[0185] The second aggregated pixel coordinates can refer to the multiple pixel coordinates obtained by aggregating the aforementioned multiple second processed pixel coordinates.
[0186] In this embodiment of the disclosure, the second aggregated pixel coordinates can correspond to the spatial feature coordinates of the second tile level, thereby providing a reliable reference for the subsequent generation of multiple vector tiles corresponding to the spatial features of the second tile level.
[0187] S918: Generate multiple vector tiles corresponding to the spatial features of the second tile level based on the second aggregated pixel coordinates.
[0188] In this embodiment of the disclosure, when multiple vector tiles corresponding to spatial elements at the second tile level are generated based on the second aggregated pixel coordinates, that is, multiple vector tiles corresponding to spatial elements at the lower tile level are obtained based on the pixel coordinate information in the target tile level in the vector pyramid, upper-layer slicing of the spatial element can be achieved.
[0189] In other words, after determining the second tile level, this embodiment can generate multiple second pixel tuples corresponding to multiple spatial elements of the target tile level. Each second pixel tuple includes second pixel coordinates. Multiple second pixel coordinates are translated to obtain multiple processed second pixel coordinates, all corresponding to the same reference pixel coordinate origin, which is the origin of the reference pixel matrix. These processed second pixel coordinates are then aggregated to obtain second aggregated pixel coordinates. Based on these second aggregated pixel coordinates, multiple vector tiles corresponding to the spatial elements of the second tile level are generated. Therefore, by generating multiple second pixel tuples corresponding to multiple spatial elements of the target tile level, and then translating and aggregating the multiple second pixel coordinates, the efficiency and rationality of obtaining the second aggregated pixel coordinates can be effectively improved. By generating multiple vector tiles corresponding to the spatial elements of the second tile level based on the second aggregated pixel coordinates, upper-level slicing of the spatial elements can be achieved accurately and quickly.
[0190] In this embodiment, the absolute spatial coordinates of spatial elements in the first maximum tile level are determined using a distributed method. These absolute spatial coordinates effectively characterize the positional information of the spatial elements within the first maximum tile level. Coordinate transformation of these absolute spatial coordinates ensures that the resulting first pixel coordinates accurately represent the coordinates of the spatial elements within the pixel matrix of the corresponding vector tiles. Then, based on these first pixel coordinates, multiple vector tiles corresponding to the spatial elements in the first maximum tile level are generated, effectively improving the accuracy of the resulting multiple vector tiles. Generating multiple first pixel tuples corresponding to multiple spatial elements effectively reduces data redundancy. Subsequent translation and aggregation processing of the first pixels provides reliable technical support for obtaining the coordinates of the first aggregated pixel, thereby effectively improving the accuracy of the multiple vector tiles obtained from the first aggregated pixel coordinates. By generating multiple second pixel tuples corresponding to various spatial features at the target tile level, and then performing translation and aggregation processing on the coordinates of these second pixels, the efficiency and accuracy of obtaining the aggregated second pixel coordinates can be effectively improved. Based on these aggregated pixel coordinates, multiple vector tiles corresponding to the spatial features at the second tile level can be generated, enabling accurate and rapid slicing of the upper layer of the spatial features. Determining a reference vector tile effectively improves the specificity of the reference pixel matrix corresponding to the reference vector tile. Coordinate transformation of the absolute spatial coordinates effectively improves the applicability of the reference pixel coordinates for the spatial features in the obtained first maximum tile level. Then, translation processing of the reference pixel coordinates effectively improves the efficiency of subsequently generating multiple vector tiles based on the obtained first pixel coordinates.
[0191] Figure 11 This is a flowchart illustrating a distributed vector slicing method proposed in another embodiment of this disclosure.
[0192] like Figure 11 As shown, this distributed vector slicing method includes:
[0193] S1101: Determine the initial vector data space, wherein the initial vector data space includes: multiple vector data.
[0194] S1102: Determine the target tile level, wherein the target tile level describes the level in the vector pyramid corresponding to the first vector tile, and the first vector tile belongs to multiple vector tiles.
[0195] S1103: Divide the initial vector data space according to the target tile level to generate multiple spatial partitions.
[0196] S1104: Perform load balancing on the spatial partition to obtain the target spatial partition.
[0197] S1105: Determine the first tile level from multiple levels, wherein the first tile level is higher than the target tile level.
[0198] S1106: Based on a distributed method, vector slicing is performed on the spatial features of the target tile level and the first tile level to obtain multiple vector tiles.
[0199] S1107: Determine a second tile level from multiple levels, wherein the second tile level is lower than the target tile level.
[0200] S1108: Generate multiple second pixel tuples corresponding to multiple spatial features of the target tile level, wherein the second pixel tuples include: second pixel coordinates.
[0201] S1109: Translate multiple second pixel coordinates to obtain multiple processed second pixel coordinates. The multiple processed second pixel coordinates correspond to the same reference pixel coordinate origin, which is the origin of the coordinates in the reference pixel matrix.
[0202] For a detailed description of S1101-S1109, please refer to the above embodiments, which will not be repeated here.
[0203] S1110: Perform deduplication on multiple second-processed pixel coordinates to obtain second deduplicated pixel coordinates.
[0204] It is understandable that in the target tile level, a single spatial feature may intersect with multiple vector tiles, and the multiple vector tiles intersecting with the spatial feature all contain relevant information about the spatial feature. Therefore, deduplication of multiple second-processed pixel coordinates can effectively reduce the information redundancy among multiple second-processed pixel coordinates.
[0205] Deduplication can refer to retaining only the relevant information of a spatial feature in one vector tile, while removing the relevant information of that spatial feature in other vector tiles.
[0206] The second deduplication pixel coordinates refer to the pixel coordinates obtained after the second processing pixel coordinates have undergone deduplication processing.
[0207] In this embodiment of the disclosure, multiple second-processed pixel coordinates are deduplicated to obtain second-deduplicated pixel coordinates. This can be achieved by comparing and analyzing the multiple second-processed pixel coordinates to identify duplicate spatial element information, and then removing the duplicate spatial element information to obtain the second-deduplicated pixel coordinates. Alternatively, the multiple second-processed pixel coordinates can be input into a pre-trained deduplication model to obtain the second-deduplicated pixel coordinates, and then transmitted to the execution subject of this embodiment of the disclosure. No limitation is imposed on this method.
[0208] Optionally, in some embodiments, deduplication processing is performed on multiple second-processed pixel coordinates to obtain second deduplicated pixel coordinates. This can be achieved by determining the spatial feature to which the second-processed pixel coordinates belong, determining the first minimum bounding rectangle corresponding to the target tile level for the spatial feature, determining the second minimum bounding rectangle of the adjacent second tile level corresponding to the spatial feature for the target tile level, determining the intersection area information of the first and second minimum bounding rectangles, and performing deduplication processing on multiple second-processed pixel coordinates based on the intersection area information to obtain the second deduplicated pixel coordinates. Thus, when multiple second-processed pixel coordinates are deduplicated based on the intersection area information of the first and second minimum bounding rectangles, a reliable reference basis can be provided for the deduplication process, thereby effectively improving the deduplication effect on multiple second-processed pixel coordinates.
[0209] The minimum bounding rectangle can be defined as the smallest rectangle in the pixel coordinate system whose length and width are parallel to the X and Y axes of the pixel coordinate system, and which can contain spatial elements. The first minimum bounding rectangle can be defined as the smallest bounding rectangle of the spatial elements corresponding to the target tile level; the second minimum bounding rectangle can be defined as the smallest bounding rectangle of the adjacent second tile level of the spatial elements corresponding to the target tile level.
[0210] The intersecting region can refer to the intersection of the first minimum bounding rectangle and the second minimum bounding rectangle, and this intersecting region may intersect with one or more pixel matrices. The intersecting region information can refer to the coordinate information of the intersecting region, the number of pixel matrices, etc., without limitation.
[0211] S1111: Sample multiple second deduplicated pixel coordinates to obtain second sampled pixel coordinates.
[0212] Sampling processing refers to selecting a portion of the second deduplicated pixel coordinates from multiple second deduplicated pixel coordinates according to a pre-configured selection scheme, and using these as the second sampled pixel coordinates.
[0213] The second sampled pixel coordinates refer to the pixel coordinates obtained by sampling the above multiple second deduplicated pixel coordinates.
[0214] In this embodiment of the disclosure, sampling processing of multiple second deduplicated pixel coordinates can effectively reduce the number of spatial elements in the vector tile without losing spatial distribution features, thereby reducing the amount of stored information in the vector tile and effectively speeding up the display speed of the vector tile.
[0215] S1112: Aggregate multiple second sampled pixel coordinates to obtain second aggregated pixel coordinates.
[0216] In this embodiment of the disclosure, when multiple second sampled pixel coordinates are aggregated to obtain second aggregated pixel coordinates, the applicability of the second aggregated pixel coordinates can be effectively improved.
[0217] In other words, in this embodiment of the present disclosure, after performing translation processing on multiple second pixel coordinates to obtain multiple second processed pixel coordinates, the multiple second processed pixel coordinates can be deduplicated to obtain second deduplicated pixel coordinates. The multiple second deduplicated pixel coordinates are then sampled to obtain second sampled pixel coordinates. Finally, the multiple second sampled pixel coordinates are aggregated to obtain second aggregated pixel coordinates. Thus, when multiple second processed pixel coordinates are deduplicated, the uniqueness of the second sampled pixel coordinates can be effectively improved. When multiple second deduplicated pixel coordinates are sampled, the number of spatial elements in the tile can be reduced while ensuring the spatial distribution characteristics of the spatial elements. This effectively avoids affecting the display speed and storage space of the tile due to too many elements. Then, when multiple second sampled pixel coordinates are aggregated, it provides effective technical support for the acquisition process of the second aggregated pixel coordinates.
[0218] S1113: Generate multiple vector tiles corresponding to the spatial features of the second tile level based on the second aggregated pixel coordinates.
[0219] For a detailed description of S1113, please refer to the above embodiments, which will not be repeated here.
[0220] In this embodiment, by deduplicating multiple second-processed pixel coordinates, the uniqueness of the second-sampled pixel coordinates can be effectively improved. Sampling multiple deduplicated second pixel coordinates reduces the number of spatial elements in the tile while maintaining the spatial distribution characteristics of the spatial elements, thus effectively avoiding the impact of excessive elements on the tile's display speed and storage space. Then, aggregating the multiple second-sampled pixel coordinates provides effective technical support for the acquisition of the second aggregated pixel coordinates. When deduplicating multiple second-processed pixel coordinates based on the intersection area information of the first and second minimum bounding rectangles, a reliable reference basis is provided for the deduplication process, thereby effectively improving the deduplication effect on multiple second-processed pixel coordinates.
[0221] Figure 12 This is a flowchart illustrating a distributed vector slicing method proposed in another embodiment of this disclosure.
[0222] like Figure 12 As shown, this distributed vector slicing method includes:
[0223] S1201: Determine the initial vector data space, wherein the initial vector data space includes: multiple vector data.
[0224] S1202: Determine the target tile level, wherein the target tile level describes the level in the vector pyramid corresponding to the first vector tile, and the first vector tile belongs to multiple vector tiles.
[0225] S1203: Divide the initial vector data space according to the target tile level to generate multiple spatial partitions.
[0226] S1204: Perform load balancing on the spatial partition to obtain the target spatial partition.
[0227] S1205: Determine the first tile level from multiple levels, wherein the first tile level is higher than the target tile level.
[0228] S1206: Based on a distributed method, vector slicing is performed on the spatial features of the target tile level and the first tile level to obtain multiple vector tiles.
[0229] S1207: Determine a second tile level from multiple levels, wherein the second tile level is lower than the target tile level.
[0230] S1208: Generate multiple second pixel tuples corresponding to multiple spatial features of the target tile level, wherein the second pixel tuple includes: second pixel coordinates.
[0231] S1209: Translate multiple second pixel coordinates to obtain multiple processed second pixel coordinates. The multiple processed second pixel coordinates correspond to the same reference pixel coordinate origin, which is the origin of the coordinates in the reference pixel matrix.
[0232] S1210: Determine the spatial feature to which the coordinates of the second processed pixel belong.
[0233] S1211: Determine the first minimum bounding rectangle of the spatial feature corresponding to the target tile level.
[0234] S1212: Determine the second minimum bounding rectangle of the adjacent second tile level corresponding to the target tile level for the spatial feature.
[0235] The descriptions of S1201-S1212 can be found in the above embodiments, and will not be repeated here.
[0236] S1213: Determine the intersecting rectangular region of the first minimum bounding rectangle and the second minimum bounding rectangle.
[0237] The intersecting rectangular region can refer to a rectangular region formed by the intersection of the first minimum bounding rectangle and the second minimum bounding rectangle.
[0238] In this embodiment of the disclosure, by determining the intersecting rectangular region of the first minimum bounding rectangle and the second minimum bounding rectangle, the number of analysis objects in the subsequent processing can be effectively reduced, thereby effectively improving the targeting of the distributed vector slicing processing process.
[0239] S1214: Use the target pixel information in the intersecting rectangular region as the intersection region information.
[0240] The target pixel can refer to a pixel selected within the intersecting rectangular region. The position of this target pixel can be flexibly configured according to the application scenario, such as the upper right corner or lower right corner of the intersecting rectangular region, without restriction. The target pixel information can refer to the coordinates of the target pixel, or it can refer to any other possible related information, without restriction.
[0241] Optionally, in some embodiments, the target pixel information in the intersecting rectangular region is used as the intersecting region information. Specifically, the target pixel information in the lower left corner of the intersecting rectangular region can be used as the intersecting region information. This can provide a reliable reference for the determination of the intersecting region information and effectively improve the standardization and uniformity of the execution process of the distributed vector slicing method.
[0242] In other words, after determining the first minimum bounding rectangle and the second minimum bounding rectangle, the embodiments of this disclosure can determine the intersecting rectangle region of the first minimum bounding rectangle and the second minimum bounding rectangle. Then, the target pixel information in the intersecting rectangle region is used as the intersection region information. Since the pixel information in the intersecting rectangle region has a high degree of uniqueness, when the target pixel information in the intersecting rectangle region is used as the intersection region information, the relevance and applicability of the obtained intersection region information can be effectively improved.
[0243] S1215: Determine the target spatial features in the second tile level corresponding to the intersecting region information.
[0244] Among them, target spatial elements refer to spatial elements determined from the second tile level based on intersecting region information.
[0245] It is understandable that in a vector pyramid, the second tile level is lower than the target tile level, and the second tile level is adjacent to the target tile level. According to the characteristics of the vector pyramid, a single vector tile in the second tile level corresponds to four vector tiles in the target tile level, and there may be multiple vector tiles containing the attribute information of the same spatial feature among these four vector tiles. Therefore, when the target spatial feature in the second tile level is determined based on the intersection area information, the same spatial feature can be effectively avoided from being copied multiple times in the second vector tile, thereby effectively improving the uniqueness of the target spatial feature in the obtained second tile level.
[0246] S1216: Use the second processed pixel coordinates corresponding to the target spatial feature as the second deduplication pixel coordinates.
[0247] In this embodiment of the disclosure, since the target spatial elements obtained above are unique, when the second processed pixel coordinates corresponding to the target spatial elements are used as the second deduplication pixel coordinates, the deduplication of the second processed pixel coordinates can be accurately and quickly realized, thereby effectively improving the rationality and applicability of the obtained second deduplication pixel coordinates.
[0248] In other words, after obtaining the intersection region information, the present embodiment can determine the target spatial element in the second tile level corresponding to the intersection region information, and then use the second processed pixel coordinates corresponding to the target spatial element as the second deduplication pixel coordinates. Thus, when the target spatial element in the second tile level corresponding to the intersection region information is determined, the uniqueness of the target spatial element can be effectively improved. Then, using the second processed pixel coordinates corresponding to the target spatial element as the second deduplication pixel coordinates can effectively improve the deduplication effect of the second processed pixel coordinates.
[0249] S1217: Sample multiple second deduplicated pixel coordinates to obtain second sampled pixel coordinates.
[0250] S1218: Aggregate multiple second sampled pixel coordinates to obtain second aggregated pixel coordinates.
[0251] S1219: Generate multiple vector tiles corresponding to the spatial features of the second tile level based on the second aggregated pixel coordinates.
[0252] The descriptions of S1217-S1219 can be found in the above embodiments, and will not be repeated here.
[0253] For example, such as Figure 13 As shown, Figure 13 This is a schematic diagram of a spatial element in different tile levels according to an embodiment of this disclosure, wherein the spatial element is a solid line element, and the dashed frame is the smallest bounding rectangle of the line element in different tile levels. Figure 13 If the spatial partition level p is 2 and the maximum level maxLevel of the vector slice is 4, then a sub-quadtree can be generated with spatial partition 15 as the root node. The level of the leaf node of the sub-quadtree is equal to maxLevel. Each quadtree node has a minimum bounding rectangle (MBR) to represent its spatial extent.
[0254] Then, spatial elements can be assigned to multiple quadtree nodes that intersect with its smallest bounding rectangle sf.mbr. Based on the correspondence between quadtrees and vector pyramids, one quadtree node corresponds to one vector tile, and the spatial elements contained within it are the spatial elements that the vector tile needs to encode. Figure 13 Line elements can be encoded in tile number 15 of layer 2, tiles number 60 and 61 of layer 3, and tiles number 241, 243, 244 and 246 of layer 4.
[0255] from Figure 13 As can be seen, in levels 3 and 4, line features are encoded into multiple different vector tiles, and the pixel coordinates of the line features are different in different vector tiles. In order to reduce the overhead of calculating pixel coordinates, this embodiment of the disclosure can use a pixel coordinate calculation method that combines translation and aggregation, and the specific steps are as follows:
[0256] Step 1: Assignment. At the maxLevel level, using the pixel origin of the top-left tile (tile 240) as the reference point, calculate the pixel coordinates of the spatial feature. The resulting pixel coordinates may exceed the range of 4096 pixels because all vector tiles use a uniform coordinate origin. This yields a tuple (r, sf), where sf is the spatial feature represented by pixel coordinates, and r is the reference coordinate origin of sf. The initial value of r is (0, 0).
[0257] Step 2: Translation. For multiple vector tiles at the maxLevel layer, translate the spatial features they contain so that the origin of each spatial feature is the coordinates of the top-left corner of the tile. Then, encode the multiple spatial features in the vector tile to generate a single vector tile. Other vector tiles at this level can be generated in the same way.
[0258] For example, let the pixel coordinates of the top left corner of vector tile t relative to the origin (0, 0) be (Pixel... t-x Pixel t-y For a pair (r, sf) that intersects with it, the pixel offsets in the x and y directions can be calculated as: ΔPixel x =Pixel t-x -r x ΔPixel y =Pixel t-y -r y Then, for each pixel coordinate point (c) in sf x c y The pixel coordinates (c) are translated to obtain the translated pixel coordinates. x -ΔPixel x ,c y-ΔPixel y ), and update the reference point r of sf to (Pixel t-x Pixel t-y This yields the spatial element sf with the top-left corner of the current vector tile as the pixel origin.
[0259] It should be noted that a spatial feature sf maintains only one tuple (r, sf), and multiple tiles that intersect with feature sf reference this single tuple, reducing data redundancy.
[0260] Step 3: Aggregation. For the level above maxLevel ( Figure 13 In the third layer (of the system), the features of each tile can be obtained by aggregating the features of the maxLevel layer.
[0261] The pixel coordinates of the pixel tuple (r, sf) correspond to the relative pixel coordinates of the maxLevel layer, meaning that the reference origin r of each sf is different. Therefore, all tuples can be pixel-shifted to unify their coordinate origin to the top-left corner of the top-left tile (tile 240). The pixel coordinates of each feature sf are then aggregated to obtain feature tuples at the 3rd level with the top-left corner of the top-left tile (tile 60) as their pixel origin. The method described in step 2 is then repeated to generate all vector tiles at the 3rd level.
[0262] Let the pixel coordinates of element sf in layer 4, with the top-left corner of tile number 240 as the origin, be (c x-4 ,c y-4 In the third layer, with the top left corner of tile number 60 as the origin, the pixel coordinates are (c x-3 c y-3 The aggregation formula is: c x-3 =c x-4 ÷2, c y-3 =c y-4 ÷2, these two formulas can be simplified into integer displacement operations to speed up calculation efficiency.
[0263] Therefore, by recursively using steps 2 and 3 from bottom to top, vector tiles for the current partition and lower levels can be generated to achieve lower-level slicing in the vector slicing process.
[0264] The upper-level slicing process involves generating multiple vector tiles between the partition level p and minLevel (inclusive). Using the aggregation method described in step 3 above, the spatial features in every four partitions are aggregated to form the features in the parent node's vector tile, and then encoded to obtain the parent node's vector tile.
[0265] The difference between aggregation operations in the lower-level slicing process and those in the upper-level slicing process is that aggregation in the upper-level slicing occurs at the partition level p, that is, between Spark partitions. Therefore, the dataset can be repartitioned before aggregation operations. Let each partition be numbered i. According to the properties of the vector pyramid, the tile number of its parent node is j = i / 4, as shown below. Figure 14 As shown, Figure 14 This is a schematic diagram of a higher-level tile proposed in an embodiment of this disclosure, wherein the parent node of spatial partitions 12, 13, 14, and 15 is numbered 3. Repartitioning is performed using Spark's partitioning operator, grouping the features from the four partitions with the same parent node into a Spark partition. These features are then deduplicated, sampled, aggregated, and used to generate vector tiles for the parent node, as shown in the following steps:
[0266] Step 1: Deduplication. When allocating spatial features, they are distributed to multiple spatial partitions that intersect with the minimum bounding rectangle sf.mbr. This results in multiple copies of a spatial feature appearing in the parent node when aggregating these multiple spatial partitions. To ensure uniqueness, deduplication of spatial features in the parent node can be performed.
[0267] A deduplication strategy could be to take the lower left corner of the intersection of sf.mbr and the parent node MBR as the reference point, retain the features in the child nodes to which the reference point belongs, and discard the features sf from other child nodes as duplicate results. Figure 14 In the example, for parent node 3, the polygonal spatial features may come from spatial partitions 12 and 13. The reference point is located in spatial partition 12, so only the features in spatial partition 12 are retained, while the features in spatial partition 13 are discarded.
[0268] Step 2: Sampling. To speed up display and effectively utilize tile storage space, the size of vector tiles is usually limited. To avoid an excessive number of spatial features in the parent node, spatial features in the parent node can be randomly sampled to reduce the number of spatial features in the tile without losing spatial distribution characteristics. The sampling rate can be determined based on specific visualization needs and is not limited thereto.
[0269] Step 3: Aggregation. In the parent node, the deduplicated and sampled spatial features are aggregated using the method in the lower layer slicing process to obtain the features in the parent node tiles. Encoding the features yields the vector tiles of the parent node.
[0270] By employing the three steps described above, Spark repartitioning, deduplication, sampling, and aggregation are performed recursively layer by layer, generating all vector tiles from the minimum level minLevel to the target tile level p, thus achieving upper-level slicing in the vector slicing process.
[0271] In this embodiment, by determining the intersection region of the first and second minimum bounding rectangles, and then using the target pixel information within the intersection region as the intersection region information, the uniqueness of pixel information within the intersection region is high. Using the target pixel information within the intersection region as the intersection region information effectively improves the relevance and applicability of the obtained intersection region information. When the target spatial element in the second tile level corresponding to the intersection region information is determined, the uniqueness of the target spatial element is effectively improved. Then, using the second processed pixel coordinates corresponding to the target spatial element as the second deduplication pixel coordinates effectively improves the deduplication effect on the second processed pixel coordinates. Because the uniqueness of pixel information within the intersection region is high, using the target pixel information within the intersection region as the intersection region information effectively improves the relevance and applicability of the obtained intersection region information.
[0272] Figure 15 This is a schematic diagram of the structure of a distributed vector slicing device proposed in an embodiment of this disclosure.
[0273] As shown in the figure, the distributed vector slicing device 150 includes:
[0274] The determination module 1501 is used to determine the initial vector data space, wherein the initial vector data space includes: multiple vector data;
[0275] The generation module 1502 is used to divide the initial vector data space and generate multiple spatial partitions. The spatial partitions include multiple spatial features, and the spatial features describe the attribute information corresponding to the vector data in the corresponding spatial partition.
[0276] The first processing module 1503 is used to perform vector slicing on spatial elements in multiple spatial partitions based on a distributed method to obtain multiple vector tiles.
[0277] In some embodiments of this disclosure, such as Figure 16 As shown, Figure 16 This is a schematic diagram of a distributed vector slicing device 150 according to another embodiment of the present disclosure, which further includes:
[0278] The second processing module 1504 is used to perform load balancing processing on the spatial partitions to obtain the target spatial partitions.
[0279] The first processing module 1503 is specifically used for:
[0280] Based on a distributed method, spatial elements in multiple target spatial partitions are vector-sliced to obtain multiple vector tiles.
[0281] In some embodiments of this disclosure, the second processing module 1504 includes:
[0282] The first determining submodule 15041 is used to determine the tilted spatial partition and the balanced spatial partition from multiple spatial partitions;
[0283] The first processing submodule 15042 is used to perform target processing on the tilted spatial partition to obtain the processed spatial partition.
[0284] The second determining submodule 15043 is used to treat the balanced spatial partition and the processed spatial partition as multiple target spatial partitions.
[0285] In some embodiments of this disclosure, the first processing submodule 15042 is specifically used for:
[0286] Based on the spatial elements in the slanted spatial partition, a sample vector data space is formed;
[0287] The initial vector data space is iteratively updated based on the sample vector data space until the spatial elements in the updated spatial partition meet the set conditions. The updated spatial partition is then used as the processed spatial partition.
[0288] In some embodiments of this disclosure, the first determining submodule 15041 is specifically used for:
[0289] Determine multiple data skewnesses corresponding to multiple spatial partitions, where data skewness is used to describe the quantitative comparison between multiple spatial elements in the corresponding spatial partition and sample spatial elements;
[0290] Based on the data skewness, skewed spatial partitions and balanced spatial partitions are determined from multiple spatial partitions.
[0291] In some embodiments of this disclosure, the first determining submodule 15041 is further configured to:
[0292] When the data skewness is greater than the skewness threshold, the spatial partition to which the data skewness belongs is designated as the skewed spatial partition.
[0293] When the data skewness is less than or equal to the skewness threshold, the spatial partition to which the data skewness belongs is designated as the balanced spatial partition.
[0294] In some embodiments of this disclosure, the generation module 1502 is specifically used for:
[0295] Determine the target tile level, where the target tile level describes the level in the vector pyramid corresponding to the first vector tile, and the first vector tile belongs to multiple vector tiles;
[0296] The initial vector data space is divided according to the target tile level, generating multiple spatial partitions.
[0297] In some embodiments of this disclosure, the vector pyramid has multiple levels;
[0298] The first processing module 1503 includes:
[0299] The third determining submodule 15031 is used to determine the first tile level from multiple levels, wherein the first tile level is higher than the target tile level;
[0300] The second processing submodule 15032 is used to perform vector slicing on the spatial features of the target tile level and the first tile level based on a distributed method to obtain multiple vector tiles.
[0301] In some embodiments of this disclosure, the number of levels in the first tile layer is multiple;
[0302] The second processing submodule 15032 is specifically used for:
[0303] Determine the first largest tile level among multiple first tile levels;
[0304] Based on a distributed method, the spatial features of the first maximum tile level are vector sliced to obtain multiple vector tiles corresponding to the spatial features of the first maximum tile level.
[0305] Multiple vector tiles corresponding to spatial features at the first maximum tile level are aggregated layer by layer to obtain multiple vector tiles corresponding to spatial features at the target tile level.
[0306] In some embodiments of this disclosure, the first processing module 1503 further includes:
[0307] The fourth determining submodule 15033 is used to determine the second tile level from multiple levels, wherein the second tile level is lower than the target tile level;
[0308] The third processing submodule 15034 is used to aggregate multiple vector tiles at the target tile level to obtain multiple vector tiles corresponding to the spatial elements at the second tile level.
[0309] In some embodiments of this disclosure, the number of levels in the second tile layer is multiple;
[0310] The third processing submodule 15034 is specifically used for:
[0311] Multiple vector tiles at the target tile level are aggregated layer by layer to obtain multiple vector tiles corresponding to the spatial elements of each second tile level.
[0312] In some embodiments of this disclosure, the second processing submodule 15032 is further configured to:
[0313] Based on a distributed approach, the absolute spatial coordinates of spatial elements in the first maximum tile level are determined, where the absolute spatial coordinates indicate the spatial coordinates corresponding to the world coordinate system.
[0314] Perform coordinate transformation on the absolute spatial coordinates to obtain the first pixel coordinates of the spatial elements in the first maximum tile level, where the first pixel coordinates indicate the coordinates in the pixel matrix corresponding to the vector tile.
[0315] Based on the first pixel coordinates, generate multiple vector tiles corresponding to the spatial features of the first maximum tile level.
[0316] In some embodiments of this disclosure, the second processing submodule 15032 is further configured to:
[0317] Determine the reference vector tile, where the reference vector tile corresponds to the reference pixel matrix;
[0318] The absolute spatial coordinates are transformed to obtain the reference pixel coordinates of the spatial elements in the first maximum tile level. The reference pixel coordinates indicate the coordinates in the reference pixel matrix corresponding to the reference vector tile.
[0319] The reference pixel coordinates are translated to obtain the first pixel coordinates of the spatial elements in the first largest tile level.
[0320] In some embodiments of this disclosure, the second processing submodule 15032 is further configured to:
[0321] Generate multiple first pixel tuples corresponding to multiple spatial features, wherein each first pixel tuple includes: the coordinates of the first pixel;
[0322] Multiple first pixel coordinates are translated to obtain multiple first processed pixel coordinates. The multiple first processed pixel coordinates correspond to the same reference pixel coordinate origin, which is the coordinate origin in the reference pixel matrix.
[0323] Multiple first-processed pixel coordinates are aggregated to obtain first aggregated pixel coordinates;
[0324] Based on the coordinates of the first aggregated pixel, generate multiple vector tiles corresponding to the spatial features of the target tile level.
[0325] In some embodiments of this disclosure, the third processing submodule 15034 is further configured to:
[0326] Generate multiple second pixel tuples corresponding to multiple spatial features at the target tile level, wherein the second pixel tuple includes: second pixel coordinates;
[0327] Multiple second pixel coordinates are translated to obtain multiple processed second pixel coordinates. The multiple processed second pixel coordinates correspond to the same reference pixel coordinate origin, which is the coordinate origin in the reference pixel matrix.
[0328] Multiple second-processed pixel coordinates are aggregated to obtain second aggregated pixel coordinates;
[0329] Based on the second aggregated pixel coordinates, generate multiple vector tiles corresponding to the spatial features of the second tile level.
[0330] In some embodiments of this disclosure, the third processing submodule 15034 is further configured to:
[0331] Multiple second-processed pixel coordinates are deduplicated to obtain the second deduplicated pixel coordinates;
[0332] Multiple second-deduplication pixel coordinates are sampled to obtain the second-sampled pixel coordinates;
[0333] The process involves aggregating multiple second-processed pixel coordinates to obtain second-aggregated pixel coordinates, including:
[0334] Multiple second-sampled pixel coordinates are aggregated to obtain second aggregated pixel coordinates.
[0335] In some embodiments of this disclosure, the third processing submodule 15034 is further configured to:
[0336] Determine the spatial element to which the coordinates of the second processed pixel belong;
[0337] Determine the first minimum bounding rectangle of the spatial feature corresponding to the target tile level;
[0338] Determine the second minimum bounding rectangle of the adjacent second tile level corresponding to the target tile level for the spatial feature;
[0339] Determine the intersection region information of the first minimum bounding rectangle and the second minimum bounding rectangle;
[0340] Based on the intersecting region information, multiple second-processed pixel coordinates are deduplicated to obtain the second deduplicated pixel coordinates.
[0341] In some embodiments of this disclosure, the third processing submodule 15034 is further configured to:
[0342] Determine the target spatial elements in the second tile level corresponding to the intersecting region information;
[0343] Use the second processed pixel coordinates corresponding to the target spatial features as the second deduplication pixel coordinates.
[0344] In some embodiments of this disclosure, the third processing submodule 15034 is further configured to:
[0345] Determine the intersecting rectangular region of the first minimum bounding rectangle and the second minimum bounding rectangle;
[0346] The target pixel information within the intersecting rectangular region is used as the intersection region information.
[0347] In some embodiments of this disclosure, the third processing submodule 15034 is further configured to:
[0348] The target pixel information at the bottom left corner of the intersecting rectangular region is used as the intersection region information.
[0349] It should be noted that the foregoing explanation of the distributed vector slicing method also applies to the distributed vector slicing device of this embodiment, and will not be repeated here.
[0350] In this embodiment, an initial vector data space is determined, which includes multiple vector data. The initial vector data space is then divided to generate multiple spatial partitions, each of which includes multiple spatial features. Each spatial feature describes the attribute information corresponding to the vector data in its respective spatial partition. Then, vector slicing is performed on the spatial features in the multiple spatial partitions using a distributed method to obtain multiple vector tiles. This enables distributed slicing of large-scale vector data, effectively reducing the cost of vector data processing and thus significantly improving the practicality and convenience of the vector slicing process.
[0351] Figure 17 A block diagram of an exemplary computer device suitable for implementing embodiments of the present disclosure is shown. Figure 17 The computer device 12 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.
[0352] like Figure 17 As shown, the computer device 12 is represented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0353] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0354] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0355] Memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 17 Not shown; usually referred to as a "hard drive".
[0356] although Figure 17 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a Compact Disc Read-Only Memory (CD-ROM), a Digital Video Disc Read-Only Memory (DVD-ROM), or other optical media). In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this disclosure.
[0357] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of this disclosure.
[0358] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable human interaction with the computer device 12, and / or with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0359] The processing unit 16 executes various functional applications and distributed vector slicing by running programs stored in the system memory 28, such as implementing the distributed vector slicing method mentioned in the foregoing embodiments.
[0360] To implement the above embodiments, this disclosure also proposes a non-transitory computer-readable storage medium storing a computer program that, when executed by a processor, implements the distributed vector slicing method as proposed in the foregoing embodiments of this disclosure.
[0361] To implement the above embodiments, this disclosure also proposes a computer program product that, when executed by an instruction processor, performs the distributed vector slicing method as proposed in the foregoing embodiments of this disclosure.
[0362] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0363] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
[0364] It should be noted that in the description of this disclosure, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this disclosure, unless otherwise stated, "a plurality of" means two or more.
[0365] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the function involved, as will be understood by those skilled in the art to which embodiments of this disclosure pertain.
[0366] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0367] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0368] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0369] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.
[0370] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0371] Although embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present disclosure.
Claims
1. A distributed vector slicing method, characterized in that, include: Determine an initial vector data space, wherein the initial vector data space includes: multiple vector data; The initial vector data space is divided to generate multiple spatial partitions, wherein each spatial partition includes multiple spatial elements, and each spatial element describes the attribute information corresponding to the vector data in the corresponding spatial partition; Determine the skewed spatial partition and the balanced spatial partition from the plurality of spatial partitions; Based on the spatial elements in the tilted spatial partition, a sample vector data space is formed; The initial vector data space is iteratively updated according to the sample vector data space until the spatial elements in the spatial partition after the iterative update meet the set conditions, and the updated spatial partition is used as the processed spatial partition. The balanced spatial partition and the processed spatial partition are used as multiple target spatial partitions; Based on a distributed method, spatial elements in the multiple target spatial partitions are vector-sliced to obtain multiple vector tiles.
2. The method as described in claim 1, characterized in that, The step of determining the tilted spatial partition and the balanced spatial partition from the plurality of spatial partitions includes: Determine multiple data skewnesses corresponding to the multiple spatial partitions respectively, wherein the data skewness is used to describe the quantitative comparison between the multiple spatial elements in the corresponding spatial partition and the sample spatial elements; Based on the data tilt, tilted spatial partitions and balanced spatial partitions are determined from the plurality of spatial partitions.
3. The method as described in claim 2, characterized in that, The step of determining the skewed spatial partition and the balanced spatial partition from the plurality of spatial partitions based on the data skewness includes: If the data skewness is greater than the skewness threshold, then the spatial partition to which the data skewness belongs is the skewed spatial partition. If the data skewness is less than or equal to the skewness threshold, then the spatial partition to which the data skewness belongs is designated as the balanced spatial partition.
4. The method as described in claim 2, characterized in that, The process of dividing the initial vector data space to generate multiple spatial partitions includes: Determine the target tile level, wherein the target tile level describes the level in the vector pyramid corresponding to the first vector tile, and the first vector tile belongs to the plurality of vector tiles; The initial vector data space is divided according to the target tile level to generate the multiple spatial partitions.
5. The method as described in claim 4, characterized in that, The vector pyramid has multiple levels. Specifically, a distributed method is used to perform vector slicing on spatial features in multiple target spatial partitions to obtain the multiple vector tiles, including: A first tile level is determined from the plurality of said levels, wherein the first tile level is higher than the target tile level; Based on the distributed method, the spatial features of the target tile level and the first tile level are vector sliced to obtain the plurality of vector tiles.
6. The method as described in claim 5, characterized in that, The number of layers in the first tile level is multiple; The step of performing vector slicing on the spatial features of the target tile level and the first tile level based on the distributed method to obtain the plurality of vector tiles includes: Determine the first largest tile level among multiple first tile levels; Based on the distributed method, the spatial features of the first maximum tile level are vector sliced to obtain multiple vector tiles corresponding to the spatial features of the first maximum tile level. Multiple vector tiles corresponding to the spatial features of the first maximum tile level are aggregated layer by layer to obtain multiple vector tiles corresponding to the spatial features of the target tile level.
7. The method as described in claim 5, characterized in that, After performing vector slicing on the spatial features of the target tile level and the first tile level based on the distributed method to obtain the plurality of vector tiles, the method further includes: A second tile level is determined from the plurality of said levels, wherein the second tile level is lower than the target tile level; Multiple vector tiles at the target tile level are aggregated to obtain multiple vector tiles corresponding to the spatial elements of the second tile level.
8. The method as described in claim 7, characterized in that, The second tile layer has multiple layers; The step of aggregating multiple vector tiles at the target tile level to obtain multiple vector tiles corresponding to spatial elements at the second tile level includes: Multiple vector tiles at the target tile level are aggregated layer by layer to obtain multiple vector tiles corresponding to the spatial elements of each second tile level.
9. The method as described in claim 7, characterized in that, Based on the distributed method, spatial features at the first maximum tile level are vector-sliced to obtain multiple vector tiles corresponding to the spatial features at the first maximum tile level, including: Based on the distributed method, the absolute spatial coordinates of spatial elements in the first maximum tile level are determined, wherein the absolute spatial coordinates indicate spatial coordinates corresponding to the world coordinate system; The absolute spatial coordinates are transformed to obtain the first pixel coordinates of the spatial elements in the first maximum tile level, wherein the first pixel coordinates indicate the coordinates in the pixel matrix where the vector tile is located. Based on the first pixel coordinates, generate multiple vector tiles corresponding to the spatial features of the first maximum tile level.
10. The method as described in claim 9, characterized in that, The step of performing coordinate transformation on the absolute spatial coordinates to obtain the first pixel coordinates of the spatial elements in the first maximum tile level includes: Determine a reference vector tile, wherein the reference vector tile corresponds to a reference pixel matrix; The absolute spatial coordinates are transformed to obtain the reference pixel coordinates of the spatial elements in the first maximum tile level, wherein the reference pixel coordinates indicate the coordinates corresponding to the reference vector tile in the reference pixel matrix; The reference pixel coordinates are translated to obtain the first pixel coordinates of the spatial elements in the first maximum tile level.
11. The method as described in claim 10, characterized in that, Multiple vector tiles corresponding to spatial features at the first maximum tile level are aggregated layer by layer to obtain multiple vector tiles corresponding to spatial features at the target tile level, including: Generate multiple first pixel tuples corresponding to the multiple spatial elements, wherein the first pixel tuple includes: the coordinates of the first pixel; The multiple first pixel coordinates are translated to obtain multiple first processed pixel coordinates, wherein the multiple first processed pixel coordinates correspond to the same reference pixel coordinate origin, and the reference pixel coordinate origin is the coordinate origin in the reference pixel matrix; The multiple first-processed pixel coordinates are aggregated to obtain first aggregated pixel coordinates; Based on the first aggregated pixel coordinates, multiple vector tiles corresponding to the spatial features of the target tile level are generated.
12. The method as described in claim 8, characterized in that, The aggregation process of multiple vector tiles at the target tile level to obtain multiple vector tiles corresponding to the spatial elements of the second tile level includes: Generate multiple second pixel tuples corresponding to multiple spatial features of the target tile level, wherein the second pixel tuple includes: second pixel coordinates; The multiple second pixel coordinates are translated to obtain multiple second processed pixel coordinates, wherein the multiple second processed pixel coordinates correspond to the same reference pixel coordinate origin, and the reference pixel coordinate origin is the coordinate origin in the reference pixel matrix; The multiple second-processed pixel coordinates are aggregated to obtain second aggregated pixel coordinates; Based on the second aggregated pixel coordinates, generate multiple vector tiles corresponding to the spatial features of the second tile level.
13. The method as described in claim 12, characterized in that, Before aggregating the plurality of second-processed pixel coordinates to obtain second-aggregated pixel coordinates, the method further includes: The multiple second-processed pixel coordinates are deduplicated to obtain the second deduplicated pixel coordinates; The coordinates of multiple second deduplicated pixels are sampled to obtain the second sampled pixel coordinates; The step of aggregating the plurality of second-processed pixel coordinates to obtain second-aggregated pixel coordinates includes: The coordinates of multiple second sampled pixels are aggregated to obtain the second aggregated pixel coordinates.
14. The method as described in claim 13, characterized in that, The step of deduplicating the plurality of second-processed pixel coordinates to obtain second-deduplicated pixel coordinates includes: Determine the spatial feature to which the coordinates of the second processed pixel belong; Determine the first minimum bounding rectangle corresponding to the target tile level for the spatial element; Determine the second minimum bounding rectangle of the adjacent second tile level corresponding to the spatial element of the target tile level; Determine the intersection region information of the first minimum bounding rectangle and the second minimum bounding rectangle; Based on the intersection region information, the multiple second-processed pixel coordinates are deduplicated to obtain the second deduplicated pixel coordinates.
15. The method as described in claim 14, characterized in that, The step of performing deduplication processing on the plurality of second-processed pixel coordinates based on the intersection region information to obtain the second deduplicated pixel coordinates includes: Determine the target spatial element in the second tile level corresponding to the intersecting region information; The second processed pixel coordinates corresponding to the target spatial element are used as the second deduplication pixel coordinates.
16. The method as described in claim 15, characterized in that, The determination of the intersection region information of the first minimum bounding rectangle and the second minimum bounding rectangle includes: Determine the intersecting rectangular region of the first minimum bounding rectangle and the second minimum bounding rectangle; The target pixel information within the intersecting rectangular region is used as the intersecting region information.
17. The method as described in claim 16, characterized in that, The step of using the target pixel information in the intersecting rectangular region as the intersecting region information includes: The target pixel information at the lower left corner of the intersecting rectangular region is used as the intersecting region information.
18. A distributed vector slicing device, characterized in that, include: A determining module is used to determine an initial vector data space, wherein the initial vector data space includes: multiple vector data; The generation module is used to divide the initial vector data space to generate multiple spatial partitions, wherein each spatial partition includes multiple spatial elements, and each spatial element describes the attribute information corresponding to the vector data in the corresponding spatial partition; The second processing module is used to perform load balancing processing on the spatial partition to obtain the target spatial partition; The first processing module is used to perform vector slicing on spatial features in multiple target spatial partitions based on a distributed method, resulting in multiple vector tiles. The second processing module includes: The first determining submodule is used to determine the tilted spatial partition and the balanced spatial partition from the plurality of spatial partitions; The first processing submodule is used to form a sample vector data space based on the spatial elements in the tilted spatial partition; to iteratively update the initial vector data space based on the sample vector data space until the spatial elements in the spatial partition meet the set conditions after the iterative update, and to use the updated spatial partition as the processed spatial partition. The second determining submodule is used to use the balanced spatial partition and the processed spatial partition as the multiple target spatial partitions.
19. The apparatus as claimed in claim 18, characterized in that, The first determining submodule is specifically used for: Determine multiple data skewnesses corresponding to the multiple spatial partitions respectively, wherein the data skewness is used to describe the quantitative comparison between the multiple spatial elements in the corresponding spatial partition and the sample spatial elements; Based on the data tilt, tilted spatial partitions and balanced spatial partitions are determined from the plurality of spatial partitions.
20. The apparatus as claimed in claim 19, characterized in that, The first determining submodule is further configured to: When the data skewness is greater than the skewness threshold, the spatial partition to which the data skewness belongs is designated as the skewed spatial partition. When the data skewness is less than or equal to the skewness threshold, the spatial partition to which the data skewness belongs is designated as the balanced spatial partition.
21. The apparatus as claimed in claim 19, characterized in that, The generation module is specifically used for: Determine the target tile level, wherein the target tile level describes the level in the vector pyramid corresponding to the first vector tile, and the first vector tile belongs to the plurality of vector tiles; The initial vector data space is divided according to the target tile level to generate the multiple spatial partitions.
22. The apparatus as claimed in claim 21, characterized in that, The vector pyramid has multiple levels. The first processing module includes: The third determining submodule is used to determine a first tile level from the plurality of said levels, wherein the first tile level is higher than the target tile level; The second processing submodule is used to perform vector slicing on the spatial features of the target tile level and the first tile level based on the distributed method to obtain the plurality of vector tiles.
23. The apparatus as claimed in claim 22, characterized in that, The number of layers in the first tile level is multiple; The second processing submodule is specifically used for: Determine the first largest tile level among multiple first tile levels; Based on the distributed method, the spatial features of the first maximum tile level are vector sliced to obtain multiple vector tiles corresponding to the spatial features of the first maximum tile level. Multiple vector tiles corresponding to the spatial features of the first maximum tile level are aggregated layer by layer to obtain multiple vector tiles corresponding to the spatial features of the target tile level.
24. The apparatus as claimed in claim 22, characterized in that, The first processing module further includes: The fourth determining submodule is used to determine a second tile level from the plurality of said levels, wherein the second tile level is lower than the target tile level; The third processing submodule is used to aggregate multiple vector tiles at the target tile level to obtain multiple vector tiles corresponding to the spatial elements at the second tile level.
25. The apparatus as claimed in claim 24, characterized in that, The second tile layer has multiple layers; The third processing submodule is specifically used for: Multiple vector tiles at the target tile level are aggregated layer by layer to obtain multiple vector tiles corresponding to the spatial elements of each second tile level.
26. The apparatus as claimed in claim 23, characterized in that, The second processing submodule is further configured to: Based on a distributed approach, the absolute spatial coordinates of spatial elements in the first maximum tile level are determined, wherein the absolute spatial coordinates indicate spatial coordinates corresponding to the world coordinate system. The absolute spatial coordinates are transformed to obtain the first pixel coordinates of the spatial elements in the first maximum tile level, wherein the first pixel coordinates indicate the coordinates in the pixel matrix where the vector tile is located. Based on the first pixel coordinates, generate multiple vector tiles corresponding to the spatial features of the first maximum tile level.
27. The apparatus as claimed in claim 26, characterized in that, The second processing submodule is further configured to: Determine a reference vector tile, wherein the reference vector tile corresponds to a reference pixel matrix; The absolute spatial coordinates are transformed to obtain the reference pixel coordinates of the spatial elements in the first maximum tile level, wherein the reference pixel coordinates indicate the coordinates corresponding to the reference vector tile in the reference pixel matrix; The reference pixel coordinates are translated to obtain the first pixel coordinates of the spatial elements in the first maximum tile level.
28. The apparatus as claimed in claim 27, characterized in that, The second processing submodule is further configured to: Generate multiple first pixel tuples corresponding to multiple spatial features, wherein each first pixel tuple includes: the coordinates of the first pixel; The multiple first pixel coordinates are translated to obtain multiple first processed pixel coordinates, wherein the multiple first processed pixel coordinates correspond to the same reference pixel coordinate origin, and the reference pixel coordinate origin is the coordinate origin in the reference pixel matrix; The multiple first-processed pixel coordinates are aggregated to obtain first aggregated pixel coordinates; Based on the first aggregated pixel coordinates, multiple vector tiles corresponding to the spatial features of the target tile level are generated.
29. The apparatus as claimed in claim 25, characterized in that, The third processing submodule is also used for: Generate multiple second pixel tuples corresponding to multiple spatial features of the target tile level, wherein the second pixel tuple includes: second pixel coordinates; The multiple second pixel coordinates are translated to obtain multiple second processed pixel coordinates, wherein the multiple second processed pixel coordinates correspond to the same reference pixel coordinate origin, and the reference pixel coordinate origin is the coordinate origin in the reference pixel matrix; The multiple second-processed pixel coordinates are aggregated to obtain second aggregated pixel coordinates; Based on the second aggregated pixel coordinates, generate multiple vector tiles corresponding to the spatial features of the second tile level.
30. The apparatus as claimed in claim 29, characterized in that, The third processing submodule is also used for: The multiple second-processed pixel coordinates are deduplicated to obtain the second deduplicated pixel coordinates; The coordinates of multiple second deduplicated pixels are sampled to obtain the second sampled pixel coordinates; The step of aggregating the plurality of second-processed pixel coordinates to obtain second-aggregated pixel coordinates includes: The coordinates of multiple second sampled pixels are aggregated to obtain the second aggregated pixel coordinates.
31. The apparatus as claimed in claim 30, characterized in that, The third processing submodule is also used for: Determine the spatial feature to which the coordinates of the second processed pixel belong; Determine the first minimum bounding rectangle corresponding to the target tile level for the spatial element; Determine the second minimum bounding rectangle of the adjacent second tile level corresponding to the spatial element of the target tile level; Determine the intersection region information of the first minimum bounding rectangle and the second minimum bounding rectangle; Based on the intersection region information, the multiple second-processed pixel coordinates are deduplicated to obtain the second deduplicated pixel coordinates.
32. The apparatus as claimed in claim 31, characterized in that, The third processing submodule is also used for: Determine the target spatial element in the second tile level corresponding to the intersecting region information; The second processed pixel coordinates corresponding to the target spatial element are used as the second deduplication pixel coordinates.
33. The apparatus as claimed in claim 32, characterized in that, The third processing submodule is also used for: Determine the intersecting rectangular region of the first minimum bounding rectangle and the second minimum bounding rectangle; The target pixel information within the intersecting rectangular region is used as the intersecting region information.
34. The apparatus as claimed in claim 33, characterized in that, The third processing submodule is also used for: The target pixel information at the lower left corner of the intersecting rectangular region is used as the intersecting region information.
35. A computer device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-17.
36. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, in, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-17.
37. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1-17.
Citation Information
Patent Citations
A method and a system for quickly drawing super-large-scale spatial data
CN109408657A
Method and terminal for quickly displaying vector big data
CN110990612A
Map slicing method and device based on distributed cluster, equipment and medium
CN113032509A