Semantic visualization method for business district based on fine-grained conflict avoidance and special-shaped gap compensation
Patent Information
- Application Number
- CN202610966477.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-01
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2046-07-01
AI Technical Summary
[0004]本发明的目的在于提供一种基于细粒度冲突避让与异形间隙补偿的商圈语义可视方法,以解决上述背景技术中提到的现有地图可视化技术难以在保证标签不重叠与最大化信息密度之间取得平衡,且无法区分不同语义类别的空间归属的问题
本申请通过语义分区与阿基米德螺线引导的高优先级标签排布,结合基于四叉树剖分的像素级碰撞检测,在确保所有POI标签正立水平、高度可读的前提下,突破了传统矩形包围盒检测的精度限制,实现了极致的空间紧凑度。结合核密度估计与等值线提取,生成贴合词云分布的自适应外包络线,既为商圈语义提供了类地图边界的结构化认知框架,又通过八邻域无符号距离场精准识别并填充主布局遗留的异形间隙,有效回收了不规则空白区域,最大化了单位面积的信息承载量。通过多商圈图层的径向排斥位移机制,解决了高密度区域下的全局重叠问题,从而在单一视图内清晰、完整且美观地呈现出商圈的整体语义格局与地理空间关系,使用户能够直观对比不同商圈的功能结构与空间分布。
Smart Images

Figure CN122489853B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of geographic information visualization technology, and in particular to a semantic visualization method for business districts based on fine-grained conflict avoidance and irregular gap compensation. Background Technology
[0002] With the booming development of the mobile internet and the digital economy, urban commercial districts, as spatial units with a high concentration of consumption, leisure, and public services, have become a key focus of geographic information and business intelligence analysis. Users and operators are no longer satisfied with the precise location of a single point on traditional maps; instead, they urgently need to quickly perceive the overall semantic structure of the commercial district, i.e., the distribution ratio and prosperity level of various business types within it. Word cloud visualization technology based on POI (Point of Interest) big data has become an important bridge connecting geospatial and commercial semantics because it can intuitively map weighted features through visual variables such as font size and color. Especially in scenarios such as urban planning, business site selection, and lifestyle service recommendations, how to clearly and completely present the internal structure of high-density commercial districts within a single view through visualization has significant practical value.
[0003] However, traditional 2D maps typically use methods such as thinning, clustering, or hiding to alleviate the POI overlap problem, but this leads to a serious loss of underlying semantic details. Conventional bounding box collision detection, on the other hand, does not consider the irregular edges of text, resulting in a large amount of wasted blank space. This makes it impossible to accommodate enough effective information within a limited canvas, making it difficult to strike a balance between ensuring that labels do not overlap and maximizing information density. Furthermore, it cannot distinguish the spatial affiliation of different semantic categories, resulting in views that are often either incomplete or disorganized, failing to present the overall semantic features of the business district intuitively and compactly. This seriously affects the efficiency of users' cognitive understanding of the business district's functions and the accuracy of their decision-making. Summary of the Invention
[0004] The purpose of this invention is to provide a semantic visualization method for business districts based on fine-grained conflict avoidance and irregular gap compensation, in order to solve the problem mentioned in the background art that existing map visualization technology is difficult to balance between ensuring that labels do not overlap and maximizing information density, and is unable to distinguish the spatial affiliation of different semantic categories.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a semantic visualization method for business districts based on fine-grained conflict avoidance and irregular gap compensation, comprising the following steps: acquiring Points of Interest (POI) data within a defined geographical area on a map interface, generating POI labels whose size is positively correlated with POI weight, and determining the geometric center of each business district and mapping it to the global canvas coordinate system based on the POI data; establishing polar coordinate systems with the geometric center of each business district as the origin, and dividing the circumference centered on the geometric center of the business district into multiple sector regions according to the number of semantic categories of the business district, to generate semantic partition boundaries; searching for candidate positions sequentially based on Archimedean spiral trajectories and sorting them in descending order of POI weight, and performing pixel-level conflict avoidance judgment based on quadtree partitioning at the candidate positions, so as to perform POI labeling within the semantic partition to which each POI label belongs. The initial business district word cloud is obtained by arranging the POI tags in a horizontal position. The bounding boxes of the arranged POI tags are traversed, and a discrete point set is generated by combining concentric circle support points centered on the geometric center of the business district. Density field calculations are performed on the discrete point set based on kernel density estimation. The closed contour line with the smallest area that strictly encloses all POI tags is extracted as the outer envelope of the initial business district word cloud. An eight-neighbor unsigned distance field is constructed within the area defined by the outer envelope. Unoccupied safe gaps are identified, and the remaining unplaced POI tags are sequentially filled into the safe gaps in descending order of weight to obtain the target business district word cloud. Multiple independently generated target business district word cloud layers are mapped back to the global canvas. Collision detection and repulsion displacement are performed sequentially according to the order of the geometric center of each business district from the center of the canvas to the nearest and farthest point, generating a globally non-overlapping visualization view.
[0006] Optionally, the step of constructing the eight-neighbor unsigned distance field specifically includes: rasterizing the region defined by the outer envelope into a discrete pixel array; marking the pixel region occupied by the placed POI tags as obstacles; initializing the remaining blank regions to maximum values; and setting the eight-neighbor template using a chamfered distance transformation algorithm, wherein the distance weights of adjacent pixels in the horizontal and vertical directions in the eight-neighbor template are set to 1, and the distance weights of adjacent pixels in the diagonal direction are set to... Perform a forward scan from top left to bottom right, and update the shortest distance of the current point by combining the neighboring pixels on the left and top sides; perform a backward scan from bottom right to top left, and update the shortest distance of the current point again by combining the neighboring pixels on the right and bottom sides, to obtain the complete eight-neighbor unsigned distance field within the outer envelope, wherein the value of each blank pixel in the rasterized region represents its maximum safe radius for expanding in all directions without touching any obstacles.
[0007] Optionally, the steps of collision detection and repulsion displacement specifically include: obtaining the outer envelope contour point set of each target business district word cloud, and determining the layout priority according to the order of the geometric center of each business district being closer to the center of the canvas from the nearest to the farthest; performing an intersection judgment between the outer envelope contour point set of the current business district and the set of already placed business district polygons, and if an overlap occurs, calculating the radial direction vector from the center of the canvas to the geometric center of the current business district; driving the current business district to gradually translate outward along the radial direction with a preset fixed step size until it moves to a blank coordinate position that does not overlap with any already placed business districts, and using the blank coordinate position as the final rendering point of the current business district.
[0008] Optionally, the step of searching candidate positions sequentially based on the Archimedean spiral trajectory and sorting POIs in descending order of weight specifically includes: defining an Archimedean spiral as the candidate point search trajectory with the geometric center of the business district as the origin. The Archimedean spiral is defined by an initial radius, a pitch coefficient, and a rotation angle, wherein the larger the pitch coefficient, the faster the spiral spreads outward; generating candidate coordinates point by point along the Archimedean spiral trajectory for the POI tags to be placed in descending order of weight, and performing a conflict avoidance judgment for each candidate coordinate generated. If the judgment passes, the POI tag is placed in the corresponding position; if the judgment fails, the search for the next candidate point continues along the spiral.
[0009] Optionally, the step of performing pixel-level collision avoidance determination based on quadtree partitioning at the candidate position specifically includes: extracting the axis-aligned circumscribed rectangles of the unplaced POI label and the placed POI label, comparing the extreme values of the rectangle boundaries, and determining that no collision has occurred if the circumscribed rectangles have no intersection; if the circumscribed rectangles have an intersection, then starting quadtree pixel-level fine detection, rendering the unplaced POI label and the placed label as pixel images respectively, performing threshold binarization processing on non-transparent pixels to extract the true edges of the text, using the quadtree data structure to recursively partition the pixel matrix, generating a set of miniature rectangles that fit the edges of the text, recursively traversing the quadtree nodes in the intersection area of the unplaced POI label and the placed POI label, and determining that a substantial collision has occurred if there are overlapping pixel nodes, and discarding the candidate position.
[0010] Optionally, the step of generating a discrete point set by combining concentric circle support points supplemented with the geometric center of the business district specifically includes: traversing all POI tags already arranged within the current business district, obtaining and recording the rectangular bounding box of each POI tag; calculating the minimum global boundary containing all rectangular bounding boxes, expanding outwards by a preset bandwidth distance based on the minimum global boundary to form a safety buffer zone; and supplementing outwards with discrete points arranged in concentric circles with the geometric center of the business district as support points, merging the bounding box boundary points of the already arranged POI tags with the concentric circle support points to form a complete discrete point set.
[0011] Optionally, the step of calculating the density field of the discrete point set based on kernel density estimation and extracting the closed contour lines that strictly enclose all POI tags and have the smallest area specifically includes: inputting the discrete point set into the kernel density estimation module, setting the smoothing bandwidth parameter, performing kernel density estimation on the generated local two-dimensional grid, and converting the discrete point set into a continuous spatial density field; using a contour line extraction algorithm to generate a nested set of closed contour lines along the height variation of the density field; adaptively traversing the contour line set to select the closed contour lines that can strictly enclose all arranged POI tags and have the smallest area; and performing Bézier curve smoothing on the selected contour lines to obtain the outer envelope of the business district word cloud.
[0012] On the other hand, the present invention also provides a business district semantic visualization system based on fine-grained conflict avoidance and irregular gap compensation, comprising: an acquisition module, used to acquire point of interest (POI) data within a defined geographical area on a map interface, generate POI labels whose size is positively correlated with POI weight, and determine the geometric center of each business district and map it to the global canvas coordinate system based on the POI data; a semantic partitioning generation module, used to establish polar coordinate systems with the geometric center of each business district as the origin, and divide the circumference centered on the geometric center of the business district into multiple fan-shaped regions according to the number of semantic categories of the business district, so as to generate semantic partition boundaries; and an initial business district word cloud generation module, used to search for candidate positions sequentially according to the Archimedean spiral trajectory and sorted in descending order of POI weight, and perform pixel-level conflict avoidance judgment based on quadtree partitioning at the candidate positions, so as to determine the upright and horizontal state of the POI labels within the semantic partition to which each POI label belongs. The system is divided into several modules: 1) Arrangement: Initial business district word cloud is obtained; 2) Outer envelope extraction module: Traverses the bounding boxes of the arranged POI tags, generates a discrete point set by combining concentric circle support points with the geometric center of the business district as the center, performs density field calculation on the discrete point set based on kernel density estimation, and extracts the closed contour line with the smallest area that strictly surrounds all POI tags as the outer envelope of the initial business district word cloud; 3) Target business district word cloud generation module: Constructs an eight-neighbor unsigned distance field within the area defined by the outer envelope, identifies unoccupied safety gaps, and fills the remaining unplaced POI tags into the safety gaps in descending order of weight to obtain the target business district word cloud; 4) Global view generation module: Maps multiple independently generated target business district word cloud layers back to the global canvas, performs collision detection and repulsion displacement sequentially according to the order of distance of each business district's geometric center from the canvas center from near to far, and generates a globally non-overlapping visualization view.
[0013] On the other hand, the present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described business district semantic visualization method based on fine-grained conflict avoidance and irregular gap compensation.
[0014] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-mentioned business district semantic visualization method based on fine-grained conflict avoidance and irregular gap compensation.
[0015] Compared with the prior art, the beneficial effects of the present invention are: This application achieves extreme spatial compactness by combining semantic partitioning and Archimedean spiral-guided high-priority label arrangement with pixel-level collision detection based on quadtree decomposition. This is achieved while ensuring all POI labels are upright, horizontal, and highly readable, overcoming the accuracy limitations of traditional rectangular bounding box detection. By combining kernel density estimation and contour extraction, an adaptive outer envelope conforming to the word cloud distribution is generated. This provides a structured cognitive framework for business district semantics, similar to map boundaries, and accurately identifies and fills irregular gaps left in the main layout using an eight-neighbor unsigned distance field, effectively recovering irregular blank areas and maximizing information carrying capacity per unit area. Through a radial repulsion displacement mechanism across multiple business district layers, the global overlap problem in high-density areas is solved, resulting in a clear, complete, and aesthetically pleasing presentation of the overall semantic structure and geospatial relationships of business districts within a single view. This allows users to intuitively compare the functional structures and spatial distributions of different business districts. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the method steps of the present invention.
[0017] Figure 2 This is a flowchart of the method of the present invention.
[0018] Figure 3 This is a schematic diagram showing the result of mapping the geometric center of the business district to the global canvas in this invention.
[0019] Figure 4 This is a schematic diagram of the main layout logic of the word cloud based on semantic partitioning and the Archimedean spiral of the present invention.
[0020] Figure 5 This is a schematic diagram of the coarse-grained collision detection of the bounding box according to the present invention.
[0021] Figure 6 This is a schematic diagram of the quadtree pixel-level fine detection of the present invention.
[0022] Figure 7 This is a schematic diagram illustrating the process of arranging the word cloud for business districts according to the present invention.
[0023] Figure 8 This is a schematic diagram of the outer envelope generation result of the present invention.
[0024] Figure 9 This is a schematic diagram of the eight-neighborhood template of the present invention.
[0025] Figure 10 This is a schematic diagram of the forward and backward scanning processes of the present invention.
[0026] Figure 11 This is a business district word cloud diagram and a schematic diagram of the business district word cloud distance field of the present invention.
[0027] Figure 12 This is a schematic diagram of the business district word cloud filling process of the present invention.
[0028] Figure 13 This is a schematic diagram of the system structure of the present invention.
[0029] In the diagram: 10 - Acquisition module, 20 - Semantic partitioning generation module, 30 - Initial business district word cloud generation module, 40 - Outer envelope extraction module, 50 - Target business district word cloud generation module, 60 - Global view generation module. Detailed Implementation
[0030] The present invention will now be clearly and completely described in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be used interchangeably where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0032] Those skilled in the art will understand that, unless explicitly stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in the specification of this application means the presence of features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0033] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0034] It should be understood that the sequence number and size of each step in this embodiment do not imply the order of execution. The execution order of each process is determined by its function and internal logic, and should not constitute any limitation on the implementation process of this application embodiment.
[0035] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0036] Please refer to Figures 1-12 This invention discloses a semantic visualization method for business districts based on fine-grained conflict avoidance and irregular gap compensation. The steps include: acquiring Points of Interest (POI) data within a defined geographical area on a map interface; generating POI labels whose size is positively correlated with their weight; and determining the geometric center of each business district and mapping it to the global canvas coordinate system based on the POI data; establishing polar coordinate systems with the geometric center of each business district as the origin; dividing the circumference centered on the geometric center of each business district into multiple fan-shaped regions based on the number of semantic categories of the business district to generate semantic partition boundaries; searching for candidate positions sequentially based on Archimedean spiral trajectories and sorting them in descending order of POI weights; and performing pixel-level conflict avoidance judgment based on quadtree partitioning at the candidate positions to determine the upright and horizontal state of the POI labels within their respective semantic partitions. Arrange the POI tags to obtain the initial business district word cloud; traverse the bounding boxes of the arranged POI tags, and generate a discrete point set by combining concentric circle support points supplemented with the geometric center of the business district as the center. Calculate the density field of the discrete point set based on kernel density estimation, and extract the closed contour line with the smallest area that strictly surrounds all POI tags as the outer envelope of the initial business district word cloud; construct an eight-neighbor unsigned distance field within the area defined by the outer envelope, identify unoccupied safe gaps, and fill the remaining unplaced POI tags into the safe gaps in descending order of weight to obtain the target business district word cloud; map the multiple independently generated target business district word cloud layers back to the global canvas, and perform collision detection and repulsion displacement in sequence according to the order of the geometric center of each business district from the center of the canvas to the nearest and farthest, generating a globally non-overlapping visualization view.
[0037] Specifically, the system receives a geographic area defined by the user on the map interface. This area can be circular, rectangular, or polygonal. It records the latitude and longitude coordinates of the area's boundaries and calculates the geometric center of the area as the "center location" anchor point. POI data within this area is filtered based on the geographic coordinates of Points of Interest (POIs). Each POI contains attributes such as text, weight, semantic category, and associated business area. POI labels are generated based on their weight values, with higher weight labels having larger font sizes.
[0038] Based on the business district field in the POI data, extract the business district information and calculate the geometric center of each business district: ; In the formula This represents the sum of longitudes for the selected POI data. This represents the sum of the dimensions of the selected POI data. The number of selected POIs. , These are the longitude and latitude coordinates of the business district. Ensure that the center point of each business district falls within the selected area to facilitate canvas mapping.
[0039] Map geographic coordinates to the global canvas coordinate system: Initialize canvas width and height Extract the maximum longitude of the user-defined geographic boundary and store the boundary. Maximum latitude Minimum longitude Minimum latitude The coordinates of the center point on the map and the center coordinates of the business district are mapped onto the canvas, where geographic coordinates are implemented. Mapped to canvas coordinates ( The formula for ) is: ; In the formula, For the first The horizontal coordinate of each point of interest tag on the screen. For the first The vertical screen coordinates of each point of interest tag. For the first Longitude coordinates of points of interest For the first The latitude coordinates of each point of interest are used to map the center point on the map to the "center position" on the canvas.
[0040] For each business district, a polar coordinate system is established with the geometric center of the business district as the origin. Based on the number of POI semantic categories contained in the business district (such as shopping, dining, science and education, entertainment, etc.), the circumference with the geometric center of the business district as the center is divided into multiple sector regions. Each sector corresponds to a semantic category, and category labels are drawn at the boundary of the sector to generate semantic partition boundaries.
[0041] Sort the POI tags to be placed in descending order of weight value, prioritizing tags with higher weight. Define an Archimedean spiral as the candidate point search trajectory, centered on the business district name. Extract tags in descending order of weight, generating candidate coordinates point by point along the spiral trajectory. Perform conflict avoidance judgment for each generated candidate coordinate. This judgment includes two types of constraints: the first is category partition inclusion judgment, where the bounding rectangle of the candidate tag must be completely within the sector corresponding to its semantic category; the second is tag collision judgment, using a combination of "bounding box coarse detection + quadtree pixel-level fine detection". If the candidate coordinates satisfy both constraints, place the tag in an upright horizontal position (without any rotation); if the judgment fails, continue searching for the next candidate point along the spiral. Repeat the above process until all high-priority tags have been tried, obtaining the initial business district word cloud.
[0042] The algorithm iterates through all existing POI tags within the current business district, acquiring and recording the bounding box of each tag. It calculates the minimum global boundary encompassing all bounding boxes and extends it outwards by a preset distance as a safety buffer. Simultaneously, to prevent inward indentation or voids in the generated outer envelope, discrete points arranged in concentric circles are added outwards from the geometric center of the business district as support points. The bounding box boundary points of the existing tags are merged with the concentric circle support points to form a complete discrete point set. A kernel density estimation algorithm is used to calculate the density field of this discrete point set, and a smoothing bandwidth parameter is set to generate a continuous spatial density field on a local two-dimensional grid. Then, a contour extraction algorithm is used to generate a nested set of closed contour lines along the density field's elevation changes. From this set, the closed contour line that strictly encloses all existing POI tags and has the smallest area is selected. Finally, this contour line is smoothed using a Bézier curve to obtain a fitting and aesthetically pleasing outer envelope for the business district's word cloud.
[0043] An eight-neighbor unsigned distance field is constructed within the region defined by the outer envelope. The space inside the envelope is rasterized into a discrete pixel array. The pixel areas occupied by the already placed POI tags are marked as obstacles, and the remaining blank areas are initialized with maximum values. A chamfered distance transformation algorithm is used, with a preset eight-neighbor template (where the distance weight of horizontal / vertical adjacent pixels is 1, and the distance weight of diagonal adjacent pixels is 0). The algorithm performs two scans sequentially, from top left to bottom right and from bottom right to top left, updating the shortest distance for each pixel. This results in a distance field representing the maximum safe radius for each blank pixel to expand outwards without touching any obstacles. Unsuccessful POI tags within the current business district are extracted, sorted in descending order of weight, and then retrieved sequentially. Estimated tag bounding boxes are generated, and candidate points in the distance field are iterated through and tentatively placed to ensure that the tag bounding boxes are completely within their respective category sectors and outer envelopes and do not overlap with already placed tags. This secondary filling process yields the target business district word cloud.
[0044] When multiple independently generated business district word clouds exist, all target business district word cloud layers are mapped back to the global canvas. The Euclidean distance from the geometric center of each business district to the canvas center (i.e., the location of the map center point corresponding to the user-defined geographical area mapped onto the canvas) is calculated, and the layout priority is determined from closest to furthest. The outer envelope contour point set of each business district is obtained, and each business district is placed onto the global canvas in priority order. For each business district placed, its outer envelope contour point set is compared with the set of polygons of already placed business districts. If overlap occurs, the radial direction vector from the canvas center to the geometric center of that business district is calculated, and the business district is driven to gradually translate outwards along the radial direction with a preset fixed step size until it reaches a blank coordinate position that does not overlap with any already placed business districts. This position is used as the final rendering point for that business district. The above process is repeated until all business districts are laid out, generating a globally non-overlapping visualization view.
[0045] This application achieves extreme spatial compactness by combining semantic partitioning and Archimedean spiral-guided high-priority label arrangement with pixel-level collision detection based on quadtree decomposition. This is achieved while ensuring all POI labels are upright, horizontal, and highly readable, overcoming the accuracy limitations of traditional rectangular bounding box detection. By combining kernel density estimation and contour extraction, an adaptive outer envelope conforming to the word cloud distribution is generated. This provides a structured cognitive framework for business district semantics, similar to map boundaries, and accurately identifies and fills irregular gaps left in the main layout using an eight-neighbor unsigned distance field, effectively recovering irregular blank areas and maximizing information carrying capacity per unit area. Through a radial repulsion displacement mechanism across multiple business district layers, the global overlap problem in high-density areas is solved, resulting in a clear, complete, and aesthetically pleasing presentation of the overall semantic structure and geospatial relationships of business districts within a single view. This allows users to intuitively compare the functional structures and spatial distributions of different business districts.
[0046] In some embodiments, the step of constructing the eight-neighbor unsigned distance field specifically includes: rasterizing the region defined by the outer envelope into a discrete pixel array; marking the pixel region occupied by the placed POI tags as obstacles; initializing the remaining blank regions to maximum values; and setting an eight-neighbor template using a chamfered distance transform algorithm, wherein the distance weights of adjacent pixels in the horizontal and vertical directions in the eight-neighbor template are set to 1, and the distance weights of adjacent pixels in the diagonal direction are set to... Perform a forward scan from top left to bottom right, and update the shortest distance of the current point by combining the neighboring pixels on the left and top sides; perform a backward scan from bottom right to top left, and update the shortest distance of the current point again by combining the neighboring pixels on the right and bottom sides, to obtain the complete eight-neighbor unsigned distance field within the outer envelope, wherein the value of each blank pixel in the rasterized region represents its maximum safe radius for expanding in all directions without touching any obstacles.
[0047] Specifically, the region defined by the outer envelope is rasterized into a discrete pixel array, the pixel region occupied by the placed POI tag is marked as an obstacle (the distance field is initially set to 0), and the remaining blank regions are initialized to a maximum value (e.g., 65535).
[0048] An eight-neighborhood template is defined using a chamfered distance transformation algorithm. The distance weights for horizontal (left, right) and vertical (top, bottom) adjacent pixels are set to 1, while the distance weights for diagonal (top left, top right, bottom left, bottom right) adjacent pixels are set to... .
[0049] Perform the first scan (forward scan): Starting from the top left pixel of the raster image, traverse row by row to the bottom right pixel. For each pixel, combine its left and top neighboring pixels, calculate the candidate distance value according to the template weight, and take the minimum value to update the shortest distance of the current point.
[0050] Perform a second scan (backward scan): Starting from the bottom right pixel, traverse in reverse row to the top left. For each pixel, combine its right and bottom neighboring pixels, recalculate the candidate distance value according to the template weight, and take the minimum value to further update the shortest distance of the current point.
[0051] After two scans, the complete eight-neighbor unsigned distance field within the outer envelope is obtained. The value of each blank pixel represents its maximum safe radius for expanding in all directions without touching any obstacles. The larger the value, the wider the blank area, and the more suitable it is for subsequent filling of new labels.
[0052] This application rasterizes the region within the outer envelope into a discrete pixel array and constructs an eight-neighbor unsigned distance field using a chamfered distance transformation algorithm. By assigning different weights to the horizontal / vertical and diagonal directions, and combining forward and backward scans, it can accurately describe the shortest distance from each blank pixel to the nearest obstacle with low computational cost, thereby quickly identifying the maximum safe radius available for filling in the blank area. This distance field construction method balances computational efficiency and accuracy, providing a reliable spatial evaluation basis for subsequent secondary filling, and enabling the systematic recycling of irregular gaps that could not be utilized by traditional layouts.
[0053] In some embodiments, the steps of collision detection and repulsion displacement specifically include: obtaining the outer envelope contour point set of each target business district word cloud, and determining the layout priority according to the order of the geometric center of each business district being closer to the center of the canvas from the nearest to the farthest; performing an intersection judgment between the outer envelope contour point set of the current business district and the set of already placed business district polygons, and if an overlap occurs, calculating the radial direction vector from the center of the canvas to the geometric center of the current business district; driving the current business district to gradually translate outward along the radial direction with a preset fixed step size until it moves to a blank coordinate position that does not overlap with any already placed business districts, and using the blank coordinate position as the final rendering landing point of the current business district.
[0054] Specifically, first, the outer envelope contour point set of each target business district's word cloud is obtained, that is, the discrete point sequence on the locally generated closed Bézier curve for each business district. Then, the Euclidean distance from the geometric center of each business district to the global canvas center is calculated. In the formula , These are the horizontal and vertical coordinates of the "center position" of the canvas, respectively. , The horizontal and vertical coordinates of the current business district are mapped onto the canvas. Given the European distance from the current business district location to the "center" of the canvas, sort all business districts to be laid out in descending order of distance from nearest to farthest to determine the layout priority. The closer the business district is to the center of the canvas, the higher its priority.
[0055] Process each business district sequentially according to priority: Intersect the current business district's outer envelope contour point set with the set of already placed business district polygons (i.e., those already placed in the global canvas). If the outer envelopes of the two sets have any common points or intersections, an overlap is considered to have occurred. If an overlap occurs, calculate the radial unit vector from the global canvas center to the geometric center of the current business district. ; Then, the current business district is driven to translate outwards gradually along this radial direction vector with a preset fixed step size (e.g., 10 pixels). After each translation, the position is updated as follows: ; In the formula, , The coordinates before rejection, in continuous iteration, represent the coordinates of the position after the last move; , The x and y coordinates of the unit vector pointing from the center of the canvas to the initial position of the business district; The preset step size represents the specific fixed distance the business district moves outward. The product of the step size and the unit direction vector constitutes the actual coordinate offset of one translation. , The updated horizontal and vertical coordinates of the business districts are used. Intersection checks are performed until a blank coordinate position is reached so that the outer envelope of the current business district does not overlap with the outer envelopes of all other placed business districts. This position is then used as the final rendering point for the current business district, and it is recorded as placed. This process continues until all business districts have been repositioned, resulting in a globally non-overlapping visualization view.
[0056] This application obtains the outline point set of the outer envelope of each business district and determines the layout priority according to the distance of the geometric center of the business district from the center of the canvas, from near to far. This can ensure that the business district in the central area gets the best visual position. When overlap occurs, the radial direction vector is calculated and translated step by step with a fixed step size, so that the business districts spread outward in the direction away from the center until a blank position without overlap is found. This repulsive displacement mechanism not only maintains the original geographical orientation relationship between the business districts, but also effectively avoids visual occlusion, and realizes the coordinated coexistence of multiple business district word clouds in a limited canvas space.
[0057] In some embodiments, the step of sequentially searching candidate positions based on the Archimedean spiral trajectory and sorting POIs in descending order of weight specifically includes: defining an Archimedean spiral as the candidate point search trajectory with the geometric center of the business district as the origin, wherein the Archimedean spiral is defined by an initial radius, a pitch coefficient, and a rotation angle, wherein the larger the pitch coefficient, the faster the spiral spreads outward; generating candidate coordinates point by point along the Archimedean spiral trajectory for the POI tags to be placed in descending order of weight, and performing a conflict avoidance judgment for each candidate coordinate generated. If the judgment passes, the POI tag is placed in the corresponding position; if the judgment fails, the search for the next candidate point continues along the spiral.
[0058] Specifically, taking the geometric center of the business district as the origin, an Archimedean spiral is defined as the candidate point search trajectory. The polar coordinate formula for the spiral is: In the formula, Let the initial radius be , This is the pitch factor. The larger the factor, the faster the spiral spreads outward, and the greater the distance between adjacent arms. Let be the angle of rotation of the moving point. Let be the distance between the moving point and the origin.
[0059] In actual execution, the system first sorts the list of POI tags to be deployed within the current business district in descending order of their weight values, processing the tags with the highest weights first. For each tag to be deployed, the system starts from... Initially, gradually increase the angle increments. The value is used to calculate the corresponding polar diameter based on the helix formula. The coordinates are then converted to Cartesian coordinates as candidate points. For each candidate coordinate generated, a conflict avoidance check is performed to determine if the candidate point meets the layout requirements. If the check passes, the label is placed at the candidate point's location and removed from the list of points to be laid out; if the check fails, the coordinates continue to increase along the spiral. The search continues until the preset maximum number of search steps or angle limit is reached. Once all high-priority tags (e.g., those in the top 80% by weight) have been tried, the main layout process ends, and unsuccessfully placed tags will be handled in subsequent secondary filling steps.
[0060] This application uses the Archimedean spiral as the candidate point search trajectory for the main layout. By controlling the search path through the initial radius, pitch coefficient, and rotation angle, it can expand the search layer by layer from the center of the business district outwards, ensuring that high-weight labels occupy the advantageous visual area near the center first. The larger the pitch coefficient, the faster the spiral spreads. The search range can be flexibly adjusted according to the number of labels and the canvas size. This search method, combined with descending weight sorting, ensures that the visual hierarchy of the word cloud is strictly consistent with its semantic importance, significantly improving the user's cognitive efficiency of the core business formats in the business district.
[0061] In some embodiments, the step of performing pixel-level collision avoidance determination based on quadtree partitioning at the candidate position specifically includes: extracting the axis-aligned circumscribed rectangles of the unplaced POI label and the placed POI label, comparing the extreme values of the rectangle boundaries, and determining that no collision has occurred if the circumscribed rectangles have no intersection; if the circumscribed rectangles have an intersection, then starting quadtree pixel-level fine detection, rendering the unplaced POI label and the placed label as pixel images respectively, performing threshold binarization processing on non-transparent pixels to extract the true edges of the text, using the quadtree data structure to recursively partition the pixel matrix, generating a set of miniature rectangles that fit the edges of the text, recursively traversing the quadtree nodes in the intersection area of the unplaced POI label and the placed POI label, and determining that a substantial collision has occurred if there are overlapping pixel nodes, and discarding the candidate position.
[0062] Specifically, for a given candidate label and all currently placed labels on the canvas, coarse-grained bounding box detection is performed: the axis-aligned bounding rectangle of the candidate label and the axis-aligned bounding rectangle of each placed label are extracted, and the intersection of two rectangles is quickly determined by comparing the extreme values (left, right, top, bottom) of the rectangle boundaries. If the bounding rectangle of the candidate label has no intersection with the bounding rectangles of all placed labels, it is directly determined that no collision has occurred, and the candidate position is valid.
[0063] If at least one bounding rectangle of an existing label intersects with the bounding rectangle of a candidate label, then quadtree pixel-level fine-grained detection is initiated: using an off-screen canvas, both the candidate label and the existing label with the intersection are rendered as pixel images, with transparent backgrounds and non-transparent pixels for text. Threshold binarization is then performed on the non-transparent pixels to generate a binarized pixel array.
[0064] Construct a quadtree structure for the pixel matrix: Calculate the maximum side length of the bounding box of the text label to be partitioned. Set the minimum detection resolution R, for example, a value of 1 pixel, according to the formula. ; Calculate the maximum recursion depth By recursively dividing the space according to this depth, the text dot matrix is divided into several sets of miniature rectangles, each rectangle representing a pixel-level area occupied by the text.
[0065] The quadtree nodes in the area where candidate labels intersect with already placed labels are recursively traversed. If two labels are found to have non-transparent nodes at the same pixel position (i.e., pixel overlap), a substantial collision is determined, and the candidate position is discarded; otherwise, no collision is determined, and the candidate position is accepted. This pixel-level detection can fully utilize the irregular gaps at the edges of text, significantly improving layout compactness.
[0066] This application employs a two-stage collision detection strategy, starting with coarse-grained collision detection and then fine-grained collision detection. First, it quickly eliminates obviously non-overlapping label pairs by aligning the bounding rectangles with axes, significantly reducing computational overhead. When the bounding rectangles intersect, it further initiates a quadtree-based pixel-level fine-grained detection. By rendering the text as a binary pixel image and recursively partitioning the space, it generates a set of miniature rectangles that fit the real edges of the text, thereby accurately determining pixel-level overlap. This approach solves the space waste problem caused by the traditional rectangular bounding box ignoring the irregular shape of the text, and avoids the performance bottleneck caused by direct pixel-by-pixel traversal, achieving a good balance between compactness and computational efficiency.
[0067] In some embodiments, the step of generating a discrete point set by combining concentric circle support points supplemented with the geometric center of the business district specifically includes: traversing all POI tags already arranged within the current business district, obtaining and recording the rectangular bounding box of each POI tag; calculating the minimum global boundary containing all rectangular bounding boxes, expanding outwards by a preset bandwidth distance based on the minimum global boundary to form a safety buffer zone; and supplementing outwards with discrete points arranged in concentric circles with the geometric center of the business district as support points, merging the bounding box boundary points of the already arranged POI tags with the concentric circle support points to form a complete discrete point set.
[0068] Specifically, first, iterate through all successfully placed POI tags within the current business district, obtaining the bounding box of each tag, including the coordinates of the top-left corner, width, and height. Record the coordinates of the four vertices and the midpoints of each side of each bounding box to form an initial set of discrete boundary points.
[0069] The minimum global boundary that can contain all these bounding boxes is calculated, i.e., the bounding rectangle of the bounding box set. Based on this minimum global boundary, a preset bandwidth distance, BandWidth, is extended outward, for example, a value of 1.5 times the maximum label width, to form a safety buffer zone. In addition, to avoid depressions or holes in the subsequently generated outer envelope due to uneven label distribution, multiple concentric circles of discrete points are added outward as support points, with the geometric center of the business district as the center and at certain radius intervals (e.g., initial radius R0, step size ΔR). These support points are evenly distributed on the circumference.
[0070] The bounding box boundary points of the already arranged labels are merged with these concentric circle support points to form a complete discrete point set. This discrete point set not only reflects the actual distribution range of the labels, but also ensures a rounded and full shape through the artificially added concentric circle points, providing a good data foundation for subsequent kernel density estimation.
[0071] This application ensures that the outer envelope completely covers all tags without omission by traversing the rectangular bounding boxes of the already arranged tags and calculating the minimum global boundary, while extending the bandwidth distance outward to form a safety buffer zone. It also supplements the outer envelope with discrete points arranged in concentric circles with the geometric center of the business district as support points, effectively compensating for the depressions or holes that may be caused by uneven tag distribution. The discrete point set formed by merging the bounding box boundary points and the concentric circle support points not only faithfully reflects the actual distribution range of the tags, but also ensures the integrity of the kernel density estimation input, thus making the generated outer envelope more rounded, continuous and in line with the semantic distribution.
[0072] In some embodiments, the step of calculating the density field of the discrete point set based on kernel density estimation and extracting the closed contour lines that strictly enclose all POI tags and have the smallest area specifically includes: inputting the discrete point set into the kernel density estimation module, setting the smoothing bandwidth parameter, performing kernel density estimation on the generated local two-dimensional grid, and converting the discrete point set into a continuous spatial density field; using a contour line extraction algorithm to generate a nested set of closed contour lines along the high and low changes of the density field; adaptively traversing the contour line set to select the closed contour lines that can strictly enclose all the arranged POI tags and have the smallest area; and performing Bézier curve smoothing on the selected contour lines to obtain the outer envelope of the business district word cloud.
[0073] Specifically, the generated discrete point set is input into the kernel density estimation module, which can use the d3.contourDensity function from the D3.js library. The system needs to set a smoothing bandwidth parameter (BandWidth), which determines the smoothness of the density estimation. The larger the bandwidth, the smoother and more rounded the generated contour lines, but it may deviate from the actual label distribution; the smaller the bandwidth, the closer the contour lines are to the label boundaries, but it may produce unevenness.
[0074] In practical applications, a compromise value can be determined through multiple experiments. On the generated local two-dimensional mesh, the kernel density estimation module calculates a density value for each mesh point, thus transforming the discrete point set into a continuous spatial density field. Regions with higher density values correspond to label clustering areas, while regions with lower density values correspond to blank or edge areas.
[0075] Using contour extraction algorithms, such as the Marching Squares algorithm, multiple levels of closed contour lines are extracted along the density field's elevation changes. These contour lines are nested, extending outward from the high-density core region to the low-density boundary region. An adaptive traversal is performed on these contour lines to calculate whether the region enclosed by each contour line strictly contains the bounding boxes of all arranged POI tags (i.e., each tag's bounding box is completely inside the contour line). The contour line with the smallest area that satisfies this condition is then selected.
[0076] The selected contour lines are smoothed using Bézier curves to eliminate jagged edges caused by grid discretization, generating a smooth and aesthetically pleasing closed curve, which serves as the outer envelope of the business district word cloud. This outer envelope preserves the metaphorical features of the map boundary while accurately reflecting the actual distribution contours of the word cloud.
[0077] This application transforms a discrete point set into a continuous spatial density field through kernel density estimation, and generates a set of nested closed contour lines using a contour line extraction algorithm, which can adaptively identify the boundary levels of the label distribution. By adaptively traversing and filtering, the closed contour lines that can strictly enclose all label bounding boxes and have the smallest area are selected, and the contour lines are smoothed by Bézier curves, finally obtaining an outer envelope that fits the actual outline of the word cloud and is visually appealing. This outer envelope not only has the cognitive metaphor function of map-like boundaries, but also avoids the problem of traditional fixed-shape boundaries (such as circles or rectangles) deviating from the actual distribution or producing redundant blanks, significantly enhancing the structured expression capability of the semantic visualization results of the business district.
[0078] Please refer to Figure 13 On the other hand, the present invention also provides a business district semantic visualization system based on fine-grained conflict avoidance and irregular gap compensation, including: an acquisition module 10, used to acquire point of interest (POI) data within a defined geographical area on a map interface, generate POI labels whose size is positively correlated with POI weight, and determine the geometric center of each business district and map it to the global canvas coordinate system based on the POI data; a semantic partitioning generation module 20, used to establish polar coordinate systems with the geometric center of each business district as the origin, and divide the circumference centered on the geometric center of the business district into multiple fan-shaped areas according to the number of semantic categories of the business district, so as to generate semantic partition boundaries; and an initial business district word cloud generation module 30, used to search for candidate positions in descending order of POI weight based on the Archimedean spiral trajectory, and perform pixel-level conflict avoidance judgment based on quadtree partitioning at the candidate positions, so as to perform POI label upright horizontal position within the semantic partition to which each POI label belongs. The system first arranges the POI tags to obtain an initial business district word cloud. Then, an outer envelope extraction module 40 iterates through the bounding boxes of the arranged POI tags, generates a discrete point set by combining concentric circle support points centered on the geometric center of the business district, calculates the density field of the discrete point set based on kernel density estimation, and extracts the closed contour line that strictly encloses all POI tags and has the smallest area as the outer envelope of the initial business district word cloud. A target business district word cloud generation module 50 constructs an eight-neighbor unsigned distance field within the area defined by the outer envelope, identifies unoccupied safety gaps, and fills the remaining unplaced POI tags into the safety gaps in descending order of weight to obtain the target business district word cloud. A global view generation module 60 maps multiple independently generated target business district word cloud layers back to the global canvas, performs collision detection and repulsion displacement sequentially according to the order of distance of each business district's geometric center from the canvas center from near to far, and generates a globally non-overlapping visualization view.
[0079] On the other hand, the present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described business district semantic visualization method based on fine-grained conflict avoidance and irregular gap compensation.
[0080] On the other hand, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described business district semantic visualization method based on fine-grained conflict avoidance and irregular gap compensation.
[0081] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0082] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, database, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0083] The above are merely embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention's specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A semantic visualization method for business districts based on fine-grained conflict avoidance and irregular gap compensation, characterized in that the steps are as follows: include: Acquire Points of Interest (POI) data within the defined geographical area on the map interface, generate POI labels whose size is positively correlated with the POI weight, and determine the geometric center of each business district and map it to the global canvas coordinate system based on the POI data. A polar coordinate system is established with the geometric center of each business district as the origin. Based on the number of semantic categories of the business district, the circumference with the geometric center of the business district as the center is divided into multiple sector areas to generate semantic partition boundaries. Based on the Archimedes spiral trajectory, candidate positions are searched sequentially according to the POI weight in descending order. At the candidate positions, pixel-level conflict avoidance judgment based on quadtree partitioning is performed to arrange the POI labels in an upright and horizontal state within the semantic partition to obtain the initial business district word cloud. Traverse the bounding boxes of the already arranged POI tags, and generate a discrete point set by combining concentric circle support points supplemented with the geometric center of the business district. Calculate the density field of the discrete point set based on kernel density estimation, and extract the closed contour line that strictly surrounds all POI tags and has the smallest area as the outer envelope of the initial business district word cloud. An eight-neighbor unsigned distance field is constructed within the area defined by the outer envelope. Unoccupied safe gaps are identified, and the remaining unplaced POI tags are sequentially filled into the safe gaps in descending order of weight to obtain the target business district word cloud. Multiple independently generated target business district word cloud layers are mapped back to the global canvas. Collision detection and repulsion displacement are performed sequentially according to the order of the geometric center of each business district being closer to the center of the canvas from the nearest to the farthest, generating a globally non-overlapping visualization view.
2. The semantic visualization method for business districts based on fine-grained conflict avoidance and irregular gap compensation according to claim 1, characterized in that, The steps for constructing the eight-neighbor unsigned distance field specifically include: The region defined by the outer envelope is rasterized into a discrete pixel array. The pixel region occupied by the placed POI tag is marked as an obstacle, and the remaining blank area is initialized to a maximum value. An eight-neighborhood template is defined using a chamfered distance transformation algorithm. In this template, the distance weights of adjacent pixels in the horizontal and vertical directions are set to 1, and the distance weights of adjacent pixels in the diagonal direction are set to... ; Perform a forward scan from top left to bottom right, and update the shortest distance of the current point by combining the neighboring pixels on the left and top sides; Perform a backward scan from the bottom right to the top left, and update the shortest distance of the current point again by combining the neighboring pixels on the right and bottom sides to obtain the complete eight-neighbor unsigned distance field within the outer envelope. In this field, the value of each blank pixel in the rasterized region represents its maximum safe radius for expanding in all directions without touching any obstacles.
3. The semantic visualization method for business districts based on fine-grained conflict avoidance and irregular gap compensation according to claim 1, characterized in that, The steps for collision detection and repulsion displacement specifically include: Obtain the outer envelope contour point set of the word cloud for each target business district, and determine the layout priority according to the order of the geometric center of each business district from the center of the canvas to the nearest and farthest point. The intersection of the current business district's outer envelope contour point set with the set of already placed business district polygons is determined. If an overlap occurs, the radial direction vector from the canvas center to the current business district's geometric center is calculated. Drive the current business district to gradually move outward along the radial direction with a preset fixed step size until it moves to a blank coordinate position that does not overlap with any existing business districts. The blank coordinate position is then used as the final rendering point of the current business district.
4. The semantic visualization method for business districts based on fine-grained conflict avoidance and irregular gap compensation according to claim 1, characterized in that, The step of searching for candidate positions sequentially based on the Archimedean spiral trajectory and sorting them in descending order of POI weights specifically includes: With the geometric center of the business district as the origin, an Archimedean spiral is defined as the candidate point search trajectory. The Archimedean spiral is defined by the initial radius, the pitch coefficient, and the rotation angle. The larger the pitch coefficient, the faster the spiral spreads outward. The POI tags to be laid out are sorted by weight in descending order and candidate coordinates are generated point by point along the Archimedean spiral trajectory. For each candidate coordinate generated, a conflict avoidance judgment is performed. If the judgment is successful, the POI tag is placed in the corresponding position. If the judgment is unsuccessful, the search for the next candidate point continues along the spiral.
5. The semantic visualization method for business districts based on fine-grained conflict avoidance and irregular gap compensation according to claim 4, characterized in that, The step of performing pixel-level collision avoidance determination based on quadtree partitioning at candidate locations specifically includes: Extract the axis-aligned bounding rectangles of the unlabeled and labeled POIs, compare the extreme values of the rectangle boundaries, and determine that no collision has occurred if the bounding rectangles have no intersection. If the bounding rectangles intersect, a quadtree pixel-level fine detection is initiated. The unplaced POI labels and the placed labels are rendered as pixel images respectively. Threshold binarization is performed on non-transparent pixels to extract the true edges of the text. The quadtree data structure is used to recursively partition the pixel matrix to generate a set of miniature rectangles that fit the edges of the text. The quadtree nodes of the intersection area of the unplaced POI labels and the placed POI labels are recursively traversed. If there are overlapping pixel nodes, it is determined that a substantial collision has occurred, and the candidate position is discarded.
6. The semantic visualization method for business districts based on fine-grained conflict avoidance and irregular gap compensation according to claim 1, characterized in that, The step of generating a discrete point set by combining concentric circle support points supplemented with the geometric center of the business district as the center specifically includes: Iterate through all the POI tags that have been placed in the current business district, and obtain and record the bounding box of each POI tag; Calculate the minimum global boundary that includes all rectangular bounding boxes, and expand outward by a preset bandwidth distance based on the minimum global boundary to form a safety buffer zone; Using the geometric center of the business district as the center, discrete points arranged in concentric circles are added outwards as support points. The bounding box boundary points of the already arranged POI tags are merged with the concentric circle support points to form a complete set of discrete points.
7. The semantic visualization method for business districts based on fine-grained conflict avoidance and irregular gap compensation according to claim 6, characterized in that, The step of performing density field calculation on a discrete point set based on kernel density estimation and extracting closed contour lines that strictly enclose all POI labels and have the smallest area specifically includes: The discrete point set is input into the kernel density estimation module, the smoothing bandwidth parameter is set, and kernel density estimation is performed on the generated local two-dimensional grid to convert the discrete point set into a continuous spatial density field. Using a contour extraction algorithm, a set of nested closed contour lines is generated along the elevation changes of the density field; Adaptive traversal of the contour set is performed to select the closed contour line with the smallest area that can strictly enclose the bounding box of all arranged POI labels. The selected contour lines are smoothed using Bézier curves to obtain the outer envelope of the business district word cloud.
8. A semantic visualization system for commercial districts based on fine-grained conflict avoidance and irregular gap compensation, characterized in that, include: The acquisition module is used to acquire Points of Interest (POI) data within a defined geographical area on the map interface, generate POI labels whose size is positively correlated with the POI weight, and determine the geometric center of each business district and map it to the global canvas coordinate system based on the POI data. The semantic partitioning generation module is used to establish polar coordinate systems with the geometric center of each business district as the origin, and divide the circumference with the geometric center of the business district as the center into multiple sector regions according to the number of semantic categories of the business district, so as to generate semantic partition boundaries. The initial business district word cloud generation module is used to search for candidate positions in descending order of POI weight based on the Archimedes spiral trajectory, and to perform pixel-level conflict avoidance judgment based on quadtree partitioning at the candidate positions, so as to arrange the POI labels in the upright and horizontal state within the semantic partition to obtain the initial business district word cloud. The outer envelope extraction module is used to traverse the bounding boxes of the arranged POI tags, generate a discrete point set by combining concentric circle support points supplemented with the geometric center of the business district, perform density field calculation on the discrete point set based on kernel density estimation, and extract the closed contour line that strictly surrounds all POI tags and has the smallest area as the outer envelope of the initial business district word cloud. The target business district word cloud generation module is used to construct an eight-neighbor unsigned distance field within the area defined by the outer envelope, identify unoccupied safety gaps, and fill the remaining unplaced POI labels into the safety gaps in descending order of weight to obtain the target business district word cloud. The global view generation module maps multiple independently generated target business district word cloud layers back to the global canvas. Collision detection and repulsion displacement are performed sequentially according to the geometric center of each business district being closer to the center of the canvas from the nearest to the farthest point, generating a global non-overlapping visualization view.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the business district semantic visualization method based on fine-grained conflict avoidance and irregular gap compensation as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the business district semantic visualization method based on fine-grained conflict avoidance and irregular gap compensation as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Visualization method and device for coupling place name tag and TreeMap subdivision, and electronic equipment
CN120144686A
Commercial district drawing method and device based on geographic space aggregation
CN120996867A