A method, device, equipment and readable storage medium for adjusting centralized labeling

By identifying and adjusting the annotation in the two-dimensional building drawings, the problem of overlapping is solved, and automatic overlap avoidance adjustment is achieved, which reduces the workload of designers and enables the construction drawings to meet the design requirements.

CN114565703BActive Publication Date: 2025-04-08GLODON CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210214251.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-04
Publication Date
2025-04-08
Estimated Expiration
2042-03-04

AI Technical Summary

Technical Problem

In computer-aided design software, there is a problem of overlapping markings in the two-dimensional construction drawings generated by the generated building, resulting in messy construction drawings and unable to meet the construction drawing design requirements. The existing technology lacks the function of overlapping the whole picture batch, resulting in designers needing to manually move the work content, and the workload is heavy.

Method used

By obtaining the two-dimensional architectural diagram, identifying the target central labeled elements and corresponding component primitives, determining whether the label has overlapping relationships with other primitives, generating candidate points, and moving the label to the candidate points in turn until there is no overlapping relationship.

Benefits of technology

It realizes automatic overlap and avoid adjustment of the labels in the two-dimensional construction drawings of the building, reducing the workload of designers and making the adjusted construction drawings meet the design requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114565703B_ABST
    Figure CN114565703B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and readable storage medium for adjusting concentrated annotations. The method comprises: obtaining a two-dimensional building drawing to be processed, and identifying a target concentrated annotation graphic element and a target component graphic element corresponding to the target concentrated annotation graphic element from the two-dimensional building drawing; judging whether the target concentrated annotation graphic element has an overlapping relationship with other graphic elements in the two-dimensional building drawing; if there is an overlapping relationship, generating a plurality of candidate points in the two-dimensional building drawing according to the position of the center point of the target component graphic element; moving the target concentrated annotation graphic element to each candidate point in turn until the moved target concentrated annotation graphic element does not have an overlapping relationship with other graphic elements in the two-dimensional building drawing; the present invention realizes automatic overlapping avoidance adjustment of annotations, reduces the workload of designers, and enables the adjusted construction drawings to meet the design requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer-aided design, and in particular to a method, device, equipment and readable storage medium for adjusting centralized marking. Background Art

[0002] In the process of using computer-aided design software to generate two-dimensional architectural construction drawings, when the design software generates a component annotation, the generated annotation is placed based on the position of a single component, and the collision relationship between multiple annotations of different components is not checked. This will cause the problem of overlapping annotation text in the generated two-dimensional architectural construction drawings, making the construction drawings messy and not meeting the construction drawing design requirements.

[0003] In addition, the computer-aided design software currently on the market supports basic operations such as moving, translating, and flipping individual annotations, but does not have the function of batch overlapping processing of the entire drawing. In actual engineering design work, designers are required to manually move the annotations, but there will be problems of duplication of work content and heavy workload.

[0004] Therefore, how to automatically adjust all annotations in a two-dimensional building construction drawing to avoid overlap has become a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0005] The purpose of the present invention is to provide a method, device, equipment and readable storage medium for adjusting concentrated annotations, which solves the pain point that annotations in two-dimensional building construction drawings cannot be automatically avoided, realizes automatic overlapping avoidance adjustment of annotations, reduces the workload of designers, and makes the adjusted construction drawings meet the design requirements.

[0006] According to one aspect of the present invention, a method for adjusting centralized labeling is provided, the method comprising:

[0007] Acquire a two-dimensional building diagram to be processed, and identify target concentrated annotated graphic elements from the two-dimensional building diagram and identify target component graphic elements corresponding to the target concentrated annotated graphic elements;

[0008] Determine whether the target concentrated labeled graphic element has an overlapping relationship with other graphic elements in the two-dimensional building image;

[0009] In the case of an overlapping relationship, a plurality of candidate points are generated in the two-dimensional building image according to the position of the center point of the target component element;

[0010] The target concentrated labeled graphics element is moved to each candidate point in sequence until the moved target concentrated labeled graphics element does not overlap with other graphics elements in the two-dimensional building image.

[0011] Optionally, the determining whether the target concentrated labeled graphic element has an overlapping relationship with other graphic elements in the two-dimensional building image includes:

[0012] Determining, on the two-dimensional building map, a first area where the labeled text in the target concentrated labeled primitives cannot be located, and forming a first bounding box of the first area;

[0013] Determining, on the two-dimensional building diagram, a second area in which the annotation leader line in the target concentrated annotation primitive cannot be located, and forming a second bounding box of the second area;

[0014] If the bounding box of the annotation text overlaps with the first bounding box, and / or the bounding box of the annotation leader overlaps with the second bounding box, it is determined that there is an overlapping relationship.

[0015] Optionally, judging whether the target concentrated labeled graphic element has an overlapping relationship with other graphic elements in the two-dimensional building image includes:

[0016] Determining, on the two-dimensional building diagram, a first area where the annotation text in the target concentrated annotation graphic element cannot be located, and determining a second area where the annotation leader line in the target concentrated annotation graphic element cannot be located;

[0017] Drawing a grid on the two-dimensional drawing of the building to obtain grid points, setting the grid points located in the first area as first collision points and setting the grid points located in the second area as second collision points;

[0018] If there is a first collision point in the area where the annotation text is located, and / or there is a second collision point in the area where the annotation leader is located, it is determined that there is an overlapping relationship.

[0019] Optionally, in the case where there is an overlapping relationship, generating a plurality of candidate points in the two-dimensional building image according to the position of the center point of the target component element includes:

[0020] On the two-dimensional drawing of the building, the center line of the target component element is used as a reference line, and a first set number of other reference lines are drawn on both sides of the reference line; wherein any two adjacent reference lines are parallel to each other, and the spacing between them is a first set value;

[0021] Draw a vertical line perpendicular to the center line and passing through the center point on the two-dimensional drawing of the building, and draw a second set number of other vertical lines on both sides of the vertical line; wherein any two adjacent vertical lines are parallel to each other, and the spacing between them is the second set value;

[0022] An intersection point formed by the intersection of all the reference lines and all the vertical lines is determined, and the intersection point is used as the candidate point.

[0023] Optionally, the step of sequentially moving the target concentrated labeled graphic element to each candidate point until the moved target concentrated labeled graphic element does not overlap with other graphic elements in the two-dimensional building image includes:

[0024] Taking the center point of the target component primitive as the starting point, numbering each candidate point in sequence according to a preset rule;

[0025] Traverse each candidate point in sequence according to the numbering order, and determine whether the target concentrated labeled element overlaps with other elements in the two-dimensional building image after the anchor point of the target concentrated labeled element moves to the currently traversed candidate point. If so, continue to traverse the next candidate point, if not, stop traversing.

[0026] Optionally, the method further includes:

[0027] Draw a reference line on the two-dimensional drawing of the building, and determine all candidate beam elements intersecting with the reference line;

[0028] Filter out target beam elements that are parallel to each other and perpendicular to the reference line from all the candidate beam elements;

[0029] The concentrated labeled entities of each target beam entity are adjusted based on the center line of each target beam entity and the reference line, so that the concentrated labeled entities of each target beam entity are located on a straight line.

[0030] Optionally, adjusting the centrally labeled entities of each target beam entity based on the center line of each target beam entity and the reference line so that the centrally labeled entities of each target beam entity are located on a straight line includes:

[0031] Draw a third set number of other reference lines on both sides of the reference line; wherein any two adjacent reference lines are parallel to each other and the spacing between them is a third set value;

[0032] Traversing each target beam element in turn, and drawing a fourth set number of other center lines on both sides of the center line of the currently traversed target beam element; wherein any two adjacent center lines of a target beam element are parallel to each other, and the spacing between them is a fourth set value;

[0033] Traverse each reference line in turn, and form a set of intersections corresponding to the currently traversed reference line with the intersections of each center line of all target beam elements;

[0034] The number of legal intersections in the intersection sets of each reference line is calculated respectively, and the target reference line corresponding to the intersection set with the largest number of legal intersections is determined; wherein when the concentrated annotation element is moved to the legal intersection, there is no overlap with other elements in the two-dimensional drawing of the building;

[0035] Move the concentrated annotation of each target beam element to a legal intersection point on the target reference line.

[0036] In order to achieve the above object, the present invention also provides a device for adjusting centralized marking, and the device specifically includes the following components:

[0037] An acquisition module is used to acquire a two-dimensional building diagram to be processed, and identify target concentrated annotated graphics elements from the two-dimensional building diagram and identify target component graphics elements corresponding to the target concentrated annotated graphics elements;

[0038] A judgment module, used to judge whether the target concentrated labeled graphic element has an overlapping relationship with other graphic elements in the two-dimensional building image;

[0039] A generating module, for generating a plurality of candidate points in the two-dimensional building image according to the position of the center point of the target component element in the case of an overlapping relationship;

[0040] The adjustment module is used to move the target concentrated labeled graphics element to each candidate point in turn until the moved target concentrated labeled graphics element does not overlap with other graphics elements in the two-dimensional building image.

[0041] In order to achieve the above-mentioned purpose, the present invention also provides a computer device, which specifically includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of the method for adjusting centralized marking introduced above are implemented.

[0042] In order to achieve the above object, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for adjusting centralized marking introduced above are implemented.

[0043] The method, device, equipment and readable storage medium for adjusting concentrated annotation provided by the present invention adjust the concentrated annotation primitives in the two-dimensional building drawing so that there is no overlap of primitives that do not meet the design requirements of the drawing in the two-dimensional building drawing, thereby solving the pain point that the annotations in the two-dimensional building construction drawing cannot be automatically avoided, and realizes automatic overlapping avoidance adjustment of the annotations, reducing the workload of designers, so that the adjusted construction drawings meet the design requirements. Specifically, firstly, according to the positional relationship between each primitive in the two-dimensional building drawing, the target concentrated annotation primitive that has an overlapping relationship with other primitives is determined, and then, according to the position of the center point of the target component primitive corresponding to the target concentrated annotation primitive, a candidate point for adjusting the target concentrated annotation primitive is formed, and finally, the target concentrated annotation primitive is moved to each candidate point in turn until the moved target concentrated annotation primitive does not have an overlapping relationship with other primitives in the two-dimensional building drawing. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0045] Figure 1 An optional flowchart of the method for adjusting centralized marking provided in Example 1;

[0046] Figure 2 A schematic diagram of how to determine candidate points provided in Example 1;

[0047] Figure 3 A schematic diagram of another optional flow chart of the method for adjusting the centralized marking provided in the first embodiment;

[0048] Figure 4 A flowchart of how to adjust the target centralized labeling provided in the first embodiment;

[0049] Figure 5 A schematic diagram of a beam leveling method construction drawing before adjustment provided in Example 1;

[0050] Figure 6 A schematic diagram of how to adjust multiple concentrated markings in a beam leveling method construction drawing provided in Example 1;

[0051] Figure 7 A schematic diagram of the adjusted beam leveling method construction drawing provided in Example 1;

[0052] Figure 8 A schematic diagram of an optional composition structure of the device for adjusting the centralized marking provided in the second embodiment;

[0053] Fig. 9 A schematic diagram of an optional hardware architecture of a computer device provided in Example 3. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0055] Embodiment 1

[0056] The embodiment of the present invention provides a method for adjusting centralized marking, such as Figure 1 As shown, the method specifically comprises the following steps:

[0057] Step S101: obtaining a two-dimensional building drawing to be processed, and identifying target concentrated annotated graphics elements from the two-dimensional building drawing and identifying target component graphics elements corresponding to the target concentrated annotated graphics elements.

[0058] Preferably, when the two-dimensional architectural drawing is a beam plan construction drawing, the target component element is a beam element; in the beam plan construction drawing, there are column elements, wall elements, beam elements, in-situ annotation elements and centralized annotation elements.

[0059] Since how to identify different types of graphic elements from drawings is an existing technology, the process of how to identify concentrated annotation graphic elements and component graphic elements from a two-dimensional architectural drawing will not be repeated.

[0060] Step S102: Determine whether the target concentrated labeled graphic element has an overlapping relationship with other graphic elements in the two-dimensional building image.

[0061] In the prior art, collision checking can be performed by utilizing the geometric boundaries of component primitives to implement collision checking and judgment, so as to determine whether the target primitive has an overlapping relationship with other primitives. In this embodiment, two different collision checking methods are also provided, as described below, steps A1 to A3 provide a surface checking method, and steps B1 to B3 provide a point checking method.

[0062] Specifically, step S102 includes:

[0063] Step A1: determining, on the two-dimensional building map, a first area where the labeled text in the target concentrated labeled primitives cannot be located, and forming a first bounding box of the first area;

[0064] Among them, the centralized annotation element is composed of two parts: annotation text and annotation leader;

[0065] Preferably, when the two-dimensional building drawing is a beam flat method construction drawing and the target component element is a beam element, the first area includes: an area where the beam element is located, an area where the column element is located, an area where the wall element is located, an area where other concentrated annotation elements are located, and an area where the in-situ annotation element is located;

[0066] Step A2: determining, on the two-dimensional building diagram, a second area in which the annotation leader line in the target concentrated annotation primitive cannot be located, and forming a second bounding box of the second area;

[0067] Preferably, when the two-dimensional building drawing is a beam flat method construction drawing and the target component element is a beam element, the second area includes: an area where a column element is located, an area where a wall element is located, an area where other concentrated annotation elements are located, and an area where an in-situ annotation element is located;

[0068] Step A3: if the bounding box of the annotation text overlaps with the first bounding box, and / or the bounding box of the annotation leader overlaps with the second bounding box, then it is determined that there is an overlapping relationship;

[0069] It should be noted that due to the requirements of the construction drawings, the concentrated marked text cannot pass through shear walls, structural columns, structural beams, concentrated markings, and in-situ markings (or segmented markings), and the concentrated marked leaders cannot pass through shear walls, structural columns, concentrated markings, and in-situ markings (or segmented markings). Therefore, in this embodiment, two unusable areas are formed for the concentrated marked text and leaders, respectively, so that the two unusable areas can be used to determine whether the concentrated marked elements collide with other elements.

[0070] Furthermore, step S102 further includes:

[0071] Step B1: determining, on the two-dimensional architectural drawing, a first area where the annotation text in the target concentrated annotation graphic element cannot be located, and a second area where the annotation leader in the target concentrated annotation graphic element cannot be located;

[0072] Preferably, when the two-dimensional architectural drawing is a beam flat method construction drawing and the target component element is a beam element, the first area includes: an area where the beam element is located, an area where the column element is located, an area where the wall element is located, an area where other concentrated marked elements are located, and an area where the in-situ marked element is located; the second area includes: an area where the column element is located, an area where the wall element is located, an area where other concentrated marked elements are located, and an area where the in-situ marked element is located;

[0073] Step B2: drawing a grid on the two-dimensional drawing of the building to obtain grid points, setting the grid points located in the first area as first collision points and setting the grid points located in the second area as second collision points;

[0074] Step B3: If there is a first collision point in the area where the annotation text is located, and / or there is a second collision point in the area where the annotation leader is located, it is determined that there is an overlapping relationship.

[0075] It should be noted that the bounding box and the grid drawn in this embodiment are only used for collision checking. After the collision checking is completed, the bounding box and the grid drawn on the two-dimensional drawing of the building are deleted.

[0076] Step S103: In the case of an overlapping relationship, a plurality of candidate points are generated in the two-dimensional building image according to the position of the center point of the target component element.

[0077] Specifically, step S103 includes:

[0078] Step C1: on the two-dimensional drawing of the building, the center line of the target component element is used as a reference line, and a first set number of other reference lines are drawn on both sides of the reference line; wherein any two adjacent reference lines are parallel to each other, and the spacing between them is a first set value;

[0079] Step C2: Draw a vertical line perpendicular to the center line and passing through the center point on the two-dimensional drawing of the building, and draw a second set number of other vertical lines on both sides of the vertical line; wherein any two adjacent vertical lines are parallel to each other, and the spacing between them is the second set value;

[0080] Step C3: determine the intersection points formed by the intersection of all the reference lines and all the vertical lines, and use the intersection points as the candidate points.

[0081] like Figure 2 As shown in the figure, it is a process of how to determine candidate points when the target component element is a beam element. First, multiple baselines are drawn based on the center line of the beam element, and then multiple vertical lines are drawn with the vertical line passing through the center point of the beam element. Finally, the candidate points are determined based on the baselines and the vertical lines.

[0082] Step S104: Move the target concentrated labeled graphics element to each candidate point in turn until the moved target concentrated labeled graphics element does not overlap with other graphics elements in the two-dimensional building image.

[0083] Specifically, step S104 includes:

[0084] Step D1: taking the center point of the target component primitive as the starting point, numbering each candidate point in sequence according to a preset rule;

[0085] Preferably, the preset rule is to sequentially number each candidate point in a manner of spreading outward from the center point; this embodiment does not limit the preset rule, and in actual applications, the rule for sequentially numbering the candidate points can be set according to actual needs;

[0086] Step D2: Traverse each candidate point in sequence according to the numbering order, and determine whether the target concentrated labeled element overlaps with other elements in the two-dimensional building image after the anchor point of the target concentrated labeled element moves to the currently traversed candidate point. If so, continue to traverse the next candidate point, if not, stop traversing.

[0087] Among them, the anchor point of the concentrated annotation entity is the positioning point of the concentrated annotation entity, or the center point of the concentrated annotation entity.

[0088] It should be noted that the reference lines and vertical lines drawn in this embodiment are only used to adjust the centralized marking. After the centralized marking is adjusted, the reference lines and vertical lines drawn on the two-dimensional building diagram are deleted.

[0089] like Figure 3 As shown in FIG. 1 , when the two-dimensional building drawing is a beam flat method construction drawing, another optional flow chart of the method for adjusting the centralized marking provided by the present embodiment is shown. Figure 3 As shown, in this embodiment, various types of graphics (component graphics and annotation graphics) are first parsed from the beam leveling method construction drawing, and then a target set of annotation graphics is used to focus on the annotation graphics. A first area where annotation text cannot be used and a second area where annotation leaders cannot be used are determined from the beam leveling method construction drawing. Finally, the first area and the second area are used to determine whether the target set of annotation graphics has an overlapping relationship with other graphics.

[0090] like Figure 4As shown, it is a flow chart of how to adjust the target concentrated labeling when there is an overlapping relationship between the target concentrated labeling and other graphics elements. First, the beam graphics element (one or more) corresponding to the target concentrated labeling is determined and the target beam graphics element is selected from the determined multiple beam graphics elements. Secondly, the candidate points are determined according to the above steps C1 to C3 based on the center point of the target beam graphics element. Finally, the target concentrated labeling is moved to each candidate point in turn and it is determined whether the moved target concentrated labeling has an overlapping relationship with other graphics elements. If not, the process is terminated to complete the adjustment of the target concentrated labeling. When a candidate point cannot meet the collision check, it is determined whether there are other candidate points; if so, the target concentrated labeling is continued to be adjusted based on other candidate points. When there are no other candidate points, a new target beam graphics element is selected from other beam graphics elements corresponding to the target concentrated labeling, and the target concentrated labeling is continued to be adjusted based on the new target beam graphics element. When there are no other target beam graphics elements, a new target concentrated labeling is selected from the beam leveling method construction drawing, and the new target concentrated labeling is adjusted in the above manner until the adjustment of all concentrated labels with collision and overlapping problems in the beam leveling method construction drawing is completed.

[0091] Furthermore, the method further comprises:

[0092] Step E1: drawing a reference line on the two-dimensional drawing of the building, and determining all candidate beam elements intersecting with the reference line;

[0093] Step E2: selecting target beam elements that are parallel to each other and perpendicular to the reference line from all the candidate beam elements;

[0094] It should be noted that the target beam elements may not be absolutely parallel to each other, that is, the angle between two adjacent target beam elements is smaller than the preset angle value;

[0095] Step E3: adjusting the centrally marked graphics elements of each target beam graphics element based on the center line of each target beam graphics element and the reference line, so that the centrally marked graphics elements of each target beam graphics element are located on a straight line.

[0096] Furthermore, step E3 specifically includes:

[0097] Step E31: drawing a third set number of other reference lines on both sides of the reference line; wherein any two adjacent reference lines are parallel to each other and the spacing between them is a third set value;

[0098] Step E32: traversing each target beam element in turn, and drawing a fourth set number of other center lines on both sides of the center line of the currently traversed target beam element; wherein any two adjacent center lines of a target beam element are parallel to each other, and the spacing between them is a fourth set value;

[0099] Step E33: traverse each reference line in turn, and form a set of intersections corresponding to the currently traversed reference line with the intersections of each center line of all target beam elements;

[0100] Step E34: Calculate the number of legal intersection points in the intersection point sets of each reference line respectively, and determine the target reference line corresponding to the intersection point set with the largest number of legal intersection points;

[0101] Wherein, when the concentrated marked graphic element is moved to the legal intersection point, there is no overlapping relationship with other graphic elements in the two-dimensional building map;

[0102] Step E35: Move the concentrated markings of each target beam element to a legal intersection point on the target reference line.

[0103] It should be noted that the reference lines and center lines drawn in this embodiment are only used to make overall adjustments to the centralized markings of multiple beam elements. After the centralized markings of multiple beam elements are adjusted, the reference lines and center lines drawn on the two-dimensional building drawing will be deleted.

[0104] In this embodiment, a method for adjusting multiple concentrated annotations together is also provided, such as Figure 5 As shown, a reference line is randomly drawn in the beam leveling method construction drawing, and a plurality of target beam elements intersecting with the reference line and approximately parallel to each other are determined. Then, as shown in Figure 6 As shown in FIG. 1 , multiple reference lines are first formed based on the reference line, and multiple center line groups are formed based on the center line of each target beam element; finally, the intersections of the reference line and the center line are grouped according to the reference line to obtain the intersection set of each reference line. For an intersection set, the number of legal intersections in the intersection set is calculated, and finally, based on the reference line corresponding to the intersection set with the largest number of legal intersections, the centralized annotation of all target beam elements is adjusted, as shown in FIG. Figure 7 As shown in the figure, adjust the concentrated markings of all target beam elements to a straight line (reference line).

[0105] In this embodiment, by adjusting the concentrated annotation primitives in the two-dimensional architectural drawing, there is no overlap of primitives that do not meet the design requirements of the drawing in the two-dimensional architectural drawing, which solves the pain point that the annotations in the two-dimensional architectural construction drawing cannot be automatically avoided, realizes the automatic overlapping avoidance adjustment of the annotations, reduces the workload of the designers, and makes the adjusted construction drawings meet the design requirements. Specifically, first determine the target concentrated annotation primitives that have an overlapping relationship with other primitives based on the positional relationship between the primitives in the two-dimensional architectural drawing, then form candidate points for adjusting the target concentrated annotation primitives based on the position of the center point of the target component primitive corresponding to the target concentrated annotation primitive, and finally move the target concentrated annotation primitive to each candidate point in turn until the moved target concentrated annotation primitive does not have an overlapping relationship with other primitives in the two-dimensional architectural drawing.

[0106] Embodiment 2

[0107] The embodiment of the present invention provides a device for adjusting centralized marking, such as Figure 8 As shown, the device specifically includes the following components:

[0108] The acquisition module 801 is used to acquire the two-dimensional building image to be processed, and identify the target concentrated annotated graphics elements from the two-dimensional building image and identify the target component graphics elements corresponding to the target concentrated annotated graphics elements;

[0109] A judgment module 802 is used to judge whether the target concentrated labeled primitive has an overlapping relationship with other primitives in the two-dimensional building image;

[0110] A generating module 803 is used to generate a plurality of candidate points in the two-dimensional building image according to the position of the center point of the target component element in the case of an overlapping relationship;

[0111] The adjustment module 804 is used to move the target concentrated labeled graphics element to each candidate point in sequence until the moved target concentrated labeled graphics element does not overlap with other graphics elements in the two-dimensional building image.

[0112] Specifically, the determination module 802 is used to:

[0113] Determining, on the two-dimensional building map, a first area where the labeled text in the target concentrated labeled primitives cannot be located, and forming a first bounding box of the first area;

[0114] Determining, on the two-dimensional building diagram, a second area in which the annotation leader line in the target concentrated annotation primitive cannot be located, and forming a second bounding box of the second area;

[0115] If the bounding box of the annotation text overlaps with the first bounding box, and / or the bounding box of the annotation leader overlaps with the second bounding box, it is determined that there is an overlapping relationship.

[0116] Furthermore, the determination module 802 is further configured to:

[0117] Determining, on the two-dimensional building diagram, a first area where the annotation text in the target concentrated annotation graphic element cannot be located, and determining a second area where the annotation leader line in the target concentrated annotation graphic element cannot be located;

[0118] Drawing a grid on the two-dimensional drawing of the building to obtain grid points, setting the grid points located in the first area as first collision points and setting the grid points located in the second area as second collision points;

[0119] If there is a first collision point in the area where the annotation text is located, and / or there is a second collision point in the area where the annotation leader is located, it is determined that there is an overlapping relationship.

[0120] Specifically, the generating module 803 is used to:

[0121] On the two-dimensional drawing of the building, the center line of the target component element is used as a reference line, and a first set number of other reference lines are drawn on both sides of the reference line; wherein any two adjacent reference lines are parallel to each other, and the spacing between them is a first set value;

[0122] Draw a vertical line perpendicular to the center line and passing through the center point on the two-dimensional drawing of the building, and draw a second set number of other vertical lines on both sides of the vertical line; wherein any two adjacent vertical lines are parallel to each other, and the spacing between them is the second set value;

[0123] An intersection point formed by the intersection of all the reference lines and all the vertical lines is determined, and the intersection point is used as the candidate point.

[0124] Furthermore, the adjustment module 804 is used to:

[0125] Taking the center point of the target component primitive as the starting point, numbering each candidate point in sequence according to a preset rule;

[0126] Traverse each candidate point in sequence according to the numbering order, and determine whether the target concentrated labeled element overlaps with other elements in the two-dimensional building image after the anchor point of the target concentrated labeled element moves to the currently traversed candidate point. If so, continue to traverse the next candidate point, if not, stop traversing.

[0127] Furthermore, the device also includes:

[0128] A processing module is used to draw a reference line on the two-dimensional building drawing and determine all candidate beam elements intersecting with the reference line; select target beam elements that are parallel to each other and perpendicular to the reference line from all the candidate beam elements; and adjust the concentrated marking elements of each target beam element based on the center line of each target beam element and the reference line so that the concentrated marking elements of each target beam element are located on a straight line.

[0129] Furthermore, the processing module is specifically used for:

[0130] A third set number of other reference lines are drawn on both sides of the reference line; wherein any two adjacent reference lines are parallel to each other and the spacing is a third set value; each target beam element is traversed in turn, and a fourth set number of other center lines are drawn on both sides of the center line of the currently traversed target beam element; wherein any two adjacent center lines of a target beam element are parallel to each other and the spacing is a fourth set value; each reference line is traversed in turn, and the intersection points of the currently traversed reference line and the center lines of all target beam elements are formed into an intersection set corresponding to the currently traversed reference line; the number of legal intersections in the intersection set of each reference line is calculated respectively, and the target reference line corresponding to the intersection set with the largest number of legal intersections is determined; wherein, when the concentrated annotation element is moved to the legal intersection, there is no overlapping relationship with other elements in the two-dimensional building diagram; the concentrated annotation of each target beam element is moved to the legal intersection on the target reference line.

[0131] Embodiment 3

[0132] This embodiment also provides a computer device, such as a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including an independent server or a server cluster composed of multiple servers) that can execute programs. Fig. 9 As shown, the computer device 90 of this embodiment includes at least but not limited to: a memory 901 and a processor 902 that can communicate with each other via a system bus. It should be noted that Fig. 9 Only computer device 90 is shown with components 901 - 902 , but it should be understood that implementing all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.

[0133] In this embodiment, the memory 901 (i.e., readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 901 can be an internal storage unit of the computer device 90, such as a hard disk or memory of the computer device 90. In other embodiments, the memory 901 can also be an external storage device of the computer device 90, such as a plug-in hard disk equipped on the computer device 90, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 901 can also include both the internal storage unit of the computer device 90 and its external storage device. In this embodiment, the memory 901 is generally used to store the operating system and various application software installed on the computer device 90. In addition, the memory 901 can also be used to temporarily store various types of data that have been output or are to be output.

[0134] In some embodiments, the processor 902 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 902 is generally used to control the overall operation of the computer device 90 .

[0135] Specifically, in this embodiment, the processor 902 is used to execute the program of the method for adjusting the centralized labeling stored in the memory 901, and the program of the method for adjusting the centralized labeling is executed to implement the following steps:

[0136] Acquire a two-dimensional building diagram to be processed, and identify target concentrated annotated graphic elements from the two-dimensional building diagram and identify target component graphic elements corresponding to the target concentrated annotated graphic elements;

[0137] Determine whether the target concentrated labeled graphic element has an overlapping relationship with other graphic elements in the two-dimensional building image;

[0138] In the case of an overlapping relationship, a plurality of candidate points are generated in the two-dimensional building image according to the position of the center point of the target component element;

[0139] The target concentrated labeled graphics element is moved to each candidate point in sequence until the moved target concentrated labeled graphics element does not overlap with other graphics elements in the two-dimensional building image.

[0140] The specific implementation process of the above method steps can be found in Example 1, and this embodiment will not be repeated here.

[0141] Embodiment 4

[0142] This embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App application store, etc., on which a computer program is stored. When the computer program is executed by a processor, the following method steps are implemented:

[0143] Acquire a two-dimensional building diagram to be processed, and identify target concentrated annotated graphic elements from the two-dimensional building diagram and identify target component graphic elements corresponding to the target concentrated annotated graphic elements;

[0144] Determine whether the target concentrated labeled graphic element has an overlapping relationship with other graphic elements in the two-dimensional building image;

[0145] In the case of an overlapping relationship, a plurality of candidate points are generated in the two-dimensional building image according to the position of the center point of the target component element;

[0146] The target concentrated labeled graphics element is moved to each candidate point in sequence until the moved target concentrated labeled graphics element does not overlap with other graphics elements in the two-dimensional building image.

[0147] The specific implementation process of the above method steps can be found in Example 1, and this embodiment will not be repeated here.

[0148] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0149] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0150] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.

[0151] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for adjusting concentrated labeling, characterized in that: The method comprises: Acquire a two-dimensional building diagram to be processed, and identify target concentrated annotated graphic elements from the two-dimensional building diagram and identify target component graphic elements corresponding to the target concentrated annotated graphic elements; Determine whether the target concentrated labeled graphic element has an overlapping relationship with other graphic elements in the two-dimensional building image; In the case of an overlapping relationship, a plurality of candidate points are generated in the two-dimensional building image according to the position of the center point of the target component element; The target concentrated labeled graphic element is moved to each candidate point in sequence until the moved target concentrated labeled graphic element does not overlap with other graphic elements in the two-dimensional building image; Wherein, when the target component element is a beam element, the method further comprises: Draw a reference line on the two-dimensional drawing of the building, and determine all candidate beam elements intersecting with the reference line; Filter out target beam elements that are parallel to each other and perpendicular to the reference line from all the candidate beam elements; Based on the center line of each target beam element and the reference line, the concentrated marking elements of each target beam element are adjusted so that the concentrated marking elements of each target beam element are located on a straight line parallel to the reference line; wherein the adjusted concentrated marking elements of each target beam element do not overlap with other elements in the two-dimensional building drawing.

2. The method for adjusting concentrated marking according to claim 1, characterized in that: The step of judging whether the target concentrated labeled graphic element has an overlapping relationship with other graphic elements in the two-dimensional building image includes: Determining, on the two-dimensional building map, a first area where the labeled text in the target concentrated labeled primitives cannot be located, and forming a first bounding box of the first area; Determining, on the two-dimensional building diagram, a second area in which the annotation leader line in the target concentrated annotation primitive cannot be located, and forming a second bounding box of the second area; If the bounding box of the annotation text overlaps with the first bounding box, and / or the bounding box of the annotation leader overlaps with the second bounding box, it is determined that there is an overlapping relationship.

3. The method for adjusting concentrated marking according to claim 1, characterized in that: The step of judging whether the target concentrated labeled graphic element has an overlapping relationship with other graphic elements in the two-dimensional building image includes: Determining, on the two-dimensional building diagram, a first area where the annotation text in the target concentrated annotation graphic element cannot be located, and determining a second area where the annotation leader line in the target concentrated annotation graphic element cannot be located; Drawing a grid on the two-dimensional drawing of the building to obtain grid points, setting the grid points located in the first area as first collision points and setting the grid points located in the second area as second collision points; If there is a first collision point in the area where the annotation text is located, and / or there is a second collision point in the area where the annotation leader is located, it is determined that there is an overlapping relationship.

4. The method for adjusting concentrated marking according to claim 1, characterized in that: In the case where there is an overlapping relationship, generating a plurality of candidate points in the two-dimensional building image according to the position of the center point of the target component element includes: On the two-dimensional drawing of the building, the center line of the target component element is used as a reference line, and a first set number of other reference lines are drawn on both sides of the reference line; wherein any two adjacent reference lines are parallel to each other, and the spacing between them is a first set value; Draw a vertical line perpendicular to the center line and passing through the center point on the two-dimensional drawing of the building, and draw a second set number of other vertical lines on both sides of the vertical line; wherein any two adjacent vertical lines are parallel to each other, and the spacing between them is the second set value; An intersection point formed by the intersection of all the reference lines and all the vertical lines is determined, and the intersection point is used as the candidate point.

5. The method for adjusting concentrated marking according to claim 4, characterized in that: The step of sequentially moving the target concentrated labeled primitives to each candidate point until the moved target concentrated labeled primitives do not overlap with other primitives in the two-dimensional building image includes: Taking the center point of the target component primitive as the starting point, numbering each candidate point in sequence according to a preset rule; Traverse each candidate point in sequence according to the numbering order, and determine whether the target concentrated labeled element overlaps with other elements in the two-dimensional building image after the anchor point of the target concentrated labeled element moves to the currently traversed candidate point. If so, continue to traverse the next candidate point, if not, stop traversing.

6. The method for adjusting concentrated marking according to claim 1, characterized in that: The adjusting the concentrated labeled graphics element of each target beam graphics element based on the center line of each target beam graphics element and the reference line so that the concentrated labeled graphics element of each target beam graphics element is located on a straight line parallel to the reference line includes: Draw a third set number of other reference lines on both sides of the reference line; wherein any two adjacent reference lines are parallel to each other and the spacing between them is a third set value; Traversing each target beam element in turn, and drawing a fourth set number of other center lines on both sides of the center line of the currently traversed target beam element; wherein any two adjacent center lines of a target beam element are parallel to each other, and the spacing between them is a fourth set value; Traverse each reference line in turn, and form a set of intersections corresponding to the currently traversed reference line with the intersections of each center line of all target beam elements; The number of legal intersections in the intersection sets of each reference line is calculated respectively, and the target reference line corresponding to the intersection set with the largest number of legal intersections is determined; wherein when the concentrated annotation element is moved to the legal intersection, there is no overlap with other elements in the two-dimensional drawing of the building; Move the concentrated annotation of each target beam element to a legal intersection point on the target reference line.

7. A device for adjusting centralized marking, characterized in that: The device comprises: An acquisition module is used to acquire a two-dimensional building diagram to be processed, and identify target concentrated annotated graphics elements from the two-dimensional building diagram and identify target component graphics elements corresponding to the target concentrated annotated graphics elements; A judgment module, used to judge whether the target concentrated labeled graphic element has an overlapping relationship with other graphic elements in the two-dimensional building image; A generating module, for generating a plurality of candidate points in the two-dimensional building image according to the position of the center point of the target component element in the case of an overlapping relationship; An adjustment module is used to move the target concentrated labeled primitives to each candidate point in sequence until the moved target concentrated labeled primitives do not overlap with other primitives in the two-dimensional building image; Wherein, the device further comprises: A processing module is used to draw a reference line on the two-dimensional building drawing and determine all candidate beam elements intersecting with the reference line; select target beam elements that are parallel to each other and perpendicular to the reference line from all the candidate beam elements; adjust the concentrated marking elements of each target beam element based on the center line of each target beam element and the reference line, so that the concentrated marking elements of each target beam element are located on a straight line parallel to the reference line; wherein the adjusted concentrated marking elements of each target beam element do not overlap with other elements in the two-dimensional building drawing.

8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Labeling method and device for multi-source measurement in power distribution network wide-area measurement control system

    CN111080749A

  • Labeling method and processing device of beam reinforcement diagram and computer readable storage medium

    CN112800517A