Target label automatic avoidance method and system
By employing a multi-level spiral search and dynamic priority-based automatic target sign avoidance method, the problem of low sign avoidance efficiency in radar target display systems has been solved. This method achieves smooth and stable sign display and efficient collision detection, thereby improving system performance and human-computer interaction experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 无锡市雷华科技有限公司
- Filing Date
- 2025-12-24
- Publication Date
- 2026-04-21
AI Technical Summary
In existing radar target display systems, the automatic sign avoidance algorithm is inefficient, has unsatisfactory avoidance effect, lacks a priority mechanism, and has poor position continuity, resulting in slow system response and information obstruction problems.
An automatic target sign avoidance method using multi-level spiral search and dynamic priority is adopted. By pre-setting candidate positions, axial bounding box detection, and user interaction priority processing, smooth sign avoidance and efficient collision detection are achieved.
It significantly improves the smoothness and stability of signage, reduces computing resource consumption, ensures stable display of key information and user interaction experience, and forms an orderly signage layout.
Smart Images

Figure CN121900673A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer graphics technology, and in particular to a method and system for automatic avoidance of target signs. Background Technology
[0002] Target labels are crucial information elements displayed on radar screens, providing real-time information such as the target's number, altitude, and speed. To prevent labels from overlapping or obscuring the target, an automatic avoidance algorithm is necessary. Existing automatic avoidance algorithms suffer from the following main drawbacks: Collision avoidance is inefficient: Most methods use global traversal for collision detection, and the computational load increases exponentially as the number of targets increases, resulting in slow system response.
[0003] Unsatisfactory avoidance effect: Traditional algorithms often only consider simple directional offsets and lack a systematic position planning strategy, which can easily cause signs to frequently jump between a few fixed positions or create new overlaps.
[0004] Lack of prioritization mechanism: The processing priority is not differentiated according to the importance of the target or the user's interaction status, and the signage of the key target may be obscured by the secondary target.
[0005] Poor positional continuity: Signs for the same target may appear in different positions at different refresh cycles, which is not conducive to the operator's visual tracking and memorization.
[0006] Therefore, there is an urgent need for a new method and system that can significantly reduce signage bounce, save computing resources, and achieve comprehensive intelligent obstacle avoidance. Summary of the Invention
[0007] To address the aforementioned problems, this invention provides a method and system for automatic target sign avoidance. This invention effectively solves the key technical challenges of automatic target sign avoidance in existing radar target display systems, significantly improving system performance and human-computer interaction, and has broad application prospects. This invention is not only applicable to radar target display systems, but can also be widely applied to various computer information visualization fields such as electronic map systems, equipment status monitoring systems, and data visualization systems that require dense information labeling.
[0008] To achieve the above objectives, the technical solution adopted by the present invention is as follows: In a first aspect, the present invention provides a method for automatic avoidance of target signs, comprising the following steps: S1. For each target, a batch of candidate sign locations are preset: with the target point as the center, the area is evenly divided into m directions according to the angle, and divided into n levels according to the distance from near to far, forming m×n candidate locations, and each candidate location is assigned a unique serial number; S2. Overlap judgment: Judge the overlap between the sign to be drawn and the target point, as well as the overlap between the sign to be drawn and other already drawn signs. S3. Sign position selection, including: S31. For the current target point, obtain the position serial number used when the sign was drawn last time. S32. Judge whether the candidate position corresponding to this serial number overlaps with the target point or other already drawn signs. S33. If there is no overlap, draw the sign at this position. S34. If there is an overlap, judge the remaining candidate positions in ascending order of the serial number until an un-overlapped position is found and draw the sign. S35. If all candidate positions overlap, draw the sign at the position corresponding to the last serial number. S4. Execution process: S41. If there is a detail sign with the position edited by the user, preferentially use this edited position to execute the position selection process; if there is an overlap at this position, clear the edit state of this sign. S42.依次对所有普通目标点执行步骤S3,不包括已被标记为详情标牌的目标; S42. Execute step S3 for all ordinary target points in sequence, excluding the targets already marked as detail signs. S43. After all ordinary signs are processed, execute the position selection process of step S3 for the detail signs. S5. User interaction priority processing: When the detail sign with which the user is interacting is marked as high priority, the other signs need to make room for it; if its current position is occupied by other signs, the sign occupying this position immediately re-executes the position selection process.
[0009] In an embodiment of the present invention, in step S2, the overlap judgment includes: Overlap judgment between the target point and the sign area: Judge whether the circular area where the target point is located intersects with the rectangular area of the sign to be drawn. Overlap judgment between signs: Judge whether the rectangular area of the sign to be drawn intersects with the rectangular area of any already drawn sign.
[0010] In an embodiment of the present invention, the overlap judgment between signs adopts an axial bounding box detection method, including: (a) Obtain the rectangular boundary coordinates of the two signs in the screen coordinate system: Sign 1: upper left corner (x1, y1), lower right corner (x1 + w0, y1 + h0); Sign 2: upper left corner (x2, y2), lower right corner (x2 + w0, y2 + h0). (b) Judge whether the two rectangles satisfy in the horizontal direction: x1 < x2 + w0 and x2 < x1 + w0. (c) Determine whether the two rectangles satisfy the following conditions in the vertical direction: y1 < y2 + h0 and y2 < y1 + h0; (d) If the overlapping conditions are satisfied both horizontally and vertically, it is determined that the two signs overlap.
[0011] In an embodiment of the present invention, in the step S1, the arrangement of the candidate positions is as follows: within the same distance level, they are arranged in order of angle; between different distance levels, they are arranged in the order from near to far, forming a multi-level spiral search path.
[0012] In an embodiment of the present invention, in the step S34, the order of the candidate positions is judged according to the serial number, following the spiral search order from near to far and increasing by angle within the same distance.
[0013] In an embodiment of the present invention, in the step S5, the high-priority sign is marked when the user clicks or drags, and always maintains the highest priority during the interaction.
[0014] In a second aspect, the present invention provides a target sign automatic avoidance system for implementing the target sign automatic avoidance method as described above. The system includes: A candidate position generation module for generating m×n candidate sign positions for each target point and arranging them in order of serial number; An overlap detection module for performing overlap judgments between the target point and the sign, and between the signs; A position selection module for selecting non-overlapping sign positions for each target point according to the historical position serial number and the spiral search strategy; An execution scheduling module for scheduling the sign drawing process in the order of ordinary signs first and details signs later; A priority management module for identifying and processing the high-priority details signs of user interaction and coordinating the avoidance behaviors of the remaining signs.
[0015] In an embodiment of the present invention, the overlap detection module includes: A first detection unit for detecting whether the circular area of the target point intersects with the rectangular area of the sign; A second detection unit for detecting whether the rectangular areas of the signs overlap based on the axial bounding box algorithm.
[0016] In a third aspect, the present invention provides a computer-readable storage medium storing computer instructions, and the computer instructions are executed by a processor to perform the method as described above.
[0017] In a fourth aspect, the present invention provides a computer program product storing computer instructions, and the computer instructions are executed by a processor to perform the method as described above.
[0018] The beneficial effects achieved by this invention are as follows: 1. Smoothness and stability: The spiral search algorithm explores avoidance positions continuously and uniformly from near to far, avoiding the discreteness and abruptness of position selection in traditional methods, making the sign's movement trajectory natural and smooth, and significantly reducing visual jitter.
[0019] 2. Efficiency and economy: The use of axial bounding boxes for fast collision detection results in low computational complexity; the spiral search strategy is a heuristic local search that avoids global blind scanning, greatly improving the efficiency of location finding while saving memory resources.
[0020] 3. Comprehensiveness and Intelligence: It not only handles collisions between signs but also comprehensively considers occlusion from elements such as target lines. The dynamic priority mechanism simulates the logic of traffic control, respects user intent, ensures stable display of important information, and makes obstacle avoidance decisions more intelligent.
[0021] 4. Adaptability: The adaptive adjustment mechanism for the length of the sign line ensures a high success rate of obstacle avoidance while effectively preventing the sign from straying too far from its target by setting an upper limit on its growth, thus maintaining the relevance and readability of interface elements.
[0022] This invention can be widely applied to various electronic map systems that require dense information annotation, especially: (a) Radar and sensor network monitoring: radar target display.
[0023] (b) Equipment status monitoring and industrial Internet of Things: system equipment status monitoring.
[0024] (c) Computer graphical user interface: data visualization.
[0025] (d) Any field of computer information visualization where overlapping graphic labels need to be avoided. Attached Figure Description
[0026] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the drawings without creative effort.
[0027] Figure 1 This is a flowchart illustrating the overall processing flow of the method of the present invention.
[0028] Figure 2 This is a flowchart of the user interaction details label processing sub-process of the present invention.
[0029] Figure 3This is a flowchart of the standard signage location selection process for this invention.
[0030] Figure 4 This is a flowchart of the overlap detection sub-process of the present invention.
[0031] Figure 5 This is a detailed flowchart of the rectangle and circle overlap detection method of the present invention.
[0032] Figure 6 This is a schematic diagram of the spiral search strategy of the present invention.
[0033] Figure 7 This is a comparison diagram showing the display effect of the target signage before and after applying the method of the present invention in dense conditions. Detailed Implementation
[0034] The embodiments of the technical solution of the present invention will now be described in detail with reference to the accompanying drawings. These embodiments are merely illustrative of the technical solution of the present invention and are therefore intended to limit the scope of protection of the present invention.
[0035] Unless otherwise defined, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains; the terminology used in this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention; the terms “comprising” and “having”, and any variations thereof, in the specification, claims and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0036] In the description of the embodiments of this invention, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this invention, "multiple" means two or more, unless otherwise explicitly defined.
[0037] In this invention, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least some embodiments of the invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this invention can be combined with other embodiments.
[0038] In the description of the embodiments of this invention, the term "and / or" is merely a description of the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, in this invention, the character " / " generally indicates that the preceding and following associated objects have an "or" relationship.
[0039] This invention provides a method for automatic avoidance of target signs based on multi-level spiral search and dynamic priority, comprising the following steps: S1. For each target, a batch of candidate sign locations are preset: with the target point as the center, the area is evenly divided into m directions according to the angle, and divided into n levels according to the distance from near to far, forming m×n candidate locations, and each candidate location is assigned a unique serial number; S2. Overlap Judgment: Determine the overlap between the sign to be drawn and the target point, as well as the overlap between the sign to be drawn and other already drawn signs; S3. Signage location selection, including: S31. For the current target point, obtain the position number used when the sign was last drawn; S32. Determine whether the candidate position corresponding to the serial number overlaps with the target point or other drawn signs; S33. If there is no overlap, draw a sign at that location; S34. If there is an overlap, the remaining candidate positions are judged in ascending order of their serial numbers until a non-overlapping position is found and a sign is drawn. S35. If all candidate positions overlap, draw a sign at the position corresponding to the last number. S4. Execution process: S41. If there is a detail label whose location has been edited by the user, the edited location will be used first to perform the location selection process; if the locations overlap, the edited status of the label will be cleared. S42. Perform step S3 sequentially for all ordinary target points, excluding targets that have already been marked with detail tags; S43. After all ordinary signs have been processed, perform the location selection process of step S3 on the detail signs; S5. User interaction priority handling: When the detail sign that the user is interacting with is marked as high priority, the other signs must give way to it; if its current position is occupied by other signs, the sign occupying the position will immediately re-execute the position selection process.
[0040] Optionally, in step S2, the overlap determination includes: Overlap detection between target point and sign area: Determine whether the circular area containing the target point intersects with the rectangular area of the sign to be drawn; Sign overlap determination: Determine whether the rectangular area of the sign to be drawn intersects with the rectangular area of any already drawn sign.
[0041] Optionally, the overlap determination of the signs is performed using an axial bounding box detection method, including: (a) Obtain the rectangular boundary coordinates of two signs in the screen coordinate system: Sign 1: upper left corner (x1, y1), lower right corner (x1 + w0, y1 + h0); Sign 2: upper left corner (x2, y2), lower right corner (x2 + w0, y2 + h0); (b) Determine whether the two rectangles satisfy the following in the horizontal direction: x1 < x2 + w0 and x2 < x1 + w0; (c) Determine whether the two rectangles satisfy the following in the vertical direction: y1 < y2 + h0 and y2 < y1 + h0; (d) If the overlapping conditions are satisfied simultaneously in the horizontal and vertical directions, determine that the two signs overlap.
[0042] Where, w0 is the sign width and h0 is the sign height.
[0043] Optionally, in step S1, the arrangement of candidate positions is as follows: within the same distance level, they are arranged in order of angle; between different distance levels, they are arranged in the order from near to far, forming a multi-level spiral search path.
[0044] Optionally, in step S34, the order of candidate positions is judged according to the serial number, following the spiral search order from near to far and increasing by angle within the same distance.
[0045] Optionally, in step S5, the high-priority sign is marked when the user clicks or drags, and always maintains the highest priority during the interaction.
[0046] In addition, the present invention also provides an automatic avoidance system for target signs based on multi-level spiral search and dynamic priority, which is used to implement the above-mentioned automatic avoidance method for target signs based on multi-level spiral search and dynamic priority. The system includes: A candidate position generation module, which is used to generate m×n candidate sign positions for each target point and arrange them according to the serial number; An overlap detection module, which is used to perform overlap judgment between the target point and the sign, and between the signs; A position selection module, which is used to select non-overlapping sign positions for each target point according to the historical position serial number and the spiral search strategy; An execution scheduling module, which is used to schedule the sign drawing process in the order of ordinary signs first and detail signs later; A priority management module, which is used to identify and process the high-priority detail signs of user interaction, and coordinate the avoidance behavior of the remaining signs.
[0047] Optionally, the overlap detection module includes: A first detection unit, which is used to detect whether the circular area of the target point intersects with the rectangular area of the sign; The second detection unit is used to detect whether the rectangular areas of the sign overlap based on the axial bounding box algorithm.
[0048] This invention is implemented on the display processing computer or data visualization platform of a radar monitoring system. After the system starts up, it loads electronic maps and target data, and creates and manages signage graphic objects and related display elements for each target.
[0049] Implementation of step S1: Establish a pre-set signage location system and historical location records. Centered on the target point, the locations are categorized into n types based on distance from nearest to farthest, and m types based on angle. Each location is assigned a unique serial number, forming m×n standard locations. The system maintains a historical location serial number for each target point, recording the location where the sign was last successfully drawn.
[0050] Implementation of step S2: Overlap detection and collision determination Overlap detection is divided into two categories: Overlap detection between the target point and the sign area: determining whether the circular area (preset radius) containing the target point intersects with the rectangular area of the sign to be drawn. Overlap detection between signs: determining whether the rectangular area of the sign to be drawn intersects with the rectangular area of an already drawn sign.
[0051] For situations requiring precise detection, the system employs a "precise sign overlap judgment step," which uses an axial bounding box algorithm to determine precise overlap.
[0052] Implementation of step S3: Signage location selection process For the current target point, first read its historical location number.
[0053] Check whether the position corresponding to the serial number overlaps with the target point or other drawn signs.
[0054] If there is no overlap, draw a sign at this location and keep the historical location number unchanged.
[0055] If there is an overlap, then check each candidate position in order from 0 to (m×n-1).
[0056] If all candidate positions overlap, then draw a sign at the position corresponding to the last number.
[0057] Implementation of step S4: Execution process Prioritize detail signs: If the detail sign has been edited by the user, first attempt to draw it at that location; if the location overlaps, the user's editing state disappears, and it is processed as a normal sign.
[0058] Processing regular signs: For all target points except for detail signs, the location selection process is executed sequentially.
[0059] Finally, process the detailed signage: After all ordinary signs have been processed, the detailed signage undergoes the complete signage location selection process.
[0060] Implementation of step S5: User interaction priority handling During user interaction, detail signs are marked as "high priority for interactive state," and other signs must unconditionally give way to such signs.
[0061] Furthermore, this invention provides a specific embodiment implemented in a multi-target monitoring radar target and display system. System deployment environment: This embodiment is implemented in a certain type of multi-target monitoring and display system. The system hardware is a high-performance graphics workstation, and the software environment is a Windows / Linux operating system, developed based on the OpenGL graphics library. It can simultaneously process and display more than 300 real-time target points and their information signs.
[0062] Problems with traditional methods: Before implementing this invention, the system used an avoidance algorithm based on a fixed offset direction. When more than 150 target points are displayed simultaneously on the screen, the system exhibits the following problems: Frequent signage switching: Multiple signs switch rapidly between several fixed positions, with each sign switching an average of 3-5 times per minute.
[0063] Key information obscured: The details sign that the user is viewing is often obscured by other signs, requiring frequent manual adjustments.
[0064] Slow system response: Collision detection involves a large amount of computation, resulting in noticeable lag when targets are densely packed.
[0065] Disorganized layout: Signage overlaps significantly, making information difficult to read.
[0066] Implementation and integration of the present invention: The automatic target avoidance method based on multi-level spiral search and dynamic priority provided by the present invention is integrated into the radar display system. The main implementation work includes: (a) Data structure reconstruction There are 12 types of angles (m=12), meaning each direction is 150° apart; There are two types of distances (n=2), with radii of 10 pixels and 20 pixels respectively; A total of 24 standard positions are formed (m×n=24).
[0067] (b) Data structure design Establish the following data structure for each target point: Target ID, location coordinates; Signage type: Standard signage or detailed signage; Historical position number (records the position of the last successful drawing); Interaction status flags (whether the user has selected or edited the content).
[0068] (c) Processing flow implementation Implement the complete obstacle avoidance process according to the flowchart: according to Figure 1 The overall processing flow organization system operation framework; according to Figure 2 Handling special cases related to user interaction detail labels; according to Figure 3 Implement the logic for selecting the location of standard signs; according to Figure 4 and Figure 5 Implement the core algorithm for overlap detection; according to Figure 6 A spiral search strategy is used to locate the position.
[0069] in, Figure 1 This is a flowchart illustrating the overall processing flow of the method of the present invention. Figure 2 This is a flowchart of the user interaction details label processing sub-process of the present invention. Figure 3 This is a flowchart of the standard signage location selection process for this invention. Figure 4 This is a flowchart of the overlap detection sub-process (core detection logic) of the present invention. Figure 5 This is a detailed flowchart of the rectangle and circle overlap detection method of the present invention. Figure 6 This is a schematic diagram of the spiral search strategy of the present invention (taking an angle of 30° as an example to show the process of gradually increasing the radius and gradually traversing the angle in the coordinate system). Figure 7 The images show a comparison of the display effects of target signs before and after applying the method of the present invention in dense situations (the left image shows the traditional method, where signs overlap and jump around; the right image shows the method of the present invention, where the sign layout is clear and stable).
[0070] User feedback Ten system operators were organized to conduct a week-long trial evaluation. Key subjective feedback points collected included: Significantly improved stability: All controllers reported that the signage behavior was "predictable and stable," and there were no longer any sudden jumps that would distract them.
[0071] Enhanced monitoring of key targets: Locked target signs are "always clearly displayed in the foreground," eliminating the need for manual intervention to avoid them.
[0072] Overall situational awareness has improved: the layout of signs and targets is more organized, and information reading efficiency has increased.
[0073] The system responded smoothly: no system lag or stuttering was detected due to avoidance calculations.
[0074] This embodiment fully demonstrates that the present invention has the following technical advantages: Smoothness and continuity: Through a multi-level spiral search algorithm, candidate location selection from near to far and in all directions is achieved, avoiding the discreteness and abruptness of location selection and significantly reducing signage fluctuation.
[0075] Efficiency and economy: Axial bounding boxes are used for fast collision detection, combined with a heuristic local search strategy of spiral search, which avoids global blind scanning, greatly improves the efficiency of location finding, and significantly reduces the consumption of computing resources.
[0076] Intelligent obstacle avoidance decision-making: A dynamic priority mechanism based on sign information hierarchy and user interaction status ensures that key target signs (especially detail signs that users are currently interacting with) get the optimal display position.
[0077] Position stability guarantee: Through the historical preference position number recording and retention mechanism, the sign of the same target is kept in the same position as much as possible in different display cycles, which makes it easier for operators to establish spatial memory and quickly locate.
[0078] Systematic layout planning: The system includes a preset orientation system with 24 standard locations, forming an orderly and predictable signage layout scheme, which enhances the aesthetics and standardization of the overall display interface.
[0079] This embodiment demonstrates that the method of the present invention can effectively solve the key technical problems existing in the automatic avoidance of target signs in existing radar target display systems, significantly improve system performance and human-computer interaction experience, and has broad prospects for promotion and application. The present invention is not only applicable to radar target display systems, but can also be widely applied to various computer information visualization fields such as electronic map systems, equipment status monitoring systems, and data visualization systems that require dense information labeling.
[0080] In summary, the automatic obstacle avoidance method and system for target signs provided by this invention achieves the following beneficial effects: Achieving smoothness and continuity in signage avoidance: Through a multi-level spiral search algorithm, the algorithm provides a comprehensive selection of candidate locations for target signs from near to far, avoiding the discreteness and abruptness of location selection in traditional methods. This significantly reduces the frequent jumping of signs on the interface and enhances the operator's visual tracking ability and situational awareness continuity.
[0081] Improve collision detection and avoidance calculation efficiency: Adopt a two-layer collision detection strategy that combines target spacing pre-screening mechanism with axial bounding box accurate detection. While ensuring detection accuracy, it greatly reduces unnecessary calculations, improves the system's real-time response capability in dense target scenes, and reduces computing resource consumption.
[0082] Establish an intelligent obstacle avoidance decision-making system: Construct a dynamic priority mechanism based on signage information hierarchy and user interaction status to ensure that key target signs (especially detail signs that users are currently operating) obtain the optimal display position, while providing differentiated obstacle avoidance strategies for targets of different importance, thereby improving the intelligence and rationality of human-computer interaction.
[0083] To ensure the stability of signage display positions: By recording and maintaining historical preferred position numbers, signs for the same target are kept in the same position as much as possible in different display cycles, reducing the cognitive load caused by frequent position changes and making it easier for operators to establish spatial memory and quickly locate the target.
[0084] Provides systematic signage location planning: Establishes a preset orientation system containing m×n standard locations, forming an orderly and predictable signage layout scheme, avoiding layout chaos caused by random avoidance, and improving the aesthetics and standardization of the overall display interface.
[0085] In some embodiments, the present invention provides a computer-readable storage medium storing computer instructions that are executed by a processor as in any of the above embodiments, a method for automatic avoidance of target signs.
[0086] Computer-readable storage media may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (not an exhaustive list) of readable storage media may include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0087] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0088] Embodiments of the present invention may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in a target sign automatic avoidance method according to various embodiments of the present invention as described in the "Exemplary Methods" section above.
[0089] The steps of the method of the present invention are not limited to the specific order described above, unless otherwise specifically stated. Furthermore, in some embodiments, the invention may also be implemented as a program recorded on a recording medium, the program comprising machine-readable instructions for implementing the method according to the invention. Therefore, the invention also covers recording media storing programs for performing the method according to the invention.
[0090] Although the invention has been described with reference to preferred embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of the invention. In particular, the technical features mentioned in the various embodiments can be combined in any manner as long as there is no structural conflict. The invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A method for automatic avoidance of target signs, characterized in that, Includes the following steps: S1. For each target, a batch of candidate sign locations are preset: with the target point as the center, the area is evenly divided into m directions according to the angle, and divided into n levels according to the distance from near to far, forming m×n candidate locations, and each candidate location is assigned a unique serial number; S2. Overlap Judgment: Determine the overlap between the sign to be drawn and the target point, as well as the overlap between the sign to be drawn and other already drawn signs; S3. Signage location selection, including: S31. For the current target point, obtain the position number used when the sign was last drawn; S32. Determine whether the candidate position corresponding to the serial number overlaps with the target point or other drawn signs; S33. If there is no overlap, draw a sign at that location; S34. If there is an overlap, the remaining candidate positions are judged in ascending order of their serial numbers until a non-overlapping position is found and a sign is drawn. S35. If all candidate positions overlap, draw a sign at the position corresponding to the last number. S4. Execution process: S41. If there is a detail label whose location has been edited by the user, the edited location will be used first to perform the location selection process; if the locations overlap, the edited status of the label will be cleared. S42. Perform step S3 sequentially for all ordinary target points, excluding targets that have already been marked with detail tags; S43. After all ordinary signs have been processed, perform the location selection process of step S3 on the detail signs; S5. User interaction priority handling: When the detail sign that the user is interacting with is marked as high priority, the other signs must give way to it; if its current position is occupied by other signs, the sign occupying the position will immediately re-execute the position selection process.
2. The automatic avoidance method for target signs according to claim 1, characterized in that, In step S2, the overlap determination includes: Overlap detection between target point and sign area: Determine whether the circular area containing the target point intersects with the rectangular area of the sign to be drawn; Sign overlap determination: Determine whether the rectangular area of the sign to be drawn intersects with the rectangular area of any already drawn sign.
3. The automatic avoidance method for target signs according to claim 2, characterized in that, The overlap determination of the signs is performed using an axial bounding box detection method, including: (a) Obtain the rectangular boundary coordinates of the two signs in the screen coordinate system: Sign 1: top left corner (x1, y1), bottom right corner (x1+w0, y1+h0); Sign 2: top left corner (x2, y2), bottom right corner (x2+w0, y2+h0); (b) Determine whether the two rectangles satisfy the following conditions in the horizontal direction: x1 < x2+w0 and x2 < x1+w0; (c) Determine whether the two rectangles satisfy the following conditions in the vertical direction: y1 < y2+h0 and y2 < y1+h0; (d) If the horizontal and vertical directions simultaneously meet the overlap condition, then the two signs are determined to overlap.
4. The automatic avoidance method for target signs according to claim 1, characterized in that, In step S1, the candidate positions are arranged as follows: within the same distance level, they are arranged sequentially according to angle; between different distance levels, they are arranged in order from near to far, forming a multi-level spiral search path.
5. The automatic avoidance method for target signs according to claim 1, characterized in that, In step S34, the order of judging candidate positions according to the sequence number follows a spiral search order from near to far, with the angle increasing within the same distance.
6. The automatic avoidance method for target signs according to claim 1, characterized in that, In step S5, the high-priority sign is marked when the user clicks or drags it, and it always maintains the highest priority during the interaction.
7. An automatic obstacle avoidance system for target signs, characterized in that, The system for implementing the automatic avoidance method for target signs according to any one of claims 1-6, the system comprising: The candidate location generation module is used to generate m×n candidate sign locations for each target point and arrange them in order of number. The overlap detection module is used to determine the overlap between the target point and the sign, and between the signs themselves. The location selection module is used to select non-overlapping sign locations for each target point based on historical location numbers and a spiral search strategy. The execution scheduling module is used to schedule the sign drawing process in the order of priority for ordinary signs and subsequent detailed signs. The priority management module is used to identify and process high-priority detail signs for user interactions and coordinate the avoidance behavior of other signs.
8. The target sign automatic avoidance system according to claim 7, characterized in that, The overlap detection module includes: The first detection unit is used to detect whether the circular area of the target point intersects with the rectangular area of the sign. The second detection unit is used to detect whether the rectangular areas of the sign overlap based on the axial bounding box algorithm.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are executed by a processor according to any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product stores computer instructions, which are executed by a processor using the method as described in any one of claims 1 to 6.