Power distribution network drawing identification method based on Vision Transform architecture

By adopting a method based on the Vision Transformer architecture, the problems of low accuracy and low automation in the recognition of power distribution network design drawings are solved, achieving efficient and accurate drawing recognition and structured data generation, thereby improving the automation level of power distribution network design.

CN121617124APending Publication Date: 2026-03-06常州常供电力设计院有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511797758.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing technologies for identifying power distribution network design drawings suffer from problems such as low accuracy, low automation, reliance on manual intervention, difficulty in understanding logical relationships, and lack of standard verification, resulting in low design efficiency and a high risk of errors.

Method used

By adopting a Vision Transformer-based approach, which combines prior knowledge from the power distribution network field with data preprocessing, image segmentation and embedding vectorization, multi-head self-attention modules and MLP regression task heads, we can achieve automated, high-precision recognition of drawings and structured data output.

Benefits of technology

It improves the accuracy of power distribution network design drawings, reduces misjudgments and omissions, and realizes an end-to-end automated process from drawings to structured data, significantly improving design efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121617124A_ABST
    Figure CN121617124A_ABST
Patent Text Reader

Abstract

The invention discloses a power distribution network drawing identification method based on a Vision Transform architecture. The method comprises the following steps: S1, carrying out data preprocessing and enhancement operation based on a power distribution network design drawing; s2, deep global features of the power distribution network design drawing are extracted through a ViT model; s3, performing classification detection on the deep global features output by the ViT model by using an MLP regression task head, and outputting a power distribution network design drawing recognition result; and S4, performing optimization in combination with priori knowledge in the field of the power distribution network. According to the power distribution network drawing recognition method based on the Vision Transform architecture, automatic and high-precision recognition of the drawing is achieved, structured data are output, and the digital design efficiency of the power distribution network is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for identifying power distribution network drawings based on the Vision Transformer architecture, belonging to the field of power engineering software technology. Background Technology

[0002] Currently, the application of AI technology in power distribution network design has become a key research focus abroad, covering all aspects from automatically identifying general layout plans to automatically generating power distribution network design schemes. Through deep learning and computer vision technologies, AI systems can accurately extract key elements from two-dimensional architectural drawings and generate high-precision three-dimensional models. This automated process significantly reduces the workload of designers and improves efficiency and accuracy.

[0003] Vision Transformer (ViT), an advanced computer vision tool, is a model proposed by the Google team that applies the Transformer to image classification. Due to its excellent performance and strong scalability, it supports applications in other Computer Vision (CV) fields. ViT's core research achievement is that, with sufficient pre-training data, ViT outperforms CNNs, overcoming the limitation of the Transformer's lack of inductive bias and achieving better transfer learning in downstream tasks.

[0004] The characteristics that distinguish distribution network design drawings from other CAD drawings are: numerous components, complex relationships, and special combination relationships between components. The current technology's pain point in identifying distribution network design drawings lies in: 1. Traditional CV (computer vision) methods (such as CNN convolutional neural networks) are poorly adapted to the characteristics of power distribution network drawings, which have many elements, complex spatial relationships, and flexible component combination logic, resulting in limited recognition accuracy.

[0005] 2. The existing identification process modules are fragmented, with preprocessing, identification, and post-processing stages being disconnected, resulting in low automation and excessive reliance on manual intervention. 3. Complex design elements: Drawings contain numerous specialized graphic elements (such as ring main units, pole-mounted switches, and cable branch boxes), line types (conductors, cables), and text annotations (equipment models, line parameters), making it difficult for traditional CV methods to identify them completely and accurately.

[0006] 4. Logical relationships depend on context: The electrical connection relationships, power supply radius, and parent-child relationships (such as switch-fuse) between devices depend not only on the primitives themselves, but also on their topological layout and relative positions. The local receptive field of CNN is difficult to understand globally.

[0007] 5. Low level of automation: Currently, from drawings to the generation of bills of materials (BOM), calculation sheets, operation tickets and other downstream applications, it heavily relies on designers to interpret them manually. The process is fragmented, inefficient and prone to errors.

[0008] 6. Lack of compliance verification: Traditional methods cannot automatically verify whether drawings comply with standards such as the "Distribution Network Planning and Design Code" (e.g., power supply radius, conductor cross-section selection, switch configuration, etc.). Summary of the Invention

[0009] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide a distribution network drawing recognition method based on the VisionTransformer architecture, so as to realize the automated and high-precision recognition of drawings, output structured data, and improve the efficiency of digital design of distribution networks.

[0010] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: A method for power distribution network drawing recognition based on the Vision Transformer architecture includes the following steps: Step S1: Perform data preprocessing and enhancement operations based on the power distribution network design drawings; Step S2: Extract deep global features from the power distribution network design drawings using the ViT model; Step S3: Use the MLP regression task head to classify and detect the deep global features output by the ViT model, and output the recognition results of the power distribution network design drawings. Step S4: Optimize by combining prior knowledge in the field of power distribution networks.

[0011] Furthermore, in step S1, data preprocessing and enhancement operations are performed based on the power distribution network design drawings, specifically including the following steps: Step S11: Construct a dedicated symbol library for distribution networks that covers typical distribution network design drawings as a labeling benchmark; Step S12: Collect power distribution network design drawings, export the power distribution network design drawings as image format using the ezdxf processing library, then annotate the image format power distribution network design drawings, and use the image format power distribution network design drawings as training dataset after annotation. Step S13: Use data augmentation strategies to augment the training dataset.

[0012] Furthermore, in step S11, constructing a distribution network-specific symbol library covering typical distribution network design drawings as a labeling benchmark specifically includes the following steps: A distribution network-specific symbol library is constructed that covers typical distribution network design drawings of the State Grid Corporation of China. The distribution network-specific symbol library defines the object categories, standard diagrams, and corresponding structured label information that need to be recognized by the model, serving as the benchmark for data annotation.

[0013] Furthermore, the power distribution network design drawings include primary wiring diagrams, line routing diagrams, power distribution room layout diagrams, and switch station layout diagrams; The original formats of the power distribution network design drawings include DWG and PDF formats, and the image formats include PNG and JPEG formats.

[0014] Furthermore, in step S2, the deep global features of the power distribution network design drawings are extracted using the ViT model, specifically including the following steps: Step S21: Perform image segmentation and embedding vectorization operations on each data-enhanced power distribution network design drawing image; Step S22: Add positional encoding to the embedding vector of each image patch; Step S23: Process the core architecture of the ViT model.

[0015] Furthermore, in step S21, image segmentation and embedding vectorization operations are performed on each data-enhanced power distribution network design drawing image, specifically including the following steps: Let the dimensions of the power distribution network design drawing image be H×W×C, where H is the height, W is the width, and C is the depth dimension; let the dimensions of the image block be P×P×C. The power distribution network design drawing image is divided into N non-overlapping image blocks of size P×P×C, where N = (H*W) / (P*P); Finally, the segmented image patches are linearly mapped into an embedding vector sequence, which includes the following steps: Each image patch of size P×P×C is flattened into a vector of length P*P*C, and all vectors are arranged in spatial order to form a sequence; For each vector of length P*P*C, a linear mapping is performed, and the formula for calculating the linear mapping is as follows: y = xW + b; Where x is the input vector with shape (1, P*P*C); W is the projection weight matrix with shape (P*P*C, D); b is a bias term with shape (1, D); y is the output embedding vector with shape (1, D); D is the dimension of the image patch vector embedding; Finally, we obtain an image patch embedding vector sequence with shape [N, D], where N is the sequence length and the sequence length equals the number of image patches.

[0016] Furthermore, in step S22, positional encoding is added to the embedding vector of each image patch, specifically including the following steps: Input image patch embedding vector sequence; Create a position encoding matrix of shape [N, D], where the vector in the i-th row of the position encoding matrix is ​​used to represent the position information of the i-th position in the image patch embedding vector sequence; The position encoding matrix is ​​added element by element to the image patch embedding vector sequence to obtain a vector with position information.

[0017] Furthermore, in step S23, the core architecture of the ViT model is processed, which specifically includes the following steps: The vector containing location information is input into the ViT model core architecture, which then performs the calculations cyclically according to the following process: First, perform layer normalization on the vector containing positional information; The multi-head self-attention module captures the correlation features between image patches; Perform layer normalization again; Input to a feedforward neural network for feature transformation and abstraction; The final output is the deep global features extracted from the power distribution network design drawings.

[0018] Furthermore, in step S3, the deep global features output by the ViT model are classified and detected using the MLP regression task head, and the recognition result of the power distribution network design drawings is output. This specifically includes the following steps: Input the deep global features of the distribution network design drawings from the ViT model; The first fully connected layer of the MLP regression task head is: 768-dimensional input and 2048-dimensional output (GELU activation). The second fully connected layer of the MLP regression task head is: 2048-dimensional input and K-dimensional output, where K is the number of element categories in the power distribution network design drawings; The Softmax function is used to convert the output into probability distributions for each category; Identify the category of each individual element in the power distribution network design drawings and output the category label and confidence level.

[0019] Furthermore, in step S4, optimization is performed by incorporating prior knowledge from the power distribution network field, specifically including the following steps: Based on the identified element locations and connecting lines, an automatic power grid topology diagram with node-edge relationships is generated; A list of equipment is generated to create structured power distribution network design drawings. The equipment list includes equipment ID, type, model, and drawing coordinates.

[0020] By employing the above technical solution, this invention improves the accuracy of identifying complex elements and their spatial relationships in power distribution network design drawings by utilizing the ViT model. It integrates the entire process from data preprocessing to result output, creating a highly automated drawing recognition method with low human intervention, automatically reconstructing the electrical connection topology behind the drawings. It effectively understands the complex combinations and spatial logic of elements in the drawings, significantly improving recognition accuracy and reducing false positives and false negatives. It achieves end-to-end automation from drawing input to structured data output, greatly reducing manual intervention and improving efficiency. Attached Figure Description

[0021] Figure 1 This is a flowchart of the power distribution network drawing recognition method based on the Vision Transformer architecture of the present invention; Figure 2 This is a diagram illustrating the execution process of the power distribution network drawing recognition method based on the Vision Transformer architecture of the present invention. Detailed Implementation

[0022] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.

[0023] like Figure 1 , 2 As shown in the figure, this embodiment provides a method for power distribution network drawing recognition based on the Vision Transformer architecture, which includes the following steps: Step S1: Perform data preprocessing and enhancement operations based on the power distribution network design drawings. Specifically: Step S11: Construct a dedicated symbol library for distribution networks that covers typical distribution network design drawings as a labeling benchmark.

[0024] First, a dedicated symbol library for distribution networks needs to be constructed, covering typical distribution network design drawings of the State Grid Corporation of China. This symbol library defines the object categories, standard diagrams, and corresponding structured label information that need to be recognized by the model, serving as the benchmark for data annotation. Table 1 lists some core symbols and their annotation benchmarks: Table 1 Step S12: Collect power distribution network design drawings, export the power distribution network design drawings into high-resolution image format using the ezdxf processing library, then annotate the image format power distribution network design drawings, and use the annotated image format power distribution network design drawings as training dataset.

[0025] Distribution network design drawings include primary wiring diagrams, line routing diagrams, distribution room layout diagrams, and switch station layout diagrams; the original formats of distribution network design drawings include DWG and PDF formats, which are usually the original digital engineering files or scanned copies of the drawings; image formats include PNG and JPEG formats.

[0026] Step S13: Use data augmentation strategies to augment the training dataset to improve the robustness of the model.

[0027] Rotate the power distribution network design drawings by a small margin of ±5° to avoid distortion of the topology. Then scale them up by 0.8 to 1.2 times.

[0028] The lines in the power distribution network design drawings are randomly blurred with fine granularity to simulate the blurring effect of printing. Slight noise is also superimposed to simulate scanning noise, which can improve the robustness of the subsequent ViT model to "imperfect drawings".

[0029] The image brightness of the power distribution network design drawings is fine-tuned by ±10%, and the contrast is adjusted by ±15% to adapt to color difference scenarios when printed by different devices.

[0030] Step S2: Extract deep global features from the distribution network design drawings using the ViT model. Specifically: Step S21: Perform image segmentation and embedding vectorization operations on each data-enhanced power distribution network design drawing image.

[0031] Let the dimensions of the power distribution network design drawing image be H×W×C, where H is the height, W is the width, and C is the depth dimension; let the dimensions of the image block be P×P×C.

[0032] The power distribution network design drawing image is divided into N non-overlapping image blocks of size P×P×C, where N = (H*W) / (P*P).

[0033] Finally, the segmented image patches are linearly mapped into an embedding vector sequence, which includes the following steps: Each image patch of size P×P×C is flattened into a vector of length P*P*C. All vectors are arranged in spatial order, from left to right and then from top to bottom, forming a sequence. Then, each high-dimensional, original pixel vector is mapped to a lower-dimensional embedding space that is more semantically representative.

[0034] For each vector of length P*P*C, perform a linear mapping. The formula for calculating the linear mapping is as follows: y = xW + b; Where x is the input vector with shape (1, P*P*C); W is the projection weight matrix with shape (P*P*C, D); b is a bias term with shape (1, D); y is the output embedding vector with shape (1, D); D represents the dimension of the image patch vector embedding.

[0035] Finally, we obtain an image patch embedding vector sequence with shape [N, D], where N is the sequence length and the sequence length equals the number of image patches.

[0036] Step S22: Add positional encoding to the embedding vector of each image block to preserve the spatial structure of the image. The spatial structure of the image refers to the two-dimensional geometric layout and topological relationship between various power distribution network component elements in the drawing, allowing the ViT model to perceive the spatial positional relationship of image blocks in the original design drawing. Positional information refers to the absolute or relative coordinates of each image block in the original two-dimensional design drawing. This includes the row and column number of each image block in the original image grid, as well as the spatial adjacency and directional relationships between blocks.

[0037] Input image patch embedding vector sequence; Create a position encoding matrix of shape [N, D], with the parameter matrix having the exact same shape as the image patch embedding vector sequence. The vector in the i-th row of the position encoding matrix is ​​used to represent the unique position information of the i-th position in the image patch embedding vector sequence (corresponding to a fixed-position image patch in the original design drawing).

[0038] The position encoding matrix is ​​added element by element to the image patch embedding vector sequence to obtain a vector with position information. That is, the vector that is finally input into the core architecture of the ViT model is the image patch embedding vector plus the encoding vector at the corresponding position.

[0039] Step S23: Process the core architecture of the ViT model.

[0040] The vector containing location information is input into the ViT model core architecture, which then performs the calculations cyclically according to the following process: First, perform layer normalization (LN) on the vector containing positional information; The multi-head self-attention (MSA) module captures the correlation features between image patches; Perform layer normalization (LN) again; Input to a feedforward neural network (MLP) for feature transformation and abstraction; The final output is the deep global features extracted from the power distribution network design drawings.

[0041] Step S3: Utilize the MLP regression task head to classify and detect the deep global features output by the ViT model, and output the recognition results of the power distribution network design drawings, such as identifying equipment, lines, and other elements in the drawings, including transformers, cable lines, and switches. Specifically: Input the deep global features of the distribution network design drawings from the ViT model; The first fully connected layer of the MLP regression task head is: 768-dimensional input and 2048-dimensional output (GELU activation). The second fully connected layer of the MLP regression task head is: 2048-dimensional input and K-dimensional output, where K is the number of element categories in the power distribution network design drawings, and the core elements include categories such as transformers, switches, and lines; The Softmax function is used to convert the output into probability distributions for each category; Identify the category of each independent element in the power distribution network design drawings. For example, if the area is a 10kV transformer and the transformer's output terminal is connected to two cables, output the category label and confidence level.

[0042] Step S4: Optimize using prior knowledge from the power distribution network field to generate structured data that can be used by downstream systems. Specifically: Based on the identified element locations and connecting lines, a power grid topology diagram with node-edge relationships is automatically generated.

[0043] Generate a list of equipment for structured power distribution network design drawings. The equipment list includes equipment ID, type, model, and drawing coordinates.

[0044] The specific embodiments described above further illustrate the technical problems, technical solutions, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A power distribution network drawing recognition method based on a Vision Transformer architecture, characterized in that, It comprises the following steps: Step S1, data preprocessing and enhancement operation based on power distribution network design drawings; Step S2, extracting deep global features of power distribution network design drawings through ViT model; Step S3, using MLP regression task head to classify and detect deep global features output by ViT model, and output power distribution network design drawing recognition result; Step S4, combining prior knowledge in the field of power distribution network for optimization.

2. The power grid drawing recognition method based on the Vision Transformer architecture according to claim 1, characterized in that, In step S1, data preprocessing and enhancement operation based on power distribution network design drawings, specifically comprising the following steps: Step S11, constructing a power distribution network special symbol library covering typical power distribution network design drawings as a labeling benchmark; Step S12, collecting power distribution network design drawings, exporting the power distribution network design drawings to picture format through ezdxf processing library, then labeling the picture format power distribution network design drawings, and taking the picture format power distribution network design drawings as training data set after labeling; Step S13, using data enhancement strategy to enhance the training data set.

3. The power grid drawing recognition method based on the Vision Transformer architecture according to claim 2, characterized in that, In step S11, constructing a power distribution network special symbol library covering typical power distribution network design drawings as a labeling benchmark, specifically comprising the following steps: A power distribution network special symbol library covering typical power distribution network design drawings of State Grid is constructed, which defines the object categories, standard illustrations and corresponding structured label information that need to be recognized by the model, serving as a benchmark for data labeling.

4. The power distribution network drawing recognition method based on Vision Transformer architecture according to claim 2, characterized in that: The power distribution network design drawings include primary wiring diagrams, line route diagrams, power distribution room layout diagrams and switch station layout diagrams; The original format of the power distribution network design drawings includes DWG format and PDF format, and the picture format includes PNG format and JPEG format.

5. The power grid drawing recognition method based on the Vision Transformer architecture according to claim 1, characterized in that, In step S2, extracting deep global features of power distribution network design drawings through ViT model, specifically comprising the following steps: Step S21, image blocking and embedding vectorization operation is performed on each power distribution network design drawing picture after data enhancement; Step S22, position coding is added to the embedding vector of each image block; Step S23, ViT model core architecture processing is performed.

6. The power grid drawing recognition method based on the Vision Transformer architecture according to claim 5, characterized in that, In step S21, image blocking and embedding vectorization operation is performed on each power distribution network design drawing picture after data enhancement, specifically comprising the following steps: Let the size of the power distribution network design drawing picture be HxWxC, where H is the height, W is the width, and C is the depth dimension; Set the size of the image block to PXPxC; The power distribution network design drawing picture is divided into N non-overlapping image blocks with size PXPxC, where N = (H*W) / (P*P) ; Finally, the segmented image blocks are linearly mapped to an embedding vector sequence, specifically comprising the following steps: Each image block with size PXPxC is flattened into a vector with length P*P*C, and all vectors are arranged in spatial order to form a sequence; Each vector with length P*P*C is linearly mapped, and the calculation formula of the linear mapping is as follows: y = xW + b; where x is the input vector, shape (1, P*P*C); W is the projection weight matrix, shape (P*P*C, D); b is the bias term, shape (1, D); y is the output embedding vector, shape (1, D); D is the dimension of the image block vector embedding; Finally, the image block embedding vector sequence with shape [N, D] is obtained, where N is the sequence length, and the sequence length = the number of image blocks.

7. The power grid drawing recognition method based on the Vision Transformer architecture according to claim 5, characterized in that, In step S22, a position encoding is added to each image block embedding vector, which includes the following steps: Input the image block embedding vector sequence; Create a position encoding matrix with shape [N, D], where the i-th row vector in the position encoding matrix represents the position information of the i-th position in the image block embedding vector sequence; Add the position encoding matrix and the image block embedding vector sequence element by element to obtain a vector with position information.

8. The power grid drawing recognition method based on the Vision Transformer architecture according to claim 5, characterized in that, In step S23, the ViT model core architecture processing is performed, which includes the following steps: Input the vector with position information into the ViT model core architecture, and the ViT model core architecture internally calculates according to the following process: First, do layer normalization on the vector with position information; Pass through the multi-head self-attention module to capture the correlation features between image blocks; Again, do layer normalization; Input the feedforward neural network to transform and abstract the features; Finally, output the extracted deep global features of the power distribution network design drawing.

9. The power grid drawing recognition method based on the Vision Transformer architecture according to claim 1, characterized in that, In step S3, the MLP regression task head is used to classify and detect the deep global features output by the ViT model, and the power distribution network design drawing recognition result is output, which includes the following steps: Input the deep global features of the power distribution network design drawing of the ViT model; The first layer of the MLP regression task head is full connection: input 768 dimensions, output 2048 dimensions (GELU activation); The second layer of the MLP regression task head is full connection: input 2048 dimensions, output K dimensions, K is the number of element categories in the power distribution network design drawing; Use the Softmax function to convert the output into a probability distribution of each category; Identify the category of each independent element in the power distribution network design drawing and output the category label and confidence.

10. The power grid drawing recognition method based on the Vision Transformer architecture according to claim 1, characterized in that, In step S4, the prior knowledge in the power distribution network field is combined for optimization, which includes the following steps: According to the identified graph element position and connection line, automatically generate the power grid topology graph of node-edge relationship; Generate a structured device list of the power distribution network design drawing, which includes device ID, type, model, and drawing coordinates.