Drawing labeling processing method, device and equipment and medium
By determining the placement position based on the label type in the drawing, the problem of overlapping the label and other content is solved, and the clarity of the label and the quality of the drawing is improved.
Patent Information
- Application Number
- CN202311262641.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2025-03-28
AI Technical Summary
The labels in existing drawings are prone to overlap with other labels or images of buildings, resulting in unclear labeling.
By obtaining the pending drawing and target label objects, determining multiple candidate positions based on the label type, and selecting the target placement position that meets the placement conditions, ensure that the overlap value of the label and other objects is less than the threshold.
It realizes flexible placement of different annotation types, reduces the overlap between the annotation and other content, improves the clarity of the annotation, and improves the quality of the drawings.
Smart Images

Figure CN119723606A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and specifically to a method, device, equipment and medium for processing drawing annotations. Background Art
[0002] In the field of architecture, drawings are generated based on the design of a building. Drawings include a structural image of the building as well as the dimensions of the building. The dimensions of the building are marked by annotations.
[0003] Currently, annotations in drawings are set in default positions. Annotations in default positions are likely to overlap with other annotations or images of buildings, resulting in unclear annotations. Summary of the invention
[0004] In view of this, the present application provides a method, device, equipment and medium for processing drawing annotations, which can determine the placement position of annotations with a smaller degree of overlap with other content based on the annotation type, can meet the display requirements of annotations of different annotation types, and improve the clarity of the annotations.
[0005] Based on this, the technical solutions provided by this application are as follows:
[0006] In a first aspect, the present application provides a method for processing drawing annotations, the method comprising: obtaining a drawing to be processed, the drawing to be processed comprising an object; obtaining a target annotation object, the target annotation object being used to annotate a target object; determining, based on the annotation type of the target annotation object, a plurality of candidate positions of the target annotation object in the drawing to be processed; determining a target placement position that meets a placement condition from the plurality of candidate positions, the placement condition being that an overlap value between the target annotation object and other objects is less than a threshold, the overlap value being used to measure a degree of overlap between the target annotation object and other objects; and setting the target annotation object at the target placement position.
[0007] In a possible implementation manner, the candidate position is obtained by adjusting an initial preset position of the target annotated object based on the annotation type of the target annotated object.
[0008] In a possible implementation, before setting the target annotation object at the target placement position, the method further includes: if each of the candidate positions does not meet the placement condition, determining an overlapping object that overlaps with the target annotation object, the overlapping object being another annotation object other than the target annotation object; based on the candidate positions of the overlapping object, adjusting the current placement position of the overlapping object; if a target placement position that meets the placement condition is determined from multiple candidate positions, placing the overlapping object at the adjusted placement position; if each of the candidate positions does not meet the placement condition, taking the candidate position with the smallest overlap value as the target placement position.
[0009] In a possible implementation, determining a target placement position that meets placement conditions from among the multiple candidate positions includes: adjusting the candidate position to obtain an extended position; and determining a target placement position that meets placement conditions from among the multiple candidate positions and the extended positions of the candidate positions.
[0010] In a possible implementation manner, adjusting the candidate position to obtain the extended position includes: adjusting the candidate position according to a preset direction and a preset step size to obtain the extended position.
[0011] In a possible implementation, determining a target placement position satisfying a placement condition from among the plurality of candidate positions includes: determining a candidate position satisfying the placement condition and a priority condition from among the plurality of candidate positions as the target placement position.
[0012] In a possible implementation, the annotation type is a ruler type, the target annotation object includes a ruler line and a ruler text, the ruler line is used to identify the length of the target object, the position of the ruler line is determined by the position of the target object, and the candidate position is the position of the ruler text.
[0013] In a possible implementation, the annotation type is a leader annotation type, the target annotation object includes a leader and a first annotation text, the leader is used to connect the target object and the first annotation text, and the candidate position is the position of the first annotation text.
[0014] In a possible implementation manner, the annotation type is a text annotation type, the target annotation object includes a second annotation text, and the candidate position is a position of the second annotation text.
[0015] In a possible implementation, the placement condition is that the target marked object does not overlap with other objects.
[0016] In a possible implementation, the method further includes: establishing an enclosing area including all the objects, wherein the objects include at least object objects; dividing the enclosing area into a plurality of sub-areas, each sub-area including an area index; and recording object information of the labeled objects included in the sub-areas.
[0017] In a possible implementation manner, the method further includes: displaying the drawing to be processed.
[0018] In a possible implementation, the method further includes: obtaining a user's adjustment instruction for the annotation object to be adjusted, where the annotation object to be adjusted is a annotation object included in the drawing to be processed; and adjusting a placement position of the annotation to be adjusted based on the adjustment instruction.
[0019] In a possible implementation manner, the target annotation object is generated based on the annotation rule of the target object, or is the annotation object included in the drawing to be processed.
[0020] In a second aspect, the present application provides a drawing annotation processing device, the device comprising: a first acquisition unit, used to acquire a drawing to be processed, the drawing to be processed comprising an object; a second acquisition unit, used to acquire a target annotation object, the target annotation object being used to annotate a target object; a candidate position determination unit, used to determine a plurality of candidate positions of the target annotation object in the drawing to be processed based on the annotation type of the target annotation object; a first position selection unit, used to determine a target placement position that meets a placement condition from the plurality of candidate positions, the placement condition being that an overlap value between the target annotation object and other objects is less than a threshold value, the overlap value being used to measure a degree of overlap between the target annotation object and other objects; a setting unit, used to set the target annotation object at the target placement position.
[0021] In a possible implementation manner, the candidate position is obtained by adjusting an initial preset position of the target annotated object based on the annotation type of the target annotated object.
[0022] In a possible implementation, the device also includes: an object determination unit, which is used to determine an overlapping object that overlaps with the target marked object if each of the candidate positions does not meet the placement condition, and the overlapping object is another marked object other than the target marked object; a first adjustment unit, which is used to adjust the current placement position of the overlapping object based on the candidate position of the overlapping object; a placement unit, which is used to place the overlapping object at the adjusted placement position if a target placement position that meets the placement condition is determined from multiple candidate positions; and a second position selection unit, which is used to select the candidate position with the smallest overlap value as the target placement position if each of the candidate positions does not meet the placement condition.
[0023] In a possible implementation, the first position selection unit is specifically configured to adjust the candidate position to obtain an extended position; and determine a target placement position that meets a placement condition from among the plurality of candidate positions and the extended positions of the candidate positions.
[0024] In a possible implementation, the first position selection unit is used to adjust the candidate position to obtain an extended position, including: the first position selection unit is specifically used to adjust the candidate position according to a preset direction and a preset step size to obtain an extended position.
[0025] In a possible implementation, the first position selection unit is specifically configured to determine, from the plurality of candidate positions, a candidate position that satisfies a placement condition and a priority condition as a target placement position.
[0026] In a possible implementation, the annotation type is a ruler type, the target annotation object includes a ruler line and a ruler text, the ruler line is used to identify the length of the target object, the position of the ruler line is determined by the position of the target object, and the candidate position is the position of the ruler text.
[0027] In a possible implementation, the annotation type is a leader annotation type, the target annotation object includes a leader and a first annotation text, the leader is used to connect the target object and the first annotation text, and the candidate position is the position of the first annotation text.
[0028] In a possible implementation manner, the annotation type is a text annotation type, the target annotation object includes a second annotation text, and the candidate position is a position of the second annotation text.
[0029] In a possible implementation, the placement condition is that the target marked object does not overlap with other objects.
[0030] In a possible implementation, the device also includes: an establishing unit, used to establish an enclosing area including all the objects, and the objects include at least object objects; a dividing unit, used to divide the enclosing area into multiple sub-areas, each sub-area includes an area index; and a recording unit, used to record object information of the marked objects included in the sub-area.
[0031] In a possible implementation manner, the device further includes: a display unit, configured to display the drawings to be processed.
[0032] In a possible implementation, the device also includes: a third acquisition unit, used to obtain a user's adjustment instruction for the annotation object to be adjusted, where the annotation object to be adjusted is the annotation object included in the drawing to be processed; and a second adjustment unit, used to adjust the placement position of the annotation to be adjusted based on the adjustment instruction.
[0033] In a possible implementation manner, the target annotation object is generated based on the annotation rule of the target object, or is the annotation object included in the drawing to be processed.
[0034] In a third aspect, the present application provides an electronic device, including:
[0035] one or more processors;
[0036] a storage device having one or more programs stored thereon,
[0037] When the one or more programs are executed by the one or more processors, the one or more processors implement any method described in the first aspect.
[0038] In a fourth aspect, the present application provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, any method described in the first aspect is implemented.
[0039] In a fifth aspect, the present application provides a computer program product, which, when executed on a device, enables the device to execute any method described in the first aspect.
[0040] It can be seen that this application has the following beneficial effects:
[0041] The present application provides a method, device, equipment and medium for processing drawing annotations. In the method, a drawing to be processed including an object object is obtained, a target annotation object for annotating a target object object is obtained, and based on the annotation type of the target annotation object, multiple candidate positions of the target annotation object in the drawing to be processed are determined. Determining the target placement position among the candidate positions corresponding to the annotation type can meet the requirements for position determination of annotations of different annotation types and realize flexible placement of annotation objects of different annotation types. Determine the target placement position that meets the placement conditions from multiple candidate positions, and set the target annotation object at the target placement position. In this way, it is possible to reduce the overlap of the annotation with other annotations or objects, improve the clarity of the annotation, and obtain a better display effect on the basis of meeting the display requirements of the annotation type. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of a drawing provided for an embodiment of the present application;
[0043] Figure 2 A schematic diagram of a processed drawing provided for an embodiment of the present application;
[0044] Figure 3 A schematic diagram of a process for processing drawing annotations provided in an embodiment of the present application;
[0045] Figure 4 A schematic diagram of a ruler-type target marking object provided in an embodiment of the present application;
[0046] Figure 5 A schematic diagram of candidate positions of a target annotation object of a ruler type provided in an embodiment of the present application;
[0047] Figure 6 A schematic diagram of a target annotation object of a lead annotation type provided in an embodiment of the present application;
[0048] Figure 7 A schematic diagram of candidate positions of a target annotation object of a lead annotation type provided in an embodiment of the present application;
[0049] Figure 8 A schematic diagram of a target annotation object of a text annotation type provided in an embodiment of the present application;
[0050] Fig. 9 A schematic diagram of candidate positions of a target annotation object of a text annotation type provided in an embodiment of the present application;
[0051] Fig.10 A schematic diagram of the structure of a processing device marked with a drawing provided in an embodiment of the present application;
[0052] Fig.11 A schematic diagram of the basic structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to facilitate the understanding and explanation of the technical solutions provided by the embodiments of the present application, the background technology of the present application will be described below.
[0054] In the process of structural design of a building or object, a drawing in electronic format is generated to describe the structure of the building or object. The drawing includes a structural image of the building or object and annotations used to mark the dimensions of the various parts of the building or object. The dimensions are marked by the annotations. Currently, the automatically generated annotations are all in the default position of the pre-set annotations. For example, see Figure 1 As shown, this figure is a schematic diagram of a drawing provided by an embodiment of the present application. Among them, some labels have overlapping problems. For example Figure 1In the example above, there are "kitchen" and "door opening height 2000", as well as "1250" and "1215". Dimensions in the default position may overlap with other dimensions or other annotated objects, resulting in unclear dimensions, lowering the quality of the drawing and affecting the accurate understanding of object sizes by users viewing the drawing.
[0055] Based on this, an embodiment of the present application provides a method for processing drawing annotations. In the method, a drawing to be processed including an object object is obtained, a target annotation object for annotating a target object object is obtained, and based on the annotation type of the target annotation object, multiple candidate positions of the target annotation object in the drawing to be processed are determined. Determining the target placement position among the candidate positions corresponding to the annotation type can meet the requirements for position determination of annotations of different annotation types and realize flexible placement of annotation objects of different annotation types. Determine the target placement position that meets the placement conditions from multiple candidate positions, and set the target annotation object at the target placement position. In this way, it is possible to achieve avoidance of annotations of different annotation types and other contents included in the drawing, reduce the overlap of annotations and other contents, and improve the clarity of annotations.
[0056] In order to facilitate understanding of the processing method for drawing annotations provided in the embodiments of the present application, the application scenario of the processing method for drawing annotations provided in the embodiments of the present application is described below.
[0057] Those skilled in the art can understand that this application scenario is only an example in which the implementation of the present application can be implemented. The scope of application of the implementation of the present application is not limited by any aspect of this framework.
[0058] The processing method for drawing annotation provided in the embodiment of the present application is applied to an electronic device with drawing annotation processing capability. An electronic device refers to a device with data processing capability, such as a server or a terminal. Among them, the terminal includes but is not limited to a smart phone, a tablet computer, a laptop computer, a personal digital assistant (PDA) or a smart wearable device. The server can be a cloud server, such as a central server in a central computing cluster, or an edge server in an edge computing cluster. Of course, the server can also be a server in a local data center. A local data center refers to a data center directly controlled by a user.
[0059] The electronic device obtains a drawing to be processed including an object. The drawing to be processed is a drawing for which annotations need to be generated, or a drawing for which annotations need to be adjusted. The electronic device obtains a target annotation object. The target annotation object is an annotation for which a placement position needs to be determined. The target annotation object is a generated annotation, or an annotation included in the drawing to be processed that needs to have its position adjusted. As an example, Figure 1Take the drawing to be processed as an example, in which the dark rectangle is a wall, and the dotted rectangle is a door. Both the wall and the door are objects in the drawing to be processed. The drawing to be processed also includes multiple annotation objects, among which the annotation objects with annotation texts such as "Door opening height 2000", "Kitchen", "1150", "1250", and "1215" are annotation objects that need to adjust their positions, namely, target annotation objects. The electronic device determines multiple candidate positions of the target annotation object in the drawing to be processed based on the annotation type of the target annotation object. In this way, a placement position that meets the display requirements of the annotation type can be determined from the candidate positions. The electronic device determines the target placement position that meets the placement conditions from the multiple candidate positions. The placement condition is that the overlap value of the target annotation object and other objects is less than a threshold. The overlap value is used to measure the degree of overlap between the target annotation object and other objects. The placement condition is used to determine a target placement position that does not overlap with other objects or has a small degree of overlap. The electronic device places the target annotation object at the target placement position. See Figure 2 As shown in the figure, this is a schematic diagram of the processed drawing. In this way, a placement position suitable for the annotation type can be selected, and on the basis of meeting the display requirements of the annotation type, the overlap of the annotation with other annotations or objects can be reduced, the clarity of the annotation can be improved, and the quality of the drawing can be improved.
[0060] In order to facilitate understanding of the technical solution provided in the embodiment of the present application, the processing method of drawing annotation provided in the embodiment of the present application is described below in conjunction with the accompanying drawings.
[0061] See also Figure 3 As shown in FIG. 1 , the figure is a flow chart of a method for processing drawing annotations provided in an embodiment of the present application, such as Figure 3 As shown, the method may include S301-S305:
[0062] S301: Acquire a drawing to be processed including an object.
[0063] The drawings to be processed are drawings for which the placement of annotations needs to be determined. As an example, the drawings to be processed do not include annotations, and annotations need to be generated and placed in the drawings. As another example, the drawings to be processed include annotations for which the placement of annotations needs to be adjusted.
[0064] The drawings to be processed include object objects. The object object is the object described in the drawings. In one possible implementation, the object object is the entire object described in the drawings. In another possible implementation, the object object is each sub-object obtained by dividing the object described in the drawings. As an example, the object described in the drawings is divided according to the requirements of dimensioning to obtain multiple sub-objects. Each sub-object is an object object. For example, the building included in the building plan is divided to obtain sub-objects such as walls, windows, doors, and rooms. For another example, the clothing included in the clothing design drawing is divided to obtain sub-objects such as clothes and accessories.
[0065] S302: Obtain a target annotation object, where the target annotation object is used to annotate a target object.
[0066] The target annotation object is an annotation that needs to be placed at a determined position. The embodiment of the present application does not limit the method for obtaining the target annotation object. In one possible implementation, the drawing to be processed is a drawing that does not include annotations. An annotation object is generated according to the annotation rules of the object objects included in the drawing to be processed. Each annotation generated that needs to be placed in the drawing to be processed is a target annotation object. In another possible implementation, the drawing to be processed includes annotations. Each annotation included in the drawing to be processed is a target annotation object. In yet another possible implementation, the drawing to be processed includes annotations. The target annotation object is the annotation included in the drawing to be processed selected by the user.
[0067] The target annotation object is used to annotate the target object. The target object is the object included in the drawing to be processed. It should be noted that the target annotation object needs to meet the annotation requirements for the target object. For example, for a target object belonging to a building, the target annotation object needs to meet the industry specifications for building annotation. In this way, drawings that meet industry specifications can be obtained.
[0068] In the case where there are multiple target annotation objects, the operations of S303-S305 are performed on each target annotation object. The embodiment of the present application does not limit the order in which the target annotation objects are processed. In one possible implementation, a labeling list is used to store each target annotation object. The target annotation object to be processed this time is obtained from the labeling list. As an example, the target annotation objects can be obtained in sequence according to the order in which the target annotation objects are stored in the labeling list until all the target annotation objects are processed. As another example, unprocessed target annotation objects are randomly selected from the labeling list until all the target annotation objects are processed.
[0069] S303: Based on the annotation type of the target annotation object, determine multiple candidate positions of the target annotation object in the drawing to be processed.
[0070] The target annotation objects of different annotation types have different annotation requirements. The candidate position of the target annotation object is determined based on the annotation type.
[0071] The embodiment of the present application does not limit the implementation method of determining the candidate positions of target annotation objects of different annotation types.
[0072] In one possible implementation, target annotation objects of different annotation types have initial preset positions. The initial preset position is a preset initial placement position for the target annotation object of the annotation type. The initial preset position is a candidate position. In addition, the position adjusted according to a preset adjustment method based on the initial preset position is also a candidate position. The preset adjustment method is determined based on the annotation type of the annotation object. The preset adjustment method includes, for example, a moving direction and a moving step. In another possible implementation, target annotation objects of different annotation types have preset candidate position determination rules. Based on the candidate position determination rules, the candidate position of the target annotation object is determined. In yet another possible implementation, candidate positions of target annotation objects of different annotation types are preset.
[0073] It should be noted that the candidate position of the target marked object is a position included in the preset position range of the position of the target object, so as to facilitate the clarification of the target object marked by the target marked object.
[0074] As a possible implementation, the embodiment of the present application provides examples of candidate positions of target annotation objects of three different annotation types, please refer to the detailed description below.
[0075] S304: Determine a target placement position that meets the placement conditions from multiple candidate positions.
[0076] Among the multiple candidate positions, there may be positions that overlap with other objects, that is, other placed annotated objects and other objects, which can also be called positions that collide with other objects. Among the multiple candidate positions, there may also be positions that do not overlap with other objects.
[0077] From multiple candidate locations, determine a target placement location that meets the placement conditions.
[0078] The placement condition is that the overlap value between the target labeled object and other objects is less than a threshold. The overlap value is used to measure the overlap degree between the target labeled object and other objects. For example, the overlap area between the target labeled object and other objects is calculated, and the ratio of the overlap area to the target labeled object is calculated to obtain the overlap value. As an example, the placement condition is that the target labeled object has no overlap with other objects. In other words, the placement condition is that the overlap value between the target labeled object and other objects is zero.
[0079] In addition, the importance of avoiding overlap is different for different types of other objects. For example, if the target annotation object overlaps with the object object, or with the text included in other annotation objects, the target annotation object will be unclear to a high degree, affecting the viewing of the drawing. If the target annotation object overlaps with the ruler lines included in other annotation objects, the target annotation object will be unclear to a low degree. For this reason, when determining the overlap value, the overlap value can be multiplied by the weight of the object on the basis of the calculated overlap value of the target annotation object and the other objects to obtain the weighted overlap value. The weight of the object is determined by the type of the object. For example, the weight of the text included in the object object and the annotation object is high. The weight of the ruler lines included in the annotation object is low.
[0080] The embodiments of the present application do not limit the implementation method of determining the target placement position that meets the placement conditions from multiple candidate positions. As an example, traverse each candidate position to determine the overlap value of the target annotation object at the candidate position. Based on the overlap value of each candidate position, determine the target placement position that meets the placement conditions. As another example, calculate the overlap values of the candidate positions in sequence. If the overlap value of the candidate position that meets the placement conditions is obtained, the candidate position that meets the placement conditions is used as the target placement position, and stop calculating the overlap values of other candidate positions.
[0081] In addition, in some possible implementations, the candidate positions can be expanded, or the target placement position can be determined based on the priority level of the candidate positions. Please refer to the following description for details.
[0082] S305: Setting the target annotation object at the target placement position.
[0083] After determining the target placement position, place the target annotation object at the target placement position.
[0084] Based on the above S301-S305 related contents, it can be known that determining the target placement position among the candidate positions corresponding to the annotation type can meet the display requirements of annotations of different annotation types and realize the flexible placement of annotation objects of different annotation types. Determining the target placement position that meets the placement conditions from multiple candidate positions can reduce the overlap between annotations and other objects in the drawing, that is, the object object and other annotation objects, improve the clarity of the annotation, and obtain drawings that meet the specifications. In addition, automatically determining the placement position of the annotation can improve the efficiency of generating the annotation of the drawing, or the speed of modifying the position of the annotation of the drawing. In this way, the generated drawings are more beautiful and meet the viewing needs of users.
[0085] In some scenarios, the number of objects included in the drawings to be processed is relatively large. After obtaining the drawings to be processed, the drawings to be processed are first divided into regions and the objects are managed. As an example, the method for processing drawing annotations provided in the embodiment of the present application further includes the following steps:
[0086] A1: Create a bounding area that includes all objects.
[0087] When the drawing to be processed only includes object objects, all objects are all object objects included in the drawing to be processed. When the drawing to be processed includes object objects and annotation objects, all objects are all object objects and all annotation objects included in the drawing to be processed.
[0088] The embodiment of the present application does not limit the implementation method of establishing the enclosing area. In one possible implementation method, the area of the displayed object of the drawing to be processed is used as the enclosing area. In another possible implementation method, an object enclosing frame of all objects included in the drawing to be processed is first established, and then an enclosing area including all object enclosing frames is established.
[0089] The embodiment of the present application does not limit the shape of the enclosed area. As an example, the enclosed area is a rectangle. As another example, the enclosed area is a polygon, and the shape of the enclosed area is determined based on the position of the object.
[0090] A2: Divide the enclosed area into multiple sub-areas, each of which includes an area index.
[0091] The enclosed area is divided to obtain a plurality of sub-areas. As an example, the enclosed area is divided according to a pre-set division length and division width. The length of the sub-areas obtained after the division is less than or equal to the division length, and the width of the sub-areas obtained after the division is less than or equal to the division width. In this way, sub-areas with relatively uniform areas can be obtained.
[0092] Assign a region index to each sub-region. As an example, the region index is a two-dimensional array (x, y). The two-dimensional array identifies the sub-region at the xth row and the jth column. The region index is used to facilitate querying the information of the object included in the sub-region corresponding to the region index.
[0093] A3: Record the position information of the marked objects included in the sub-area, where the position information includes the current placement position of the marked objects.
[0094] For each sub-region, object information of the annotation objects included in the sub-region is recorded. The annotation objects included in the sub-region can be the annotation objects included in the drawing to be processed whose positions have not been adjusted, or the annotation objects added to the sub-region.
[0095] The embodiments of the present application do not limit the specific content of the object information of the marked object. In one possible implementation, the object information of the marked object includes: one or more of the attribute information of the marked object and the position information of the marked object. The attribute information of the marked object includes, for example, the marking type of the marked object and the size of the object bounding box of the marked object. The position information of the marked object includes, for example, the position information of the unadjusted original position of the marked object, the position information of the candidate position of the marked object, the overlap value of each candidate position of the marked object, and the position information of the current placement position of the marked object. The position information is specifically, for example, the coordinates of the center point of the object bounding box of the marked object in the coordinate system established based on the drawing to be processed. Among them, the overlap values of each candidate position of the marked object can be stored in a score map.
[0096] By dividing the sub-regions and managing the marked objects included in the sub-regions, it is possible to facilitate searching for object information of the marked objects and improve the efficiency of determining the placement position of the marked objects.
[0097] As some examples, embodiments of the present application provide candidate positions of target annotation objects of three annotation types.
[0098] The first type: the annotation type is the ruler type.
[0099] See also Figure 4 As shown, the figure is a schematic diagram of a ruler-type target annotation object provided in an embodiment of the present application. The ruler-type target annotation object includes a ruler line and a ruler text. The ruler line is used to identify the length of the target object object marked by the annotation. The ruler text is the numerical value of the length of the target object object. The position of the ruler line is determined by the position of the target object object. The position of the ruler line is usually fixed and adjacent to one side of the length to be marked of the target object object. The candidate position is the position of the ruler text. The candidate position is determined based on the position of the ruler line. For example, the ruler text has an initial preset position. The initial preset position is a position adjacent to the ruler line and at the center of the ruler line. Based on the ruler type, a possible implementation method of determining multiple candidate positions of the target annotation object in the drawing to be processed is, for example, to use the initial preset position as a candidate position, and to move the initial preset position along the direction of the ruler line, and the position after the move cannot exceed the ruler line, so as to obtain another candidate position other than the initial preset position. See. Figure 5 As shown, this figure is a schematic diagram of a candidate position of a target annotation object of a ruler type provided in an embodiment of the present application. The moving direction and the moving step length can be preset.
[0100] The second type: The annotation type is the leader annotation type.
[0101] See also Figure 6As shown, this figure is a schematic diagram of a target annotation object of a lead annotation type provided in an embodiment of the present application. The target annotation object includes a lead and a first annotation text. The lead is used to connect the target object and the first annotation text. The candidate position is the position of the first annotation text. The position of the lead is determined by the position of the target object and the position of the first annotation text. Based on the lead annotation type, a possible implementation method for determining multiple candidate positions of the target annotation object in the drawing to be processed is, for example, presetting the relative position relationship between the candidate position and the position of the target object. As an example, see Figure 7 As shown, the candidate positions are located on both sides of the target object, namely, directly to the right, upper right, lower right, directly to the left, upper left and lower left of the target object.
[0102] The third type: the annotation type is text annotation type.
[0103] See also Figure 8 As shown, this figure is a schematic diagram of a target annotation object of a text annotation type provided in an embodiment of the present application. The target annotation object of the text annotation type includes a second annotation text. The second annotation text is in an initial preset position. Based on the lead annotation type, a possible implementation method of determining multiple candidate positions of the target annotation object in the drawing to be processed is, for example, to use the initial preset position as a candidate position, and based on the relative position relationship between the preset candidate position and the initial preset position, generate other candidate positions. As an example, see Fig. 9 As shown, the initial preset position is the candidate position. Positions located to the right, upper right, lower right, left, upper left, and lower left of the initial preset position are all candidate positions. In addition, the candidate position does not exceed the marking range of the target object. The marking range of the target object is determined by the position of the target object.
[0104] The above three types of annotation types are only examples and are not limited to the embodiments of the present application.
[0105] In some implementations, the number of candidate positions for the target annotation object is limited. Further, the candidate positions are adjusted to obtain an extended position. The target placement position is determined from the candidate positions and the extended position. Specifically, an embodiment of the present application provides a specific implementation method for determining a target placement position that meets the placement conditions from multiple candidate positions, including the following steps:
[0106] B1: Adjust the candidate position to obtain the extended position.
[0107] Based on the candidate position, the candidate position is further adjusted to obtain an extended position. It should be noted that the candidate position is adjusted slightly to obtain the extended position. This can prevent the extended position from exceeding the marked range of the target object.
[0108] In a possible implementation, the candidate position is adjusted according to a preset direction and a preset step length to obtain an extended position. The preset direction is, for example, up, down, left, or right. The preset step length is the distance to move the candidate position. The preset step length is, for example, one third of the length or height of the candidate position.
[0109] B2: Determine the target placement position that meets the placement conditions from multiple candidate positions and the extended positions of the candidate positions. After obtaining the extended position, determine the target placement position from the multiple candidate positions and the extended positions. This can achieve the adjustment of the candidate positions, expand the optional placement positions of the target annotation objects, improve the flexibility of placing the target annotation objects, and reduce the probability of overlap between objects.
[0110] The above are possible implementation methods for determining candidate locations and expanding candidate locations. The following embodiments of the present application will introduce a method for determining a target placement location.
[0111] In a possible implementation manner, the candidate positions included in the target annotation object have different priority levels.
[0112] The priority level of the candidate position can be determined based on the user's habit of viewing annotations in drawings, or based on the annotation type of the annotation object. Figure 5 Taking the candidate positions of the target annotation object of the ruler type shown in the figure as an example, the candidate position at the center of the ruler line is the candidate position with the highest priority. The candidate position farther away from the candidate position at the center of the ruler line has a lower priority. Figure 7 Taking the target annotation object of the leader annotation type shown in the figure as an example, the candidate positions to the right and left of the target object have the highest priority. The candidate positions farther away from the candidate positions to the right and left of the target object have lower priority. Fig. 9 Taking the target annotation object of the text annotation type shown as an example, the initial preset position has the highest priority level, the candidate positions to the right and left of the initial preset position have the second highest priority level, and the candidate positions to the upper right, lower right, upper left and lower left have the lowest priority level.
[0113] Determine a target placement location that meets the placement conditions from multiple candidate locations, specifically including:
[0114] A candidate location that meets the placement condition and the priority condition is selected from multiple candidate locations as the target placement location.
[0115] The priority condition is a condition for determining the target placement location based on the dimension of the priority level. For example, the priority condition is that the priority level is greater than the preset level. For another example, the priority condition is that the priority level is the highest among the candidate locations that meet the placement condition.
[0116] As an example, the priority condition is that the priority level is greater than a preset level. Determine the candidate positions that meet the placement condition and the candidate positions that meet the priority condition respectively. The common candidate position among the candidate positions that meet the placement condition and the candidate positions that meet the priority condition is used as the target placement position. As another example, the priority condition is that the priority level is the highest among the candidate positions that meet the placement condition. First determine the candidate positions that meet the placement condition, and then select the candidate position with the highest priority level from the candidate positions that meet the placement condition as the target placement position.
[0117] The target placement position is determined based on the priority level of the candidate positions, and a placement position that meets the user's requirements for viewing drawings can be determined. The generated drawings are of high quality and are easy for users to view.
[0118] In a possible implementation, it may not be possible to determine a target placement position that satisfies the placement conditions from among multiple candidate positions. The present application also provides a method for processing drawing annotations. Before setting the target annotation object at the target placement position, the method further includes the following steps:
[0119] C1: If each candidate position does not meet the placement conditions, determine the overlapping objects that overlap with the target labeled object.
[0120] When each candidate position does not meet the placement condition, other annotated objects that overlap with the target annotated object are regarded as overlapping objects.
[0121] It should be noted that the overlapping object can be other annotated objects that overlap the target annotated object at a certain candidate position. The overlapping object can also be other annotated objects that overlap the target annotated object at each candidate position. The embodiment of the present application does not limit the number of overlapping objects.
[0122] C2: Based on the candidate positions of the overlapping objects, adjust the current placement positions of the overlapping objects.
[0123] The overlapping object has multiple candidate positions. The candidate positions of the overlapping object are used to adjust the current placement position of the overlapping object.
[0124] In a possible implementation, a candidate position that meets the placement conditions and is other than the current placement position is selected from the candidate positions of the overlapping objects as the adjusted placement position of the overlapping objects. In this way, the position of the already placed annotation objects can be adjusted, the probability of overlap of the annotation objects included in the drawings to be processed can be reduced, and the non-overlapping placement position of the annotation objects to be processed can be determined for subsequent processing, thereby realizing flexible placement of the annotation objects.
[0125] C3: If a target placement position that meets the placement condition is determined from the candidate positions, the placement position of the overlapping object is determined to be the adjusted placement position.
[0126] After adjusting the placement position of the overlapping objects, if a target placement position that meets the placement conditions can be determined from the candidate positions, it means that the adjustment of the overlapping objects is effective, and the overlapping objects are placed at the adjusted placement position.
[0127] C4: If the multiple candidate positions do not include a candidate position that meets the placement conditions, the candidate position with the smallest overlap value is used as the target placement position.
[0128] After adjusting the placement position of the overlapping object, if a candidate position that meets the placement condition cannot be determined from multiple candidate positions, it means that the adjustment of the overlapping object is invalid. The overlapping object can be placed at the adjusted placement position or at the placement position before adjustment, which is not limited in the embodiment of the present application.
[0129] From multiple candidate locations, the candidate location with the smallest overlap value is selected as the target placement location. In this way, when overlap with other objects cannot be avoided, the placement location with the lowest overlap degree is selected to place the annotated object, thereby minimizing the overlap degree between the annotated object and other objects.
[0130] The above are all methods for automatically determining the placement position of the annotation object. In a possible implementation, after determining the target placement position of the target annotation object, the drawings to be processed can also be displayed. The user can view the annotation object based on the displayed drawings to be processed.
[0131] In addition, the user can also manually adjust the annotation objects included in the drawing to be processed. The embodiment of the present application also provides a method for processing drawing annotations, which, in addition to the above steps, also includes:
[0132] Obtaining a user's adjustment instruction for the marked object to be adjusted; and adjusting the placement position of the marked object to be adjusted based on the adjustment instruction.
[0133] The embodiment of the present application does not limit the way in which the user triggers the adjustment instruction for the annotation object to be adjusted. As an example, the user first selects the annotation object to be adjusted included in the drawing to be processed, i.e., the annotation object to be adjusted, through a selection operation. The user then triggers a movement button for the position of the annotation object to be adjusted to generate an adjustment instruction for the annotation object to be adjusted.
[0134] Based on the obtained adjustment instruction for the marked object to be adjusted, the placement position of the marked object to be adjusted is adjusted. The user can flexibly adjust the placement position of the marked object based on his own needs, thereby realizing flexible placement of the marked object.
[0135] Based on the method for processing drawing annotations provided in the above method embodiment, the embodiment of the present application also provides a device for processing drawing annotations, and the device for processing drawing annotations will be described below in conjunction with the accompanying drawings.
[0136] See also Fig.10 As shown in FIG. 1 , this figure is a schematic diagram of a processing device marked with a drawing provided in an embodiment of the present application. Fig.10 As shown, the processing device marked in the drawing includes:
[0137] A first acquisition unit 1001 is used to acquire a drawing to be processed, where the drawing to be processed includes an object;
[0138] A second acquisition unit 1002 is used to acquire a target annotation object, where the target annotation object is used to annotate a target object;
[0139] A candidate position determining unit 1003 is used to determine a plurality of candidate positions of the target annotation object in the drawing to be processed based on the annotation type of the target annotation object;
[0140] A first position selection unit 1004 is used to determine a target placement position that meets a placement condition from the plurality of candidate positions, wherein the placement condition is that an overlap value between the target annotated object and other objects is less than a threshold, and the overlap value is used to measure the overlap degree between the target annotated object and other objects;
[0141] The setting unit 1005 is used to set the target annotation object at the target placement position.
[0142] In a possible implementation manner, the candidate position is obtained by adjusting an initial preset position of the target annotated object based on the annotation type of the target annotated object.
[0143] In a possible implementation manner, the device further includes:
[0144] an object determining unit, configured to determine an overlapping object overlapping with the target marked object if each of the candidate positions does not satisfy the placement condition, wherein the overlapping object is another marked object other than the target marked object;
[0145] A first adjustment unit, configured to adjust a current placement position of the overlapping object based on a candidate position of the overlapping object;
[0146] a placement unit, configured to place the overlapping object at the adjusted placement position if a target placement position satisfying the placement condition is determined from the plurality of candidate positions;
[0147] The second position selection unit is used to select the candidate position with the smallest overlap value as the target placement position if none of the candidate positions meets the placement condition.
[0148] In a possible implementation, the first position selection unit 1004 is specifically configured to adjust the candidate position to obtain an extended position; and determine a target placement position that meets a placement condition from among the plurality of candidate positions and the extended positions of the candidate positions.
[0149] In a possible implementation manner, the first position selecting unit 1004 is configured to adjust the candidate position to obtain an extended position, including:
[0150] The first position selection unit 1004 is specifically configured to adjust the candidate position according to a preset direction and a preset step size to obtain an extended position.
[0151] In a possible implementation, the first position selection unit 1004 is specifically configured to determine, from the plurality of candidate positions, a candidate position that satisfies a placement condition and a priority condition as a target placement position.
[0152] In a possible implementation, the annotation type is a ruler type, the target annotation object includes a ruler line and a ruler text, the ruler line is used to identify the length of the target object, the position of the ruler line is determined by the position of the target object, and the candidate position is the position of the ruler text.
[0153] In a possible implementation, the annotation type is a leader annotation type, the target annotation object includes a leader and a first annotation text, the leader is used to connect the target object and the first annotation text, and the candidate position is the position of the first annotation text.
[0154] In a possible implementation manner, the annotation type is a text annotation type, the target annotation object includes a second annotation text, and the candidate position is a position of the second annotation text.
[0155] In a possible implementation, the placement condition is that the target marked object does not overlap with other objects.
[0156] In a possible implementation manner, the device further includes:
[0157] An establishing unit, used for establishing an enclosing area including all the objects, wherein the objects at least include object objects;
[0158] a division unit, configured to divide the enclosed area into a plurality of sub-areas, each of which includes an area index;
[0159] The recording unit is used to record the object information of the marked object included in the sub-region.
[0160] In a possible implementation manner, the device further includes:
[0161] The display unit is used to display the drawings to be processed.
[0162] In a possible implementation manner, the device further includes:
[0163] A third acquisition unit is used to acquire an adjustment instruction of a user for a to-be-adjusted annotation object, where the to-be-adjusted annotation object is a annotation object included in the to-be-processed drawing;
[0164] The second adjustment unit is used to adjust the placement position of the to-be-adjusted mark based on the adjustment instruction.
[0165] In a possible implementation manner, the target annotation object is generated based on the annotation rule of the target object, or is the annotation object included in the drawing to be processed.
[0166] Based on the method for processing drawing annotations provided in the above method embodiments, the present application also provides an electronic device, including: one or more processors; a storage device, on which one or more programs are stored, when the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing drawing annotations as described in any of the above embodiments.
[0167] Reference below Fig.11, which shows a schematic diagram of the structure of an electronic device 1100 suitable for implementing the embodiment of the present application. The terminal device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (portable android devices), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs (televisions), desktop computers, etc. Fig.11 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0168] like Fig.11 As shown, the electronic device 1100 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage device 1108 to a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the electronic device 1100 are also stored. The processing device 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0169] Typically, the following devices may be connected to the I / O interface 1105: an input device 1108 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1107 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1108 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1109. The communication device 1109 may allow the electronic device 1100 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.11 The electronic device 1100 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0170] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1109, or installed from the storage device 1108, or installed from the ROM 1102. When the computer program is executed by the processing device 1101, the above-mentioned functions defined in the method of the embodiment of the present application are executed.
[0171] The electronic device provided in the embodiment of the present application and the processing method of drawing annotation provided in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0172] Based on a method for processing drawing annotations provided in the above method embodiments, an embodiment of the present application provides a computer storage medium on which a computer program is stored, wherein when the program is executed by a processor, the method for processing drawing annotations as described in any of the above embodiments is implemented.
[0173] It should be noted that the computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0174] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0175] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0176] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the drawing annotation processing method.
[0177] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0178] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0179] The units involved in the embodiments described in this application may be implemented by software or hardware. The name of a unit / module does not limit the unit itself in some cases. For example, a voice data acquisition module may also be described as a "data acquisition module".
[0180] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0181] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0182] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0183] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0184] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants 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, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0185] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for processing drawing annotation, characterized in that: The method comprises: Acquire a drawing to be processed, wherein the drawing to be processed includes an object; Obtaining a target annotation object, where the target annotation object is used to annotate a target object; Based on the annotation type of the target annotation object, determining multiple candidate positions of the target annotation object in the drawing to be processed; Determine a target placement position that satisfies a placement condition from the plurality of candidate positions, wherein the placement condition is that an overlap value between the target marked object and other objects is less than a threshold, and the overlap value is used to measure the degree of overlap between the target marked object and other objects; The target annotation object is set at the target placement position.
2. The method according to claim 1, characterized in that The candidate position is obtained by adjusting an initial preset position of the target marked object based on the marking type of the target marked object.
3. The method according to claim 1, characterized in that Before setting the target annotation object at the target placement position, the method further includes: If each of the candidate positions does not satisfy the placement condition, determining an overlapping object that overlaps with the target marked object, where the overlapping object is another marked object except the target marked object; Based on the candidate position of the overlapping object, adjusting the current placement position of the overlapping object; If a target placement position that satisfies the placement condition is determined from the plurality of candidate positions, the overlapping object is placed at the adjusted placement position; If each of the candidate positions does not satisfy the placement condition, the candidate position with the smallest overlap value is used as the target placement position.
4. The method according to claim 1, characterized in that: The step of determining a target placement position satisfying a placement condition from a plurality of candidate positions includes: Adjusting the candidate position to obtain an extended position; A target placement position satisfying a placement condition is determined from the plurality of candidate positions and extended positions of the candidate positions.
5. The method according to claim 4, characterized in that The step of adjusting the candidate position to obtain the extended position includes: The candidate position is adjusted according to a preset direction and a preset step size to obtain an extended position.
6. The method according to claim 1, characterized in that The step of determining a target placement position satisfying a placement condition from a plurality of candidate positions includes: A candidate position satisfying a placement condition and a priority condition is determined from the plurality of candidate positions as a target placement position.
7. The method according to any one of claims 1 to 6, characterized in that: The annotation type is a ruler type, the target annotation object includes a ruler line and a ruler text, the ruler line is used to identify the length of the target object, the position of the ruler line is determined by the position of the target object, and the candidate position is the position of the ruler text.
8. The method according to any one of claims 1 to 6, characterized in that: The annotation type is a lead annotation type, the target annotation object includes a lead and a first annotation text, the lead is used to connect the target object and the first annotation text, and the candidate position is the position of the first annotation text.
9. The method according to any one of claims 1 to 6, characterized in that: The annotation type is a text annotation type, the target annotation object includes a second annotation text, and the candidate position is a position of the second annotation text.
10. The method according to any one of claims 1 to 6, characterized in that: The placement condition is that the target marked object does not overlap with other objects.
11. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Establishing an enclosing area including all the objects, wherein the objects at least include object objects; Dividing the enclosed area into a plurality of sub-areas, each sub-area comprising an area index; The object information of the marked object included in the sub-region is recorded.
12. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Display the pending drawings.
13. The method according to claim 12, characterized in that The method further comprises: Obtaining a user's adjustment instruction for a to-be-adjusted annotation object, where the to-be-adjusted annotation object is a annotation object included in the to-be-processed drawing; Based on the adjustment instruction, the placement position of the to-be-adjusted annotation is adjusted.
14. The method according to any one of claims 1 to 6, characterized in that: The target annotation object is generated based on the annotation rule of the target object, or is a annotation object included in the drawing to be processed.
15. A drawing annotation processing device, characterized in that: The device comprises: A first acquisition unit is used to acquire a drawing to be processed, wherein the drawing to be processed includes an object; A second acquisition unit, used to acquire a target annotation object, where the target annotation object is used to annotate a target object; A candidate position determination unit, configured to determine a plurality of candidate positions of the target annotation object in the drawing to be processed based on the annotation type of the target annotation object; A first position selection unit is used to determine a target placement position that meets a placement condition from the plurality of candidate positions, wherein the placement condition is that an overlap value between the target marked object and other objects is less than a threshold, and the overlap value is used to measure the overlap degree between the target marked object and other objects; A setting unit is used to set the target annotation object at the target placement position.
16. An electronic device, characterized in that: include: one or more processors; A storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 14.
17. A computer readable medium, characterized in that A computer program is stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.