Method, electronic device and computer program product for automatically arranging drawing annotations

By obtaining drawing data and automatically arrange drawing labels according to position constraints, the problem of low automatic layout of drawing labels in the existing technology is solved, and automatic labeling arrangements suitable for a variety of software are realized, which simplifies the drawing process.

CN114254586BActive Publication Date: 2024-12-13BEIJING GLORY PKPM TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111536930.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-15
Publication Date
2024-12-13
Estimated Expiration
2041-12-15

AI Technical Summary

Technical Problem

In the prior art, the automatic arrangement of drawing labels is low, and due to the fixation of component positions, it is difficult to arrange and label flexibly when the drawing space is limited. The automatic arrangement function of some structural design software is affected by the quality of drawings. And a large amount of information related to component structures is required, and it cannot be generalized to other drawing software.

Method used

By obtaining drawing data, determining the candidate location set of text to be marked based on position constraints, and selecting positions that meet non-overlapping constraints to place the marking text, realizing automatic arrangement on the drawing, adapting to a variety of software, including CAD software for normalizing layers .

Benefits of technology

It realizes automatic arrangement of drawing labels, simplifies drawing efficiency, reduces the requirements for drawing information, is suitable for a variety of software, and reduces the complexity of user manual processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114254586B_ABST
    Figure CN114254586B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to methods, electronic devices, and computer program products for automatically arranging drawing annotations. In the method for automatically arranging drawing annotations provided by embodiments of the present disclosure, drawing data is obtained, and the drawing data at least includes multiple components and multiple to-be-annotated texts associated with multiple components to be annotated among the multiple components. Based on the drawing data, multiple candidate position sets for multiple to-be-annotated texts are determined according to a first position constraint. A candidate position that satisfies a second position constraint is selected from the candidate position set, and the second position constraint at least indicates that the annotated texts placed at the selected position do not overlap. The text to be annotated corresponding to the candidate position set is placed at the selected candidate position to annotate the component to be annotated associated with the placed text to be annotated. In this way, automatic arrangement of annotations on drawings can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of construction engineering, and more specifically, to a method, electronic device, and computer program product for automatically arranging drawing annotations. Background Art

[0002] Annotations are an important part of drawings. Due to the fixed position of components in drawings, annotations on drawings often need to be moved flexibly to avoid components and other annotations as much as possible. When the drawing space is limited, it is very difficult to arrange annotations. Summary of the invention

[0003] In a first aspect of the present disclosure, a computer-implemented method for automatically arranging drawing annotations is provided. The method includes: obtaining drawing data, the drawing data at least including a plurality of components and a plurality of to-be-annotated texts associated with a plurality of components to be annotated among the plurality of components. The method also includes, based on the drawing data, determining a plurality of candidate position sets for the plurality of texts to be annotated according to a first position constraint, wherein a candidate position set in the plurality of candidate position sets corresponds to the text to be annotated among the plurality of texts to be annotated. The method also includes selecting a candidate position from the candidate position set that satisfies a second position constraint, wherein the second position constraint at least indicates that the annotated texts placed at the selected position do not overlap. The method also includes placing the text to be annotated corresponding to the candidate position set at the selected candidate position to annotate the component to be annotated associated with the placed text to be annotated.

[0004] In a second aspect of the present disclosure, an electronic device is provided. The electronic device includes a processor and a memory coupled to the processor, the memory having instructions stored therein, and the instructions, when executed by the processor, cause the device to perform an action. The action includes obtaining drawing data, the drawing data at least including multiple components and multiple to-be-annotated texts associated with multiple components to be annotated among the multiple components. The action also includes determining multiple candidate position sets for multiple to-be-annotated texts based on the drawing data and according to a first position constraint, wherein a candidate position set in the multiple candidate position sets corresponds to the to-be-annotated texts in the multiple to-be-annotated texts. The action also includes selecting a candidate position from the candidate position set that satisfies a second position constraint, the second position constraint at least indicating that the annotated texts placed at the selected position do not overlap. The action also includes placing the to-be-annotated text corresponding to the candidate position set at the selected candidate position to annotate the component to be annotated associated with the placed to-be-annotated text.

[0005] In a third aspect of the present disclosure, there is provided a computer program product tangibly stored on a computer readable medium and comprising machine executable instructions which, when executed, cause a machine to perform the method according to the first aspect.

[0006] This Summary is provided to introduce a selection of concepts in a simplified form that are further described in the Detailed Description below. This Summary is not intended to identify key features or essential features of the disclosure, nor is it intended to limit the scope of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the exemplary embodiments of the present disclosure in more detail in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present disclosure. In the accompanying drawings:

[0008] Figure 1 A schematic diagram illustrating an example environment in which embodiments of the present disclosure may be implemented;

[0009] Figure 2 A flowchart showing an example method for automatically arranging drawing annotations according to an embodiment of the present disclosure is shown;

[0010] Figure 3 A flowchart showing an example method for automatically arranging drawing annotations according to some embodiments of the present disclosure is shown;

[0011] Figure 4 A schematic diagram showing the results of automatically arranging drawing annotations according to some embodiments of the present disclosure; and

[0012] Figure 5 A block diagram of an example device that may be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0013] The principles of the present disclosure will be described below with reference to several example embodiments shown in the accompanying drawings. Although preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that these embodiments are described only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way.

[0014] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0015] At present, most of the drawing annotations are done manually, which greatly affects the efficiency of drawing. The automatic arrangement of annotations in some structural design software is deeply integrated into the software, which is easily affected by the quality of the software itself. In addition, it often requires a lot of information about the association between component structures, which cannot be extended to other drawing software.

[0016] The embodiment of the present disclosure proposes an automatic arrangement scheme for drawing annotation, based on the acquired drawing data, according to the first position constraint, multiple candidate position sets for multiple characters to be annotated are determined. Then, a candidate position satisfying the second position constraint is selected from the candidate position set, and the characters to be annotated corresponding to the candidate position set are placed at the selected candidate position to annotate the components to be annotated associated with the placed characters to be annotated.

[0017] According to the embodiments described herein, the automatic arrangement of annotations on drawings can be realized. In addition, the solution proposed in the embodiments of the present disclosure has low requirements for drawing information, and only requires that each component and each annotation can be distinguished in the drawing, and does not require other information such as the association relationship between components. Therefore, it can be adapted to various software, and even drawing software such as CAD with standardized layers can also be used.

[0018] The basic principles and several exemplary implementations of the present disclosure will be described below with reference to the accompanying drawings. It should be understood that these exemplary embodiments are provided only to enable those skilled in the art to better understand and implement the embodiments of the present disclosure, and are not intended to limit the scope of the present disclosure in any way.

[0019] Figure 1 1 is a schematic diagram of an example environment 100 in which embodiments of the present disclosure may be implemented. In this example environment, devices and / or methods according to embodiments of the present disclosure may be implemented. Figure 1 As shown, various methods according to embodiments of the present disclosure are implemented at the computing device 120 .

[0020] The computing device 120 may be installed with architectural design software, for example, prefabricated architectural design software. In some embodiments, the software may be structural design software such as PKPM and YJK. The user may complete the marking work of multiple drawings 110 on the above software. The drawings 110 may be template drawings, reinforcement drawings, section drawings, accessory drawings, component positioning drawings, large-scale drawings, isometric views, component lists, reinforcement lists, accessory lists, etc. The drawings 110 may be one or more of the formats such as CAD, DWG, DXF, and PDF, and the drawings may be drawings of any suitable format as required.

[0021] Drawing 110 may be stored as drawing data locally or remotely relative to computing device 120. Drawing 110 may include multiple components drawn by a design engineer and text to be annotated 111, etc. Text to be annotated 111 is associated with multiple components to be annotated 112 among the multiple components. The components may be, for example, beams, plates, columns, walls, roofs, etc.

[0022] Although the figure only shows one drawing 110, one text to be annotated 111 and one component to be annotated 112, it is understandable that there may be multiple texts to be annotated 111 and multiple components to be annotated 112 in one drawing 110, and multiple drawings 110 may be annotated. The present disclosure does not limit this.

[0023] It is understood that examples of computing device 120 include, but are not limited to, computers, tablet computers, and smart phones. Interaction with the user includes, but is not limited to, user input including the following items: keyboard input, mouse input, touch input, voice input, gesture input, eye tracking input, digital drawing board input, etc. The scope of the present disclosure is not limited in this respect.

[0024] It should be understood that the structure and function of environment 100 are described for exemplary purposes only, and do not imply any limitation on the scope of the present disclosure. For example, embodiments of the present disclosure may also be applied to environments different from environment 100.

[0025] Figure 2 FIG. 2 is a flowchart of an exemplary method 200 for automatically arranging drawing annotations according to an embodiment of the present disclosure. The method 200 may be performed, for example, in a Figure 1 It should be understood that method 200 may also include additional actions not shown and / or may omit the actions shown, and the scope of the present disclosure is not limited in this respect. Figure 1 The method 200 will be described in detail.

[0026] At block 210, the drawing data is acquired by the computing device 120. The drawing data may include a plurality of components and a plurality of to-be-annotated texts 111 associated with a plurality of to-be-annotated components 112 of the plurality of components. In some embodiments, the drawing data may be acquired by the computing device 120 from other computing devices, or may be downloaded locally from the cloud by the computing device 120. In some embodiments, the drawing data may be stored locally in a persistent storage device relative to the computing device 120. The computing device 120 may then acquire the drawing data from the persistent storage device.

[0027] In some embodiments, the drawing data is first read from the drawing 110 , which may be through the layer information in the dwg file or pdf file, or the information exported from the structural design software such as PKPM.

[0028] DWG files or PDF files can use commercial drawing recognition and review programs to read component information and text, and combine text into text to be annotated based on the proximity of text positions and feature content (the concentrated annotation text of beams in beam leveling construction drawings generally contains the letter L). For example, the text of the concentrated annotation type is aligned with one side close to the leader, and the other end of the leader is on the beam. The in-situ annotation text is very close to the corresponding part of the component, and the text direction is parallel to the component direction. In this way, components, components to be annotated, and text to be annotated are obtained from the drawing data. Structural design software such as PKPM and YJK can obtain relevant information through specific secondary development plug-ins.

[0029] At block 220, based on the acquired drawing data and according to the first position constraint, multiple candidate position sets for the multiple characters to be annotated 111 are determined, and the candidate position sets in the multiple candidate position sets correspond to the characters to be annotated 111 in the multiple characters to be annotated 111. In some embodiments, based on the types of the multiple characters to be annotated, the drawing areas occupied by the multiple characters to be annotated, and the position information of the multiple components, one or more candidate positions satisfying the first position constraint are determined as the multiple candidate position sets.

[0030] In the construction industry, the annotation of drawings needs to meet some national standards, enterprise standards, industry standards, etc. The first position constraint refers to at least some of these standards.

[0031] For example, the types of the text to be marked 111 may include concentrated marking, in-situ marking, and dimension marking. For concentrated marking, the text to be marked 111 generally includes a leader part and a text part. When marking, the leader and (multiple lines) of text are a whole and cannot be separated. For in-situ marking, the text to be marked (generally a line) is a whole and cannot be separated.

[0032] In some embodiments, if the component 112 to be annotated is a beam and the text 111 to be annotated is a concentrated annotation, the starting point of the leader of the text 111 to be annotated must be within the range of the continuous beam, and the leader cannot pass through the beam to be annotated.

[0033] In some embodiments, if the component 112 to be annotated is a beam and the text 111 to be annotated is an in-situ annotation, then the first position constraint is the position of the text 111 to be annotated, and the first position constraint is the position of the text to be annotated constrained by the component, for example (1) within the beam span; (2) 1 / 3 of the character height away from the beam line; (3) the left support annotation must be located to the left of the beam span, within 30% from the left; (4) the right support annotation must be located to the right of the beam span, within 30% from the right; and (5) the mid-span annotation is located in the middle of the beam span.

[0034] The first position constraint is described above for exemplary purposes only, and does not imply any limitation on the scope of the present disclosure. The first position constraint may also include other known or unknown drawing annotation arrangement standards.

[0035] In this way, for each character 111 to be annotated, multiple candidate positions where the character 111 to be annotated may be placed can be determined. These positions constitute a candidate position set.

[0036] At block 230, a candidate position that satisfies a second position constraint is selected from the candidate position set. The second position constraint at least indicates that the annotation text placed at the selected position does not overlap. For example, the annotation text placed at the selected position cannot overlap with the annotation text that has been placed (i.e., already labeled) before. For example, the text can be enclosed by a bounding box (i.e., a rectangle), and the text does not overlap, i.e., the rectangle does not overlap.

[0037] In some embodiments, the plurality of candidate position sets may be sorted, and then candidate positions satisfying the second position constraint are selected from the sorted plurality of candidate position sets in sequence. This will be described below in conjunction with Figure 3 Detailed description.

[0038] At block 240 , the text to be annotated 111 corresponding to the candidate position set is placed at the selected candidate position to annotate the component to be annotated 112 associated with the placed text to be annotated 111 .

[0039] In this way, automatic arrangement of annotations on drawings can be achieved.

[0040] Figure 3 3 is a flow chart showing an example method 300 for automatically arranging drawing annotations according to some embodiments of the present disclosure. The method 300 can be viewed as an example implementation of block 230 in the method 200. It should be understood that the method 300 may also include additional actions not shown and / or may omit the actions shown, and the scope of the present disclosure is not limited in this respect. Figure 1 and Figure 2 The method 300 will be described in detail.

[0041] At box 310, based on the number of candidate positions included in each candidate position set in the multiple candidate position sets and the priority of the text to be marked corresponding to each candidate position set, multiple candidate position sets are sorted. The sorting can be in ascending order from small to large. At box 320, in the ascending order of the above sorting, the candidate position that satisfies the second position constraint is selected from the candidate position set corresponding to the current sorting. In this way, the text to be marked 111 with a small number of candidate positions and a high degree of importance can be placed first, thereby reducing the complexity of automatic arrangement. This can save computing costs.

[0042] In some embodiments, in response to one or more first candidate positions satisfying the second position constraint in the first candidate position set having all been selected to place one or more second characters to be annotated corresponding to the one or more second candidate position sets, the second characters to be annotated in the one or more second characters to be annotated are removed from the corresponding first candidate positions. A candidate position other than the corresponding first candidate position is reselected from the corresponding second candidate position set to place the second characters to be annotated. Then the corresponding first candidate position is selected as the candidate position.

[0043] For example, if there is no position that satisfies the second position constraint when selecting the currently sorted candidate position set, then fall back. The fallback method is: check the largest sorted annotation that overlaps with the candidate position set of the component in the arranged annotations, move the annotation to its next candidate position, and then rearrange from this annotation.

[0044] In some embodiments, in response to the absence of a candidate position satisfying the second position constraint in the candidate position set, the selection of a candidate position from the candidate position set is suspended, and a warning is issued. For example, when the number of rollbacks reaches a preset number threshold, the labeling of the component is abandoned, marked, and a warning is issued to prompt the user to handle it by himself.

[0045] The following python code schematically illustrates an example program for executing the method for automatically arranging drawing annotations according to some embodiments of the present disclosure:

[0046]

[0047]

[0048] In this way, position conflicts between automatically arranged text annotations can be resolved as much as possible, and the manual arrangement processing by the user can be reduced as much as possible.

[0049] According to some embodiments of the present disclosure, the results of automatically arranging drawing annotations are as follows: Figure 4 shown. Figure 4 111-1, 111-2 and 111-3 (which may be individually or collectively referred to as "the text to be marked 111") are shown, which are respectively associated with the component to be marked 112-1, 112-2 and 112-3 (which may be individually or collectively referred to as "the component to be marked 112"). After the automatic arrangement of drawing annotation according to the embodiment of the present disclosure is implemented, it can be seen that each of the text to be marked 111 is arranged in a suitable position, and the components associated therewith can be well annotated.

[0050] Figure 5Schematic block diagram of an example device 500 that can be used to implement embodiments of the present disclosure is shown. Figure 1 The computing device 120 shown may be implemented by the device 500. Figure 5 As shown, the device 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 502 or computer program instructions loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0051] A number of components in the device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0052] The various processes and processing described above, such as method 200 and method 300, may be performed by the processing unit 501. For example, in some embodiments, method 200 and method 300 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by CPU 501, one or more actions of method 200 and method 300 described above may be performed.

[0053] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.

[0054] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples (non-exhaustive list) of computer readable storage medium include: portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination of the above. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (e.g., a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.

[0055] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0056] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of 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., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0057] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0058] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0059] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0060] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse 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 the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0061] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A computer-implemented method for automatically arranging drawing annotations, comprising: Acquire drawing data, wherein the drawing data at least includes a plurality of components and a plurality of to-be-annotated characters associated with a plurality of to-be-annotated components among the plurality of components; Based on the drawing data, according to the first position constraint, determining a plurality of candidate position sets for the plurality of characters to be annotated, wherein a candidate position set in the plurality of candidate position sets corresponds to the characters to be annotated in the plurality of characters to be annotated; Selecting a candidate position satisfying a second position constraint from the candidate position set, wherein the second position constraint at least indicates that the annotation texts placed at the selected position do not overlap with each other; as well as placing characters to be annotated corresponding to the candidate position set at the selected candidate position to annotate the components to be annotated associated with the placed characters to be annotated, Wherein selecting the candidate position satisfying the second position constraint from the candidate position set comprises: sorting the multiple candidate position sets based on the number of candidate positions included in each candidate position set in the multiple candidate position sets and the priority of the to-be-annotated text corresponding to each candidate position set; The candidate position satisfying the second position constraint is selected from the candidate position set corresponding to the current sorting in ascending order of the sorting.

2. The method according to claim 1, wherein determining a plurality of candidate position sets for the plurality of characters to be annotated based on the drawing data comprises: Based on the types of the multiple characters to be annotated, the drawing areas occupied by the multiple characters to be annotated, and the position information of the multiple components, one or more candidate positions satisfying the first position constraint are determined as the multiple candidate position sets.

3. The method according to claim 2, wherein the types include at least: Centralized annotation, in-situ annotation and dimensioning.

4. The method according to claim 1, further comprising: In response to one or more first candidate positions satisfying the second position constraint in the first candidate position set having all been selected to place one or more second characters to be annotated corresponding to the one or more second candidate position sets, removing the second characters to be annotated in the one or more second characters to be annotated from the corresponding first candidate positions; Reselecting a candidate position other than the corresponding first candidate position from the corresponding second candidate position set to place the second character to be marked; as well as The corresponding first candidate position is selected as the candidate position.

5. The method according to claim 1, further comprising: In response to the absence of a candidate position satisfying the second position constraint in the candidate position set, suspending the selection of a candidate position from the candidate position set and issuing a warning. The method according to claim 1 , wherein the first position constraint comprises at least one of the following: national standards, enterprise standards, and industry standards regarding drawing annotation.

7. An electronic device comprising: processor; as well as a memory coupled to the processor, the memory having instructions stored therein, the instructions, when executed by the processor, causing the device to perform actions, the actions comprising: Acquire drawing data, wherein the drawing data at least includes a plurality of components and a plurality of to-be-annotated characters associated with a plurality of to-be-annotated components among the plurality of components; Based on the drawing data, according to the first position constraint, determining a plurality of candidate position sets for the plurality of characters to be annotated, wherein a candidate position set in the plurality of candidate position sets corresponds to the characters to be annotated in the plurality of characters to be annotated; Selecting a candidate position satisfying a second position constraint from the candidate position set, the second position constraint at least indicating that the annotation texts placed at the selected position do not overlap with each other; and placing characters to be annotated corresponding to the candidate position set at the selected candidate position to annotate the components to be annotated associated with the placed characters to be annotated, Wherein selecting the candidate position satisfying the second position constraint from the candidate position set comprises: sorting the multiple candidate position sets based on the number of candidate positions included in each candidate position set in the multiple candidate position sets and the priority of the to-be-annotated text corresponding to each candidate position set; The candidate position satisfying the second position constraint is selected from the candidate position set corresponding to the current sorting in ascending order of the sorting.

8. The device according to claim 7, wherein determining a plurality of candidate position sets for the plurality of characters to be annotated based on the drawing data comprises: Based on the types of the multiple characters to be annotated, the drawing areas occupied by the multiple characters to be annotated, and the position information of the multiple components, one or more candidate positions satisfying the first position constraint are determined as the multiple candidate position sets.

9. The device according to claim 8, wherein the types include at least: Centralized annotation, in-situ annotation and dimensioning.

10. The device of claim 7, wherein the actions further comprise: In response to one or more first candidate positions satisfying the second position constraint in the first candidate position set having all been selected to place one or more second characters to be annotated corresponding to the one or more second candidate position sets, removing the second characters to be annotated in the one or more second characters to be annotated from the corresponding first candidate positions; Reselecting a candidate position other than the corresponding first candidate position from the corresponding second candidate position set to place the second character to be marked; as well as The corresponding first candidate position is selected as the candidate position.

11. The device of claim 7, wherein the actions further comprise: In response to the absence of a candidate position satisfying the second position constraint in the candidate position set, suspending the selection of a candidate position from the candidate position set and issuing a warning. 12 . The device according to claim 7 , wherein the first position constraint comprises at least one of the following: national standards, enterprise standards, and industry standards regarding drawing annotation.

13. A computer program product tangibly stored on a computer readable medium and comprising machine executable instructions which, when executed, cause a machine to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

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

    CN111080749A