Map tag processing method, electronic device and computer program product
By adjusting label coordinates using Archimedes spiral equations in map applications, the problem of label overlap is solved, and the readability and information accuracy of the map are improved.
Patent Information
- Application Number
- CN202411885580.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-15
AI Technical Summary
In map applications, overlap often occurs between labels, and existing label layout algorithms are difficult to effectively solve the overlap problem while maintaining the accuracy of label position.
The overlap area of the label is minimized by determining the minimum area of the overlapping area of the target label with other labels and iteratively adjusting the coordinate value of the target label based on the Archimedes spiral equation until the preset iteration condition is satisfied.
It effectively solves the problem of overlapping tags on the map, improves the readability and information accuracy of the map, and avoids the risk of labels being too far away from their original location.
Smart Images

Figure CN119832116A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to Internet technology, and in particular to a map label processing method, electronic device and computer program product. Background Art
[0002] Label layout is a common and important problem in map applications. When a large number of labels need to be displayed on a map, these labels often overlap, affecting the user's reading and usage experience. Existing label layout algorithms usually use simple displacement or rule-based methods to avoid overlap, but these methods often cannot effectively solve the label overlap problem while maintaining the accuracy of label position. Summary of the invention
[0003] To solve the technical problems in the related art, the present disclosure provides a map label processing method, an electronic device and a computer program product.
[0004] According to a first aspect of an embodiment of the present disclosure, a method for processing a map label is provided, the method comprising:
[0005] Determine a first total area of an overlapping area between a target tag and other tags in a target map, wherein the first total area is a difference between a total area of the target tag and an area of a non-overlapping area of the target tag, wherein the non-overlapping area of the target tag is an area of the target tag that is not overlapped or blocked by any of the other tags;
[0006] Determine the first total area as an initialization value of the minimum overlapping area of the target tag, and record a first coordinate value of the target tag, where the first coordinate value is an initial coordinate value of the target tag;
[0007] Iteratively determining a second coordinate value of the target tag based on the Archimedean screw equation, the minimum overlapping area and the first coordinate value of the target tag, and iteratively updating and recording the minimum overlapping area corresponding to the position of the second coordinate value;
[0008] When a preset iteration condition is met, the second coordinate value corresponding to the current minimum overlapping area of the recorded target tag is determined as the final coordinate value of the target tag, wherein the preset iteration condition includes a preset number of iterations and / or a preset overlapping area threshold;
[0009] Move the target tag to the final coordinate value.
[0010] As an optional embodiment of the present disclosure, iteratively determining the second coordinate value of the target tag based on the Archimedean screw equation, the minimum overlapping area and the first coordinate value of the target tag, and iteratively updating and recording the minimum overlapping area corresponding to the position of the second coordinate value, includes:
[0011] Determine the first coordinate value of the target tag as the origin coordinate value of the Archimedean spiral;
[0012] Determine the Archimedean spiral according to the coordinate value of the origin of the Archimedean spiral, the preset spiral parameters and the Archimedean spiral equation;
[0013] iteratively determining a second coordinate value of the target tag based on the Archimedean spiral, the minimum overlapping area, and the first coordinate value of the target tag;
[0014] In each iteration, the total area of the overlapping regions of the target tag and other tags at the position corresponding to the second coordinate value is compared with the minimum overlapping area recorded in the previous iteration to update and record the current minimum overlapping area of the target tag according to the comparison result.
[0015] As an optional embodiment of the present disclosure, determining the Archimedean spiral according to the coordinate value of the origin of the Archimedean spiral, the preset spiral parameters and the Archimedean spiral equation includes:
[0016] The Archimedean spiral is generated based on the Archimedean spiral equation, taking the origin coordinate value of the Archimedean spiral as the starting point coordinate, according to a preset initial rotation angle, a preset initial radius, a preset angle increment and a preset radius increment.
[0017] As an optional embodiment of the present disclosure, the iteratively determining the second coordinate value of the target tag based on the Archimedean spiral, the minimum overlapping area, and the first coordinate value of the target tag includes:
[0018] Determine the first coordinate value of the target tag as the initial coordinate value on the Archimedean spiral;
[0019] Determine the radius value and rotation angle value corresponding to any point on the Archimedean spiral;
[0020] Determine a coordinate superposition value according to the radius value and the rotation angle value corresponding to the point, wherein the coordinate superposition value is the coordinate value to be moved from the initial coordinate value to the point;
[0021] A second coordinate value of the target tag is determined by calculation based on the initial coordinate value and the coordinate superposition value.
[0022] As an optional embodiment of the present disclosure, in each iteration, comparing the total area of the overlapping area between the target tag and other tags at the position corresponding to the second coordinate value with the minimum overlapping area recorded in the previous iteration, so as to update and record the current minimum overlapping area of the target tag according to the comparison result, includes:
[0023] In each iteration, at the position corresponding to the second coordinate value, determine the second total area of the overlapping area between the target tag and other tags, the second total area being the difference between the total area of the target tag and the area of the non-overlapping area of the target tag at the position corresponding to the current second coordinate value, wherein the non-overlapping area of the target tag is the area of the target tag that is not overlapped or blocked by any of the other tags at the position corresponding to the current second coordinate value;
[0024] Compare the second total area with the minimum overlapping area of the target tag recorded last time;
[0025] When it is determined that the second total area is smaller than the minimum overlapping area of the target tag recorded last time, the second total area is updated to the current minimum overlapping area of the target tag.
[0026] As an optional embodiment of the present disclosure, determining the radius value and the rotation angle value corresponding to any point on the Archimedean spiral line includes:
[0027] The rotation angle value corresponding to the point is determined according to the preset initial rotation angle, preset angle increment and current number of iterations of the Archimedean spiral, and the radius value corresponding to the point is determined according to the preset initial radius, preset radius increment and current number of iterations of the Archimedean spiral.
[0028] As an optional embodiment of the present disclosure, when the preset iteration condition is met, the second coordinate value corresponding to the current minimum overlapping area of the recorded target tag is determined as the final coordinate value of the target tag, including:
[0029] Determine whether the current number of iterations reaches the preset number of iterations;
[0030] When it is determined that the current number of iterations reaches the preset number of iterations, obtaining the current minimum overlapping area of the target tag recorded when the current number of iterations is reached;
[0031] The second coordinate value corresponding to the current minimum overlapping area of the recorded target tag is used as the final coordinate value of the target tag.
[0032] As an optional embodiment of the present disclosure, when the preset iteration condition is met, the second coordinate value corresponding to the current minimum overlapping area of the recorded target tag is determined as the final coordinate value of the target tag, including:
[0033] In any iteration, at the position corresponding to the second coordinate value, determining whether the second total area updated to the current minimum overlapping area of the target tag reaches a preset overlapping area threshold, wherein the preset overlapping area threshold is a minimum value of the overlapping area pre-set and inputted through an input device;
[0034] When it is determined that the second total area reaches the preset overlapping area threshold, the corresponding second coordinate value is determined as the final coordinate value of the target tag.
[0035] As an optional embodiment of the present disclosure, determining a first total area of overlapping regions between a target label and other labels in a target map includes:
[0036] Acquire the coordinate values of the shape boundary and the coordinate values of the shape center point of the target tag in the target map, and acquire the coordinate values of the shape boundary and the coordinate values of the shape center point of other tags overlapping with the target tag;
[0037] Determine the total area of the target label according to the coordinate value of the shape boundary and the coordinate value of the shape center point of the target label;
[0038] Determine the area of the non-overlapping region of the target label according to the coordinate values of the shape boundary and the coordinate values of the shape center point of the target label and the coordinate values of the shape boundary and the coordinate values of the shape center point of other labels overlapping with the target label;
[0039] A difference process is performed on the total area of the target tag and the area of the non-overlapping area of the target tag to obtain a first total area of the overlapping area of the target tag and other tags.
[0040] According to a second aspect of an embodiment of the present disclosure, a map label processing device is provided, the device comprising:
[0041] A first determining unit is used to determine a first total area of an overlapping area between a target tag and other tags in a target map, wherein the first total area is a difference between a total area of the target tag and an area of a non-overlapping area of the target tag, wherein the non-overlapping area of the target tag is an area of the target tag that is not overlapped and blocked by any of the other tags;
[0042] a recording unit, configured to determine the first total area as an initialization value of a current minimum overlapping area of the target tag, and to record a first coordinate value of the target tag, wherein the first coordinate value is an initial coordinate value of the target tag;
[0043] a second determining unit, configured to iteratively determine a second coordinate value of the target tag based on the Archimedean screw equation, the current minimum overlapping area, and the first coordinate value of the target tag, and iteratively update and record the minimum overlapping area corresponding to the position of the second coordinate value;
[0044] a third determining unit, configured to determine, when a preset iteration condition is satisfied, a second coordinate value corresponding to the current minimum overlapping area of the target tag recorded as a final coordinate value of the target tag, wherein the preset iteration condition includes a preset number of iterations and / or a preset overlapping area threshold;
[0045] A moving unit is used to move the target tag to the final coordinate value.
[0046] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0047] A memory for storing a computer program product;
[0048] The processor is used to execute the computer program product stored in the memory, and when the computer program product is executed, the method described in the first aspect above is implemented.
[0049] According to a fourth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising computer program instructions, which, when executed by a processor, implement the method described in the first aspect above.
[0050] Through the technical solution provided by the embodiment of the present disclosure, by combining the geometric characteristics of the Archimedean spiral (an outward-expanding spiral), it is ensured that in the process of searching for the final coordinate position of the target tag, the area around the target tag in the target map can be systematically covered, so that the final coordinate position of the target tag is also within the range of the Archimedean spiral geometry and does not deviate too far from the target tag, thereby avoiding randomness and a large deviation from the original position of the target tag. The embodiment of the present disclosure also uses the minimum overlapping area to find the final coordinate position with no overlap or minimal overlap as much as possible, thereby improving robustness, solving the problem of label overlap on the map, and improving the readability of the map and the accuracy of information.
[0051] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0053] The present disclosure may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
[0054] Figure 1 The present invention is a flowchart of an embodiment of a method for processing map labels disclosed in the present invention.
[0055] Figure 2 The present invention is a flowchart of another embodiment of the method for processing map labels disclosed in the embodiment of the present disclosure.
[0056] Figure 3 The present invention is a flowchart of another embodiment of the method for processing map labels disclosed in the embodiment of the present disclosure.
[0057] Figure 4 The present invention is a structural block diagram of an embodiment of a map label processing device disclosed in the present invention.
[0058] Figure 5 The present invention is a structural block diagram of an embodiment of an electronic device disclosed in the present invention. DETAILED DESCRIPTION
[0059] In map applications, a large number of map labels are often displayed. If these map labels overlap, it will greatly affect the user experience. In particular, the label overlap problem is particularly prominent in the following scenarios, such as: high-density urban areas, where a large number of house labels are concentrated in a small area; map displays at different scales, where the label size is inconsistent with the map zoom; in dynamic maps, as the user pans and zooms, the label position needs to be adjusted in real time, etc. In the process of implementing the technical solution of the present disclosure, it is found that there are also many known technical solutions in the field of map label layout optimization, but each solution has its limitations, such as:
[0060] 1. Simple displacement method
[0061] This method moves the label to a fixed direction (such as the upper right) by a certain distance when label overlap is detected. Although this method is simple and fast, it can easily cause the label to deviate too far from its original position and is not effective in high-density areas.
[0062] 2. Greedy Algorithm
[0063] The greedy algorithm places labels in a certain order (such as importance) and searches for the nearest available position when an overlap occurs. This method is efficient, but the quality of the result depends on the order in which the labels are processed, and it is difficult to obtain a global optimal solution.
[0064] In order to solve some or all of the technical problems in the related art, the embodiment of the present disclosure provides a method for processing map labels. The following is a detailed introduction to the technical solution of the embodiment of the present disclosure.
[0065] Figure 1 FIG. 1 is a flow chart of an embodiment of a method for processing map labels disclosed in the embodiment of the present disclosure. Figure 1 As shown, a method for processing a map label in an embodiment of the present disclosure may include the following steps:
[0066] Step 101: determine a first total area of overlapping areas between a target tag and other tags in a target map.
[0067] In the disclosed embodiment, the first total area can be calculated by the difference between the total area of the target tag and the area of the non-overlapping area of the target tag. It can also be directly calculated by obtaining the shape geometric coordinates of the overlapping area and inputting the shape geometric coordinates into a preset area formula. Among them, the non-overlapping area of the target tag is the area of the target tag that is not overlapped and blocked by any other tag, that is, the area of the total area of the target tag except the area overlapping with other tags becomes the non-overlapping area.
[0068] The target map can be any map that needs to be optimized for map label layout. The technician can obtain the target map by manual loading, and further optimize the map label of the map by the method of the embodiment of the present disclosure. The target label is any map label in the target map, and its shape includes but is not limited to rectangle, circle or other shapes. Since the map labels are concentrated in a certain area, the target label may overlap with other labels to form an overlapping area, which may block the target label and affect the recognition of the target label.
[0069] In the disclosed embodiment, the size, position and other information of the target tag can be determined by obtaining the coordinate value of the target tag, so as to further determine the area of its overlapping area and obtain the first total area. Exemplarily, the coordinate value of the shape boundary and the coordinate value of the shape center point of the target tag in the target map can be obtained, as well as the coordinate value of the shape boundary and the coordinate value of the shape center point of other tags overlapping with the target tag. The total area of the target tag is determined based on the coordinate value of the shape boundary and the coordinate value of the shape center point of the target tag. The area of the non-overlapping area of the target tag is determined based on the coordinate value of the shape boundary and the coordinate value of the shape center point of the target tag, as well as the coordinate value of the shape boundary and the coordinate value of the shape center point of other tags overlapping with the target tag. Then, the total area of the target tag and the area of the non-overlapping area of the target tag are subjected to difference processing to obtain the first total area of the overlapping area between the target tag and other tags.
[0070] In other embodiments, taking the case where all map labels are rectangular labels as an example, the total area of the overlapping regions of the target label and other labels can also be determined according to the coordinates of the center point of the target label and the width and height of the target label. Exemplarily, it can be calculated by the following formula:
[0071] w=w1+w2-|x1-x2|;
[0072] h=h1+h2-|y1-y2|;
[0073] s=w*h; Formula (1)
[0074] Among them, w1 and h1 are the width and height of the target label respectively, x1 and y1 are the coordinates of the center point of the target label, w2 and h2 are the width and height of other labels overlapping with the target label respectively, and x2 and y2 are the coordinates of the center points of other labels overlapping with the target label, w and h are the width and height of the overlapping area respectively, and s is the area of the overlapping area.
[0075] Step 102: determine the first total area as the initialization value of the current minimum overlapping area of the target tag, and record the first coordinate value of the target tag, wherein the first coordinate value is the initial coordinate value of the target tag.
[0076] In the disclosed embodiment, it is necessary to record and update the current minimum overlapping area of the target tag. In this step, the first total area is the total area of the overlapping area of the target tag and other tags when the target tag is in its initial position (or original position), which is recorded as the initial current minimum overlapping area, that is, the initialization value of the minimum overlapping area. In the subsequent process of continuously updating the target tag, the minimum overlapping area will be continuously updated.
[0077] In addition, in the embodiment of the present disclosure, the initial (or original) coordinate value of the target tag is also recorded to record its initial (or original) position, that is, the first coordinate value of the target tag is recorded.
[0078] Step 103, iteratively determine the second coordinate value of the target tag based on the Archimedean screw equation, the minimum overlapping area and the first coordinate value of the target tag, and iteratively update and record the minimum overlapping area corresponding to the position of the second coordinate value.
[0079] In this step, the first coordinate value of the target tag can be used as the coordinate value of the origin of the Archimedean spiral, and then the Archimedean spiral is determined based on the Archimedean spiral equation. The Archimedean spiral starts from the first coordinate value of the target tag as the origin, and expands the range of its spiral according to a certain radius increment and rotation angle increment, but it can ensure that the range is in the vicinity of the first coordinate value of the target tag.
[0080] Step 104, when a preset iteration condition is met, the second coordinate value corresponding to the current minimum overlapping area of the target tag recorded is determined as the final coordinate value of the target tag, wherein the preset iteration condition includes a preset number of iterations and / or a preset overlapping area threshold.
[0081] By iterative search on the Archimedean spiral, the new coordinate value of the target tag is determined, and then the total area of the new overlapping area of the target tag and other tags at the position of the new coordinate value is determined, so as to compare the total area of the new overlapping area with the recorded current minimum overlapping area. If it is less than the recorded current minimum overlapping area, the total area of the new overlapping area is recorded as the new current minimum overlapping area, and the new coordinate value of the target tag is recorded. The search is iterated step by step, and when certain iteration conditions are met (for example, the number of iterations is reached, or the total area of the new overlapping area reaches the preset overlapping area conditions, etc.), the new coordinate value corresponding to the current minimum overlapping area of the target tag is recorded as its final coordinate value. Since all the obtained coordinate values of the target tag are on the Archimedean spiral, its final coordinate value can also be kept near its first coordinate value, and will not deviate far from the first coordinate value (original position).
[0082] Step 105, moving the target tag to the final coordinate value.
[0083] In the disclosed embodiment, after the final coordinate value of the target tag is determined in the previous step, the target tag can be moved from its previous coordinate position to the position indicated by the final coordinate value by, for example, a translation operation to achieve layout optimization of the target tag.
[0084] Through the above embodiment, the geometric characteristics of the Archimedean spiral (an outward-expanding spiral) are utilized to ensure that in the process of searching for the final coordinate position of the target tag, the area around the target tag in the target map can be systematically covered, so that the final coordinate position of the target tag is also within the range of the Archimedean spiral geometry and will not deviate too far from the target tag, thereby avoiding randomness and a large deviation from the original position of the target tag.
[0085] By recording the initial coordinate value of the target label and the current minimum overlapping area of the target label, the original position of the target label is maintained while ensuring that even in extreme cases where the overlap cannot be completely eliminated, the optimal compromise solution can be found to find the final coordinate position with no overlap or minimal overlap, thereby improving robustness, solving the problem of label overlap on the map, and improving the readability of the map and the accuracy of information.
[0086] Furthermore, the present disclosure also provides another optional embodiment. Figure 2 FIG. 1 is a flowchart of another embodiment of the method for processing map labels disclosed in the embodiment of the present disclosure. Figure 2 As shown, in a method for processing a map label provided by an embodiment of the present disclosure, step 103 can be further implemented by the following steps:
[0087] Step 1031: determine the first coordinate value of the target tag as the origin coordinate value of the Archimedean spiral.
[0088] The Archimedean spiral is a trajectory generated by a point moving away from a fixed point at a constant speed while rotating around the fixed point at a fixed angular velocity. In the disclosed embodiment, the point of the first coordinate value of the target tag can be used as the origin (i.e., the fixed point) of the Archimedean spiral, and the first coordinate value can be, for example, the coordinate value of the center point of the target tag.
[0089] Step 1032, determining the Archimedean spiral according to the coordinate value of the origin of the Archimedean spiral, the preset spiral parameters and the Archimedean spiral equation.
[0090] After determining the coordinate value of the origin of the Archimedean spiral, the Archimedean spiral is determined according to the preset spiral parameters and the Archimedean spiral equation. The preset spiral parameters include but are not limited to the initial rotation angle, the initial radius, the angle increment, and the radius increment. Based on this, the coordinate value of the origin of the Archimedean spiral is used as the starting point coordinate, and according to the preset initial rotation angle, the preset initial radius, the preset angle increment, and the preset radius increment, the Archimedean spiral is finally generated based on the Archimedean spiral equation.
[0091] As an embodiment of the present disclosure, the preset initial rotation angle can be 20°, which is used to define the starting angle of the Archimedean spiral and limit the search direction of the coordinate value of the target tag; the preset initial radius can be 3mm, which defines the starting radius of the Archimedean spiral and affects the starting distance of the coordinate value search of the target tag; the preset angle increment, that is, the rotation angle increase step, can be 3°, which is used to control the angle increment of each rotation of the Archimedean spiral and affect the density and range of the coordinate value search of the target tag; the preset radius increment, that is, the radius increase step, can be 3mm, which controls the radius increment of each expansion of the Archimedean spiral and affects the density and range of the coordinate value search of the target tag. By limiting and controlling the preset initial rotation angle, the preset initial radius, the preset angle increment and the preset radius increment, the Archimedean spiral is controlled within a certain range, thereby controlling the range and density of the coordinate value search of the target tag, ensuring that the final coordinate value of the target tag can be near its original position without deviating too far from the original position.
[0092] The Archimedean spiral equation may be, for example, the polar coordinate equation of the Archimedean spiral, specifically:
[0093] r=a+bθ Formula (2)
[0094] Where a and b are both real numbers, and θ represents the angle between the line connecting the point and the origin and the positive direction of the x-axis. When θ=0, a is the distance from the starting point (or origin) to the origin of the polar coordinates, and b is the value that increases with each unit angle r of the spiral. When θ>0, a is equivalent to a rotating spiral, and the parameter b controls the distance between two adjacent curves.
[0095] Step 1033 , iteratively determine the second coordinate value of the target tag based on the Archimedean spiral, the minimum overlapping area, and the first coordinate value of the target tag.
[0096] Step 1034, in each iteration, compare the total area of the overlapping regions of the target tag and other tags at the position corresponding to the second coordinate value with the minimum overlapping area recorded in the previous iteration, so as to update and record the current minimum overlapping area of the target tag according to the comparison result.
[0097] In the disclosed embodiment, after determining the Archimedean spiral, an iterative process can be initiated to search for the new coordinate position of the target tag along the Archimedean spiral by gradually increasing the angle and radius. For example, the search can be iteratively performed according to the aforementioned preset initial rotation angle, preset initial radius, preset angle increment, and preset radius increment to determine the new coordinate position of the target tag. And at each new coordinate position, the area of the overlapping area between the target tag and other tags at the coordinate position is calculated to compare with the minimum overlapping area. It can be understood that by calculating the area of the overlapping area between the target tag and other tags multiple times and then comparing it with the minimum overlapping area, the minimum overlapping area is continuously updated to find the coordinate position with the smallest overlapping area and meeting the preset iteration conditions.
[0098] Through the above embodiments, by adjusting the parameters of the Archimedean spiral, different label densities and layout requirements can be met. For example, increasing the preset angle increment and the preset radius increment can speed up the search, but may reduce the accuracy; reducing these parameters can improve the search accuracy, but may increase the calculation time, and immediately detecting the area of the overlapping area after each small movement improves the efficiency of the algorithm, is suitable for real-time operation on mobile devices, and supports dynamic map scenes.
[0099] As an embodiment of the present disclosure, Figure 3 FIG. 1 is a flowchart of another embodiment of the method for processing map labels disclosed in the embodiment of the present disclosure. Figure 3 As shown, in the embodiment of the present disclosure, determining the final coordinate value of the target tag can be further implemented as follows:
[0100] Step S1, based on the Archimedean spiral, a second coordinate value of the target tag is calculated with the first coordinate value as the initial coordinate value.
[0101] Exemplarily, the radius value and rotation angle value corresponding to any point on the Archimedean spiral can be determined, and then the coordinate superposition value can be determined based on the radius value and rotation angle value corresponding to the point, wherein the coordinate superposition value is the coordinate value that should be moved from the initial coordinate value to the point, and then the second coordinate value of the target tag is calculated and determined based on the initial coordinate value and the coordinate superposition value, wherein the initial coordinate value is the first coordinate value of the target tag.
[0102] Among them, in the embodiment of the present disclosure, the position of the first coordinate value of the target tag can be used as the initial starting point, and a search can be performed on the Archimedean spiral according to a preset angle increment and a preset radius increment to determine the corresponding position of the second coordinate value. Specifically, the rotation angle value corresponding to the point can be determined according to the preset initial rotation angle, the preset angle increment and the current number of iterations (i.e., the number of times the target tag is currently moved) of the Archimedean spiral, and the radius value corresponding to the point can be determined according to the preset initial radius, the preset radius increment and the current number of iterations of the Archimedean spiral. In this way, the second coordinate value can be calculated based on the first coordinate value of the target tag, and the determined radius value and rotation angle value.
[0103] As an example, the second coordinate value can be calculated by the following formula:
[0104] newX=initX+(r+i*dr)*cos(θ+i*dθ);
[0105] newY=initY+(r+i*dr)*sin(θ+i*dθ) Formula (3)
[0106] Among them, initX and initY are the initial horizontal and vertical coordinates of the target tag (or the initial coordinate value, i.e., the first coordinate value), i is the number of the target tag currently moving (or the current iteration number), dr and dθ represent the preset radius increment and the preset angle increment respectively. It can be understood that (r+i*dr)*cos(θ+i*dθ) can be the coordinate superposition value of the horizontal axis, and (r+i*dr)*sin(θ+i*dθ) can be the coordinate superposition value of the vertical axis.
[0107] Step S2, moving the target tag to a position corresponding to the second coordinate value.
[0108] After determining the second coordinate value, the target tag can be moved from the previous coordinate position to the position corresponding to the current second coordinate value, for example, by means of a translation operation. For example, assuming that this is the first iteration (that is, the first time the target tag is moved), the position of the target tag before moving is its original position (that is, the position corresponding to the first coordinate value), and it is moved from the original position to the position corresponding to the second coordinate value obtained in this iteration; and if it has been iterated multiple times, the position of the target tag before moving is the position corresponding to the second coordinate value obtained in the previous (for example, i-1) iteration, and it is moved from this position to the position corresponding to the latest second coordinate value obtained in the current (for example, i) iteration.
[0109] Step S3: In each iteration, at the position corresponding to the second coordinate value, determine a second total area of the overlapping area between the target tag and other tags.
[0110] In the embodiment of the present disclosure, reference can be made to the definition of the first total area, that is, the second total area is the difference between the total area of the target tag and the area of the non-overlapping area of the target tag at the position corresponding to the current second coordinate value, wherein the non-overlapping area of the target tag is the area of the target tag at the position corresponding to the current second coordinate value that is not overlapped or blocked by any other tag.
[0111] At the position corresponding to the second coordinate value, determining the second total area of the overlapping region between the target tag and other tags can refer to the implementation method of step 101, which will not be repeated here for brevity.
[0112] Step S4: when it is determined that the second total area is smaller than the minimum overlapping area of the target tag recorded last time, the second total area is updated to the current minimum overlapping area of the target tag.
[0113] In this step, the first determined second total area is compared with the minimum overlapping area recorded last time. Exemplarily, assuming that this is the first iteration (that is, the first time the target tag is moved), the first total area determined in step 101 is the current minimum overlapping area of the target tag recorded last time. The second total area is compared with the first total area. If the second total area is smaller than the first total area, the second total area is updated to the current minimum overlapping area of the target tag.
[0114] For example, assuming that multiple iterations have been performed (for example, the i-th iteration), the last recorded minimum overlapping area is the second total area obtained at the i-2th iteration (that is, the second total area obtained at the i-1th iteration is larger than the second total area obtained at the i-2th iteration, then the second total area obtained at the i-2th iteration is still used as the current minimum overlapping area of the target label), then the second total area obtained at the i-th iteration is compared with the second total area obtained at the i-2th iteration. If the second total area obtained at the i-th iteration is smaller than the second total area obtained at the i-2th iteration, then the second total area obtained at the i-th iteration is updated as the current minimum overlapping area of the target label.
[0115] In the embodiment of the present disclosure, in addition to updating the second total area to the current minimum overlapping area of the target tag, the second coordinate value corresponding to the current minimum overlapping area of the target tag is also recorded.
[0116] Step S5, determining whether a preset iteration condition is satisfied, if satisfied, executing step S6, if not satisfied, executing steps S1 to S4 in sequence.
[0117] In the embodiment of the present disclosure, the preset iteration condition may be whether the current iteration number reaches the preset iteration number, or whether the determined second total area reaches the preset overlap area threshold. Exemplarily, for example, if the preset iteration number is 30, the current iteration number i is compared with the preset iteration number. If i is less than 30, it is determined that the preset iteration condition is not met, and it is necessary to continue iteration, and steps S1 to S4 are executed. If i is equal to 30, it is determined that the preset iteration condition is met, and step S6 is executed.
[0118] Step S6: determine the second coordinate value corresponding to the current minimum overlapping area of the target tag recorded when the preset iteration condition is met as the final coordinate value of the target tag.
[0119] In step S4, in addition to updating the second total area to the current minimum overlapping area of the target tag, the second coordinate value corresponding to the current minimum overlapping area of the target tag is also recorded. Therefore, in this step, when the preset iteration condition is met, the currently recorded minimum overlapping area and the corresponding second coordinate value can be viewed.
[0120] As an embodiment of the present disclosure, it is possible to determine whether the current number of iterations reaches the preset number of iterations. When it is determined that the current number of iterations reaches the preset number of iterations, after determining that the current number of iterations ends, obtain the current minimum overlapping area of the target tag recorded when the current number of iterations is reached, and then use the second coordinate value corresponding to the current minimum overlapping area of the recorded target tag as the final coordinate value of the target tag. Exemplarily, assuming that the preset number of iterations is 30, if the second total area iteratively calculated when i=30 is smaller than the minimum overlapping area recorded last time, then the second total area obtained when i=30 is the current minimum overlapping area, and the corresponding second coordinate value is also the final coordinate value. Conversely, if the second total area iteratively calculated when i=30 is larger than the minimum overlapping area recorded last time (for example, i=28), then the second total area obtained when i=28 is the current minimum overlapping area, and the corresponding second coordinate value is the final coordinate value of the target tag.
[0121] As another embodiment of the present disclosure, in any iteration, at the position corresponding to the second coordinate value, it is determined whether the second total area updated as the current minimum overlapping area of the target tag reaches a preset overlapping area threshold, wherein the preset overlapping area threshold is the minimum value of the overlapping area pre-set and input by the input device, and when it is determined that the second total area reaches the preset overlapping area threshold, the corresponding second coordinate value is determined as the final coordinate value of the target tag. For example, the preset overlapping area threshold is 0, that is, the target tag no longer overlaps with other tags and has no overlapping area. If this condition is met, the corresponding second coordinate value is determined as the final coordinate value of the target tag.
[0122] Through the above embodiment, in the process of iteratively searching for the new coordinate position of the target tag, the minimum overlapping area and the coordinate position with the minimum overlapping area are continuously updated and recorded. When the preset number of iterations or the preset overlapping area threshold (for example, the position of the non-overlapping area is found), the position is the final coordinate position of the target tag. In this way, the area of the overlapping area is detected immediately after each iteration to improve the calculation efficiency, and the minimum overlapping area and the corresponding coordinate position are continuously updated to ensure that the optimal solution can be found even when the overlap cannot be completely eliminated, which effectively solves the problem of map label overlap while ensuring the efficiency and flexibility of the calculation.
[0123] In summary, through the aforementioned method embodiments, by combining the geometric characteristics of the Archimedean spiral (an outward-expanding spiral), it is ensured that in the process of searching for the final coordinate position of the target tag, the area around the target tag in the target map can be systematically covered, so that the final coordinate position of the target tag is also within the range of the Archimedean spiral geometry and will not deviate too far from the target tag, thereby avoiding randomness and a large deviation from the original position of the target tag. The disclosed embodiment also uses the minimum overlapping area to find the final coordinate position with no overlap or minimal overlap as much as possible, thereby improving robustness, solving the problem of label overlap on the map, and improving the readability and information accuracy of the map.
[0124] In addition, by adjusting the parameters of the Archimedean spiral, it can adapt to different label densities and layout requirements. For example, increasing the preset angle increment and the preset radius increment can speed up the search, but may reduce the accuracy; reducing these parameters can improve the search accuracy, but may increase the calculation time, and immediately detecting the area of the overlapping area after each small movement improves the efficiency of the algorithm, making it suitable for real-time operation on mobile devices and supporting dynamic map scenarios.
[0125] Also, in the process of iteratively searching for the new coordinate position of the target tag, the minimum overlapping area and the coordinate position with the minimum overlapping area are continuously updated and recorded. When the preset number of iterations or the preset overlapping area threshold (for example, the position of the non-overlapping area is found), the final coordinate position of the target tag can be determined. In this way, the area of the overlapping area is detected immediately after each iteration to improve the calculation efficiency, and the minimum overlapping area and the corresponding coordinate position are continuously updated to ensure that the optimal solution can be found even when the overlap cannot be completely eliminated, effectively solving the problem of map label overlap while ensuring the efficiency and flexibility of the calculation.
[0126] Correspondingly, the embodiments of the present disclosure also provide device embodiments corresponding to the aforementioned method embodiments. Figure 4 FIG. 1 is a structural block diagram of an embodiment of a map label processing device disclosed in the present disclosure. Figure 4 As shown, a map label processing device according to an embodiment of the present disclosure may include a first determining unit 401, a recording unit 402, a second determining unit 403, a third determining unit 404 and a moving unit 405. Specifically:
[0127] The first determining unit 401 may be used to determine a first total area of an overlapping area between a target tag and other tags in a target map, wherein the first total area is a difference between a total area of the target tag and an area of a non-overlapping area of the target tag, wherein the non-overlapping area of the target tag is an area of the target tag that is not overlapped and blocked by any of the other tags;
[0128] The recording unit 402 may be configured to determine the first total area as an initialization value of a current minimum overlapping area of the target tag, and record a first coordinate value of the target tag, where the first coordinate value is an initial coordinate value of the target tag;
[0129] The second determining unit 403 may be configured to iteratively determine a second coordinate value of the target tag based on the Archimedean screw equation, the minimum overlapping area, and the first coordinate value of the target tag, and iteratively update and record the minimum overlapping area corresponding to the position of the second coordinate value;
[0130] The third determination unit 404 can be used to determine the second coordinate value corresponding to the current minimum overlapping area of the recorded target tag as the final coordinate value of the target tag when the preset iteration condition is met, wherein the preset iteration condition includes a preset number of iterations and / or a preset overlapping area threshold.
[0131] The moving unit 405 may be configured to move the target tag to the final coordinate value.
[0132] Through the aforementioned device embodiment, by combining the geometric characteristics of the Archimedean spiral (an outward-expanding spiral), it is ensured that in the process of searching for the final coordinate position of the target tag, the area around the target tag in the target map can be systematically covered, so that the final coordinate position of the target tag is also within the range of the Archimedean spiral geometry and will not deviate too far from the target tag, thereby avoiding randomness and a large deviation from the original position of the target tag. The embodiment of the present disclosure also uses the minimum overlapping area to find the final coordinate position with no overlap or minimal overlap as much as possible, thereby improving robustness, solving the problem of label overlap on the map, and improving the readability of the map and the accuracy of information.
[0133] Each unit module in the device embodiment can correspondingly implement the corresponding steps in the method embodiment, corresponding to each step or sub-step in the embodiment, and the technical effects that can be achieved also correspond to the technical effects that can be achieved in the method embodiment. For the sake of brevity, they will not be repeated here.
[0134] According to another embodiment of the present disclosure, the second determination unit 403 can be further used to: determine the first coordinate value of the target tag as the origin coordinate value of the Archimedean spiral; determine the Archimedean spiral according to the origin coordinate value of the Archimedean spiral, preset spiral parameters and the Archimedean spiral equation; iteratively determine the second coordinate value of the target tag based on the Archimedean spiral, the minimum overlapping area and the first coordinate value of the target tag; in each iteration, compare the total area of the overlapping area between the target tag and other tags at the position corresponding to the second coordinate value with the minimum overlapping area recorded in the previous iteration to update and record the current minimum overlapping area of the target tag according to the comparison result.
[0135] Furthermore, when the second determination unit 403 executes the step of determining the Archimedean spiral according to the origin coordinate value of the Archimedean spiral, the preset spiral parameters and the Archimedean spiral equation, it can be specifically implemented as taking the origin coordinate value of the Archimedean spiral as the starting point coordinate, and generating the Archimedean spiral based on the Archimedean spiral equation according to the preset initial rotation angle, the preset initial radius, the preset angle increment and the preset radius increment.
[0136] When the second determination unit 403 executes the step of iteratively determining the second coordinate value of the target tag based on the Archimedean spiral, the minimum overlapping area and the first coordinate value of the target tag, it can be specifically implemented as determining the first coordinate value of the target tag as the initial coordinate value on the Archimedean spiral; determining the radius value and the rotation angle value corresponding to any point on the Archimedean spiral; determining a coordinate superposition value according to the radius value and the rotation angle value corresponding to the point, the coordinate superposition value being the coordinate value to be moved from the initial coordinate value to the point; and calculating and determining the second coordinate value of the target tag based on the initial coordinate value and the coordinate superposition value.
[0137] Furthermore, the second determination unit 403 executes a sub-step of determining the radius value and the rotation angle value corresponding to any point on the Archimedean spiral, which can be specifically implemented by determining the rotation angle value corresponding to the point according to the preset initial rotation angle, the preset angle increment and the current number of iterations of the Archimedean spiral, and determining the radius value corresponding to the point according to the preset initial radius, the preset radius increment and the current number of iterations of the Archimedean spiral.
[0138] When the second determination unit 403 performs the step of comparing the total area of the overlapping area between the target tag and other tags at the position corresponding to the second coordinate value with the minimum overlapping area recorded in the previous iteration in each iteration to update and record the current minimum overlapping area of the target tag according to the comparison result, it can be specifically implemented as follows: in each iteration, at the position corresponding to the second coordinate value, determining the second total area of the overlapping area between the target tag and other tags, the second total area being the difference between the total area of the target tag and the area of the non-overlapping area of the target tag at the position corresponding to the current second coordinate value, wherein the non-overlapping area of the target tag is the area of the target tag that is not overlapped and blocked by any of the other tags at the position corresponding to the current second coordinate value; comparing the second total area with the minimum overlapping area of the target tag recorded last time; and when it is determined that the second total area is smaller than the minimum overlapping area of the target tag recorded last time, updating the second total area to the current minimum overlapping area of the target tag.
[0139] In some embodiments, the third determination unit 404 can be further used to determine whether the current number of iterations reaches a preset number of iterations, and then obtain the current minimum overlapping area of the target tag recorded when the current number of iterations is reached, and finally use the second coordinate value corresponding to the current minimum overlapping area of the recorded target tag as the final coordinate value of the target tag.
[0140] In some embodiments, the third determination unit 404 can be further used to update the second total area of the current minimum overlapping area of the target tag at the position corresponding to the second coordinate value in any iteration to determine whether it reaches a preset overlapping area threshold, where the preset overlapping area threshold is the minimum value of the overlapping area pre-set and input by the input device, and then, when it is determined that the second total area reaches the preset overlapping area threshold, determine that the corresponding second coordinate value is the final coordinate value of the target tag.
[0141] As an embodiment of the present disclosure, when determining the first total area, the first determination unit 401 can further implement the following steps: first, obtain the coordinate values of the shape boundary and the coordinate values of the shape center point of the target label in the target map, and obtain the coordinate values of the shape boundary and the coordinate values of the shape center point of other labels overlapping with the target label; then, determine the total area of the target label according to the coordinate values of the shape boundary and the coordinate values of the shape center point of the target label; further, determine the area of the non-overlapping area of the target label according to the coordinate values of the shape boundary and the coordinate values of the shape center point of the target label, and the coordinate values of the shape boundary and the coordinate values of the shape center point of other labels overlapping with the target label; finally, perform difference processing on the total area of the target label and the area of the non-overlapping area of the target label to obtain the first total area of the overlapping area between the target label and other labels.
[0142] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0143] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0144] Below, reference Figure 5 The electronic device according to the embodiment of the present disclosure is described. The electronic device may be any one or both of the first device and the second device, or a stand-alone device independent of them, and the stand-alone device may communicate with the first device and the second device to receive the collected input signals from them.
[0145] Figure 5 A block diagram of an electronic device according to an embodiment of the present disclosure is illustrated.
[0146] like Figure 5 As shown, the electronic device includes one or more processors and memory.
[0147] The processor may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0148] The memory may store one or more computer program products, and the memory may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program products may be stored on the computer-readable storage medium, and the processor may run the computer program product to implement the map label processing method and / or other desired functions of the various embodiments of the present disclosure described above.
[0149] In one example, the electronic device may further include: an input device and an output device, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0150] In addition, the input device may also include, for example, a keyboard, a mouse, and the like.
[0151] The output device can output various information to the outside, including determined distance information, direction information, etc. The output device can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0152] Of course, to simplify, Figure 5 Only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device may further include any other appropriate components.
[0153] In addition to the above-mentioned methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the map label processing method according to various embodiments of the present disclosure described in the above part of this specification.
[0154] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0155] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the method for processing map labels according to various embodiments of the present disclosure described in the above part of this specification.
[0156] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0157] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0158] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0159] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
[0160] It should also be noted that in the apparatus, device and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0161] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0162] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for processing map labels, characterized in that: The method comprises: Determine a first total area of an overlapping area between a target tag and other tags in a target map, wherein the first total area is a difference between a total area of the target tag and an area of a non-overlapping area of the target tag, wherein the non-overlapping area of the target tag is an area of the target tag that is not overlapped and blocked by any of the other tags; Determine the first total area as an initialization value of the minimum overlapping area of the target tag, and record a first coordinate value of the target tag, where the first coordinate value is an initial coordinate value of the target tag; Iteratively determining a second coordinate value of the target tag based on the Archimedean screw equation, the minimum overlapping area and the first coordinate value of the target tag, and iteratively updating and recording the minimum overlapping area corresponding to the position of the second coordinate value; When a preset iteration condition is met, the second coordinate value corresponding to the current minimum overlapping area of the recorded target tag is determined as the final coordinate value of the target tag, wherein the preset iteration condition includes a preset number of iterations and / or a preset overlapping area threshold; Move the target tag to the final coordinate value.
2. The method according to claim 1, characterized in that The iteratively determining the second coordinate value of the target tag based on the Archimedean screw equation, the minimum overlapping area and the first coordinate value of the target tag, and iteratively updating and recording the minimum overlapping area corresponding to the position of the second coordinate value, includes: Determine the first coordinate value of the target tag as the origin coordinate value of the Archimedean spiral; Determine the Archimedean spiral according to the coordinate value of the origin of the Archimedean spiral, the preset spiral parameters and the Archimedean spiral equation; iteratively determining a second coordinate value of the target tag based on the Archimedean spiral, the minimum overlapping area, and the first coordinate value of the target tag; In each iteration, the total area of the overlapping regions of the target tag and other tags at the position corresponding to the second coordinate value is compared with the minimum overlapping area recorded in the previous iteration to update and record the current minimum overlapping area of the target tag according to the comparison result.
3. The method according to claim 2, characterized in that The determining of the Archimedean spiral according to the coordinate value of the origin of the Archimedean spiral, the preset spiral parameters and the Archimedean spiral equation comprises: The Archimedean spiral is generated based on the Archimedean spiral equation by taking the origin coordinate value of the Archimedean spiral as the starting point coordinate according to a preset initial rotation angle, a preset initial radius, a preset angle increment and a preset radius increment.
4. The method according to claim 2 or 3, characterized in that: The iteratively determining the second coordinate value of the target tag based on the Archimedean spiral, the minimum overlapping area and the first coordinate value of the target tag comprises: Determine the first coordinate value of the target tag as the initial coordinate value on the Archimedean spiral; Determine the radius value and rotation angle value corresponding to any point on the Archimedean spiral; Determine a coordinate superposition value according to the radius value and the rotation angle value corresponding to the point, wherein the coordinate superposition value is the coordinate value to be moved from the initial coordinate value to the point; A second coordinate value of the target tag is determined by calculation based on the initial coordinate value and the coordinate superposition value.
5. The method according to claim 4, characterized in that In each iteration, the total area of the overlapping regions of the target tag and other tags at the position corresponding to the second coordinate value is compared with the minimum overlapping area recorded in the previous iteration, so as to update and record the current minimum overlapping area of the target tag according to the comparison result, including: In each iteration, at the position corresponding to the second coordinate value, determine the second total area of the overlapping area between the target tag and other tags, the second total area being the difference between the total area of the target tag and the area of the non-overlapping area of the target tag at the position corresponding to the current second coordinate value, wherein the non-overlapping area of the target tag is the area of the target tag that is not overlapped or blocked by any of the other tags at the position corresponding to the current second coordinate value; Compare the second total area with the minimum overlapping area of the target tag recorded last time; When it is determined that the second total area is smaller than the minimum overlapping area of the target tag recorded last time, the second total area is updated to the current minimum overlapping area of the target tag.
6. The method according to claim 4, characterized in that Determining the radius value and rotation angle value corresponding to any point on the Archimedean spiral line includes: The rotation angle value corresponding to the point is determined according to the preset initial rotation angle, preset angle increment and current number of iterations of the Archimedean spiral, and the radius value corresponding to the point is determined according to the preset initial radius, preset radius increment and current number of iterations of the Archimedean spiral.
7. The method according to claim 5, characterized in that When the preset iteration condition is met, the second coordinate value corresponding to the current minimum overlapping area of the recorded target tag is determined as the final coordinate value of the target tag, including: Determine whether the current number of iterations reaches the preset number of iterations; When it is determined that the current number of iterations reaches the preset number of iterations, obtaining the current minimum overlapping area of the target tag recorded when the current number of iterations is reached; The second coordinate value corresponding to the current minimum overlapping area of the recorded target tag is used as the final coordinate value of the target tag.
8. The method according to claim 5, characterized in that When the preset iteration condition is met, the second coordinate value corresponding to the current minimum overlapping area of the recorded target tag is determined as the final coordinate value of the target tag, including: In any iteration, at the position corresponding to the second coordinate value, determining whether the second total area updated to the current minimum overlapping area of the target tag reaches a preset overlapping area threshold, wherein the preset overlapping area threshold is a minimum value of the overlapping area pre-set and inputted through an input device; When it is determined that the second total area reaches the preset overlapping area threshold, the corresponding second coordinate value is determined as the final coordinate value of the target tag.
9. The method according to any one of claims 1 to 3 and 5 to 8, characterized in that: The determining a first total area of overlapping regions between the target label and other labels in the target map includes: Acquire the coordinate values of the shape boundary and the coordinate values of the shape center point of the target tag in the target map, and acquire the coordinate values of the shape boundary and the coordinate values of the shape center point of other tags overlapping with the target tag; Determine the total area of the target label according to the coordinate value of the shape boundary and the coordinate value of the shape center point of the target label; Determine the area of the non-overlapping region of the target label according to the coordinate values of the shape boundary and the coordinate values of the shape center point of the target label and the coordinate values of the shape boundary and the coordinate values of the shape center point of other labels overlapping with the target label; A difference process is performed on the total area of the target tag and the area of the non-overlapping area of the target tag to obtain a first total area of the overlapping area of the target tag and other tags.
10. An electronic device, characterized in that: include: A memory for storing a computer program product; A processor is used to execute the computer program product stored in the memory, and when the computer program product is executed, it implements the method described in any one of claims 1 to 9.
11. A computer program product comprising computer program instructions, characterized in that When the computer program instructions are executed by a processor, the method described in any one of claims 1 to 9 is implemented.