Automatic power architecture generation method based on machine vision

By using machine vision technology and an improved SETR model, the automatic generation and updating of power architecture diagrams have been achieved, solving the accuracy and efficiency problems caused by manual drawing in existing technologies and improving the level of intelligence in power system management.

CN121708373AInactive Publication Date: 2026-03-20HENAN DEEPIN INTELLIGENT CONTROL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511899066.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-16
Publication Date
2026-03-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The generation and updating of existing power architecture diagrams are highly dependent on manual labor, resulting in a large workload, long cycle, susceptibility to the influence of operators' experience, omissions in equipment identification, and errors in the labeling of connection relationships, making it difficult to guarantee the accuracy and standardization of power architecture diagrams.

Method used

A machine vision-based approach is adopted to automatically generate power architecture diagrams from power field images through power field image acquisition and preprocessing, power equipment target detection, improved SETR model, and structured topology feature data. This includes power equipment identification, topology extraction, and graph generation.

Benefits of technology

It significantly improves the automation and reliability of power architecture generation, reduces human intervention and error rate, shortens the generation and update cycle, and enhances the real-time performance and accuracy of power system planning and operation and maintenance management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121708373A_ABST
    Figure CN121708373A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power architecture automatic generation method based on machine vision. The method comprises the following steps: collecting and preprocessing an electric power field image; executing power equipment target detection to obtain a power equipment candidate set; pixel-level contours of the candidate power equipment are obtained by using the improved SETR model, and a target power equipment set is obtained; topological feature extraction is executed to form structured topological feature data; generating a power equipment connection relation matrix; constructing a power architecture topology model; generating a power architecture diagram; the electric power architecture diagram is output in the image file format and the engineering design file format, automatic generation from the electric power field image to the electric power architecture diagram is achieved, and the electric power equipment recognition precision and the accuracy and efficiency of electric power architecture topology modeling are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of power system automation, and in particular to a power architecture automatic generation method based on machine vision. BACKGROUND

[0002] As an important infrastructure of national economy, the wiring form, topology structure and operation mode of the primary equipment of the power system are usually expressed and managed through the power architecture diagram. In existing engineering practice, there are mainly two ways to obtain the power architecture diagram: one is that the electrical design personnel manually draws the power architecture diagram in the computer-aided design software based on the design parameters in the design stage; the other is that the operation and maintenance personnel manually updates or redraws the power architecture diagram through professional software after sorting out the actual wiring conditions of the power equipment according to the field investigation results or field photos and video materials in the operation and maintenance stage. The above-mentioned methods have obvious limitations when the power system is large in scale, the equipment types are various or the field is frequently transformed.

[0003] In the prior art, the generation and updating of the power architecture diagram highly depend on manual work. The operation and maintenance personnel usually need to collect a large number of power field images, identify the transformers, circuit breakers, disconnectors, busbars and conductors and other equipment through naked eyes, judge the connection relationship between the equipment according to experience, and finally manually draw the corresponding graphic symbols and lines in the CAD or special power design software. This method is time-consuming and labor-intensive, and is easily affected by subjective factors such as the experience level and attention state of the operator, resulting in problems such as missing equipment identification, incorrect connection relationship labeling and inconsistent drawing styles of different personnel, which makes it difficult to ensure the accuracy and standardization of the power architecture diagram. SUMMARY

[0004] One object of the present application is to provide a power architecture automatic generation method based on machine vision. The present application makes full use of the technologies of power field image collection and preprocessing, power equipment target detection, improved SETR model and the like, realizes the automatic generation process from power field images to power architecture topology model and then to power architecture diagram, and has the advantages of high power equipment identification accuracy, high automation degree of topology relationship extraction, high efficiency of architecture diagram generation, and significant reduction of manual participation and error rate.

[0005] According to the power architecture automatic generation method based on machine vision provided by the embodiment of the present application, the method comprises the following steps: collecting power field images and preprocessing; performing power equipment target detection on the preprocessed power field images to obtain a power equipment candidate set; The candidate regions of candidate power devices in the candidate power device candidate set are cropped and scaled, and the pixel-level contours of the candidate power devices are obtained using the improved SETR model. The categories of the candidate power devices are then identified to obtain the target power device set. Perform topological feature extraction on each target power device in the target power device set to form structured topological feature data; Based on structured topological feature data, the conductor connection relationships between power equipment are identified, a set of conductor connection records is obtained, and a power equipment connection relationship matrix is ​​generated. Construct a power architecture topology model based on the power equipment connection relationship matrix; Based on the set of nodes and branches in the power architecture topology model, the nodes are arranged hierarchically and mapped with graphical symbols to generate a power architecture diagram. The power architecture diagram is output in both image file format and engineering design file format, and then stored in the architecture diagram database.

[0006] Optionally, the power field images include visible light images of transmission towers, poles, conductors, transformers, circuit breakers, disconnect switches, busbars, and distribution cabinets. The preprocessing includes grayscale processing, noise reduction processing, distortion correction, perspective correction, and scale normalization processing.

[0007] Optionally, obtaining the candidate set of power equipment specifically includes: Candidate target regions are generated from the preprocessed power field images using preset anchor frames. Each candidate target region is used as a bounding rectangle as a candidate box. Feature analysis is performed on the image region corresponding to each candidate box, and the probability of each candidate box belonging to different power equipment categories is calculated to form category probability information. The calculation process involves extracting features that distinguish categories from the image region corresponding to each candidate box, comparing the features with preset features of each power equipment category, generating a score for each category based on the comparison similarity, and normalizing the scores of the same candidate box in each category. Based on the category probability information, an initial confidence score is obtained for each candidate box. The process of obtaining the score involves taking the maximum category probability of the candidate box among all power equipment categories as the initial confidence score of the candidate box. Candidate boxes are initially screened based on a preset confidence threshold. When the initial confidence score of a candidate box is greater than the confidence threshold, the candidate box is retained as a valid candidate box. When the initial confidence score of a candidate box is less than the confidence threshold, the candidate box is removed. Non-maximum suppression is performed on the valid candidate boxes. The intersection-union ratio (IUR) of the valid candidate boxes in the overlapping region is calculated. The IUR refers to the degree of overlap between two candidate boxes. When the IUR of the valid candidate boxes is greater than the preset IUR threshold, the valid candidate boxes are sorted from largest to smallest according to the initial confidence score. The valid candidate box with the first initial confidence score is retained, and the remaining valid candidate boxes are marked as candidate boxes to be removed. After the IUR calculation and removal marking of all valid candidate boxes are completed, all valid candidate boxes marked as candidate boxes to be removed are deleted to obtain the candidate box set. The position information of the candidate boxes in the candidate box set, the corresponding initial confidence scores, and the corresponding category probability information are used as the detection results of the candidate power equipment to form a power equipment candidate set.

[0008] Optionally, obtaining the target set of power equipment specifically includes: The candidate regions corresponding to each candidate power device in the candidate power device candidate set are cropped and scaled to form an image matrix. The image matrix is ​​then input into an improved SETR model. The improved SETR model includes a power device multi-scale feature encoding module, a global context modeling module, and a boundary refinement and power category sensitive decoding module. The power device multi-scale feature encoding module extracts features according to a preset multi-scale patch partitioning rule and multi-layer encoding operator to obtain multi-scale encoded features. The global context modeling module performs global context modeling and feature transformation on each multi-scale encoded feature to obtain a global context feature representation. The boundary refinement and power category sensitive decoding module introduces a contour-aware reconstruction mechanism to perform spatial dimension reconstruction and boundary enhancement processing on each global context feature representation to generate a pixel-level prediction map. In the multi-scale feature coding module for power equipment, the image matrix is ​​subjected to feature extraction according to the preset multi-scale patch partitioning rules and multi-layer coding operators to obtain multi-scale coded features. In the global context modeling module, global context modeling and feature transformation are performed on each multi-scale encoded feature to obtain the global context feature representation corresponding to each candidate power device; In the boundary refinement and power category sensitive decoding module, a contour-aware reconstruction mechanism is introduced to perform spatial dimension reconstruction and boundary enhancement processing on each global context feature representation, adjusting the spatial resolution of the global context feature representation to the same spatial size as the corresponding input image matrix, and generating a pixel-level prediction map. The category of each pixel position in the pixel-level prediction map is determined. For each pixel position in the same pixel-level prediction map, the power equipment category with the highest prediction probability is selected from the corresponding power equipment category prediction results as the equipment category label of the pixel position. The pixel-level outline of the corresponding power equipment is obtained according to the continuous spatial distribution of pixels of the same power equipment category. The device category labels of all pixels in each candidate region are statistically analyzed. For each power equipment category, the ratio between the number of pixels corresponding to the category and the total number of pixels in the candidate region is calculated. The ratio is used as the category probability of the candidate power equipment belonging to the power equipment category. The category probability vector of the candidate power equipment is constructed based on the category probability. The categories of candidate power devices are identified based on the category probability vectors corresponding to each candidate power device. The category of the power device with the largest category probability in the category probability vector is taken as the identification category of the candidate power device. Candidate power devices with pixel-level contour information and whose identification category belongs to the preset power device category set are taken as target power devices, forming a target power device set.

[0009] Optionally, the formation of the structured topological feature data specifically includes: Aggregate foreground pixels of target power equipment in the target power equipment set to form a pixel set of target power equipment; For the pixel set of the target power equipment, the geometric center coordinates of the target power equipment are calculated based on the coordinates of all pixels in the pixel set, and the width and height of the bounding rectangle are obtained based on the maximum and minimum values ​​of the horizontal coordinates and the maximum and minimum values ​​of the vertical coordinates of the pixels. Extract a set of candidate pixels for terminals within the boundary region of the pixel set of each target power device. Average the coordinates of all pixels in each candidate pixel set to obtain the terminal coordinates. Use the terminal coordinates as the terminal position information of the target power device. For each target power device, extract the conductor skeleton points from the pixel set of the conductors adjacent to the target power device. Based on the spatial distribution of the conductor skeleton points, obtain the starting skeleton points and ending skeleton points of each conductor segment associated with the target power device. Use the direction information from each starting skeleton point to each ending skeleton point as the direction information of the conductor segment. Calculate the Euclidean distance between the coordinates of each terminal of each target power device and the conductor skeleton point associated with the target power device. Select the skeleton point with the smallest Euclidean distance from the corresponding conductor skeleton points to obtain the coordinates of the conductor connection point. The geometric center coordinates, the width and height of the circumscribed rectangle, the terminal position information, the conductor routing information, and the conductor connection point coordinates of each target power device are combined to form the topological feature vector of the target power device. The topological feature vectors are then aggregated to form structured topological feature data.

[0010] Optionally, the generation of the power equipment connection relationship matrix specifically includes: Based on structured topological feature data, each target power device in the target power device set is numbered, and each terminal of each target power device is associated with the corresponding conductor connection point and the conductor segment identifier, forming a terminal connection identifier table indexed by device number, terminal number and conductor segment identifier; The terminal connection identification table is traversed one by one. For the same wire segment identification, all corresponding terminal connection records are retrieved, and the target power equipment number is extracted from each terminal connection record to form a target power equipment number list. When the list of target power equipment numbers contains two or more target power equipment numbers, the target power equipment numbers are paired up, and a wire connection record is established for the target power equipment connected by a wire segment. The wire connection records are archived and summarized according to the wire segment identifier to obtain a set of wire connection records between target power equipment. Based on the set of conductor connection records, a power equipment connection relationship matrix is ​​generated. The generation process involves pairing each target power equipment in the target power equipment set according to its number. For each pair of equipment, the set of conductor connection records is searched to see if there is a conductor connection record for that pair. If a conductor connection record exists, the matrix element at the corresponding position of the pair in the power equipment connection relationship matrix is ​​assigned a flag value indicating the existence of a conductor connection relationship. If no conductor connection record exists, the element in the device connection relationship matrix is ​​assigned a flag value indicating the absence of a conductor connection relationship.

[0011] Optionally, the construction of the power architecture topology model specifically includes: Each target power device is treated as a power system node, and node numbers are sequentially established according to the order of the target power devices in the power device connection matrix to form a node set; Based on the values ​​of each element in the power equipment connection matrix, it is determined whether there is a wire connection relationship between two target power equipment. Two target power equipment with a value indicating a wire connection relationship in the power equipment connection matrix are connected as a wire branch, and each wire branch is assigned a branch number to form a branch set. The node set and the branch set are aggregated to form a node-branch association matrix; The connectivity and loop characteristics of the power architecture are analyzed based on the node-branch association matrix. Each connected subnetwork is identified in the node-branch association matrix. For each connected subnetwork, the number of nodes and branches contained in the connected subnetwork are counted. The number of independent loops in the connected subnetwork is obtained based on the quantitative relationship between the number of branches and the number of nodes. The power architecture topology model is formed by combining the set of nodes, the set of branches, the power equipment connection matrix, the node-branch association matrix, and the number of independent loops.

[0012] Optionally, the generation of the power architecture diagram specifically includes: Based on the voltage level, wiring form, and hierarchical relationship of nodes in the power architecture topology model, the nodes in the node set are hierarchically divided, and planar coordinates are assigned to each node according to the preset arrangement rules to form a node layout coordinate set. Based on the category of power equipment corresponding to each node, a standardized graphic symbol corresponding to the power equipment category is selected from a preset power equipment graphic symbol library. A mapping relationship is established between each node and its corresponding standardized graphic symbol to form a node-graphic symbol correspondence relationship. The branch set is traversed. For each branch connecting two nodes, the connection path of the branch in the power architecture diagram is obtained according to the planar coordinates of the nodes at both ends of the branch in the node layout coordinate set and the preset connection generation rules. The geometric path data of the branch connection is generated. On the preset drawing plane, based on the node layout coordinate set, the correspondence between nodes and graphic symbols, and the geometric path data of branch connections, the standardized graphic symbols of each node are drawn and the branch connections are drawn and preset layout constraints are applied to obtain the power architecture diagram.

[0013] Optionally, the output process involves converting the power architecture diagram into image file format and engineering design file format according to preset export rules, naming and versioning the converted power architecture diagram files, and outputting the image files and engineering design files to a specified storage path.

[0014] The beneficial effects of this invention are: This invention constructs a complete automatic generation link from power field images to power architecture diagrams by introducing power equipment target detection, improving the pixel-level segmentation and category recognition of the SETR model, and identifying conductor connection relationships based on structured topological feature data. Compared with existing methods that rely on manual drawing and manual topology analysis, this significantly improves the automation and reliability of power architecture generation. By performing power equipment target detection on the preprocessed power field images, the tedious process of manually marking the location of each device is avoided. The improved SETR model is used to perform pixel-level segmentation and category recognition on candidate device regions, obtaining detailed device outlines and category information, which provides an accurate visual basis for subsequent terminal location extraction, conductor routing analysis, and connection point localization. On this basis, topological features of the target power equipment are extracted to form structured topological feature data, and then combined with conductor pixel connectivity, geometric proximity relationships, and terminal matching rules to construct a power equipment connection relationship matrix, realizing the automatic identification of conductor connection relationships between power equipment, effectively overcoming the problem of relying on manual inference of topological information in existing technologies.

[0015] This invention constructs a power architecture topology model based on a power equipment connection relationship matrix, and automatically generates a power architecture diagram conforming to power design specifications. It achieves an end-to-end closed loop from "image-level information" to "electrical topology representation" and then to "engineering graphical expression." Compared to traditional methods primarily based on manual drawing, this significantly shortens the power architecture diagram generation and update cycle and reduces reliance on the experience of professional personnel. Since the entire process is completed within a unified machine vision and topology analysis framework, this invention can quickly generate new power architecture diagrams by re-acquiring on-site images after power equipment adjustments, line modifications, or capacity expansions. This helps maintain consistency between drawings and the actual site, improving the real-time performance and accuracy of power grid planning, operation, and maintenance management. Furthermore, this invention outperforms existing fragmented identification or semi-automatic drawing schemes in terms of equipment identification accuracy, the completeness of topology relationship analysis, and the consistency of architecture diagram generation, demonstrating significant engineering application value and widespread applicability. Attached Figure Description

[0016] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0017] Fig. 1 This is an overall flowchart of a machine vision-based automatic power architecture generation method proposed in this invention. Fig. 2 This is a schematic diagram illustrating the construction of a candidate set of power equipment in a machine vision-based automatic power architecture generation method proposed in this invention. Fig. 3This is a schematic diagram of the improved SETR model of the automatic generation method of power architecture based on machine vision proposed in this invention. Detailed Implementation

[0018] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0019] refer to Figs. 1-3 A method for automatically generating power architecture based on machine vision includes the following steps: Acquire and preprocess images of the power field; Power equipment target detection is performed on the preprocessed power field images to obtain a candidate set of power equipment; The candidate regions of candidate power devices in the candidate power device candidate set are cropped and scaled, and the pixel-level contours of the candidate power devices are obtained using the improved SETR model. The categories of the candidate power devices are then identified to obtain the target power device set. Perform topological feature extraction on each target power device in the target power device set to form structured topological feature data; Based on structured topological feature data, the conductor connection relationships between power equipment are identified, a set of conductor connection records is obtained, and a power equipment connection relationship matrix is ​​generated. Construct a power architecture topology model based on the power equipment connection relationship matrix; Based on the set of nodes and branches in the power architecture topology model, the nodes are arranged hierarchically and mapped with graphical symbols to generate a power architecture diagram. The power architecture diagram is output in both image file format and engineering design file format, and then stored in the architecture diagram database.

[0020] In this embodiment, the power field images include visible light images of transmission towers, poles, conductors, transformers, circuit breakers, disconnect switches, busbars, and distribution cabinets. The preprocessing includes grayscale processing, noise reduction processing, distortion correction, perspective correction, and scale normalization processing.

[0021] In this embodiment, obtaining the candidate set of power equipment specifically includes: Candidate target regions are generated from the preprocessed power field images using preset anchor frames. Each candidate target region is used as a bounding rectangle as a candidate box. Feature analysis is performed on the image region corresponding to each candidate box, and the probability of each candidate box belonging to different power equipment categories is calculated to form category probability information. The calculation process involves extracting features that distinguish categories from the image region corresponding to each candidate box, comparing the features with preset features of each power equipment category, generating a score for each category based on the comparison similarity, and normalizing the scores of the same candidate box in each category. Based on the category probability information, an initial confidence score is obtained for each candidate box. The process of obtaining the score involves taking the maximum category probability of the candidate box among all power equipment categories as the initial confidence score of the candidate box. Candidate boxes are initially screened based on a preset confidence threshold. When the initial confidence score of a candidate box is greater than the confidence threshold, the candidate box is retained as a valid candidate box. When the initial confidence score of a candidate box is less than the confidence threshold, the candidate box is removed. Non-maximum suppression is performed on the valid candidate boxes. The intersection-union ratio (IUR) of the valid candidate boxes in the overlapping region is calculated. The IUR refers to the degree of overlap between two candidate boxes. When the IUR of the valid candidate boxes is greater than the preset IUR threshold, the valid candidate boxes are sorted from largest to smallest according to the initial confidence score. The valid candidate box with the first initial confidence score is retained, and the remaining valid candidate boxes are marked as candidate boxes to be removed. After the IUR calculation and removal marking of all valid candidate boxes are completed, all valid candidate boxes marked as candidate boxes to be removed are deleted to obtain the candidate box set. The position information of the candidate boxes in the candidate box set, the corresponding initial confidence scores, and the corresponding category probability information are used as the detection results of the candidate power equipment to form a power equipment candidate set.

[0022] In this embodiment, obtaining the target set of power equipment specifically includes: The candidate regions corresponding to each candidate power device in the candidate power device candidate set are cropped and scaled to form an image matrix. The image matrix is ​​then input into an improved SETR model. The improved SETR model includes a power device multi-scale feature encoding module, a global context modeling module, and a boundary refinement and power category sensitive decoding module. The power device multi-scale feature encoding module extracts features according to a preset multi-scale patch partitioning rule and multi-layer encoding operator to obtain multi-scale encoded features. The global context modeling module performs global context modeling and feature transformation on each multi-scale encoded feature to obtain a global context feature representation. The boundary refinement and power category sensitive decoding module introduces a contour-aware reconstruction mechanism to perform spatial dimension reconstruction and boundary enhancement processing on each global context feature representation to generate a pixel-level prediction map. In the multi-scale feature coding module for power equipment, the image matrix is ​​subjected to feature extraction according to the preset multi-scale patch partitioning rules and multi-layer coding operators to obtain multi-scale coded features. In the global context modeling module, global context modeling and feature transformation are performed on each multi-scale encoded feature to obtain the global context feature representation corresponding to each candidate power device; In the boundary refinement and power category sensitive decoding module, a contour-aware reconstruction mechanism is introduced to perform spatial dimension reconstruction and boundary enhancement processing on each global context feature representation, adjusting the spatial resolution of the global context feature representation to the same spatial size as the corresponding input image matrix, and generating a pixel-level prediction map. The category of each pixel position in the pixel-level prediction map is determined. For each pixel position in the same pixel-level prediction map, the power equipment category with the highest prediction probability is selected from the corresponding power equipment category prediction results as the equipment category label of the pixel position. The pixel-level outline of the corresponding power equipment is obtained according to the continuous spatial distribution of pixels of the same power equipment category. The device category labels of all pixels in each candidate region are statistically analyzed. For each power equipment category, the ratio between the number of pixels corresponding to the category and the total number of pixels in the candidate region is calculated. The ratio is used as the category probability of the candidate power equipment belonging to the power equipment category. The category probability vector of the candidate power equipment is constructed based on the category probability. The categories of candidate power devices are identified based on the category probability vectors corresponding to each candidate power device. The category of the power device with the largest category probability in the category probability vector is taken as the identification category of the candidate power device. Candidate power devices with pixel-level contour information and whose identification category belongs to the preset power device category set are taken as target power devices, forming a target power device set.

[0023] In this embodiment, the formation of the structured topological feature data specifically includes: Aggregate foreground pixels of target power equipment in the target power equipment set to form a pixel set of target power equipment; For the pixel set of the target power equipment, the geometric center coordinates of the target power equipment are calculated based on the coordinates of all pixels in the pixel set, and the width and height of the bounding rectangle are obtained based on the maximum and minimum values ​​of the horizontal coordinates and the maximum and minimum values ​​of the vertical coordinates of the pixels. Extract a set of candidate pixels for terminals within the boundary region of the pixel set of each target power device. Average the coordinates of all pixels in each candidate pixel set to obtain the terminal coordinates. Use the terminal coordinates as the terminal position information of the target power device. For each target power device, extract the conductor skeleton points from the pixel set of the conductors adjacent to the target power device. Based on the spatial distribution of the conductor skeleton points, obtain the starting skeleton points and ending skeleton points of each conductor segment associated with the target power device. Use the direction information from each starting skeleton point to each ending skeleton point as the direction information of the conductor segment. Calculate the Euclidean distance between the coordinates of each terminal of each target power device and the conductor skeleton point associated with the target power device. Select the skeleton point with the smallest Euclidean distance from the corresponding conductor skeleton points to obtain the coordinates of the conductor connection point. The geometric center coordinates, the width and height of the circumscribed rectangle, the terminal position information, the conductor routing information, and the conductor connection point coordinates of each target power device are combined to form the topological feature vector of the target power device. The topological feature vectors are then aggregated to form structured topological feature data.

[0024] In this embodiment, the generation of the power equipment connection relationship matrix specifically includes: Based on structured topological feature data, each target power device in the target power device set is numbered, and each terminal of each target power device is associated with the corresponding conductor connection point and the conductor segment identifier, forming a terminal connection identifier table indexed by device number, terminal number and conductor segment identifier; The terminal connection identification table is traversed one by one. For the same wire segment identification, all corresponding terminal connection records are retrieved, and the target power equipment number is extracted from each terminal connection record to form a target power equipment number list. When the list of target power equipment numbers contains two or more target power equipment numbers, the target power equipment numbers are paired up, and a wire connection record is established for the target power equipment connected by a wire segment. The wire connection records are archived and summarized according to the wire segment identifier to obtain a set of wire connection records between target power equipment. Based on the set of conductor connection records, a power equipment connection relationship matrix is ​​generated. The generation process involves pairing each target power equipment in the target power equipment set according to its number. For each pair of equipment, the set of conductor connection records is searched to see if there is a conductor connection record for that pair. If a conductor connection record exists, the matrix element at the corresponding position of the pair in the power equipment connection relationship matrix is ​​assigned a flag value indicating the existence of a conductor connection relationship. If no conductor connection record exists, the element in the device connection relationship matrix is ​​assigned a flag value indicating the absence of a conductor connection relationship.

[0025] In this embodiment, the construction of the power architecture topology model specifically includes: Each target power device is treated as a power system node, and node numbers are sequentially established according to the order of the target power devices in the power device connection matrix to form a node set; Based on the values ​​of each element in the power equipment connection matrix, it is determined whether there is a wire connection relationship between two target power equipment. Two target power equipment with a value indicating a wire connection relationship in the power equipment connection matrix are connected as a wire branch, and each wire branch is assigned a branch number to form a branch set. The node set and the branch set are aggregated to form a node-branch association matrix; The connectivity and loop characteristics of the power architecture are analyzed based on the node-branch association matrix. Each connected subnetwork is identified in the node-branch association matrix. For each connected subnetwork, the number of nodes and branches contained in the connected subnetwork are counted. The number of independent loops in the connected subnetwork is obtained based on the quantitative relationship between the number of branches and the number of nodes. The power architecture topology model is formed by combining the set of nodes, the set of branches, the power equipment connection matrix, the node-branch association matrix, and the number of independent loops.

[0026] In this embodiment, the generation of the power architecture diagram specifically includes: Based on the voltage level, wiring form, and hierarchical relationship of nodes in the power architecture topology model, the nodes in the node set are hierarchically divided, and planar coordinates are assigned to each node according to the preset arrangement rules to form a node layout coordinate set. Based on the category of power equipment corresponding to each node, a standardized graphic symbol corresponding to the power equipment category is selected from a preset power equipment graphic symbol library. A mapping relationship is established between each node and its corresponding standardized graphic symbol to form a node-graphic symbol correspondence relationship. The branch set is traversed. For each branch connecting two nodes, the connection path of the branch in the power architecture diagram is obtained according to the planar coordinates of the nodes at both ends of the branch in the node layout coordinate set and the preset connection generation rules. The geometric path data of the branch connection is generated. On the preset drawing plane, based on the node layout coordinate set, the correspondence between nodes and graphic symbols, and the geometric path data of branch connections, the standardized graphic symbols of each node are drawn and the branch connections are drawn and preset layout constraints are applied to obtain the power architecture diagram.

[0027] In this embodiment, the output process involves converting the power architecture diagram into image file format and engineering design file format according to preset export rules, naming and versioning the converted power architecture diagram files, and outputting the image files and engineering design files to a specified storage path.

[0028] Example 1: This embodiment selects a 110kV / 35kV / 10kV integrated substation under the jurisdiction of a city power grid company as the application scenario. This substation has a large primary equipment scale, including 3 main transformers, 6 110kV outgoing lines, 12 35kV outgoing lines, 24 10kV outgoing lines, and corresponding circuit breakers, disconnectors, busbars, current transformers, voltage transformers, surge arresters, and other primary equipment, totaling 126 sets. The primary side conductor and busbar connections are complex. Traditionally, the primary system diagram and wiring topology diagram of this substation are manually drawn and updated by designers or maintenance technicians based on site drawings, historical CAD files, and site survey results. The revision cycle for a complete drawing of a single substation typically takes 2-3 working days, and drawing updates are often delayed after equipment modifications or temporary wiring adjustments.

[0029] In this scenario, the method of this invention utilizes fixed cameras deployed within the substation, combined with drone inspections to acquire panoramic and close-up images of the substation. The acquired power site images undergo unified preprocessing, with the denoised, distortion-corrected, and scale-normalized images used as input. The system automatically performs power equipment target detection on the preprocessed images, obtaining a candidate set of power equipment including transformers, circuit breakers, disconnect switches, busbars, insulators, pole foundations, and conductors. Subsequently, each candidate equipment region is cropped and resized, and the normalized image blocks are input into an improved SETR model to obtain pixel-level segmentation results and equipment category identification results for the candidate power equipment, generating a target power equipment set. This process avoids the manual work of selecting and labeling equipment one by one on the image.

[0030] For the identified target power equipment, the system further extracts power topology-related features based on pixel-level contours, including the geometric center coordinates of the equipment, the size of the circumscribed rectangle, the location of terminal areas, the distribution of skeleton points adjacent to the conductors, and the direction information of conductor segments. This information is encoded into structured topology feature data. Subsequently, the system integrates the connectivity of conductor pixels, the spatial proximity between equipment terminals and conductor skeletons, and terminal matching rules to automatically determine the conductor connection relationships between each target power equipment, forming a set of conductor connection records. Based on this, a power equipment connection relationship matrix is ​​constructed. Through this connection relationship matrix, each target power equipment is mapped to a set of nodes in the power system, and the conductor connection relationships are mapped to a set of branches in the power system. This further constructs a power architecture topology model. Based on this model, a power architecture diagram conforming to enterprise design standards is automatically generated according to voltage level, wiring form, and hierarchical relationship. Finally, the diagram is output in image format and engineering design file format and archived into the architecture diagram database.

[0031] To verify the beneficial effects of the method of the present invention, a comparative test was conducted between the traditional manual drawing method and the method of the present invention in the aforementioned 110kV substation scenario. The traditional method involves electrical engineers with more than 5 years of experience manually revising the primary system diagram of the substation based on on-site survey records, historical CAD drawings, and primary wiring schemes. The method of the present invention, on the other hand, automatically generates the power architecture diagram directly based on the results of on-site image acquisition. The comparative evaluation indicators include equipment identification accuracy, conductor connection relationship identification accuracy, total time for single-station diagram generation, manual workload, topology error rate, and diagram version update cycle.

[0032] Table 1. Comparison of Machine Vision-Based Automatic Power Architecture Generation Method and Traditional Manual Drawing Method

[0033] As shown in Table 1, in the actual scenario of this 110kV substation, the method of this invention significantly outperforms traditional manual methods in both equipment identification accuracy and topology relationship identification accuracy. The primary equipment identification accuracy increased from 93.7% to 98.4%, and the number of missed key equipment units decreased from 8 units / sets to 2 units / sets. This is attributed to the invention's combination of power equipment target detection and an improved SETR model to obtain fine pixel-level contours and reliable category identification results, laying a more accurate foundation for subsequent topology feature extraction. Regarding conductor connection relationship identification, with the same scale of 412 connection relationships, the method of this invention improved the identification accuracy to 97.1%, and reduced the topology error rate from 7.8% to 1.9%, indicating that the power equipment connection relationship matrix constructed based on structured topology feature data can effectively reflect the actual electrical connection relationships, significantly reducing erroneous connections and omissions.

[0034] The difference in efficiency and workload is particularly striking. Traditional manual drawing methods require engineers to conduct on-site surveys, compile data, and complete drawing and verification, averaging about 18.5 hours per station. In contrast, the method of this invention, after image acquisition, automatically processes and generates the power architecture diagram in only about 2.3 hours. Actual human intervention is mainly concentrated on result verification and minor symbol adjustments, lasting approximately 0.8 hours, significantly reducing reliance on highly experienced engineers for extended periods. Furthermore, the method of this invention takes approximately 37 minutes from image preprocessing to initial power architecture diagram generation, making it suitable for rapid drawing updates after power equipment modifications and wiring adjustments. Compared to the traditional 2-3 working day update cycle, this significantly improves the real-time consistency between drawings and the actual site conditions.

[0035] From a maintenance and update perspective, after equipment modification or operation and maintenance adjustments, traditional methods often require re-verifying numerous equipment and wiring entries each time an update is performed. The method of this invention, by rerunning the automatic identification and topology construction process, significantly reduces the number of errors in the generated new drawings. On average, only about five items need manual modification, mainly focusing on minor adjustments to individual symbol positions or special wiring annotations, greatly reducing the workload of operation and maintenance personnel. In terms of overall quality evaluation, three senior electrical engineering experts scored the power architecture diagrams generated by the two methods. The drawings generated by the method of this invention achieved an average score of 92 points, significantly higher than the 82 points of traditional manual drawing. When on-site operation and maintenance personnel scored the readability, accuracy, and ease of updating of the drawings, the method of this invention also received a higher satisfaction rating.

[0036] In summary, the data in this embodiment fully demonstrate that the machine vision-based automatic power architecture generation method proposed in this invention can effectively solve the problems of low accuracy in power equipment identification, difficulty in automatically parsing topological relationships, and low efficiency in generating and updating power architecture diagrams in actual substation scenarios. While ensuring or improving the accuracy of the drawings, it significantly shortens the drawing generation cycle, reduces the amount of manual work, and improves the intelligence level and reliability of power system planning and operation and maintenance management.

Claims

1. A method for automatically generating power architecture based on machine vision, characterized in that, Includes the following steps: Acquire and preprocess images of the power field; Power equipment target detection is performed on the preprocessed power field images to obtain a candidate set of power equipment; The candidate regions of candidate power devices in the candidate power device candidate set are cropped and scaled, and the pixel-level contours of the candidate power devices are obtained using the improved SETR model. The categories of the candidate power devices are then identified to obtain the target power device set. Perform topological feature extraction on each target power device in the target power device set to form structured topological feature data; Based on structured topological feature data, the conductor connection relationships between power equipment are identified, a set of conductor connection records is obtained, and a power equipment connection relationship matrix is ​​generated. Construct a power architecture topology model based on the power equipment connection relationship matrix; Based on the set of nodes and branches in the power architecture topology model, the nodes are arranged hierarchically and mapped with graphical symbols to generate a power architecture diagram. The power architecture diagram is output in both image file format and engineering design file format, and then stored in the architecture diagram database.

2. The method for automatically generating power architecture based on machine vision according to claim 1, characterized in that, The power field images include visible light images of transmission towers, poles, conductors, transformers, circuit breakers, disconnect switches, busbars, and distribution cabinets. The preprocessing includes grayscale processing, noise reduction processing, distortion correction, perspective correction, and scale normalization processing.

3. The method for automatically generating power architecture based on machine vision according to claim 1, characterized in that, The specific steps involved in obtaining the candidate set of power equipment are as follows: Candidate target regions are generated from the preprocessed power field images using preset anchor frames. Each candidate target region is used as a bounding rectangle as a candidate box. Feature analysis is performed on the image region corresponding to each candidate box, and the probability of each candidate box belonging to different power equipment categories is calculated to form category probability information. The calculation process involves extracting features that distinguish categories from the image region corresponding to each candidate box, comparing the features with preset features of each power equipment category, generating a score for each category based on the comparison similarity, and normalizing the scores of the same candidate box in each category. Based on the category probability information, an initial confidence score is obtained for each candidate box. The process of obtaining the score involves taking the maximum category probability of the candidate box among all power equipment categories as the initial confidence score of the candidate box. Candidate boxes are initially screened based on a preset confidence threshold. When the initial confidence score of a candidate box is greater than the confidence threshold, the candidate box is retained as a valid candidate box. When the initial confidence score of a candidate box is less than the confidence threshold, the candidate box is removed. Non-maximum suppression is performed on the valid candidate boxes. The intersection-union ratio (IUR) of the valid candidate boxes in the overlapping region is calculated. The IUR refers to the degree of overlap between two candidate boxes. When the IUR of the valid candidate boxes is greater than the preset IUR threshold, the valid candidate boxes are sorted from largest to smallest according to the initial confidence score. The valid candidate box with the first initial confidence score is retained, and the remaining valid candidate boxes are marked as candidate boxes to be removed. After the IUR calculation and removal marking of all valid candidate boxes are completed, all valid candidate boxes marked as candidate boxes to be removed are deleted to obtain the candidate box set. The position information of the candidate boxes in the candidate box set, the corresponding initial confidence scores, and the corresponding category probability information are used as the detection results of the candidate power equipment to form a power equipment candidate set.

4. The method for automatically generating power architecture based on machine vision according to claim 1, characterized in that, The acquisition of the target set of power equipment specifically includes: The candidate regions corresponding to each candidate power device in the candidate power device candidate set are cropped and scaled to form an image matrix. The image matrix is ​​then input into an improved SETR model. The improved SETR model includes a power device multi-scale feature encoding module, a global context modeling module, and a boundary refinement and power category sensitive decoding module. The power device multi-scale feature encoding module extracts features according to a preset multi-scale patch partitioning rule and multi-layer encoding operator to obtain multi-scale encoded features. The global context modeling module performs global context modeling and feature transformation on each multi-scale encoded feature to obtain a global context feature representation. The boundary refinement and power category sensitive decoding module introduces a contour-aware reconstruction mechanism to perform spatial dimension reconstruction and boundary enhancement processing on each global context feature representation to generate a pixel-level prediction map. In the multi-scale feature coding module for power equipment, the image matrix is ​​subjected to feature extraction according to the preset multi-scale patching rules and multi-layer coding operators to obtain multi-scale coded features. In the global context modeling module, global context modeling and feature transformation are performed on each multi-scale encoded feature to obtain the global context feature representation corresponding to each candidate power device; In the boundary refinement and power category sensitive decoding module, a contour-aware reconstruction mechanism is introduced to perform spatial dimension reconstruction and boundary enhancement processing on each global context feature representation, adjusting the spatial resolution of the global context feature representation to the same spatial size as the corresponding input image matrix, and generating a pixel-level prediction map. The category of each pixel position in the pixel-level prediction map is determined. For each pixel position in the same pixel-level prediction map, the power equipment category with the highest prediction probability is selected from the corresponding power equipment category prediction results as the equipment category label of the pixel position. The pixel-level outline of the corresponding power equipment is obtained according to the continuous spatial distribution of pixels of the same power equipment category. The device category labels of all pixels in each candidate region are statistically analyzed. For each power equipment category, the ratio between the number of pixels corresponding to the category and the total number of pixels in the candidate region is calculated. The ratio is used as the category probability of the candidate power equipment belonging to the power equipment category. The category probability vector of the candidate power equipment is constructed based on the category probability. The categories of candidate power devices are identified based on the category probability vectors corresponding to each candidate power device. The category of the power device with the largest category probability in the category probability vector is taken as the identification category of the candidate power device. Candidate power devices with pixel-level contour information and whose identification category belongs to the preset power device category set are taken as target power devices, forming a target power device set.

5. The method for automatically generating power architecture based on machine vision according to claim 1, characterized in that, The formation of the structured topological feature data specifically includes: Aggregate foreground pixels of target power equipment in the target power equipment set to form a pixel set of target power equipment; For the pixel set of the target power equipment, the geometric center coordinates of the target power equipment are calculated based on the coordinates of all pixels in the pixel set, and the width and height of the bounding rectangle are obtained based on the maximum and minimum values ​​of the horizontal coordinates and the maximum and minimum values ​​of the vertical coordinates of the pixels. Extract a set of candidate pixels for terminals within the boundary region of the pixel set of each target power device. Average the coordinates of all pixels in each candidate pixel set to obtain the terminal coordinates. Use the terminal coordinates as the terminal position information of the target power device. For each target power device, extract the conductor skeleton points from the pixel set of the conductors adjacent to the target power device. Based on the spatial distribution of the conductor skeleton points, obtain the starting skeleton points and ending skeleton points of each conductor segment associated with the target power device. Use the direction information from each starting skeleton point to each ending skeleton point as the direction information of the conductor segment. Calculate the Euclidean distance between the coordinates of each terminal of each target power device and the conductor skeleton point associated with the target power device. Select the skeleton point with the smallest Euclidean distance from the corresponding conductor skeleton points to obtain the coordinates of the conductor connection point. The geometric center coordinates, the width and height of the circumscribed rectangle, the terminal position information, the conductor routing information, and the conductor connection point coordinates of each target power device are combined to form the topological feature vector of the target power device. The topological feature vectors are then aggregated to form structured topological feature data.

6. The method for automatically generating power architecture based on machine vision according to claim 1, characterized in that, The generation of the power equipment connection relationship matrix specifically includes: Based on structured topological feature data, each target power device in the target power device set is numbered, and each terminal of each target power device is associated with the corresponding conductor connection point and the conductor segment identifier, forming a terminal connection identifier table indexed by device number, terminal number and conductor segment identifier; The terminal connection identification table is traversed one by one. For the same wire segment identification, all corresponding terminal connection records are retrieved, and the target power equipment number is extracted from each terminal connection record to form a target power equipment number list. When the list of target power equipment numbers contains two or more target power equipment numbers, the target power equipment numbers are paired up, and a wire connection record is established for the target power equipment connected by a wire segment. The wire connection records are archived and summarized according to the wire segment identifier to obtain a set of wire connection records between target power equipment. Based on the set of conductor connection records, a power equipment connection relationship matrix is ​​generated. The generation process involves pairing each target power equipment in the target power equipment set according to its number. For each pair of equipment, the set of conductor connection records is searched to see if there is a conductor connection record for that pair. If a conductor connection record exists, the matrix element at the corresponding position of the pair in the power equipment connection relationship matrix is ​​assigned a flag value indicating the existence of a conductor connection relationship. If no conductor connection record exists, the element in the device connection relationship matrix is ​​assigned a flag value indicating the absence of a conductor connection relationship.

7. The method for automatically generating power architecture based on machine vision according to claim 1, characterized in that, The construction of the power architecture topology model specifically includes: Each target power device is treated as a power system node, and node numbers are sequentially established according to the order of the target power devices in the power device connection matrix to form a node set; Based on the values ​​of each element in the power equipment connection matrix, it is determined whether there is a wire connection relationship between two target power equipment. Two target power equipment with a value indicating a wire connection relationship in the power equipment connection matrix are connected as a wire branch, and each wire branch is assigned a branch number to form a branch set. The node set and the branch set are aggregated to form a node-branch association matrix; The connectivity and loop characteristics of the power architecture are analyzed based on the node-branch association matrix. Each connected subnetwork is identified in the node-branch association matrix. For each connected subnetwork, the number of nodes and branches contained in the connected subnetwork are counted. The number of independent loops in the connected subnetwork is obtained based on the quantitative relationship between the number of branches and the number of nodes. The power architecture topology model is formed by combining the set of nodes, the set of branches, the power equipment connection matrix, the node-branch association matrix, and the number of independent loops.

8. The method for automatically generating power architecture based on machine vision according to claim 1, characterized in that, The generation of the power architecture diagram specifically includes: Based on the voltage level, wiring form, and hierarchical relationship of nodes in the power architecture topology model, the nodes in the node set are hierarchically divided, and planar coordinates are assigned to each node according to the preset arrangement rules to form a node layout coordinate set. Based on the category of power equipment corresponding to each node, a standardized graphic symbol corresponding to the power equipment category is selected from a preset power equipment graphic symbol library. A mapping relationship is established between each node and its corresponding standardized graphic symbol to form a node-graphic symbol correspondence relationship. The branch set is traversed. For each branch connecting two nodes, the connection path of the branch in the power architecture diagram is obtained according to the planar coordinates of the nodes at both ends of the branch in the node layout coordinate set and the preset connection generation rules. The geometric path data of the branch connection is generated. On the preset drawing plane, based on the node layout coordinate set, the correspondence between nodes and graphic symbols, and the geometric path data of branch connections, the standardized graphic symbols of each node are drawn and the branch connections are drawn and preset layout constraints are applied to obtain the power architecture diagram.

9. The method for automatically generating power architecture based on machine vision according to claim 1, characterized in that, The output process involves converting the power architecture diagram into image file format and engineering design file format according to preset export rules, naming and versioning the converted power architecture diagram files, and outputting the image files and engineering design files to a specified storage path.