CN115082950A - Automatic identification, conversion and storage method for power grid station wiring diagram - Google Patents

Automatic identification, conversion and storage method for power grid station wiring diagram Download PDF

Info

Publication number
CN115082950A
CN115082950A CN202210633919.9A CN202210633919A CN115082950A CN 115082950 A CN115082950 A CN 115082950A CN 202210633919 A CN202210633919 A CN 202210633919A CN 115082950 A CN115082950 A CN 115082950A
Authority
CN
China
Prior art keywords
primitive
connecting line
equipment
wiring diagram
image file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210633919.9A
Other languages
Chinese (zh)
Inventor
秦子健
赵磊
胡昌伦
孟凡敏
陈泽伟
陈爱友
梁龙飞
张培杰
吕德勇
吕聪
丁吉峰
李新蕾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
Laiwu Power Supply Co of State Grid Shandong Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
Laiwu Power Supply Co of State Grid Shandong Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, Laiwu Power Supply Co of State Grid Shandong Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202210633919.9A priority Critical patent/CN115082950A/en
Publication of CN115082950A publication Critical patent/CN115082950A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/42Document-oriented image-based pattern recognition based on the type of document
    • G06V30/422Technical drawings; Geographical maps
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/19Recognition using electronic means
    • G06V30/191Design or setup of recognition systems or techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
    • G06V30/19147Obtaining sets of training patterns; Bootstrap methods, e.g. bagging or boosting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a power grid station wiring diagram automatic identification and conversion storage method, which belongs to the technical field of intelligent visualization of power systems and comprises the following steps: s1, acquiring an image file of an original format plant station wiring diagram, respectively identifying equipment primitives, characters and connecting line outlines in the diagram, and correcting an identification result; and S2, according to the corrected equipment primitives, characters, position coordinates of the contour of the connecting line and a relevant recognition result, constructing and storing a plant station wiring diagram topological relation matrix file. The method comprises the steps of automatically detecting and identifying equipment primitives, characters and connecting line outlines of a graphic file of a station wiring diagram in an original format, supplementing and correcting the characters and the connecting lines, and realizing light weight storage through a station wiring diagram topological relation matrix; the invention realizes the improvement of the automatic identification and conversion efficiency of the topological relation of the power grid station wiring diagram, effectively reduces the occupation of the electronic drawing on the storage space and improves the drawing and maintenance efficiency of automatic operation and maintenance personnel.

Description

Automatic identification, conversion and storage method for power grid station wiring diagram
Technical Field
The invention belongs to the technical field of intelligent visualization of power systems, and particularly relates to a power grid station wiring diagram automatic identification and conversion storage method.
Background
With the increase of the intelligent degree of the power grid and the increasing of the scale of the power grid, the requirement on the visualization degree of the structure and the operation data of the power grid is higher and higher, and a power grid station wiring diagram is an important way for describing the topological relation among equipment in each link of power generation, transmission, transformation and distribution of the power system and is also a main tool for analyzing, calculating, scheduling, operating and managing the power system. At present, the drawing and updating maintenance of a plant station wiring diagram still depend on manual drawing of automatic operation and maintenance personnel, and the operation and maintenance personnel need to manually complete the drawing of equipment primitives in the plant station wiring diagram, the manual input of related text information, the manual carding of topological relations in the wiring diagram and the updating maintenance of the wiring diagram by referring to a design drawing in a manual drawing mode. However, the plant wiring diagram has complex and various wiring forms, various equipment types, large drawing workload, low efficiency and complex maintenance, so that the problems of incomplete connection between the connecting lines and the primitives, missing of primitive information, mismatching of incidence relations and the like easily occur, and meanwhile, the problems of non-uniform graphic standards and large storage space occupied by the design drawing exist.
Therefore, it is very necessary to provide an automatic identification, conversion and storage method for a power grid station wiring diagram in order to overcome the above-mentioned drawbacks in the prior art.
Disclosure of Invention
The invention provides a power grid station wiring diagram automatic identification and conversion storage method, aiming at the defects that the existing power grid station wiring diagram in the prior art is complex in wiring form, multiple in equipment types, large in drawing workload, complex in maintenance, dependent on manual drawing of operation and maintenance personnel, incomplete connection between a connecting line and a primitive, primitive information loss, mismatching of association relation, non-uniform graphic standards and large in storage space occupied by a design drawing.
In a first aspect, the invention provides a method for automatically identifying, converting and storing a power grid station wiring diagram, which comprises the following steps:
s1, acquiring an image file of an original format plant station wiring diagram, respectively identifying equipment primitives, characters and connecting line outlines in the diagram, and correcting an identification result;
and S2, according to the corrected equipment primitives, characters, position coordinates of the contour of the connecting line and a relevant recognition result, constructing and storing a plant station wiring diagram topological relation matrix file.
Further, the step S1 specifically includes the following steps:
s11, reading an image file of a plant station wiring diagram in an original CAD format or a Visio format, and setting the image file as a first image file;
s12, after the first image file is preprocessed, detecting and identifying the equipment primitive target by using a primitive target detection model to obtain position coordinates, equipment primitive types and equipment primitive rotation angles of all equipment primitives in a station wiring diagram, and compiling an endpoint label and a unique primitive number for the identified equipment primitive;
s13, covering and hiding the equipment graphic element in the first image file to generate a second image file;
s14, preprocessing a second image file, detecting and identifying a character target by using a character target detection model to obtain position coordinates and text contents of all characters in a plant station wiring diagram, analyzing a voltage level according to the text contents, matching according to the incidence relation of the characters and the position coordinates of equipment primitives, and performing text supplementation on the equipment primitives with incomplete text contents to enable the equipment primitives to correspond to the text contents one by one so as to generate a text equipment primitive incidence matrix;
s15, covering and hiding the text content in the second image file to generate a third image file;
and S16, after preprocessing the third image file, detecting the contour of each connecting line by using a preset rectangular convolution kernel and a contour detection algorithm, acquiring coordinate data representing each position point of the contour of the connecting line, merging or splitting the coordinate data of each position point according to the horizontal or vertical line direction to form optimized connecting lines and position coordinates, and compiling an end point label and a unique connecting line number for each optimized connecting line. Reading an image file of an original format plant station wiring diagram, sequentially reading equipment primitives, characters and image elements of connecting lines, positioning the equipment primitives, the characters and the image elements, and simultaneously gradually hiding and covering the read image elements to reduce the difficulty of subsequent image processing.
Further, the step S12 specifically includes the following steps:
s121, acquiring a plurality of first image files serving as samples, and performing scaling pretreatment and cutting pretreatment on each first image file to generate an equipment graphic element training data set;
s122, constructing a primitive target detection model by adopting a region proposal network based on a two-stage target detection algorithm;
s123, training the primitive target detection model by using the equipment primitive training data set until the accuracy of the primitive target detection model meets a set threshold;
s124, acquiring a first image file to be identified, carrying out zooming pretreatment and cutting pretreatment, and then using a trained primitive target detection model to detect and identify the primitive target of the equipment to obtain the position coordinates of all equipment primitives, the equipment primitive categories and the equipment primitive rotation angles in the plant station wiring diagram;
and S125, compiling endpoint labels for the identified equipment primitives according to the endpoint quantity, and compiling unique primitive numbers for each equipment primitive. The number of the end points of the equipment primitives is used for accurately connecting the connecting lines with the end points of the associated equipment primitives when the plant station wiring diagram is drawn.
Further, the equipment primitive categories include circuit breakers or switches, disconnectors or switches, two-winding transformers, three-winding transformers, bus bars, capacitors, voltage transformers, current transformers, lightning arresters, loads, grounding switches, and generators. Device primitives that do not fall within the above ranges are marked and identified as other elements when they undergo target detection.
Further, the device primitive rotation angles include 0 degrees, 90 degrees, 180 degrees, and 270 degrees.
Further, the step S14 specifically includes the following steps:
s141, acquiring a plurality of second image files serving as samples, and performing scaling pretreatment and cutting pretreatment on each second image file to generate a text training data set;
s142, constructing a character target detection model based on a detection and recognition two-stage character recognition algorithm;
s143, training the character target detection model by using a text training data set until the accuracy of the text target detection model meets a set threshold;
s144, acquiring a second image file to be recognized, carrying out zooming pretreatment and cutting pretreatment, then using a trained character target detection model to carry out detection and recognition on a character target, obtaining position coordinates and text contents of all characters in a plant station wiring diagram, and analyzing the voltage grade of the plant station according to the text contents;
s145, performing association matching according to the coordinate position of the character and the position coordinate of the equipment primitive, and judging whether the text content is incomplete;
if yes, go to step S146;
if not, go to step S147;
s146, text supplementation is carried out on equipment primitives with incomplete text contents, so that the equipment primitives correspond to the text contents one to one;
and S147, generating a text equipment primitive association matrix according to the corresponding relation between the equipment primitives and the text content.
Further, each row of data of the text device primitive association matrix sequentially comprises a primitive number, a primitive category, a primitive position coordinate, a primitive rotation angle, a voltage level, a device number or interval name and a corresponding character position coordinate.
Further, the step S16 specifically includes the following steps:
s161, analyzing an OpenCV function library based on image processing, and sequentially performing gray-scale image conversion and image binarization preprocessing on a third image file to be identified;
s162, presetting a rectangular convolution kernel threshold value of the image, and adaptively adjusting the size of the rectangular convolution kernel within the rectangular convolution kernel threshold value range according to the size of the image;
s163, according to the size of a preset rectangular convolution kernel, filtering the preprocessed third image file respectively in the horizontal direction and the vertical direction;
s164, performing connecting line contour detection on the filtered third image file by using a contour detection algorithm in an OpenCV function library to obtain coordinate data representing each position point of the connecting line contour;
s165, according to the obtained coordinate data of each position point of the connecting line, combining or splitting the connecting line in the horizontal and vertical line directions in sequence to form a new optimized connecting line and position coordinates;
and S166, compiling an endpoint label and a unique connecting line label for the optimized connecting line. The size of the rectangular convolution kernel can be adjusted to ensure that a shorter line in the third image file is effectively detected; and the detection of the contour of the connecting line ensures that the connecting lines with different thicknesses in the third image file can obtain accurate position coordinates.
Further, the step S13 specifically includes the following steps:
s131, acquiring position coordinates of equipment primitives in the first image file;
s132, an OpenCV function library is analyzed through image processing, the position coordinates of the equipment primitives in the first image file are covered with image background colors, and a second image file hiding the equipment primitives is obtained;
the step S15 includes the following steps:
s151, acquiring position coordinates of characters in the second image file;
and S152, utilizing an image processing analysis OpenCV function library to cover the position coordinates of the characters in the second image file with image background colors, so as to obtain a third image file which hides the equipment primitives and the text content. After the equipment graphic elements in the first image file are hidden and covered, a second image file of the remaining characters and the connecting lines is obtained, and after the characters in the second image file are hidden and covered, a third image file of only the remaining connecting lines is obtained, the third image file is gradually hidden, the difficulty of subsequent image processing is reduced, and the workload of image processing is reduced.
Further, the step S2 specifically includes the following steps:
s21, obtaining position coordinates of each optimized connecting line, and constructing a connecting line incidence matrix representing the connection relation among the connecting lines;
s22, constructing a connecting line primitive association matrix representing the connection relation between the connecting lines and the equipment primitives according to the connecting line association matrix and the position coordinates of the equipment primitives;
and S23, according to the connecting line primitive incidence matrix and the text equipment primitive incidence matrix, constructing a plant station wiring diagram topological relation matrix, and outputting and storing a plant station wiring diagram topological relation matrix file. And in the later period, the plant station wiring diagram suitable for the power grid regulation and control department can be drawn only by reading, analyzing and processing data based on the plant station wiring diagram topological relation matrix file and combining a standard primitive library. The text device primitive association matrix is established when the character target is detected and identified, then a delivery station wiring diagram topological relation matrix is established by establishing the connection line association matrix and the connection line primitive association matrix, and lightweight storage is carried out.
Further, the connection relationship between the connection lines in step S21 specifically corresponds to the position relationship between the horizontal and vertical directions, including the cross and the T shape;
the step S21 includes the following steps:
s211, positioning a connecting line;
s212, acquiring position coordinates of the positioning connecting line and the rest connecting lines;
s213, judging whether the positioning connecting lines and the rest connecting lines have endpoint coordinate coincidence;
if yes, go to step S214;
if not, go to step S215;
s214, judging that the positioning connecting lines and the residual connecting lines with the overlapped corresponding end points have an incidence relation;
s215, judging whether all the connecting wires are positioned completely;
if yes, go to step S216;
if not, positioning the next connecting line, and returning to the step S212;
and S216, constructing a connecting line incidence matrix representing the connection relation between the connecting lines.
Furthermore, each row of the connection line incidence matrix comprises a connection line number, a connection line position coordinate, and numbers and end point labels of the rest connection lines associated with the connection line, and the row number of the connection line incidence matrix is the number of the connection lines.
Further, the step S22 specifically includes the following steps:
s221, acquiring a connection line incidence matrix and position coordinates of an equipment primitive;
s222, sequentially positioning the connecting lines in each row of the connecting line incidence matrix,
s223, judging whether the distance between any end point of the positioning connecting line and any equipment primitive is smaller than half of the length and width of the equipment primitive;
if yes, go to step S224;
if not, go to step S225;
s224, judging that the positioning connecting line is associated with the corresponding equipment primitive, and adding the serial number and the end point number of the equipment primitive to the back of the corresponding connecting line in the connecting line association matrix;
s225, judging whether all the connecting wires are positioned completely;
if yes, go to step S226;
if not, positioning the next connecting line, and returning to the step S223;
s226, generating a connecting line primitive incidence matrix according to the connecting line incidence matrix and the serial numbers and the end point numbers of the equipment primitives added behind the corresponding connecting lines.
Further, each row of the connection line primitive association matrix includes a connection line number, a connection line position coordinate, numbers and end point labels of the remaining connection lines associated with the connection line, and primitive numbers and end point labels associated with the connection line.
Further, the step S23 includes the following steps:
s231, sequentially positioning each line in the connecting line primitive association matrix;
s232, adding the primitive number, the primitive category, the primitive position coordinate, the primitive rotation angle, the voltage level, the equipment number or the interval name, the position coordinate of the corresponding character and the corresponding text content of the corresponding primitive to the corresponding row of the connecting line primitive association matrix;
s233, judging whether positioning of each row of the connecting line primitive association matrix is finished;
if yes, go to step S234;
if not, positioning the next row of the connection line primitive association matrix, and returning to the step S232;
and S234, generating a plant station wiring diagram topological relation matrix, and outputting and storing a plant station wiring diagram topological relation matrix file. The plant site wiring diagram topological relation matrix file can be stored by using json, txt or any other available file format.
Further, each row of the plant station wiring diagram topological relation matrix comprises a connecting line number, a connecting line position coordinate, numbers of the remaining connecting lines and end point labels associated with the connecting lines, primitive numbers and end point labels associated with the connecting lines, a device primitive type, a device primitive position coordinate, a device primitive rotation angle, a voltage level, a device number or interval name, a corresponding character position coordinate and a corresponding text content.
The invention has the beneficial effects that:
the invention provides a method for automatically identifying, converting and storing a power grid station wiring diagram, which realizes automatic detection and identification of equipment primitives, characters and connecting line outlines on a graphic file of the station wiring diagram in a CAD (computer-aided design) or Visio format, supplements and corrects the characters and the connecting lines, and realizes light-weight storage through a station wiring diagram topological relation matrix. The invention realizes the improvement of the automatic identification and conversion efficiency of the topological relation of the power grid station wiring diagram, effectively reduces the occupation of the electronic drawing on the storage space and improves the drawing and maintenance efficiency of automatic operation and maintenance personnel.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a schematic flow diagram of an embodiment 1 of a power grid station wiring diagram automatic identification and conversion storage method of the present invention.
Fig. 2 is a schematic flow diagram of an embodiment 2 of the automatic identification, conversion and storage method of the power grid station wiring diagram of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
as shown in fig. 1, the invention provides a method for automatically identifying, converting and storing a power grid station wiring diagram, which comprises the following steps:
s1, acquiring an image file of an original format plant station wiring diagram, respectively identifying equipment primitives, characters and connecting line outlines in the diagram, and correcting an identification result;
and S2, according to the corrected equipment primitives, characters, position coordinates of the contour of the connecting line and a relevant recognition result, constructing and storing a plant station wiring diagram topological relation matrix file.
Example 2:
as shown in fig. 2, the invention provides an automatic identification, conversion and storage method for a power grid plant wiring diagram, which comprises the following steps:
s1, acquiring an image file of an original format plant station wiring diagram, respectively identifying equipment primitives, characters and connecting line outlines, and correcting an identification result; the method comprises the following specific steps:
s11, reading an image file of a plant station wiring diagram in an original CAD format or a Visio format, and setting the image file as a first image file;
s12, after preprocessing the first image file, detecting and identifying the equipment primitive target by using a primitive target detection model to obtain position coordinates, equipment primitive categories and equipment primitive rotation angles of all equipment primitives in the plant station wiring diagram, and compiling endpoint labels and unique primitive numbers for the identified equipment primitives;
s13, covering and hiding the equipment graphic element in the first image file to generate a second image file;
s14, preprocessing a second image file, detecting and identifying a character target by using a character target detection model to obtain position coordinates and text contents of all characters in a plant station wiring diagram, analyzing a voltage level according to the text contents, matching according to the incidence relation of the characters and the position coordinates of equipment primitives, and performing text supplementation on the equipment primitives with incomplete text contents to enable the equipment primitives to correspond to the text contents one by one so as to generate a text equipment primitive incidence matrix;
s15, covering and hiding the text content in the second image file to generate a third image file;
s16, preprocessing a third image file, detecting the outline of each connecting line by using a preset rectangular convolution kernel and an outline detection algorithm, acquiring coordinate data representing each position point of the outline of each connecting line, combining or splitting the coordinate data of each position point according to the horizontal or vertical line direction to form optimized connecting lines and position coordinates, and compiling an endpoint label and a unique connecting line number for each optimized connecting line;
reading an image file of an original format plant station wiring diagram, sequentially reading equipment primitives, characters and image elements of connecting lines, positioning the equipment primitives, the characters and the image elements, and simultaneously gradually hiding and covering the read image elements to reduce the difficulty of subsequent image processing;
s2, according to the corrected equipment graphic elements, characters, position coordinates of connecting line outlines and related recognition results, constructing and storing a plant station wiring diagram topological relation matrix file; the method comprises the following specific steps:
s21, obtaining position coordinates of each optimized connecting line, and constructing a connecting line incidence matrix representing the connection relation among the connecting lines;
s22, constructing a connecting line primitive association matrix representing the connection relation between the connecting lines and the equipment primitives according to the connecting line association matrix and the position coordinates of the equipment primitives;
s23, according to the connecting line primitive incidence matrix and the text equipment primitive incidence matrix, constructing a plant station wiring diagram topological relation matrix, and outputting and storing a plant station wiring diagram topological relation matrix file; the text device primitive association matrix is established when the character target is detected and identified, then a delivery station wiring diagram topological relation matrix is established by establishing the connection line association matrix and the connection line primitive association matrix, and lightweight storage is carried out.
In some embodiments, step S12 includes the following steps:
s121, acquiring a plurality of first image files serving as samples, and performing scaling pretreatment and cutting pretreatment on each first image file to generate an equipment primitive training data set;
s122, constructing a primitive target detection model by adopting a region proposal network based on a two-stage target detection algorithm;
s123, training the primitive target detection model by using the equipment primitive training data set until the accuracy of the primitive target detection model meets a set threshold;
s124, acquiring a first image file to be identified, carrying out zooming pretreatment and cutting pretreatment, and then using a trained primitive target detection model to detect and identify the primitive target of the equipment to obtain the position coordinates of all equipment primitives, the equipment primitive categories and the equipment primitive rotation angles in the plant station wiring diagram;
s125, compiling endpoint labels for the identified equipment primitives according to the endpoint quantity, and compiling a unique primitive number for each equipment primitive;
the number of the end points of the equipment primitives is used for accurately connecting the connecting lines with the end points of the associated equipment primitives when the plant station wiring diagram is drawn;
the classes of equipment elements include circuit breakers or switches, disconnectors or switches, two-winding transformers, three-winding transformers, bus bars, capacitors, voltage transformers, current transformers, lightning arresters, loads, grounding switches, and generators. When the equipment primitives which do not belong to the range are subjected to target detection, marking and identifying the equipment primitives as other elements;
the equipment primitive rotation angles comprise 0 degree, 90 degrees, 180 degrees and 270 degrees;
the step S13 includes the following steps:
s131, acquiring position coordinates of equipment primitives in the first image file;
s132, an OpenCV function library is analyzed through image processing, the position coordinates of the equipment primitives in the first image file are covered with image background colors, and a second image file hiding the equipment primitives is obtained;
the step S14 includes the following steps:
s141, acquiring a plurality of second image files serving as samples, and performing scaling pretreatment and cutting pretreatment on each second image file to generate a text training data set;
s142, constructing a character target detection model based on a detection and recognition two-stage character recognition algorithm;
s143, training the character target detection model by using a text training data set until the accuracy of the text target detection model meets a set threshold;
s144, acquiring a second image file to be recognized, carrying out zooming pretreatment and cutting pretreatment, then using a trained character target detection model to carry out detection and recognition on a character target, obtaining position coordinates and text contents of all characters in a plant station wiring diagram, and analyzing the voltage grade of the plant station according to the text contents;
s145, performing association matching according to the coordinate position of the character and the position coordinate of the equipment primitive, and judging whether the text content is incomplete;
if yes, go to step S146;
if not, go to step S147;
s146, text supplementation is carried out on equipment primitives with incomplete text contents, so that the equipment primitives correspond to the text contents one to one;
s147, generating a text device primitive association matrix according to the corresponding relation between the device primitive and the text content;
each row of data of the text equipment primitive association matrix sequentially comprises a primitive number, a primitive category, a primitive position coordinate, a primitive rotation angle, a voltage level, an equipment number or interval name and a corresponding character position coordinate;
the step S15 includes the following steps:
s151, acquiring position coordinates of characters in the second image file;
s152, an OpenCV function library is analyzed through image processing, the position coordinates of characters in the second image file are covered with image background colors, and a third image file which hides equipment primitives and text contents is obtained;
after hiding and covering the equipment graphic element in the first image file, obtaining a second image file of the residual characters and the connecting lines, and after hiding and covering the characters in the second image file, obtaining a third image file of only the residual connecting lines, and gradually processing and gradually hiding the third image file, thereby reducing the difficulty of subsequent image processing and the workload of image processing;
the step S16 includes the following steps:
s161, analyzing an OpenCV function library based on image processing, and sequentially performing gray-scale image conversion and image binarization preprocessing on a third image file to be identified;
s162, presetting a rectangular convolution kernel threshold value of the image, and adaptively adjusting the size of the rectangular convolution kernel within the rectangular convolution kernel threshold value range according to the size of the image;
s163, according to the size of a preset rectangular convolution kernel, filtering the preprocessed third image file respectively in the horizontal direction and the vertical direction;
s164, performing connecting line contour detection on the filtered third image file by using a contour detection algorithm in an OpenCV function library to obtain coordinate data representing each position point of the connecting line contour;
s165. according to the obtained coordinate data of each position point of the connecting line, combining or splitting the connecting line in the horizontal and vertical line directions in sequence to form a new optimized connecting line and position coordinates;
s166, compiling an endpoint label and a unique connecting line label for the optimized connecting line; the size of the rectangular convolution kernel can be adjusted to ensure that a shorter line in the third image file is effectively detected; and the detection of the contour of the connecting line ensures that the connecting lines with different thicknesses in the third image file can obtain accurate position coordinates.
In some embodiments, the connection relationship between the connection lines in step S21 specifically corresponds to the position relationship between the horizontal and vertical directions, including the cross and the T shape;
the step S21 includes the following steps:
s211, positioning a connecting line;
s212, acquiring position coordinates of the positioning connecting line and the rest connecting lines;
s213, judging whether the positioning connecting lines and the rest connecting lines have endpoint coordinate coincidence;
if yes, go to step S214;
if not, go to step S215;
s214, judging that the positioning connecting lines and the residual connecting lines with the overlapped corresponding end points have an incidence relation;
s215, judging whether all the connecting wires are positioned completely;
if yes, go to step S216;
if not, positioning the next connecting line, and returning to the step S212;
s216, constructing a connecting line incidence matrix representing the connection relation among the connecting lines, wherein each row of the connecting line incidence matrix comprises a connecting line number, a connecting line position coordinate, and the numbers and end point numbers of the rest connecting lines associated with the connecting lines, and the row number of the connecting line incidence matrix is the number of the connecting lines;
each row of the connecting line incidence matrix comprises a connecting line number, a connecting line position coordinate, and the number and the end point number of the rest connecting lines associated with the connecting line, and the row number of the connecting line incidence matrix is the number of the connecting lines;
the step S22 includes the following steps:
s221, acquiring a connection line incidence matrix and position coordinates of an equipment primitive;
s222, sequentially positioning the connecting lines in each row of the connecting line incidence matrix,
s223, judging whether the distance between any end point of the positioning connecting line and any equipment primitive is smaller than half of the length and width of the equipment primitive;
if yes, go to step S224;
if not, go to step S225;
s224, judging that the positioning connecting line is associated with the corresponding equipment primitive, and adding the serial number and the end point number of the equipment primitive to the back of the corresponding connecting line in the connecting line association matrix;
s225, judging whether all the connecting wires are positioned completely;
if yes, go to step S226;
if not, positioning the next connecting line, and returning to the step S223;
s226, generating a connecting line primitive association matrix according to the connecting line primitive association matrix and the serial numbers and the end point numbers of equipment primitives added behind the corresponding connecting lines, wherein each row of the connecting line primitive association matrix comprises a connecting line serial number, a connecting line position coordinate, the serial numbers and the end point numbers of the rest connecting lines associated with the connecting lines and the primitive numbers and the end point numbers associated with the connecting lines;
the step S23 includes the following steps:
s231, sequentially positioning each line in the connecting line primitive association matrix;
s232, adding the primitive number, the primitive category, the primitive position coordinate, the primitive rotation angle, the voltage level, the equipment number or the interval name, the position coordinate of the corresponding character and the corresponding text content of the corresponding primitive to the corresponding row of the connecting line primitive association matrix;
s233, judging whether positioning of each row of the connecting line primitive association matrix is finished;
if yes, go to step S234;
if not, the next row of the connecting line primitive association matrix is positioned, and the step S232 is returned;
s234, generating a plant station wiring diagram topological relation matrix, and outputting and storing a plant station wiring diagram topological relation matrix file;
the plant station wiring diagram topological relation matrix file can be stored by using json, txt or any other available file format;
each row of the plant station wiring diagram topological relation matrix comprises a connecting line number, a connecting line position coordinate, numbers of the rest connecting lines and end point labels associated with the connecting lines, primitive numbers and end point labels associated with the connecting lines, equipment primitive categories, equipment primitive position coordinates, equipment primitive rotation angles, voltage levels, equipment numbers or interval names, corresponding character position coordinates and corresponding text contents.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A power grid station wiring diagram automatic identification and conversion storage method is characterized by comprising the following steps:
s1, acquiring an image file of an original format plant station wiring diagram, respectively identifying equipment primitives, characters and connecting line outlines in the diagram, and correcting an identification result;
and S2, according to the corrected equipment primitives, characters, position coordinates of the contour of the connecting line and a relevant recognition result, constructing and storing a plant station wiring diagram topological relation matrix file.
2. The method for automatically identifying, converting and storing the power grid station wiring diagram according to claim 1, wherein the step S1 specifically comprises the following steps:
s11, reading an image file of a plant station wiring diagram in an original CAD format or a Visio format, and setting the image file as a first image file;
s12, after preprocessing the first image file, detecting and identifying the equipment primitive target by using a primitive target detection model to obtain position coordinates, equipment primitive categories and equipment primitive rotation angles of all equipment primitives in the plant station wiring diagram, and compiling endpoint labels and unique primitive numbers for the identified equipment primitives;
s13, covering and hiding the equipment graphic element in the first image file to generate a second image file;
s14, preprocessing a second image file, detecting and identifying a character target by using a character target detection model to obtain position coordinates and text contents of all characters in a plant station wiring diagram, analyzing a voltage level according to the text contents, matching according to the incidence relation of the characters and the position coordinates of equipment primitives, and performing text supplementation on the equipment primitives with incomplete text contents to enable the equipment primitives to correspond to the text contents one by one so as to generate a text equipment primitive incidence matrix;
s15, covering and hiding the text content in the second image file to generate a third image file;
and S16, after preprocessing the third image file, detecting the contour of each connecting line by using a preset rectangular convolution kernel and a contour detection algorithm, acquiring coordinate data representing each position point of the contour of the connecting line, merging or splitting the coordinate data of each position point according to the horizontal or vertical line direction to form optimized connecting lines and position coordinates, and compiling an end point label and a unique connecting line number for each optimized connecting line.
3. The method for automatically identifying, converting and storing the power grid station wiring diagram according to claim 2, wherein the step S12 specifically comprises the following steps:
s121, acquiring a plurality of first image files serving as samples, and performing scaling pretreatment and cutting pretreatment on each first image file to generate an equipment graphic element training data set;
s122, constructing a primitive target detection model by adopting a region proposal network based on a two-stage target detection algorithm;
s123, training the primitive target detection model by using the equipment primitive training data set until the accuracy of the primitive target detection model meets a set threshold;
s124, acquiring a first image file to be identified, carrying out scaling pretreatment and cutting pretreatment, and then using a trained primitive target detection model to detect and identify the primitive target of the equipment to obtain the position coordinates of all equipment primitives, the equipment primitive categories and the equipment primitive rotation angles in the plant station wiring diagram;
and S125, compiling endpoint labels for the identified equipment primitives according to the endpoint quantity, and compiling unique primitive numbers for each equipment primitive.
4. The method for automatically identifying, converting and storing the power grid station wiring diagram according to claim 2, wherein the step S14 specifically comprises the following steps:
s141, acquiring a plurality of second image files serving as samples, and performing scaling pretreatment and cutting pretreatment on each second image file to generate a text training data set;
s142, constructing a character target detection model based on a detection and recognition two-stage character recognition algorithm;
s143, training the character target detection model by using a text training data set until the accuracy rate of the text target detection model meets a set threshold;
s144, acquiring a second image file to be recognized, carrying out zooming pretreatment and cutting pretreatment, then using a trained character target detection model to carry out detection and recognition on a character target, obtaining position coordinates and text contents of all characters in a plant station wiring diagram, and analyzing the voltage grade of the plant station according to the text contents;
s145, performing association matching according to the coordinate position of the character and the position coordinate of the equipment primitive, and judging whether the text content is incomplete;
if yes, go to step S146;
if not, go to step S147;
s146, text supplementation is carried out on equipment primitives with incomplete text contents, so that the equipment primitives correspond to the text contents one to one;
and S147, generating a text equipment primitive association matrix according to the corresponding relation between the equipment primitives and the text content.
5. The method for automatically identifying, converting and storing the power grid station wiring diagram according to claim 2, wherein the step S16 specifically comprises the following steps:
s161, analyzing an OpenCV function library based on image processing, and sequentially performing gray-scale image conversion and image binarization preprocessing on a third image file to be identified;
s162, presetting a rectangular convolution kernel threshold value of the image, and adaptively adjusting the size of the rectangular convolution kernel within the rectangular convolution kernel threshold value range according to the size of the image;
s163, according to the size of a preset rectangular convolution kernel, filtering the preprocessed third image file respectively in the horizontal direction and the vertical direction;
s164, performing connecting line contour detection on the filtered third image file by using a contour detection algorithm in an OpenCV function library to obtain coordinate data representing each position point of the connecting line contour;
s165, according to the obtained coordinate data of each position point of the connecting line, combining or splitting the connecting line in the horizontal and vertical line directions in sequence to form a new optimized connecting line and position coordinates;
and S166, compiling an endpoint label and a unique connecting line label for the optimized connecting line.
6. The method for automatically identifying, converting and storing the power grid station wiring diagram according to claim 2, wherein the step S13 specifically comprises the following steps:
s131, acquiring position coordinates of equipment primitives in the first image file;
s132, an OpenCV function library is analyzed through image processing, the position coordinates of the equipment primitives in the first image file are covered with image background colors, and a second image file hiding the equipment primitives is obtained;
the step S15 includes the following steps:
s151, acquiring position coordinates of characters in the second image file;
s152, an OpenCV function library is analyzed through image processing, the position coordinates of characters in the second image file are covered with image background colors, and a third image file with hidden equipment primitives and text contents is obtained.
7. The method for automatically identifying, converting and storing the power grid station wiring diagram according to claim 2, wherein the step S2 specifically comprises the following steps:
s21, obtaining position coordinates of each optimized connecting line, and constructing a connecting line incidence matrix representing the connection relation among the connecting lines;
s22, constructing a connecting line primitive association matrix representing the connection relation between the connecting lines and the equipment primitives according to the connecting line association matrix and the position coordinates of the equipment primitives;
and S23, according to the connecting line primitive incidence matrix and the text equipment primitive incidence matrix, constructing a plant station wiring diagram topological relation matrix, and outputting and storing a plant station wiring diagram topological relation matrix file.
8. The method for automatically identifying, converting and storing the power grid station wiring diagram according to claim 7, wherein the connection relationship between the connection lines in the step S21 specifically corresponds to the position relationship between the horizontal direction and the vertical direction, including a cross and a T shape;
the step S21 includes the following steps:
s211, positioning a connecting line;
s212, acquiring position coordinates of the positioning connecting line and the rest connecting lines;
s213, judging whether the positioning connecting lines and the rest connecting lines have endpoint coordinate coincidence;
if yes, go to step S214;
if not, go to step S215;
s214, judging that the positioning connecting lines and the residual connecting lines with the overlapped corresponding end points have an incidence relation;
s215, judging whether all the connecting wires are positioned completely;
if yes, go to step S216;
if not, positioning the next connecting line, and returning to the step S212;
and S216, constructing a connecting line incidence matrix representing the connection relation between the connecting lines.
9. The method for automatically identifying, converting and storing the power grid station wiring diagram according to claim 8, wherein the step S22 specifically comprises the following steps:
s221, acquiring a connection line incidence matrix and position coordinates of an equipment primitive;
s222, sequentially positioning the connecting lines in each row of the connecting line incidence matrix,
s223, judging whether the distance between any end point of the positioning connecting line and any equipment primitive is smaller than half of the length and width of the equipment primitive;
if yes, go to step S224;
if not, go to step S225;
s224, judging that the positioning connecting line is associated with the corresponding equipment primitive, and adding the serial number and the endpoint number of the equipment primitive to the back of the corresponding connecting line in the connecting line association matrix;
s225, judging whether all the connecting wires are positioned completely;
if yes, go to step S226;
if not, positioning the next connecting line, and returning to the step S223;
s226, generating a connecting line primitive association matrix according to the connecting line primitive association matrix and the serial numbers and the end point numbers of the equipment primitives added behind the corresponding connecting lines, wherein each row of the connecting line primitive association matrix comprises a connecting line serial number, a connecting line position coordinate, the serial numbers and the end point numbers of the rest connecting lines associated with the connecting lines and the primitive numbers and the end point numbers associated with the connecting lines.
10. The method for automatically identifying, converting and storing the power grid station wiring diagram according to claim 7, wherein the step S23 specifically comprises the following steps:
s231, sequentially positioning each line in the connecting line primitive association matrix;
s232, adding the primitive number, the primitive category, the primitive position coordinate, the primitive rotation angle, the voltage level, the equipment number or the interval name, the position coordinate of the corresponding character and the corresponding text content of the corresponding primitive to the corresponding row of the connecting line primitive association matrix;
s233, judging whether positioning of each row of the connecting line primitive association matrix is finished;
if yes, go to step S234;
if not, the next row of the connecting line primitive association matrix is positioned, and the step S232 is returned;
and S234, generating a plant station wiring diagram topological relation matrix, and outputting and storing a plant station wiring diagram topological relation matrix file.
CN202210633919.9A 2022-06-07 2022-06-07 Automatic identification, conversion and storage method for power grid station wiring diagram Pending CN115082950A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210633919.9A CN115082950A (en) 2022-06-07 2022-06-07 Automatic identification, conversion and storage method for power grid station wiring diagram

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210633919.9A CN115082950A (en) 2022-06-07 2022-06-07 Automatic identification, conversion and storage method for power grid station wiring diagram

Publications (1)

Publication Number Publication Date
CN115082950A true CN115082950A (en) 2022-09-20

Family

ID=83251922

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210633919.9A Pending CN115082950A (en) 2022-06-07 2022-06-07 Automatic identification, conversion and storage method for power grid station wiring diagram

Country Status (1)

Country Link
CN (1) CN115082950A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116310765A (en) * 2023-05-23 2023-06-23 华雁智能科技(集团)股份有限公司 Electrical wiring graphic primitive identification method
CN117113600A (en) * 2023-08-24 2023-11-24 国网四川省电力公司天府新区供电公司 Intelligent conversion method for power grid station wiring diagram
CN117277553A (en) * 2023-08-24 2023-12-22 国网四川省电力公司天府新区供电公司 Intelligent processing method for monitoring information of power grid plant station
CN117526332A (en) * 2024-01-08 2024-02-06 华雁智能科技(集团)股份有限公司 Method and device for generating power grid tidal current diagram, electronic equipment and storage medium
CN117277553B (en) * 2023-08-24 2024-06-25 国网四川省电力公司天府新区供电公司 Intelligent processing method for monitoring information of power grid plant station

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116310765A (en) * 2023-05-23 2023-06-23 华雁智能科技(集团)股份有限公司 Electrical wiring graphic primitive identification method
CN116310765B (en) * 2023-05-23 2023-09-01 华雁智能科技(集团)股份有限公司 Electrical wiring graphic primitive identification method
CN117113600A (en) * 2023-08-24 2023-11-24 国网四川省电力公司天府新区供电公司 Intelligent conversion method for power grid station wiring diagram
CN117277553A (en) * 2023-08-24 2023-12-22 国网四川省电力公司天府新区供电公司 Intelligent processing method for monitoring information of power grid plant station
CN117113600B (en) * 2023-08-24 2024-06-04 国网四川省电力公司天府新区供电公司 Intelligent conversion method for power grid station wiring diagram
CN117277553B (en) * 2023-08-24 2024-06-25 国网四川省电力公司天府新区供电公司 Intelligent processing method for monitoring information of power grid plant station
CN117526332A (en) * 2024-01-08 2024-02-06 华雁智能科技(集团)股份有限公司 Method and device for generating power grid tidal current diagram, electronic equipment and storage medium
CN117526332B (en) * 2024-01-08 2024-04-05 华雁智能科技(集团)股份有限公司 Method and device for generating power grid tidal current diagram, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN115082950A (en) Automatic identification, conversion and storage method for power grid station wiring diagram
CN105718636B (en) A kind of plant stand main wiring diagram model automatic switching method
Li et al. An automatic detection method of bird’s nest on transmission line tower based on faster_RCNN
CN107784661A (en) Substation equipment infrared image classifying identification method based on region-growing method
CN106980856B (en) Formula identification method and system and symbolic reasoning calculation method and system
CN112905804B (en) Dynamic updating method and device for power grid dispatching knowledge graph
CN111144325A (en) Fault identification and positioning method, device and equipment for power equipment of transformer substation
CN111859805B (en) Method for detecting topological relation of electric power drawing based on artificial intelligence
CN112884764A (en) Method and device for extracting land parcel in image, electronic equipment and storage medium
CN115457591A (en) Identification method for topological relation of main wiring diagram of power grid station
CN116028838B (en) Clustering algorithm-based energy data processing method and device and terminal equipment
CN112149663A (en) RPA and AI combined image character extraction method and device and electronic equipment
CN110046391A (en) Transforming plant primary wiring diagram automatic generation method based on monitoring information table
CN110705361A (en) Intelligent damage assessment method and device for vehicle, computer system and readable storage medium
CN115376155A (en) Station wiring diagram detection method based on YOLOv6 and traditional image processing technology
CN114299394A (en) Intelligent interpretation method for remote sensing image
Zhong et al. Least-squares method and deep learning in the identification and analysis of name-plates of power equipment
CN113688987A (en) Training method of photovoltaic monitoring model, monitoring method of photovoltaic equipment and equipment
CN116361502B (en) Image retrieval method, device, computer equipment and storage medium
CN116484558A (en) Multi-source model automatic mapping method, equipment and medium based on source end model
CN116541912A (en) Method and device for generating wiring diagram based on CAD image recognition
CN116629606A (en) Industrial chain early warning method, device, equipment and medium based on power data
CN116912872A (en) Drawing identification method, device, equipment and readable storage medium
CN113658195B (en) Image segmentation method and device and electronic equipment
CN115984885A (en) Work order management method and system for marketing field operation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination