Label display method and device
By prioritizing the display of tags for objects of interest in a 3D scene based on display hierarchy and weight parameters, the problem of cluttered visuals caused by inconsistent tag hierarchy is solved, achieving a concise and efficient information display and a seamless browsing experience.
Patent Information
- Application Number
- CN202512042294.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-05-01
AI Technical Summary
In existing technologies, labels are displayed without prioritizing them in 3D scenes, resulting in cluttered visuals and making it difficult for users to quickly obtain key information.
By acquiring the tags of objects of interest within the target geographic range, the display level of the current frame is determined, and the tags are displayed according to the level. Weight parameters of objects of interest and distance thresholds are introduced to prioritize the display of important tags, avoid tag overlap, and construct a dynamic mapping model of display level to achieve seamless progressive display.
It achieves orderly display of tags, improves user experience, ensures a clean screen and efficient information retrieval, reduces data volume and computational burden, and supports seamless browsing from macro to micro levels.
Smart Images

Figure CN121957438A_ABST
Abstract
Description
Method and apparatus for displaying tags Technical Field
[0001] The present invention relates to the field of communications, and more specifically, to a method and apparatus for displaying tags. Background Technology
[0002] With the rapid development of smart city technologies, city-level 3D scene visualization has become an indispensable core technology. In these applications, a key challenge is how to clearly and efficiently present massive amounts of geographic information, such as regions of interest (ROI) and point-of-interest (POI) tags, within a 3D scene, thereby improving user experience and system usability. Traditional methods display all tags indiscriminately on the screen, resulting in a cluttered and disorganized display that prevents users from quickly obtaining crucial information.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This invention provides a method and apparatus for displaying labels, which at least solves the problem of cluttered screens caused by the indiscriminate display of labels in related technologies.
[0005] According to an embodiment of the present invention, a method for displaying tags is provided, comprising: acquiring tags of objects of interest within a target geographic range, wherein the objects of interest include at least one of the following: regions of interest, points of interest; determining the display level of the current frame; and displaying the tags of the objects of interest according to the display level.
[0006] In one exemplary embodiment, displaying the tag of the object of interest according to the display hierarchy includes: when the object of interest is the point of interest, determining the grid cells of the target geographical area according to the display hierarchy to obtain a plurality of grid cells; determining the target grid cell to which the point of interest belongs based on the location information of the point of interest; and displaying the tag of the point of interest in the target grid cell.
[0007] In one exemplary embodiment, displaying the label in the target grid cell includes: obtaining the weight parameter of the point of interest; if there are multiple points of interest in the target grid cell, determining the point of interest with the largest weight parameter value as the target point of interest; and displaying the label of the target point of interest in the target grid cell.
[0008] In an exemplary embodiment, after the target grid cell displays the label of the target point of interest, the method further includes: acquiring the labels of all the points of interest displayed on the screen; determining the pixel distance between each label; and if there is a label pair with a weight parameter value less than a first distance threshold, hiding the label with the smallest weight parameter value in the label pair.
[0009] In an exemplary embodiment, displaying the label of the object of interest according to the display hierarchy includes: when the object of interest is the region of interest, performing multiple rounds of key feature point extraction operations on the geometric attribute array of the region of interest to obtain key feature points; generating road network units based on the key feature points; dividing the road network units according to the display hierarchy to obtain multiple road network sub-units; and displaying the label of the region of interest on each of the road network sub-units.
[0010] In one exemplary embodiment, after displaying the labels of the regions of interest on each of the road network sub-units, the method further includes: if there is an overlap between the first road network sub-unit and the second road network sub-unit, determining the distance between the labels of the first road network sub-unit and the labels of the second road network sub-unit; if the distance is less than a second distance threshold, hiding the label with the smallest weight parameter value.
[0011] In an exemplary embodiment, performing a key feature point extraction operation for the geometric attribute array of the region of interest in the i-th round, where i is greater than 0, includes: determining the boundary points used in the key feature point extraction operation in the i-th round; determining the line segment formed by the first and last points of the boundary points as the target line segment; determining the point located between the first and last points as the intermediate point; and determining the key feature point based on the distance between the intermediate point and the target line segment.
[0012] In an exemplary embodiment, determining the key feature point based on the distance between the intermediate point and the target line segment includes: determining the distance between each of the intermediate points and the target line segment; determining the intermediate point with the largest distance from the target line segment as the target intermediate point, and the distance between the target intermediate point and the target line segment as the target distance; and determining the key feature point according to the relationship between the target distance and a preset value.
[0013] In an exemplary embodiment, determining the key feature points based on the relationship between the target distance and a preset value includes: determining the first point and the last point as the key feature points when the target distance is less than the preset value; determining the target midpoint as the boundary point used in the (i+1)th round of key feature point extraction operation when the target distance is greater than or equal to the preset value; and performing the (i+1)th round of key feature point extraction operation on the geometric attribute array.
[0014] In one exemplary embodiment, displaying a label for the object of interest according to the display hierarchy includes: projecting a camera's direction vector onto a target horizontal plane to obtain a target direction vector; determining a rotation angle based on the initial direction vector of the label and the target direction vector; determining the rotation direction based on the initial direction vector of the label and the camera's direction vector; and rotating the label by the rotation angle according to the rotation direction.
[0015] According to another embodiment of the present invention, an apparatus for displaying tags is provided, comprising: an acquisition module for acquiring tags of objects of interest within a target geographic range, wherein the objects of interest include at least one of the following: regions of interest, points of interest; a determination module for determining the display level of the current frame; and a display module for displaying the tags of the objects of interest according to the display level.
[0016] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the preceding claims.
[0017] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0018] This invention obtains tags for objects of interest within a target geographic area, where the objects of interest include at least one of the following: regions of interest, points of interest; determines the display level of the current frame; and displays the tags of the objects of interest according to the display level. Therefore, it solves the problem of cluttered visuals caused by indiscriminate display of tags, achieving a more concise visual effect by displaying corresponding tags according to different display levels. Attached Figure Description
[0019] Figure 1 is a hardware structure block diagram of a mobile terminal for a method of displaying a tag according to an embodiment of the present invention;
[0020] Figure 2 is a flowchart of a label display method according to an embodiment of the present invention;
[0021] Figure 3 is an overall flowchart according to an embodiment of the present invention;
[0022] Figure 4 is a structural block diagram of a device for displaying labels according to an embodiment of the present invention. Detailed Implementation
[0023] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.
[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0025] The method embodiments provided in this application can be executed in a mobile terminal, computer terminal, or similar computing device. Taking a mobile terminal as an example, FIG1 is a hardware structure block diagram of a mobile terminal for a method of displaying a tag according to an embodiment of the present invention. As shown in FIG1, the mobile terminal may include one or more (only one is shown in FIG1) processors 102 (processor 102 may include, but is not limited to, processing devices such as microprocessors MCUs or programmable logic devices FPGAs) and a memory 104 for storing data. The mobile terminal may also include a transmission device 106 for communication functions and an input / output device 108. It will be understood by those skilled in the art that the structure shown in FIG1 is only illustrative and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG1, or have a different configuration than shown in FIG1.
[0026] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the label display method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0027] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0028] This embodiment provides a method for displaying a label on the aforementioned mobile terminal. Figure 2 is a flowchart of the method for displaying a label according to an embodiment of the present invention. As shown in Figure 2, the process includes the following steps:
[0029] Step S202: Obtain the tags of objects of interest within the target geographic range, wherein the objects of interest include at least one of the following: regions of interest, points of interest;
[0030] Among them, Area of Interest (AOI) and Point of Interest (POI) are defined as follows.
[0031] Step S204: Determine the display level of the current frame;
[0032] The display level corresponds to the building height and terrain undulation within the target geographic area. By using satellite imagery and 3D scene maps, the correspondence between building height, terrain undulation, and display level within the target geographic area can be extracted, establishing a linear or non-linear mapping model from height to display level.
[0033] Step S206: Display the tags of the objects of interest according to the display hierarchy.
[0034] This involves recording building heights and terrain undulations at each display level (e.g., 5 to 25) and placing the camera at different display levels in the editor, labeling objects of interest within the current frame captured by the camera, and recording height values and display levels.
[0035] In an exemplary embodiment, when the 3D scene is mainly composed of buildings with relatively small height differences, the following linear fitting equation can be used to construct the correspondence between building heights and display levels:
[0036] L = a * H + L;
[0037] Where L is the display level, H is the building height, and a and b are fitting parameters.
[0038] When a 3D scene contains geographic features of multiple scales, the following nonlinear fitting equation is used to construct the correspondence between the height of the geographic features and the display hierarchy:
[0039] L = c * ln(H) + d;
[0040] Where L is the display level, H is the height of the geographic element, and c and d are fitting parameters.
[0041] In one exemplary embodiment, displaying the tag of the object of interest according to the display hierarchy includes: when the object of interest is the point of interest, determining the grid cells of the target geographical area according to the display hierarchy to obtain a plurality of grid cells; determining the target grid cell to which the point of interest belongs based on the location information of the point of interest; and displaying the tag of the point of interest in the target grid cell.
[0042] For each frame captured by the camera (including the current frame), the size of the grid cell can be determined based on the display hierarchy L:
[0043] Cell = Base * (1 + L)
[0044] Here, Cell is the size of the grid cell, Base is the size of the base cell, and L is the display level. Based on the size of the grid cells, multiple grid cells for the target geographic area are obtained.
[0045] Obtain the location information of each point of interest (POI), such as its anchor point in the world coordinate system. Based on the relationship between the world coordinate system and the screen space coordinate system, determine the coordinates of the POI's label in the screen space coordinate system, and calculate the target mesh cell to which the POI's label belongs.
[0046] In one exemplary embodiment, displaying the label in the target grid cell includes: obtaining the weight parameters of the point of interest; if there are multiple points of interest in the target grid cell, determining the point of interest with the largest weight parameter value as the target point of interest; and displaying the label of the target point of interest in the target grid cell.
[0047] Specifically, tag weights can be set based on the major and minor tag categories to which a point of interest belongs. For example, administrative agencies T=1, entertainment industry T=0.5. Area weight A can be set based on the area attribute of the point of interest, administrative attribute R can be set based on the administrative level of the point of interest, and popularity attribute P can be set based on the foot traffic. The weight parameters for each point of interest are calculated by combining the above weight attributes.
[0048] S=w_type*T+w_area*A+w_rank*R+w_popularity*P
[0049] Where S is the final weight parameter value of the point of interest;
[0050] w_type+w_area+w_rank+w_popularity=1;
[0051] w_type, w_area, w_rank, and w_popularity are preset values that can be adjusted according to actual conditions.
[0052] The minimum visible scale and display priority of the tag are set according to the value of the weight parameter of the point of interest. The higher the value of the weight parameter, the more important the tag of the point of interest is, and the earlier it will be displayed.
[0053] For example, if there are multiple points of interest in a target grid cell, the label of the point of interest with the largest weight parameter value is displayed in the target grid cell.
[0054] In the above embodiments, an importance evaluation system is constructed based on the actual semantic attributes of points of interest (such as administrative level, commercial value, and pedestrian density), and differentiated weight parameters are assigned to different points of interest. Simultaneously, their central anchor points are calculated, and key rendering parameters such as minimum visible scale and display priority are supplemented.
[0055] Based on the mapping model between the height of geographic features and the display level, grid cells are dynamically constructed and labels of the corresponding display levels are activated according to the real-time camera height or view zoom. At higher levels, only labels of points of interest with high weight parameters are loaded to present the macroscopic situation; as the level decreases, more detailed points of interest are gradually activated to achieve seamless information progression.
[0056] Compared to existing technologies that display all tags on the screen without prioritizing them, resulting in a cluttered and disorganized display that prevents users from quickly obtaining key information, this application introduces a tag weight parameter, which prioritizes the display of more important tags while ensuring the aesthetic appeal of the display.
[0057] In one exemplary embodiment, after the target grid cell displays the label of the target point of interest, the method further includes: acquiring the labels of all the points of interest displayed on the screen; determining the pixel distance between each label; and if there is a label pair with a weight parameter value less than a first distance threshold, hiding the label with the smallest weight parameter value in the label pair.
[0058] To prevent labels currently displayed on the screen from overlapping, the two-dimensional pixel distance between labels in screen space is calculated for all currently displayed labels using the following formula:
[0059] D i,j =sqrt((X i -X j ) 2 +(Y i -Y j ) 2 );
[0060] Among them, D i,j X is the distance between the i-th label and the j-th label. i Y is the x-coordinate of the i-th label in screen space.i X is the ordinate of the i-th label in screen space. j Y is the x-coordinate of the j-th label in screen space. j It is the vertical coordinate of the j-th label in screen space.
[0061] The i-th label and the j-th label form a label pair, and a first distance threshold D is set. min When D i,j <D min If it is believed that there is a possibility of label overlap, then labels with lower weight parameter values are hidden.
[0062] In an exemplary embodiment, displaying the label of the object of interest according to the display hierarchy includes: when the object of interest is the region of interest, performing multiple rounds of key feature point extraction operations on the geometric attribute array of the region of interest to obtain key feature points; generating road network units based on the key feature points; dividing the road network units according to the display hierarchy to obtain multiple road network sub-units; and displaying the label of the region of interest on each of the road network sub-units.
[0063] In the data of the object of interest, points with small deviations from the overall shape trend are recursively removed from the geometry array, while key feature points are retained, thereby significantly reducing the total amount of data.
[0064] Specifically, the key feature point extraction operation of the i-th round is performed on the geometric attribute array of the region of interest, where i is greater than 0, including: determining the boundary points used in the key feature point extraction operation of the i-th round; determining the line segment formed by the first and last points of the boundary points as the target line segment; determining the point located between the first and last points as the intermediate point; and determining the key feature point based on the distance between the intermediate point and the target line segment.
[0065] The determination of the key feature point based on the distance between the intermediate point and the target line segment includes: determining the distance between each intermediate point and the target line segment; determining the intermediate point with the largest distance from the target line segment as the target intermediate point, and the distance between the target intermediate point and the target line segment as the target distance; and determining the key feature point according to the relationship between the target distance and a preset value.
[0066] The determination of the key feature points based on the relationship between the target distance and a preset value includes: when the target distance is less than the preset value, determining the first point and the last point as the key feature points; when the target distance is greater than or equal to the preset value, determining the target midpoint as the boundary point used for the key feature point extraction operation in the (i+1)th round; and performing the key feature point extraction operation in the (i+1)th round on the geometric attribute array.
[0067] Specifically, connect the first point P1 and the last point P of the Geometry attribute array. n , forming the target line segment P 1n For all intermediate points P k Use the following to calculate its P. k to target line segment P 1n distance d k The formula is as follows:
[0068] L 2 =(x n -x1) 2 +(y n -y2) 2
[0069]
[0070] Find the maximum value among all distances and its corresponding target midpoint. If the maximum value is less than a given preset value, then line segment P is considered... 1n It is sufficient to represent the shape of the entire curve, and all intermediate points can be discarded.
[0071] Conversely, the target intermediate point is retained, and it is considered that the target intermediate point is a key feature point that cannot be ignored in the current recursive level.
[0072] Using the points between the targets as new boundary points, the original curve is divided into two segments, and the above steps are repeated for these two segments to obtain the final selected key feature points. Road network units are generated based on these key feature points; the road network units are then divided according to the current display level to obtain multiple road network sub-units; and labels for regions of interest are displayed on each of the road network sub-units.
[0073] The above embodiments allow for the compression of region-of-interest data within a target geographic area, reducing the data volume while preserving key spatial features. Points with minor deviations from the overall shape trend are recursively removed, while key feature points are retained, thereby significantly reducing the total data volume.
[0074] In an optional embodiment, after displaying the labels of the regions of interest on each of the road network sub-units, the method further includes: if there is overlap between the first road network sub-unit and the second road network sub-unit, determining the distance between the labels of the first road network sub-unit and the labels of the second road network sub-unit; if the distance is less than a second distance threshold, hiding the label with the smallest weight parameter value.
[0075] The weight parameters of each road network sub-unit can be set based on the length of the road network. The longer the road network, the larger the value of the weight parameter for the sub-unit, and the smaller the corresponding display level. For example, level 18 displays road networks with a distance greater than 1000 meters, and level 17 displays road networks with a distance greater than 1500 meters.
[0076] To prevent overlapping labels in regions of interest, if overlapping network sub-units exist, for example, if the first network sub-unit and the second network sub-unit overlap, and if the distance between the label of the first network sub-unit and the label of the second network sub-unit is less than a second distance threshold (the second distance threshold can be determined according to the actual situation), the label with the smallest weight parameter value is hidden.
[0077] The data volume of regions of interest and points of interest is extremely large. Traditional methods perform poorly when loading data and switching levels. This application reduces unnecessary data burden from the source by adopting data compression and hierarchical loading strategies, thus ensuring the smooth operation of the system.
[0078] In one exemplary embodiment, displaying a label for the object of interest according to the display hierarchy includes: projecting a camera's direction vector onto a target horizontal plane to obtain a target direction vector; determining a rotation angle based on the initial direction vector of the label and the target direction vector; determining the rotation direction based on the initial direction vector of the label and the camera's direction vector; and rotating the label by the rotation angle according to the rotation direction.
[0079] Specifically, via label position Pos l and camera position Pos c The camera's orientation vector V is obtained from the relation. The formula is as follows:
[0080] V = Pos c -Pos l
[0081] Projecting the camera's direction vector onto the target horizontal plane (e.g., the XZ horizontal plane) yields the target direction vector V. horizontal = (Vx, 0, Vz).
[0082] The initial direction vector V of the label l Given _forward (0, 1, 0), calculate the rotation angle using the following dot product formula:
[0083] θ = arccos(V) l _forward·V horizontal )
[0084] Set the initial direction vector V of the label l The cross product formula for the forward direction and the camera's direction vector V is as follows:
[0085] Cross = V l _forward×V
[0086] If the value of Cross on the y-axis is greater than 0 (Cross.y>0), it means the camera is to the left of the label, and the label should be rotated clockwise by an angle θ. If Cross.y<0, it means the camera is to the right of the label, and the label should be rotated counterclockwise by an angle θ.
[0087] Traditional label displays are prone to issues such as incorrect orientation, improper hierarchy, and position drift when the user rotates, zooms, or moves the viewpoint, resulting in a poor user experience. This application constructs its own height and hierarchy mapping model and a real-time label orientation adjustment strategy, enabling the labels to intelligently understand the camera's position and movement in three-dimensional space and make corresponding, smooth dynamic responses.
[0088] Figure 3 shows the overall flowchart of this application, which includes the following steps:
[0089] Step 1: Obtain AOI (Area of Interest) and POI (Point of Interest) data within the target geographic area from the open street map, and compress the raw data to reduce the data volume while maintaining key spatial features.
[0090] Step 2: Construct an importance evaluation system based on the actual semantic attributes of AOIs and assign differentiated weights to different AOIs. At the same time, calculate their center anchor point and supplement key rendering parameters such as minimum visible scale and display priority.
[0091] Step 3: In the constructed 3D city scene, the processed AOI and POI data are preloaded, and the data is efficiently organized and managed by combining the scene spatial index structure.
[0092] Step 4: Construct the correspondence between building height, terrain undulation and visual hierarchy in the scene, and establish a linear or non-linear mapping model from height to hierarchy.
[0093] Step 5: Based on the established mapping model, dynamically construct the mesh and activate the corresponding layer labels according to the real-time camera height or view zoom level. At higher levels, only high-weight AOIs are loaded to present the macro view; as the level decreases, more POIs and detailed AOIs are gradually activated to achieve seamless information progression.
[0094] Step 6: Calculate the direction vector of each POI label and the camera view direction vector. Determine the POI's orientation relative to the camera through the cross product of the vectors, and dynamically adjust the rotation angle of the label to ensure that it always faces the user's view.
[0095] Step 7: Write a label avoidance algorithm and set a minimum distance to avoid overlap between AOI and POI labels.
[0096] This application reduces the data burden at the source by compressing the raw data. Based on this, a spatial index structure is introduced to organize the processed label data. When display is required, the system does not need to perform complex full-field calculations; instead, it quickly retrieves labels within the relevant grid based on the current view, achieving efficient management.
[0097] This application constructs a multi-dimensional semantic importance evaluation system, calculates a comprehensive weight parameter for each point of interest, and this weight parameter directly drives the subsequent dynamic loading and avoidance algorithms.
[0098] This application constructs a dynamic mapping model for display hierarchy, enabling the system to automatically determine the display hierarchy and weight of label information based on camera height, thus truly achieving a seamless and coherent browsing experience from an overview of the entire city to details of neighborhoods.
[0099] Optionally, the entity performing the above steps may be a background processor or other devices with similar processing capabilities, or a machine that integrates at least an image acquisition device and a data processing device. The image acquisition device may include an image acquisition module such as a camera, and the data processing device may include a terminal such as a computer or a mobile phone, but is not limited thereto.
[0100] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0101] This embodiment also provides a label display device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0102] Figure 4 is a structural block diagram of a device for displaying tags according to an embodiment of the present invention. As shown in Figure 4, the device includes: an acquisition module 42, configured to acquire tags of objects of interest within a target geographical range, wherein the objects of interest include at least one of the following: regions of interest, points of interest; a determination module 44, configured to determine the display level of the current frame; and a display module 46, configured to display the tags of the objects of interest according to the display level.
[0103] In an exemplary embodiment, the above-described apparatus is further configured to, when the object of interest is the point of interest, determine the grid cells of the target geographical range according to the display hierarchy to obtain a plurality of grid cells; determine the target grid cell to which the point of interest belongs based on the location information of the point of interest; and display the tag of the point of interest in the target grid cell.
[0104] In an exemplary embodiment, the above-described apparatus is further configured to obtain the weight parameters of the points of interest; when there are multiple points of interest in the target grid cell, determine the point of interest with the largest weight parameter value as the target point of interest; and display the label of the target point of interest in the target grid cell.
[0105] In an exemplary embodiment, the above-described apparatus is further configured to: after displaying the labels of the target interest points on the target grid cell, acquire the labels of all the interest points displayed on the screen; determine the pixel distance between each label; and if there is a label pair with a weight parameter value less than a first distance threshold, hide the label with the smallest weight parameter value in the label pair.
[0106] In an exemplary embodiment, the above-described apparatus is further configured to, when the object of interest is the region of interest, perform multiple rounds of key feature point extraction operations on the geometric attribute array of the region of interest to obtain key feature points; generate road network units based on the key feature points; divide the road network units according to the display hierarchy to obtain multiple road network sub-units; and display the label of the region of interest on each of the road network sub-units.
[0107] In an exemplary embodiment, the above-described apparatus is further configured to, after displaying the labels of the regions of interest on each of the road network sub-units, determine the distance between the labels of the first road network sub-unit and the labels of the second road network sub-unit when there is an overlap between the first road network sub-unit and the second road network sub-unit; and hide the label with the smallest weight parameter value when the distance is less than a second distance threshold.
[0108] In an exemplary embodiment, the above-described apparatus is further configured to perform a key feature point extraction operation for the geometric attribute array of the region of interest in the i-th round, where i is greater than 0, by: determining the boundary points used in the key feature point extraction operation for the i-th round; determining the line segment formed by the first and last points of the boundary points as the target line segment; determining the point located between the first and last points as the intermediate point; and determining the key feature point based on the distance between the intermediate point and the target line segment.
[0109] In an exemplary embodiment, the above-described apparatus is further configured to determine the distance between each of the intermediate points and the target line segment; determine the intermediate point with the largest distance from the target line segment as the target intermediate point, and the distance between the target intermediate point and the target line segment as the target distance; and determine the key feature point according to the relationship between the target distance and a preset value.
[0110] In an exemplary embodiment, the above-described apparatus is further configured to: determine the first point and the last point as the key feature points when the target distance is less than a preset value; determine the target midpoint as the boundary point used in the (i+1)th round of key feature point extraction operation when the target distance is greater than or equal to the preset value; and perform the (i+1)th round of key feature point extraction operation on the geometric attribute array.
[0111] In an exemplary embodiment, the above-described apparatus is further configured to project the direction vector of the camera onto the target horizontal plane to obtain a target direction vector; determine a rotation angle based on the initial direction vector of the label and the target direction vector; determine the rotation direction based on the initial direction vector of the label and the direction vector of the camera; and rotate the label by the rotation angle according to the rotation direction.
[0112] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0113] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the preceding claims.
[0114] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0115] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0116] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0117] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0118] Embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the methods described in various embodiments of the present application.
[0119] Embodiments of the present invention also provide a computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the methods described in various embodiments of the present application.
[0120] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0121] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for displaying a label, characterized in that, include: Obtain tags for objects of interest within a target geographic area, wherein the objects of interest include at least one of the following: regions of interest, points of interest; determine the display level of the current frame; and display the tags of the objects of interest according to the display level.
2. The method according to claim 1, characterized in that, Displaying the tags of the objects of interest according to the display hierarchy includes: when the object of interest is the point of interest, determining the grid cells of the target geographical area according to the display hierarchy to obtain multiple grid cells; determining the target grid cell to which the point of interest belongs based on the location information of the point of interest; and displaying the tags of the point of interest in the target grid cell.
3. The method according to claim 2, characterized in that, Displaying the label in the target grid cell includes: obtaining the weight parameter of the point of interest; if there are multiple points of interest in the target grid cell, determining the point of interest with the largest weight parameter value as the target point of interest; and displaying the label of the target point of interest in the target grid cell.
4. The method according to claim 3, characterized in that, After the target grid cell displays the label of the target point of interest, the method further includes: acquiring the labels of all the points of interest displayed on the screen; determining the pixel distance between each label; and if there is a label pair with a weight parameter value less than a first distance threshold, hiding the label with the smallest weight parameter value in the label pair.
5. The method according to claim 1, characterized in that, Displaying the label of the object of interest according to the display hierarchy includes: when the object of interest is the region of interest, performing multiple rounds of key feature point extraction operations on the geometric attribute array of the region of interest to obtain key feature points; generating road network units based on the key feature points; dividing the road network units according to the display hierarchy to obtain multiple road network sub-units; and displaying the label of the region of interest on each of the road network sub-units.
6. The method according to claim 5, characterized in that, After displaying the labels of the regions of interest on each of the road network sub-units, the method further includes: if there is an overlap between the first road network sub-unit and the second road network sub-unit, determining the distance between the labels of the first road network sub-unit and the labels of the second road network sub-unit; if the distance is less than a second distance threshold, hiding the label with the smallest weight parameter value.
7. The method according to claim 5, characterized in that, Perform the key feature point extraction operation for the geometric attribute array of the region of interest in the i-th round, where i is greater than 0, including: determining the boundary points used in the key feature point extraction operation in the i-th round; determining the line segment formed by the first and last points of the boundary points as the target line segment; determining the point located between the first and last points as the intermediate point; and determining the key feature point based on the distance between the intermediate point and the target line segment.
8. The method according to claim 7, characterized in that, Determining the key feature point based on the distance between the intermediate point and the target line segment includes: determining the distance between each intermediate point and the target line segment; determining the intermediate point with the largest distance from the target line segment as the target intermediate point, and the distance between the target intermediate point and the target line segment as the target distance; and determining the key feature point according to the relationship between the target distance and a preset value.
9. The method according to claim 8, characterized in that, Determining the key feature points based on the relationship between the target distance and a preset value includes: when the target distance is less than the preset value, determining the first point and the last point as the key feature points; when the target distance is greater than or equal to the preset value, determining the target midpoint as the boundary point used for the key feature point extraction operation in the (i+1)th round; and performing the key feature point extraction operation in the (i+1)th round on the geometric attribute array.
10. The method according to claim 1, characterized in that, Displaying the label of the object of interest according to the display hierarchy includes: projecting the direction vector of the camera onto the target horizontal plane to obtain the target direction vector; determining a rotation angle based on the initial direction vector of the label and the target direction vector; determining the rotation direction based on the initial direction vector of the label and the direction vector of the camera; and rotating the label by the rotation angle according to the rotation direction.
11. A device for displaying labels, characterized in that, include: The acquisition module is used to acquire tags of objects of interest within a target geographic area, wherein the objects of interest include at least one of the following: regions of interest, points of interest; The determination module is used to determine the display level of the current frame; the display module is used to display the tags of the object of interest according to the display level.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 10.
13. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 10.
14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 10.
