Electrical element identification method, apparatus and device, and storage medium
By acquiring graphic data from graphic files, identifying block graphic entities, and combining this with a machine learning model, the problem of low efficiency in identifying electrical components in single-line diagrams was solved, achieving efficient and accurate identification of electrical components and generation of bills of materials.
Patent Information
- Application Number
- CN202411686727.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2026-05-22
AI Technical Summary
In existing technologies, the identification of electrical components in single-line diagrams is inefficient and prone to errors. In particular, due to the different drawing styles of different design institutes and designers, manual identification is difficult, and geometric feature identification methods are difficult to accurately distinguish different types of electrical components.
By acquiring graphic data from graphic files, identifying block graphic entities, and determining the location of electrical components in the electrical system based on this data, the automatic identification of electrical components is achieved by combining machine learning models, thus avoiding the need to analyze the geometric features of electrical components.
It improves the accuracy and efficiency of electrical component identification, generates accurate bills of materials, and simplifies the design and maintenance process of electrical systems.
Smart Images

Figure CN122072810A_ABST
Abstract
Description
Technical Field
[0001] The embodiments disclosed herein relate generally to the field of computers, and more particularly to a method, apparatus, device, and storage medium for identifying electrical components. Background Technology
[0002] Single-line diagrams are two-dimensional topological diagrams of the electrical connection paths from power sources to loads in a power distribution system, and are indispensable design and maintenance tools in the power distribution industry. However, because these diagrams are usually drawn by different design institutes or designers, their layouts and symbol styles vary, and they may not strictly follow a unified industry standard, making interpretation of the drawings quite challenging. In the past, when identifying electrical components in single-line diagrams, the bill of materials was generated manually by identifying the single-line diagrams, which was inefficient and prone to errors. Summary of the Invention
[0003] In a first aspect of this disclosure, an electrical component identification method is provided. The method includes: acquiring graphic data of a graphic file to be identified, the graphic file indicating the layout of electrical components in an electrical system, and the graphic data including corresponding data of a plurality of graphic entities indicating the layout of electrical components; identifying one or more block graphic entities from the graphic data based on the corresponding data of the plurality of graphic entities; and determining one or more first electrical components in the electrical system corresponding to the one or more block graphic entities, and their respective first positions in the electrical system, based on the corresponding data of the one or more block graphic entities.
[0004] A second aspect of this disclosure provides an electrical component identification device, comprising: an acquisition module configured to acquire graphic data of a graphic file to be identified, the graphic file indicating the layout of electrical components in an electrical system, and the graphic data including corresponding data of a plurality of graphic entities indicating the layout of electrical components; an identification module configured to identify one or more block graphic entities from the graphic data based on the corresponding data of the plurality of graphic entities; and a determination module configured to determine, based on the corresponding data of the one or more block graphic entities, one or more first electrical components in the electrical system corresponding to the one or more block graphic entities and corresponding first positions of the one or more first electrical components in the electrical system.
[0005] In a third aspect of this disclosure, an electronic device is provided. The electronic device includes: at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to a first aspect of this disclosure when executed by the at least one processing unit.
[0006] In a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, causes the processor to implement the method according to a first aspect of this disclosure.
[0007] In a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method according to a first aspect of this disclosure.
[0008] As will be understood from the following description, according to embodiments of this disclosure, in the process of identifying electrical components in a graphic file, one or more block graphic entities can be identified from the graphic data based on the corresponding data of multiple graphic entities. Next, based on the corresponding data of the one or more block graphic entities, one or more first electrical components corresponding to the one or more block graphic entities and their corresponding first positions in the electrical system can be determined. In this way, electrical components and their locations can be identified in the graphic file without analyzing their geometric features, thereby improving the accuracy and efficiency of electrical component identification. Other benefits will be described below in conjunction with corresponding embodiments.
[0009] It should be understood that the content described in this section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0010] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0011] Figure 1 A schematic diagram of an example environment in which the various embodiments of this disclosure can be implemented is shown;
[0012] Figure 2 A flowchart illustrating an example process for identifying electrical components according to some embodiments of this disclosure is shown;
[0013] Figure 3 A schematic diagram is shown illustrating the identification of one or more block graphic entities from graphic data according to some embodiments of the present disclosure;
[0014] Figure 4A A schematic diagram illustrating graphic data of a graphic file according to some embodiments of the present disclosure includes multiple graphic entities;
[0015] Figure 4BA schematic diagram is shown illustrating the identification of block graphic entities in graphic data of a graphic file according to some embodiments of the present disclosure;
[0016] Figure 4C A schematic diagram is shown of graphic entities other than block graphic entities in the graphic data of a graphic file according to some embodiments of the present disclosure;
[0017] Figure 5 A block diagram of an electronic component identification device according to some implementations of the present disclosure is shown; and
[0018] Figure 6 A block diagram of a device that can implement various implementations of this disclosure is shown. Detailed Implementation
[0019] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0020] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0021] Example Environment
[0022] Figure 1 A schematic diagram of an example environment 100 in which the various embodiments of the present disclosure can be implemented is shown. The example environment 100 may generally include an electronic device 110.
[0023] Electronic device 110 can acquire graphical data related to a graphical file 120 of an electrical system to be processed, such as graphical data of a single-line diagram of the electrical system. The graphical file 120 can be used to indicate the layout of electrical components in any suitable type of electrical system or a portion thereof. In addition to various electrical components, the graphical file 120 includes connection lines indicating how these components are electrically coupled together. Based on the acquired graphical data related to the graphical file 120 of the electrical system, electronic device 110 can analyze the names, locations, quantities, connection relationships between electrical components, and other relevant information.
[0024] In example environment 100, electronic device 110 can be any type of computing-capable device, including terminal devices or server devices. Terminal devices can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. Server devices can include, for example, computing systems / servers, such as mainframes, edge computing nodes, computing devices in cloud environments, and so on.
[0025] Alternatively and / or additionally, machine learning models (e.g., model 130) may be provided to assist in identifying electrical components in the drawing file. It should be understood that, although... Figure 1 The model 130 is shown to be located outside the electronic device 110, alternatively and / or additionally. The model 130 may also be integrated into the electronic device 110, and the electronic device 110 or other devices may access the model 130 via a network or data cable.
[0026] Model 130 may include one or more models. If model 130 includes multiple models, these multiple models may include multiple types of models. Model 130 may, for example, include at least an image recognition model and a deep learning model. The image recognition model is trained on a large amount of labeled image data, and the model parameters are adjusted using the backpropagation algorithm to minimize the difference between the predicted label and the true label. After training, new unlabeled images are input into the model, and the model outputs the classification result of the image or the location and category of detected objects. The deep learning model is trained on a large amount of labeled data, and the model parameters are iteratively updated using optimization algorithms such as gradient descent to minimize the loss function, thereby improving the model's prediction accuracy. After training, new input data (such as text) is input into the model, and the model outputs the corresponding prediction result (such as classification label, detection box, etc.).
[0027] It should be understood that the structure and function of environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure. Figure 1 The single-line diagrams and graphics of the electrical systems shown are merely exemplary and are not intended to limit the scope of this disclosure.
[0028] As mentioned above, since the graphic files of electrical systems are usually drawn by different design institutes or designers, their layouts and symbol styles vary and may not strictly follow a unified industry standard, which poses a great challenge when interpreting the drawings.
[0029] The method of generating a bill of materials by manually identifying single-line diagrams has many shortcomings. Manual identification relies on the operator's professional knowledge and personal experience, which can lead to subjective judgment biases and inaccurate results. Furthermore, the manual identification process typically requires checking every component on the drawing one by one and manually recording its type, specifications, and quantity. When dealing with complex and large electrical systems, the workload increases exponentially, significantly reducing work efficiency.
[0030] To improve the efficiency of manual identification, some automated identification methods based on geometric features analyze the shape characteristics of electrical components to distinguish different component types. For example, they classify components based on whether their outlines are circular, rectangular, or triangular. While this method improves identification speed to some extent, the similarity in the shapes of electrical components makes it difficult to accurately distinguish different types of components based solely on geometric features. For instance, resistors, inductors, and even certain types of switches may appear very similar in single-line diagrams, often as simple rectangles or squares, posing a challenge to automated identification. Furthermore, in practical applications, components in single-line diagrams are often not drawn strictly according to standard symbols, but may be deformed or simplified, further increasing the difficulty of geometric feature identification methods. In addition, factors such as the placement angle, position, and mutual obstruction of electrical components in circuit diagrams can affect the effectiveness of the identification algorithm, potentially leading to a large number of false positives and false negatives in the final bill of materials.
[0031] As can be seen from the above, with the increasing complexity of the number, types, and connections of electrical components in electrical systems, improving the efficiency and accuracy of electrical component identification is one of the urgent problems to be solved.
[0032] Example process
[0033] Figure 2 A flowchart of an example process 200 for identifying electrical components according to some embodiments of the present disclosure is shown. In some embodiments, process 200 may be performed by, for example... Figure 1 The illustrated electronic device 110 performs this operation. It should be understood that process 200 may also include additional boxes not shown and / or some (or some) of the boxes shown may be omitted, and the scope of this disclosure is not limited in this respect.
[0034] In box 210, electronic device 110 first needs to acquire the graphic data of the graphic files to be identified. These graphic files are used to indicate the layout of electrical components in an electrical system, and the graphic data includes corresponding data for multiple graphic entities used to indicate the layout of electrical components. As an example, the graphic files may be DWG or DXF format graphic files that can be read by computer-aided design (CAD) software, which can accurately represent complex graphic information.
[0035] For example, a single-line diagram can show the layout and connection methods of electrical components (such as circuit breakers, transformers, cables, etc.) in a substation, power distribution system, or other electrical facilities. Through these graphical files, engineers and technicians can clearly understand the structure and working principles of the system, thereby enabling them to perform design, maintenance, and troubleshooting tasks.
[0036] As an example, graphical data can include coordinate data, such as point coordinates, center coordinates, and control point coordinates. Point coordinates indicate the coordinates of the starting and ending points of each graphical entity. For example, the starting and ending coordinates of a straight line. Center coordinates can be, for example, the coordinates of the center point of a shape such as a circle or an ellipse. Control point coordinates are used to define the control point coordinates of a curve (such as a spline curve).
[0037] As another example, graphical data can include entity names, labels, etc. Entity names are used to indicate the name of each graphical entity, such as "Circuit Breaker 1" or "Transformer 2". Labels are text labels attached to graphical entities to indicate information such as the component's model, specifications, and serial number.
[0038] As another example, graphic data can include the visibility attributes, color, line type, line width, etc., of a graphic entity. The visibility attribute of a graphic entity indicates whether the graphic entity is displayed in the display interface. The color of a graphic entity is used to distinguish different types of components or connecting lines.
[0039] It should be understood that the graphic data may also include the layer name to which each graphic entity belongs, the visibility of the layer, the locking status, geometric properties, and annotation information attached to the graphic file, etc., and this disclosure is not intended to limit it.
[0040] During the process of acquiring the graphic data of the graphic file to be identified, the electronic device 110 can acquire one or more of the aforementioned graphic data as needed. By acquiring and parsing this graphic data, the electronic device 110 can gain a comprehensive understanding of the layout and connection relationships of the electrical system.
[0041] In box 220, electronic device 110 needs to identify one or more block graphic entities from the corresponding graphic data of multiple graphic entities. A block graphic entity can contain multiple basic graphic entities, such as lines, circles, and arcs. Identifying block graphic entities simplifies the management and processing of graphic data, thereby improving analysis efficiency.
[0042] like Figure 3 As shown, the electronic device 110 can parse the graphic data in a graphic file and extract detailed information for each graphic entity, including coordinates, name, visibility attributes, and layer. In the graphic data, a block graphic entity typically has a unique name to identify it. The electronic device 110 can find all defined blocks by searching the block definition information in the graphic data. Each block definition includes information such as the block's origin, the graphic entities within the block, and their relative coordinates.
[0043] As an example, a single-line diagram of an electrical system can contain multiple block graphic entities, such as blocks representing circuit breakers, transformers, and cables. Each block has a unique name, such as "Circuit Breaker 1," "Transformer 2," etc. Electronic device 110 can extract the name information of all graphic entities from the drawing file, thereby finding all defined blocks, such as "Circuit Breaker 1," "Transformer 2," etc.
[0044] In box 230, electronic device 110 determines one or more first electrical elements in the electrical system that correspond to these block graphic entities and their respective first positions in the electrical system, based on the corresponding data of these identified block graphic entities.
[0045] Electronic device 110 can determine the electrical components represented by these graphic entities based on the graphic entities within the block graphic entities and their attributes. For example, one block graphic entity may contain graphic entities representing circuit breakers, while another block may contain graphic entities representing transformers. The name, type, and attributes of each electrical component can be obtained from the block definition and the labels of the graphic entities.
[0046] Furthermore, the electronic device 110 can calculate the absolute coordinates of the graphic entities within the block in the design based on the insertion point, scale, and rotation angle of the block reference. These absolute coordinates represent the actual positions of the electrical components in the electrical system. By using the calculated absolute coordinates, the electronic device 110 can determine the initial position of each electrical component in the electrical system.
[0047] As an example, electronic device 110 can determine the electrical components represented by these block graphic entities; for example, "Circuit Breaker 1" represents a circuit breaker, and "Transformer 2" represents a transformer. Electronic device 110 can then calculate the absolute coordinates of the graphic entities within the block in the graphic file based on the insertion point, scale, and rotation angle of the block reference. For example, the absolute coordinates of Circuit Breaker 1 might be (100, 200), and the absolute coordinates of Transformer 2 might be (300, 400). Using the calculated absolute coordinates, electronic device 110 can determine the initial position of each electrical component in the electrical system.
[0048] In this way, during the process of identifying electrical components in a graphic file, the electronic device 110 does not need to analyze the geometric features of the electrical components to identify the electrical components and their locations in the graphic file, thereby improving the accuracy and efficiency of electrical component identification.
[0049] The foregoing has described an overview of some implementations according to this disclosure. The following references... Figures 4A to 4C This describes further details regarding the identification of electronic components. It should be understood that reference... Figures 4A to 4C The described example process is to identify electrical components based on the read graphic data, rather than the direct processing of graphic files (e.g., drawings).
[0050] like Figure 4A As shown, the graphic data in the graphic file can indicate multiple graphic entities 410. These multiple graphic entities 410 include not only the corresponding data of one or more block graphic entities 411, but also the corresponding data of other types of graphic entities 412. For example, if a block graphic entity is referred to as a first-type graphic entity, then other types of graphic entities can be referred to as second-type graphic entities 412. A second-type graphic entity may also contain one or more second electrical components, which, due to their special structure or infrequent use, are not stored in the graphic data as block graphic entities 410.
[0051] In order to comprehensively analyze and process these graphic data, electronic device 110 needs to identify not only the block graphic entity 411 and its corresponding electrical components and locations, but also the electrical components and locations corresponding to other graphic entities.
[0052] In some embodiments, the electronic device 110 can acquire graphic data from a graphic file and extract relevant data for all second-class graphic entities 412. The graphic data for each second-class graphic entity may also include coordinates, name, visibility attributes, layers, etc. Based on the extracted data of the second-class graphic entities 412, the electronic device 110 can generate a first image. The first image is used to demonstrate the layout and connection relationships of the second-class graphic entities 412 in the electrical system.
[0053] As an example, each second-class graphic entity can be drawn in the first image based on its coordinates, name, visibility attributes, and layer information. During the drawing process, attributes such as resolution, background color, and border can be set to ensure the clarity and readability of the first image. Next, the electronic device 110 saves the generated image in a common image format, such as PNG or JPEG, for subsequent processing and analysis.
[0054] Next, the electronic device 110 loads a pre-trained entity recognition model 130, such as an entity recognition model 130 based on a real-time object detection algorithm (e.g., YOLO). This model 130 is trained on a large amount of labeled image data and is capable of recognizing and classifying electrical components in images. A generated first image is input into the entity recognition model 130. The model 130 processes the image, extracts features from the first image, and performs classification and localization.
[0055] As an example, entity recognition model 130 can identify one or more second electrical components based on features in the first image. Entity recognition model 130 can not only identify the category of the second electrical components but also determine the position of each second electrical component in the image. The position of the second electrical component is typically represented by a bounding box, including the coordinates of its top-left and bottom-right corners. Electronic device 110 can calculate the actual position of the second electrical component in the electrical system based on the bounding box coordinates.
[0056] As an example, electronic device 110 can draw the layout of circuit breakers, transformers, and connecting lines based on the extracted graphic data of the second type of graphic entities 412. After setting the image resolution and background color, it is saved as a PNG image file. Next, electronic device 110 loads an image recognition model. The generated first image is input into entity recognition model 130. Model 130 processes the first image, extracts features from the image, and performs classification and localization. Then, entity recognition model 130 can identify circuit breakers, transformers, etc., in the image.
[0057] Next, the entity recognition model 130 can determine the position of each second electrical component in the image. For example, the bounding box coordinates of the circuit breaker might be (150, 250) to (200, 300), and the bounding box coordinates of the transformer might be (350, 450) to (400, 500). Based on the bounding box coordinates, the electronic device 110 calculates the actual position of the electrical component in the electrical system. For example, the second position of the circuit breaker in the electrical system is (150, 250), and the second position of the transformer is (350, 450). In this way, the electronic device 110 can provide a comprehensive analysis of the electrical system layout and connections.
[0058] In some embodiments, such as Figure 4A , Figure 4B and Figure 4C As shown, before generating the first image, the electronic device 110 can mark the visibility attributes of the corresponding data of one or more block graphic entities as invisible. Then, based on the remaining visible data in the graphic data, the first image is generated. In this way, the first electrical component corresponding to the block graphic entity will not appear in the first image during its generation. The first image is simpler, facilitating subsequent analysis and processing. Furthermore, when processing the first image, the model 130 does not need to consider those complex block graphic entities, but focuses on identifying and analyzing the second type of graphic entities. Here, not only is the image processing flow simplified, but the accuracy and reliability of image recognition are also ensured.
[0059] In some embodiments, such as Figure 4A As shown, the graphic data also includes text annotation data, used to annotate information such as the name, model, and serial number of electrical components. To improve the efficiency and accuracy of image recognition, the electronic device 110 can mark the visibility attribute of the text annotation data as invisible before generating the first image. For example... Figure 4B and Figure 4C As shown, the text annotation information is hidden. In this way, no text annotation information or block graphic entities are displayed on the first image; only the second electrical component is presented. This avoids interfering with the model's process of recognizing the second electrical component in the image, thereby improving the efficiency and accuracy of the second electrical component recognition.
[0060] In some embodiments, the electronic device 110 can also generate a bill of materials for the electrical system based on the identified electrical components and their locations. For example, a block graphic entity may contain a graphic entity representing a circuit breaker, named "CB-1234," located at (100, 200). For each first electrical component, the electronic device 110 can generate a bill of materials entry based on its first name information and first location information. Furthermore, for each second electrical component, the electronic device 110 can also generate another bill of materials entry based on its second name information and second location information.
[0061] As an example, a material entry may include: Component name: for example, "CB-1234"; Component location: for example, "(100,200)".
[0062] Electronic device 110 integrates the material entries generated based on the first electrical component and the material entries generated based on the second electrical component to form a complete bill of materials (BOM). Here, the BOM includes the name, location, quantity, and other relevant information of all electrical components in the electrical system. Finally, electronic device 110 can export the integrated material entries into a structured file format, such as CSV or Excel, to facilitate subsequent procurement, installation, and maintenance. In this way, information on all electrical components in the electrical system can be recorded comprehensively and accurately.
[0063] In some embodiments, electrical image samples from multiple sources can be collected to train the entity recognition model 130. Each image sample contains not only one or more graphic entities but also annotation information for these entities. The annotation information may include, for example, the name (circuit breaker, relay, switch, etc.), specifications, and location of the electrical components. For instance, in an image sample containing multiple electrical components, each component is labeled with its specific information. Here, detailed annotation information not only helps the model learn how to distinguish target objects from the background but also allows the model to learn to recognize subtle differences between different components, such as relays of the same type but different specifications.
[0064] Next, the entity recognition model is trained using the prepared image samples. As training progresses, even if these components may exhibit different layouts and symbol styles in different graphic files, the model can learn to recognize subtle differences in electrical components within the image. For example, some design institutes may prefer to use specific symbols to represent circuit breakers, while others may use completely different symbols. A well-trained model can identify and correctly classify these different styles of circuit breakers.
[0065] In some embodiments, to further improve the accuracy of the entity recognition model, continuous training and optimization methods can be adopted. For example, after the electronic device 110 generates a first image and identifies one or more second electrical components using the entity recognition model, the region corresponding to each second electrical component in the first image can be saved separately as a second image, thus forming a second image set. The second image set contains a large number of images and labeled data, which can be used to further train and update the entity recognition model. In this way, the model can continuously learn more diverse electrical component features and layout styles, thereby improving its recognition accuracy in practical applications.
[0066] As an example, if a transformer with model number "TR-5678" is identified in the first image, located at (300, 400), the area containing the transformer is cropped and saved as a separate second image. All saved second images are then aggregated to form a second image set. This second image set contains a large amount of labeled data; each second image has explicit labeling information, such as component name and location. The existing entity recognition model is then further trained and updated using this second image set.
[0067] Example devices and equipment
[0068] Figure 5 A block diagram of an apparatus 500 for identifying electrical components according to some implementations of the present disclosure is shown. The apparatus 500 includes: an acquisition module 510 configured to acquire graphic data of a graphic file to be identified, the graphic file indicating the layout of electrical components in an electrical system, and the graphic data including corresponding data for a plurality of graphic entities indicating the layout of electrical components; an identification module 520 configured to identify one or more block graphic entities from the graphic data based on the corresponding data of the plurality of graphic entities; and a determination module 530 configured to determine, based on the corresponding data of the one or more block graphic entities, one or more first electrical components in the electrical system corresponding to the one or more block graphic entities and their respective first positions in the electrical system.
[0069] According to some implementations of this disclosure, the determining module 530 is further configured to: generate a first image based on data in the graphic data other than the corresponding data of one or more block graphic entities; and, based on the first image, determine one or more second electrical components in the electrical system and the corresponding second positions of the one or more second electrical components in the electrical system using an entity recognition model.
[0070] According to some implementations of this disclosure, the graphic data also includes text annotation data, and the determining module 530 is further configured to: mark the visibility attribute of the text annotation data as invisible before generating the first image.
[0071] According to some implementations of this disclosure, the determining module 530 is further configured to: generate a bill of materials for the electrical system based at least on the corresponding first name information and corresponding first location of one or more first electrical components.
[0072] According to some implementations of this disclosure, the determining module 530 is further configured to: mark the visibility attributes of corresponding data of one or more block graphic entities as invisible; and generate a first image based on the remaining visible data in the graphic data.
[0073] According to some implementations of this disclosure, the acquisition module 510 is further configured to: acquire multiple image samples, wherein each of the multiple image samples includes at least one graphic entity and at least one annotation information of the graphic entity; and train an entity recognition model using the multiple image samples.
[0074] According to some implementations of this disclosure, the acquisition module 510 is further configured to: save the region in the first image corresponding to each of the plurality of second electrical elements as a second image to obtain a second image set; and update the entity recognition model using the second image set.
[0075] According to some implementations of this disclosure, the determining module 530 is further configured to: determine a material entry for a first electrical element based on a first name information and a first location information of the first electrical element, for one or more first electrical elements; and generate a bill of materials based at least on the material entries determined for one or more first electrical elements respectively.
[0076] Figure 6 A block diagram is shown of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented. The electronic device 600 may, for example, be used to implement... Figure 1 The electronic device 110 shown. It should be understood that, Figure 6 The electronic device 600 shown is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein.
[0077] like Figure 6 As shown, electronic device 600 is in the form of a general-purpose electronic device. Components of electronic device 600 may include, but are not limited to, one or more processors 610 or processing units, memory 620, storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. The processing unit may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 620. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of electronic device 600.
[0078] Electronic device 600 typically includes multiple computer storage media. Such media can be any available media accessible to electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 620 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 630 can be a removable or non-removable medium and can include machine-readable media, such as flash drives, disks, or any other media that can be used to store information and / or data (e.g., training data for training) and can be accessed within electronic device 600.
[0079] Electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not explicitly stated... Figure 6 As shown, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks can be provided. In these cases, each drive can be connected to a bus (not shown) via one or more data media interfaces. Memory 620 may include computer program product 625 having one or more program modules configured to perform various methods or actions of various embodiments of this disclosure.
[0080] The communication unit 640 enables communication with other electronic devices via a communication medium. Additionally, the functionality of the components of the electronic device 600 can be implemented using a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the electronic device 600 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.
[0081] Input device 650 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 660 can be one or more output devices, such as a monitor, speaker, printer, etc. Electronic device 600 can also communicate with one or more external devices (not shown) via communication unit 640 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device 600, or with any device that enables electronic device 600 to communicate with one or more other electronic devices (e.g., network card, modem, etc.). Such communication can be performed via input / output (I / O) interface (not shown).
[0082] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores one or more computer instructions, wherein one or more computer instructions are executed by a processor to implement the methods described above.
[0083] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0084] 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 apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0085] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0086] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0087] Various implementations of this disclosure have been described above. The foregoing description is exemplary and not exhaustive, nor is it limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the implementations disclosed herein.
Claims
1. A method for identifying electrical components, comprising: Obtain graphic data from a graphic file to be identified, the graphic file being used to indicate the layout of electrical components in an electrical system, and the graphic data including corresponding data for a plurality of graphic entities indicating the layout of the electrical components; Based on the corresponding data of the plurality of graphic entities, one or more block graphic entities are identified from the graphic data; as well as Based on the corresponding data of the one or more block graphic entities, determine one or more first electrical components in the electrical system that correspond to the one or more block graphic entities and the corresponding first positions of the one or more first electrical components in the electrical system.
2. The electrical component identification method according to claim 1 further includes: A first image is generated based on the data in the graphic data, excluding the corresponding data of the one or more block graphic entities; as well as Based on the first image, an entity recognition model is used to determine one or more second electrical components in the electrical system and their corresponding second positions in the electrical system.
3. The electrical component identification method according to claim 2, wherein the graphic data further includes text annotation data, and the method further includes: Before generating the first image, the visibility attribute of the text annotation data is marked as invisible.
4. The electrical component identification method according to claim 1 or 2 further includes: A bill of materials for the electrical system is generated based at least on the corresponding first name information and corresponding first location of the one or more first electrical components.
5. The electrical component identification method according to claim 2, wherein generating the first image includes: Mark the visibility attribute of the corresponding data of the one or more block graphic entities as invisible; as well as The first image is generated based on the remaining visible data in the graphic data.
6. The electrical component identification method according to claim 2 further includes: Acquire multiple image samples, wherein each of the multiple image samples includes at least one graphic entity and the annotation information of the at least one graphic entity; as well as The entity recognition model is trained using the multiple image samples.
7. The electrical component identification method according to claim 6 further includes: The region in the first image corresponding to each of the plurality of second electrical components is saved as a second image to obtain a second image set; The entity recognition model is updated using the second image set.
8. The electrical component identification method according to claim 4, wherein generating the bill of materials for the electrical system comprises: For a first electrical component among the one or more first electrical components, a material entry for the first electrical component is determined based on the first name information and the first location information of the first electrical component; as well as The bill of materials is generated based on at least the material entries determined for the one or more first electrical components.
9. An electrical component identification device, comprising: The acquisition module is configured to acquire graphic data of a graphic file to be identified, the graphic file being used to indicate the layout of electrical components in an electrical system, and the graphic data including corresponding data of a plurality of graphic entities for indicating the layout of the electrical components; The identification module is configured to identify one or more block graphic entities from the graphic data based on the corresponding data of the plurality of graphic entities; as well as The determination module is configured to determine, based on corresponding data of the one or more block graphic entities, one or more first electrical elements corresponding to the one or more block graphic entities in the electrical system and the corresponding first positions of the one or more first electrical elements in the electrical system.
10. An electronic device, comprising: At least one processing unit; as well as At least one memory, coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, which, when executed by the at least one processing unit, cause the electronic device to perform the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, the computer program causing the processor to implement the method according to any one of claims 1 to 8 when executed by a processor.
12. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 8.